Skip to content

Instantly share code, notes, and snippets.

@ldub
ldub / Main.hs
Created March 10, 2020 02:46
Xmlbf Example
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
module Main where
import qualified Data.ByteString as BS
import Data.HashMap.Strict (HashMap)
import Data.Text (Text)
import Data.Text.Lazy (toStrict, fromStrict)
import qualified Xmlbf as X

Mar 25, 2020, 9:39 AM

I am an ER MD in New Orleans. Class of 98. Every one of my colleagues have now seen several hundred Covid 19 patients and this is what I think I know.

Clinical course is predictable. 2-11 days after exposure (day 5 on average) flu like symptoms start. Common are fever, headache, dry cough, myalgias (back pain), nausea without vomiting, abdominal discomfort with some diarrhea, loss of smell, anorexia, fatigue.

Day 5 of symptoms- increased SOB, and bilateral viral pneumonia from direct viral damage to lung parenchyma.

Day 10- Cytokine storm leading to acute ARDS and multiorgan failure. You can literally watch it happen in a matter of hours.

# If syntax highlighting is working, this comment should be gray, not black.
# Fun fact there are exactly 64 {} before the comment, and 64 is a computer number. Seems related!
[
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {}
# Comment the line below to fix syntax highlighting:
{}
]
❯ nix build
error: builder for '/nix/store/3fl3fvrgs1ap0hsj5gjzfg9c77kn92hs-perl-5.36.0.drv' failed with exit code 2;
last 10 log lines:
> opmini.o perlmini.o universalmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o builtin.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o globals.o perlio.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o miniperlmain.o
> DYLD_LIBRARY_PATH=/private/tmp/nix-build-perl-5.36.0.drv-0/perl-5.36.0 ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
> DYLD_LIBRARY_PATH=/private/tmp/nix-build-perl-5.36.0.drv-0/perl-5.36.0 ./miniperl -Ilib -f write_buildcustomize.pl
> DYLD_LIBRARY_PATH=/private/tmp/nix-build-perl-5.36.0.drv-0/perl-5.36.0 ./miniperl -Ilib autodoc.pl
> DYLD_LIBRARY_PATH=/private/tmp/nix-build-perl-5.36.0.drv
diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix
index 871f9722a4a..be329a6881a 100644
--- a/pkgs/build-support/trivial-builders/default.nix
+++ b/pkgs/build-support/trivial-builders/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, stdenvNoCC, lndir, runtimeShell, shellcheck, haskell }:
+{ lib, stdenv, stdenvNoCC, lndir, runtimeShell, shellcheck, haskell, argbash }:
let
inherit (lib)
@ldub
ldub / main.py
Created September 5, 2023 05:34
Python Reference Model
from typing import Dict, List
database = {
"apple": "red",
"banana": "yellow",
"cherry": "red"
}
def fruit_colors() -> List[str]:
fruit_color_cache: Dict[str, str] = {}
@ldub
ldub / transpose.linq.cs
Created August 22, 2015 01:36
Unzip and Transpose in C# LINQ
// Transpose does this
// {1, 2, 3, 4} {1, 5, 9}
// {5, 6, 7, 8} ==> {2, 6, 10}
// {9,10,11,12} {3, 7, 11}
// {4, 8, 12}
void Main()
{
List<List<int>> list = new List<List<int>>() {
new List<int>() {1, 2, 3, 4},
new List<int>() {5, 6, 7, 8},