Skip to content

Instantly share code, notes, and snippets.

View zmaril's full-sized avatar
🌹
Crawling the web

Zack Maril zmaril

🌹
Crawling the web
View GitHub Profile
<iframe src="https://embed.spotify.com/?uri=spotify:track:7h8Ud480Fm4ReUVxgFF9ZX" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
<iframe src="https://embed.spotify.com/?uri=spotify:track:19KlLuxA7AxvQpoQYx7zhG" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
<iframe src="https://embed.spotify.com/?uri=spotify:track:697LWfA49GjDHL7utykini" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
<iframe src="https://embed.spotify.com/?uri=spotify:track:1FEf4OC1mAPH7CtKilZf8M" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
<iframe src="https://embed.spotify.com/?uri=spotify:track:37BYBOeSUJ1vZXvNeXOtqq" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
<iframe src="https://embed.spotify.com/?uri=spotify:track:7LGM9nZtJZA2EDk4EeA17H" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
<iframe src="https://embed.spotify.com/?uri=spotify:track:3oq9uqpVPEi142XcuW
@zmaril
zmaril / gist:4762646
Created February 12, 2013 12:48
Faunus hadoop job jar not found error
Exception in thread "main" java.lang.IllegalStateException: The Faunus Hadoop job jar could not be found: faunus-0.2.0-SNAPSHOT-job.jar
at com.thinkaurelius.faunus.mapreduce.FaunusCompiler.composeJobs(FaunusCompiler.java:226)
at com.thinkaurelius.faunus.mapreduce.FaunusCompiler.run(FaunusCompiler.java:305)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at com.thinkaurelius.faunus.FaunusPipeline.submit(FaunusPipeline.java:1128)
at com.thinkaurelius.faunus.FaunusPipeline.submit(FaunusPipeline.java:1112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
@zmaril
zmaril / Error.java
Created February 3, 2013 03:32
An error that I keep getting when using pmap to upload data into Titan/Cassandra
Exception in thread "main" java.util.concurrent.ExecutionException: com.thinkaurelius.titan.core.QueryException: Multiple properties of specified type: v[36028797018963994]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at clojure.core$future_call$reify__6110.deref(core.clj:6156)
at clojure.core$deref.invoke(core.clj:2080)
at clojure.core$pmap$step__6123$fn__6125.invoke(core.clj:6208)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.next(RT.java:587)
@zmaril
zmaril / collatz.clj
Created February 1, 2013 02:26
Collatz fun
(ns collatz.core)
(defn collatz
"Given n, it returns n/2 if it's even or n*3+1 if it's odd."
[n]
(if (even? n)
(/ n 2)
(+ (* 3 n) 1)))
(declare count-steps-of-collatz)
TitanKey happiness = g.makeType().name("happiness").dataType(Integer.class).eidetic(true).makePropertyKey();
TitanVertex v = g.addVertex()
v.setProperty("name","Zack")
v.setProperty("happiness",2)
v.getProperty("happiness")
//TimeSeries([[2,1000]])
v.setProperty("happiness",10)
v.getProperty("happiness")
//TimeSeries([[2,1000],[10,1001]])
v.getProperty("happiness").now()
@zmaril
zmaril / kinds.clj
Created October 29, 2012 05:35
Kinds of a feather
(def t-coll (U Number Keyword String nil))
(defkind intersector-of-types [types]
(fn [t] (set/difference types t))
(def intersect-t-coll (intersector-of-types t-coll))
(def not-a-number-type (intersect-t-coll Number))
(def string-type (intersect-t-coll (U Number Keyword nil)))
@zmaril
zmaril / debate-twitter-stream.js
Created October 17, 2012 04:29 — forked from tcr/debate-twitter-stream.js
See a streaming list of all tweets concerning the presidential debate.
// npm install rem read clarinet
var rem = require('rem');
var read = require('read');
var clarinet = require('clarinet');
// Create Twitter API, prompting for key/secret.
var tw = rem.load('twitter', 1.0).prompt();
// Authenticate user via the console.
rem.console(tw, function (err, user) {
@zmaril
zmaril / core.clj
Created October 9, 2012 06:48
Messing around with polynomials
(ns polynomials.core
(:use [clojure.string :only (join)]))
(defprotocol Arithimatic
(add [this that])
(subtract [this that])
(multiply [this that])
(divide [this that]))
@zmaril
zmaril / gist:3136483
Created July 18, 2012 14:24
Puma.com source code
(function (E, B) {
function ka(a, b, d) {
if (d === B && a.nodeType === 1) {
d = a.getAttribute("data-" + b);
if (typeof d === "string") {
try {
d = d === "true" ? true : d === "false" ? false : d === "null" ? null : !c.isNaN(d) ? parseFloat(d) : Ja.test(d) ? c.parseJSON(d) : d
} catch (e) {}
c.data(a, b, d)
} else d = B
@zmaril
zmaril / index.coffee
Created July 13, 2012 18:46 — forked from zmaril/fisheye.js
Rotating rectangles
graphic = new Object
size = null
number = null
graphic.create = ()->
width = $(document).width()/2
height = $(document).height()*.85
size = d3.min([width,height])
graphic.svg = d3.select("#graphic")
.append("svg")