



"""simple docstring"""
from collections import Counter

import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split

A:     List[str]										=	datasets.load_iris()

A:     int										=	np.array(data["data"])
A:     Dict										=	np.array(data["target"])
A:     List[Any]										=	data["target_names"]

A							,   A							,   A							,   A:     Tuple										=	train_test_split(X, y)

def    _snake_case		(		UpperCamelCase		:	Optional[int]    ,	UpperCamelCase		:	Union[str, Any]		):
 return np.linalg.norm(np.array(UpperCamelCase		) - np.array(UpperCamelCase		)		)

def    _snake_case		(		UpperCamelCase		:	Optional[int]    ,	UpperCamelCase		:	int    ,	UpperCamelCase		:	str    ,	UpperCamelCase		:	str    ,	UpperCamelCase		:	Any=5		):
 UpperCAmelCase			:      Union[str, Any]			=			zip(UpperCamelCase    ,	UpperCamelCase		)
 # List of distances of all points from the point to be classified
 UpperCAmelCase			:      Any			=			[]
 for data_point in data:
  UpperCAmelCase			:      Optional[Any]			=			euclidean_distance(data_point[0]    ,	UpperCamelCase		)
  distances.append((distance, data_point[1])		)
 # Choosing 'k' points with the least distances.
 UpperCAmelCase			:      Tuple			=			[i[1] for i in sorted(UpperCamelCase		)[:k]]
 # Most commonly occurring class among them
 # is the class into which the point is classified
 UpperCAmelCase			:      Optional[int]			=			Counter(UpperCamelCase		).most_common(1		)[0][0]
 return classes[result]


if __name__ == "__main__":
      print(classifier(X_train, y_train, classes, [4.4, 3.1, 1.3, 1.4]))





"""simple docstring"""
import requests
from bsa import BeautifulSoup

def    _snake_case		(		UpperCamelCase		:	str = "AAPL"		):
 UpperCAmelCase			:      Any			=			F"https://in.finance.yahoo.com/quote/{symbol}?s={symbol}"
 UpperCAmelCase			:      Optional[int]			=			BeautifulSoup(requests.get(UpperCamelCase		).text    ,	"""html.parser"""		)
 UpperCAmelCase			:      int			=			"""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}""")
