This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
namespace algos | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances #-} | |
import Control.Monad (liftM4) | |
import Data.Maybe | |
data Nums = Zero | One | Two | Three | Four | Five | Six | Seven | Eight | |
| Nine | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |
| P | Q | R | S | T | U | V | W | X | Y | Z deriving (Ord, Eq, Enum) | |
type GUID = (Nums, Nums, Nums, Nums) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Parallel.Strategies | |
import Data.List (maximumBy, subsequences) | |
import Data.Ord | |
isPalindrome :: Eq a => [a] -> Bool | |
isPalindrome xs = xs == reverse xs | |
-- * note while subsequences is correct, it is asymptotically | |
-- inefficient due to nested foldr calls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resourcet-0.4.9 blaze-builder-0.3.3.0 http-conduit-2.0.0.4 http-client-tls-0.2.1.1 http-client-conduit-0.2.0.1 http-client-0.2.2.2 cookie-0.4.0.1 aeson-0.6.2.1 http-types-0.8.3 conduit-1.0.9.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Test.QuickCheck | |
fac :: Integer -> Integer | |
fac n | n < 1 = 1 | |
| otherwise = n * fac (n - 1) | |
greaterThan0 :: Integer -> Bool | |
greaterThan0 n = not $ (fac n) < 1 | |
main :: IO () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cabal sandbox init (from msdos prompt) | |
cabal install text-1.1.0.1 | |
cabal install network-2.4.1.2 --configure-option -host=i386-unknown-mingw32 | |
cabal install HsOpenSSL --extra-include-dirs=\"C:/OpenSSL-Win32/include\" --extra-lib-dirs=\"C:/OpenSSL-Win32/\" | |
cabal install -j | |
cabal configure | |
cabal build worker | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WHICHGHC=`which ghc` && PATH=`dirname $WHICHGHC`/../mingw/bin:$PATH && | |
cabal install network --configure-option --host=i386-unknown-mingw32 --global --enable-library-profiling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading package HsOpenSSL-0.10.4 ... <command line>: can't load .so/.DLL for: eay32.dll (addDLL: could not load DLL) ghc.exe: eay32: The application has failed to start because its side-by-side configuration is incorrect. Please see the applica tion event log or use the command-line sxstrace.exe tool for more detail. cabal.exe: Error: some packages failed to install: |
OlderNewer