
"""simple docstring"""


from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters






def       _snake_case				(		):
	A						   =   {
	    '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],
	}
	A						   =   Dataset.from_dict(snake_case__     )
	return dataset







class 				lowerCAmelCase_				(      _lowercase    ):



						'''simple docstring'''


						def 						_SCREAMING_SNAKE_CASE      ( self     :      List[Any]      )     ->   int:
							A						   =   get_dataset()
							A						   =   make_duplicate_clusters(A_  ,0.85      )
							self.assertEqual(len(duplicate_clusters[0]      )  ,2      )




						def 						_SCREAMING_SNAKE_CASE      ( self     :      str      )     ->   Optional[Any]:
							A						   =   get_dataset()
							A   ,      A						   =   deduplicate_dataset(A_      )
							self.assertEqual(len(A_      )  ,2      )
							print(A_      )
							self.assertEqual(duplicate_clusters[0][0]['copies']  ,2      )
							self.assertEqual(duplicate_clusters[0][0]['is_extreme']  ,A_      )

"""simple docstring"""


def       _snake_case				(		snake_case__   :     list	,      snake_case__   :     list	,      snake_case__   :     int     ):
	A						   =   len(snake_case__     )
	A						   =   [[0] * n for i in range(snake_case__     )]
	for i in range(snake_case__     ):
		A						   =   y_points[i]

	for i in range(2	,      snake_case__     ):
		for j in range(snake_case__	,      snake_case__     ):
			A						   =   (
			    (xa - x_points[j - i + 1]) * q[j][i - 1]
			    - (xa - x_points[j]) * q[j - 1][i - 1]
			) / (x_points[j] - x_points[j - i + 1])

	return [q[n - 1][n - 1], q]


if __name__ == "__main__":
		import doctest

		doctest.testmod()