





"""simple docstring"""




def        a_				(							_lowercase       ,						_lowercase   ):
						# "Simpson Rule"
						# int(f) = delta_x/2 * (b-a)/3*(f1 + 4f2 + 2f_3 + ... + fn)
						_UpperCamelCase			:					str     =    (boundary[1] - boundary[0]) / steps
						_UpperCamelCase			:					int     =    boundary[0]
						_UpperCamelCase			:					Union[str, Any]     =    boundary[1]
						_UpperCamelCase			:					Optional[Any]     =    make_points(_lowercase       ,						_lowercase       ,						_lowercase   )
						_UpperCamelCase			:					List[str]     =    0.0
						y += (h / 3.0) * f(_lowercase   )
						_UpperCamelCase			:					List[Any]     =    2
						for i in x_i:
												y += (h / 3) * (4 - 2 * (cnt % 2)) * f(_lowercase   )
												cnt += 1
						y += (h / 3.0) * f(_lowercase   )
						return y





def        a_				(							_lowercase       ,						_lowercase       ,						_lowercase   ):
						_UpperCamelCase			:					int     =    a + h
						while x < (b - h):
												yield x
												_UpperCamelCase			:					Tuple     =    x + h





def        a_				(							_lowercase   ):  # enter your function here
						_UpperCamelCase			:					str     =    (x - 0) * (x - 0)
						return y





def        a_				(							):
						_UpperCamelCase			:					Tuple     =    0.0  # Lower bound of integration
						_UpperCamelCase			:					Optional[int]     =    1.0  # Upper bound of integration
						_UpperCamelCase			:					Optional[Any]     =    10.0  # define number of steps or resolution
						_UpperCamelCase			:					Optional[int]     =    [a, b]  # define boundary of integration
						_UpperCamelCase			:					Union[str, Any]     =    method_a(_lowercase       ,						_lowercase   )
						print(F"""y = {y}"""   )


if __name__ == "__main__":
						main()










from datetime import date

import requests

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






def  SCREAMING_SNAKE_CASE__							(				):
		SCREAMING_SNAKE_CASE__								=					requests.get(UpperCamelCase__			).json()["""data"""][0]
		return last_half_hour["intensity"]["actual"]






def  SCREAMING_SNAKE_CASE__							(				UpperCamelCase__:							Dict    ,      UpperCamelCase__:							Optional[int]			):
		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() = }''')