Skip to content

Instantly share code, notes, and snippets.

@alexanderlerch
alexanderlerch / data-sets.md
Last active October 8, 2025 12:40
list of MIR datasets
dataset meta data contents with audio
200DrumMachines 7371 one-shots yes
AAM onsets, pitches, instruments, melody instrument, keys, chords, tempo, beats 3000 (artificial) tracks yes
ACM_MIRUM tempo 1410 excerpts (60s) yes
ACPAS aligned audio and scores 2189 performances of 497 scores downloadable
AcousticBrainz-Genre 15-31 genres with 265-745 subgenres audio features for ove
@bsweger
bsweger / useful_pandas_snippets.md
Last active October 6, 2025 13:44
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@thengineer
thengineer / strides_2d.py
Last active April 25, 2016 02:34
rolling statistics for numpy 2D arrays with strides
import numpy as np
from numpy.lib.stride_tricks import as_strided
#
# 1-D sample
# based on: http://www.rigtorp.se/2011/01/01/rolling-statistics-numpy.html
def strides_1d(a, r):
ax = np.zeros(shape=(a.shape[0]+2*r))#, dtype=np.uint8) # `a` extended
ax[:] = np.nan

Moved

Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.

Why it was moved

Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!

@hardbyte
hardbyte / Rolling FFT
Created July 7, 2013 22:43
Frequency analysis of fast changing data.
import numpy as np
from collections import deque
import time
import threading
import matplotlib.pyplot as plt
def rollingFFT(s, n, dt):
fy = np.fft.fft(s)
# Frequencies associated with each samples
@kenshinx
kenshinx / celeryconfig.py
Created June 6, 2013 04:32
Celery config file in our project. Hope can be reference to some other guys
import os
import sys
from kombu import Exchange, Queue
from datetime import timedelta
from config import cfg
import log