

'''simple docstring'''



import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
  print('Googling.....')
  UpperCAmelCase					:			int       =	'https://www.google.com/search?q=' + ' '.join(sys.argv[1:])
  UpperCAmelCase					:			List[Any]       =	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(1_0_0_0_0):
      out_file.write(data)
  UpperCAmelCase					:			int       =	BeautifulSoup(res.text, 'html.parser')
  UpperCAmelCase					:			int       =	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")}""")









'''simple docstring'''



from typing import Optional, Union

import torch
from torch import nn

from ...configuration_utils import ConfigMixin, register_to_config
from ...models.modeling_utils import ModelMixin







class 		lowerCAmelCase__  ( a					,   a   ):



 """simple docstring"""



 @register_to_config
 def __init__(						self   :			int   ,				__SCREAMING_SNAKE_CASE   :			int = 768   ,				)    ->					int:


      """simple docstring"""




      super().__init__()

      __SCREAMING_SNAKE_CASE      = nn.Parameter(torch.zeros(1   ,				__SCREAMING_SNAKE_CASE     )     )
      __SCREAMING_SNAKE_CASE      = nn.Parameter(torch.ones(1   ,				__SCREAMING_SNAKE_CASE     )     )
 def  UpperCAmelCase__						(						self   :			Any   ,				__SCREAMING_SNAKE_CASE   :			Optional[Union[str, torch.device]] = None   ,				__SCREAMING_SNAKE_CASE   :			Optional[torch.dtype] = None   ,				)    ->					List[str]:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = nn.Parameter(self.mean.to(__SCREAMING_SNAKE_CASE     ).to(__SCREAMING_SNAKE_CASE     )     )
      __SCREAMING_SNAKE_CASE      = nn.Parameter(self.std.to(__SCREAMING_SNAKE_CASE     ).to(__SCREAMING_SNAKE_CASE     )     )
      return self
 def  UpperCAmelCase__						(						self   :			Optional[Any]   ,				__SCREAMING_SNAKE_CASE   :			Optional[int]     )    ->					Optional[int]:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = (embeds - self.mean) * 1.0 / self.std
      return embeds


 def  UpperCAmelCase__						(						self   :			Tuple   ,				__SCREAMING_SNAKE_CASE   :			Any     )    ->					Optional[int]:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = (embeds * self.std) + self.mean
      return embeds






