



import shutil

import requests


def 						UpperCAmelCase__   (   UpperCAmelCase__			:str			,       UpperCAmelCase__			:bool = False			,       UpperCAmelCase__			:str = "."       ):






 '''simple docstring'''

 a							=		"https://api.nasa.gov/planetary/apod"
 return requests.get(UpperCAmelCase__			,       params={"api_key": api_key}       ).json()


def 						UpperCAmelCase__   (   UpperCAmelCase__			:str			,       UpperCAmelCase__			:str = "."       ):






 '''simple docstring'''

 a							=		get_apod_data(UpperCAmelCase__       )
 a							=		apod_data["url"]
 a							=		img_url.split("/"       )[-1]
 a							=		requests.get(UpperCAmelCase__			,       stream=UpperCAmelCase__       )

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


def 						UpperCAmelCase__   (   UpperCAmelCase__			:str       ):






 '''simple docstring'''

 a							=		"https://images-api.nasa.gov/search"
 return requests.get(UpperCAmelCase__			,       params={"q": query}       ).json()


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






from collections import Counter


def 						UpperCAmelCase__   (   UpperCAmelCase__			:list[int]       ):






 '''simple docstring'''

 return sum(socks_by_color // 2 for socks_by_color in Counter(UpperCAmelCase__       ).values()       )


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     A_		:  List[str]										=  [int(x) for x in input('''Enter socks by color :''').rstrip().split()]
     print(F"""sock_merchant({colors}) = {sock_merchant(colors)}""")

