Atelier des rouesLab FR
Objects/Documentation

poids31.py

Shared conditionals and checks · poids31.py

Download ↓
"""Certified samples along a one-weight perturbation and a bracket of degree change."""
import json
from fractions import Fraction as F
from functools import lru_cache
from decouverte30 import normalized,discover,certify

@lru_cache(None)
def sample(s):
    laws=normalized([[9,5,7,6],[1,9+s,7,4],[1,3,2,8]])
    d=discover(laws,20)
    for c in sorted(d['candidates'],key=lambda z:-len(z['coeff'])):
        rec=certify(str(s),d,c['coeff'])
        if rec:
            return dict(s=s,degree=len(c['coeff'])-1,region=d['region'],events=sorted({v for tag in c['source'] if isinstance(tag,list) for v in tag[-1]}),owners=d['owners'],certificate=rec)
    raise ValueError(s)

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.