for your convinience these instuction is available as:
gist
git repo
ubuntu prerequisites
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} | |
import Control.Monad | |
import Control.Monad.Free | |
class (Functor f, Functor g, Functor h) => Compose f g h | f g -> h where | |
compose :: f x -> g y -> Free h (Free f x, Free g y) | |
compose f g = return (liftF f, liftF g) | |
composeF :: Compose f g h => Free f x -> Free g x -> Free h x |
trait Module { | |
type shape | |
} |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Lens -- lens | |
import Control.Monad.IO.Class -- transformers | |
import Control.Monad.Trans.AWS -- amazonka | |
import Network.AWS.EC2 -- amazonka-ec2 | |
main :: IO () |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
module RedBlackTree where | |
data Zero | |
data Succ n | |
type One = Succ Zero | |
data Black |
# Installing graphite dependencies | |
apt-get install -y python2.6 python-pip python-cairo python-django python-django-tagging | |
apt-get install -y libapache2-mod-wsgi python-twisted python-memcache python-pysqlite2 python-simplejson | |
pip install whisper | |
pip install carbon | |
pip install graphite-web | |
# Setup a vhost by grabbing the example the graphite team released on their repo. | |
# In this file, you'll provide the url used to access to your Graphite dashboard | |
wget https://raw.github.com/tmm1/graphite/master/examples/example-graphite-vhost.conf -O /etc/apache2/sites-available/graphite |
import scala.language.implicitConversions | |
/** | |
* @author gwenzek | |
* | |
*/ | |
class ArgsOps(ops: Map[String, OptionalParam], val args: Array[String]){ | |
def apply(op: String) = ops(op) | |
} |
trait Isomorphism[A, B] { | |
def fw: A => B | |
def bw: B => A | |
} | |
object Isomorphism { | |
implicit def anyIso[A](a: A) = new { | |
def as[B](implicit ev: Isomorphism[A, B]) = ev fw a | |
} | |
#![feature(phase)] | |
#[phase(plugin, link)] extern crate log; | |
extern crate green; | |
extern crate rustuv; | |
use std::io; | |
use std::os; | |
use std::io::{Listener,Acceptor,TcpStream}; | |
#[start] |
/* | |
* OpenSimplex (Simplectic) Noise in Java. | |
* (v1.0.1 With new gradient set and corresponding normalization factor, 9/19/14) | |
*/ | |
public class OpenSimplexNoise { | |
private static final double STRETCH_CONSTANT_3D = -1.0 / 6; | |
private static final double SQUISH_CONSTANT_3D = 1.0 / 3; | |