This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Count occurences of same lines read from standard input. | |
Outputs a table sorted by descending count. | |
""" | |
import sys | |
from collections import Counter | |
import natsort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DESTDIR ?= | |
PREFIX ?= /usr | |
LV2_DIR ?= $(PREFIX)/lib/lv2 | |
FAUSTFLAGS ?= -nvoices 4 | |
NAME ?= mydsp | |
FAUST_DSP = $(NAME).dsp | |
LV2_BUNDLE = $(NAME).lv2 | |
ROOT_DIR:=$(shell dirname "$(realpath $(firstword $(MAKEFILE_LIST)))") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# rofi-selectfile | |
# | |
# Use rofi to select file or folder until file is selected, then print it. | |
# | |
# Arguments | |
# $1=directory to start, defaults to "." (specified in variable default_dir) | |
# | |
# Adapted from: https://gist.github.com/thingsiplay/6c4bd13a106a4a609d69c402e675c137 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Template for a minimal FastAPI app serving just one page from a Jinja2 template and a favicon. | |
Place the Jinja2 "index.html" template in "templates/jinja2" and a "favicon.ico" icon file in | |
"static/img" and additional static files (JavaScript, CSS, images) below "static". You can then | |
reference them in the template like this ("path" is relative to "static"): | |
{{ url_for('static', path='/dir/file.txt') }} | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Run klick metronome and tap tempo with enter/return key | |
# | |
TEMPO="${1:-120}" | |
cleanup() { | |
stty echo | |
oscsend localhost 9001 /klick/metro/stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
from rtmidi.midiutil import open_midioutput | |
if sys.argv[1:]: | |
midiout, _ = open_midioutput() | |
midiout.send_message(bytearray.fromhex(" ".join(sys.argv[1:]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Examine an RSS feed retrieved from given URL.""" | |
import sys | |
from xml.dom.minidom import parseString as parse_xml | |
import feedparser | |
import requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Display waveform of an audio file.""" | |
import argparse | |
import logging | |
import sys | |
from statistics import fmean | |
from PyQt6 import QtCore, QtGui, QtWidgets | |
from PyQt6.QtCore import Qt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare name "CChorus"; | |
declare version "0.5"; | |
declare author "Christopher Arndt"; | |
declare license "MIT License"; | |
declare description "Versatile stereo chorus effect"; | |
import("stdfaust.lib"); | |
PI = ma.PI; | |
TWOPI = 2.0 * ma.PI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cython: language_level=3, boundscheck=False | |
from cython.operator cimport dereference | |
from libc.stdio cimport printf | |
from posix.unistd cimport usleep | |
cdef extern from "pthread.h" nogil: | |
ctypedef int pthread_t | |
ctypedef struct pthread_attr_t: | |
pass |
NewerOlder