Skip to content

Instantly share code, notes, and snippets.

View Siunami's full-sized avatar

Matthew Siu Siunami

View GitHub Profile
@Siunami
Siunami / machine.js
Last active February 23, 2020 00:35
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Siunami
Siunami / spacy_intro.ipynb
Created February 2, 2019 00:51 — forked from aparrish/spacy_intro.ipynb
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
var WIDTH = 500;
var HEIGHT = 600;
var dots = [];
var numDots = 50;
var circleWidth = 300;
var radius = circleWidth/2;
var r = 134;
var g = 240;
// Daniel Shiffman
// http://codingtra.in
// http://patreon.com/codingtrain
// Code for: https://youtu.be/BjoM9oKOAKY
var inc = 0.1;
var scl = 10;
var cols, rows;
var zoff = 0;
// Daniel Shiffman
// http://codingtra.in
// http://patreon.com/codingtrain
// Code for: https://youtu.be/BjoM9oKOAKY
function Particle() {
this.pos = createVector(random(width), random(height));
this.vel = createVector(0, 0);
this.acc = createVector(0, 0);
this.maxspeed = 2;
@Siunami
Siunami / GenerativeTree.js
Created December 27, 2017 20:29
Click to drop a seed that grows into a tree
//TODO:
// Fix leaves so that they are actually on the tree.
// Right now leaves blow in the wind
var WIDTH = 500;
var HEIGHT = 600;
function setup() {
createCanvas(WIDTH,HEIGHT);
smooth();
@Siunami
Siunami / Bombs.js
Last active December 27, 2017 20:24
var WIDTH = 600;
var HEIGHT = 400;
function setup() {
createCanvas(WIDTH,HEIGHT);
}
var bombs = [];
var particles = [];
import java.util.Calendar;
class Node extends PVector {
PVector velocity = new PVector();
float minX=5, minY=5, maxX=width-5,maxY=height-5;
float damping = 0.000001;
int r,g,b;
int trailLength = 5;
@Siunami
Siunami / Mouse Interaction Gallery.js
Last active December 27, 2017 20:25
A series of creative experiences using the mouse
0x11097196F2a9b613Fde623fEF2162edfE6037d24