This project is a simple example of a python implementation of a message throttler.
You should have a unix-type machine (e.g. OSX, Linux) and python3
on your path.
make demo
to see sample outputmake test
to run unit testsmake run_notebooks
to run the visualization demo
The implementation is in throttle.py. It is a somewhat naive implementation using the native python deque class. This is somewhat performant, but obviously a custom class optimized for this tiny use case could be much faster.
After running make test
,
you should be able to open up the top-level directory in PyCharm right away.
The following run configurations are available:
harness
: run the command-line harness (with default input)Unit tests
: run unit tests
There is a sample Jupyter notebook here.
To run it: make run_notebooks
.
You should be able to get a histogram slider like this one: