



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

	print("""Googling.....""")

	lowercase_								=     F'https://www.google.com/search?q={query}&num=100'

	lowercase_								=     requests.get(
	    url,
	    headers={"""User-Agent""": str(UserAgent().random)},
	)

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

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

	webbrowser.open(link)









from transformers import HfArgumentParser, TensorFlowBenchmark, TensorFlowBenchmarkArguments



def __lowerCAmelCase (     ):
			lowercase__					  =				HfArgumentParser(SCREAMING_SNAKE_CASE_  )
			lowercase__					  =				parser.parse_args_into_dataclasses()[0]
			lowercase__					  =				TensorFlowBenchmark(args=SCREAMING_SNAKE_CASE_  )
			try:
						lowercase__					  =				parser.parse_args_into_dataclasses()[0]
			except ValueError as e:
						lowercase__					  =				"Arg --no_{0} is no longer used, please use --no-{0} instead."
						lowercase__					  =				" ".join(str(SCREAMING_SNAKE_CASE_  ).split(" "  )[:-1]  )
						lowercase__					  =				""
						lowercase__					  =				eval(str(SCREAMING_SNAKE_CASE_  ).split(" "  )[-1]  )
						lowercase__					  =				[]
						for arg in depreciated_args:
									# arg[2:] removes '--'
									if arg[2:] in TensorFlowBenchmark.deprecated_args:
												# arg[5:] removes '--no_'
												full_error_msg += arg_error_msg.format(arg[5:]  )
									else:
												wrong_args.append(SCREAMING_SNAKE_CASE_  )
						if len(SCREAMING_SNAKE_CASE_  ) > 0:
									lowercase__					  =				full_error_msg + begin_error_msg + str(SCREAMING_SNAKE_CASE_  )
						raise ValueError(SCREAMING_SNAKE_CASE_  )
			benchmark.run()


if __name__ == "__main__":
							main()




