nicer twitch emulation and stream to buttons via test.sh lookin good
parent
bdb874cd5e
commit
67296f73e3
|
|
@ -16,7 +16,13 @@ def main():
|
|||
if not key in buckets:
|
||||
buckets[key] = False
|
||||
buckets[key] = False if line[0] == "/" else float(line.split()[-1])
|
||||
print("[", " ".join(sorted([f"{int(i)}={buckets[i]}" for i in buckets if buckets[i]])), "]")
|
||||
print(
|
||||
"[",
|
||||
" ".join(sorted([
|
||||
"{:2}={}".format(int(100*buckets[i]), i) for i in buckets if buckets[i]
|
||||
], reverse=True)),
|
||||
"]",
|
||||
)
|
||||
|
||||
def get_args():
|
||||
ap = argparse.ArgumentParser()
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ def with_(P, D, M):
|
|||
window.push(got)
|
||||
report = window.report()
|
||||
#print(report)
|
||||
for k in [k for k in report if k in previous]:
|
||||
if report[k] != previous[k]:
|
||||
cb.cb(k)(State(True, report[k]))
|
||||
for k in [k for k in report if not k in previous]:
|
||||
cb.cb(k)(State(True, report[k]))
|
||||
for k in [k for k in previous if not k in report]:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ python3 ./testdata/rand_0_n_weighted_stream.py \
|
|||
-d-min 100 \
|
||||
-d-max 3000 \
|
||||
-between 10 \
|
||||
-w 3 \
|
||||
| peek \
|
||||
| python3 ./stream_to_state.py \
|
||||
-d 10000 \
|
||||
-m .2
|
||||
-m 0.1
|
||||
|
|
|
|||
Loading…
Reference in New Issue