






class 				__A     :





				"""simple docstring"""







				def __init__( self							,  lowerCamelCase__							,  lowerCamelCase__    ):




									"""simple docstring"""

									__UpperCamelCase      :					List[str]       		=name
									__UpperCamelCase      :					List[Any]       		=val


				def __str__( self    ):




									"""simple docstring"""

									return f'{self.__class__.__name__}({self.name}, {self.val})'







				def __lt__( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									return self.val < other.val




class 				__A     :





				"""simple docstring"""







				def __init__( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									__UpperCamelCase      :					Optional[int]       		={}
									__UpperCamelCase      :					Dict       		={}
									__UpperCamelCase      :					Optional[Any]       		=self.build_heap(lowerCamelCase__    )


				def __getitem__( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									return self.get_value(lowerCamelCase__    )


				def       __lowercase							( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									return (idx - 1) // 2


				def       __lowercase							( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									return idx * 2 + 1


				def       __lowercase							( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									return idx * 2 + 2


				def       __lowercase							( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									return self.heap_dict[key]


				def       __lowercase							( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									__UpperCamelCase      :					Optional[Any]       		=len(lowerCamelCase__    ) - 1
									__UpperCamelCase      :					List[str]       		=self.get_parent_idx(lowerCamelCase__    )

									for idx, i in enumerate(lowerCamelCase__    ):
														__UpperCamelCase      :					List[Any]       		=idx
														__UpperCamelCase      :					Union[str, Any]       		=i.val

									for i in range(lowerCamelCase__							,  -1							,  -1    ):
														self.sift_down(lowerCamelCase__							,  lowerCamelCase__    )
									return array


				def       __lowercase							( self							,  lowerCamelCase__							,  lowerCamelCase__    ):




									"""simple docstring"""

									while True:
														__UpperCamelCase      :					Any       		=self.get_left_child_idx(lowerCamelCase__    )  # noqa: E741
														__UpperCamelCase      :					Optional[Any]       		=self.get_right_child_idx(lowerCamelCase__    )

														__UpperCamelCase      :					Dict       		=idx
														if l < len(lowerCamelCase__    ) and array[l] < array[idx]:
																			__UpperCamelCase      :					List[str]       		=l
														if r < len(lowerCamelCase__    ) and array[r] < array[smallest]:
																			__UpperCamelCase      :					Optional[int]       		=r

														if smallest != idx:
																			__UpperCamelCase		,				__UpperCamelCase      :					Tuple       		=array[smallest], array[idx]
																			(
																			    (
																			    __UpperCamelCase
																			)		,				(
																			    __UpperCamelCase
																			)		,				
																			)      :					Union[str, Any]       		=(
																			    self.idx_of_element[array[smallest]],
																			    self.idx_of_element[array[idx]],
																			)
																			__UpperCamelCase      :					List[str]       		=smallest
														else:
																			break


				def       __lowercase							( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									__UpperCamelCase      :					Union[str, Any]       		=self.get_parent_idx(lowerCamelCase__    )
									while p >= 0 and self.heap[p] > self.heap[idx]:
														__UpperCamelCase		,				__UpperCamelCase      :					str       		=self.heap[idx], self.heap[p]
														__UpperCamelCase		,				__UpperCamelCase      :					int       		=(
														    self.idx_of_element[self.heap[idx]],
														    self.idx_of_element[self.heap[p]],
														)
														__UpperCamelCase      :					str       		=p
														__UpperCamelCase      :					Optional[Any]       		=self.get_parent_idx(lowerCamelCase__    )


				def       __lowercase							( self    ):




									"""simple docstring"""

									return self.heap[0]


				def       __lowercase							( self    ):




									"""simple docstring"""

									__UpperCamelCase		,				__UpperCamelCase      :					str       		=self.heap[-1], self.heap[0]
									__UpperCamelCase		,				__UpperCamelCase      :					Optional[int]       		=(
									    self.idx_of_element[self.heap[-1]],
									    self.idx_of_element[self.heap[0]],
									)

									__UpperCamelCase      :					str       		=self.heap.pop()
									del self.idx_of_element[x]
									self.sift_down(0							,  self.heap    )
									return x


				def       __lowercase							( self							,  lowerCamelCase__    ):




									"""simple docstring"""

									self.heap.append(lowerCamelCase__    )
									__UpperCamelCase      :					Dict       		=len(self.heap    ) - 1
									__UpperCamelCase      :					Any       		=node.val
									self.sift_up(len(self.heap    ) - 1    )


				def       __lowercase							( self    ):




									"""simple docstring"""

									return len(self.heap    ) == 0







				def       __lowercase							( self							,  lowerCamelCase__							,  lowerCamelCase__    ):




									"""simple docstring"""

									assert (
									    self.heap[self.idx_of_element[node]].val > new_value
									), "newValue must be less that current value"
									__UpperCamelCase      :					Dict       		=new_value
									__UpperCamelCase      :					Any       		=new_value
									self.sift_up(self.idx_of_element[node]    )
A_       :int       =						Node('''R''', -1)
A_       :List[Any]       =						Node('''B''', 6)
A_       :Optional[int]       =						Node('''A''', 3)
A_       :List[Any]       =						Node('''X''', 1)
A_       :List[str]       =						Node('''E''', 4)

# Use one of these two ways to generate Min-Heap

# Generating Min-Heap from array
A_       :Tuple       =						MinHeap([r, b, a, x, e])

# Generating Min-Heap by Insert method
# myMinHeap.insert(a)
# myMinHeap.insert(b)
# myMinHeap.insert(x)
# myMinHeap.insert(r)
# myMinHeap.insert(e)

# Before
print('''Min Heap - before decrease key''')
for i in my_min_heap.heap:
							print(i)

print('''Min Heap - After decrease key of node [B -> -17]''')
my_min_heap.decrease_key(b, -17)

# After
for i in my_min_heap.heap:
							print(i)

if __name__ == "__main__":
							import doctest

							doctest.testmod()








"""simple docstring"""



import requests

a_ =			""""""  # <-- Put your OpenWeatherMap appid here!
a_ =			"""https://api.openweathermap.org/data/2.5/"""







def 		__lowercase     (   snake_case_  :  str = "Chicago"				,snake_case_  :  str = APPID						)   ->dict:



    '''simple docstring'''







    return requests.get(URL_BASE + '''weather'''				,params=locals()						).json()







def 		__lowercase     (   snake_case_  :  str = "Kolkata, India"				,snake_case_  :  str = APPID						)   ->dict:



    '''simple docstring'''







    return requests.get(URL_BASE + '''forecast'''				,params=locals()						).json()







def 		__lowercase     (   snake_case_  :  float = 55.68				,snake_case_  :  float = 12.57				,snake_case_  :  str = APPID						)   ->dict:



    '''simple docstring'''







    return requests.get(URL_BASE + '''onecall'''				,params=locals()						).json()


if __name__ == "__main__":
       from pprint import pprint

       while True:
              a_ =			input("""Enter a location:""").strip()
              if location:
                     pprint(current_weather(location))
              else:
                     break




