Skip to content

Instantly share code, notes, and snippets.

@SuperDoxin
SuperDoxin / scope.py
Last active August 29, 2015 14:02
quick and dirty x/y osciloscope for playing audio files such as https://www.youtube.com/watch?v=o4YyI6_y6kw
"""
Usage:
scope.py <input_file>
"""
from __future__ import division
import pygame
import audiotools
from docopt import docopt
import itertools
import time
@SuperDoxin
SuperDoxin / logo.py
Last active November 25, 2022 22:57
Python Logo using bezier curves and the turtle module
import turtle
import math
def lerp(a, b, t):
"""Linear interpolation function. returns a when t==0, returns b when t==1
and linearly interpolates for values inbetween"""
return (a * (1 - t)) + (b * t)
@SuperDoxin
SuperDoxin / hello_world.usm
Last active December 27, 2015 06:19
Universal Machine
;temp: F
write A >data
write F >exit
write C >loop ;constant
write D 1 ;constant
write E 0 ;constant
loop: index F E A
out F