from ...configuration_utils import PretrainedConfig
from ...utils import logging


__lowerCAmelCase    :  Dict										= logging.get_logger(__name__)

__lowerCAmelCase    :  int										= {
    'MCG-NJU/videomae-base': 'https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json',
}
class 				lowerCamelCase			(							__snake_case					):
      __lowerCamelCase							=					'videomae'






      def __init__(      self  ,		__lowerCamelCase=2_24  ,		__lowerCamelCase=16  ,		__lowerCamelCase=3  ,		__lowerCamelCase=16  ,		__lowerCamelCase=2  ,		__lowerCamelCase=7_68  ,		__lowerCamelCase=12  ,		__lowerCamelCase=12  ,		__lowerCamelCase=30_72  ,		__lowerCamelCase="gelu"  ,		__lowerCamelCase=0.0  ,		__lowerCamelCase=0.0  ,		__lowerCamelCase=0.02  ,		__lowerCamelCase=1e-12  ,		__lowerCamelCase=True  ,		__lowerCamelCase=True  ,		__lowerCamelCase=6  ,		__lowerCamelCase=3_84  ,		__lowerCamelCase=4  ,		__lowerCamelCase=15_36  ,		__lowerCamelCase=True  ,		**__lowerCamelCase  ,		)     ->				Any:


          '''simple docstring'''







          super().__init__(**__lowerCamelCase						)

          snake_case:						Any         =   image_size
          snake_case:						int         =   patch_size
          snake_case:						Any         =   num_channels
          snake_case:						Any         =   num_frames
          snake_case:						Optional[int]         =   tubelet_size

          snake_case:						Optional[Any]         =   hidden_size
          snake_case:						List[str]         =   num_hidden_layers
          snake_case:						List[Any]         =   num_attention_heads
          snake_case:						Optional[int]         =   intermediate_size
          snake_case:						Union[str, Any]         =   hidden_act
          snake_case:						Dict         =   hidden_dropout_prob
          snake_case:						Optional[Any]         =   attention_probs_dropout_prob
          snake_case:						int         =   initializer_range
          snake_case:						str         =   layer_norm_eps
          snake_case:						List[str]         =   qkv_bias
          snake_case:						Dict         =   use_mean_pooling

          snake_case:						Optional[Any]         =   decoder_num_attention_heads
          snake_case:						int         =   decoder_hidden_size
          snake_case:						int         =   decoder_num_hidden_layers
          snake_case:						Any         =   decoder_intermediate_size
          snake_case:						Tuple         =   norm_pix_loss



from urllib.error import HTTPError

from bsa import BeautifulSoup
from requests import exceptions, get

__lowerCAmelCase    :  Optional[int]										= 'https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true'

def   a_					(_lowerCAmelCase  :   str			,	_lowerCAmelCase  :   str       )->				list | None:

    try:
        # Has user provided both inputs?
        if not drug_name or not zip_code:
            return None

        snake_case:						List[str]         =   BASE_URL.format(_lowerCAmelCase			,	_lowerCAmelCase       )
        snake_case:						Optional[Any]         =   get(_lowerCAmelCase       )

        # Is the response ok?
        response.raise_for_status()

        # Scrape the data using bs4
        snake_case:						Tuple         =   BeautifulSoup(response.text			,	"""html.parser"""       )

        # This list will store the name and price.
        snake_case:						List[Any]         =   []

        # Fetch all the grids that contains the items.
        snake_case:						Any         =   soup.find_all("""div"""			,	{"""class""": """grid-x pharmCard"""}       )
        if grid_list and len(_lowerCAmelCase       ) > 0:
            for grid in grid_list:
                # Get the pharmacy price.
                snake_case:						Union[str, Any]         =   grid.find("""p"""			,	{"""class""": """list-title"""}       ).text

                # Get price of the drug.
                snake_case:						Optional[Any]         =   grid.find("""span"""			,	{"""p""", """price price-large"""}       ).text

                pharmacy_price_list.append(
                    {
                        """pharmacy_name""": pharmacy_name,
                        """price""": price,
                    }       )

        return pharmacy_price_list

    except (HTTPError, exceptions.RequestException, ValueError):
        return None


if __name__ == "__main__":
    # Enter a drug name and a zip code
    __lowerCAmelCase    :  Union[str, Any]										= input('Enter drug name: ').strip()
    __lowerCAmelCase    :  Tuple										= input('Enter zip code: ').strip()

    __lowerCAmelCase    :  list | None										= fetch_pharmacy_and_price_list(
        drug_name, zip_code
    )

    if pharmacy_price_list:
        print(F"""\nSearch results for {drug_name} at location {zip_code}:""")
        for pharmacy_price in pharmacy_price_list:
            __lowerCAmelCase    :  int										= pharmacy_price['pharmacy_name']
            __lowerCAmelCase    :  List[str]										= pharmacy_price['price']

            print(F"""Pharmacy: {name} Price: {price}""")
    else:
        print(F"""No results found for {drug_name}""")


