Skip to content

Instantly share code, notes, and snippets.

View AlexLamson's full-sized avatar

Alex Lamson AlexLamson

View GitHub Profile
@AlexLamson
AlexLamson / metronome.py
Created May 27, 2017 02:29
Python script to create tones every 5, 10 and 30 seconds. Useful for timing stretching exercises.
import os
import time
import math
'''
Note:
Requires the `sox` package, which can be installed with the following command:
sudo apt-get install sox
'''
@AlexLamson
AlexLamson / minim_microphone_fft.pde
Created March 20, 2018 02:27
Realtime FFT from the microphone with the minim processing library
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioSource in;
FFT fft;
void setup() {
size(512, 200);
@AlexLamson
AlexLamson / timestamp.py
Created November 8, 2020 18:59
My preferred way of getting a human-readable timestamp in python
from datetime import datetime
datetime.now().astimezone().strftime('%Y-%m-%d %H:%M:%S %Z')