



"""simple docstring"""






import os
from collections.abc import Iterator


def     _lowercase       (						__snake_case = "."			)		->     Iterator[str]:
			for dir_path, dir_names, filenames in os.walk(__snake_case			):
						__lowerCAmelCase   :						Dict				= [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(__snake_case			)[1] in (".py", ".ipynb"):
												yield os.path.join(__snake_case      ,__snake_case			).lstrip("./"			)


def     _lowercase       (						__snake_case			)		->     Union[str, Any]:
			return F"""{i * '  '}*""" if i else "\n##"


def     _lowercase       (						__snake_case      ,__snake_case			)		->     str:
			__lowerCAmelCase   :						List[str]				= old_path.split(os.sep			)
			for i, new_part in enumerate(new_path.split(os.sep			)			):
						if (i + 1 > len(__snake_case			) or old_parts[i] != new_part) and new_part:
									print(F"""{md_prefix(__snake_case			)} {new_part.replace('_'      ,' '			).title()}"""			)
			return new_path


def     _lowercase       (						__snake_case = "."			)		->     None:
			__lowerCAmelCase   :						Optional[Any]				= ""
			for filepath in sorted(good_file_paths(__snake_case			)			):
						__lowerCAmelCase   :						List[Any]				= os.path.split(__snake_case			)
						if filepath != old_path:
									__lowerCAmelCase   :						Dict				= print_path(__snake_case      ,__snake_case			)
						__lowerCAmelCase   :						Any				= (filepath.count(os.sep			) + 1) if filepath else 0
						__lowerCAmelCase   :						List[str]				= F"""{filepath}/{filename}""".replace(" "      ,"%20"			)
						__lowerCAmelCase   :						Any				= os.path.splitext(filename.replace("_"      ," "			).title()			)[0]
						print(F"""{md_prefix(__snake_case			)} [{filename}]({url})"""			)


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




"""simple docstring"""






def     _lowercase       (						__snake_case      ,__snake_case			)		->     list:
			__lowerCAmelCase   :						List[str]				= len(__snake_case			)
			__lowerCAmelCase   :						Dict				= []
			for i in range(len(__snake_case			) - pat_len + 1			):
						__lowerCAmelCase   :						List[Any]				= True
						for j in range(__snake_case			):
									if s[i + j] != pattern[j]:
												__lowerCAmelCase   :						Union[str, Any]				= False
												break
						if match_found:
									position.append(__snake_case			)
			return position


if __name__ == "__main__":
	assert naive_pattern_search('ABCDEFG', 'DE') == [3]
	print(naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC'))