Skip to content

Instantly share code, notes, and snippets.

View georgelzh's full-sized avatar
🎯
Focusing

George Li georgelzh

🎯
Focusing
View GitHub Profile
@hosackm
hosackm / flaskaudiostream.py
Created September 2, 2015 22:30
Flask streaming an audio file
from flask import Flask, Response
app = Flask(__name__)
@app.route("/wav")
def streamwav():
def generate():
with open("signals/song.wav", "rb") as fwav:
data = fwav.read(1024)
@Blablaxa
Blablaxa / crash.clj
Created February 16, 2021 22:17 — forked from matthewdowney/crash.clj
The deterministic algorithm behind the casino game https://roobet.com/crash
(ns user.crash
"The deterministic algorithm behind the casino game https://roobet.com/crash.
Includes code to
- generate a crash point from a game hash
- generate all game hashes and crash points since the start of the game
- simulate betting strategies (n.b. this is just for fun, as there's no way
to make a bet with a positive expected value)"
(:require [pandect.algo.sha256 :as sha]))