Skip to content

Instantly share code, notes, and snippets.

View koaning's full-sized avatar

vincent d warmerdam koaning

View GitHub Profile
@koaning
koaning / zugzug.py
Created July 18, 2026 21:12
workon
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "typer",
# ]
# ///
import typer
import subprocess
import sys
@koaning
koaning / altairexample.py
Created July 15, 2026 09:32
altair example
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "altair",
# "vega-datasets",
# ]
# ///
"""
Annual Weather Heatmap
@koaning
koaning / demo.js
Last active July 14, 2026 15:31
manim-web-demo
const player = new manim.Player(container, {
width,
height,
autoPlay: true,
backgroundColor: manim.BLACK,
});
player.sequence(async (scene) => {
const circle = new manim.Circle({ radius: 1.5, color: manim.BLUE, fillOpacity: 1 });
await scene.play(new manim.Create(circle));
@koaning
koaning / marimo-remote-guard.ts
Created April 13, 2026 13:45
marimo pi remote guard
import path from "node:path";
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import { isToolCallEventType } from "@mariozechner/pi-coding-agent";
const SKILL_DIR = "/Users/vincentwarmerdam/.agents/skills/marimo-pair";
const ALLOWED_READ_ROOTS = [SKILL_DIR];
function hasDangerousShellSyntax(command: string): boolean {
return /(&&|\|\||;|\||>|`)/.test(command);
}
@koaning
koaning / demodemo.py
Created December 2, 2025 13:57
demodemo.py
# /// script
# dependencies = [
# "marimo>=0.17.0",
# "polars",
# "pyzmq",
# ]
# ///
import marimo
@koaning
koaning / demodemo.py
Created December 2, 2025 13:50
demodemo.py
# /// script
# dependencies = [
# "marimo>=0.17.0",
# "polars",
# "pyzmq",
# ]
# ///
import marimo
@koaning
koaning / demodemo.py
Created December 2, 2025 13:37
demodemo.py
# /// script
# dependencies = [
# "marimo>=0.17.0",
# "polars",
# "pyzmq",
# ]
# ///
import marimo
@koaning
koaning / maybe.py
Last active November 29, 2025 19:53
class Maybe:
def __init__(self, obj):
self._obj = obj
def __getattr__(self, name):
if self._obj is None:
return Maybe(None)
try:
result = getattr(self._obj, name)
return Maybe(result)
import pyarrow as pa
from typing import Any, Dict, List, Optional, Tuple, Union
class LogfireDBError(Exception):
"""Base exception for Logfire DB API errors"""
pass
class LogfireDBOperationalError(LogfireDBError):
@koaning
koaning / marimo-logfire.md
Created October 24, 2025 08:34
Logfire <-> marimo SQL

These classes allow you to define a DB connection that marimo understands.

import pyarrow as pa
from typing import Any, Dict, List, Optional, Tuple, Union


class LogfireDBError(Exception):
    """Base exception for Logfire DB API errors"""
    pass