



import requests
from bsa import BeautifulSoup







def     UpperCAmelCase_		(					snake_case__ = "AAPL"					)	->     str:



				"""simple docstring"""





				lowerCAmelCase__		  =  f'https://in.finance.yahoo.com/quote/{symbol}?s={symbol}'
				lowerCAmelCase__		  =  BeautifulSoup(requests.get(snake_case__					).text    ,			'html.parser'					)
				lowerCAmelCase__		  =  '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 typing import Dict

from .base import GenericTensor, Pipeline


class 	__snake_case   ( SCREAMING_SNAKE_CASE ):
		def 						SCREAMING_SNAKE_CASE_					(							self    ,a_=None    ,a_=None    ,a_=None    ,**a_						):







						"""simple docstring"""
						if tokenize_kwargs is None:
										lowerCAmelCase__		  =  {}

						if truncation is not None:
										if "truncation" in tokenize_kwargs:
														raise ValueError(
														    'truncation parameter defined twice (given as keyword argument as well as in tokenize_kwargs)'						)
										lowerCAmelCase__		  =  truncation

						lowerCAmelCase__		  =  tokenize_kwargs

						lowerCAmelCase__		  =  {}
						if return_tensors is not None:
										lowerCAmelCase__		  =  return_tensors

						return preprocess_params, {}, postprocess_params
		def 						SCREAMING_SNAKE_CASE_					(							self    ,a_    ,**a_						):







						"""simple docstring"""
						lowerCAmelCase__		  =  self.framework
						lowerCAmelCase__		  =  self.tokenizer(a_    ,return_tensors=a_    ,**a_						)
						return model_inputs
		def 						SCREAMING_SNAKE_CASE_					(							self    ,a_						):







						"""simple docstring"""
						lowerCAmelCase__		  =  self.model(**a_						)
						return model_outputs
		def 						SCREAMING_SNAKE_CASE_					(							self    ,a_    ,a_=False						):







						"""simple docstring"""
						# [0] is the first available tensor, logits or last_hidden_state.
						if return_tensors:
										return model_outputs[0]
						if self.framework == "pt":
										return model_outputs[0].tolist()
						elif self.framework == "tf":
										return model_outputs[0].numpy().tolist()



		def __call__(							self    ,*a_    ,**a_						):







						"""simple docstring"""
						return super().__call__(*a_    ,**a_						)
