



import requests
from bsa import BeautifulSoup






def 				A				(					_lowerCamelCase = "AAPL"  ):





							'''simple docstring'''




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





from PIL import Image






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							_lowerCAmelCase   ,    _lowerCAmelCase     :							int    =    image.size
							_lowerCAmelCase     :							Any    =    0
							_lowerCAmelCase     :							Tuple    =    image.load()
							for i in range(_lowerCamelCase  ):
														for j in range(_lowerCamelCase  ):
																					_lowerCAmelCase     :							Union[str, Any]    =    pixels[j, i]
																					mean += pixel
							mean //= width * height

							for j in range(_lowerCamelCase  ):
														for i in range(_lowerCamelCase  ):
																					_lowerCAmelCase     :							Optional[Any]    =    255 if pixels[i, j] > mean else 0
							return image


if __name__ == "__main__":
						_snake_case		=  mean_threshold(Image.open("path_to_image").convert("L"))
						image.save("output_image_path")
