'''simple docstring'''


import requests
from bsa import BeautifulSoup


def    _lowerCamelCase       ( lowerCamelCase_   :				int      ,	lowerCamelCase_   :				str  ):



     """simple docstring"""





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







"""simple docstring"""
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin


if is_torch_available():
					import torch

if is_vision_available():
					from PIL import Image

					from transformers import SwinaSRImageProcessor
					from transformers.image_transforms import get_image_size



class 	lowerCAmelCase_     (      unittest.TestCase       ):



				"""simple docstring"""

				def __init__(					self		,     lowerCAmelCase		,     lowerCAmelCase=7		,     lowerCAmelCase=3		,     lowerCAmelCase=18		,     lowerCAmelCase=30		,     lowerCAmelCase=4_00		,     lowerCAmelCase=True		,     lowerCAmelCase=1 / 2_55		,     lowerCAmelCase=True		,     lowerCAmelCase=8		,     ):






										"""simple docstring"""

										snake_case             =      parent
										snake_case             =      batch_size
										snake_case             =      num_channels
										snake_case             =      image_size
										snake_case             =      min_resolution
										snake_case             =      max_resolution
										snake_case             =      do_rescale
										snake_case             =      rescale_factor
										snake_case             =      do_pad
										snake_case             =      pad_size

				def 		snake_case			(					self     ):






										"""simple docstring"""

										return {
										    "do_rescale": self.do_rescale,
										    "rescale_factor": self.rescale_factor,
										    "do_pad": self.do_pad,
										    "pad_size": self.pad_size,
										}

				def 		snake_case			(					self		,     lowerCAmelCase=False		,     lowerCAmelCase=False		,     lowerCAmelCase=False     ):






										"""simple docstring"""

										assert not (numpify and torchify), "You cannot specify both numpy and PyTorch tensors at the same time"

										if equal_resolution:
																snake_case             =      []
																for i in range(self.batch_size     ):
																						image_inputs.append(
																						    np.random.randint(
																						        2_55		,     size=(self.num_channels, self.max_resolution, self.max_resolution)		,     dtype=np.uinta     )     )
										else:
																snake_case             =      []
																for i in range(self.batch_size     ):
																						snake_case       ,snake_case             =      np.random.choice(np.arange(self.min_resolution		,     self.max_resolution     )		,     2     )
																						image_inputs.append(np.random.randint(2_55		,     size=(self.num_channels, width, height)		,     dtype=np.uinta     )     )

										if not numpify and not torchify:
																# PIL expects the channel dimension as last dimension
																snake_case             =      [Image.fromarray(np.moveaxis(lowerCAmelCase		,     0		,     -1     )     ) for x in image_inputs]

										if torchify:
																snake_case             =      [torch.from_numpy(lowerCAmelCase     ) for x in image_inputs]

										return image_inputs





@require_torch
@require_vision
class 	lowerCAmelCase_     (      lowerCAmelCase  ,     unittest.TestCase       ):



				"""simple docstring"""
				_lowerCAmelCase  :     Tuple      	=    SwinaSRImageProcessor if is_vision_available() else None

				def 		snake_case			(					self     ):






										"""simple docstring"""

										snake_case             =      SwinaSRImageProcessingTester(self     )

				@property
				def 		snake_case			(					self     ):






										"""simple docstring"""

										return self.image_processor_tester.prepare_image_processor_dict()

				def 		snake_case			(					self     ):






										"""simple docstring"""

										snake_case             =      self.image_processing_class(**self.image_processor_dict     )
										self.assertTrue(hasattr(lowerCAmelCase		,     'do_rescale'     )     )
										self.assertTrue(hasattr(lowerCAmelCase		,     'rescale_factor'     )     )
										self.assertTrue(hasattr(lowerCAmelCase		,     'do_pad'     )     )
										self.assertTrue(hasattr(lowerCAmelCase		,     'pad_size'     )     )

				def 		snake_case			(					self     ):






										"""simple docstring"""

										pass

				def 		snake_case			(					self		,     lowerCAmelCase     ):






										"""simple docstring"""

										snake_case       ,snake_case             =      get_image_size(lowerCAmelCase     )
										snake_case             =      self.image_processor_tester.pad_size

										snake_case             =      (old_height // size + 1) * size - old_height
										snake_case             =      (old_width // size + 1) * size - old_width
										return old_height + pad_height, old_width + pad_width

				def 		snake_case			(					self     ):






										"""simple docstring"""

										snake_case             =      self.image_processing_class(**self.image_processor_dict     )
										# create random PIL images
										snake_case             =      self.image_processor_tester.prepare_inputs(equal_resolution=lowerCAmelCase     )
										for image in image_inputs:
																self.assertIsInstance(lowerCAmelCase		,     Image.Image     )

										# Test not batched input
										snake_case             =      image_processor(image_inputs[0]		,     return_tensors='pt'     ).pixel_values
										snake_case       ,snake_case             =      self.calculate_expected_size(np.array(image_inputs[0]     )     )
										self.assertEqual(
										    encoded_images.shape		,     (
										        1,
										        self.image_processor_tester.num_channels,
										        expected_height,
										        expected_width,
										    )		,     )

				def 		snake_case			(					self     ):






										"""simple docstring"""

										snake_case             =      self.image_processing_class(**self.image_processor_dict     )
										# create random numpy tensors
										snake_case             =      self.image_processor_tester.prepare_inputs(equal_resolution=lowerCAmelCase		,     numpify=lowerCAmelCase     )
										for image in image_inputs:
																self.assertIsInstance(lowerCAmelCase		,     np.ndarray     )

										# Test not batched input
										snake_case             =      image_processor(image_inputs[0]		,     return_tensors='pt'     ).pixel_values
										snake_case       ,snake_case             =      self.calculate_expected_size(image_inputs[0]     )
										self.assertEqual(
										    encoded_images.shape		,     (
										        1,
										        self.image_processor_tester.num_channels,
										        expected_height,
										        expected_width,
										    )		,     )

				def 		snake_case			(					self     ):






										"""simple docstring"""

										snake_case             =      self.image_processing_class(**self.image_processor_dict     )
										# create random PyTorch tensors
										snake_case             =      self.image_processor_tester.prepare_inputs(equal_resolution=lowerCAmelCase		,     torchify=lowerCAmelCase     )
										for image in image_inputs:
																self.assertIsInstance(lowerCAmelCase		,     torch.Tensor     )

										# Test not batched input
										snake_case             =      image_processor(image_inputs[0]		,     return_tensors='pt'     ).pixel_values
										snake_case       ,snake_case             =      self.calculate_expected_size(image_inputs[0]     )
										self.assertEqual(
										    encoded_images.shape		,     (
										        1,
										        self.image_processor_tester.num_channels,
										        expected_height,
										        expected_width,
										    )		,     )


