

"""simple docstring"""




from itertools import product

def 	A       (     snake_case__		,				snake_case__    ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__								=      sides_number
			SCREAMING_SNAKE_CASE__								=      max_face_number * dice_number
			SCREAMING_SNAKE_CASE__								=      [0] * (max_total + 1)

			SCREAMING_SNAKE_CASE__								=      1
			SCREAMING_SNAKE_CASE__								=      range(snake_case__		,				max_face_number + 1    )
			for dice_numbers in product(snake_case__		,				repeat=snake_case__    ):
						SCREAMING_SNAKE_CASE__								=      sum(snake_case__    )
						totals_frequencies[total] += 1

			return totals_frequencies

def 	A       (     ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__								=      total_frequency_distribution(
			    sides_number=4		,				dice_number=9    )
			SCREAMING_SNAKE_CASE__								=      total_frequency_distribution(
			    sides_number=6		,				dice_number=6    )

			SCREAMING_SNAKE_CASE__								=      0
			SCREAMING_SNAKE_CASE__								=      9
			SCREAMING_SNAKE_CASE__								=      4 * 9
			SCREAMING_SNAKE_CASE__								=      6
			for peter_total in range(snake_case__		,				max_peter_total + 1    ):
						peter_wins_count += peter_totals_frequencies[peter_total] * sum(
						    colin_totals_frequencies[min_colin_total:peter_total]    )

			SCREAMING_SNAKE_CASE__								=      (4**9) * (6**6)
			SCREAMING_SNAKE_CASE__								=      peter_wins_count / total_games_number

			SCREAMING_SNAKE_CASE__								=      round(snake_case__		,				ndigits=7    )

			return rounded_peter_win_probability


if __name__ == "__main__":
						print(F'{solution() = }')







"""simple docstring"""




import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline

@pytest.mark.integration
def 	A       (     ):




			'''simple docstring'''


			with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT    ):
						with pytest.raises(snake_case__    ):
									requests.request("""GET"""		,				"""https://huggingface.co"""    )
						with pytest.raises(requests.exceptions.ConnectTimeout    ):
									requests.request("""GET"""		,				"""https://huggingface.co"""		,				timeout=1.0    )

@pytest.mark.integration
def 	A       (     ):




			'''simple docstring'''


			with offline(OfflineSimulationMode.CONNECTION_FAILS    ):
						with pytest.raises(requests.exceptions.ConnectionError    ):
									requests.request("""GET"""		,				"""https://huggingface.co"""    )




def 	A       (     ):




			'''simple docstring'''


			with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1    ):
						with pytest.raises(snake_case__    ):
									http_head("""https://huggingface.co"""    )


