
"""simple docstring"""





from datetime import date

import requests

_a									=				'https://api.carbonintensity.org.uk/intensity'







def       __a	(						):
   UpperCAmelCase_   :   Union[str, Any]     	=       requests.get(__lowerCamelCase    ).json()["data"][0]
   return last_half_hour["intensity"]["actual"]







def       __a	(						__lowerCamelCase,						__lowerCamelCase    ):
   return requests.get(f"""{BASE_URL}/{start}/{end}"""    ).json()["data"]


if __name__ == "__main__":
    for entry in fetch_from_to(start=date(2_020, 10, 1), end=date(2_020, 10, 3)):
        print('from {from} to {to}: {intensity[actual]}'.format(**entry))
    print(f"""{fetch_last_half_hour() = }""")







'''simple docstring'''
from .hash_table import HashTable



class _A	(     __SCREAMING_SNAKE_CASE     ):





		def __init__(  self			,							*__UpperCAmelCase			,							**__UpperCAmelCase					)							->  List[Any]:

					'''simple docstring'''
					super().__init__(*__UpperCAmelCase			,							**__UpperCAmelCase					)





		def 				__A							(  self			,							__UpperCAmelCase			,							__UpperCAmelCase=None					)							->  str:

					'''simple docstring'''
					__UpperCAmelCase :   List[str]    					=  1
					__UpperCAmelCase :   Optional[Any]    					=  self.hash_function(key + i * i					)

					while self.values[new_key] is not None and self.values[new_key] != key:
								i += 1
								__UpperCAmelCase :   str    					=  (
								    self.hash_function(key + i * i					)
								    if not self.balanced_factor() >= self.lim_charge
								    else None
								)

								if new_key is None:
											break

					return new_key




