



"""simple docstring"""

from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters




def __lowercase			(							):
    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_ :     int				=	Dataset.from_dict(_a    )
    return dataset






class        _UpperCAmelCase       (			lowerCAmelCase__):

 def 						_snake_case					(     self		:       int				):
     snake_case_ :     Any				=	get_dataset()
     snake_case_ :     List[Any]				=	make_duplicate_clusters(lowercase_  ,     0.85				)
     self.assertEqual(len(duplicate_clusters[0]				)  ,     2				)






 def 						_snake_case					(     self		:       Tuple				):
     snake_case_ :     Any				=	get_dataset()
     snake_case_,	snake_case_ :     List[str]				=	deduplicate_dataset(lowercase_				)
     self.assertEqual(len(lowercase_				)  ,     2				)
     print(lowercase_				)
     self.assertEqual(duplicate_clusters[0][0]['''copies''']  ,     2				)
     self.assertEqual(duplicate_clusters[0][0]['''is_extreme''']  ,     lowercase_				)










"""simple docstring"""

import numpy as np




def __lowercase			(							_a    ):
    return (2 / (1 + np.exp(-2 * vector    ))) - 1


if __name__ == "__main__":
     import doctest

     doctest.testmod()





