


import re
from pathlib import Path
from unittest import TestCase

import pytest







@pytest.mark.integration
class     __lowercase    (				_snake_case   ):



		"""simple docstring"""

		def  __A					(      self						,	A     )   ->      int:







					'''simple docstring'''







					with open(_UpperCamelCase						,	encoding="""utf-8"""     ) as input_file:
								lowerCamelCase  						=   re.compile(r"""(?!.*\b(?:encoding|rb|w|wb|w+|wb+|ab|ab+)\b)(?<=\s)(open)\((.*)\)"""     )
								lowerCamelCase  						=   input_file.read()
								lowerCamelCase  						=   regexp.search(_UpperCamelCase     )

					return match







		def  __A					(      self						,	A     )   ->      Union[str, Any]:







					'''simple docstring'''







					with open(_UpperCamelCase						,	encoding="""utf-8"""     ) as input_file:
								lowerCamelCase  						=   re.compile(r"""#[^\r\n]*print\(|\"[^\r\n]*print\(|\"\"\".*?print\(.*?\"\"\"|(print\()"""						,	re.DOTALL     )
								lowerCamelCase  						=   input_file.read()
								# use `re.finditer` to handle the case where the ignored groups would be matched first by `re.search`
								lowerCamelCase  						=   regexp.finditer(_UpperCamelCase     )

					lowerCamelCase  						=   [match for match in matches if match is not None and match.group(1     ) is not None]
					return matches[0] if matches else None







		def  __A					(      self     )   ->      List[str]:







					'''simple docstring'''







					lowerCamelCase  						=   Path("""./datasets"""     )
					lowerCamelCase  						=   list(dataset_paths.absolute().glob("""**/*.py"""     )     )

					for dataset in dataset_files:
								if self._no_encoding_on_file_open(str(_UpperCamelCase     )     ):
											raise AssertionError(F'open(...) must use utf-8 encoding in {dataset}'     )







		def  __A					(      self     )   ->      Optional[Any]:







					'''simple docstring'''







					lowerCamelCase  						=   Path("""./datasets"""     )
					lowerCamelCase  						=   list(dataset_paths.absolute().glob("""**/*.py"""     )     )

					for dataset in dataset_files:
								if self._no_print_statements(str(_UpperCamelCase     )     ):
											raise AssertionError(F'print statement found in {dataset}. Use datasets.logger/logging instead.'     )









import os

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




def      lowercase__      (     ):


					'''simple docstring'''


					UpperCAmelCase_    :      Any            =						os.path.dirname(os.path.realpath(__snake_case  )  )
					UpperCAmelCase_    :      Optional[Any]            =						os.path.join(__snake_case     ,       'words.txt'  )

					UpperCAmelCase_    :      Union[str, Any]            =						''
					with open(__snake_case  ) as f:
										UpperCAmelCase_    :      List[Any]            =						f.readline()

					UpperCAmelCase_    :      Optional[int]            =						[word.strip('"'  ) for word in words.strip('\r\n'  ).split(','  )]
					UpperCAmelCase_    :      Optional[int]            =						[
					    word
					    for word in [sum(ord(__snake_case  ) - 64 for x in word  ) for word in words]
					    if word in TRIANGULAR_NUMBERS
					]
					return len(__snake_case  )


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






