Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bmedicke/amalthea
collection of 🎉 Jupyter Notebooks 🐐 for JupyterLab, creative coding (voronoi diagrams, perlin noise, chaos game), small demos and tutorials
https://github.com/bmedicke/amalthea
data-science frequency-analysis jupyter-notebook jupyterlab matplotlib mqtt paho pandas perlin-noise python python3 scipy seaborn
Last synced: 7 days ago
JSON representation
collection of 🎉 Jupyter Notebooks 🐐 for JupyterLab, creative coding (voronoi diagrams, perlin noise, chaos game), small demos and tutorials
- Host: GitHub
- URL: https://github.com/bmedicke/amalthea
- Owner: bmedicke
- Created: 2021-05-08T05:19:37.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T09:29:57.000Z (over 2 years ago)
- Last Synced: 2024-12-21T04:29:22.376Z (2 months ago)
- Topics: data-science, frequency-analysis, jupyter-notebook, jupyterlab, matplotlib, mqtt, paho, pandas, perlin-noise, python, python3, scipy, seaborn
- Language: Jupyter Notebook
- Homepage:
- Size: 8.08 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README

# Amalthea - notebooks for JupyterLab## table of contents
* [the notebooks](#the-notebooks)
* [creative coding](#creative-coding)
* [perlin-noise](#perlin-noise)
* [demos](#demos)
* [mqtt-publisher & mqtt-subscriber](#mqtt-publisher--mqtt-subscriber)
* [frequency-analysis-caesar-cipher](#frequency-analysis-caesar-cipher)
* [euclidean-algorithm](#euclidean-algorithm)
* [pomodoro](#pomodoro)
* [speedtest](#speedtest)
* [tutorials](#tutorials)
* [setup & development](#setup--development)
* [venv](#venv)
* [custom shortcuts and settings for JupyterLab](#custom-shortcuts-and-settings-for-jupyterlab)
* [custom shortcuts and settings for Jupyter Notebook](#custom-shortcuts-and-settings-for-jupyter-notebook)
* [requirement management](#requirement-management)
* [used libraries](#used-libraries)## the notebooks
### creative coding
#### perlin-noise





### demos
#### mqtt-publisher & mqtt-subscriber
Cross-notebook communication via MQTT. For a practical example see [bmedicke/quantum_cryptography](https://github.com/bmedicke/quantum_cryptography).
Publishing a message:
Receiving a message from a subscribed topci:
#### frequency-analysis-caesar-cipher
Breaking a caesar ciphre by using a frequency analysis to calculate the key.

#### euclidean-algorithm
This notebooks calculates the greatest common divisor and colors numbers
to make it easier to keep track of the steps.
#### pomodoro
An image showing the current status in a Pomodoro cycle is displayed (via Markdown output). The data is read from an csv file and automatically updates when it changes.

#### speedtest
This notebook analysis a csv file created by a script running speedtest-cli to compare internet provider speeds.

### tutorials
A series of tutorials covering Jupyter and useful libraries.
## setup & development
### venv
```sh
# initial setup:
git clone https://github.com/bmedicke/amalthea.git
cd amalthea
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt# subsequent starts:
source env/bin/activate # if not active.
jupyter notebook notebooks/# if you don't want your browser to open add the flag: --no-browser
# to access the notebook from another device add: --ip=0.0.0.0
```### custom shortcuts and settings for JupyterLab
```json
{
"shortcuts": [
{
"command": "notebook:run-cell",
"keys": [ ";" ],
"selector": ".jp-Notebook:focus"
},
{
"command": "kernelmenu:restart-and-clear",
"keys": [ "Ctrl L" ],
"selector": ".jp-Notebook:focus"
},
{
"command": "notebook:restart-run-all",
"keys": [ "Ctrl Shift R" ],
"selector": ".jp-Notebook:focus"
}
]
}
```* list of commands: https://jupyterlab.readthedocs.io/en/latest/user/commands.html
### custom shortcuts and settings for Jupyter Notebook
Edit the file: `~/.jupyter/nbconfig/notebook.json`.
```json
{
"Cell": {
"cm_config": {
"lineNumbers": true
}
},
"keys": {
"command": {
"bind": {
";": "jupyter-notebook:run-cell",
"?": "jupyter-notebook:show-keyboard-shortcuts",
"ctrl-l": "jupyter-notebook:clear-cell-output",
"g,c": "jupyter-notebook:restart-kernel-and-clear-output",
"g,i": "jupyter-notebook:interrupt-kernel",
"g,r": "jupyter-notebook:restart-kernel-and-run-all-cells",
"g,s": "jupyter-notebook:shutdown-kernel",
"h": "jupyter-notebook:scroll-notebook-up",
"i": "jupyter-notebook:enter-edit-mode",
"l": "jupyter-notebook:scroll-notebook-down",
"s": "jupyter-notebook:split-cell-at-cursor",
"shift-/": "jupyter-notebook:show-keyboard-shortcuts",
"cmd-c": "jupyter-notebook:copy-cell",
"ctrl-v": "jupyter-notebook:paste-cell-replace",
"shift-j": "jupyter-notebook:extend-selection-below",
"shift-k": "jupyter-notebook:extend-selection-above",
"ctrl-j": "jupyter-notebook:move-cell-down",
"ctrl-k": "jupyter-notebook:move-cell-up"
},
"unbind": [
"l",
"h",
"i,i",
"s"
]
}
},
"Notebook": {
"Header": true,
"Toolbar": true
}
}
```### requirement management
**installing libraries from git repos that are not on PyPi**
```sh
pip install -e git+https://github.com/pvigier/perlin-numpy#egg=perlin-numpy
```**updating the `requirements.txt` file after adding or updating libs**
```sh
pip freeze > requirements.txt
```## used libraries
Most of these are in the PyPi and thus can be installed with `pip`. For the rest the pip-egg command will be listed.
* [ipympl](https://github.com/matplotlib/ipympl)
* for `%matplotlib widget`
* [matplotlib](https://github.com/matplotlib/matplotlib)
* [paho-mqtt](https://github.com/eclipse/paho.mqtt.python)
* [pandas](https://github.com/pandas-dev/pandas)
* [perlin-numpy](https://github.com/pvigier/perlin-numpy)
* `pip install -e git+https://github.com/pvigier/perlin-numpy#egg=perlin-numpy`
* [scipy](https://github.com/scipy/scipy)
* [seaborn](https://github.com/mwaskom/seaborn)
* [termcolor](https://pypi.org/project/termcolor/)
* [ipywidgets](https://github.com/jupyter-widgets/ipywidgets)---
Installation without using `requirements.txt`:
```sh
pip install matplotlib paho-mqtt pandas scipy seaborn termcolor ipympl jupyterlab\
-e git+https://github.com/pvigier/perlin-numpy#egg=perlin-numpy
```