from .imports import is_tqdm_available


if is_tqdm_available():
    from tqdm.auto import tqdm as _tqdm

from ..state import PartialState



def lowerCamelCase  (   SCREAMING_SNAKE_CASE = True  ,			*SCREAMING_SNAKE_CASE  ,			**SCREAMING_SNAKE_CASE	):
    '''simple docstring'''







    if not is_tqdm_available():
        raise ImportError('''Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'''	)
    __UpperCamelCase     :int			  =		False
    if main_process_only:
        __UpperCamelCase     :Union[str, Any]			  =		PartialState().local_process_index == 0
    return _tqdm(*SCREAMING_SNAKE_CASE  ,			**SCREAMING_SNAKE_CASE  ,			disable=SCREAMING_SNAKE_CASE	)







"""simple docstring"""





import requests
from bsa import BeautifulSoup



def 						_lowerCAmelCase				(				UpperCamelCase_ = "AAPL"				):
		__SCREAMING_SNAKE_CASE            = f"https://in.finance.yahoo.com/quote/{symbol}?s={symbol}"
		__SCREAMING_SNAKE_CASE            = BeautifulSoup(requests.get(UpperCamelCase_				).text  ,				"""html.parser"""				)
		__SCREAMING_SNAKE_CASE            = """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}""")




