


'''simple docstring'''







import math
import unittest

def    __UpperCamelCase	(	a    : int     ) ->bool:
 assert isinstance(a					,   a     ) and (
     number >= 0
 ), "'number' must been an int and positive"

 if 1 < number < 4:
  # 2 and 3 are primes
  return True
 elif number < 2 or number % 2 == 0 or number % 3 == 0:
  # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
  return False

 # All primes number are in format of 6k +/- 1
 for i in range(5					,   int(math.sqrt(a     ) + 1     )					,   6     ):
  if number % i == 0 or number % (i + 2) == 0:
   return False
 return True
class 			_lowercase						(       unittest.TestCase					):







     def     UpperCamelCase			( self    ) ->	List[Any]:
      self.assertTrue(is_prime(2    )    )
      self.assertTrue(is_prime(3    )    )
      self.assertTrue(is_prime(5    )    )
      self.assertTrue(is_prime(7    )    )
      self.assertTrue(is_prime(11    )    )
      self.assertTrue(is_prime(13    )    )
      self.assertTrue(is_prime(17    )    )
      self.assertTrue(is_prime(19    )    )
      self.assertTrue(is_prime(23    )    )
      self.assertTrue(is_prime(29    )    )







     def     UpperCamelCase			( self    ) ->	str:
      with self.assertRaises(A__    ):
       is_prime(-19    )
      self.assertFalse(
          is_prime(0    )    ,   '''Zero doesn\'t have any positive factors, primes must have exactly two.'''    ,   )
      self.assertFalse(
          is_prime(1    )    ,   '''One only has 1 positive factor, primes must have exactly two.'''    ,   )
      self.assertFalse(is_prime(2 * 2    )    )
      self.assertFalse(is_prime(2 * 3    )    )
      self.assertFalse(is_prime(3 * 3    )    )
      self.assertFalse(is_prime(3 * 5    )    )
      self.assertFalse(is_prime(3 * 5 * 7    )    )


if __name__ == "__main__":
   unittest.main()








'''simple docstring'''







import inspect
import re
from hashlib import shaaaa
from typing import Dict, List

from .arrow import arrow
from .audiofolder import audiofolder
from .csv import csv
from .imagefolder import imagefolder
from .json import json
from .pandas import pandas
from .parquet import parquet
from .sql import sql  # noqa F401
from .text import text

def    __UpperCamelCase	(	a    : List[str]     ) ->str:
 snake_case				=			[]
 for line in lines:
  snake_case				=			re.sub(R'''#.*'''					,   ''''''					,   a     )  # remove comments
  if line:
   filtered_lines.append(a     )
 snake_case				=			'''\n'''.join(a     )

 # Make a hash from all this code
 snake_case				=			full_str.encode('''utf-8'''     )
 return shaaaa(a     ).hexdigest()


# get importable module names and hash for caching
_lowercase       						=			{
    'csv': (csv.__name__, _hash_python_lines(inspect.getsource(csv).splitlines())),
    'json': (json.__name__, _hash_python_lines(inspect.getsource(json).splitlines())),
    'pandas': (pandas.__name__, _hash_python_lines(inspect.getsource(pandas).splitlines())),
    'parquet': (parquet.__name__, _hash_python_lines(inspect.getsource(parquet).splitlines())),
    'arrow': (arrow.__name__, _hash_python_lines(inspect.getsource(arrow).splitlines())),
    'text': (text.__name__, _hash_python_lines(inspect.getsource(text).splitlines())),
    'imagefolder': (imagefolder.__name__, _hash_python_lines(inspect.getsource(imagefolder).splitlines())),
    'audiofolder': (audiofolder.__name__, _hash_python_lines(inspect.getsource(audiofolder).splitlines())),
}

# Used to infer the module to use based on the data files extensions
_lowercase       						=			{
    '.csv': ('csv', {}),
    '.tsv': ('csv', {'sep': '\t'}),
    '.json': ('json', {}),
    '.jsonl': ('json', {}),
    '.parquet': ('parquet', {}),
    '.arrow': ('arrow', {}),
    '.txt': ('text', {}),
}
_EXTENSION_TO_MODULE.update({ext: ('imagefolder', {}) for ext in imagefolder.ImageFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext.upper(): ('imagefolder', {}) for ext in imagefolder.ImageFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext: ('audiofolder', {}) for ext in audiofolder.AudioFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext.upper(): ('audiofolder', {}) for ext in audiofolder.AudioFolder.EXTENSIONS})
_lowercase       						=			{'imagefolder', 'audiofolder'}

# Used to filter data files based on extensions given a module name
_lowercase       						=			{}
for _ext, (_module, _) in _EXTENSION_TO_MODULE.items():
   _MODULE_TO_EXTENSIONS.setdefault(_module, []).append(_ext)

_MODULE_TO_EXTENSIONS["imagefolder"].append('.zip')






_MODULE_TO_EXTENSIONS["audiofolder"].append('.zip')

