Skip to content

Instantly share code, notes, and snippets.

@jli
jli / pinned_conda_and_pip_deps.md
Last active October 15, 2021 13:36
Pinned/versioned Python dependencies when using both conda and pip

Pinned/versioned Python dependencies when using both conda and pip

Problem

It's good to have pinned/versioned dependencies for reproducible builds: https://pythonspeed.com/articles/pipenv-docker/

The conda-lock and pip-compile tools are helpful for this. But, they're not ideal when installing dependencies from both conda and pip because the solvers run independently and may generate inconsistent versions.

@jli
jli / howto_git_diff_parquet.md
Last active May 6, 2021 19:36
howto: diff parquet files in git

hexdump

  1. Add a custom diff driver "binary":
    git config diff.binary.textconv 'hexdump -v -C'
  2. Add a gitattributes config to associate .parq files with the "binary" diff driver:
    echo '*.parq diff=binary' >> .git/info/attributes

Keybase proof

I hereby claim:

  • I am jli on github.
  • I am circularly (https://keybase.io/circularly) on keybase.
  • I have a public key ASD-DLn1DKb0al4WYDRJAhej8u8VXf9S-9pRLGrv26a9CQo

To claim this, I am signing this object:

@jli
jli / init.vim
Created July 10, 2020 15:02
basic neovim config
" .config/nvim/init.vim
syntax on
""" basics
set ignorecase
set smartcase
set shiftwidth=2
set expandtab
;; user> (partition* [1 2 3 4 5 6 7 8] 3)
;; ((1 2 3) (2 3 4) (3 4 5) (4 5 6) (5 6 7) (6 7 8))
(defn partition* [xs n]
(let [subs (loop [ys xs acc []]
(if (empty? ys)
acc
(recur (rest ys) (conj acc ys))))]
(take-while #(= (count %) n)
(map (partial take n) subs))))