"""simple docstring"""







from __future__ import annotations

from enum import Enum



class 			_lowerCamelCase      (_lowerCAmelCase  ):
				_snake_case  =	24
				_snake_case  =	21
				_snake_case  =	18
				_snake_case  =	15
				_snake_case  =	12
				_snake_case  =	9
				_snake_case  =	6
				_snake_case  =	3
				_snake_case  =	2
				_snake_case  =	1
				_snake_case  =	-1
				_snake_case  =	-2
				_snake_case  =	-3
				_snake_case  =	-6
				_snake_case  =	-9
				_snake_case  =	-12
				_snake_case  =	-15
				_snake_case  =	-18
				_snake_case  =	-21
				_snake_case  =	-24



class 			_lowerCamelCase      (_lowerCAmelCase  ):
				_snake_case  =	8
				_snake_case  =	7
				_snake_case  =	6
				_snake_case  =	5
				_snake_case  =	4
				_snake_case  =	3
				_snake_case  =	2
				_snake_case  =	1



def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,):






	"""simple docstring"""





	if isinstance(_lowercase  ,_lowercase      ):
		_lowercase			:     List[str]      					=				SIUnit[known_prefix.lower()]
	if isinstance(_lowercase  ,_lowercase      ):
		_lowercase			:     Optional[Any]      					=				SIUnit[unknown_prefix.lower()]
	_lowercase			:     float      					=				known_amount * (
	    10 ** (known_prefix.value - unknown_prefix.value)
	)
	return unknown_amount


def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,):






	"""simple docstring"""





	if isinstance(_lowercase  ,_lowercase      ):
		_lowercase			:     Optional[int]      					=				BinaryUnit[known_prefix.lower()]
	if isinstance(_lowercase  ,_lowercase      ):
		_lowercase			:     Tuple      					=				BinaryUnit[unknown_prefix.lower()]
	_lowercase			:     float      					=				known_amount * (
	    2 ** ((known_prefix.value - unknown_prefix.value) * 10)
	)
	return unknown_amount


if __name__ == "__main__":
						import doctest

						doctest.testmod()










"""simple docstring"""




import os
import sys
import time

from . import transposition_cipher as trans_cipher





def 			a_							(				):
						_UpperCamelCase     :   Dict      =       '''Prehistoric Men.txt'''
						_UpperCamelCase     :   Optional[Any]      =       '''Output.txt'''
						_UpperCamelCase     :   Any      =       int(input('''Enter key: '''  )  )
						_UpperCamelCase     :   Optional[Any]      =       input('''Encrypt/Decrypt [e/d]: '''  )

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

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

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

						_UpperCamelCase     :   List[str]      =       round(time.time() - start_time			,		2  )
						print(('''Done (''', total_time, '''seconds )''')  )


if __name__ == "__main__":
						main()



