This repo applies faks-socketio
, websocket
, and jupyter notebook
to fulfill an interface that allow you to host a simple code competition.
conda create -n {YOUR_VM_NAME} python=3.9
conda activate {YOUR_VM_NAME}
pip install -r requirements.txt
jupyter notebook
python app.py
-
snippet
jupyter notebook api -
socketio
connect and disconnect -
flask
template index.html -
flask
beautify code block by codemirror -
jupyter
notebook crud -
jupyter
session and kernel lifecycle -
websocket
send message onto jupyter kernel -
websocket
parse recieve message from kernel -
socketio
main message process -
socketio
use cookie for cache -
algorithm
fibonacci as the code case -
jupyter
force stopping kernel while timeout -
socketio
async emit the message -
websocket
unstable process order
- ChatGPT
- Jupyter Notebook Server API
- WebSocket kernel wire protocols
- 使用 Flask-SocketIO 完成 WebSocket 雙向通訊