Skip to content

Add 2 new notebooks + migrate 6 existing koaning notebooks into gallery-examples - #68

Merged
koaning merged 5 commits into
mainfrom
add-arnold-and-etf-notebooks
Sep 7, 2026
Merged

Add 2 new notebooks + migrate 6 existing koaning notebooks into gallery-examples#68
koaning merged 5 commits into
mainfrom
add-arnold-and-etf-notebooks

Conversation

@koaning

@koaning koaning commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Consolidates marimo.io gallery notebooks onto the marimo-team side instead of referencing koaning/notebooks.

New notebooks (from koaning/notebooks PRs #107, #108)

  • notebooks/math/arnold-cat-map.py — interactive Arnold's cat map (WASM-friendly)
  • notebooks/dashboard/etf-compare.py — country ETF mix vs FTSE All-World (VWCE); quotes from justETF

Migrated existing gallery notebooks (were pointing at koaning/notebooks)

  • notebooks/algorithms/elastic-net-tsp.py — Elastic Net for the TSP
  • notebooks/algorithms/circle-genetic-art.py — Circle Genetic Art
  • notebooks/algorithms/char-embeddings-2d.py — 2D Character Embeddings
  • notebooks/math/recursive-images.py — Recursive Images
  • notebooks/math/winners-curse.py — The Winner's Curse

(evoc-fashion.py / "Nested Clusters with EVoC" is already on main, so it is not re-copied here — only the marimo-cloud gallery yaml gets re-pointed for it.)

Also included

  • __marimo__/session/<name>.py.json snapshot for each of the seven notebooks, generated with marimo export session --sandbox. validate-sessions.py passes the existence and error-pattern checks.
  • A README table row for each notebook under its category (Algorithms, Math, Dashboard).

All notebook .py files are copied unchanged from koaning/notebooks. After this merges, the marimo-cloud gallery yaml is re-pointed at these paths.

🤖 Generated with Claude Code

Copies two notebooks from koaning/notebooks (PRs #107, #108) into the
gallery-examples repo so the marimo.io gallery can reference first-party
copies:

- notebooks/math/arnold-cat-map.py — interactive Arnold's cat map
- notebooks/dashboard/etf-compare.py — country ETF mix vs FTSE All-World

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 7, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

New notebooks appear to be missing required gallery session artifacts/README entries, and etf-compare uses an unpinned git dependency that is not reproducible.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds two new marimo notebooks to the gallery examples repository so the marimo.io gallery can reference first-party copies rather than external/personal repos.

Changes:

  • Added arnold-cat-map math notebook with an anywidget-powered visualization of Arnold’s cat map and recurrence period.
  • Added etf-compare dashboard notebook to compare a weighted set of country ETFs against the VWCE benchmark using justETF data.
File summaries
File Description
notebooks/math/arnold-cat-map.py New interactive math notebook implementing Arnold’s cat map with a custom anywidget canvas renderer.
notebooks/dashboard/etf-compare.py New dashboard notebook that fetches/caches ETF quotes and renders interactive Vega-Lite return and drawdown charts.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +3 to +7
# dependencies = [
# "marimo",
# "polars==1.37.1",
# "justetf-scraping @ git+https://github.com/druzsan/justetf-scraping.git",
# ]
Comment on lines +291 to +292
if __name__ == "__main__":
app.run()
Comment on lines +296 to +297
if __name__ == "__main__":
app.run()
$$\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} \pmod{N}.$$

This operation has a fun twist: if you keep applying it the tiles must
eventually return home.That recurrence **period depends only on $N$**,
These six notebooks are already in the marimo.io gallery but reference
koaning/notebooks. Copy them here so the gallery can point at first-party
marimo-team copies:

- notebooks/algorithms/evoc-fashion.py       (Nested Clusters with EVoC)
- notebooks/math/recursive-images.py         (Recursive Images)
- notebooks/algorithms/elastic-net-tsp.py    (Elastic Net for the TSP)
- notebooks/math/winners-curse.py            (The Winner's Curse)
- notebooks/algorithms/circle-genetic-art.py (Circle Genetic Art)
- notebooks/algorithms/char-embeddings-2d.py (2D Character Embeddings)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@koaning koaning changed the title Add arnold-cat-map and etf-compare notebooks Add 2 new notebooks + migrate 6 existing koaning notebooks into gallery-examples Sep 7, 2026
koaning and others added 3 commits September 7, 2026 17:31
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generate __marimo__/session/*.py.json snapshots via 'marimo export session'
for the two new notebooks and the five newly-migrated ones, and add a README
table row for each under its category (Algorithms, Math, Dashboard).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
marimo 0.24 moved current_notebook_code_hashes from
marimo._server.export._session_cache to marimo._export._session_cache,
which broke the freshness check on every PR. Import the new path and fall
back to the old one for compatibility.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@koaning
koaning merged commit 7572474 into main Sep 7, 2026
2 checks passed
@koaning
koaning deleted the add-arnold-and-etf-notebooks branch September 7, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants