






lowerCamelCase			:					str         =	'''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''

def       __lowerCAmelCase      (						):
     __lowerCAmelCase								=					input("Enter message: "       )
     __lowerCAmelCase								=					input("Enter key [alphanumeric]: "       )
     __lowerCAmelCase								=					input("Encrypt/Decrypt [e/d]: "       )

     if mode.lower().startswith("e"       ):
          __lowerCAmelCase								=					"""encrypt"""
          __lowerCAmelCase								=					encrypt_message(_lowerCamelCase					, _lowerCamelCase       )
     elif mode.lower().startswith("d"       ):
          __lowerCAmelCase								=					"""decrypt"""
          __lowerCAmelCase								=					decrypt_message(_lowerCamelCase					, _lowerCamelCase       )

     print(F"""\n{mode.title()}ed message:"""       )
     print(_lowerCamelCase       )

def       __lowerCAmelCase      (						__snake_case					, __snake_case       ):
     return translate_message(_lowerCamelCase					, _lowerCamelCase					, "encrypt"       )

def       __lowerCAmelCase      (						__snake_case					, __snake_case       ):
     return translate_message(_lowerCamelCase					, _lowerCamelCase					, "decrypt"       )

def       __lowerCAmelCase      (						__snake_case					, __snake_case					, __snake_case       ):
     __lowerCAmelCase								=					[]
     __lowerCAmelCase								=					0
     __lowerCAmelCase								=					key.upper()

     for symbol in message:
          __lowerCAmelCase								=					LETTERS.find(symbol.upper()       )
          if num != -1:
               if mode == "encrypt":
                    num += LETTERS.find(key[key_index]       )
               elif mode == "decrypt":
                    num -= LETTERS.find(key[key_index]       )

               num %= len(_lowerCamelCase       )

               if symbol.isupper():
                    translated.append(LETTERS[num]       )
               elif symbol.islower():
                    translated.append(LETTERS[num].lower()       )

               key_index += 1
               if key_index == len(_lowerCamelCase       ):
                    __lowerCAmelCase								=					0
          else:
               translated.append(_lowerCamelCase       )
     return "".join(_lowerCamelCase       )


if __name__ == "__main__":
 main()














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


lowerCamelCase			:					int         =	logging.get_logger(__name__)

lowerCamelCase			:					Tuple         =	{
    '''caidas/swin2sr-classicalsr-x2-64''': (
        '''https://huggingface.co/caidas/swin2sr-classicalsr-x2-64/resolve/main/config.json'''
    ),
}



class 							_UpperCamelCase			(a_			):
      snake_case_  =							"""swin2sr"""

      snake_case_  =							{
          """hidden_size""": """embed_dim""",
          """num_attention_heads""": """num_heads""",
          """num_hidden_layers""": """num_layers""",
      }


      def __init__(	self					,						__UpperCamelCase=6_4					,						__UpperCamelCase=1					,						__UpperCamelCase=3					,						__UpperCamelCase=1_8_0					,						__UpperCamelCase=[6, 6, 6, 6, 6, 6]					,						__UpperCamelCase=[6, 6, 6, 6, 6, 6]					,						__UpperCamelCase=8					,						__UpperCamelCase=2.0					,						__UpperCamelCase=True					,						__UpperCamelCase=0.0					,						__UpperCamelCase=0.0					,						__UpperCamelCase=0.1					,						__UpperCamelCase="gelu"					,						__UpperCamelCase=False					,						__UpperCamelCase=0.0_2					,						__UpperCamelCase=1e-5					,						__UpperCamelCase=2					,						__UpperCamelCase=1.0					,						__UpperCamelCase="1conv"					,						__UpperCamelCase="pixelshuffle"					,						**__UpperCamelCase					,						)->	Tuple:
           super().__init__(**__UpperCamelCase	)

           __lowerCAmelCase								=					image_size
           __lowerCAmelCase								=					patch_size
           __lowerCAmelCase								=					num_channels
           __lowerCAmelCase								=					embed_dim
           __lowerCAmelCase								=					depths
           __lowerCAmelCase								=					len(__UpperCamelCase	)
           __lowerCAmelCase								=					num_heads
           __lowerCAmelCase								=					window_size
           __lowerCAmelCase								=					mlp_ratio
           __lowerCAmelCase								=					qkv_bias
           __lowerCAmelCase								=					hidden_dropout_prob
           __lowerCAmelCase								=					attention_probs_dropout_prob
           __lowerCAmelCase								=					drop_path_rate
           __lowerCAmelCase								=					hidden_act
           __lowerCAmelCase								=					use_absolute_embeddings
           __lowerCAmelCase								=					layer_norm_eps
           __lowerCAmelCase								=					initializer_range
           __lowerCAmelCase								=					upscale
           __lowerCAmelCase								=					img_range
           __lowerCAmelCase								=					resi_connection
           __lowerCAmelCase								=					upsampler






