


"""simple docstring"""



import math
import unittest






def       lowerCamelCase					(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 					__magic_name__		(			unittest.TestCase     ):






       def  __snake_case						(   self  :    Any				):

              '''simple docstring'''






              self.assertTrue(is_prime(2				)				)
              self.assertTrue(is_prime(3				)				)
              self.assertTrue(is_prime(5				)				)
              self.assertTrue(is_prime(7				)				)
              self.assertTrue(is_prime(1_1				)				)
              self.assertTrue(is_prime(1_3				)				)
              self.assertTrue(is_prime(1_7				)				)
              self.assertTrue(is_prime(1_9				)				)
              self.assertTrue(is_prime(2_3				)				)
              self.assertTrue(is_prime(2_9				)				)







       def  __snake_case						(   self  :    Union[str, Any]				):

              '''simple docstring'''






              with self.assertRaises(snake_case__				):
                     is_prime(-1_9				)
              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"""



from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCAmelCase      		=			logging.get_logger(__name__)

UpperCAmelCase      		=			{
    '''facebook/deit-base-distilled-patch16-224''': (
        '''https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'''
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}
class 					__magic_name__		(			__UpperCAmelCase     ):
       __A			:      Tuple        =   "deit"






       def __init__(   self  :    List[str]  ,     snake_case__  :    int=7_6_8  ,     snake_case__  :    List[Any]=1_2  ,     snake_case__  :    Dict=1_2  ,     snake_case__  :    List[Any]=3_0_7_2  ,     snake_case__  :    Optional[int]="gelu"  ,     snake_case__  :    Dict=0.0  ,     snake_case__  :    str=0.0  ,     snake_case__  :    List[str]=0.02  ,     snake_case__  :    Optional[int]=1e-1_2  ,     snake_case__  :    Any=2_2_4  ,     snake_case__  :    Optional[int]=1_6  ,     snake_case__  :    int=3  ,     snake_case__  :    str=True  ,     snake_case__  :    Optional[int]=1_6  ,     **snake_case__  :    List[Any]  ,     ):

              '''simple docstring'''






              super().__init__(**snake_case__				)

              lowercase		:List[str]       							=				hidden_size
              lowercase		:Union[str, Any]       							=				num_hidden_layers
              lowercase		:Optional[Any]       							=				num_attention_heads
              lowercase		:Optional[Any]       							=				intermediate_size
              lowercase		:int       							=				hidden_act
              lowercase		:int       							=				hidden_dropout_prob
              lowercase		:Dict       							=				attention_probs_dropout_prob
              lowercase		:Optional[int]       							=				initializer_range
              lowercase		:Tuple       							=				layer_norm_eps
              lowercase		:Optional[int]       							=				image_size
              lowercase		:Union[str, Any]       							=				patch_size
              lowercase		:Optional[Any]       							=				num_channels
              lowercase		:Tuple       							=				qkv_bias
              lowercase		:Optional[Any]       							=				encoder_stride







class 					__magic_name__		(			__UpperCAmelCase     ):
       __A			:      Optional[int]        =   version.parse("1.11"     )






       @property
       def  __snake_case						(   self  :    int				):

              '''simple docstring'''






              return OrderedDict(
                  [
                      ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
                  ]				)







       @property
       def  __snake_case						(   self  :    Optional[int]				):

              '''simple docstring'''






              return 1e-4

