code: 
  
  
  
  
  """simple docstring"""
  
  import hashlib
  import importlib.util
  import json
  import os
  import pathlib
  from types import ModuleType
  
  import pytest
  import requests
  
  __A 		=			pathlib.Path.cwd().joinpath("project_euler")
  __A 		=			pathlib.Path.cwd().joinpath(
      "scripts", "project_euler_answers.json"
  )
  
  with open(PROJECT_EULER_ANSWERS_PATH) as file_handle:
  							__A 		=			json.load(file_handle)
  
  
  
  def   UpperCamelCase__     (		lowercase__  :     pathlib.Path   ):
  		snake_case		:						List[Any]								=				importlib.util.spec_from_file_location(file_path.name       ,     str(lowercase__   )   )
  		snake_case		:						Any								=				importlib.util.module_from_spec(lowercase__   )  # type: ignore
  		spec.loader.exec_module(lowercase__   )  # type: ignore
  		return module
  
  
  
  def   UpperCamelCase__     (		):
  		snake_case		:						Optional[Any]								=				[]
  		for problem_dir_path in PROJECT_EULER_DIR_PATH.iterdir():
  				if problem_dir_path.is_file() or problem_dir_path.name.startswith("_"   ):
  						continue
  				for file_path in problem_dir_path.iterdir():
  						if file_path.suffix != ".py" or file_path.name.startswith(("_", "test")   ):
  								continue
  						solution_file_paths.append(lowercase__   )
  		return solution_file_paths
  
  
  
  def   UpperCamelCase__     (		):
  		with open(os.environ["GITHUB_EVENT_PATH"]   ) as file:
  				snake_case		:						Optional[int]								=				json.load(lowercase__   )
  		return event["pull_request"]["url"] + "/files"
  
  
  
  def   UpperCamelCase__     (		):
  		snake_case		:						Any								=				[]
  		snake_case		:						List[Any]								=				{
  		    "Accept": "application/vnd.github.v3+json",
  		    "Authorization": "token " + os.environ["GITHUB_TOKEN"],
  		}
  		snake_case		:						int								=				requests.get(get_files_url()       ,     headers=lowercase__   ).json()
  		for file in files:
  				snake_case		:						Dict								=				pathlib.Path.cwd().joinpath(file["filename"]   )
  				if (
  				    filepath.suffix != ".py"
  				    or filepath.name.startswith(("_", "test")   )
  				    or not filepath.name.startswith("sol"   )
  				):
  						continue
  				solution_file_paths.append(lowercase__   )
  		return solution_file_paths
  
  
  
  def   UpperCamelCase__     (		):
  		if os.environ.get("CI"   ) and os.environ.get("GITHUB_EVENT_NAME"   ) == "pull_request":
  				# Return only if there are any, otherwise default to all solutions
  				if filepaths := added_solution_file_path():
  						return filepaths
  		return all_solution_file_paths()
  
  
  
  @pytest.mark.parametrize(
      "solution_path"       ,     collect_solution_file_paths()       ,     ids=lambda lowercase__   : F'''{path.parent.name}/{path.name}'''       ,     )
  def   UpperCamelCase__     (		lowercase__  :     pathlib.Path   ):
  		snake_case		:						str								=				solution_path.parent.name[8:].zfill(3   )
  		snake_case		:						str								=				PROBLEM_ANSWERS[problem_number]
  		snake_case		:						Tuple								=				convert_path_to_module(lowercase__   )
  		snake_case		:						Dict								=				str(solution_module.solution()   )  # type: ignore
  		snake_case		:						Dict								=				hashlib.shaaaa(answer.encode()   ).hexdigest()
  		assert (
  		    answer == expected
  		), F'''Expected solution to {problem_number} to have hash {expected}, got {answer}'''
  
  
style_context: 
  
  
  
  
  """simple docstring"""
  
  def   UpperCamelCase__     (		lowercase__  :     int   ):
  		if not isinstance(lowercase__       ,     lowercase__   ):
  				snake_case		:						Optional[Any]								=				F'''Input value of [number={number}] must be an integer'''
  				raise TypeError(lowercase__   )
  		if number < 0 or number % 2 == 1:
  				return False
  		snake_case		:						str								=				int(number**0.5   )
  		return number == number_sqrt * (number_sqrt + 1)
  
  
  if __name__ == "__main__":
  							import doctest
  
  							doctest.testmod()
  
  