Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#include <assert.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
enum type { | |
NIL, |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
import os | |
import wave | |
import threading | |
import sys | |
# PyAudio Library | |
import pyaudio | |
class WavePlayerLoop(threading.Thread) : | |
""" |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
package rx.android.observables; | |
import rx.Observable; | |
import rx.Observable.OnSubscribe; | |
import rx.Subscriber; | |
import rx.android.subscriptions.AndroidSubscriptions; | |
import rx.functions.Action0; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; |
# lsusb | |
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | |
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. | |
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. | |
Bus 001 Device 006: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub | |
Bus 001 Device 009: ID 1130:f211 Tenx Technology, Inc. TP6911 Audio Headset | |
# cat d.py | |
import pyaudio |
import ast, re, sys | |
from xml.dom import minidom | |
try: | |
from xml.etree import cElementTree as etree | |
except: | |
try: | |
from lxml import etree | |
except: | |
from xml.etree import ElementTree as etree |
# THX Deep Note | |
# Second draft | |
# see http://www.earslap.com/article/recreating-the-thx-deep-note.html | |
time = 10 | |
wait_time = (time / 3) | |
synths = [] | |
rand_note = -> { rrand(note(:A2), note(:A4)) } | |
with_fx :normaliser, amp: 0.5 do | |
use_synth :dsaw |
# Defining standalone wobble | |
# WOBBLE BASS | |
define :wob do |note, no_of_wobs, duration| | |
# using in_thread so we don't block everything | |
in_thread do | |
use_synth :dsaw | |
lowcut = note(:E1) # ~ 40Hz | |
highcut = note(:G8) # ~ 3000Hz | |
# DUBSTEP | |
# Combines ideas from my other gists | |
current_bpm = 140.0 | |
use_bpm current_bpm | |
# WOBBLE BASS | |
define :wob do | |
use_synth :dsaw | |
lowcut = note(:E1) # ~ 40Hz | |
highcut = note(:G8) # ~ 3000Hz |