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 OverloadedStrings #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
import System.Random | |
import Data.Default | |
import Data.Maybe | |
import Data.Char | |
import Data.Monoid | |
import Text.InterpolatedString.Perl6 |
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 TemplateHaskell #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
import Text.InterpolatedString.Perl6 | |
import Text.Printf | |
type Coord = (Integer, Integer) |
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 TemplateHaskell #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
import Text.InterpolatedString.Perl6 | |
import Text.Printf | |
type Coord = (Integer, Integer) | |
type HilbertLookup = [Coord] |
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 #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
import Data.Maybe (fromMaybe, catMaybes) | |
import Data.List (tails, sortBy) | |
import Data.Ord (comparing) | |
import Data.List.Split | |
import Text.Printf |
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 #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
import Data.Maybe (fromMaybe, catMaybes) | |
import Data.List (tails, sortBy) | |
import Data.Ord (comparing) | |
import Data.List.Split | |
import Text.Printf |
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
(def asdf ["a" "b" "c"]) | |
(defn baz [x] | |
`(def ~(symbol (str x x)) ~x)) | |
(defmacro foo [l] | |
`(do ~@(map baz (eval l)))) | |
(foo asdf) |
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 OverloadedStrings #-} | |
import Network.SimpleIRC | |
import Data.String | |
import System.Exit | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Char8 as C | |
channel :: C.ByteString | |
channel = "#sordina-haskellbot-test" |
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
(ns urlpatternmatching | |
(:require [midje.sweet :refer :all])) | |
(defn split [string] | |
(let [matches (re-seq #"/([^/]+)" string) | |
groups (map #(% 1) matches) | |
] | |
groups)) | |
(defn isAuthorizedSection [env patternSection urlSection] |
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 RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
coil_A_1_pin = 7 | |
coil_A_2_pin = 9 | |
coil_B_1_pin = 8 |
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 GADTs | |
, FlexibleInstances | |
, RebindableSyntax | |
, DeriveFunctor | |
, RebindableSyntax | |
, OverloadedStrings #-} | |
import Control.Monad.Free | |
import Control.Monad | |
import Data.Monoid |
OlderNewer