util
flatten_dict(d, parent_key_tuple=())
#
Flattens a dictionary into a dict mapped from tuples of keys to values.
Usage:
flatten_dict({"a": {"b": 1, "c": 2}}) {("a", "b"): 1, ("a", "c"): 2} flatten_dict({"tags": ["parameters"], "jupyter": {"source_hidden": True}}) {("tags",): ["parameters"], ("jupyter", "source_hidden"): True}
Source code in papermill_origami/util.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
parse_noteable_file_id(path)
cached
#
Parses a noteable file id from a noteable:// scheme path or a Noteable file HTTPs URL
Examples:
parse_noteable_file_id('noteable://f78d668e-13f3-49da-84a9-afdece1b1e2a') 'f78d668e-13f3-49da-84a9-afdece1b1e2a' parse_noteable_file_id('https://app.noteable.io/f/f78d668e-13f3-49da-84a9-afdece1b1e2a') 'f78d668e-13f3-49da-84a9-afdece1b1e2a'
Source code in papermill_origami/util.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|