





"""simple docstring"""
import warnings

from .generation import GenerationMixin







class 	a				(					a__   ):
 # warning at import time
 warnings.warn(
     '''Importing `GenerationMixin` from `src/transformers/generation_utils.py` is deprecated and will '''
     '''be removed in Transformers v5. Import as `from transformers import GenerationMixin` instead.'''					,      a__					,      )












"""simple docstring"""
import os
import sys
import time

from . import transposition_cipher as trans_cipher

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

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

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

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

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


if __name__ == "__main__":
       main()





