


'''simple docstring'''






from collections.abc import Sequence






def 		_A			(lowerCAmelCase__					:Sequence[float]			,  lowerCAmelCase__					:float						)				->					float:




     '''simple docstring'''



     return sum(c * (x**i) for i, c in enumerate(lowerCAmelCase__						)						)






def 		_A			(lowerCAmelCase__					:Sequence[float]			,  lowerCAmelCase__					:float						)				->					float:




     '''simple docstring'''



     _a      =							0.0
     for coeff in reversed(lowerCAmelCase__						):
          _a      =							result * x + coeff
     return result


if __name__ == "__main__":
 a_   :      List[str]				    =      (0.0, 0.0, 5.0, 9.3, 7.0)
 a_   :      Optional[int]				    =      10.0
 print(evaluate_poly(poly, x))
 print(horner(poly, x))





'''simple docstring'''






import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline






@pytest.mark.integration
def 		_A			()				->					Optional[Any]:




     '''simple docstring'''



     with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT						):
          with pytest.raises(lowerCAmelCase__						):
               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 		_A			()				->					Any:




     '''simple docstring'''



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






def 		_A			()				->					Dict:




     '''simple docstring'''



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

