


import os
import sys
import time

from . import transposition_cipher as trans_cipher



def       lowerCAmelCase			(		)->			None:
				lowerCAmelCase_			:   Tuple     					=					'''Prehistoric Men.txt'''
				lowerCAmelCase_			:   List[str]     					=					'''Output.txt'''
				lowerCAmelCase_			:   List[str]     					=					int(input('''Enter key: '''			)			)
				lowerCAmelCase_			:   Optional[Any]     					=					input('''Encrypt/Decrypt [e/d]: '''			)

				if not os.path.exists(lowerCAmelCase_			):
								print(f"""File {input_file} does not exist. Quitting..."""			)
								sys.exit()
				if os.path.exists(lowerCAmelCase_			):
								print(f"""Overwrite {output_file}? [y/n]"""			)
								lowerCAmelCase_			:   Optional[int]     					=					input('''> '''			)
								if not response.lower().startswith('''y'''			):
												sys.exit()

				lowerCAmelCase_			:   Optional[int]     					=					time.time()
				if mode.lower().startswith('''e'''			):
								with open(lowerCAmelCase_			) as f:
												lowerCAmelCase_			:   Union[str, Any]     					=					f.read()
								lowerCAmelCase_			:   Optional[int]     					=					trans_cipher.encrypt_message(lowerCAmelCase_			, lowerCAmelCase_			)
				elif mode.lower().startswith('''d'''			):
								with open(lowerCAmelCase_			) as f:
												lowerCAmelCase_			:   Union[str, Any]     					=					f.read()
								lowerCAmelCase_			:   Optional[Any]     					=					trans_cipher.decrypt_message(lowerCAmelCase_			, lowerCAmelCase_			)

				with open(lowerCAmelCase_			, '''w'''			) as output_obj:
								output_obj.write(lowerCAmelCase_			)

				lowerCAmelCase_			:   Any     					=					round(time.time() - start_time			, 2			)
				print(('''Done (''', total_time, '''seconds )''')			)


if __name__ == "__main__":
						main()



from transformers import PretrainedConfig







class 					snake_case__(				UpperCAmelCase__				):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__   :	Optional[int]       =				"""custom"""




						def __init__(					self ,    __lowercase=1 ,    **__lowercase				)       ->     Dict:
										lowerCAmelCase_			:   List[Any]     					=					attribute
										super().__init__(**__lowercase				)







class 					snake_case__(				UpperCAmelCase__				):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__   :	int       =				"""custom"""




						def __init__(					self ,    __lowercase=1 ,    **__lowercase				)       ->     List[Any]:
										lowerCAmelCase_			:   Optional[Any]     					=					attribute