import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline




@pytest.mark.integration
def     UpperCamelCase						(	):
		'''simple docstring'''




		with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT     ):
				with pytest.raises(__lowercase     ):
						requests.request('GET'						,'https://huggingface.co'     )
				with pytest.raises(requests.exceptions.ConnectTimeout     ):
						requests.request('GET'						,'https://huggingface.co'						,timeout=1.0     )




@pytest.mark.integration
def     UpperCamelCase						(	):
		'''simple docstring'''




		with offline(OfflineSimulationMode.CONNECTION_FAILS     ):
				with pytest.raises(requests.exceptions.ConnectionError     ):
						requests.request('GET'						,'https://huggingface.co'     )




def     UpperCamelCase						(	):
		'''simple docstring'''




		with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1     ):
				with pytest.raises(__lowercase     ):
						http_head('https://huggingface.co'     )







from math import isqrt




def     UpperCamelCase						(	__lowercase						:			int     ):
		'''simple docstring'''




		return all(number % divisor != 0 for divisor in range(2						,isqrt(__lowercase     ) + 1     )     )




def     UpperCamelCase						(	__lowercase						:			int = 10**6     ):
		'''simple docstring'''




		A_		:    Optional[Any]         =				0
		A_		:    List[str]         =				1
		A_		:    Dict         =				7
		while prime_candidate < max_prime:
				primes_count += is_prime(__lowercase     )

				cube_index += 1
				prime_candidate += 6 * cube_index

		return primes_count


if __name__ == "__main__":
	print(F"""{solution() = }""")






