


"""simple docstring"""


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


A  :     Any    					=    logging.get_logger(__name__)

A  :     Any    					=    {"ctrl": "https://huggingface.co/ctrl/resolve/main/config.json"}
class 						_UpperCamelCase						(     lowerCAmelCase__	):
							'''simple docstring'''







							__UpperCAmelCase		:					Dict          ="""ctrl"""
							__UpperCAmelCase		:					Tuple          =["""past_key_values"""]
							__UpperCAmelCase		:					Optional[Any]          ={
							    """max_position_embeddings""": """n_positions""",
							    """hidden_size""": """n_embd""",
							    """num_attention_heads""": """n_head""",
							    """num_hidden_layers""": """n_layer""",
							}

							def __init__(  self					,     __a=24_65_34					,     __a=2_56					,     __a=12_80					,     __a=81_92					,     __a=48					,     __a=16					,     __a=0.1					,     __a=0.1					,     __a=1e-6					,     __a=0.0_2					,     __a=True					,     **__a					,     ):
										__lowerCAmelCase       					=    vocab_size
										__lowerCAmelCase       					=    n_positions
										__lowerCAmelCase       					=    n_embd
										__lowerCAmelCase       					=    n_layer
										__lowerCAmelCase       					=    n_head
										__lowerCAmelCase       					=    dff
										__lowerCAmelCase       					=    resid_pdrop
										__lowerCAmelCase       					=    embd_pdrop
										__lowerCAmelCase       					=    layer_norm_epsilon
										__lowerCAmelCase       					=    initializer_range

										__lowerCAmelCase       					=    use_cache

										super().__init__(**__a			)








"""simple docstring"""


import string


def _lowerCamelCase			(	_UpperCamelCase   ):

			'''simple docstring'''




			__lowerCAmelCase       					=    ""
			for i in sequence:
						__lowerCAmelCase       					=    ord(_UpperCamelCase   )
						if 65 <= extract <= 90:
									output += chr(155 - extract   )
						elif 97 <= extract <= 122:
									output += chr(219 - extract   )
						else:
									output += i
			return output


def _lowerCamelCase			(	_UpperCamelCase   ):

			'''simple docstring'''




			__lowerCAmelCase       					=    string.ascii_letters
			__lowerCAmelCase       					=    string.ascii_lowercase[::-1] + string.ascii_uppercase[::-1]
			return "".join(
			    letters_reversed[letters.index(_UpperCamelCase   )] if c in letters else c for c in sequence   )


def _lowerCamelCase			(	):

			'''simple docstring'''




			from timeit import timeit

			print("Running performance benchmarks..."   )
			__lowerCAmelCase       					=    "from string import printable ; from __main__ import atbash, atbash_slow"
			print(f"> atbash_slow(): {timeit('atbash_slow(printable)'					,				setup=_UpperCamelCase   )} seconds"   )
			print(f">      atbash(): {timeit('atbash(printable)'					,				setup=_UpperCamelCase   )} seconds"   )


if __name__ == "__main__":
	for example in ("ABCDEFGH", "123GGjj", "testStringtest", "with space"):
		print(f'''{example} encrypted in atbash: {atbash(example)}''')
	benchmark()




