





'''simple docstring'''


from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowerCAmelCase					:     int												=logging.get_logger(__name__)

lowerCAmelCase					:     Tuple												={
    '''hustvl/yolos-small''': '''https://huggingface.co/hustvl/yolos-small/resolve/main/config.json''',
    # See all YOLOS models at https://huggingface.co/models?filter=yolos
}
class       a_   (				_lowerCAmelCase							):
     __A      =			"yolos"





     def __init__( self		:					Optional[int]	,      lowercase		:					int=768	,      lowercase		:					Any=12	,      lowercase		:					Optional[int]=12	,      lowercase		:					List[Any]=3_072	,      lowercase		:					Tuple="gelu"	,      lowercase		:					str=0.0	,      lowercase		:					Optional[Any]=0.0	,      lowercase		:					List[Any]=0.02	,      lowercase		:					Optional[int]=1e-1_2	,      lowercase		:					Union[str, Any]=[512, 864]	,      lowercase		:					Dict=16	,      lowercase		:					str=3	,      lowercase		:					List[str]=True	,      lowercase		:					List[Any]=100	,      lowercase		:					List[Any]=True	,      lowercase		:					Dict=False	,      lowercase		:					List[Any]=1	,      lowercase		:					str=5	,      lowercase		:					Dict=2	,      lowercase		:					Tuple=5	,      lowercase		:					Optional[int]=2	,      lowercase		:					Dict=0.1	,      **lowercase		:					Tuple	,      ):





        """simple docstring"""




        super().__init__(**lowercase						)

        lowercase_			:int    			= hidden_size
        lowercase_			:Optional[Any]    			= num_hidden_layers
        lowercase_			:Any    			= num_attention_heads
        lowercase_			:Dict    			= intermediate_size
        lowercase_			:Dict    			= hidden_act
        lowercase_			:str    			= hidden_dropout_prob
        lowercase_			:Dict    			= attention_probs_dropout_prob
        lowercase_			:List[str]    			= initializer_range
        lowercase_			:Any    			= layer_norm_eps
        lowercase_			:Dict    			= image_size
        lowercase_			:Optional[int]    			= patch_size
        lowercase_			:List[str]    			= num_channels
        lowercase_			:List[str]    			= qkv_bias
        lowercase_			:int    			= num_detection_tokens
        lowercase_			:Optional[Any]    			= use_mid_position_embeddings
        lowercase_			:List[str]    			= auxiliary_loss
        # Hungarian matcher
        lowercase_			:Union[str, Any]    			= class_cost
        lowercase_			:List[Any]    			= bbox_cost
        lowercase_			:Union[str, Any]    			= giou_cost
        # Loss coefficients
        lowercase_			:List[Any]    			= bbox_loss_coefficient
        lowercase_			:Any    			= giou_loss_coefficient
        lowercase_			:List[Any]    			= eos_coefficient







class       a_   (				_lowerCAmelCase							):
     __A      =			version.parse("1.11"							)





     @property
     def 							lowercase__      ( self		:					List[Any]						):





        """simple docstring"""




        return OrderedDict(
            [
                ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
            ]						)





     @property
     def 							lowercase__      ( self		:					List[Any]						):





        """simple docstring"""




        return 1e-4







     @property
     def 							lowercase__      ( self		:					Any						):





        """simple docstring"""




        return 12









'''simple docstring'''


import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
 print('''Googling.....''')
 lowerCAmelCase					:     str												='''https://www.google.com/search?q=''' + ''' '''.join(sys.argv[1:])
 lowerCAmelCase					:     List[str]												=requests.get(url, headers={'''UserAgent''': UserAgent().random})
 # res.raise_for_status()
 with open('''project1a.html''', '''wb''') as out_file:  # only for knowing the class
  for data in res.iter_content(10_000):
   out_file.write(data)
 lowerCAmelCase					:     List[Any]												=BeautifulSoup(res.text, '''html.parser''')
 lowerCAmelCase					:     List[Any]												=list(soup.select('''.eZt8xd'''))[:5]

 print(len(links))
 for link in links:
  if link.text == "Maps":
   webbrowser.open(link.get('''href'''))
  else:
   webbrowser.open(F'''https://google.com{link.get('href')}''')


