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
data GithubConfig = GC { | |
username :: Text | |
, oauth :: Text | |
} deriving (Show, Eq, Ord) | |
githubSpec :: ValueSpec GithubConfig | |
githubSpec = sectionsSpec "github" $ | |
do username <- reqSection "username" "GitHub username" | |
oauth <- reqSection "oauth" "OAuth Token for GitHub" | |
pure GC{..} |
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
share [mkMigrate "migrateAll", mkPersist sqlSettings] [persistLowerCase| | |
Paper json | |
doi Text | |
author Text | |
published Day | |
title Text | |
Primary doi | |
UniquePaperDoi doi | |
deriving Show Generic | |
Annotation json |
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 #-} | |
module Main where | |
import Control.Applicative | |
import Data.Attoparsec.Text | |
import Data.Char (isLetter) | |
import qualified Data.Map.Strict as M | |
import Data.Text hiding (foldr, zipWith) | |
{- |
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 Main where | |
-- using http://hackage.haskell.org/package/base-4.12.0.0/docs/System-Environment.html#v:lookupEnv | |
import System.Environment | |
main :: IO () | |
main = do | |
shell <- lookupEnv "SHELL" -- System.Environment.lookupEnv take a String | |
doesnotexist <- lookupEnv "DOESNOTEXIST" | |
print (checkEnvVars shell) |
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-version: >=1.10 | |
name: whonknows | |
version: 0.1.0.0 | |
license: BSD3 | |
license-file: LICENSE | |
author: Shae Erisson | |
maintainer: [email protected] | |
build-type: Simple | |
extra-source-files: CHANGELOG.md |
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
[env:teensy36] | |
platform = teensy | |
board = teensy36 | |
framework = arduino | |
build_flags = -D USB_EVERYTHING | |
lib_deps = | |
/home/shae/build/Tympan_Library | |
https://github.com/PaulStoffregen/Audio.git | |
https://github.com/PaulStoffregen/SD.git | |
https://github.com/PaulStoffregen/SPI.git |
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 TypeApplications #-} | |
module Main where | |
import Data.SBV | |
main = do | |
res <- optimize Lexicographic configure | |
print res | |
configure :: Goal |
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
;; declare a cartesian product of host server and VM | |
;; three VMs x1, x2, x3 and three hosts y1, y2, y3 | |
(declare-const x11 Int) ; VM x1 might be on host y1 | |
(declare-const x12 Int) ; VM x1 might be on host y2 | |
(declare-const x13 Int) | |
(declare-const x21 Int) ; VM x2 might be on host y1 | |
(declare-const x22 Int) | |
(declare-const x23 Int) | |
(declare-const x31 Int) | |
(declare-const x32 Int) |
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 #-} | |
module Main where | |
import GitHub.Endpoints.Repos | |
-- https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line | |
-- give the token "public_repo" access | |
-- should be a 40 character string | |
myauth = OAuth "80....................................2e" -- magically converts to ByteString |
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 Main where | |
import Data.SBV | |
-- main :: IO () | |
main = do | |
res <- optimize Lexicographic $ do | |
-- create two piles of bools, each pile has a bool for each possible component | |
-- x1@[x11, x12, x13] <- sBools ["x11", "x12", "x13"] | |
-- map the costs onto the bools?! |