mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-07 10:08:50 -05:00
Companion commit to c5f90022b (the YAML migration). Pulls in the rest of
the periodic-table work that was sitting in the working tree.
- periodic-table/paper/: LaTeX paper draft (paper.tex, references.bib),
Makefile with hero-figure and SVG->PDF rules (uses rsvg-convert), the
Puppeteer capture_table.js script used to screenshot the table for the
paper, generate_periodic_svg.py which builds the hero SVG from
table.yml (the same source of truth used by the React app), and the
figure sources (SVGs) + derived outputs (PDFs/PNGs) + compiled paper.pdf.
- root .gitignore gains two entries following the existing convention
(cf. the !interviews/paper/fig-*.pdf line just above) so the
periodic-table paper PDF + figure PDFs are not swept up by the blanket
*.pdf LaTeX-artifact rule.
- periodic-table/paper/.gitignore excludes the LaTeX build artifacts
(aux, bbl, blg, log, out, fdb_latexmk, synctex, toc) that make paper
regenerates.
- periodic-table/{iteration,refinement,debate}-log.md: research
provenance from the 100-round LLM iteration loop and the 5-expert
debate simulations that produced v0.2 of the table.
- periodic-table/scripts/archive/: historical iteration scripts
(iterate.sh, debate.sh, debate-continue.sh, run_100_rounds.sh, plus
the Python helpers append_log.py, get_elements.py, patch_informal.py,
patch_website.py, run_claude_loop.py, run_iterations{,_13,_16_20}.py,
update_log.py) moved out of the repo root into an archive subdirectory
with a README documenting their provenance and caveats. These scripts
are preserved for reproducibility and are not part of the active build
pipeline -- the source of truth is now periodic-table/table.yml.
- root package.json + package-lock.json pin puppeteer ^24 for
capture_table.js.
19 lines
1.2 KiB
Python
19 lines
1.2 KiB
Python
import re
|
|
|
|
html_path = 'periodic-table/index.html'
|
|
with open(html_path, 'r') as f:
|
|
content = f.read()
|
|
|
|
informal_elements = """ // Informal symbols used in Compound Formulas
|
|
[86,'Ac','Activation','C',3,8,'—','Non-linear functions (ReLU, GELU) providing expressive power.',['Dd'],'Row 2 (Algorithm): non-linear transform. Compute.'],
|
|
[87,'St','State','R',2,3,'—','The mathematical representation of an environment or context (RL, SSMs).',['Ob'],'Row 1 (Math): contextual state. Represent.'],
|
|
[88,'Re','Retrieve','X',5,11,'—','Fetching stored state or external knowledge (e.g., from a KV Cache or Vector DB).',['Hs'],'Row 4 (Optimization): state retrieval. Communicate.'],
|
|
[89,'Wa','Weight Avg','C',5,8,'—','Averaging model weights across time or distributed workers (e.g., SWA, EMA).',['Pm'],'Row 4 (Optimization): parameter smoothing. Compute.'],
|
|
[90,'Ct','Critic','K',3,11,'—','The value function evaluating the expected return of a state (Actor-Critic RL).',['St','Gd'],'Row 2 (Algorithm): evaluative model. Control.']
|
|
];"""
|
|
|
|
content = content.replace("fault tolerance. Control.']\n];", "fault tolerance. Control.'],\n" + informal_elements)
|
|
|
|
with open(html_path, 'w') as f:
|
|
f.write(content)
|