



import os
import sys
import time

from . import transposition_cipher as trans_cipher

def 	a						(				):







		'''simple docstring'''





		__UpperCAmelCase   :					Union[str, Any]													=     '''Prehistoric Men.txt'''
		__UpperCAmelCase   :					Union[str, Any]													=     '''Output.txt'''
		__UpperCAmelCase   :					List[Any]													=     int(input('''Enter key: '''						)						)
		__UpperCAmelCase   :					Optional[int]													=     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]'						)
				__UpperCAmelCase   :					Any													=     input('''> '''						)
				if not response.lower().startswith('''y'''						):
						sys.exit()

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

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

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


if __name__ == "__main__":
				main()










from ...configuration_utils import PretrainedConfig
from ...utils import logging


__A             =logging.get_logger(__name__)

__A             ={
    "tau/splinter-base": "https://huggingface.co/tau/splinter-base/resolve/main/config.json",
    "tau/splinter-base-qass": "https://huggingface.co/tau/splinter-base-qass/resolve/main/config.json",
    "tau/splinter-large": "https://huggingface.co/tau/splinter-large/resolve/main/config.json",
    "tau/splinter-large-qass": "https://huggingface.co/tau/splinter-large-qass/resolve/main/config.json",
    # See all Splinter models at https://huggingface.co/models?filter=splinter
}

class 		UpperCAmelCase__      (      __UpperCamelCase       ):




			'''simple docstring'''






			UpperCamelCase      						=	"""splinter"""




			def __init__(       self							:			Any	,	a_							:			Optional[int]=3_05_22	,	a_							:			Union[str, Any]=7_68	,	a_							:			int=12	,	a_							:			int=12	,	a_							:			List[Any]=30_72	,	a_							:			Union[str, Any]="gelu"	,	a_							:			Any=0.1	,	a_							:			Union[str, Any]=0.1	,	a_							:			Any=5_12	,	a_							:			str=2	,	a_							:			Dict=0.0_2	,	a_							:			int=1e-12	,	a_							:			str=True	,	a_							:			Tuple=0	,	a_							:			List[Any]=1_04	,	**a_							:			str	,	):
					'''simple docstring'''





					super().__init__(pad_token_id=a_	,	**a_			)

					__UpperCAmelCase   :					Union[str, Any]													=     vocab_size
					__UpperCAmelCase   :					List[Any]													=     max_position_embeddings
					__UpperCAmelCase   :					str													=     hidden_size
					__UpperCAmelCase   :					Union[str, Any]													=     num_hidden_layers
					__UpperCAmelCase   :					Any													=     num_attention_heads
					__UpperCAmelCase   :					Any													=     intermediate_size
					__UpperCAmelCase   :					Tuple													=     hidden_act
					__UpperCAmelCase   :					str													=     hidden_dropout_prob
					__UpperCAmelCase   :					Any													=     attention_probs_dropout_prob
					__UpperCAmelCase   :					Optional[int]													=     initializer_range
					__UpperCAmelCase   :					Any													=     type_vocab_size
					__UpperCAmelCase   :					int													=     layer_norm_eps
					__UpperCAmelCase   :					List[Any]													=     use_cache
					__UpperCAmelCase   :					Optional[int]													=     question_token_id





