






"""simple docstring"""



import os
from collections.abc import Iterator




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




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




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




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


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














"""simple docstring"""



def      _lowerCAmelCase		(							UpperCAmelCase__       :					int,						UpperCAmelCase__       :					int      )		->str:
						if a < 0 or b < 0:
												raise ValueError("""the value of both inputs must be positive"""      )

						A__						:  str		  =  str(bin(UpperCAmelCase__      )      )[2:]  # remove the leading "0b"
						A__						:  List[Any]		  =  str(bin(UpperCAmelCase__      )      )[2:]  # remove the leading "0b"

						A__						:  List[str]		  =  max(len(UpperCAmelCase__      ),						len(UpperCAmelCase__      )      )

						return "0b" + "".join(
						    str(int(char_a == """1""" and char_b == """1"""      )      )
						    for char_a, char_b in zip(a_binary.zfill(UpperCAmelCase__      ),						b_binary.zfill(UpperCAmelCase__      )      )      )


if __name__ == "__main__":
						import doctest

						doctest.testmod()






