Skip to content

Instantly share code, notes, and snippets.

View kolibril13's full-sized avatar
🐶

Jan-Hendrik Müller kolibril13

🐶
View GitHub Profile
@kolibril13
kolibril13 / example_ipydrop_csv.py
Last active October 9, 2024 16:20
ipydrop asset
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "ipydrop==0.0.1",
# "marimo",
# "matplotlib==3.9.2",
# "numpy==2.1.2",
# ]
# ///
import marimo
@kolibril13
kolibril13 / datasaurus.ipynb
Created October 9, 2024 21:54
datasaurus - data mean std
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kolibril13
kolibril13 / file_drag.py
Created October 10, 2024 09:19
marimo drag'n'drop
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "marimo",
# "matplotlib==3.9.2",
# "numpy==2.1.2",
# ]
# ///
import marimo
@kolibril13
kolibril13 / color_picker.py
Created October 10, 2024 11:35
marimo reactflow color picker with uv requirements (run with `uvx marimo edit --sandbox color_picker.py` )
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "ipyreactflow==0.0.7",
# "marimo",
# "matplotlib==3.9.2",
# "numpy==2.1.2",
# ]
# ///
import marimo
@kolibril13
kolibril13 / blender_notebook.txt
Last active November 11, 2024 18:08
blender notebook setup
# Install Blender from https://www.blender.org/download/
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
mkdir blender_python_workshop && cd blender_python_workshop
uv venv --python 3.11
uv pip install jupyterlab blender_notebook
uv run blender_notebook install --blender-exec="/Applications/Blender.app/Contents/MacOS/Blender"
uv run jupyter lab
@kolibril13
kolibril13 / nb_image_compressor.py
Last active January 25, 2025 21:22
Compress images in notebooks
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "nbformat==5.10.4",
# "pillow==11.0.0",
# ]
# ///
from pathlib import Path
import nbformat
# /// script
# requires-python = ">=3.11,<3.12"
# dependencies = [
# "bpy==4.2.0",
# "marimo",
# ]
# ///
import marimo
# /// script
# requires-python = ">=3.11,<3.12"
# dependencies = [
# "bpy==4.2.0",
# "marimo",
# "numpy==2.1.3",
# "polars==1.14.0",
# "quak==0.2.1",
# ]
# ///
@kolibril13
kolibril13 / benchmark.py
Created November 29, 2024 15:20
pandas vs polars for reading csv files
# /// script
# requires-python = ">=3.12,<3.13"
# dependencies = [
# "pandas",
# "polars",
# ]
# ///
# note: the header of this script was generated by the command
# uv add --script benchmark.py pandas polars
@kolibril13
kolibril13 / convert_mov_to_mp4.py
Created December 1, 2024 17:02
convert mov to mp4 files with ffmpeg
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "ffmpeg-python",
# ]
# ///
# header generated with
# uv add --script convert_mov_to_mp4.py ffmpeg-python
from pathlib import Path