Skip to content

Instantly share code, notes, and snippets.

View amotl's full-sized avatar

Andreas Motl amotl

  • $PYTHONPATH
View GitHub Profile
@WalBeh
WalBeh / soup2.py
Last active April 11, 2025 11:55
Get a condensed view on the cratedb documentation...
#!/usr/bin/env uv python
"""
CrateDB Settings Extractor
This tool extracts settings from CrateDB's documentation and outputs them
in either JSON or Markdown format, or the SQL statements to set the default value.
It parses the HTML structure of the documentation to identify settings, their
descriptions, default values, and whether they're runtime configurable.
Author: wolta
@codeinthehole
codeinthehole / git-fixup-files
Created August 8, 2024 11:01
Custom version of `git absorb` which autosquashes unstaged changes
#!/usr/bin/env bash
#
# Try and squash unstaged changes into existing branch commits.
#
# This command examines each unstaged file and attempts to create a fix-up
# commit to squash it into its natural parent in the current branch.
#
# - If it's able to do this for all modified files, the fix-up files are
# automatically squashed in.
#
@tkurki
tkurki / 00doc.md
Last active August 16, 2024 13:00
Wind Speed and Direction with Grafana ECCharts plugin
@hyperupcall
hyperupcall / settings.jsonc
Last active June 26, 2025 09:47
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@todbot
todbot / synthio_midi_synth.py
Last active March 26, 2025 18:58
pretty usable MIDI-controlled synth using synthio in CircuitPython
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython
# 11 May 2023 - @todbot / Tod Kurt
# Uses cheapie PCM5102 DAC on QTPY RP2040
# Video demo: https://www.youtube.com/watch?v=N-PbbWWDE6k
# Features:
# - midi velocity controls attack rate (gentle press = slow, hard press = fast)
# - notes have small random detune on all oscillators to reduce phase stacking
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83)
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82)
# - vibrato depth on mod wheel (midi controller 1)
@Suor
Suor / 1-plus-n.md
Created March 22, 2023 11:11
Trying to make ChatGPT to write a blog post

> Write a blog post about this code trick:

import logging
import os

from funcy import monkey

from django.db.models.query_utils import DeferredAttribute
@scollis
scollis / plotLidar.py
Created December 10, 2022 19:11
quick ingest and plot of HALO LiDAR
import numpy as np
from netCDF4 import Dataset
import os
import datetime
import xarray as xr
import pandas as pd
import matplotlib.dates as mdates
import matplotlib.dates as mdates
from matplotlib import pyplot as plt
from matplotlib.colors import LogNorm
@xylar
xylar / grayskull_autoupdate.py
Last active October 31, 2023 10:08
A script for automatically updating dependencies in conda-forge bot branches using grayskull and pypi
#!/usr/bin/env python
import argparse
import os
import shutil
import subprocess
import packaging.version
import grayskull.strategy
from importlib.resources import open_binary
import yaml
@saul-data
saul-data / Dataplane-postgresql-fast-loading.py
Last active March 9, 2023 17:22
Fast load data into Postgresql with Dataplane
import csv
import os
from io import StringIO
import pandas as pd
# Instructions for Dataplane data pipelines - https://dataplane.app
# Database credentials from Dataplane Secrets
pgUser = os.getenv("dp_secret_pg_user")
pgPassword = os.getenv("dp_secret_pg_password")
@rsignell-usgs
rsignell-usgs / hrrr_best_explore.ipynb
Created July 13, 2022 22:56
hrrr_best_explore.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.