




from ...configuration_utils import PretrainedConfig
from ...utils import logging


__magic_name__  :  Dict					=       logging.get_logger(__name__)

__magic_name__  :  Optional[Any]					=       {
    """google/vivit-b-16x2-kinetics400""": (
        """https://huggingface.co/google/vivit-b-16x2-kinetics400/resolve/main/config.json"""
    ),
    # See all Vivit models at https://huggingface.co/models?filter=vivit
}





class     SCREAMING_SNAKE_CASE__		(_UpperCAmelCase			):
     lowercase_ :      List[str]				= "vivit"
     def __init__(						self	:		int       ,						__lowerCamelCase	:		Optional[int]=2_24       ,						__lowerCamelCase	:		str=32       ,						__lowerCamelCase	:		int=[2, 16, 16]       ,						__lowerCamelCase	:		str=3       ,						__lowerCamelCase	:		Any=7_68       ,						__lowerCamelCase	:		Any=12       ,						__lowerCamelCase	:		List[str]=12       ,						__lowerCamelCase	:		Optional[Any]=30_72       ,						__lowerCamelCase	:		str="gelu_fast"       ,						__lowerCamelCase	:		Union[str, Any]=0.0       ,						__lowerCamelCase	:		Dict=0.0       ,						__lowerCamelCase	:		int=0.02       ,						__lowerCamelCase	:		str=1e-06       ,						__lowerCamelCase	:		Any=True       ,						**__lowerCamelCase	:		Optional[int]       ,						):



       """simple docstring"""
       lowerCAmelCase__										=      hidden_size
       lowerCAmelCase__										=      num_hidden_layers
       lowerCAmelCase__										=      num_attention_heads
       lowerCAmelCase__										=      intermediate_size
       lowerCAmelCase__										=      hidden_act
       lowerCAmelCase__										=      hidden_dropout_prob
       lowerCAmelCase__										=      attention_probs_dropout_prob
       lowerCAmelCase__										=      initializer_range
       lowerCAmelCase__										=      layer_norm_eps

       lowerCAmelCase__										=      image_size
       lowerCAmelCase__										=      num_frames
       lowerCAmelCase__										=      tubelet_size
       lowerCAmelCase__										=      num_channels
       lowerCAmelCase__										=      qkv_bias

       super().__init__(**__lowerCamelCase						)








"""simple docstring"""





def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str     ):







      '''simple docstring'''




      lowerCAmelCase    		=			""""""
      for ch in key:
            if ch == " " or ch not in key_no_dups and ch.isalpha():
                  key_no_dups += ch
      return key_no_dups


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str     ):







      '''simple docstring'''




      lowerCAmelCase    		=			[chr(i + 65     ) for i in range(26     )]
      # Remove duplicate characters from key
      lowerCAmelCase    		=			remove_duplicates(key.upper()     )
      lowerCAmelCase    		=			len(SCREAMING_SNAKE_CASE     )
      # First fill cipher with key characters
      lowerCAmelCase    		=			{alphabet[i]: char for i, char in enumerate(SCREAMING_SNAKE_CASE     )}
      # Then map remaining characters in alphabet to
      # the alphabet from the beginning
      for i in range(len(SCREAMING_SNAKE_CASE     )				,		26     ):
            lowerCAmelCase    		=			alphabet[i - offset]
            # Ensure we are not mapping letters to letters previously mapped
            while char in key:
                  offset -= 1
                  lowerCAmelCase    		=			alphabet[i - offset]
            lowerCAmelCase    		=			char
      return cipher_alphabet


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str				,		SCREAMING_SNAKE_CASE	:		dict[str, str]     ):







      '''simple docstring'''




      return "".join(cipher_map.get(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     ) for ch in message.upper()     )


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str				,		SCREAMING_SNAKE_CASE	:		dict[str, str]     ):







      '''simple docstring'''




      lowerCAmelCase    		=			{v: k for k, v in cipher_map.items()}
      return "".join(rev_cipher_map.get(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     ) for ch in message.upper()     )


def      UpperCAmelCase__				(    ):







      '''simple docstring'''




      lowerCAmelCase    		=			input("""Enter message to encode or decode: """     ).strip()
      lowerCAmelCase    		=			input("""Enter keyword: """     ).strip()
      lowerCAmelCase    		=			input("""Encipher or decipher? E/D:"""     ).strip()[0].lower()
      try:
            lowerCAmelCase    		=			{"""e""": encipher, """d""": decipher}[option]
      except KeyError:
            raise KeyError("""invalid input option"""     )
      lowerCAmelCase    		=			create_cipher_map(SCREAMING_SNAKE_CASE     )
      print(func(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )     )


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()






