Optimizer : l'optimisation des détecteurs depuis une analyse (skill improve, ex wf-improve, agents du dépôt agents, benchmark detectors/bench) ; le batch et le scanner archivés

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-16 10:59:07 +01:00
1 parent 010c297f60
commit 2cb0c88a2b
117 files changed
+132 -38

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
# Médiane horaire d'une colonne pour quelques capteurs, sur plusieurs jours (STATION COL CAPTEUR[,CAPTEUR] J0 J1 [H0 H1]) : le même motif revient-il chaque jour ?
import statistics, sys
from datetime import datetime, timezone
import os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) # outils.py, à côté
from outils import station
nom, col, caps, j0, j1 = sys.argv[1:6]
h0, h1 = (int(x) for x in sys.argv[6:8]) if len(sys.argv) > 7 else (0, 24)
m, _ = station(nom)
for s in caps.split(","):
par = {}
for x in m[s]:
j = x["t"].strftime("%m-%d")
if j0 <= j <= j1 and h0 <= x["t"].hour < h1 and x[col] is not None:
par.setdefault(j, {}).setdefault(x["t"].hour, []).append(x[col])
print(s, col, "heures", h0, "à", h1 - 1)
for j in sorted(par):
print(" ", j, " ".join(f"{statistics.median(par[j][h]):+.3f}" if h in par[j] else " - " for h in range(h0, h1)))