Skip to content

Instantly share code, notes, and snippets.

View atduskgreg's full-sized avatar

Greg Borenstein atduskgreg

View GitHub Profile
{{pass_manager.isPassing}}
import Ember from "ember";
Foo = Ember.Object.create({
// define foo
});
Foo.reopen({
myBoundFunc : function(){
}.property("boundProperty")
});
# Depends on https://github.com/vorgos/QuickGrab
# Install quickgrab and make sure it's in your path
sketchname = ARGV[0]
unless sketchname
puts "\tusage: ruby capture_sketch.rb <sketch_name>"
exit 1
end
line = `ps x | grep #{sketchname}`
MAS S.66:
Indistinguishable From…
Magic as Interface, Technology, and Tradition
Instructors: Greg Borenstein and Dan Novy
(Faculty Advisors: Joi Ito and Kevin Slavin)
Meeting Time: M 3-5 E14-493
SPRING TERM — (Monday, Feb. 9, through Monday, May 11)
15 Weeks

An Example of Play

To further clarify what really goes on during an AD&D game, read the following example. This is typical of the sort of action that occurs during a playing session. Shortly before this example begins, three player characters fought a skirmish with a wererat (a creature similar to a werewolf but which becomes an enormous rat instead of a wolf). The wererat was wounded and fled down a tunnel. The characters are in pursuit. The group includes two fighters and a cleric.

Fighter 1 is the group's leader.

function findProperNounPhrase(tags){
console.log("find");
var previousTag = "";
var properNounPhrase = "";
for(var i = 0; i < tags.length; i++){
console.log(tags[i].pos);
includedTags = ["NNP", "NNPS", "JJ", "PRP$", "NN"];
if(includedTags.indexOf(tags[i].pos) > -1){
Tools.fetch("http://www.foxnews.com/politics/index.html", function(data){
page = $(data.responseText);
tweets = [];
page.find(".c-latest h3").each(function(i, headline){
headlineText = $(headline).text();
// do something with each headlineText
tweets.push(headlineText);
});
Tools.renderTweets(tweets);
});
var sentence1 = "Yemeni Government Collapses as President and Prime Minister Resign";
var sentence2 = "Diversity in play as Sundance Film Festival kicks off in Park City";
var tags1 = Tools.tagPos(sentence1);
var tags2 = Tools.tagPos(sentence2);
function findProperNounPhrase(tags){
var previousTag = "";
var properNounPhrase = "";
for(var i = 0; i < tags.length; i++){
@atduskgreg
atduskgreg / opencv_for_processing_laplacian.pde
Created January 22, 2015 21:09
Example of using a convolution kernel to implement a Laplacian filter in OpenCV for Processing. Example output: https://www.flickr.com/photos/unavoidablegrain/16342382412/
import gab.opencv.*;
import org.opencv.imgproc.Imgproc;
import org.opencv.core.Mat;
import org.opencv.core.CvType;
OpenCV opencv;
PImage img;
void setup() {
img = loadImage("arch_sunset.jpg");
001-0-frame.png, "kids in jackets standing on sandy ground amid a scattering of large numbered pictures"
002-191-frame.png, "soldier sitting on top of jeep holding a machine gun and soldier sitting inside"
003-341-frame.png, "a man with a blue and white jacket, cap, and backpack, taking photographs"
004-426-frame.png, "an asian man in traditional clothing sounds a large horn in a pleasant mountain landscape"
005-505-frame.png, "a man with a blue and white jacket , cap , and backpack , taking photographs"
006-778-frame.png, "a black man wearing a hat and holding a large camera"
007-868-frame.png, "a woman enjoying the breeze of a primitive fan"
008-2022-frame.png, "they enjoy rock climbing these large rocks together"
009-2235-frame.png, "a newswoman and a man talk about a mountain lion attack"
010-2300-frame.png, "two men in historical clothing stand in a covered wagon attached to two donkeys while one man shoots a pistol and holds a rifle up"