'''simple docstring'''





from typing import Dict, Optional, Tuple

import torch






def 					SCREAMING_SNAKE_CASE_			(		lowerCAmelCase_: torch.Tensor     ):
      snake_case_     :			int       =       boundaries[1] - boundaries[0]
      snake_case_     :			Optional[int]       =       boundaries + step / 2
      snake_case_     :			Union[str, Any]       =       torch.cat([bin_centers, (bin_centers[-1] + step).unsqueeze(-1     )] ,	dim=0     )
      return bin_centers






def 					SCREAMING_SNAKE_CASE_			(		lowerCAmelCase_: torch.Tensor ,	lowerCAmelCase_: torch.Tensor ,	):
      snake_case_     :			List[str]       =       _calculate_bin_centers(lowerCAmelCase_     )
      return (
          torch.sum(aligned_distance_error_probs * bin_centers ,	dim=-1     ),
          bin_centers[-1],
      )






def 					SCREAMING_SNAKE_CASE_			(		lowerCAmelCase_: torch.Tensor ,	lowerCAmelCase_: int = 3_1 ,	lowerCAmelCase_: int = 6_4 ,	**lowerCAmelCase_: Union[str, Any] ,	):
      snake_case_     :			Optional[Any]       =       torch.linspace(0 ,	lowerCAmelCase_ ,	steps=(no_bins - 1) ,	device=logits.device     )

      snake_case_     :			Optional[Any]       =       torch.nn.functional.softmax(lowerCAmelCase_ ,	dim=-1     )
      snake_case_     :			List[str]       =       _calculate_expected_aligned_error(
          alignment_confidence_breaks=lowerCAmelCase_ ,	aligned_distance_error_probs=lowerCAmelCase_ ,	)

      return {
          "aligned_confidence_probs": aligned_confidence_probs,
          "predicted_aligned_error": predicted_aligned_error,
          "max_predicted_aligned_error": max_predicted_aligned_error,
      }






def 					SCREAMING_SNAKE_CASE_			(		lowerCAmelCase_: torch.Tensor ,	lowerCAmelCase_: Optional[torch.Tensor] = None ,	lowerCAmelCase_: int = 3_1 ,	lowerCAmelCase_: int = 6_4 ,	lowerCAmelCase_: float = 1e-8 ,	**lowerCAmelCase_: List[str] ,	):
      if residue_weights is None:
            snake_case_     :			str       =       logits.new_ones(logits.shape[-2]     )

      snake_case_     :			int       =       torch.linspace(0 ,	lowerCAmelCase_ ,	steps=(no_bins - 1) ,	device=logits.device     )

      snake_case_     :			Dict       =       _calculate_bin_centers(lowerCAmelCase_     )
      torch.sum(lowerCAmelCase_     )
      snake_case_     :			int       =       logits.shape[-2]
      snake_case_     :			List[str]       =       max(lowerCAmelCase_ ,	1_9     )

      snake_case_     :			Optional[int]       =       1.2_4 * (clipped_n - 1_5) ** (1.0 / 3) - 1.8

      snake_case_     :			List[str]       =       torch.nn.functional.softmax(lowerCAmelCase_ ,	dim=-1     )

      snake_case_     :			Dict       =       1.0 / (1 + (bin_centers**2) / (da**2))
      snake_case_     :			Any       =       torch.sum(probs * tm_per_bin ,	dim=-1     )

      snake_case_     :			List[str]       =       residue_weights / (eps + residue_weights.sum())
      snake_case_     :			Union[str, Any]       =       torch.sum(predicted_tm_term * normed_residue_mask ,	dim=-1     )

      snake_case_     :			int       =       per_alignment * residue_weights

      snake_case_     :			List[str]       =       (weighted == torch.max(lowerCAmelCase_     )).nonzero()[0]
      return per_alignment[tuple(lowerCAmelCase_     )]




import requests
from bsa import BeautifulSoup






def 					SCREAMING_SNAKE_CASE_			(		lowerCAmelCase_: int ,	lowerCAmelCase_: str     ):
      snake_case_     :			Optional[int]       =       (
          "https://www.horoscope.com/us/horoscopes/general/"
          f"horoscope-general-daily-{day}.aspx?sign={zodiac_sign}"
      )
      snake_case_     :			int       =       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",
     )
     UpperCAmelCase							=       int(input("number> ").strip())
     print("choose some day:\n", "yesterday\n", "today\n", "tomorrow\n")
     UpperCAmelCase							=       input("enter the day> ")
     UpperCAmelCase							=       horoscope(zodiac_sign, day)
     print(horoscope_text)



