Skip to content

Instantly share code, notes, and snippets.

View n-hansen's full-sized avatar
🆒

nick hansen n-hansen

🆒
View GitHub Profile
@n-hansen
n-hansen / ConstraintTrees.hs
Last active June 25, 2019 23:58
Constrained Trees
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
@n-hansen
n-hansen / 2017-04-07_Riddler.hs
Last active April 14, 2017 14:30
4-7-17 Riddler
{-# LANGUAGE GADTs #-}
data Slot = S1 | S2 | S3 | S4
deriving Eq
data Start
data Player
data Deck
data GameMove a where
Start :: [GameMove Deck] -> GameMove Start
@n-hansen
n-hansen / intervals.py
Created February 13, 2017 03:13
Command line utility for merging playlists into a single file with interval markers.
#!/usr/bin/env python3
# intervals.py - turn an itunes playlist into a single track with interval markers
import os
import plistlib
import urllib.request
from pydub import AudioSegment
from pydub.generators import Sine
from numpy import linspace
@n-hansen
n-hansen / Main.hs
Created February 3, 2017 00:57
Agenda Cluster Monte Carlo
module Main where
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as M
import Control.Monad.Random
import System.Environment
import Text.Printf