This file contains hidden or 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 stack | |
-- stack script --resolver lts-16.9 --package conduit,text,mtl | |
{-# LANGUAGE NumericUnderscores #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# OPTIONS_GHC -Wall #-} | |
import Conduit (decodeUtf8C, encodeUtf8C, mapMC, runConduit, stdinC, stdoutC, (.|)) | |
import Control.Monad.State.Strict (StateT, evalStateT, get, liftIO, put) |
This file contains hidden or 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
datapointItemToString : DatapointsItem -> String | |
datapointItemToString i = | |
case i of | |
DatapointsRoot -> | |
"Root" | |
CategoryItem category -> | |
"Cateogry: " ++ category.name | |
QuestionItem question -> |
This file contains hidden or 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 stack | |
-- stack runghc --package reanimate --package linear --package reanimate-svg | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main | |
( main, | |
) | |
where |
This file contains hidden or 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
digraph G { | |
// External system | |
node [style=filled fillcolor="#999999" shape=rectangle, fontcolor=white] | |
externalSystem [ label=< | |
<table border="0" cellborder="0" cellspacing="1"> | |
<tr><td><b>External System</b></td></tr> | |
<tr><td><<qualtrics>></td></tr> | |
</table> |
This file contains hidden or 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 Bench exposing (main) | |
import Benchmark as B exposing (Benchmark, benchmark, compare, describe) | |
import Benchmark.Runner exposing (BenchmarkProgram, program) | |
import Dict exposing (Dict) | |
import RemoteData exposing (RemoteData(..), WebData) | |
main : BenchmarkProgram | |
main = |
This file contains hidden or 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
type alias ColorCalculator = | |
Float -> Float | |
{-| Input: indexMin, indexMax, where 0 < indexMin < 100 < indexMax | |
Output: function `f : ColorCalculator` mapping index values "evenly" from interval `(indexMin, indexMax)` to `(0,1)` such that `f 100 = 0.5` | |
-} | |
createColorCalculatorForGivenInterval : Float -> Float -> ColorCalculator |
This file contains hidden or 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 Main where | |
{-| | |
>>> getLine | |
Hello<Enter> | |
Hello | |
-} | |
main = undefined |
This file contains hidden or 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 Main exposing (main) | |
import Browser | |
import Html exposing (Html) | |
import Http | |
type Msg | |
= GotText (Result Http.Error String) | |
| NoOp |
This file contains hidden or 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 stack | |
-- stack script --resolver lts-13.2 --package blaze-html,servant,servant-blaze,servant-server,wai,warp | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# OPTIONS_GHC -Wall #-} | |
module Main (main) where | |
import Network.Wai (Application) | |
import qualified Network.Wai.Handler.Warp as Warp |
This file contains hidden or 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 Options.Applicative (Parser, ParserInfo, command, execParser, fullDesc, | |
help, helper, info, progDesc, subparser, value) | |
main :: IO () | |
main = execParser cliParser >>= print | |
demo :: Parser Int | |
demo = subparser | |
( command "a" (info (pure 1) (progDesc "A description")) | |
<> command "b" (info (pure 2) (progDesc "B description")) | |
) |