
from __future__ import annotations

import random





class 							UpperCAmelCase   :




	'''simple docstring'''





	snake_case_      					=  6






	def __init__( self      :				List[Any]				):
					__A         =				list(range(1							,Dice.NUM_SIDES + 1				)				)







	def        UpperCamelCase_						( self      :				Optional[Any]				):
					return random.choice(self.sides				)





def 		UpperCAmelCase    (			a_	,     a_ = 2		)	->			list[float]:







				"""simple docstring"""



				__A         =				[Dice() for i in range(a_		)]
				__A         =				[0] * (len(a_		) * Dice.NUM_SIDES + 1)
				for _ in range(a_		):
								count_of_sum[sum(dice.roll() for dice in dices		)] += 1
				__A         =				[round((count * 1_0_0) / num_throws	,     2		) for count in count_of_sum]
				return probability[num_dice:]  # remove probability of sums that never appear


if __name__ == "__main__":
					import doctest

					doctest.testmod()


from datetime import date

import requests

SCREAMING_SNAKE_CASE							:str											=       'https://api.carbonintensity.org.uk/intensity'


def 		UpperCAmelCase    (			)	->			str:







				"""simple docstring"""



				__A         =				requests.get(a_		).json()["data"][0]
				return last_half_hour["intensity"]["actual"]


def 		UpperCAmelCase    (			a_	,     a_		)	->			list:







				"""simple docstring"""



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


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