




'''simple docstring'''



import requests
from bsa import BeautifulSoup







def 			_UpperCamelCase (_lowerCamelCase							:     Optional[Any]   ,	_lowerCamelCase							:     int	)->   int:




     '''simple docstring'''





     __snake_case    					=  (
         '''https://www.horoscope.com/us/horoscopes/general/'''
         f'''horoscope-general-daily-{day}.aspx?sign={zodiac_sign}'''
     )
     __snake_case    					=  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_       :  Tuple      =		int(input('''number> ''').strip())
     print('''choose some day:\n''', '''yesterday\n''', '''today\n''', '''tomorrow\n''')
     UpperCAmelCase_       :  List[str]      =		input('''enter the day> ''')
     UpperCAmelCase_       :  List[str]      =		horoscope(zodiac_sign, day)
     print(horoscope_text)





'''simple docstring'''



from datetime import date

import requests

UpperCAmelCase_       :  str      =		'''https://api.carbonintensity.org.uk/intensity'''







def 			_UpperCamelCase ()->   str:




     '''simple docstring'''





     __snake_case    					=  requests.get(_lowerCamelCase	).json()['''data'''][0]
     return last_half_hour["intensity"]["actual"]







def 			_UpperCamelCase (_lowerCamelCase							:     Dict   ,	_lowerCamelCase							:     List[Any]	)->   list:




     '''simple docstring'''





     return requests.get(f'''{BASE_URL}/{start}/{end}'''	).json()["data"]


if __name__ == "__main__":
     for entry in fetch_from_to(start=date(2_0_2_0, 1_0, 1), end=date(2_0_2_0, 1_0, 3)):
          print('''from {from} to {to}: {intensity[actual]}'''.format(**entry))
     print(F"""{fetch_last_half_hour() = }""")






