Skip to content

collection of πŸŽ‰ Jupyter Notebooks 🐐 for JupyterLab, creative coding (voronoi diagrams, perlin noise, chaos game), small demos and tutorials

Notifications You must be signed in to change notification settings

bmedicke/amalthea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

amalthea logo

Amalthea - notebooks for JupyterLab

table of contents

the notebooks

creative coding

perlin-noise

perlin noise example 3 perlin noise example 0 perlin noise example 4 perlin noise example 2 perlin noise example 1 perlin noise example 5

demos

mqtt-publisher & mqtt-subscriber

Cross-notebook communication via MQTT. For a practical example see bmedicke/quantum_cryptography.

Publishing a message: mqtt pubisher sample

Receiving a message from a subscribed topci: mqtt subscriber sample

frequency-analysis-caesar-cipher

Breaking a caesar ciphre by using a frequency analysis to calculate the key.

frequency-analysis sample caesar-cipher sample

euclidean-algorithm

This notebooks calculates the greatest common divisor and colors numbers to make it easier to keep track of the steps.

euclidean-algorithm sample

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.

pomodoro_working

speedtest

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

speedtest sample 0 speedtest sample 1

tutorials

A series of tutorials covering Jupyter and useful libraries.

setup & development

venv

# 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

{
  "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"
      }
  ]
}

custom shortcuts and settings for Jupyter Notebook

Edit the file: ~/.jupyter/nbconfig/notebook.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

pip install -e git+https://github.com/pvigier/perlin-numpy#egg=perlin-numpy

updating the requirements.txt file after adding or updating libs

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.


Installation without using requirements.txt:

pip install matplotlib paho-mqtt pandas scipy seaborn termcolor ipympl jupyterlab\
    -e git+https://github.com/pvigier/perlin-numpy#egg=perlin-numpy

About

collection of πŸŽ‰ Jupyter Notebooks 🐐 for JupyterLab, creative coding (voronoi diagrams, perlin noise, chaos game), small demos and tutorials

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published