


'''simple docstring'''



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__":
	__lowercase	:						Tuple       =	'%20'.join(argv[1:]) if len(argv) > 1 else quote(str(input('Search: ')))

	print('Googling.....')

	__lowercase	:						Any       =	f'''https://www.google.com/search?q={query}&num=100'''

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

	try:
		__lowercase	:						int       =	(
		    BeautifulSoup(res.text, 'html.parser')
		    .find('div', attrs={'class': 'yuRUbf'})
		    .find('a')
		    .get('href')
		)

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

	webbrowser.open(link)






import numpy as np





def 					__lowerCamelCase	( UpperCamelCase__      ):







							'''simple docstring'''






							return 1 / (1 + np.exp(-vector      ))





def 					__lowerCamelCase	( UpperCamelCase__      ):







							'''simple docstring'''






							return vector * sigmoid(UpperCamelCase__      )


if __name__ == "__main__":
					import doctest

					doctest.testmod()




