



'''simple docstring'''





import os

# Precomputes a list of the 100 first triangular numbers
_lowerCAmelCase      						=	[int(0.5 * n * (n + 1)) for n in range(1, 101)]
def    _SCREAMING_SNAKE_CASE  (       ):



    """simple docstring"""





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

    lowerCAmelCase__ :  str							      =					""""""
    with open(UpperCamelCase			) as f:
        lowerCAmelCase__ :  str							      =					f.readline()

    lowerCAmelCase__ :  Union[str, Any]							      =					[word.strip("""\""""			) for word in words.strip("""\r\n"""			).split(""","""			)]
    lowerCAmelCase__ :  Optional[Any]							      =					[
        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())








from typing import Union

import fire
import torch
from tqdm import tqdm



def 					UpperCAmelCase__     (   lowerCamelCase,	lowerCamelCase = "cpu",	lowerCamelCase = None      ):
  lowercase			:Optional[Any]							=  torch.load(lowerCamelCase,	map_location=lowerCamelCase      )
  for k, v in tqdm(state_dict.items()      ):
    if not isinstance(lowerCamelCase,	torch.Tensor      ):
      raise TypeError("FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin"      )
    lowercase			:List[Any]							=  v.half()
  if save_path is None:  # overwrite src_path
    lowercase			:Optional[Any]							=  src_path
  torch.save(lowerCamelCase,	lowerCamelCase      )


if __name__ == "__main__":
     fire.Fire(convert)



