


from datetime import date

import requests

__UpperCAmelCase			:			Dict			      =					"https://api.carbonintensity.org.uk/intensity"


def   a						(				):






       """simple docstring"""





       UpperCamelCase     :						Union[str, Any] 						=		requests.get(SCREAMING_SNAKE_CASE_							).json()["""data"""][0]
       return last_half_hour["intensity"]["actual"]


def   a						(				SCREAMING_SNAKE_CASE_   :		Union[str, Any]				,      SCREAMING_SNAKE_CASE_   :		str							):






       """simple docstring"""





       return requests.get(F"""{BASE_URL}/{start}/{end}"""							).json()["data"]


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









def    a__    (	A       ):
   return " ".join([word[::-1] for word in input_str.split()]       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()


