






import numpy as np





def 		A_			(		lowercase_	)							->int:







 """simple docstring"""

 SCREAMING_SNAKE_CASE							  =						np.exp(lowercase_	)

 # Add up the all the exponentials
 SCREAMING_SNAKE_CASE							  =						np.sum(lowercase_	)

 # Divide every exponent by the sum of all exponents
 SCREAMING_SNAKE_CASE							  =						exponent_vector / sum_of_exponents

 return softmax_vector


if __name__ == "__main__":
      print(softmax((0,)))












from datetime import date

import requests

__UpperCAmelCase      				=							"https://api.carbonintensity.org.uk/intensity"





def 		A_			(		)							->str:







 """simple docstring"""

 SCREAMING_SNAKE_CASE							  =						requests.get(lowercase_	).json()['data'][0]
 return last_half_hour["intensity"]["actual"]





def 		A_			(		lowercase_					,       lowercase_	)							->list:







 """simple docstring"""

 return requests.get(f'''{BASE_URL}/{start}/{end}'''	).json()["data"]


if __name__ == "__main__":
      for entry in fetch_from_to(start=date(2_0_2_0, 1_0, 1), end=date(2_0_2_0, 1_0, 3)):
            print("from {from} to {to}: {intensity[actual]}".format(**entry))
      print(f'{fetch_last_half_hour() = }')




