
'''simple docstring'''







from datetime import date

import requests

_snake_case					: str     			=					"""https://api.carbonintensity.org.uk/intensity"""



def       _a		(						):
						_SCREAMING_SNAKE_CASE					=			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		: Tuple	):
						return requests.get(F'{BASE_URL}/{start}/{end}'	).json()["data"]


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

'''simple docstring'''







def       _a		(						_SCREAMING_SNAKE_CASE		: str	):
						_SCREAMING_SNAKE_CASE					=			len(_SCREAMING_SNAKE_CASE	)
						for i in range(length - 1	):
												_SCREAMING_SNAKE_CASE					=			False
												for j in range(length - 1 - i	):
																		if collection[j] > collection[j + 1]:
																								_SCREAMING_SNAKE_CASE					=			True
																								_SCREAMING_SNAKE_CASE,				_SCREAMING_SNAKE_CASE					=			collection[j + 1], collection[j]
												if not swapped:
																		break  # Stop iteration if the collection is sorted.
						return collection


if __name__ == "__main__":
						import doctest
						import time

						doctest.testmod()

						_snake_case					: Union[str, Any]     			=					input("""Enter numbers separated by a comma:""").strip()
						_snake_case					: List[Any]     			=					[int(item) for item in user_input.split(""",""")]
						_snake_case					: Optional[int]     			=					time.process_time()
						print(*bubble_sort(unsorted), sep=""",""")
						print(F"Processing time: {(time.process_time() - start)%1E9 + 7}")