Code used to generate the chord progression for A random walk from A to D, my piece for Disquiet Junto 0514
This file contains hidden or 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
# /etc/udev/hwdb.d/90-kensington-expert-mouse.hwdb | |
evdev:input:b*v047Dp1020* | |
KEYBOARD_KEY_90004=btn_middle | |
KEYBOARD_KEY_90003=btn_side |
This file contains hidden or 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 ruby | |
require 'csv' | |
require 'date' | |
output = CSV.new($stdout) | |
CSV.parse(ARGF.read.strip, headers: true).each do |row| | |
case row['Date'] | |
when 'Today' | |
date = Date.today |
This file contains hidden or 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
use_bpm 80 | |
$t0 = Time.now | |
def elapsed | |
Time.now - $t0 | |
end | |
def converge(period) | |
t = elapsed |
This file contains hidden or 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
Film = Struct.new(:path, :w, :h, :size) do | |
def pixels | |
w * h | |
end | |
end | |
films = [] | |
Dir['*'].each do |dir| | |
next unless File.directory?(dir) |
This file contains hidden or 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/python3 | |
from imutils.video import VideoStream | |
from pyzbar.pyzbar import decode | |
from pprint import pprint | |
import cv2 | |
import time | |
vs = VideoStream(src=0).start() | |
time.sleep(1.0) |
Field types are marked using C-style notation:
char[4]
indicates a 4-byte fixed-width stringuint[6]
indicates a 6-byte sequenceuint8
,uint16
, anduint32
are unsigned byte, short, and long integersint8
,int16
, andint32
are signed byte, short, and long integers
This file contains hidden or 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 | |
sudo apt update | |
sudo apt install -y \ | |
apt-file \ | |
autoconf \ | |
bison \ | |
build-essential \ | |
checkinstall \ |
NewerOlder