



'''simple docstring'''
import shutil

import requests






def A__					(  UpperCAmelCase_						,						UpperCAmelCase_ = False						,						UpperCAmelCase_ = "."							):
						_UpperCamelCase      :	str				       =     'https://api.nasa.gov/planetary/apod'
						return requests.get(UpperCAmelCase_						,						params={'api_key': api_key}							).json()






def A__					(  UpperCAmelCase_						,						UpperCAmelCase_ = "."							):
						_UpperCamelCase      :	str				       =     get_apod_data(UpperCAmelCase_							)
						_UpperCamelCase      :	List[str]				       =     apod_data['url']
						_UpperCamelCase      :	Union[str, Any]				       =     img_url.split('/'							)[-1]
						_UpperCamelCase      :	Union[str, Any]				       =     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 A__					(  UpperCAmelCase_							):
						_UpperCamelCase      :	str				       =     'https://images-api.nasa.gov/search'
						return requests.get(UpperCAmelCase_						,						params={'q': query}							).json()


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







'''simple docstring'''
import math






def A__					(  UpperCAmelCase_							):

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or number % 2 == 0 or number % 3 == 0:
												# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
												return False

						# All primes number are in format of 6k +/- 1
						for i in range(5						,						int(math.sqrt(UpperCAmelCase_							) + 1							)						,						6							):
												if number % i == 0 or number % (i + 2) == 0:
																		return False
						return True






def A__					(  UpperCAmelCase_ = 1_0_0_0						,						UpperCAmelCase_ = 1_0_0_0							):
						_UpperCamelCase      :	str				       =     [0, 0, 0]  # length, a, b
						for a in range((a_limit * -1) + 1						,						UpperCAmelCase_							):
												for b in range(2						,						UpperCAmelCase_							):
																		if is_prime(UpperCAmelCase_							):
																								_UpperCamelCase      :	List[str]				       =     0
																								_UpperCamelCase      :	Union[str, Any]				       =     0
																								while is_prime((n**2) + (a * n) + b							):
																														count += 1
																														n += 1
																								if count > longest[0]:
																														_UpperCamelCase      :	Any				       =     [count, a, b]
						_UpperCamelCase      :	Dict				       =     longest[1] * longest[2]
						return ans


if __name__ == "__main__":
					print(solution(1000, 1000))


