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 os {input} | |
| import arrays {sum} | |
| import math {min} | |
| // custom IO | |
| fn read_strings() ([]string) {return os.input('').split(' ')} | |
| fn read_longs() ([]i64) {return read_strings().map(it.i64())} | |
| fn read_ints() ([]int) {return read_strings().map(it.int())} | |
| fn read_floats() ([]f64) {return read_strings().map(it.f64())} |
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
| #!/bin/bash | |
| TARGET=~/Downloads/Remote/ | |
| inotifywait -m -e create -e moved_to -e modify --format "%f" $TARGET \ | |
| | while read FILENAME | |
| do | |
| echo Detected $FILENAME, copying to clipboard | |
| # https://askubuntu.com/a/759660 | |
| xclip -selection clipboard -t image/png -i "${TARGET}${FILENAME}" |
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 | |
| import Data.Char (ord, toLower) | |
| newtype PrsE a = PrsE { runPrsE :: String -> Either String (a, String) } | |
| satisfyE :: (Char -> Bool) -> PrsE Char | |
| satisfyE f = PrsE g | |
| where | |
| g "" = Left "unexpected end of input" | |
| g (c:cs) |
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
| data Position = Position | |
| { row :: Int, | |
| column :: Int | |
| } deriving (Data) | |
| data Segment = Segment {start::Position, end::Position} deriving (Data) | |
| data Node a b = Node {pos::Segment, node::a, load::b} deriving (Data) | |
| type I a = Node a () | |
| newtype PLicense = PLicense {cs::[I PComment]} deriving (Data) | |
| newtype PComment = PComment {c::Text} deriving (Data) |
NewerOlder