

'''simple docstring'''


from datetime import date

import requests

lowerCAmelCase__      				=			"https://api.carbonintensity.org.uk/intensity"







def     SCREAMING_SNAKE_CASE(	)     ->     str:
	UpperCAmelCase_		:   Any													=       requests.get(UpperCamelCase	).json()['''data'''][0]
	return last_half_hour["intensity"]["actual"]







def     SCREAMING_SNAKE_CASE(	UpperCamelCase ,UpperCamelCase	)     ->     list:
	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() = }')









"""simple docstring"""
from collections import defaultdict







def       UpperCamelCase_					(     lowerCamelCase							:					str   )						->     dict:



       """simple docstring"""







       __magic_name__			:		defaultdict[str, int]        =     defaultdict(lowerCamelCase   )
       # Creating a dictionary containing count of each word
       for word in sentence.split():
              occurrence[word] += 1
       return occurrence


if __name__ == "__main__":
 for word, count in word_occurrence("""INPUT STRING""").items():
  print(F"""{word}: {count}""")
