Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan Reeve JonathanReeve

View GitHub Profile
View 05-nyu-pit-ml.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 03-nyu-pit-apis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 02-nyu-pit-intro-python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gray-keats.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View macro-etym.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / workshop-python-cli.org
Last active Nov 4, 2020
Making command-line programs in Python
View workshop-python-cli.org

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 / keybase.md
Created Jun 2, 2020
Keybase confirmation
View keybase.md

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 / errors.txt
Created May 21, 2020
Errors when running nix-shell
View errors.txt
(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"
View color-data.csv
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
View colors.py
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