


import webbrowser
from sys import argv
from urllib.parse import parse_qs, quote

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
    a_ :int  							=			"%20".join(argv[1:]) if len(argv) > 1 else quote(str(input('Search: ')))

    print('Googling.....')

    a_ :Optional[Any]  							=			F'''https://www.google.com/search?q={query}&num=100'''

    a_ :Optional[Any]  							=			requests.get(
        url,
        headers={'User-Agent': str(UserAgent().random)},
    )

    try:
        a_ :Union[str, Any]  							=			(
            BeautifulSoup(res.text, 'html.parser')
            .find('div', attrs={'class': 'yuRUbf'})
            .find('a')
            .get('href')
        )

    except AttributeError:
        a_ :str  							=			parse_qs(
            BeautifulSoup(res.text, 'html.parser')
            .find('div', attrs={'class': 'kCrYT'})
            .find('a')
            .get('href')
        )["url"][0]

    webbrowser.open(link)










'''simple docstring'''






from __future__ import annotations

import numpy as np







def 							UpperCamelCase_     (       A__   :  np.ndarray   ):
  '''simple docstring'''





  lowerCAmelCase_,				lowerCAmelCase_     : List[str]     =  np.shape(A__   )
  if rows != columns:
    lowerCAmelCase_     : List[str]     =  (
        """'table' has to be of square shaped array but got a """
        f'{rows}x{columns} array:\n{table}'
    )
    raise ValueError(A__   )

  lowerCAmelCase_     : Optional[int]     =  np.zeros((rows, columns)   )
  lowerCAmelCase_     : Tuple     =  np.zeros((rows, columns)   )
  for i in range(A__   ):
    for j in range(A__   ):
      lowerCAmelCase_     : str     =  sum(lower[i][k] * upper[k][j] for k in range(A__   )   )
      if upper[j][j] == 0:
        raise ArithmeticError("""No LU decomposition exists"""   )
      lowerCAmelCase_     : Union[str, Any]     =  (table[i][j] - total) / upper[j][j]
    lowerCAmelCase_     : Dict     =  1
    for j in range(A__				,       A__   ):
      lowerCAmelCase_     : str     =  sum(lower[i][k] * upper[k][j] for k in range(A__   )   )
      lowerCAmelCase_     : List[str]     =  table[i][j] - total
  return lower, upper


if __name__ == "__main__":
  import doctest

  doctest.testmod()



