<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Benchmarking your code
Step1:  Using magic functions of Jupyter and timeit
https
Step3:  Exercises
What is the fastest way to download 100 pages from index.hu?
How to calculate the factors of 1000 random integers effectively using factorize_naive function below?
<ASSISTANT_TASK:>
Python Code:
def fun():
    max(range(1000))
Explanation: Benchmarking your code
End of explanation
%%timeit
fun()
%%time
fun()
Explanation: Using magic functions of Jupyter and timeit
https://docs.python.org/3.5/library/timeit.html
https://ipython.org/ipython-doc/3/interactive/magics.html#magic-time
End of explanation
import requests
def get_page(url): 
    response = requests.request(url=url, method="GET")
    return response
get_page("http://index.hu")
def factorize_naive(n):
     A naive factorization method. Take integer 'n', return list of
        factors.
    
    if n < 2:
        return []
    factors = []
    p = 2
    while True:
        if n == 1:
            return factors
        r = n % p
        if r == 0:
            factors.append(p)
            n = n // p
        elif p * p >= n:
            factors.append(n)
            return factors
        elif p > 2:
            # Advance in steps of 2 over odd numbers
            p += 2
        else:
            # If p == 2, get to 3
            p += 1
    assert False, "unreachable"
Explanation: Exercises
What is the fastest way to download 100 pages from index.hu?
How to calculate the factors of 1000 random integers effectively using factorize_naive function below?
End of explanation
<END_TASK>