I hereby claim:
- I am mjgpy3 on github.
- I am mjgpy3 (https://keybase.io/mjgpy3) on keybase.
- I have a public key ASB0SpzTI-dWtTIyPmCKHIwrv9fRhEqDbDbcqsZjlM85SAo
To claim this, I am signing this object:
module Main where | |
import Data.List (foldl') | |
parseBinary = foldl' (\acc v -> acc*2 + (if v then 1 else 0)) 0 | |
seatId = parseBinary . map (`elem` "BR") | |
main = do | |
raw <- readFile "./d5.txt" |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import qualified Data.Text.IO as TIO | |
import qualified Data.Text as T | |
passportTexts = T.splitOn "\n\n" | |
required = |
module Main where | |
import qualified Data.Map.Strict as M | |
import Data.List (unfoldr) | |
import Control.Monad (guard) | |
input = [ | |
"....#...............#.#..###.##", | |
-- etc... | |
] |
module D4 where | |
import Control.Monad (guard) | |
import Data.List (group) | |
s = 147981 | |
e = 691423 | |
exTwoAdj = elem 2 . map length . group . show |
module Main where | |
input = | |
[ | |
-- Use vim `s/...` to make input look like this | |
(9, 10, 'm', "mmmmnxmmmwm"), | |
-- ... | |
] | |
isValidPassword (min, max, needle, hay) = |
open Base;; | |
let dependencies (sorted_words: string list): (char, char Hash_set.t) Hashtbl.t = | |
let | |
(* For now assume Latin chars from English alphabet. | |
This could certainly be more clever but isn't really the heart of the problem. *) | |
graph = Hashtbl.create ~growth_allowed:true ~size:26 (module Char) | |
in | |
let | |
same_first_char a b = String.equal (String.prefix a 1) (String.prefix b 1) |
Red [ | |
Title: "Download links" | |
] | |
args: system/script/args | |
comment { | |
- Accept a URL as input to program | |
- HTTP GET URL | |
- Parse response as HTML | |
- Extract a links |
I hereby claim:
To claim this, I am signing this object:
if [ $(date +%s) -ge $(date -d 2019-11-01 +%s) ]; | |
then | |
notify-send "Check out this cool thing!" | |
fi |