
UpperCAmelCase	      = '''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''






def 							UpperCAmelCase_		(							):
	lowercase       =    input('Enter message: '							)
	lowercase       =    input('Enter key [alphanumeric]: '							)
	lowercase       =    input('Encrypt/Decrypt [e/d]: '							)

	if mode.lower().startswith('e'							):
		lowercase       =    'encrypt'
		lowercase       =    encrypt_message(__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE							)
	elif mode.lower().startswith('d'							):
		lowercase       =    'decrypt'
		lowercase       =    decrypt_message(__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE							)

	print(F'''\n{mode.title()}ed message:'''							)
	print(__SCREAMING_SNAKE_CASE							)






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE							):
	return translate_message(__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE ,							'encrypt'							)






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE							):
	return translate_message(__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE ,							'decrypt'							)






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE							):
	lowercase       =    []
	lowercase       =    0
	lowercase       =    key.upper()

	for symbol in message:
		lowercase       =    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(__SCREAMING_SNAKE_CASE							)

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

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


if __name__ == "__main__":
	main()



import warnings

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


UpperCAmelCase	      = logging.get_logger(__name__)

UpperCAmelCase	      = {
    '''xlnet-base-cased''': '''https://huggingface.co/xlnet-base-cased/resolve/main/config.json''',
    '''xlnet-large-cased''': '''https://huggingface.co/xlnet-large-cased/resolve/main/config.json''',
}







class        A_   (			__lowerCamelCase   ):




	'''simple docstring'''


	_UpperCamelCase     :     Tuple							 =       """xlnet"""
	_UpperCamelCase     :     Optional[Any]							 =       ["""mems"""]
	_UpperCamelCase     :     Tuple							 =       {
	    """n_token""": """vocab_size""",  # Backward compatibility
	    """hidden_size""": """d_model""",
	    """num_attention_heads""": """n_head""",
	    """num_hidden_layers""": """n_layer""",
	}





	def __init__(       self		,    snake_case=3_2000		,    snake_case=1024		,    snake_case=24		,    snake_case=16		,    snake_case=4096		,    snake_case="gelu"		,    snake_case=True		,    snake_case="bi"		,    snake_case=0.02		,    snake_case=1E-12		,    snake_case=0.1		,    snake_case=512		,    snake_case=None		,    snake_case=True		,    snake_case=False		,    snake_case=False		,    snake_case=-1		,    snake_case=False		,    snake_case="last"		,    snake_case=True		,    snake_case="tanh"		,    snake_case=0.1		,    snake_case=5		,    snake_case=5		,    snake_case=5		,    snake_case=1		,    snake_case=2		,    **snake_case		,    ):
		lowercase       =    vocab_size
		lowercase       =    d_model
		lowercase       =    n_layer
		lowercase       =    n_head
		if d_model % n_head != 0:
			raise ValueError(F'''\'d_model % n_head\' ({d_model % n_head}) should be equal to 0'''       )
		if "d_head" in kwargs:
			if kwargs["d_head"] != d_model // n_head:
				raise ValueError(
				    F'''`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})'''       )
		lowercase       =    d_model // n_head
		lowercase       =    ff_activation
		lowercase       =    d_inner
		lowercase       =    untie_r
		lowercase       =    attn_type

		lowercase       =    initializer_range
		lowercase       =    layer_norm_eps

		lowercase       =    dropout
		lowercase       =    mem_len
		lowercase       =    reuse_len
		lowercase       =    bi_data
		lowercase       =    clamp_len
		lowercase       =    same_length

		lowercase       =    summary_type
		lowercase       =    summary_use_proj
		lowercase       =    summary_activation
		lowercase       =    summary_last_dropout
		lowercase       =    start_n_top
		lowercase       =    end_n_top

		lowercase       =    bos_token_id
		lowercase       =    pad_token_id
		lowercase       =    eos_token_id

		if "use_cache" in kwargs:
			warnings.warn(
			    'The `use_cache` argument is deprecated and will be removed in a future version, use `use_mems_eval`'
			    ' instead.'		,    snake_case		,    )
			lowercase       =    kwargs['use_cache']

		lowercase       =    use_mems_eval
		lowercase       =    use_mems_train
		super().__init__(pad_token_id=snake_case		,    bos_token_id=snake_case		,    eos_token_id=snake_case		,    **snake_case       )





	@property
	def 	SCREAMING_SNAKE_CASE__						(       self       ):
		logger.info(F'''The model {self.model_type} is one of the few models that has no sequence length limit.'''       )
		return -1





	@max_position_embeddings.setter
	def 	SCREAMING_SNAKE_CASE__						(       self		,    snake_case       ):
		# Message copied from Transformer-XL documentation
		raise NotImplementedError(
		    F'''The model {self.model_type} is one of the few models that has no sequence length limit.'''       )

