
'''simple docstring'''
import shutil

import requests





def  lowerCamelCase(       SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_ = False					,SCREAMING_SNAKE_CASE_ = "."    )		->		dict:
			A_       		=   'https://api.nasa.gov/planetary/apod'
			return requests.get(SCREAMING_SNAKE_CASE_					,params={'api_key': api_key}    ).json()





def  lowerCamelCase(       SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_ = "."    )		->		dict:
			A_       		=   get_apod_data(SCREAMING_SNAKE_CASE_    )
			A_       		=   apod_data['url']
			A_       		=   img_url.split('/'    )[-1]
			A_       		=   requests.get(SCREAMING_SNAKE_CASE_					,stream=SCREAMING_SNAKE_CASE_    )

			with open(F'{path}/{img_name}'					,'wb+'    ) as img_file:
						shutil.copyfileobj(response.raw					,SCREAMING_SNAKE_CASE_    )
			del response
			return apod_data





def  lowerCamelCase(       SCREAMING_SNAKE_CASE_    )		->		dict:
			A_       		=   'https://images-api.nasa.gov/search'
			return requests.get(SCREAMING_SNAKE_CASE_					,params={'q': query}    ).json()


if __name__ == "__main__":
							print(save_apod("YOUR API KEY"))
							_SCREAMING_SNAKE_CASE =	get_archive_data("apollo 2011")["collection"]["items"]
							print(apollo_aaaa_items[0]["data"][0]["description"])










'''simple docstring'''
from __future__ import annotations

import sys





def  lowerCamelCase(       SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_    )		->		tuple[int, int]:
			# base cases
			if abs(SCREAMING_SNAKE_CASE_    ) == 1:
						return a, 0
			elif abs(SCREAMING_SNAKE_CASE_    ) == 1:
						return 0, b

			A_		,   A_       		=   a, b
			A_		,   A_       		=   1, 0
			A_		,   A_       		=   0, 1

			while remainder != 0:
						A_       		=   old_remainder // remainder
						A_		,   A_       		=   remainder, old_remainder - quotient * remainder
						A_		,   A_       		=   coeff_a, old_coeff_a - quotient * coeff_a
						A_		,   A_       		=   coeff_b, old_coeff_b - quotient * coeff_b

			# sign correction for negative numbers
			if a < 0:
						A_       		=   -old_coeff_a
			if b < 0:
						A_       		=   -old_coeff_b

			return old_coeff_a, old_coeff_b





def  lowerCamelCase(       )		->		Tuple:
			if len(sys.argv    ) < 3:
						print('2 integer arguments required'    )
						return 1
			A_       		=   int(sys.argv[1]    )
			A_       		=   int(sys.argv[2]    )
			print(extended_euclidean_algorithm(SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_    )    )
			return 0


if __name__ == "__main__":
							raise SystemExit(main())




