Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 1.7 KB

README.md

File metadata and controls

45 lines (26 loc) · 1.7 KB

xlines

x lines of Python

An Agile blog series exploring common geosciencey workflows in x lines, where ideally x ≤ 10 but not necessarily.

Terms of engagement

  • One line per English-language sentence.
  • No semi-colons or line continuation.
  • Lines can be broken for readability, especially sequence items, or function arguments.
  • import statements and comments don't count. I'm really interested in the bits of code that do the thing, whatever that is.
  • But we can only import libraries on conda-forge or PyPi.
  • Plotting and other kinds of inspection don't count, unless they're central to the point of the code. They're more just for seeing what you're doing.

Running the notebooks

Run in Binder

Binder

Run in Colaboratory

Open In Colab

Running the notebooks locally

If you want to run the notebooks on your own computer, I recommend installing miniconda, or Anaconda. To make an environment for this notebook, download this repo, then you can do this in a terminal (or cmd prompt on Windows):

# First, cd to the repo folder you just downloaded.

# Make the environment:
conda env create -f environment.yml

# Start it:
conda activate xlines

# Add it to Jupyter's kernels:
python -m ipykernel install --user --name xlines

# Now start Jupyter Notebook:
jupyter notebook