This file contains 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
const s = (p55) => { | |
const PHI = (Math.sqrt(5) + 1) / 2; // I use PHI for layout ratios | |
const sketch_name = "sspboyd"; // put this in the index.html canvas div too! | |
let canvasW = 400; | |
let canvasH = 400; | |
// let copy_font; | |
p55.preload = () => { | |
// copy_font = p55.loadFont('assets/fonts/Georgia.ttf'); |
This file contains 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
Agency description | Year | Expenditure | |
---|---|---|---|
Department of Peacekeeping Operations | 2015 | 8759159000 | |
United Nations | 2015 | 5613139904 | |
United Nations Children’s Fund | 2015 | 5077601656 | |
United Nations Development Programme | 2015 | 5057413898 | |
World Food Programme | 2015 | 4893472393 | |
Office of the United Nations High Commissioner for Refugees | 2015 | 3278871762 | |
World Health Organization | 2015 | 2738660315 | |
International Organization for Migration | 2015 | 1594121668 | |
Pan American Health Organization | 2015 | 1379321927 |
This file contains 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
CREATE TABLE `user` ( | |
`twitter_id` int(10) unsigned NOT NULL, | |
`created_at` timestamp NOT NULL default '0000-00-00 00:00:00', | |
`name` varchar(80) NOT NULL, | |
`screen_name` varchar(30) NOT NULL, | |
`location` varchar(120) default NULL, | |
`description` varchar(640) default NULL, | |
`profile_image_url` varchar(400) NOT NULL, | |
`url` varchar(100) default NULL, |
This file contains 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
Note | Midi | Frequency | |
---|---|---|---|
C1 | 0 | 8.1757989156 | |
Db1 | 1 | 8.6619572180 | |
D1 | 2 | 9.1770239974 | |
Eb1 | 3 | 9.7227182413 | |
E1 | 4 | 10.3008611535 | |
F1 | 5 | 10.9133822323 | |
Gb1 | 6 | 11.5623257097 | |
G1 | 7 | 12.2498573744 | |
Ab1 | 8 | 12.9782717994 |
This file contains 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
// Some example code for rounding up and rounding down to the nearest order of base 10 magnitude. | |
// Thanks to this thread for pointing me in the right direction | |
// https://stackoverflow.com/questions/7906996/algorithm-to-round-to-the-next-order-of-magnitude-in-r | |
void setup() { | |
int i = 1200; | |
println("i = "+ i); | |
println("---"); | |
println("log(i): "+log(i)); |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am sspboyd on github. | |
* I am sspboyd (https://keybase.io/sspboyd) on keybase. | |
* I have a public key ASBQaniLXuzD1pXx9nXXVo_0EUSJ0H9-8TDSjZLm0GMkigo | |
To claim this, I am signing this object: |
This file contains 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
// Processing is a fantastic prototyping tool for me, but every once in a while I come across something that I think should be | |
// super simple and turns out to be surprisingly hard. For example, drawing a dashed line. Or, drawing a dashed line on an angle!! | |
PGraphics angDashes; | |
float boxW = 300; | |
float boxH = boxW; | |
float angLineLen, angLineBuff; | |
int angledDashCount = 12; | |
void setup() { | |
size(500, 500); |
This file contains 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
size(1100, 1000); | |
background(255); | |
float x, y, dia; | |
color c1, c2; | |
noStroke(); | |
for (int i = 0; i<550; i++) { | |
dia = random(25, width/10); | |
x = random(width-dia/2+dia/2); | |
y = random(height-dia/2+dia/2); | |
c1 = color(random(20, 255), random(20, 255), random(10, 255),random(200,255)); |
This file contains 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
/* | |
index 1 2 3 4 5 6 7 8 9 1011121314151617181920212223242526 | |
input a b c d e f g h i j k l m n o p q r s t u v w x y z | |
output k l m n o p q r s t u v w x y z a b c d e f g h i j | |
*/ | |
void setup() { | |
int range = 26; | |
int offset = 16; | |
for (int indx = 0; indx < range; indx++) { | |
int output = (indx + offset) % range; |
This file contains 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
################################# | |
# Java generated files # | |
################################# | |
*.class | |
*.java | |
# Package Files # | |
*.jar | |
*.war | |
*.ear |