Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block damienzhang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
damienzhang / numberplay.hs
Created Mar 14, 2018
Code for
View numberplay.hs
import Data.List
import Text.Printf
choose :: Int -> [a] -> [[a]]
choose 0 _ = [[]]
choose _ [] = []
choose n (x:xs) = map (x :) (choose (n - 1) xs) ++ choose n xs
perm :: Int -> [a] -> [[a]]
perm n = concatMap permutations . choose n
View twentyeighteen.hs
module Main where
import Control.Monad
import Data.List (foldl')
data Operator
= Add
| Sub
| Mult
| Div
damienzhang /
Last active Dec 25, 2015
Build the HDF5 library using local install of GCC and G++ with C++ library enabled.
CC='/sim/dev/sdz/tools/bin/gcc' \
CXX='/sim/dev/sdz/tools/bin/g++' \
./configure --prefix=/sim/dev/sdz/tools --enable-cxx
damienzhang /
Last active Dec 22, 2015
How to build a local copy of GCC 4.7.3 (just C and C++) This is built without support for graphite loop optimizations.
tar xjf gcc-4.7.3.tar.bz2
cd gcc-4.7.3
cd ..
mkdir build
cd build
export PREFIX=/sim/dev/sdz/tools
You can’t perform that action at this time.