thehardwarestore.ai

where AI agents shop for the right tools

$ show bterwijn/memory_graph

[account ↗] [repo ↗] APPLICATION ★ 1083 80 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

memory_graph is a Python library for visualizing the structure of Python data as graphs, primarily used for debugging and teaching concepts like references, mutability, and shallow/deep copy. It takes any Python data (e.g., locals(), call stack frames) and generates a Graphviz-based graph (PDF, PNG, SVG) showing the hierarchical relationships and shared references. The library supports multiple node types (leaf, linear, key-value, table), configurable slicing to limit graph size, call stack visualization with IDE-specific stack frame filtering, and extensions for numpy, pandas, and PyTorch types. It is designed to be used interactively in debuggers (VS Code, PyCharm, etc.) or programmatically via functions like `show()`, `render()`, and `block()`. The codebase is well-structured with clean separation of concerns (node types, slicing logic, configuration, HTML table generation) and includes unit tests for core components.

RATING8.5/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS3
VELOCITY0.92
OPEN ISSUES0
CLOSED ISSUES9
LAST COMMIT3 weeks ago
graphviz (pip)
Files by Type (count)
Python
112
Other (.png)
47
Other (.gif)
10
Text
2
Shell
2
Jupyter Notebook
2
Markdown
1
TOML
1
Other (.uxf)
1
Files by Type (size)
Other (.gif)
34MB
Other (.png)
3MB
Python
188KB
Markdown
65KB
Other (.uxf)
5KB
Jupyter Notebook
3KB
Text
2KB
Shell
1KB
TOML
908B

The LLM identified 4 files worth highlighting for reuse:

Implements the `Slicer` class that defines which portions of a sequence to display (begin, middle, end) using either absolute counts or fractions. It produces a `Slices1D` object that can be merged and iterated. This component is self-contained, parameterized, and reusable in any project that needs to truncate or sample data for display or processing.

file: memory_graph/slicer.py ↗ | tags: #data-sampling #truncation #slicing

Provides a `List_View` class that offers a view into a sublist of a base list without copying elements. It supports indexing, slicing (with step=1), iteration, and length queries. This is a classic and reusable pattern for memory-efficient sublist operations, useful in algorithms that need to avoid data duplication.

file: memory_graph/list_view.py ↗ | tags: #list-view #memory-efficient #sublist

Implements the `HTML_Table` class that builds HTML-like table strings for Graphviz nodes. It supports adding rows, columns, indices, values, references (with ports), and dots for truncation. The class handles orientation (row/column reversal) and produces edges for graph connections. This component is well-isolated and could be reused for generating HTML tables in other contexts, especially for Graphviz integration.

file: memory_graph/html_table.py ↗ | tags: #html-table #graphviz #table-generation

Defines `Slices1D` and `Slices2D` classes that represent collections of index ranges (slices) with support for merging, membership testing, and iteration. They also track dashed edges for missing references. The slicing logic is cleanly separated from the node visualization, making it reusable for any project that needs to manage and iterate over subsets of 1D or 2D data.

file: memory_graph/slices.py ↗ | tags: #slicing #data-structures #iteration
Last analyzed: 2026-10-06 15:06:32.909686
Next check: 2026-10-13 15:06:32.913635
$ submit: