





'''simple docstring'''




import shutil

import requests





def      __lowerCamelCase       (	__lowerCAmelCase    :				Dict	,  __lowerCAmelCase    :				str = False	,  __lowerCAmelCase    :				Union[str, Any] = "."						)						->   dict:
   snake_case      		=					"""https://api.nasa.gov/planetary/apod"""
   return requests.get(__lowerCAmelCase	,  params={"""api_key""": api_key}						).json()





def      __lowerCamelCase       (	__lowerCAmelCase    :				Any	,  __lowerCAmelCase    :				Any = "."						)						->   dict:
   snake_case      		=					get_apod_data(__lowerCAmelCase						)
   snake_case      		=					apod_data["""url"""]
   snake_case      		=					img_url.split("""/"""						)[-1]
   snake_case      		=					requests.get(__lowerCAmelCase	,  stream=__lowerCAmelCase						)

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





def      __lowerCamelCase       (	__lowerCAmelCase    :				int						)						->   dict:
   snake_case      		=					"""https://images-api.nasa.gov/search"""
   return requests.get(__lowerCAmelCase	,  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


def 					_snake_case   (     A ,    A       )						->    list[int]:
							lowerCAmelCase__          =	{}
							for index, val in enumerate(A       ):
														lowerCAmelCase__          =	target - val
														if compl in chk_map:
																					return [chk_map[compl], index]
														lowerCAmelCase__          =	index
							return []


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		print(f"""{two_sum([2, 7, 11, 15], 9) = }""")