Skip to content

Instantly share code, notes, and snippets.

View cartazio's full-sized avatar

Carter Tazio Schonwald cartazio

View GitHub Profile
(ns type-level-tagger
{:doc "Implements State-of-the-art Unsupervised Part-of-speech Tagger
from \"Simple Type-Level Unsuperivsed POS Tagging\"
by Yoong-Keok Lee, Aria Haghighi and Regina Barzilay
blog post:"
:author "Aria Haghighi ("}
(:use [ :only [reader]]
[ :only [with-out-writer]]
[clojure.contrib.seq-utils :only [indexed]]
delimitMate Report
* Options: (-) unset, (g) global, (b) buffer
(-) delimitMate_apostrophes = ''
(-) delimitMate_autoclose = 1
(-) delimitMate_balance_matchpairs = 0
(-) delimitMate_excluded_ft = ''
(-) delimitMate_excluded_regions = 'Comment'
cartazio / 0-1 program for circuits.txt
Created November 19, 2010 07:07
how to encode circuits in 0 1 integer programs, a sketch
how to use integer programming to encode circuits:
Given a circuit C with n boolean inputs, and assume without loss of
generality that every logic operation is unary or binary. Label each
binary or unary expression c_1 .... c_m. Let r_0 be the distinguished
clause that is the result of this boolean circuit (because an n bit
output is just a product of circuits that have 1 bit outputs.).
For a given c_i, it is of the form c_i = one of
1) = not a, which we can define via the constraint c_i - a= 0
cartazio / bug? in accelerate 0.9
Created January 13, 2011 08:16
bug? in accelerate 0.9
== Dot Product (n = 100000) ==
Interpreter : Valid
CUDA : test: /var/folders/ze/zepvSy65FJukhQ7yy+kvFU+++TI/-Tmp-/ac34211: canonicalizePath: does not exist (No such file or directory)
is the error report from running ./example/simple/test
and the test suite of cuda sdk programs seem be properly installed, and a similar canonicalizePath issue happens on other example programs
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
==> Downloading
File already downloaded and cached to /Users/carter/Library/Caches/Homebrew
/usr/bin/tar xf /Users/carter/Library/Caches/Homebrew/xpdf-3.02.tar.gz
cartazio / gist:856550
Created March 5, 2011 17:58
regex-pcre not building on os x
carter ~ » cabal install regex-pcre -v 1 ↵
Reading available packages...
Resolving dependencies...
In order, the following would be installed:
regex-pcre-0.94.2 (new package)
to /var/folders/ze/zepvSy65FJukhQ7yy+kvFU+++TI/-Tmp-/regex-pcre-0.94.275071...
Configuring regex-pcre-0.94.2...
Flags chosen: splitbase=True, newbase=True
cartazio / gist:895600
Created March 31, 2011 00:38
how to fix haskell goodness on the mac
1) figure out where the cabal-install installed binarys lie,
they're probably installed at .cabal/bin
don't touch that subfolder (but when you uninstall ghc / the haskell platform, remove everything else, except maybe the .caba/config file, which you may want to adjust to set the
compile profiling libs to true, though that has a 2x increase in compile time )
2) make sure you have ghc 7.0.3 because if you've upgraded to xcode 4
you need it (and even if you do the alternate fix, 7.0.3 has some bug fixes)
2.5) if you don't have ghc 7.0.3, go to the ghc website. Also be sure to DL the 64 bit version
because I don't believe that you get any upside when linking to libs if they're 64bit from a 32 compiled piece of code (ie you cant!)
cartazio / gist:914669
Created April 12, 2011 00:24
gist for build fail of gtk+ april
brew --config
HEAD: 042169b16dfca2d3252bb0f727f07f25f4fb5695
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.7
Kernel Architecture: i386
cartazio / gist:924342
Created April 17, 2011 18:43
new tab for iterm2
# First, get the directory for the new tab
if [[ $# == 0 ]]; then
elif [[ $# == 1 && -d "$1" ]]; then
print "usage: ntab [directory]"
return 1
cartazio / gist:946671
Created April 28, 2011 16:15
hmatrix thingy
[(fromList [0.20000000000000007,-2.7755575615628914e-17,-0.20000000000000007] :: Data.Vector.Storable.Vector,(3><3)
[ 0.0, 1.0, 2.0
, 1.0, 0.0, 1.0
, 2.0, 1.0, 0.0 ]),(fromList *** Exception: linearSolveSVDR: didn't converge
[(fromList [0.20000000000000004,0.0,-0.20000000000000007] :: Data.Vector.Storable.Vector,(3><3)
[ 0.0, 1.0, 2.0
, 1.0, 0.0, 1.0
, 2.0, 1.0, 0.0 ]),(fromList *** Exception: svdRdd: output range error