

'''simple docstring'''





def  UpperCamelCase_(							_snake_case     :						List[Any]			):




			"""simple docstring"""






			return -num if num < 0 else num






def  UpperCamelCase_(							_snake_case     :						Tuple			):




			"""simple docstring"""






			if len(lowercase_			) == 0:
						raise ValueError('abs_min() arg is an empty sequence'			)
			__a						   =x[0]
			for i in x:
						if abs_val(lowercase_			) < abs_val(lowercase_			):
									__a						   =i
			return j






def  UpperCamelCase_(							_snake_case     :						List[str]			):




			"""simple docstring"""






			if len(lowercase_			) == 0:
						raise ValueError('abs_max() arg is an empty sequence'			)
			__a						   =x[0]
			for i in x:
						if abs(lowercase_			) > abs(lowercase_			):
									__a						   =i
			return j






def  UpperCamelCase_(							_snake_case     :						int			):




			"""simple docstring"""






			if len(lowercase_			) == 0:
						raise ValueError('abs_max_sort() arg is an empty sequence'			)
			return sorted(lowercase_ ,  key=lowercase_			)[-1]






def  UpperCamelCase_(							):




			"""simple docstring"""






			assert abs_val(0			) == 0
			assert abs_val(34			) == 34
			assert abs_val(-100000000000			) == 100000000000

			__a						   =[-3, -1, 2, -11]
			assert abs_max(lowercase_			) == -11
			assert abs_max_sort(lowercase_			) == -11
			assert abs_min(lowercase_			) == -1


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						test_abs_val()
						print(abs_val(-34))  # --> 34









import os
import sys
import time

from . import transposition_cipher as trans_cipher






def  UpperCamelCase_(							):




			"""simple docstring"""






			__a						   ='Prehistoric Men.txt'
			__a						   ='Output.txt'
			__a						   =int(input('Enter key: '			)			)
			__a						   =input('Encrypt/Decrypt [e/d]: '			)

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

			__a						   =time.time()
			if mode.lower().startswith('e'			):
						with open(_snake_case			) as f:
									__a						   =f.read()
						__a						   =trans_cipher.encrypt_message(_snake_case ,  _snake_case			)
			elif mode.lower().startswith('d'			):
						with open(_snake_case			) as f:
									__a						   =f.read()
						__a						   =trans_cipher.decrypt_message(_snake_case ,  _snake_case			)

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

			__a						   =round(time.time() - start_time ,  2			)
			print(('Done (', total_time, 'seconds )')			)


if __name__ == "__main__":
						main()






