
"""simple docstring"""





import os
from collections.abc import Iterator







def 	__a     (		__lowerCamelCase = "."  ):
   for dir_path, dir_names, filenames in os.walk(__lowerCamelCase  ):
      UpperCAmelCase_					:					Tuple			     =    [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 	__a     (		__lowerCamelCase  ):
   return f"""{i * "  "}*""" if i else "\n##"







def 	__a     (		__lowerCamelCase,		__lowerCamelCase  ):
   UpperCAmelCase_					:					Dict			     =    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 	__a     (		__lowerCamelCase = "."  ):
   UpperCAmelCase_					:					Dict			     =    ""
   for filepath in sorted(good_file_paths(__lowerCamelCase  )  ):
      UpperCAmelCase_     ,   UpperCAmelCase_					:					str			     =    os.path.split(__lowerCamelCase  )
      if filepath != old_path:
         UpperCAmelCase_					:					Any			     =    print_path(__lowerCamelCase,		__lowerCamelCase  )
      UpperCAmelCase_					:					List[str]			     =    (filepath.count(os.sep  ) + 1) if filepath else 0
      UpperCAmelCase_					:					Dict			     =    f"""{filepath}/{filename}""".replace(" ",		"%20"  )
      UpperCAmelCase_					:					int			     =    os.path.splitext(filename.replace("_",		" "  ).title()  )[0]
      print(f"""{md_prefix(__lowerCamelCase  )} [{filename}]({url})"""  )


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




"""simple docstring"""





from collections import namedtuple

_a		       =							namedtuple('from_to', 'from_ to')

_a		       =							{
    'cubicmeter': from_to(1, 1),
    'litre': from_to(0.001, 1_000),
    'kilolitre': from_to(1, 1),
    'gallon': from_to(0.0_0454, 264.172),
    'cubicyard': from_to(0.7_6455, 1.3_0795),
    'cubicfoot': from_to(0.028, 35.3147),
    'cup': from_to(0.0_0023_6588, 4226.75),
}







def 	__a     (		__lowerCamelCase,		__lowerCamelCase,		__lowerCamelCase  ):
   if from_type not in METRIC_CONVERSION:
      raise ValueError(
          f"""Invalid 'from_type' value: {from_type!r}  Supported values are:\n"""
          + ", ".join(__lowerCamelCase  )  )
   if to_type not in METRIC_CONVERSION:
      raise ValueError(
          f"""Invalid 'to_type' value: {to_type!r}.  Supported values are:\n"""
          + ", ".join(__lowerCamelCase  )  )
   return value * METRIC_CONVERSION[from_type].from_ * METRIC_CONVERSION[to_type].to


if __name__ == "__main__":
    import doctest

    doctest.testmod()


