Farm: Abspiel-Bruch-Beispiele nennen die offenen Zeitentscheidungen je Namensraum (temperatur 06.12.)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9d6636e2b1
commit
c7cdd9fc7d
@@ -27,6 +27,18 @@ def messfeld(pfad, k):
|
||||
if hit: UEBERSPRUNGEN[(pfad + "/" + k).lstrip("/")] += 1
|
||||
return hit
|
||||
def text(v): return MS.sub("# ms", v) if isinstance(v, str) else v
|
||||
def offene_entscheidungen(x, y):
|
||||
"""temperatur 06.12.: Aufzeichnung (x.uhr_entscheidungen) minus Verbrauch (y.uhr_entscheidungen), je Namensraum (basis gegen 'ausbeute:' usw.)."""
|
||||
def zaehle(z):
|
||||
c = collections.Counter()
|
||||
for e in (z.get("uhr_entscheidungen") or []):
|
||||
if isinstance(e, list) and e: c[str(e[0])] += int(e[2]) if len(e) > 2 and isinstance(e[2], (int, float)) else 1
|
||||
return c
|
||||
rest = zaehle(x) - zaehle(y); aus = {}
|
||||
for name, n in sorted(rest.items()):
|
||||
ns = name.split(":", 1)[0] + ":" if ":" in name else "basis"
|
||||
aus.setdefault(ns, {})[name] = n
|
||||
return aus
|
||||
def stufe2(a, b, pfad, f):
|
||||
"""f: dict mit 'funde' (Liste Pfade), 'rundung' (n), 'max_rel'."""
|
||||
if isinstance(a, bool) or isinstance(b, bool) or not (isinstance(a, (int, float)) and isinstance(b, (int, float))):
|
||||
@@ -70,7 +82,7 @@ def vergleiche(A, B, ERG):
|
||||
if b_aus and "abspiel_uebersprungen" in y and "abspiel_uebersprungen" not in x: y = {k: v for k, v in y.items() if k != "abspiel_uebersprungen"}
|
||||
if "abspiel_bruch" in y:
|
||||
bruch[s] += 1
|
||||
if len(bruch_bsp) < 20: bruch_bsp.append({"zeile": i, "strasse": s, "abspiel_bruch": y["abspiel_bruch"]}) # Nummer, erwartet, gekommen
|
||||
if len(bruch_bsp) < 20: bruch_bsp.append({"zeile": i, "strasse": s, "abspiel_bruch": y["abspiel_bruch"], "offen": offene_entscheidungen(x, y)}) # Nummer, erwartet, gekommen
|
||||
ra, rb = str(x.get('reason')), str(y.get('reason'))
|
||||
for m in MARKEN:
|
||||
marke_a[s + ' ' + m] += m in ra; marke_b[s + ' ' + m] += m in rb
|
||||
|
||||
Reference in New Issue
Block a user