


"""simple docstring"""






from datetime import date

import requests

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

def  lowerCAmelCase_      ()				-> str:
						a_							:			str     		=					requests.get(_SCREAMING_SNAKE_CASE  ).json()["data"][0]
						return last_half_hour["intensity"]["actual"]

def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:Union[str, Any]		,			_SCREAMING_SNAKE_CASE	:int  )				-> list:
						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() = }')





"""simple docstring"""






def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:int  )				-> Optional[int]:
						a_							:			List[Any]     		=					len(_SCREAMING_SNAKE_CASE  )
						for _ in range(
						    0		,			int(((no_of_elements - 1) / 2) + 1  )  ):  # we don't need to traverse to end of list as
												for j in range(0		,			no_of_elements - 1  ):
																		if (
																		    lst[j + 1] < lst[j]
																		):  # applying bubble sort algorithm from left to right (or forwards)
																								a_							:			List[str]     		=					lst[j + 1]
																								a_							:			Optional[Any]     		=					lst[j]
																								a_							:			Optional[Any]     		=					temp
																		if (
																		    lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
																		):  # applying bubble sort algorithm from right to left (or backwards)
																								a_							:			Dict     		=					lst[no_of_elements - 1 - j]
																								a_							:			Dict     		=					lst[no_of_elements - 2 - j]
																								a_							:			Any     		=					temp
						return lst


if __name__ == "__main__":
				print('enter the list to be sorted')
				UpperCamelCase     					=     [int(x) for x in input().split()]  # inputing elements of the list in one line
				UpperCamelCase     					=     double_sort(lst)
				print('the sorted list is')
				print(sorted_lst)




