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
| { config, pkgs, ... }: | |
| { | |
| nix.package = pkgs.nixUnstable; | |
| nix.extraOptions = '' | |
| experimental-features = nix-command flakes | |
| ''; | |
| boot.loader.grub.enable = true; | |
| boot.loader.grub.version = 2; |
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
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE NamedFieldPuns #-} | |
| module Lib | |
| ( foo | |
| , someFunc | |
| ) where | |
| import Data.Text (Text) | |
| import Control.Monad.Reader (runReader) |
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 Day12 where | |
| import Control.Applicative (Alternative((<|>))) | |
| import Data.List ((\\)) | |
| import Data.Maybe (isJust) | |
| import Data.Text (Text) | |
| import GHC.Generics (Generic) | |
| import Optics | |
| import Text.Megaparsec (some) | |
| import Text.Megaparsec.Char (char, eol, lowerChar, upperChar) |
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
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| module GADTs where | |
| data Subject = Math | English | French | |
| deriving (Eq, Show) |
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
| inp w | |
| mul x 0 | |
| add x z | |
| mod x 26 | |
| div z 1 | |
| add x 12 | |
| eql x w | |
| eql x 0 | |
| mul y 0 | |
| add y 25 |
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
| from collections import deque | |
| import fileinput | |
| def main(): | |
| x = y = z = w = 0 | |
| for line in fileinput.input(): | |
| inp = deque(line) | |
| w = int(inp.popleft()) | |
| x *= 0 |
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
| from collections import deque | |
| import fileinput | |
| import itertools | |
| nums = list(itertools.repeat(list(range(9, 0, -1)), 14)) | |
| def main(): | |
| i = 0 | |
| for n in itertools.product(*nums): | |
| num = ''.join(map(str, n)) |
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
| building the system configuration... | |
| warning: Git tree '/home/jco/nixos-flake' is dirty | |
| error: The ‘gnome.vte’ alias was removed on 2022-01-13. Please use ‘pkgs.vte’ directly. | |
| … while evaluating the attribute 'vte' | |
| at /nix/store/yjs0c0h8nwqjjsy4zdg0nmj611rpjypa-source/pkgs/desktops/gnome/default.nix:362:3: | |
| 361| libgnomekbd = throw "The ‘gnome.libgnomekbd’ alias was removed on 2022-01-13. Please use ‘pkgs.libgnomekbd’ directly."; # added 2019-02-08 | |
| 362| vte = throw "The ‘gnome.vte’ alias was removed on 2022-01-13. Please use ‘pkgs.vte’ directly."; # added 2019-02-08 |
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 Data.Sequence (Seq((:|>))) | |
| import Data.Tree (Tree(..)) | |
| import qualified Data.Sequence as Seq | |
| foobar_test :: TestEnv () | |
| foobar_test = do | |
| tree :: Tree () <- liftIO . generate $ treeGen 50 `suchThat` ((>= 5) . length . flatten) | |
| ugids <- createUserGroupTree tree | |
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 ModKeys where | |
| import Data.Aeson | |
| import Data.Text (Text) | |
| import GHC.Generics (Generic) | |
| import qualified Data.Aeson as Aeson | |
| import qualified Data.ByteString.Lazy as LBS | |
| import qualified Data.Text.Encoding as E | |
| import qualified Data.Text.IO as TIO |