"""simple docstring"""


from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase__     						=  logging.get_logger(__name__)

UpperCAmelCase__     						=  {
    """s-JoL/Open-Llama-V1""": """https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json""",
}


class 				a (						lowerCAmelCase_      ):
    _snake_case   :     Dict   							=							'open-llama'


    def __init__(    self		:     int      , __lowerCAmelCase		:     Any=10_0000      , __lowerCAmelCase		:     Union[str, Any]=4096      , __lowerCAmelCase		:     List[str]=1_1008      , __lowerCAmelCase		:     Optional[Any]=32      , __lowerCAmelCase		:     List[Any]=32      , __lowerCAmelCase		:     str="silu"      , __lowerCAmelCase		:     List[Any]=2048      , __lowerCAmelCase		:     Tuple=0.02      , __lowerCAmelCase		:     Optional[int]=1e-6      , __lowerCAmelCase		:     Tuple=True      , __lowerCAmelCase		:     int=0      , __lowerCAmelCase		:     Optional[Any]=1      , __lowerCAmelCase		:     Union[str, Any]=2      , __lowerCAmelCase		:     Dict=False      , __lowerCAmelCase		:     Dict=True      , __lowerCAmelCase		:     List[Any]=0.1      , __lowerCAmelCase		:     Dict=0.1      , __lowerCAmelCase		:     List[str]=True      , __lowerCAmelCase		:     str=True      , __lowerCAmelCase		:     str=None      , **__lowerCAmelCase		:     Optional[Any]      , ):
      _UpperCAmelCase         =					vocab_size
      _UpperCAmelCase         =					max_position_embeddings
      _UpperCAmelCase         =					hidden_size
      _UpperCAmelCase         =					intermediate_size
      _UpperCAmelCase         =					num_hidden_layers
      _UpperCAmelCase         =					num_attention_heads
      _UpperCAmelCase         =					hidden_act
      _UpperCAmelCase         =					initializer_range
      _UpperCAmelCase         =					rms_norm_eps
      _UpperCAmelCase         =					use_cache
      _UpperCAmelCase         =					kwargs.pop(
          """use_memorry_efficient_attention"""      , __lowerCAmelCase    )
      _UpperCAmelCase         =					hidden_dropout_prob
      _UpperCAmelCase         =					attention_dropout_prob
      _UpperCAmelCase         =					use_stable_embedding
      _UpperCAmelCase         =					shared_input_output_embedding
      _UpperCAmelCase         =					rope_scaling
      self._rope_scaling_validation()

      super().__init__(
          pad_token_id=__lowerCAmelCase      , bos_token_id=__lowerCAmelCase      , eos_token_id=__lowerCAmelCase      , tie_word_embeddings=__lowerCAmelCase      , **__lowerCAmelCase      , )


    def    lowerCAmelCase_     (    self		:     List[Any]    ):
      if self.rope_scaling is None:
        return

      if not isinstance(self.rope_scaling      , __lowerCAmelCase    ) or len(self.rope_scaling    ) != 2:
        raise ValueError(
            """`rope_scaling` must be a dictionary with with two fields, `name` and `factor`, """
            f'''got {self.rope_scaling}'''    )
      _UpperCAmelCase         =					self.rope_scaling.get("""type"""      , __lowerCAmelCase    )
      _UpperCAmelCase         =					self.rope_scaling.get("""factor"""      , __lowerCAmelCase    )
      if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]:
        raise ValueError(
            f'''`rope_scaling`\'s name field must be one of [\'linear\', \'dynamic\'], got {rope_scaling_type}'''    )
      if rope_scaling_factor is None or not isinstance(__lowerCAmelCase      , __lowerCAmelCase    ) or rope_scaling_factor <= 1.0:
        raise ValueError(f'''`rope_scaling`\'s factor field must be an float > 1, got {rope_scaling_factor}'''    )

"""simple docstring"""


import requests

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






def 			__UpperCAmelCase    (	lowercase = "Chicago"      ,lowercase = APPID						):







  """simple docstring"""
  return requests.get(URL_BASE + """weather"""      ,params=locals()						).json()






def 			__UpperCAmelCase    (	lowercase = "Kolkata, India"      ,lowercase = APPID						):







  """simple docstring"""
  return requests.get(URL_BASE + """forecast"""      ,params=locals()						).json()






def 			__UpperCAmelCase    (	lowercase = 55.68      ,lowercase = 12.57      ,lowercase = APPID						):







  """simple docstring"""
  return requests.get(URL_BASE + """onecall"""      ,params=locals()						).json()


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

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