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
(http://www.cs.berkeley.edu/~aria42/pubs/typetagging.pdf)
blog post: http://wp.me/pcW6S-x"
:author "Aria Haghighi (aria42@gmail.com)"}
(:use [clojure.java.io :only [reader]]
[clojure.contrib.duck-streams :only [with-out-writer]]
[clojure.contrib.seq-utils :only [indexed]]
@cartazio
cartazio / README.md
Created June 19, 2012 20:50 — forked from deepakjois/README.md
Installing GHC and diagrams on OS X Lion

Installing GHC 7.4.2 (and/or current haskell platform) and diagrams on OS X Lion

Install prerequisites

GHC 7.4.2 64-bit (or other recent 64bit version)

use haskell platform install via haskell platform site or mac homebrew. Both should by default provide (currently) ghc 7.4.2 64bit.

Install dependencies (ordered by dependencies)

// Originally based on PyAliasAnalysis from the unladen-swallow project!
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Argument.h"
#include "llvm/Constants.h"
{-# Language ExistentialQuantification, GADTs #-}
module Control.Process where
import Data.Monoid
import Prelude hiding (zip, zipWith)
import Control.Applicative
import System.IO
data Process f a = Halt
module Weird where
open import Coinduction
open import Function
open import Data.Empty
open import Data.Product
open import Data.Conat
open import Relation.Nullary
open import Relation.Unary
open import Relation.Binary using (module Setoid; _Respects_; _⇒_)
@cartazio
cartazio / Git.hs
Created September 19, 2013 23:26 — forked from dysinger/Git.hs
{-# LANGUAGE OverloadedStrings #-}
module Git where
import Data.Text.Lazy (Text)
import qualified Data.Text.Lazy as T
import Prelude hiding (FilePath)
import Shelly
git :: [Text] -> Sh Text
{-# LANGUAGE DataKinds, PolyKinds, GADTs, TypeFamilies, TypeOperators,
ConstraintKinds, ScopedTypeVariables, RankNTypes #-}
module Shape where
import GHC.Exts
import Data.Proxy
import Data.Type.Equality
data Nat = Zero | Succ Nat
#!/bin/bash
# Options / Usage
# put this script in the same directory as your *.cabal file
# it will use the first line of "cabal info ." to determine the package name
# custom options for "cabal install"
CUSTOM_OPTIONS=(--haddock-options='-q aliased')
# hackage server to upload to (and to search uploaded versions for)
HACKAGESERVER=hackage.haskell.org
#!/bin/bash
cabal configure && cabal build && cabal haddock --hyperlink-source
S=$?
if [ "${S}" -eq "0" ]; then
cd "dist/doc/html"
DDIR="${1}-${2}-docs"
cp -r "${1}" "${DDIR}" && tar -c -v -z -Hustar -f "${DDIR}.tar.gz" "${DDIR}"
CS=$?
if [ "${CS}" -eq "0" ]; then
echo "Uploading to Hackage…"
%====Set up Listings===============================================================
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{darkred}{rgb}{0.5,0,0}
\lstloadlanguages{Haskell}
\lstnewenvironment{code}
{ % \centering
\lstset{}%
\csname lst@SetFirstLabel\endcsname}
{ %\centering