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 #-} | |
-- See http://stackoverflow.com/questions/9967790/instance-in-haskell | |
instance (Enum a) => Enum (a, a) where | |
fromEnum (x,y) = | |
k^2 + 2*j + if permuted then 1 else 0 | |
where | |
k = max (fromEnum x) (fromEnum y) | |
j = min (fromEnum x) (fromEnum y) |
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 | |
main = mapM_ (\(d,s)->(\p->p>>p>>p>>p).putChar.toEnum.round.(+d).(*62).min 2.abs$s+1).zip(dθ 1).lim.rev.hgp 9. render 9e6 (\_->0) . Sequence[] | |
$[mT%8.1,t2%16.1,t3(∡7)%8,t4%8,t5%16,t3(∡7)%8,mT%8.1,t2%16.1,t3(tev arp8)%8,cdT%99] >>= \e->[e,e] | |
mM=Sequence[][2-^8,1-^8,0-^8,1-^8,3-^4] | |
cM=Sequence[][7-^20,8-^20,9.^4,Sequence[(7,0),(6,1)](map((∡2).(.^4))[6,5,6])%0.75] | |
cMv=Sequence[][10-^2,8.^4,9.^4,hom(.^4)[[24,5],[23,8,12],[22,4],[21,6,9],[22,3],[19,5,8],[20,4],[18,6,9],[17]]#7&(-14)%2.5,tr 2%0.4,1-^9,2-^12,1-^1]%4.5 | |
⋎(Sequence[][6-^4,lp(8.^4∡3)%(3/4),sil%2,lp(5.^4∡3)%h,lp(5.^4∡2)%h,1-^1∡7]&(-14)#7#4%5) | |
mMa f=Sequence[][(1-3*f).^4,lp(5.^4∡(-2-f))%0.75,mMa f%1.5,mMa(f*2)%h,mMa f%1]#7 |
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
module PiMelody where | |
import Data.List | |
data MelodyNote = Gs | A | B | C' | D' | E' | F' | Gs' | A' | B' | |
deriving (Eq, Show, Enum) | |
type Melody = [MelodyNote] -- Assume simple all-quavers rythm. | |
piMelody :: Melody |
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/local/haskell/lib/ghc-7.8.2/package.conf.d: | |
Cabal-1.18.1.3 | |
array-0.5.0.0 | |
base-4.7.0.0 | |
bin-package-db-0.0.0.0 | |
binary-0.7.1.0 | |
rts-1.0 | |
bytestring-0.10.4.0 | |
containers-0.5.5.1 | |
deepseq-1.3.0.2 |
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 NoMonomorphismRestriction #-} | |
{- | A first example of drawing diagrams from within GTK. This | |
program draws a Koch snowflake with the depth controllable | |
via a GTK widget. | |
-} | |
module Main where | |
import Graphics.UI.Gtk | |
import Diagrams.Prelude |
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 gtk | |
import chardet | |
import os | |
import getopt | |
import subprocess | |
dtype = 'text/html' | |
htmlclip = gtk.Clipboard().wait_for_contents(dtype).data | |
encoding = chardet.detect(htmlclip)['encoding'] |
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
! | |
31 | |
! | |
38.70967741935481 | |
77.41935483870962 | |
116.12903225806443 | |
154.83870967741925 | |
193.54838709677406 | |
232.25806451612885 |
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
TreeInsert.$wtreeInsert = | |
\ (@ a_arS) | |
(w_sYW :: GHC.Classes.Ord a_arS) | |
(w1_sYX :: a_arS) | |
(w2_sYY :: TreeInsert.Tree a_arS) -> | |
case w2_sYY of _ [Occ=Dead] { | |
TreeInsert.EmptyTree -> | |
(# w1_sYX, | |
TreeInsert.EmptyTree @ a_arS, | |
TreeInsert.EmptyTree @ a_arS #); |
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 python2 | |
import subprocess | |
import sys | |
import datetime | |
import re | |
if __name__ == "__main__": | |
t = datetime.datetime.now() | |
branchn = subprocess.check_output([ 'git' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer