




import requests

_lowerCamelCase  :			List[str]        =       ''  # <-- Put your OpenWeatherMap appid here!
_lowerCamelCase  :			Dict        =       'https://api.openweathermap.org/data/2.5/'

def 		lowercase_      (		_UpperCAmelCase = "Chicago"  ,      _UpperCAmelCase = APPID	):




	"""simple docstring"""






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

def 		lowercase_      (		_UpperCAmelCase = "Kolkata, India"  ,      _UpperCAmelCase = APPID	):




	"""simple docstring"""






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

def 		lowercase_      (		_UpperCAmelCase = 55.68  ,      _UpperCAmelCase = 12.57  ,      _UpperCAmelCase = APPID	):




	"""simple docstring"""






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


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

		while True:
				_lowerCamelCase  :			Union[str, Any]        =       input('Enter a location:').strip()
				if location:
						pprint(current_weather(location))
				else:
						break











"""simple docstring"""

from queue import PriorityQueue
from typing import Any

import numpy as np

def 		lowercase_      (		_UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      ):




	"""simple docstring"""






	for nxt, d in graph[v]:
		if nxt in visited_forward:
			continue
		A_  :				Tuple	   =		cst_fwd.get(_UpperCAmelCase  ,      np.inf	)
		A_  :				Any	   =		cst_fwd[v] + d
		if new_cost_f < old_cost_f:
			queue.put((new_cost_f, nxt)	)
			A_  :				Tuple	   =		new_cost_f
			A_  :				Dict	   =		v
		if nxt in visited_backward:
			if cst_fwd[v] + d + cst_bwd[nxt] < shortest_distance:
				A_  :				Optional[Any]	   =		cst_fwd[v] + d + cst_bwd[nxt]
	return shortest_distance

def 		lowercase_      (		_UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase	):




	"""simple docstring"""






	A_  :				Tuple	   =		-1

	A_  :				Any	   =		set()
	A_  :				Tuple	   =		set()
	A_  :				Optional[int]	   =		{source: 0}
	A_  :				Dict	   =		{destination: 0}
	A_  :				Any	   =		{source: None}
	A_  :				Optional[Any]	   =		{destination: None}
	A_  :				PriorityQueue[Any]	   =		PriorityQueue()
	A_  :				PriorityQueue[Any]	   =		PriorityQueue()

	A_  :				Union[str, Any]	   =		np.inf

	queue_forward.put((0, source)	)
	queue_backward.put((0, destination)	)

	if source == destination:
		return 0

	while not queue_forward.empty() and not queue_backward.empty():
		A_   , A_  :				Union[str, Any]	   =		queue_forward.get()
		visited_forward.add(_UpperCAmelCase	)

		A_   , A_  :				Optional[int]	   =		queue_backward.get()
		visited_backward.add(_UpperCAmelCase	)

		A_  :				Any	   =		pass_and_relaxation(
		    _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      )

		A_  :				Dict	   =		pass_and_relaxation(
		    _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase  ,      )

		if cst_fwd[v_fwd] + cst_bwd[v_bwd] >= shortest_distance:
			break

	if shortest_distance != np.inf:
		A_  :				Optional[Any]	   =		shortest_distance
	return shortest_path_distance


_lowerCamelCase  :			Optional[Any]        =       {
    'B': [['C', 1]],
    'C': [['D', 1]],
    'D': [['F', 1]],
    'E': [['B', 1], ['G', 2]],
    'F': [],
    'G': [['F', 1]],
}
_lowerCamelCase  :			Any        =       {
    'B': [['E', 1]],
    'C': [['B', 1]],
    'D': [['C', 1]],
    'F': [['D', 1], ['G', 1]],
    'E': [[None, np.inf]],
    'G': [['E', 2]],
}

if __name__ == "__main__":
		import doctest

		doctest.testmod()





