



import os

# Precomputes a list of the 100 first triangular numbers
_lowercase     							=						[int(0.5 * n * (n + 1)) for n in range(1, 1_01)]






def      _A				()  ->str:



			'''simple docstring'''







			lowerCamelCase__ :      int								=		os.path.dirname(os.path.realpath(UpperCamelCase ) )
			lowerCamelCase__ :      List[Any]								=		os.path.join(UpperCamelCase      ,			"""words.txt""" )

			lowerCamelCase__ :      Dict								=		""""""
			with open(UpperCamelCase ) as f:
						lowerCamelCase__ :      Optional[int]								=		f.readline()

			lowerCamelCase__ :      Union[str, Any]								=		[word.strip("""\"""" ) for word in words.strip("""\r\n""" ).split(""",""" )]
			lowerCamelCase__ :      Tuple								=		[
			    word
			    for word in [sum(ord(UpperCamelCase ) - 64 for x in word ) for word in words]
			    if word in TRIANGULAR_NUMBERS
			]
			return len(UpperCamelCase )


if __name__ == "__main__":
				print(solution())








import argparse

from transformers import TaConfig, TaForConditionalGeneration, load_tf_weights_in_ta
from transformers.utils import logging


logging.set_verbosity_info()






def      _A				(UpperCamelCase		:      Any      ,			UpperCamelCase		:      Union[str, Any]      ,			UpperCamelCase		:      Optional[Any] )  ->Any:



			'''simple docstring'''







			lowerCamelCase__ :      Optional[Any]								=		TaConfig.from_json_file(UpperCamelCase )
			print(f"Building PyTorch model from configuration: {config}" )
			lowerCamelCase__ :      Optional[int]								=		TaForConditionalGeneration(UpperCamelCase )

			# Load weights from tf checkpoint
			load_tf_weights_in_ta(UpperCamelCase      ,			UpperCamelCase      ,			UpperCamelCase )

			# Save pytorch-model
			print(f"Save PyTorch model to {pytorch_dump_path}" )
			model.save_pretrained(UpperCamelCase )


if __name__ == "__main__":
				_lowercase     							=						argparse.ArgumentParser()
				# Required parameters
				parser.add_argument(
				    '''--tf_checkpoint_path''', default=None, type=str, required=True, help='''Path to the TensorFlow checkpoint path.'''
				)
				parser.add_argument(
				    '''--config_file''',
				    default=None,
				    type=str,
				    required=True,
				    help=(
				        '''The config json file corresponding to the pre-trained T5 model. \nThis specifies the model architecture.'''
				    ),
				)
				parser.add_argument(
				    '''--pytorch_dump_path''', default=None, type=str, required=True, help='''Path to the output PyTorch model.'''
				)
				_lowercase     							=						parser.parse_args()
				convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.config_file, args.pytorch_dump_path)



