





UpperCamelCase__											= {
    "A": ".-", "B": "-...", "C": "-.-.", "D": "-..", "E": ".", "F": "..-.", "G": "--.",
    "H": "....", "I": "..", "J": ".---", "K": "-.-", "L": ".-..", "M": "--", "N": "-.",
    "O": "---", "P": ".--.", "Q": "--.-", "R": ".-.", "S": "...", "T": "-", "U": "..-",
    "V": "...-", "W": ".--", "X": "-..-", "Y": "-.--", "Z": "--..", "1": ".----",
    "2": "..---", "3": "...--", "4": "....-", "5": ".....", "6": "-....", "7": "--...",
    "8": "---..", "9": "----.", "0": "-----", "&": ".-...", "@": ".--.-.",
    ":": "---...", ",": "--..--", ".": ".-.-.-", "'": ".----.", "\"": ".-..-.",
    "?": "..--..", "/": "-..-.", "=": "-...-", "+": ".-.-.", "-": "-....-",
    "(": "-.--.", ")": "-.--.-", "!": "-.-.--", " ": "/"
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
UpperCamelCase__											= {value: key for key, value in MORSE_CODE_DICT.items()}





def     _UpperCamelCase     (a__   :str       ):






							"""simple docstring"""





							return " ".join(MORSE_CODE_DICT[char] for char in message.upper()       )





def     _UpperCamelCase     (a__   :str       ):






							"""simple docstring"""





							return "".join(REVERSE_DICT[char] for char in message.split()       )





def     _UpperCamelCase     ():






							"""simple docstring"""





							UpperCamelCase__				     =			"""Morse code here!"""
							print(a__       )
							UpperCamelCase__				     =			encrypt(a__       )
							print(a__       )
							UpperCamelCase__				     =			decrypt(a__       )
							print(a__       )


if __name__ == "__main__":
					main()











import unittest

from transformers import AutoConfig, AutoTokenizer, BertConfig, TensorType, is_flax_available
from transformers.testing_utils import DUMMY_UNKNOWN_IDENTIFIER, require_flax, slow


if is_flax_available():
					import jax

					from transformers.models.auto.modeling_flax_auto import FlaxAutoModel
					from transformers.models.bert.modeling_flax_bert import FlaxBertModel
					from transformers.models.roberta.modeling_flax_roberta import FlaxRobertaModel

@require_flax
class        __SCREAMING_SNAKE_CASE					(     unittest.TestCase       ):






							@slow
							def 				_lowerCamelCase		(						self  ):
														for model_name in ["bert-base-cased", "bert-large-uncased"]:
																					with self.subTest(__lowerCAmelCase  ):
																												UpperCamelCase__				     =			AutoConfig.from_pretrained(__lowerCAmelCase  )
																												self.assertIsNotNone(__lowerCAmelCase  )
																												self.assertIsInstance(__lowerCAmelCase  , __lowerCAmelCase  )

																												UpperCamelCase__				     =			FlaxAutoModel.from_pretrained(__lowerCAmelCase  )
																												self.assertIsNotNone(__lowerCAmelCase  )
																												self.assertIsInstance(__lowerCAmelCase  , __lowerCAmelCase  )






							@slow
							def 				_lowerCamelCase		(						self  ):
														for model_name in ["roberta-base", "roberta-large"]:
																					with self.subTest(__lowerCAmelCase  ):
																												UpperCamelCase__				     =			AutoConfig.from_pretrained(__lowerCAmelCase  )
																												self.assertIsNotNone(__lowerCAmelCase  )
																												self.assertIsInstance(__lowerCAmelCase  , __lowerCAmelCase  )

																												UpperCamelCase__				     =			FlaxAutoModel.from_pretrained(__lowerCAmelCase  )
																												self.assertIsNotNone(__lowerCAmelCase  )
																												self.assertIsInstance(__lowerCAmelCase  , __lowerCAmelCase  )






							@slow
							def 				_lowerCamelCase		(						self  ):
														for model_name in ["bert-base-cased", "bert-large-uncased"]:
																					UpperCamelCase__				     =			AutoTokenizer.from_pretrained(__lowerCAmelCase  )
																					UpperCamelCase__				     =			FlaxBertModel.from_pretrained(__lowerCAmelCase  )
																					UpperCamelCase__				     =			tokenizer("""Do you support jax jitted function?"""  , return_tensors=TensorType.JAX  )

																					@jax.jit
																					def eval(**__lowerCAmelCase  ):
																												return model(**__lowerCAmelCase  )

																					eval(**__lowerCAmelCase  ).block_until_ready()






							@slow
							def 				_lowerCamelCase		(						self  ):
														for model_name in ["roberta-base", "roberta-large"]:
																					UpperCamelCase__				     =			AutoTokenizer.from_pretrained(__lowerCAmelCase  )
																					UpperCamelCase__				     =			FlaxRobertaModel.from_pretrained(__lowerCAmelCase  )
																					UpperCamelCase__				     =			tokenizer("""Do you support jax jitted function?"""  , return_tensors=TensorType.JAX  )

																					@jax.jit
																					def eval(**__lowerCAmelCase  ):
																												return model(**__lowerCAmelCase  )

																					eval(**__lowerCAmelCase  ).block_until_ready()






							def 				_lowerCamelCase		(						self  ):
														with self.assertRaisesRegex(
														    __lowerCAmelCase  , """bert-base is not a local folder and is not a valid model identifier"""  ):
																					UpperCamelCase__				     =			FlaxAutoModel.from_pretrained("""bert-base"""  )






							def 				_lowerCamelCase		(						self  ):
														with self.assertRaisesRegex(
														    __lowerCAmelCase  , r"""aaaaaa is not a valid git identifier \(branch name, tag name or commit id\)"""  ):
																					UpperCamelCase__				     =			FlaxAutoModel.from_pretrained(__lowerCAmelCase  , revision="""aaaaaa"""  )






							def 				_lowerCamelCase		(						self  ):
														with self.assertRaisesRegex(
														    __lowerCAmelCase  , """hf-internal-testing/config-no-model does not appear to have a file named flax_model.msgpack"""  , ):
																					UpperCamelCase__				     =			FlaxAutoModel.from_pretrained("""hf-internal-testing/config-no-model"""  )







							def 				_lowerCamelCase		(						self  ):
														with self.assertRaisesRegex(__lowerCAmelCase  , """Use `from_pt=True` to load this model"""  ):
																					UpperCamelCase__				     =			FlaxAutoModel.from_pretrained("""hf-internal-testing/tiny-bert-pt-only"""  )




