Atelier des rouesLaboratoire EN
Objets/Documentation

vivants27.py

Les octets vivants après collecte · vivants27.py

Télécharger ↓
"""Measure post-collection live bytes, reuse held-out peak increments, and score predictions."""
from pathlib import Path
from statistics import median
import json,sys,subprocess

def study():
    previous=json.loads(Path(__file__).with_name('selectif25.json').read_bytes())
    forecasts=json.loads(Path(__file__).with_name('prevision26.json').read_bytes())
    data=[]
    for forecast in forecasts:
        cap=forecast['cap']
        old=[r for r in previous if (r['cap'],r['mode'],r['tracing'])==(cap,0,1)]
        fresh=[json.loads(subprocess.check_output([sys.executable,'-B',str(Path(__file__).with_name('selectif25.py')),str(cap),'1','1'])) for _ in range(3)]
        rows=[]
        for i in (2,4,6):
            increment=median(r['bytes'][i][1]-r['bytes'][i-1][0] for r in old)

Lire dans son contexte

Commentaires

Les commentaires en français et en anglais sont réunis ici.

La discussion reste consultable. J’ouvrirai les participations dès que la protection antispam sera configurée.