commit e6cf1c6b5f0b5b999fd3685b8a712570b3b8b4fe Author: Julien Palard Date: Sun Apr 16 22:48:49 2023 +0200 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..18fb741 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +This is the sapin server to serve as an HackInScience example. + +It's hosted on https://sapin.hackinscience.org. diff --git a/sapin.py b/sapin.py new file mode 100644 index 0000000..d5e922d --- /dev/null +++ b/sapin.py @@ -0,0 +1,49 @@ +from io import BytesIO +from zipfile import ZipFile +import os + +from flask import Flask, request + +app = Flask(__name__) + +expr_zip = BytesIO( + # Look ma! An ugly binary blob! Is that how non-free software actually look? + b"PK\x03\x04\x14\x00\t\x00\x08\x009\xb3\x90V\xc2U\xacy4\x00\x00\x001\x00" + b"\x00\x00\x04\x00\x1c\x00exprUT\t\x00\x03\xceY/?n=10." + ) + return "
" + "\n".join(sapin(fir_width)) + "
"