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
boats :: [Integer] -> Integer -> [[Integer]] | |
boats docksCapacities numberOfBoats = do | |
d <- mapM (\x -> [0..x]) docksCapacities | |
guard $ sum d == numberOfBoats | |
return d | |
solve :: [(Integer, [Integer])] -> [Integer] -> Integer | |
solve boatAreas docksCapacities = minimum $ do | |
a <- mapM (boats docksCapacities) boatSizes | |
guard $ foldr1 (zipWith (+)) a == docksCapacities |
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
resolver: lts-13.23 | |
packages: | |
- '.' | |
extra-deps: | |
- cmark-gfm-0.1.8 | |
- haddocset-0.4.3 | |
- http-client-0.6.4 | |
- fastsum-0.1.1.0 | |
- fused-effects-0.4.0.0 |
![diag.png](https://gist.github.com/mryndzionek/76ea5ba24d254ac338541ff97221c540/raw/5b53f324a18cf271173894ef7362d26a5069678d/diag.png)
![adapter.png](https://gist.github.com/mryndzionek/066a19b16def811d3cb9728947bc5995/raw/b4f6ea9b777758a7ebed4dc222f703a73e50f420/adapter.png)
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/python3 | |
import sys | |
import time | |
import datetime | |
import subprocess | |
import logging | |
import requests | |
icon_codes = { |
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 stack | |
{- stack script | |
--compile | |
--copy-bins | |
--resolver lts-16.28 | |
--install-ghc | |
--package "async random time monad-loops" | |
--ghc-options=-Wall | |
-} |
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
[package] | |
name = "happy_eyeballs" | |
version = "0.1.0" | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
rand = { version = "0.8" } | |
log = { version = "0.4" } |
![profile.gif](https://gist.github.com/mryndzionek/f0187bf473d314d6570f169a809e74df/raw/145dc25246b524a27d9520f61ea8d6cc5ab2c35d/profile.gif)
![cq_keyb_1.png](https://gist.github.com/mryndzionek/33182b7deaf8ff3c491bb1b7f572957b/raw/ac8bd2d53802ba8e19bc537228c981670a69eed5/cq_keyb_1.png)
OlderNewer