





import os
from collections.abc import Iterator


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


def 							__snake_case							(    lowerCAmelCase_	)				->						Optional[Any]:
    return f'''{i * "  "}*''' if i else "\n##"


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


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


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




'''simple docstring'''






def 							UpperCamelCase_     (       A__   :  bytes   ):
  '''simple docstring'''





  return "".join([hex(A__   )[2:].zfill(2   ).upper() for byte in list(A__   )]   )







def 							UpperCamelCase_     (       A__   :  str   ):
  '''simple docstring'''





  if (len(A__   ) % 2) != 0:
    raise ValueError(
        """Base16 encoded data is invalid:
Data does not have an even number of hex digits."""   )
  # Check the character set - the standard base16 alphabet
  # is uppercase according to RFC3548 section 6
  if not set(A__   ) <= set("""0123456789ABCDEF"""   ):
    raise ValueError(
        """Base16 encoded data is invalid:
Data is not uppercase hex or it contains invalid characters."""   )
  # For every two hexadecimal digits (= a byte), turn it into an integer.
  # Then, string the result together into bytes, and return it.
  return bytes(int(data[i] + data[i + 1]				,       16   ) for i in range(0				,       len(A__   )				,       2   )   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()



