Skip to content

Instantly share code, notes, and snippets.

View amotl's full-sized avatar

Andreas Motl amotl

  • $PYTHONPATH
View GitHub Profile
@tkurki
tkurki / 00doc.md
Last active April 17, 2024 12:10
Wind Speed and Direction with Grafana ECCharts plugin
@hyperupcall
hyperupcall / settings.jsonc
Last active May 3, 2024 12:52
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 February 20, 2024 18:01
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slimsag
slimsag / ramblings.md
Last active December 13, 2023 08:02
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

@maresb
maresb / schiemann.gp
Last active October 6, 2023 21:16
Exploring Schiemann's pair with PARI/GP
/*
An exploration of Alexander Schiemann's pair of inequivalent 4D lattices with
identical theta functions.
Context: <https://math.stackexchange.com/questions/4428707>
Ben Mares, 2022