Authors: Aidan Aug, Mark Tiavas, Karen He, Alan Zhang
This repository contains the source code for Team 42's Final Project. For our project, we decided to develop a teaching plan for probabilistic data structures with relevance to genomics. Our final deliverable includes a range of supporting materials, such as tutorials, worked examples, pedagogical visualizations or animations, assessments.
This GitHub repository contains the source code for the data structures implemented, as well as the code for the animations created using Manim and Manim Slides.
Code for implementations can be found in prob-data-struct folder.
There are 3 data structures implemented, BloomFilter, CuckooFilter, and CountMin.
The real implementations are in BloomFilter.py, cuckooFilter.py, and CountMin.py.
Simply run the following command to test them out
python BloomFilter.pyYou may need to pip install bitstring to run cuckooFilter.py
The homework assignment templates are in the corresponding Template.Py files. They also will be run by
python BloomFilterTemplate.py
Examples inputs are present in each file.
Please see the source code for the dependencies used in this project:
- Manim: https://github.com/ManimCommunity/manim
- Manim-slides: https://github.com/jeertmans/manim-slides
For convenience, installation instructions are listed here.
While installing Manim Slides and its dependencies on your global Python is fine, it is recommended to use a virtualenv for a local installation. To avoid linting errors, please install both manim and manim-slides in the same virtual environment.
Manim Slides requires either Manim or ManimGL to be installed. Having both packages installed is fine too.
If none of those packages are installed, please refer to their specific installation guidelines:
Note that we require latex to be installed for our presentation.
Alternatively, you can install the original manim-slides repository directly, and copy/paste relevant python files for animation.
The recommended way to install the latest release is to use pip:
pip install manim-slidesIf you do not have pip, please refer to the docs for installation: https://pip.pypa.io/en/stable/installation/
Install this lecture plan by cloning this repository locally, or unzipping the package. Manim Slides is to clone the git repository, and install from there:
git clone https://github.com/aaug1/GenomicsDataStruct.gitNote: the
-eflag allows you to edit the files, and observe the changes directly when using Manim Slides
Tool for live presentations using either Manim (community edition) or ManimGL. Manim Slides will automatically detect the one you are using!
Using Manim Slides is a two-step process:
- Render animations using
Slide(resp.ThreeDSlide) as a base class instead ofScene(resp.ThreeDScene), and add calls toself.pause()everytime you want to create a new slide. - Run
manim-slideson rendered animations and display them like a Power Point presentation.
The command-line documentation is available online.
Wrap a series of animations between self.start_loop() and self.stop_loop() when you want to loop them (until input to continue):
# example.py
from manim import *
# or: from manimlib import *
from manim_slides import Slide
class Example(Slide):
def construct(self):
circle = Circle(radius=3, color=BLUE)
dot = Dot()
self.play(GrowFromCenter(circle))
self.pause() # Waits user to press continue to go to the next slide
self.start_loop() # Start loop
self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
self.end_loop() # This will loop until user inputs a key
self.play(dot.animate.move_to(ORIGIN))
self.pause() # Waits user to press continue to go to the next slide
self.wait()You must end your Slide with a self.play(...) or a self.wait(...).
First, render the animation files:
manim example.py
# or
manimgl example.pyTo start the presentation using Scene1, Scene2 and so on simply run:
manim-slides [OPTIONS] Scene1 Scene2...Or in this example:
manim-slides ExampleFirst, render the animation files:
manim bloom.py
# or
manimgl bloom.pyTo start the interactive manim presentation
manim-slides BloomThe default key bindings to control the presentation are:
You can run the configuration wizard to change those key bindings:
manim-slides wizardA default file can be created with:
manim-slides initNOTE:
manim-slidesuses key codes, which are platform dependent. Using the configuration wizard is therefore highly recommended.
Below is a non-exhaustive list of features:
| Feature | manim-slides |
manim-presentation |
|---|---|---|
| Support for Manim | ✔️ | ✔️ |
| Support for ManimGL | ✔️ | ✖️ |
| Configurable key bindings | ✔️ | ✔️ |
| Configurable paths | ✔️ | ✖️ |
| Play / Pause slides | ✔️ | ✔️ |
| Next / Previous slide | ✔️ | ✔️ |
| Replay slide | ✔️ | ✔️ |
| Reverse slide | ✔️ | ✖️ |
| Multiple key per actions | ✔️ | ✖️ |
| One command line tool | ✔️ | ✖️ |
| Robust config file parsing | ✔️ | ✖️ |
| Support for 3D Scenes | ✔️ | ✖️ |
| Documented code | ✔️ | ✖️ |
| Tested on Unix, macOS, and Windows | ✔️ | ✖️ |
| Hide mouse cursor | ✔️ | ✖️ |
On Windows platform, one may encounter a lower image resolution than expected. Usually, this is observed because Windows rescales every application to fit the screen. As found by @arashash, in #20, the problem can be addressed by changing the scaling factor to 100%:
in Settings->Display.




