

'''simple docstring'''






from collections import OrderedDict
from dataclasses import fields
from typing import Any, Tuple

import numpy as np

from .import_utils import is_torch_available


def  __lowerCamelCase      (				SCREAMING_SNAKE_CASE_					:     Any   )							->       str:
      """simple docstring"""

      if is_torch_available():
            import torch

            if isinstance(SCREAMING_SNAKE_CASE_  ,  torch.Tensor   ):
                  return True

      return isinstance(SCREAMING_SNAKE_CASE_  ,  np.ndarray   )





class      SCREAMING_SNAKE_CASE__      (    _UpperCAmelCase				):




    def   __lowerCamelCase				( self      ):






          """simple docstring"""






          SCREAMING_SNAKE_CASE_				:      Dict					=	fields(self      )

          # Safety and consistency checks
          if not len(lowercase__      ):
                raise ValueError(F"{self.__class__.__name__} has no fields."      )

          SCREAMING_SNAKE_CASE_				:      Optional[Any]					=	getattr(self    ,					class_fields[0].name      )
          SCREAMING_SNAKE_CASE_				:      List[Any]					=	all(getattr(self    ,					field.name      ) is None for field in class_fields[1:]      )

          if other_fields_are_none and isinstance(lowercase__    ,					lowercase__      ):
                for key, value in first_field.items():
                      SCREAMING_SNAKE_CASE_				:      Union[str, Any]					=	value
          else:
                for field in class_fields:
                      SCREAMING_SNAKE_CASE_				:      Optional[Any]					=	getattr(self    ,					field.name      )
                      if v is not None:
                            SCREAMING_SNAKE_CASE_				:      List[Any]					=	v




    def __delitem__( self    ,					*lowercase__    ,					**lowercase__      ):






          """simple docstring"""






          raise Exception(F"You cannot use ``__delitem__`` on a {self.__class__.__name__} instance."      )




    def   __lowerCamelCase				( self    ,					*lowercase__    ,					**lowercase__      ):






          """simple docstring"""






          raise Exception(F"You cannot use ``setdefault`` on a {self.__class__.__name__} instance."      )




    def   __lowerCamelCase				( self    ,					*lowercase__    ,					**lowercase__      ):






          """simple docstring"""






          raise Exception(F"You cannot use ``pop`` on a {self.__class__.__name__} instance."      )




    def   __lowerCamelCase				( self    ,					*lowercase__    ,					**lowercase__      ):






          """simple docstring"""






          raise Exception(F"You cannot use ``update`` on a {self.__class__.__name__} instance."      )




    def __getitem__( self    ,					lowercase__      ):






          """simple docstring"""






          if isinstance(lowercase__    ,					lowercase__      ):
                SCREAMING_SNAKE_CASE_				:      Optional[Any]					=	dict(self.items()      )
                return inner_dict[k]
          else:
                return self.to_tuple()[k]




    def __setattr__( self    ,					lowercase__    ,					lowercase__      ):






          """simple docstring"""






          if name in self.keys() and value is not None:
                # Don't call self.__setitem__ to avoid recursion errors
                super().__setitem__(lowercase__    ,					lowercase__      )
          super().__setattr__(lowercase__    ,					lowercase__      )




    def __setitem__( self    ,					lowercase__    ,					lowercase__      ):






          """simple docstring"""






          super().__setitem__(lowercase__    ,					lowercase__      )
          # Don't call self.__setattr__ to avoid recursion errors
          super().__setattr__(lowercase__    ,					lowercase__      )







    def   __lowerCamelCase				( self      ):






          """simple docstring"""






          return tuple(self[k] for k in self.keys()      )




'''simple docstring'''






import requests
from bsa import BeautifulSoup


def  __lowerCamelCase      (				SCREAMING_SNAKE_CASE_					:     int  ,  SCREAMING_SNAKE_CASE_					:     str   )							->       str:
      """simple docstring"""

      SCREAMING_SNAKE_CASE_				:      List[str]					=	(
          "https://www.horoscope.com/us/horoscopes/general/"
          F"horoscope-general-daily-{day}.aspx?sign={zodiac_sign}"
      )
      SCREAMING_SNAKE_CASE_				:      Dict					=	BeautifulSoup(requests.get(SCREAMING_SNAKE_CASE_   ).content  ,  "html.parser"   )
      return soup.find("div"  ,  class_="main-horoscope"   ).p.text


if __name__ == "__main__":
      print('Daily Horoscope. \n')
      print(
          'enter your Zodiac sign number:\n',
          '1. Aries\n',
          '2. Taurus\n',
          '3. Gemini\n',
          '4. Cancer\n',
          '5. Leo\n',
          '6. Virgo\n',
          '7. Libra\n',
          '8. Scorpio\n',
          '9. Sagittarius\n',
          '10. Capricorn\n',
          '11. Aquarius\n',
          '12. Pisces\n',
      )
      snake_case_					  =	int(input('number> ').strip())
      print('choose some day:\n', 'yesterday\n', 'today\n', 'tomorrow\n')
      snake_case_					  =	input('enter the day> ')
      snake_case_					  =	horoscope(zodiac_sign, day)
      print(horoscope_text)

