





from itertools import product


def     lowerCamelCase_	(      lowerCAmelCase:	int    ,							lowerCAmelCase:	int				)->		list[int]:
  _snake_case   :				int														=	sides_number
  _snake_case   :				Any														=	max_face_number * dice_number
  _snake_case   :				Optional[Any]														=	[0] * (max_total + 1)

  _snake_case   :				Optional[Any]														=	1
  _snake_case   :				Optional[int]														=	range(lowerCAmelCase    ,							max_face_number + 1				)
  for dice_numbers in product(lowerCAmelCase    ,							repeat=lowerCAmelCase				):
    _snake_case   :				List[Any]														=	sum(lowerCAmelCase				)
    totals_frequencies[total] += 1

  return totals_frequencies


def     lowerCamelCase_	(      )->		float:
  _snake_case   :				str														=	total_frequency_distribution(
      sides_number=4    ,							dice_number=9				)
  _snake_case   :				int														=	total_frequency_distribution(
      sides_number=6    ,							dice_number=6				)

  _snake_case   :				str														=	0
  _snake_case   :				int														=	9
  _snake_case   :				int														=	4 * 9
  _snake_case   :				Union[str, Any]														=	6
  for peter_total in range(lowerCAmelCase    ,							max_peter_total + 1				):
    peter_wins_count += peter_totals_frequencies[peter_total] * sum(
        colin_totals_frequencies[min_colin_total:peter_total]				)

  _snake_case   :				List[str]														=	(4**9) * (6**6)
  _snake_case   :				str														=	peter_wins_count / total_games_number

  _snake_case   :				Optional[Any]														=	round(lowerCAmelCase    ,							ndigits=7				)

  return rounded_peter_win_probability


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











from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters


def     lowerCamelCase_	(      )->		Any:
  _snake_case   :				List[str]														=	{
      'repo_name': ['test_repo1', 'test_repo2', 'test_repo3'],
      'path': ['test_1.py', 'test_2.py', 'unit_test.py'],
      'content': ['a ' * 20, 'a ' * 30, 'b ' * 7],
  }
  _snake_case   :				Optional[Any]														=	Dataset.from_dict(lowerCAmelCase				)
  return dataset







class        _lowerCAmelCase    (			UpperCAmelCase_							):


  '''simple docstring'''







  def UpperCamelCase_ (      self      :					Dict							):


    '''simple docstring'''





    _snake_case   :				Union[str, Any]														=	get_dataset()
    _snake_case   :				Tuple														=	make_duplicate_clusters(UpperCamelCase      ,				0.85							)
    self.assertEqual(len(duplicate_clusters[0]							)      ,				2							)







  def UpperCamelCase_ (      self      :					Dict							):


    '''simple docstring'''





    _snake_case   :				List[str]														=	get_dataset()
    _snake_case							,					_snake_case   :				str														=	deduplicate_dataset(UpperCamelCase							)
    self.assertEqual(len(UpperCamelCase							)      ,				2							)
    print(UpperCamelCase							)
    self.assertEqual(duplicate_clusters[0][0]['copies']      ,				2							)
    self.assertEqual(duplicate_clusters[0][0]['is_extreme']      ,				UpperCamelCase							)




