This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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])) |