


'''simple docstring'''






import copy
import re






class   __snake_case			:







    """simple docstring"""



    lowercase  					=   'hp'
    lowercase  					=   {}
    lowercase  					=   None

    @classmethod
    def __lowercase  (  cls       :    Optional[int]       ,		lowerCamelCase       :    Optional[int]       ,		lowerCamelCase       :    Union[str, Any]						)  ->    Any:
      lowerCAmelCase_     : int     =  prefix
      lowerCAmelCase_     : Optional[int]     =  defaults
      cls.build_naming_info()

    @staticmethod
    def __lowercase  (  lowerCamelCase       :    Tuple       ,		lowerCamelCase       :    Optional[Any]						)  ->    Optional[int]:
      if len(lowerCamelCase						) == 0:
        return ""
      lowerCAmelCase_     : Union[str, Any]     =  None
      if any(char.isdigit() for char in word						):
        raise Exception(F'Parameters should not contain numbers: \'{word}\' contains a number'						)
      if word in info["short_word"]:
        return info["short_word"][word]
      for prefix_len in range(1       ,		len(lowerCamelCase						) + 1						):
        lowerCAmelCase_     : Union[str, Any]     =  word[:prefix_len]
        if prefix in info["reverse_short_word"]:
          continue
        else:
          lowerCAmelCase_     : Optional[Any]     =  prefix
          break

      if short_word is None:
        # Paranoid fallback
        def int_to_alphabetic(lowerCamelCase       :    Tuple						):
          lowerCAmelCase_     : Optional[int]     =  """"""
          while integer != 0:
            lowerCAmelCase_     : List[str]     =  chr(ord("""A"""						) + integer % 10						) + s
            integer //= 10
          return s

        lowerCAmelCase_     : List[str]     =  0
        while True:
          lowerCAmelCase_     : Union[str, Any]     =  word + """#""" + int_to_alphabetic(lowerCamelCase						)
          if sword in info["reverse_short_word"]:
            continue
          else:
            lowerCAmelCase_     : Any     =  sword
            break

      lowerCAmelCase_     : Union[str, Any]     =  short_word
      lowerCAmelCase_     : Optional[Any]     =  word
      return short_word

    @staticmethod
    def __lowercase  (  lowerCamelCase       :    str       ,		lowerCamelCase       :    List[str]						)  ->    List[str]:
      lowerCAmelCase_     : Optional[Any]     =  param_name.split("""_"""						)

      lowerCAmelCase_     : List[str]     =  [TrialShortNamer.shortname_for_word(lowerCamelCase       ,		lowerCamelCase						) for word in words]

      # We try to create a separatorless short name, but if there is a collision we have to fallback
      # to a separated short name
      lowerCAmelCase_     : Dict     =  ["""""", """_"""]

      for separator in separators:
        lowerCAmelCase_     : List[str]     =  separator.join(lowerCamelCase						)
        if shortname not in info["reverse_short_param"]:
          lowerCAmelCase_     : str     =  shortname
          lowerCAmelCase_     : Optional[Any]     =  param_name
          return shortname

      return param_name

    @staticmethod
    def __lowercase  (  lowerCamelCase       :    List[Any]       ,		lowerCamelCase       :    Dict						)  ->    Any:
      lowerCAmelCase_     : List[str]     =  TrialShortNamer.shortname_for_key(lowerCamelCase       ,		lowerCamelCase						)
      lowerCAmelCase_     : Union[str, Any]     =  short_name
      lowerCAmelCase_     : List[str]     =  param_name

    @classmethod
    def __lowercase  (  cls       :    Any						)  ->    Tuple:
      if cls.NAMING_INFO is not None:
        return

      lowerCAmelCase_     : int     =  {
          """short_word""": {},
          """reverse_short_word""": {},
          """short_param""": {},
          """reverse_short_param""": {},
      }

      lowerCAmelCase_     : int     =  list(cls.DEFAULTS.keys()						)

      for k in field_keys:
        cls.add_new_param_name(lowerCamelCase       ,		lowerCamelCase						)

      lowerCAmelCase_     : int     =  info

    @classmethod
    def __lowercase  (  cls       :    Optional[Any]       ,		lowerCamelCase       :    int						)  ->    Dict:
      cls.build_naming_info()
      assert cls.PREFIX is not None
      lowerCAmelCase_     : List[str]     =  [copy.copy(cls.PREFIX						)]

      for k, v in params.items():
        if k not in cls.DEFAULTS:
          raise Exception(F'You should provide a default value for the param name {k} with value {v}'						)
        if v == cls.DEFAULTS[k]:
          # The default value is not added to the name
          continue

        lowerCAmelCase_     : Any     =  cls.NAMING_INFO["""short_param"""][k]

        if isinstance(lowerCamelCase       ,		lowerCamelCase						):
          lowerCAmelCase_     : int     =  1 if v else 0

        lowerCAmelCase_     : Tuple     =  """""" if isinstance(lowerCamelCase       ,		(int, float)						) else """-"""
        lowerCAmelCase_     : List[str]     =  F'{key}{sep}{v}'
        name.append(lowerCamelCase						)

      return "_".join(lowerCamelCase						)





    @classmethod
    def __lowercase  (  cls       :    Optional[int]       ,		lowerCamelCase       :    int						)  ->    Union[str, Any]:
      lowerCAmelCase_     : int     =  repr[len(cls.PREFIX						) + 1 :]
      if repr == "":
        lowerCAmelCase_     : str     =  []
      else:
        lowerCAmelCase_     : str     =  repr.split("""_"""						)

      lowerCAmelCase_     : List[str]     =  {}

      for value in values:
        if "-" in value:
          lowerCAmelCase_,				lowerCAmelCase_     : List[str]     =  value.split("""-"""						)
        else:
          lowerCAmelCase_     : Optional[int]     =  re.sub("""[0-9.]"""       ,		""""""       ,		lowerCamelCase						)
          lowerCAmelCase_     : List[str]     =  float(re.sub("""[^0-9.]"""       ,		""""""       ,		lowerCamelCase						)						)

        lowerCAmelCase_     : int     =  cls.NAMING_INFO["""reverse_short_param"""][p_k]

        lowerCAmelCase_     : str     =  p_v

      for k in cls.DEFAULTS:
        if k not in parameters:
          lowerCAmelCase_     : List[str]     =  cls.DEFAULTS[k]

      return parameters







'''simple docstring'''






import requests
from bsa import BeautifulSoup







def 							UpperCamelCase_     (       A__   :  str = "AAPL"   ):
  '''simple docstring'''





  lowerCAmelCase_     : Dict     =  f'https://in.finance.yahoo.com/quote/{symbol}?s={symbol}'
  lowerCAmelCase_     : Optional[Any]     =  BeautifulSoup(requests.get(A__   ).text				,       """html.parser"""   )
  lowerCAmelCase_     : Union[str, Any]     =  """My(6px) Pos(r) smartphone_Mt(6px)"""
  return soup.find("""div"""				,       class_=class_   ).find("""span"""   ).text


if __name__ == "__main__":
  for symbol in "AAPL AMZN IBM GOOG MSFT ORCL".split():
    print(F'''Current {symbol:<4} stock price is {stock_price(symbol):>8}''')



