Skip to content

Instantly share code, notes, and snippets.

View JonathanReeve's full-sized avatar

Jonathan Reeve JonathanReeve

View GitHub Profile
with import <nixpkgs> {};
(let
my_jupyterlab = python37.pkgs.buildPythonPackage rec {
pname = "jupyterlab";
version = "1.0.4";
src = python37.pkgs.fetchPypi {
inherit pname version;
sha256 = "0vhdbzrphirl3x37d4zh0gaxhs6f7wj0i30wy4878yjkmlr219rj";
@JonathanReeve
JonathanReeve / exercises-analysis.ipynb
Created September 8, 2019 19:44
Exercises in Style Analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / requirements.nix
Created January 5, 2020 16:27
pypi2nix output for colormath
# generated using pypi2nix tool (version: 2.0.2)
# See more at: https://github.com/nix-community/pypi2nix
#
# COMMAND:
# pypi2nix -V python3 -e colormath
#
{ pkgs ? import <nixpkgs> {},
overrides ? ({ pkgs, python }: self: super: {})
}:
import pandas as pd
csv = ",name,hex,n,parent,parentHex\n0,dust,#b2996e,3,orange,#FFA500\n1,tea,#65ab7c,16,grey,#BEBEBE\n2,spruce,#0a5f38,1,black,#000000\n3,desert,#ccad60,6,orange,#FFA500\n4,swamp,#698339,2,grey,#BEBEBE\n5,fern,#63a950,1,green,#00FF00\n6,straw,#fcf679,9,yellow,#FFFF00\n7,leather,#ac7434,5,orange,#FFA500\n8,hazel,#8e7618,2,orange,#FFA500\n9,ice,#d6fffa,4,white,#FFFFFF\n"
df = pd.read_csv(csv)
df
name hex n parent parentHex
0 dust #b2996e 3 orange #FFA500
1 tea #65ab7c 16 grey #BEBEBE
2 spruce #0a5f38 1 black #000000
3 desert #ccad60 6 orange #FFA500
4 swamp #698339 2 grey #BEBEBE
5 fern #63a950 1 green #00FF00
6 straw #fcf679 9 yellow #FFFF00
7 leather #ac7434 5 orange #FFA500
8 hazel #8e7618 2 orange #FFA500
@JonathanReeve
JonathanReeve / errors.txt
Created May 21, 2020 01:27
Errors when running nix-shell
(imported from Control.Monad.Trans.Error):
Deprecated: "Use Control.Monad.Trans.Except instead"
|
242 | x <- E.runErrorT (f (E.runErrorT m))
| ^^^^^^^^^^^
src/Control/Monad/Morph.hs:242:30: warning: [-Wdeprecations]
In the use of ‘runErrorT’
(imported from Control.Monad.Trans.Error):
Deprecated: "Use Control.Monad.Trans.Except instead"
@JonathanReeve
JonathanReeve / keybase.md
Created June 2, 2020 16:21
Keybase confirmation

Keybase proof

I hereby claim:

  • I am JonathanReeve on github.
  • I am jonathanreeve (https://keybase.io/jonathanreeve) on keybase.
  • I have a public key whose fingerprint is 35C6 2F49 FEFC E02A 9500 A5DE 0D09 DB56 9FA0 A935

To claim this, I am signing this object:

@JonathanReeve
JonathanReeve / workshop-python-cli.org
Last active November 4, 2020 16:26
Making command-line programs in Python

Making command-line programs in Python

From a workshop given at the Python User Group, Foundations for Research Computing, Columbia University, on November 3rd, 2020.

Concepts

The UNIX Philosophy

  • A program should do one thing, and do it well.
  • Programs should be interoperable by reading and writing text over standard input and standard output
@JonathanReeve
JonathanReeve / macro-etym.ipynb
Last active December 5, 2020 03:17
macro-etym
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / gray-keats.ipynb
Created January 11, 2021 03:45
gray-keats.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.