
"""simple docstring"""

def 							A						(    snake_case				:int    , snake_case				:int		)				->     str:
 if a < 0 or b < 0:
  raise ValueError('the value of both inputs must be positive'		)
 __UpperCamelCase      =	str(bin(snake_case		)		)[2:]  # remove the leading "0b"
 __UpperCamelCase      =	str(bin(snake_case		)		)[2:]
 __UpperCamelCase      =	max(len(snake_case		)    , len(snake_case		)		)
 return "0b" + "".join(
     str(int('1' in (char_a, char_b)		)		)
     for char_a, char_b in zip(a_binary.zfill(snake_case		)    , b_binary.zfill(snake_case		)		)		)


if __name__ == "__main__":
      import doctest

      doctest.testmod()





"""simple docstring"""

from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters






def 							A						(    )				->     Any:
 __UpperCamelCase      =	{
     'repo_name': ['test_repo1', 'test_repo2', 'test_repo3'],
     'path': ['test_1.py', 'test_2.py', 'unit_test.py'],
     'content': ['a ' * 2_0, 'a ' * 3_0, 'b ' * 7],
 }
 __UpperCamelCase      =	Dataset.from_dict(snake_case		)
 return dataset





class __lowerCAmelCase		(				__SCREAMING_SNAKE_CASE      ):





     def 						UpperCAmelCase (     self				):

      '''simple docstring'''




      __UpperCamelCase      =	get_dataset()
      __UpperCamelCase      =	make_duplicate_clusters(__UpperCAmelCase     ,					0.8_5				)
      self.assertEqual(len(duplicate_clusters[0]				)     ,					2				)







     def 						UpperCAmelCase (     self				):

      '''simple docstring'''




      __UpperCamelCase      =	get_dataset()
      __UpperCamelCase  ,     __UpperCamelCase      =	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				)



