


from __future__ import annotations

import math

import numpy as np
from numpy.linalg import norm







def      a	(							SCREAMING_SNAKE_CASE_      :		np.ndarray							,			SCREAMING_SNAKE_CASE_      :		np.ndarray       ):






       """simple docstring"""





       return math.sqrt(sum(pow(a - b							,			2       ) for a, b in zip(SCREAMING_SNAKE_CASE_							,			SCREAMING_SNAKE_CASE_       )       )       )







def      a	(							SCREAMING_SNAKE_CASE_      :		np.ndarray							,			SCREAMING_SNAKE_CASE_      :		np.ndarray       ):






       """simple docstring"""





       if dataset.ndim != value_array.ndim:
              UpperCamelCase    :	List[Any]   	=		(
                  '''Wrong input data\'s dimensions... '''
                  F"""dataset : {dataset.ndim}, value_array : {value_array.ndim}"""
              )
              raise ValueError(SCREAMING_SNAKE_CASE_       )

       try:
              if dataset.shape[1] != value_array.shape[1]:
                     UpperCamelCase    :	str   	=		(
                         '''Wrong input data\'s shape... '''
                         F"""dataset : {dataset.shape[1]}, value_array : {value_array.shape[1]}"""
                     )
                     raise ValueError(SCREAMING_SNAKE_CASE_       )
       except IndexError:
              if dataset.ndim != value_array.ndim:
                     raise TypeError('''Wrong shape'''       )

       if dataset.dtype != value_array.dtype:
              UpperCamelCase    :	Union[str, Any]   	=		(
                  '''Input data have different datatype... '''
                  F"""dataset : {dataset.dtype}, value_array : {value_array.dtype}"""
              )
              raise TypeError(SCREAMING_SNAKE_CASE_       )

       UpperCamelCase    :	int   	=		[]

       for value in value_array:
              UpperCamelCase    :	Any   	=		euclidean(SCREAMING_SNAKE_CASE_							,			dataset[0]       )
              UpperCamelCase    :	Dict   	=		dataset[0].tolist()

              for dataset_value in dataset[1:]:
                     UpperCamelCase    :	Tuple   	=		euclidean(SCREAMING_SNAKE_CASE_							,			SCREAMING_SNAKE_CASE_       )

                     if dist > temp_dist:
                            UpperCamelCase    :	Union[str, Any]   	=		temp_dist
                            UpperCamelCase    :	Tuple   	=		dataset_value.tolist()

              answer.append([vector, dist]       )

       return answer







def      a	(							SCREAMING_SNAKE_CASE_      :		np.ndarray							,			SCREAMING_SNAKE_CASE_      :		np.ndarray       ):






       """simple docstring"""





       return np.dot(SCREAMING_SNAKE_CASE_							,			SCREAMING_SNAKE_CASE_       ) / (norm(SCREAMING_SNAKE_CASE_       ) * norm(SCREAMING_SNAKE_CASE_       ))


if __name__ == "__main__":
  import doctest

  doctest.testmod()





import requests
from bsa import BeautifulSoup


def      a	(							SCREAMING_SNAKE_CASE_      :		str = "AAPL"       ):






       """simple docstring"""





       UpperCamelCase    :	Dict   	=		F"""https://in.finance.yahoo.com/quote/{symbol}?s={symbol}"""
       UpperCamelCase    :	Any   	=		BeautifulSoup(requests.get(SCREAMING_SNAKE_CASE_       ).text							,			'''html.parser'''       )
       UpperCamelCase    :	Dict   	=		'''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}''')

