memory-graph 0.3.37__tar.gz → 0.3.39__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {memory_graph-0.3.37/memory_graph.egg-info → memory_graph-0.3.39}/PKG-INFO +125 -68
- {memory_graph-0.3.37 → memory_graph-0.3.39}/README.md +124 -67
- memory_graph-0.3.39/images/.idea/.gitignore +8 -0
- memory_graph-0.3.39/images/.idea/images.iml +12 -0
- memory_graph-0.3.39/images/.idea/inspectionProfiles/profiles_settings.xml +6 -0
- memory_graph-0.3.39/images/.idea/misc.xml +7 -0
- memory_graph-0.3.39/images/.idea/modules.xml +8 -0
- memory_graph-0.3.39/images/.idea/vcs.xml +6 -0
- memory_graph-0.3.39/images/.idea/workspace.xml +83 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/add_one.gv +18 -18
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_key_value.gv +12 -12
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_leaf.gv +5 -5
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_linear.gv +12 -12
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_table.gv +12 -12
- memory_graph-0.3.39/images/bin_search.gv +119 -0
- memory_graph-0.3.39/images/bin_search.png +0 -0
- memory_graph-0.3.39/images/bin_search.py +40 -0
- memory_graph-0.3.39/images/bin_search.py~ +42 -0
- memory_graph-0.3.39/images/bin_search_linear.gv +133 -0
- memory_graph-0.3.39/images/bin_search_linear.png +0 -0
- memory_graph-0.3.39/images/bin_search_linear.py~ +42 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/bin_tree.gv +35 -35
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/copies.gv +20 -20
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/copy_method.gv +16 -16
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/create_images.sh +1 -0
- memory_graph-0.3.39/images/debugging.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debugging.py +2 -8
- memory_graph-0.3.39/images/debugging0.gv +29 -0
- memory_graph-0.3.39/images/debugging0.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debugging01.gv +8 -8
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debugging02.gv +11 -11
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debugging03.gv +13 -13
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debugging04.gv +15 -15
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debugging05.gv +17 -17
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debugging06.gv +17 -17
- memory_graph-0.3.39/images/debugging1.gv +38 -0
- memory_graph-0.3.39/images/debugging1.png +0 -0
- memory_graph-0.3.39/images/debugging2.gv +47 -0
- memory_graph-0.3.39/images/debugging2.png +0 -0
- memory_graph-0.3.39/images/debugging3.gv +57 -0
- memory_graph-0.3.39/images/debugging3.png +0 -0
- memory_graph-0.3.39/images/debugging4.gv +68 -0
- memory_graph-0.3.39/images/debugging4.png +0 -0
- memory_graph-0.3.39/images/debugging5.gv +68 -0
- memory_graph-0.3.39/images/debugging5.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/extension_numpy.gv +8 -8
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/extension_pandas.gv +8 -8
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial0.gv +3 -3
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial0.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial1.gv +6 -6
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial1.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial2.gv +8 -8
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial2.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial3.gv +10 -10
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial3.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial4.gv +10 -10
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial4.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial5.gv +8 -8
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial5.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial6.gv +6 -6
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial6.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hash_set.gv +29 -29
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/highlight.gv +16 -16
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/immutable1.gv +4 -4
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/immutable2.gv +6 -6
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/introspect_depth.gv +56 -56
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/linked_list.gv +20 -20
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/many_types.gv +12 -12
- memory_graph-0.3.39/images/memory_graph.gv +43 -0
- memory_graph-0.3.39/images/memory_graph.pdf +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/mutable1.gv +4 -4
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/mutable2.gv +4 -4
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/not_node_types1.gv +6 -6
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/not_node_types2.gv +16 -16
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set0.gv +11 -11
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set0.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set1.gv +17 -17
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set1.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set10.gv +36 -36
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set10.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set11.gv +31 -31
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set11.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set12.gv +31 -31
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set12.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set13.gv +36 -36
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set13.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set14.gv +41 -41
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set14.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set15.gv +43 -43
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set15.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set16.gv +40 -40
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set16.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set17.gv +40 -40
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set17.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set18.gv +45 -45
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set18.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set19.gv +47 -47
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set19.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set2.gv +22 -22
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set2.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set20.gv +44 -44
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set20.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set21.gv +39 -39
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set21.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set22.gv +34 -34
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set22.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set23.gv +28 -28
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set23.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set3.gv +27 -27
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set3.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set4.gv +32 -32
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set4.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set5.gv +34 -34
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set5.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set6.gv +32 -32
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set6.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set7.gv +32 -32
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set7.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set8.gv +37 -37
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set8.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set9.gv +39 -39
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set9.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/rebinding1.gv +4 -4
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/rebinding2.gv +6 -6
- memory_graph-0.3.39/images/stack.txt +24 -0
- memory_graph-0.3.39/images/vsc.py +42 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/__init__.py +13 -15
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/config.py +5 -0
- memory_graph-0.3.39/memory_graph/config_default.py +125 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39/memory_graph.egg-info}/PKG-INFO +125 -68
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph.egg-info/SOURCES.txt +25 -7
- {memory_graph-0.3.37 → memory_graph-0.3.39}/pyproject.toml +1 -1
- memory_graph-0.3.37/images/bin_search.py +0 -31
- memory_graph-0.3.37/images/debugging.gif +0 -0
- memory_graph-0.3.37/images/debugging01.png +0 -0
- memory_graph-0.3.37/images/debugging02.png +0 -0
- memory_graph-0.3.37/images/debugging03.png +0 -0
- memory_graph-0.3.37/images/debugging04.png +0 -0
- memory_graph-0.3.37/images/debugging05.png +0 -0
- memory_graph-0.3.37/images/debugging06.png +0 -0
- memory_graph-0.3.37/images/memory_graph.gv +0 -22
- memory_graph-0.3.37/images/memory_graph.pdf +0 -0
- memory_graph-0.3.37/images/stack.txt +0 -21
- memory_graph-0.3.37/images/vsc.py +0 -23
- memory_graph-0.3.37/images/vsc.py~ +0 -22
- memory_graph-0.3.37/memory_graph/config_default.py +0 -108
- {memory_graph-0.3.37 → memory_graph-0.3.39}/LICENSE.txt +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/MANIFEST.in +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/-0 +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/add_one.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/add_one.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree.py~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_dir.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_dir.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_fail.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_fail.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_key_value.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_leaf.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_linear.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/avltree_table.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/bin_tree.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/bin_tree.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/bin_tree.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/bin_tree2.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/bin_tree2.py~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/call_stack.txt +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/colab_example.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/copies.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/copies.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/copy_method.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/copy_method.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/create_gif.sh +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debug.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debug.pdf +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/debug_vscode.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/depth.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/depth.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/extension_numpy.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/extension_numpy.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/extension_pandas.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/extension_pandas.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial01.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial02.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial03.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial04.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial05.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial06.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/factorial07.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hash_set.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hash_set.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hash_set.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hidden_edges.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hidden_edges.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hidden_edges.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/hidden_edges.py~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/highlight.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/highlight.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/immutable.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/immutable1.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/immutable2.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/introspect_depth.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/introspect_depth.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/introspect_depth.py~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/ipython.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/jupyter_example.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/linked_list.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/linked_list.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/linked_list.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/log.txt +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/many_types.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/many_types.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/memory_graph.gv.pdf +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/mutable.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/mutable1.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/mutable2.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/my_graph.gv +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/my_graph.pdf +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/name_rebinding.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/not_node_types.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/not_node_types.py~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/not_node_types1.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/not_node_types2.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set19.png~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/power_set8.png~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/pyodide.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/rebinding1.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/rebinding2.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/test.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/test.py~ +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/uva.png +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/images/vscode_copying.gif +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/call_stack.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/config_helpers.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/extension_numpy.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/extension_pandas.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/html_table.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/list_view.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/memory_to_nodes.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/node_base.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/node_key_value.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/node_leaf.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/node_linear.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/node_table.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/sequence.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/slicer.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/slices.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/slices_iterator.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/slices_table_iterator.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test_max_graph_depth.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test_memory_graph.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test_memory_to_nodes.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test_sequence.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test_slicer.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test_slices.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/test_slices_iterator.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph/utils.py +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph.egg-info/dependency_links.txt +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph.egg-info/requires.txt +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/memory_graph.egg-info/top_level.txt +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/setup.cfg +0 -0
- {memory_graph-0.3.37 → memory_graph-0.3.39}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memory_graph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.39
|
|
4
4
|
Summary: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy.
|
|
5
5
|
Author-email: Bas Terwijn <bterwijn@gmail.com>
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -57,11 +57,11 @@ mg.render(data, "my_graph.pdf")
|
|
|
57
57
|
mg.render(data, "my_graph.svg")
|
|
58
58
|
mg.render(data, "my_graph.png")
|
|
59
59
|
mg.render(data, "my_graph.gv") # Graphviz DOT file
|
|
60
|
-
mg.render(data) # renders to
|
|
60
|
+
mg.render(data) # renders to default: 'memory_graph.pdf'
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
# Sharing Values #
|
|
64
|
-
In Python, assigning
|
|
64
|
+
In Python, assigning a list from variable `a` to variable `b` causes both variables to reference the same list value and thus share it. Consequently, any change applied through one variable will impact the other. This behavior can lead to elusive bugs if a programmer incorrectly assumes that list `a` and `b` are independent.
|
|
65
65
|
|
|
66
66
|
<table><tr><td>
|
|
67
67
|
|
|
@@ -100,7 +100,7 @@ b: 4, 3, 2, 1
|
|
|
100
100
|
ids: 126432214913216 126432214913216
|
|
101
101
|
identical?: True
|
|
102
102
|
```
|
|
103
|
-
A better way to understand what data is shared is to draw a graph
|
|
103
|
+
A better way to understand what data is shared is to draw a graph using [memory_graph](https://pypi.org/project/memory-graph/).
|
|
104
104
|
|
|
105
105
|
# Chapters #
|
|
106
106
|
|
|
@@ -108,20 +108,18 @@ A better way to understand what data is shared is to draw a graph of the data us
|
|
|
108
108
|
|
|
109
109
|
[Call Stack](#call-stack)
|
|
110
110
|
|
|
111
|
-
[Global Import Trick](#global-import-trick)
|
|
112
|
-
|
|
113
111
|
[Debugging](#debugging)
|
|
114
112
|
|
|
115
113
|
[Data Structure Examples](#data-structure-examples)
|
|
116
114
|
|
|
117
115
|
[Configuration](#configuration)
|
|
118
116
|
|
|
119
|
-
[Extensions](#extensions)
|
|
120
|
-
|
|
121
117
|
[Introspection](#introspection)
|
|
122
118
|
|
|
123
119
|
[Graph Depth](#graph-depth)
|
|
124
120
|
|
|
121
|
+
[Extensions](#extensions)
|
|
122
|
+
|
|
125
123
|
[Jupyter Notebook](#jupyter-notebook)
|
|
126
124
|
|
|
127
125
|
[ipython](#ipython)
|
|
@@ -182,7 +180,7 @@ a = [4, 3, 2]
|
|
|
182
180
|
b = a
|
|
183
181
|
mg.render(locals(), 'mutable1.png')
|
|
184
182
|
|
|
185
|
-
b += [1]
|
|
183
|
+
b += [1] # equivalent to: b.append(1)
|
|
186
184
|
mg.render(locals(), 'mutable2.png')
|
|
187
185
|
```
|
|
188
186
|
|  |  |
|
|
@@ -198,11 +196,11 @@ Python offers three different "copy" options that we will demonstrate using a ne
|
|
|
198
196
|
import memory_graph as mg
|
|
199
197
|
import copy
|
|
200
198
|
|
|
201
|
-
a = [ [1, 2], ['x', 'y'] ]
|
|
199
|
+
a = [ [1, 2], ['x', 'y'] ] # a nested list (a list containing lists)
|
|
202
200
|
|
|
203
201
|
# three different ways to make a "copy" of 'a':
|
|
204
202
|
c1 = a
|
|
205
|
-
c2 = copy.copy(a)
|
|
203
|
+
c2 = copy.copy(a) # equivalent to: a.copy() a[:] list(a)
|
|
206
204
|
c3 = copy.deepcopy(a)
|
|
207
205
|
|
|
208
206
|
mg.show(locals())
|
|
@@ -300,10 +298,6 @@ This function:
|
|
|
300
298
|
* then blocks execution until the <Enter> key is pressed
|
|
301
299
|
* finally returns the value of the `fun()` call
|
|
302
300
|
|
|
303
|
-
To change its behavior:
|
|
304
|
-
* Set `mg.block_prints_location = False` to skip printing the source location.
|
|
305
|
-
* Set `mg.press_enter_message = None` to skip printing "Press <Enter> to continue...".
|
|
306
|
-
|
|
307
301
|
## Recursion ##
|
|
308
302
|
The call stack is also helpful to visualize how recursion works. Here we use `mg.block()` to show each step of how recursively ```factorial(3)``` is computed:
|
|
309
303
|
|
|
@@ -337,9 +331,9 @@ def get_subsets(subsets, data, i, subset):
|
|
|
337
331
|
subsets.append(subset.copy())
|
|
338
332
|
return
|
|
339
333
|
subset.append(data[i])
|
|
340
|
-
get_subsets(subsets, data, i+1, subset)
|
|
334
|
+
get_subsets(subsets, data, i+1, subset) # do include data[i]
|
|
341
335
|
subset.pop()
|
|
342
|
-
get_subsets(subsets, data, i+1, subset)
|
|
336
|
+
get_subsets(subsets, data, i+1, subset) # don't include data[i]
|
|
343
337
|
mg.block(mg.show, mg.stack())
|
|
344
338
|
|
|
345
339
|
def power_set(data):
|
|
@@ -375,6 +369,7 @@ The ```mg.stack()``` doesn't work well in *watch* context in most debuggers beca
|
|
|
375
369
|
| [Wing](https://wingware.com/) | `mg.stack_wing()` |
|
|
376
370
|
|
|
377
371
|

|
|
372
|
+
See the [Quick Intro (3:49)](https://www.youtube.com/watch?v=23_bHcr7hqo) video for the setup.
|
|
378
373
|
|
|
379
374
|
## Other Debuggers ##
|
|
380
375
|
For other debuggers, invoke this function within the *watch* context. Then, in the "call_stack.txt" file, identify the slice of functions you wish to include as stack frames in the call stack.
|
|
@@ -432,7 +427,7 @@ Package memory_graph can be very useful in a data structures course, some exampl
|
|
|
432
427
|
```python
|
|
433
428
|
import memory_graph as mg
|
|
434
429
|
import random
|
|
435
|
-
random.seed(0)
|
|
430
|
+
random.seed(0) # use same random numbers each run
|
|
436
431
|
|
|
437
432
|
class Linked_List:
|
|
438
433
|
""" Circular doubly linked list """
|
|
@@ -458,7 +453,7 @@ n = 100
|
|
|
458
453
|
for i in range(n):
|
|
459
454
|
value = random.randrange(n)
|
|
460
455
|
linked_list.add_back(value)
|
|
461
|
-
mg.block(mg.show, locals())
|
|
456
|
+
mg.block(mg.show, locals()) # <--- draw locals
|
|
462
457
|
```
|
|
463
458
|

|
|
464
459
|
|
|
@@ -492,7 +487,7 @@ class BinTree:
|
|
|
492
487
|
self.larger = BinTree(value)
|
|
493
488
|
else:
|
|
494
489
|
self.larger.add(value)
|
|
495
|
-
mg.block(mg.show, mg.stack())
|
|
490
|
+
mg.block(mg.show, mg.stack()) # <--- draw stack
|
|
496
491
|
|
|
497
492
|
tree = BinTree()
|
|
498
493
|
n = 100
|
|
@@ -511,7 +506,7 @@ Here we show values being inserted in a Binary Tree in Visual Studio Code. When
|
|
|
511
506
|
```python
|
|
512
507
|
import memory_graph as mg
|
|
513
508
|
import random
|
|
514
|
-
random.seed(0)
|
|
509
|
+
random.seed(0) # use same random numbers each run
|
|
515
510
|
|
|
516
511
|
class HashSet:
|
|
517
512
|
|
|
@@ -524,7 +519,7 @@ class HashSet:
|
|
|
524
519
|
self.buckets[index] = []
|
|
525
520
|
bucket = self.buckets[index]
|
|
526
521
|
bucket.append(value)
|
|
527
|
-
mg.block(mg.show, locals())
|
|
522
|
+
mg.block(mg.show, locals()) # <--- draw locals
|
|
528
523
|
|
|
529
524
|
def contains(self, value):
|
|
530
525
|
index = hash(value) % len(self.buckets)
|
|
@@ -549,9 +544,20 @@ for i in range(n):
|
|
|
549
544
|
Here we show values being inserted in a HashSet in PyCharm. When inserting the last value '44' we "Step Into" the code to show more of the details.
|
|
550
545
|

|
|
551
546
|
|
|
552
|
-
|
|
553
547
|
# Configuration #
|
|
554
|
-
Different aspects of memory_graph can be configured. The default configuration
|
|
548
|
+
Different aspects of memory_graph can be configured. The default configuration can be reset by calling 'mg.config_default.reset()'.
|
|
549
|
+
|
|
550
|
+
- ***mg.reopen_viewer*** : bool
|
|
551
|
+
- If True the viewer is reopened each time show() is called, this might change window focus, default True.
|
|
552
|
+
|
|
553
|
+
- ***mg.config.render_filename*** : str
|
|
554
|
+
- The default filename to render to, default 'memory_graph.pdf'.
|
|
555
|
+
|
|
556
|
+
- ***mg.config.block_prints_location*** : bool
|
|
557
|
+
- If True the source location is printed in block(), default True.
|
|
558
|
+
|
|
559
|
+
- ***mg.config.press_enter_message*** : str
|
|
560
|
+
- Message to ask user to press <Enter> in block(), set to None to disable.
|
|
555
561
|
|
|
556
562
|
- ***mg.config.max_string_length*** : int
|
|
557
563
|
- The maximum length of strings shown in the graph. Longer strings will be truncated.
|
|
@@ -598,7 +604,7 @@ a = [100, 200, 300]
|
|
|
598
604
|
b = a.copy()
|
|
599
605
|
mg.render(locals(), 'not_node_types1.png')
|
|
600
606
|
|
|
601
|
-
mg.config.not_node_types.remove(int)
|
|
607
|
+
mg.config.not_node_types.remove(int) # now show separate nodes for int values
|
|
602
608
|
|
|
603
609
|
mg.render(locals(), 'not_node_types2.png')
|
|
604
610
|
```
|
|
@@ -619,51 +625,13 @@ data = [ list(range(20)) for i in range(1,5)]
|
|
|
619
625
|
highlight = data[2]
|
|
620
626
|
|
|
621
627
|
mg.show( locals(),
|
|
622
|
-
colors = {id(highlight): "red" },
|
|
623
|
-
vertical_orientations = {id(highlight): False },
|
|
624
|
-
slicers = {id(highlight): Slicer()}
|
|
628
|
+
colors = {id(highlight): "red" }, # set color to red
|
|
629
|
+
vertical_orientations = {id(highlight): False }, # set horizontal orientation
|
|
630
|
+
slicers = {id(highlight): Slicer()} # set no slicing
|
|
625
631
|
)
|
|
626
632
|
```
|
|
627
633
|

|
|
628
634
|
|
|
629
|
-
# Extensions #
|
|
630
|
-
Different extensions are available for types from other Python packages.
|
|
631
|
-
|
|
632
|
-
## Numpy ##
|
|
633
|
-
Numpy types `array` and `matrix` and `ndarray` can be graphed with "memory_graph.extension_numpy":
|
|
634
|
-
|
|
635
|
-
```python
|
|
636
|
-
import memory_graph as mg
|
|
637
|
-
import numpy as np
|
|
638
|
-
import memory_graph.extension_numpy
|
|
639
|
-
np.random.seed(0) # use same random numbers each run
|
|
640
|
-
|
|
641
|
-
array = np.array([1.1, 2, 3, 4, 5])
|
|
642
|
-
matrix = np.matrix([[i*20+j for j in range(20)] for i in range(20)])
|
|
643
|
-
ndarray = np.random.rand(20,20)
|
|
644
|
-
mg.show(locals())
|
|
645
|
-
```
|
|
646
|
-

|
|
647
|
-
|
|
648
|
-
## Pandas ##
|
|
649
|
-
Pandas types `Series` and `DataFrame` can be graphed with "memory_graph.extension_pandas":
|
|
650
|
-
|
|
651
|
-
```python
|
|
652
|
-
import memory_graph as mg
|
|
653
|
-
import pandas as pd
|
|
654
|
-
import memory_graph.extension_pandas
|
|
655
|
-
|
|
656
|
-
series = pd.Series( [i for i in range(20)] )
|
|
657
|
-
dataframe1 = pd.DataFrame({ "calories": [420, 380, 390],
|
|
658
|
-
"duration": [50, 40, 45] })
|
|
659
|
-
dataframe2 = pd.DataFrame({ 'Name' : [ 'Tom', 'Anna', 'Steve', 'Lisa'],
|
|
660
|
-
'Age' : [ 28, 34, 29, 42],
|
|
661
|
-
'Length' : [ 1.70, 1.66, 1.82, 1.73] },
|
|
662
|
-
index=['one', 'two', 'three', 'four']) # with row names
|
|
663
|
-
mg.show(locals())
|
|
664
|
-
```
|
|
665
|
-

|
|
666
|
-
|
|
667
635
|
# Introspection #
|
|
668
636
|
This section is likely to change. Sometimes the introspection fails or is not as desired. For example the `bintrees.avltree.Node` object doesn't show any attributes in the graph below.
|
|
669
637
|
|
|
@@ -795,11 +763,62 @@ mg.config.type_to_node[bintrees.avltree.Node] = lambda data: mg.node_table.Node_
|
|
|
795
763
|
[[data.key, data.value],
|
|
796
764
|
[data.left, data.right]] )
|
|
797
765
|
|
|
798
|
-
|
|
799
766
|
mg.show(locals())
|
|
800
767
|
```
|
|
801
768
|

|
|
802
769
|
|
|
770
|
+
## Binary Search ##
|
|
771
|
+
For binary search we can use a List_View class to represent a particular sublist without making a list copy.
|
|
772
|
+
|
|
773
|
+
```python
|
|
774
|
+
import memory_graph as mg
|
|
775
|
+
import random
|
|
776
|
+
random.seed(2) # same random numbers each run
|
|
777
|
+
|
|
778
|
+
class List_View:
|
|
779
|
+
|
|
780
|
+
def __init__(self, lst, begin, end):
|
|
781
|
+
self.lst = lst
|
|
782
|
+
self.begin = begin
|
|
783
|
+
self.end = end
|
|
784
|
+
|
|
785
|
+
def __getitem__(self, index):
|
|
786
|
+
return self.lst[index]
|
|
787
|
+
|
|
788
|
+
def get_mid(self):
|
|
789
|
+
return (self.begin + self.end) // 2
|
|
790
|
+
|
|
791
|
+
def bin_search(view, value):
|
|
792
|
+
mid = view.get_mid()
|
|
793
|
+
if view.begin == mid:
|
|
794
|
+
mg.show(mg.stack()) # <--- show stack
|
|
795
|
+
return view.begin
|
|
796
|
+
if value < view[mid]:
|
|
797
|
+
return bin_search(List_View(view.lst, view.begin, mid), value)
|
|
798
|
+
else:
|
|
799
|
+
return bin_search(List_View(view.lst, mid, view.end), value)
|
|
800
|
+
|
|
801
|
+
# create sorted list
|
|
802
|
+
n = 15
|
|
803
|
+
data = [random.randrange(1000) for _ in range(n)]
|
|
804
|
+
data.sort()
|
|
805
|
+
|
|
806
|
+
# search 'value'
|
|
807
|
+
value = data[random.randrange(n)]
|
|
808
|
+
index = bin_search(List_View(data, 0, len(data)), value)
|
|
809
|
+
print(f'{index=} {data[index]=}')
|
|
810
|
+
```
|
|
811
|
+

|
|
812
|
+
|
|
813
|
+
Arguably the visualization is then more clear when we show a List_View object as an actual sublist using a Node_linear node:
|
|
814
|
+
|
|
815
|
+
```python
|
|
816
|
+
mg.config.type_to_color[List_View] = 'hotpink'
|
|
817
|
+
mg.config.type_to_node[List_View] = lambda data: mg.node_linear.Node_Linear(data,
|
|
818
|
+
data.lst[data.begin:data.end])
|
|
819
|
+
```
|
|
820
|
+

|
|
821
|
+
|
|
803
822
|
|
|
804
823
|
# Graph Depth #
|
|
805
824
|
To limit the size of the graph the maximum depth of the graph is set by `mg.config.max_graph_depth`. Additionally for each type a depth can be set to further limit the graph, as is done for type `B` in the example below. Scissors indicate where the graph is cut short. Alternatively the `id()` of a data elements can be used to limit the graph for that specific element, as is done for the value referenced by variable `c`.
|
|
@@ -823,7 +842,7 @@ class Base:
|
|
|
823
842
|
while len(iter)>1:
|
|
824
843
|
iter = iter[-1]
|
|
825
844
|
return iter
|
|
826
|
-
|
|
845
|
+
|
|
827
846
|
class A(Base):
|
|
828
847
|
|
|
829
848
|
def __init__(self, n):
|
|
@@ -869,6 +888,44 @@ mg.show(locals())
|
|
|
869
888
|
```
|
|
870
889
|

|
|
871
890
|
|
|
891
|
+
# Extensions #
|
|
892
|
+
Different extensions are available for types from other Python packages.
|
|
893
|
+
|
|
894
|
+
## Numpy ##
|
|
895
|
+
Numpy types `array` and `matrix` and `ndarray` can be graphed with "memory_graph.extension_numpy":
|
|
896
|
+
|
|
897
|
+
```python
|
|
898
|
+
import memory_graph as mg
|
|
899
|
+
import numpy as np
|
|
900
|
+
import memory_graph.extension_numpy
|
|
901
|
+
np.random.seed(0) # use same random numbers each run
|
|
902
|
+
|
|
903
|
+
array = np.array([1.1, 2, 3, 4, 5])
|
|
904
|
+
matrix = np.matrix([[i*20+j for j in range(20)] for i in range(20)])
|
|
905
|
+
ndarray = np.random.rand(20,20)
|
|
906
|
+
mg.show(locals())
|
|
907
|
+
```
|
|
908
|
+

|
|
909
|
+
|
|
910
|
+
## Pandas ##
|
|
911
|
+
Pandas types `Series` and `DataFrame` can be graphed with "memory_graph.extension_pandas":
|
|
912
|
+
|
|
913
|
+
```python
|
|
914
|
+
import memory_graph as mg
|
|
915
|
+
import pandas as pd
|
|
916
|
+
import memory_graph.extension_pandas
|
|
917
|
+
|
|
918
|
+
series = pd.Series( [i for i in range(20)] )
|
|
919
|
+
dataframe1 = pd.DataFrame({ "calories": [420, 380, 390],
|
|
920
|
+
"duration": [50, 40, 45] })
|
|
921
|
+
dataframe2 = pd.DataFrame({ 'Name' : [ 'Tom', 'Anna', 'Steve', 'Lisa'],
|
|
922
|
+
'Age' : [ 28, 34, 29, 42],
|
|
923
|
+
'Length' : [ 1.70, 1.66, 1.82, 1.73] },
|
|
924
|
+
index=['one', 'two', 'three', 'four']) # with row names
|
|
925
|
+
mg.show(locals())
|
|
926
|
+
```
|
|
927
|
+

|
|
928
|
+
|
|
872
929
|
# Jupyter Notebook #
|
|
873
930
|
In Jupyter Notebook `locals()` has additional variables that cause problems in the graph, use `mg.locals_jupyter()` to get the local variables with these problematic variables filtered out. Use `mg.stack_jupyter()` to get the whole call stack with these variables filtered out.
|
|
874
931
|
|