



"""simple docstring"""


import string

def  _lowerCAmelCase      (   lowercase_						):
						UpperCAmelCase             = ''
						for i in sequence:
												UpperCAmelCase             = ord(lowercase_						)
												if 65 <= extract <= 90:
																		output += chr(155 - extract						)
												elif 97 <= extract <= 122:
																		output += chr(219 - extract						)
												else:
																		output += i
						return output

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

def  _lowerCAmelCase      (   ):
						from timeit import timeit

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


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













"""simple docstring"""






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


UpperCAmelCase_   : Optional[int]   			= logging.get_logger(__name__)

UpperCAmelCase_   : Any   			= {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}




class 							lowerCAmelCase__				(			UpperCAmelCase__ ):






      '''simple docstring'''

      __UpperCamelCase	 =  "openai-gpt"
      __UpperCamelCase	 =  {
          "max_position_embeddings": "n_positions",
          "hidden_size": "n_embd",
          "num_attention_heads": "n_head",
          "num_hidden_layers": "n_layer",
      }
      def __init__(						self     :  List[str]						,	lowercase_     :  List[str]=40478						,	lowercase_     :  List[str]=512						,	lowercase_     :  Optional[Any]=768						,	lowercase_     :  Tuple=12						,	lowercase_     :  Tuple=12						,	lowercase_     :  Union[str, Any]="gelu"						,	lowercase_     :  List[Any]=0.1						,	lowercase_     :  Tuple=0.1						,	lowercase_     :  List[Any]=0.1						,	lowercase_     :  List[Any]=1e-5						,	lowercase_     :  int=0.02						,	lowercase_     :  Optional[int]="cls_index"						,	lowercase_     :  Any=True						,	lowercase_     :  List[Any]=None						,	lowercase_     :  List[str]=True						,	lowercase_     :  Optional[Any]=0.1						,	**lowercase_     :  List[str]						,	):




          '''simple docstring'''


          SCREAMING_SNAKE_CASE_      :  Optional[int]    						=		vocab_size
          SCREAMING_SNAKE_CASE_      :  Tuple    						=		n_positions
          SCREAMING_SNAKE_CASE_      :  Optional[int]    						=		n_embd
          SCREAMING_SNAKE_CASE_      :  Dict    						=		n_layer
          SCREAMING_SNAKE_CASE_      :  Any    						=		n_head
          SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		afn
          SCREAMING_SNAKE_CASE_      :  int    						=		resid_pdrop
          SCREAMING_SNAKE_CASE_      :  List[str]    						=		embd_pdrop
          SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		attn_pdrop
          SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		layer_norm_epsilon
          SCREAMING_SNAKE_CASE_      :  List[Any]    						=		initializer_range
          SCREAMING_SNAKE_CASE_      :  List[str]    						=		summary_type
          SCREAMING_SNAKE_CASE_      :  Tuple    						=		summary_use_proj
          SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		summary_activation
          SCREAMING_SNAKE_CASE_      :  Any    						=		summary_first_dropout
          SCREAMING_SNAKE_CASE_      :  List[str]    						=		summary_proj_to_labels
          super().__init__(**lowercase_)


