



from datetime import date

import requests

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





def     __lowerCamelCase							(   ):
							a__:							str									=requests.get(__magic_name__    ).json()["data"][0]
							return last_half_hour["intensity"]["actual"]





def     __lowerCamelCase							(   __magic_name__						:	Tuple  ,			__magic_name__						:	Union[str, Any]    ):
							return requests.get(F"{BASE_URL}/{start}/{end}"    ).json()["data"]


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












import os



def _a							(      )      ->		int:







      '''simple docstring'''






      __A			  =							os.path.dirname(os.path.realpath(lowerCamelCase					)					)
      __A			  =							os.path.join(lowerCamelCase   ,							'''triangle.txt'''					)

      with open(lowerCamelCase					) as in_file:
            __A			  =							[[int(lowerCamelCase					) for i in line.split()] for line in in_file]

      while len(lowerCamelCase					) != 1:
            __A			  =							triangle.pop()
            __A			  =							triangle[-1]
            for j in range(len(lowerCamelCase					) - 1					):
                  curr_row[j] += max(last_row[j]   ,							last_row[j + 1]					)
      return triangle[0][0]


if __name__ == "__main__":
       print(solution())





