
import os


def 		UpperCAmelCase    (			)	->			int:







				"""simple docstring"""



				__A         =				os.path.dirname(os.path.realpath(_UpperCAmelCase		)		)
				__A         =				os.path.join(_UpperCAmelCase	,     "triangle.txt"		)

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

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


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


from datetime import date

import requests

SCREAMING_SNAKE_CASE							:str											=       'https://api.carbonintensity.org.uk/intensity'


def 		UpperCAmelCase    (			)	->			str:







				"""simple docstring"""



				__A         =				requests.get(a_		).json()["data"][0]
				return last_half_hour["intensity"]["actual"]


def 		UpperCAmelCase    (			a_	,     a_		)	->			list:







				"""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() = }''')
