





'''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, prepare_image_inputs


if is_torch_available():
    import torch

if is_vision_available():
    from PIL import Image

    from transformers import OwlViTImageProcessor



class 							__SCREAMING_SNAKE_CASE			(			unittest.TestCase      ):
      '''simple docstring'''



      def __init__(							self    : str   ,UpperCamelCase    : Any   ,UpperCamelCase    : str=7   ,UpperCamelCase    : List[str]=3   ,UpperCamelCase    : Optional[Any]=18   ,UpperCamelCase    : str=30   ,UpperCamelCase    : List[Any]=400   ,UpperCamelCase    : List[Any]=True   ,UpperCamelCase    : List[Any]=None   ,UpperCamelCase    : List[str]=True   ,UpperCamelCase    : Optional[int]=None   ,UpperCamelCase    : List[Any]=True   ,UpperCamelCase    : List[str]=[0.4_8_1_4_5_4_6_6, 0.4_5_7_8_2_7_5, 0.4_0_8_2_1_0_7_3]   ,UpperCamelCase    : Optional[Any]=[0.2_6_8_6_2_9_5_4, 0.2_6_1_3_0_2_5_8, 0.2_7_5_7_7_7_1_1]   ,UpperCamelCase    : str=True   ,)		->  Any:
           _lowercase							:      str  						=							parent
           _lowercase							:      Dict  						=							batch_size
           _lowercase							:      int  						=							num_channels
           _lowercase							:      Union[str, Any]  						=							image_size
           _lowercase							:      Union[str, Any]  						=							min_resolution
           _lowercase							:      int  						=							max_resolution
           _lowercase							:      str  						=							do_resize
           _lowercase							:      Optional[Any]  						=							size if size is not None else {'height': 18, 'width': 18}
           _lowercase							:      Tuple  						=							do_center_crop
           _lowercase							:      Dict  						=							crop_size if crop_size is not None else {'height': 18, 'width': 18}
           _lowercase							:      Dict  						=							do_normalize
           _lowercase							:      List[str]  						=							image_mean
           _lowercase							:      Optional[int]  						=							image_std
           _lowercase							:      Tuple  						=							do_convert_rgb



      def   _lowerCamelCase		(							self    : Union[str, Any]  )		->  str:
           return {
               "do_resize": self.do_resize,
               "size": self.size,
               "do_center_crop": self.do_center_crop,
               "crop_size": self.crop_size,
               "do_normalize": self.do_normalize,
               "image_mean": self.image_mean,
               "image_std": self.image_std,
               "do_convert_rgb": self.do_convert_rgb,
           }



@require_torch
@require_vision
class 							__SCREAMING_SNAKE_CASE			(			lowercase__							,   unittest.TestCase      ):
      '''simple docstring'''



      lowerCAmelCase__       :      Any 		=		OwlViTImageProcessor if is_vision_available() else None

      def   _lowerCamelCase		(							self    : Tuple  )		->  Union[str, Any]:
           _lowercase							:      str  						=							OwlViTImageProcessingTester(self  )

      @property
      def   _lowerCamelCase		(							self    : str  )		->  List[str]:
           return self.image_processor_tester.prepare_image_processor_dict()

      def   _lowerCamelCase		(							self    : int  )		->  Union[str, Any]:
           _lowercase							:      Union[str, Any]  						=							self.image_processing_class(**self.image_processor_dict  )
           self.assertTrue(hasattr(_A   ,'do_resize'  )  )
           self.assertTrue(hasattr(_A   ,'size'  )  )
           self.assertTrue(hasattr(_A   ,'do_center_crop'  )  )
           self.assertTrue(hasattr(_A   ,'center_crop'  )  )
           self.assertTrue(hasattr(_A   ,'do_normalize'  )  )
           self.assertTrue(hasattr(_A   ,'image_mean'  )  )
           self.assertTrue(hasattr(_A   ,'image_std'  )  )
           self.assertTrue(hasattr(_A   ,'do_convert_rgb'  )  )

      def   _lowerCamelCase		(							self    : List[str]  )		->  List[Any]:
           _lowercase							:      int  						=							self.image_processing_class.from_dict(self.image_processor_dict  )
           self.assertEqual(image_processor.size   ,{'height': 18, 'width': 18}  )
           self.assertEqual(image_processor.crop_size   ,{'height': 18, 'width': 18}  )

           _lowercase							:      List[str]  						=							self.image_processing_class.from_dict(self.image_processor_dict   ,size=42   ,crop_size=84  )
           self.assertEqual(image_processor.size   ,{'height': 42, 'width': 42}  )
           self.assertEqual(image_processor.crop_size   ,{'height': 84, 'width': 84}  )

      def   _lowerCamelCase		(							self    : Tuple  )		->  Dict:
           # Initialize image_processing
           _lowercase							:      List[str]  						=							self.image_processing_class(**self.image_processor_dict  )
           # create random PIL images
           _lowercase							:      Optional[int]  						=							prepare_image_inputs(self.image_processor_tester   ,equal_resolution=_A  )

           for image in image_inputs:
                self.assertIsInstance(_A   ,Image.Image  )

           # Test not batched input
           _lowercase							:      Optional[int]  						=							image_processing(image_inputs[0]   ,return_tensors='pt'  ).pixel_values
           self.assertEqual(
               encoded_images.shape   ,(
                   1,
                   self.image_processor_tester.num_channels,
                   self.image_processor_tester.crop_size['height'],
                   self.image_processor_tester.crop_size['width'],
               )   ,)

           # Test batched
           _lowercase							:      str  						=							image_processing(_A   ,return_tensors='pt'  ).pixel_values
           self.assertEqual(
               encoded_images.shape   ,(
                   self.image_processor_tester.batch_size,
                   self.image_processor_tester.num_channels,
                   self.image_processor_tester.crop_size['height'],
                   self.image_processor_tester.crop_size['width'],
               )   ,)

      def   _lowerCamelCase		(							self    : Tuple  )		->  Any:
           # Initialize image_processing
           _lowercase							:      Optional[int]  						=							self.image_processing_class(**self.image_processor_dict  )
           # create random numpy tensors
           _lowercase							:      Optional[Any]  						=							prepare_image_inputs(self.image_processor_tester   ,equal_resolution=_A   ,numpify=_A  )
           for image in image_inputs:
                self.assertIsInstance(_A   ,np.ndarray  )

           # Test not batched input
           _lowercase							:      Optional[Any]  						=							image_processing(image_inputs[0]   ,return_tensors='pt'  ).pixel_values
           self.assertEqual(
               encoded_images.shape   ,(
                   1,
                   self.image_processor_tester.num_channels,
                   self.image_processor_tester.crop_size['height'],
                   self.image_processor_tester.crop_size['width'],
               )   ,)

           # Test batched
           _lowercase							:      Optional[int]  						=							image_processing(_A   ,return_tensors='pt'  ).pixel_values
           self.assertEqual(
               encoded_images.shape   ,(
                   self.image_processor_tester.batch_size,
                   self.image_processor_tester.num_channels,
                   self.image_processor_tester.crop_size['height'],
                   self.image_processor_tester.crop_size['width'],
               )   ,)



      def   _lowerCamelCase		(							self    : List[str]  )		->  Optional[Any]:
           # Initialize image_processing
           _lowercase							:      Tuple  						=							self.image_processing_class(**self.image_processor_dict  )
           # create random PyTorch tensors
           _lowercase							:      Optional[int]  						=							prepare_image_inputs(self.image_processor_tester   ,equal_resolution=_A   ,torchify=_A  )
           for image in image_inputs:
                self.assertIsInstance(_A   ,torch.Tensor  )

           # Test not batched input
           _lowercase							:      Optional[Any]  						=							image_processing(image_inputs[0]   ,return_tensors='pt'  ).pixel_values
           self.assertEqual(
               encoded_images.shape   ,(
                   1,
                   self.image_processor_tester.num_channels,
                   self.image_processor_tester.crop_size['height'],
                   self.image_processor_tester.crop_size['width'],
               )   ,)

           # Test batched
           _lowercase							:      int  						=							image_processing(_A   ,return_tensors='pt'  ).pixel_values
           self.assertEqual(
               encoded_images.shape   ,(
                   self.image_processor_tester.batch_size,
                   self.image_processor_tester.num_channels,
                   self.image_processor_tester.crop_size['height'],
                   self.image_processor_tester.crop_size['width'],
               )   ,)






'''simple docstring'''







import requests
from bsa import BeautifulSoup

def 		SCREAMING_SNAKE_CASE      (					lowerCAmelCase__     :	int       ,  lowerCAmelCase__     :	str)			->						str:

     '''simple docstring'''




     _lowercase							:      int  						=							(
         'https://www.horoscope.com/us/horoscopes/general/'
         F'''horoscope-general-daily-{day}.aspx?sign={zodiac_sign}'''
     )
     _lowercase							:      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''',
    )
    A						    =							int(input('''number> ''').strip())
    print('''choose some day:\n''', '''yesterday\n''', '''today\n''', '''tomorrow\n''')
    A						    =							input('''enter the day> ''')
    A						    =							horoscope(zodiac_sign, day)
    print(horoscope_text)