

"""simple docstring"""




from maths.prime_factors import prime_factors





def       lowercase__						(       snake_case_   :int    ):
	if not isinstance(snake_case_			,		snake_case_    ):
		__UpperCAmelCase      		= F'''Input value of [number={number}] must be an integer'''
		raise TypeError(snake_case_    )
	if number < 1:
		raise ValueError('''Input must be a positive integer'''    )
	return -1 if len(prime_factors(snake_case_    )    ) % 2 else 1


if __name__ == "__main__":
				import doctest

				doctest.testmod()


'''simple docstring'''
import os
from collections.abc import Iterator




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__ = "."			)  ->							Iterator[str]:


		'''simple docstring'''


		for dir_path, dir_names, filenames in os.walk(SCREAMING_SNAKE_CASE__			):
				snake_case  :       Optional[Any]     			=						[d for d in dir_names if d != '''scripts''' and d[0] not in '''._''']
				for filename in filenames:
						if filename == "__init__.py":
								continue
						if os.path.splitext(SCREAMING_SNAKE_CASE__			)[1] in (".py", ".ipynb"):
								yield os.path.join(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			).lstrip('''./'''			)




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							List[str]:


		'''simple docstring'''


		return F'{i * "  "}*' if i else "\n##"




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			)  ->							str:


		'''simple docstring'''


		snake_case  :       Union[str, Any]     			=						old_path.split(os.sep			)
		for i, new_part in enumerate(new_path.split(os.sep			)			):
				if (i + 1 > len(SCREAMING_SNAKE_CASE__			) or old_parts[i] != new_part) and new_part:
						print(F'{md_prefix(SCREAMING_SNAKE_CASE__			)} {new_part.replace("_" ,       " "			).title()}'			)
		return new_path




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__ = "."			)  ->							None:


		'''simple docstring'''


		snake_case  :       List[Any]     			=						''''''
		for filepath in sorted(good_file_paths(SCREAMING_SNAKE_CASE__			)			):
				snake_case			,snake_case  :       Optional[Any]     			=						os.path.split(SCREAMING_SNAKE_CASE__			)
				if filepath != old_path:
						snake_case  :       Dict     			=						print_path(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			)
				snake_case  :       int     			=						(filepath.count(os.sep			) + 1) if filepath else 0
				snake_case  :       int     			=						F'{filepath}/{filename}'.replace(''' ''' ,       '''%20'''			)
				snake_case  :       int     			=						os.path.splitext(filename.replace('''_''' ,       ''' '''			).title()			)[0]
				print(F'{md_prefix(SCREAMING_SNAKE_CASE__			)} [{filename}]({url})'			)


if __name__ == "__main__":
						print_directory_md(".")


