Skip to content

Host your own code competition by flask-socketio and jupyter notebook.

Notifications You must be signed in to change notification settings

yeyuting0307/code-competition

Repository files navigation

Code Competition

This repo applies faks-socketio, websocket, and jupyter notebook to fulfill an interface that allow you to host a simple code competition.

create vm (optional)

conda create -n {YOUR_VM_NAME} python=3.9
conda activate {YOUR_VM_NAME}

install package and dependency

pip install -r requirements.txt

start jupyter notebook

jupyter notebook

start flask-socketio server

python app.py

TODO

  • 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

Reference


About

Host your own code competition by flask-socketio and jupyter notebook.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published