Skip to content

Instantly share code, notes, and snippets.

phil jones interstar

View GitHub Profile
interstar / trap3.rb
Created Aug 27, 2018
Trap beat for sonic pi
View trap3.rb
use_bpm 145
# Our chord sequence
p1 = [chord(:E3,"minor7"),
interstar / gist:fbfd0391e9d33f5a2fb7334398f60ee8
Created Jul 30, 2017
Versao services.clj no exemplo de grupo FP de Calango
View gist:fbfd0391e9d33f5a2fb7334398f60ee8
(:require [ring.util.http-response :refer :all]
[compojure.api.sweet :refer :all]
[schema.core :as s])
(defonce ideias (atom {:id 0 :nome "root" :criancas
[{:id 1 :nome "hello" :criancas {}}]}))
(defn buscar [id ids]
interstar / .block
Created Mar 11, 2017
Directed Graph Editor
View .block
license: mit
View gist:33098d0fa9cb843cd9b5300fe9bb9655
# Five Minutes
# requires Phil's Sonic Pi Lib ( )
section = :a
live_loop :clock do
puts section
interstar / Sonic Pi sketch
Created Apr 16, 2016
Started as a quick play with Sonic Pi to see if I could create functions that process and transform sequences of notes. Grew into a tune.
View Sonic Pi sketch
define :trans do |xs, d|
return xs.collect { |x| (x+d) }
ritmo = [0.2,0.4,0.2,0.4]
i = [:c3,:eb3,:g3,:c4,:c3,:eb3,:g3,:c4]
iv = (trans i, 5)
v = (trans i, 7)
View graphite.pde
#include <Bounce.h>
int anaPin = 5; // Analogue in pin
int button = 2; // button pin
int beepPin = 3; // piezo buzzer
// edges of our calibration window
float aMax;
float aMin;
interstar / gist:6051618
Last active Dec 20, 2015
Quora Scraper: And here's a quick page which takes the files containing my answers that I pulled via RSS and makes an HTML page out of them.
View gist:6051618
from os import listdir
from os.path import isfile, join
onlyfiles = [ f for f in listdir(".") if isfile(join("",f)) ]
import json
print """
body {
import feedparser
import hashlib
import json
from bs4 import BeautifulSoup
d = feedparser.parse("")
for e in d["entries"] :
title = e["title"]
summary = e["summary"]
interstar /
Created Jun 27, 2012
Using Python Cmd and Curses Together
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import curses
import curses.textpad
import cmd
def maketextbox(h,w,y,x,value="",deco=None,textColorpair=0,decoColorpair=0):
# thanks to for this
nw = curses.newwin(h,w,y,x)
interstar /
Created Feb 25, 2012
Python Permutation Generator : A generator that outputs all permutations of a sequence
def perm(xs) :
if xs == [] :
yield []
for x in xs :
ys = [y for y in xs if not y==x]
for p in perm(ys) :
yield ([x] + p)
You can’t perform that action at this time.