
def     UpperCAmelCase__							(       __magic_name__						:     int							,  __magic_name__						:     List[str]  ):


					'''simple docstring'''

					if not isinstance(__magic_name__							,  __magic_name__  ):
										raise TypeError('''plaintext must be a string'''  )
					if not isinstance(__magic_name__							,  __magic_name__  ):
										raise TypeError('''key must be a string'''  )

					if not plaintext:
										raise ValueError('''plaintext is empty'''  )
					if not key:
										raise ValueError('''key is empty'''  )

					key += plaintext
					lowerCAmelCase		:					Tuple  	=     plaintext.lower()
					lowerCAmelCase		:					Optional[int]  	=     key.lower()
					lowerCAmelCase		:					Union[str, Any]  	=     0
					lowerCAmelCase		:					str  	=     0
					lowerCAmelCase		:					List[Any]  	=     ""
					while plaintext_iterator < len(__magic_name__  ):
										if (
										    ord(plaintext[plaintext_iterator]  ) < 97
										    or ord(plaintext[plaintext_iterator]  ) > 1_22
										):
															ciphertext += plaintext[plaintext_iterator]
															plaintext_iterator += 1
										elif ord(key[key_iterator]  ) < 97 or ord(key[key_iterator]  ) > 1_22:
															key_iterator += 1
										else:
															ciphertext += chr(
															    (
															        (ord(plaintext[plaintext_iterator]  ) - 97 + ord(key[key_iterator]  ))
															        - 97
															    )
															    % 26
															    + 97  )
															key_iterator += 1
															plaintext_iterator += 1
					return ciphertext
def     UpperCAmelCase__							(       __magic_name__						:     Optional[int]							,  __magic_name__						:     Union[str, Any]  ):


					'''simple docstring'''

					if not isinstance(__magic_name__							,  __magic_name__  ):
										raise TypeError('''ciphertext must be a string'''  )
					if not isinstance(__magic_name__							,  __magic_name__  ):
										raise TypeError('''key must be a string'''  )

					if not ciphertext:
										raise ValueError('''ciphertext is empty'''  )
					if not key:
										raise ValueError('''key is empty'''  )

					lowerCAmelCase		:					Dict  	=     key.lower()
					lowerCAmelCase		:					str  	=     0
					lowerCAmelCase		:					int  	=     0
					lowerCAmelCase		:					List[Any]  	=     ""
					while ciphertext_iterator < len(__magic_name__  ):
										if (
										    ord(ciphertext[ciphertext_iterator]  ) < 97
										    or ord(ciphertext[ciphertext_iterator]  ) > 1_22
										):
															plaintext += ciphertext[ciphertext_iterator]
										else:
															plaintext += chr(
															    (ord(ciphertext[ciphertext_iterator]  ) - ord(key[key_iterator]  )) % 26
															    + 97  )
															key += chr(
															    (ord(ciphertext[ciphertext_iterator]  ) - ord(key[key_iterator]  )) % 26
															    + 97  )
															key_iterator += 1
										ciphertext_iterator += 1
					return plaintext


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		__SCREAMING_SNAKE_CASE			:   str         =     int(input('Type 1 to encrypt or 2 to decrypt:'))
		if operation == 1:
				__SCREAMING_SNAKE_CASE			:   Dict         =     input('Typeplaintext to be encrypted:\n')
				__SCREAMING_SNAKE_CASE			:   Optional[Any]         =     input('Type the key:\n')
				print(encrypt(plaintext, key))
		elif operation == 2:
				__SCREAMING_SNAKE_CASE			:   Optional[int]         =     input('Type the ciphertext to be decrypted:\n')
				__SCREAMING_SNAKE_CASE			:   List[Any]         =     input('Type the key:\n')
				print(decrypt(ciphertext, key))
		decrypt('jsqqs avvwo', 'coffee')


import json
import os
import tempfile
import unittest

from transformers.modelcard import ModelCard


class 		__magic_name__   (						unittest.TestCase    ):





		def       _A							(							self    :	Dict				):
							lowerCAmelCase		:					List[Any]  	=     {
							    '''model_details''': {
							        '''Organization''': '''testing''',
							        '''Model date''': '''today''',
							        '''Model version''': '''v2.1, Developed by Test Corp in 2019.''',
							        '''Architecture''': '''Convolutional Neural Network.''',
							    },
							    '''metrics''': '''BLEU and ROUGE-1''',
							    '''evaluation_data''': {
							        '''Datasets''': {'''BLEU''': '''My-great-dataset-v1''', '''ROUGE-1''': '''My-short-dataset-v2.1'''},
							        '''Preprocessing''': '''See details on https://arxiv.org/pdf/1810.03993.pdf''',
							    },
							    '''training_data''': {
							        '''Dataset''': '''English Wikipedia dump dated 2018-12-01''',
							        '''Preprocessing''': (
							            '''Using SentencePiece vocabulary of size 52k tokens. See details on'''
							            ''' https://arxiv.org/pdf/1810.03993.pdf'''
							        ),
							    },
							    '''quantitative_analyses''': {'''BLEU''': 5_5.1, '''ROUGE-1''': 7_6},
							}





		def       _A							(							self    :	str				):
							lowerCAmelCase		:					Dict  	=     ModelCard.from_dict(self.inputs_dict				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''model_details'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''intended_use'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''factors'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''metrics'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''evaluation_data'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''training_data'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''quantitative_analyses'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''ethical_considerations'''				)				)
							self.assertTrue(hasattr(lowerCamelCase__						,  '''caveats_and_recommendations'''				)				)





		def       _A							(							self    :	Optional[Any]				):
							lowerCAmelCase		:					Tuple  	=     ModelCard.from_dict(self.inputs_dict				)
							lowerCAmelCase		:					Dict  	=     json.loads(modelcard.to_json_string()				)
							for key, value in self.inputs_dict.items():
												self.assertEqual(obj[key]						,  lowerCamelCase__				)





		def       _A							(							self    :	Tuple				):
							lowerCAmelCase		:					Tuple  	=     ModelCard.from_dict(self.inputs_dict				)

							with tempfile.TemporaryDirectory() as tmpdirname:
												lowerCAmelCase		:					str  	=     os.path.join(lowerCamelCase__						,  '''modelcard.json'''				)
												model_card_first.to_json_file(lowerCamelCase__				)
												lowerCAmelCase		:					Dict  	=     ModelCard.from_json_file(lowerCamelCase__				)

							self.assertEqual(model_card_second.to_dict()						,  model_card_first.to_dict()				)





		def       _A							(							self    :	Union[str, Any]				):
							lowerCAmelCase		:					int  	=     ModelCard.from_dict(self.inputs_dict				)

							with tempfile.TemporaryDirectory() as tmpdirname:
												model_card_first.save_pretrained(lowerCamelCase__				)
												lowerCAmelCase		:					Any  	=     ModelCard.from_pretrained(lowerCamelCase__				)

							self.assertEqual(model_card_second.to_dict()						,  model_card_first.to_dict()				)
