sessions of 2026-11-18 (the optimization campaign; three runs without summary, interrupted and rerun)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-18 17:47:59 +01:00
1 parent 8a81c53cd9
commit 0cfbd1b7bc
363 files changed
+30822

No files matched your search

@@ -0,0 +1,19 @@
# Lists the holes of a station with exactly N missing steps (rounded) and the labels touching each hole (id, family).
# Usage: python3 holes.py <station folder> <labels.jsonl> <N>
import json
import sys
from pathlib import Path
sys.path[:0] = [str(Path.home() / "aimsight-tools" / "scripts"), str(Path.home() / "aimsight-detectors" / "scripts")]
from data import iso, load # noqa: E402
from episodes import cadence # noqa: E402
ms = load(sys.argv[1])
labels = [json.loads(x) for x in open(sys.argv[2]) if x.strip()]
n = int(sys.argv[3])
step = cadence(ms)
ts = sorted({m["t"].replace(second=0, microsecond=0) for v in ms.values() for m in v})
for a, b in zip(ts, ts[1:]):
if round((b - a) / step) - 1 == n:
hit = [(x["id"], x["family"]) for x in labels if x["start"] <= iso(b) and x["end"] >= iso(a)]
print(iso(a), iso(b), hit)