






"""simple docstring"""



from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

_UpperCamelCase		:  List[str]						=		6_3_7_8_1_3_7.0
_UpperCamelCase		:  str						=		6_3_5_6_7_5_2.3_1_4_2_4_5
_UpperCamelCase		:  Union[str, Any]						=		6_3_7_8_1_3_7
def 						_SCREAMING_SNAKE_CASE (    __snake_case			:  float		,					__snake_case			:  float		,					__snake_case			:  float		,					__snake_case			:  float    ):





  '''simple docstring'''





  lowercase							    =       (AXIS_A - AXIS_B) / AXIS_A
  # Parametric latitudes
  # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
  lowercase							    =       atan((1 - flattening) * tan(radians(__snake_case    )    )    )
  lowercase							    =       atan((1 - flattening) * tan(radians(__snake_case    )    )    )

  # Compute central angle between two points
  # using haversine theta. sigma =  haversine_distance / equatorial radius
  lowercase							    =       haversine_distance(__snake_case		,					__snake_case		,					__snake_case		,					__snake_case    ) / EQUATORIAL_RADIUS

  # Intermediate P and Q values
  lowercase							    =       (b_lata + b_lata) / 2
  lowercase							    =       (b_lata - b_lata) / 2

  # Intermediate X value
  # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
  lowercase							    =       (sin(__snake_case    ) ** 2) * (cos(__snake_case    ) ** 2)
  lowercase							    =       cos(sigma / 2    ) ** 2
  lowercase							    =       (sigma - sin(__snake_case    )) * (x_numerator / x_demonimator)

  # Intermediate Y value
  # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
  lowercase							    =       (cos(__snake_case    ) ** 2) * (sin(__snake_case    ) ** 2)
  lowercase							    =       sin(sigma / 2    ) ** 2
  lowercase							    =       (sigma + sin(__snake_case    )) * (y_numerator / y_denominator)

  return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
    import doctest

    doctest.testmod()










"""simple docstring"""



import requests
from bsa import BeautifulSoup
def 						_SCREAMING_SNAKE_CASE (    __snake_case			:  str = "AAPL"    ):





  '''simple docstring'''





  lowercase							    =       f'https://in.finance.yahoo.com/quote/{symbol}?s={symbol}'
  lowercase							    =       BeautifulSoup(requests.get(__snake_case    ).text		,					'html.parser'    )
  lowercase							    =       'My(6px) Pos(r) smartphone_Mt(6px)'
  return soup.find('div'		,					class_=class_    ).find('span'    ).text


if __name__ == "__main__":
    for symbol in "AAPL AMZN IBM GOOG MSFT ORCL".split():
        print(F'''Current {symbol:<4} stock price is {stock_price(symbol):>8}''')


