wk0 / pypipie

A toy project showcasing python async generators, websocket communication, and Leibniz's genius

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pypipie

Inspiration

  • A crypto trading engine I worked on for a year and some change. Relied heavily on websocket connections and asyncio.
  • Classic Computer Science Problems in Python
  • A mix of boredom and curiosity on a Sunday afternoon

Idea Overview:

  • Python generator produces converging estimations of Pi from Leibniz's formula
  • Each update is sent (with an index corresponding to items in the series) via websocket
  • Frontend produces a new row in the table for every new estimate it receives

How to use

Uses pipenv https://github.com/pypa/pipenv

cd pypipie
pipenv install
pipenv shell 
python3 backend.py

then open frontend.html in web browser. Might have to refresh.

Stop program via Ctrl-C on python script or exiting web page.

About

A toy project showcasing python async generators, websocket communication, and Leibniz's genius

License:MIT License


Languages

Language:Python 60.7%Language:HTML 39.3%