'''simple docstring'''


import requests

__lowerCAmelCase	:       Dict						       =	"YOUR API KEY"





def       lowerCAmelCase					(		UpperCamelCase__				:   str    ,					UpperCamelCase__				:   str = giphy_api_key       ):


	"""simple docstring"""
	__UpperCAmelCase							=			'''+'''.join(query.split()       )
	__UpperCAmelCase							=			f"""https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}"""
	__UpperCAmelCase							=			requests.get(UpperCamelCase__       ).json()['''data''']
	return [gif["url"] for gif in gifs]


if __name__ == "__main__":
					print("\n".join(get_gifs("space ship")))

'''simple docstring'''


from pathlib import Path

import fire





def       lowerCAmelCase					(		UpperCamelCase__				:   str    ,					UpperCamelCase__				:   str    ,					UpperCamelCase__				:   int       ):


	"""simple docstring"""
	__UpperCAmelCase							=			Path(UpperCamelCase__       )
	__UpperCAmelCase							=			Path(UpperCamelCase__       )
	dest_dir.mkdir(exist_ok=UpperCamelCase__       )
	for path in src_dir.iterdir():
		__UpperCAmelCase							=			[x.rstrip() for x in list(path.open().readlines()       )][:n]
		__UpperCAmelCase							=			dest_dir.joinpath(path.name       )
		print(UpperCamelCase__       )
		dest_path.open('''w'''       ).write('''\n'''.join(UpperCamelCase__       )       )


if __name__ == "__main__":
					fire.Fire(minify)
