



"""simple docstring"""







from typing import List, Optional, Tuple, Union

from . import logging
from .import_utils import is_torch_available, is_torch_version


if is_torch_available():
		import torch

UpperCAmelCase:   str       			=							logging.get_logger(__name__)  # pylint: disable=invalid-name

try:
		from torch._dynamo import allow_in_graph as maybe_allow_in_graph
except (ImportError, ModuleNotFoundError):


		def       __SCREAMING_SNAKE_CASE      (   cls	):
				return cls


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase					,							__UpperCAmelCase = None					,							__UpperCAmelCase = None					,							__UpperCAmelCase = None					,							__UpperCAmelCase = None					,							):
		_lowercase							:      Dict			=					device
		_lowercase							:      Union[str, Any]			=					shape[0]

		_lowercase							:      str			=					layout or torch.strided
		_lowercase							:      Tuple			=					device or torch.device("""cpu"""	)

		if generator is not None:
				_lowercase							:      Any			=					generator.device.type if not isinstance(__UpperCAmelCase					,							__UpperCAmelCase	) else generator[0].device.type
				if gen_device_type != device.type and gen_device_type == "cpu":
						_lowercase							:      Union[str, Any]			=					"""cpu"""
						if device != "mps":
								logger.info(
								    F"""The passed generator was created on 'cpu' even though a tensor on {device} was expected."""
								    F""" Tensors will be created on 'cpu' and then moved to {device}. Note that one can probably"""
								    F""" slighly speed up this function by passing a generator that was created on the {device} device."""	)
				elif gen_device_type != device.type and gen_device_type == "cuda":
						raise ValueError(F"""Cannot generate a {device} tensor from a generator of type {gen_device_type}."""	)

		if isinstance(__UpperCAmelCase					,							__UpperCAmelCase	):
				_lowercase							:      Optional[Any]			=					(1,) + shape[1:]
				_lowercase							:      Optional[int]			=					[
				    torch.randn(__UpperCAmelCase					,							generator=generator[i]					,							device=__UpperCAmelCase					,							dtype=__UpperCAmelCase					,							layout=__UpperCAmelCase	)
				    for i in range(__UpperCAmelCase	)
				]
				_lowercase							:      Union[str, Any]			=					torch.cat(__UpperCAmelCase					,							dim=0	).to(__UpperCAmelCase	)
		else:
				_lowercase							:      str			=					torch.randn(__UpperCAmelCase					,							generator=__UpperCAmelCase					,							device=__UpperCAmelCase					,							dtype=__UpperCAmelCase					,							layout=__UpperCAmelCase	).to(__UpperCAmelCase	)

		return latents


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase	):
		if is_torch_version("""<"""					,							"""2.0.0"""	) or not hasattr(__UpperCAmelCase					,							"""_dynamo"""	):
				return False
		return isinstance(__UpperCAmelCase					,							torch._dynamo.eval_frame.OptimizedModule	)








"""simple docstring"""







import requests
from bsa import BeautifulSoup


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase					,							__UpperCAmelCase	):
		_lowercase							:      Dict			=					(
		    """https://www.horoscope.com/us/horoscopes/general/"""
		    F"""horoscope-general-daily-{day}.aspx?sign={zodiac_sign}"""
		)
		_lowercase							:      Any			=					BeautifulSoup(requests.get(__UpperCAmelCase	).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""",
		)
		UpperCAmelCase:   Union[str, Any]       			=							int(input("""number> """).strip())
		print("""choose some day:\n""", """yesterday\n""", """today\n""", """tomorrow\n""")
		UpperCAmelCase:   List[Any]       			=							input("""enter the day> """)
		UpperCAmelCase:   List[Any]       			=							horoscope(zodiac_sign, day)
		print(horoscope_text)



