'''simple docstring'''




import math

def _lowercase	(      )					->       List[str]:





       """simple docstring"""


       __UpperCAmelCase  :				Optional[Any]       				=		input("Enter message: "						)
       __UpperCAmelCase  :				Dict       				=		int(input(f"""Enter key [2-{len(lowerCAmelCase__						) - 1}]: """						)						)
       __UpperCAmelCase  :				List[str]       				=		input("Encryption/Decryption [e/d]: "						)

       if mode.lower().startswith("e"						):
              __UpperCAmelCase  :				int       				=		encrypt_message(lowerCAmelCase__							,    lowerCAmelCase__						)
       elif mode.lower().startswith("d"						):
              __UpperCAmelCase  :				Union[str, Any]       				=		decrypt_message(lowerCAmelCase__							,    lowerCAmelCase__						)

       # Append pipe symbol (vertical bar) to identify spaces at the end.
       print(f"""Output:\n{text + '|'}"""						)

def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__						)					->       List[str]:





       """simple docstring"""


       __UpperCAmelCase  :				Optional[Any]       				=		[''] * key
       for col in range(lowerCAmelCase__						):
              __UpperCAmelCase  :				Optional[int]       				=		col
              while pointer < len(lowerCAmelCase__						):
                     cipher_text[col] += message[pointer]
                     pointer += key
       return "".join(lowerCAmelCase__						)

def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__						)					->       str:





       """simple docstring"""


       __UpperCAmelCase  :				Optional[int]       				=		math.ceil(len(lowerCAmelCase__						) / key						)
       __UpperCAmelCase  :				List[str]       				=		key
       __UpperCAmelCase  :				Optional[int]       				=		(num_cols * num_rows) - len(lowerCAmelCase__						)
       __UpperCAmelCase  :				List[str]       				=		[''] * num_cols
       __UpperCAmelCase  :				Any       				=		0
       __UpperCAmelCase  :				List[Any]       				=		0

       for symbol in message:
              plain_text[col] += symbol
              col += 1

              if (
                  (col == num_cols)
                  or (col == num_cols - 1)
                  and (row >= num_rows - num_shaded_boxes)
              ):
                     __UpperCAmelCase  :				str       				=		0
                     row += 1

       return "".join(lowerCAmelCase__						)


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()



'''simple docstring'''




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


_a   :	Any 							=   logging.get_logger(__name__)

_a   :	int 							=   {
    "facebook/s2t-wav2vec2-large-en-de": (
        "https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json"
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}






class 		__A       (__magic_name__   ):
       snake_case       :Optional[int]				    =					"speech_to_text_2"
       snake_case       :List[Any]				    =					["past_key_values"]
       snake_case       :str				    =					{"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}






       def __init__(      self				,     UpperCamelCase_=1_00_00				,     UpperCamelCase_=6				,     UpperCamelCase_=20_48				,     UpperCamelCase_=4				,     UpperCamelCase_=0.0				,     UpperCamelCase_=True				,     UpperCamelCase_="relu"				,     UpperCamelCase_=2_56				,     UpperCamelCase_=0.1				,     UpperCamelCase_=0.0				,     UpperCamelCase_=0.0				,     UpperCamelCase_=0.0_2				,     UpperCamelCase_=2				,     UpperCamelCase_=True				,     UpperCamelCase_=1				,     UpperCamelCase_=0				,     UpperCamelCase_=2				,     UpperCamelCase_=10_24				,     **UpperCamelCase_				,     ):
              __UpperCAmelCase  :				Any       				=		vocab_size
              __UpperCAmelCase  :				Optional[int]       				=		d_model
              __UpperCAmelCase  :				Tuple       				=		decoder_ffn_dim
              __UpperCAmelCase  :				List[str]       				=		decoder_layers
              __UpperCAmelCase  :				str       				=		decoder_attention_heads
              __UpperCAmelCase  :				Dict       				=		dropout
              __UpperCAmelCase  :				Optional[Any]       				=		attention_dropout
              __UpperCAmelCase  :				int       				=		activation_dropout
              __UpperCAmelCase  :				Dict       				=		activation_function
              __UpperCAmelCase  :				Tuple       				=		init_std
              __UpperCAmelCase  :				Any       				=		decoder_layerdrop
              __UpperCAmelCase  :				str       				=		use_cache
              __UpperCAmelCase  :				int       				=		decoder_layers
              __UpperCAmelCase  :				Any       				=		scale_embedding  # scale factor will be sqrt(d_model) if True
              __UpperCAmelCase  :				Union[str, Any]       				=		max_target_positions

              super().__init__(
                  pad_token_id=UpperCamelCase_				,     bos_token_id=UpperCamelCase_				,     eos_token_id=UpperCamelCase_				,     decoder_start_token_id=UpperCamelCase_				,     **UpperCamelCase_				,     )






