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
{ | |
"len_data": 2, | |
"data": [ | |
{ | |
"follower_change": 0, | |
"end_followers": 229, | |
"start_followers": 229, | |
"screen_name": "travisbrady" | |
}, | |
{ |
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
val h = jdbi.open() | |
val res = h.createQuery(sql) | |
.bind("start", start) | |
.bind("end", end) | |
.list() | |
h.close() |
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
~/code/twitter-proxy(branch:master*) » ./sbt-development "run server" travisbrady@TACOJOCK | |
Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future | |
[info] Loading project definition from /Users/travisbrady/code/twitter-proxy/project | |
[info] Set current project to Twitter Proxy (in build file:/Users/travisbrady/code/twitter-proxy/) | |
[warn] Potentially incompatible versions of dependencies of {file:/Users/travisbrady/code/twitter-proxy/}default-2ac863: | |
[warn] org.scala-lang: 2.10.1, 2.10.0 | |
[info] Compiling 1 Scala source to /Users/travisbrady/code/twitter-proxy/target/scala-2.10/classes... | |
[info] Running com.massrel.twitterproxy.ProxyService server | |
[error] (run-main) java.lang.UnsupportedClassVersionError: com/y |
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
vagrant@precise64:/massrel/tukeybase$ opam install cohttp | |
The following actions will be performed: | |
- install re.1.2.0 [required by cohttp] | |
- install uri.1.3.6 [required by cohttp] | |
- install cohttp.0.9.5 | |
3 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove | |
Do you want to continue ? [Y/n] Y | |
=-=-= Installing re.1.2.0 =-=-= | |
Downloading http://opam.ocamlpro.com/archives/re.1.2.0+opam.tar.gz. |
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
""" | |
Based on the paper: Distinct Counting with a Self-Learning Bitmap | |
http://ect.bell-labs.com/who/aychen/sbitmap4p.pdf | |
Author: Travis Brady | |
""" | |
from math import log | |
from bitarray import bitarray | |
#from murmur3 import hash128_64 | |
from cityhash import CityHash64 |
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
#Python version of http://graphics.stanford.edu/~seander/bithacks.html | |
MultiplyDeBruijnBitPosition = (0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, | |
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9) | |
deBruijnSeq = 0x077CB531 | |
def lsb(v): | |
return MultiplyDeBruijnBitPosition[((v & -v) * deBruijnSeq) >> 27] |
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
(* Get line from stdin without blowing the stack *) | |
let get_row u = | |
try | |
Some (input_line stdin) | |
with End_of_file -> | |
None |
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
type side = Buy | Sell | |
module type SideType = sig | |
val side : side | |
end | |
module Blah(S : SideType) = struct | |
let better = if S.side = Buy then (>) else (<) | |
let worse = if S.side = Buy then (<) else (>) | |
end |
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
[tbrady@tbrady-mbp:sandbox/vertoid]$ ant compile (09-10 19:35) | |
Buildfile: build.xml | |
clean: | |
prepare: | |
[mkdir] Created dir: /Users/tbrady/src/sandbox/vertoid/classes | |
[unzip] Expanding: /Users/tbrady/src/sandbox/vertoid/extLibs/clojure-contrib.jar into /Users/tbrady/src/sandbox/vertoid/classes | |
[unzip] Expanding: /Users/tbrady/src/sandbox/vertoid/extLibs/clojure.jar into /Users/tbrady/src/sandbox/vertoid/classes | |
[unzip] Expanding: /Users/tbrady/src/sandbox/vertoid/extLibs/vertica_3.0_jdk_5.jar into /Users/tbrady/src/sandbox/vertoid/classes |
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] Exception in thread "main" java.lang.Exception: namespace 'vertoid' not found after loading '/vertoid' | |
[java] at clojure.core$load_one__5701.invoke(core.clj:3623) | |
[java] at clojure.core$compile__5756$fn__5758.invoke(core.clj:3794) | |
[java] at clojure.core$compile__5756.invoke(core.clj:3793) | |
[java] at clojure.lang.Var.invoke(Var.java:346) | |
[java] at clojure.lang.Compile.main(Compile.java:56) |