Skip to content

Instantly share code, notes, and snippets.

View kr-stn's full-sized avatar

Kersten kr-stn

View GitHub Profile
@jgomezdans
jgomezdans / ndvi_process.py
Created November 3, 2011 12:19
A script to process TM data to calculate NDVI
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 3 11:56:48 2011
The main program. The program takes 3 files as input:
#. The red band (any GDAL-compatible format will do)
#. the near-infrarred band (again as above)
#. An output file name
@iamatypeofwalrus
iamatypeofwalrus / roll_ipython_in_aws.md
Last active January 22, 2024 11:18
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@sloria
sloria / bobp-python.md
Last active July 24, 2024 02:53
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@manugarri
manugarri / parking map.ipynb
Created February 21, 2016 21:19
Where the f*** can I park?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wboykinm
wboykinm / falsehoods.md
Last active February 1, 2024 15:52
Falsehoods programmers believe about addresses - by Michael Tandy

Falsehoods programmers believe about addresses

This is an anchor-linked version of the excellent, amazing original opus magnum by Michael Tandy.

An address will start with, or at least include, a building number.

Counterexample: Royal Opera House, Covent Garden, London, WC2E 9DD, United Kingdom.

When there is a building number, it will be all-numeric.

Counterexample: 1A Egmont Road, Middlesbrough, TS4 2HT

@bpj
bpj / md-head2ul.pl
Last active October 31, 2021 04:21
Massage Markdown converted with Pandoc from OPML exported from Dynalist
#!/usr/bin/env perl
=head1 SYNOPSIS
pandoc -f opml -t markdown --atx-headers [PANDOC OPTIONS] input.opml \
| perl md-head2dl.pl [OPTIONS] > output.md
=head1 DESCRIPTION
Massage Markdown converted with Pandoc L<http://pandoc.org> from OPML exported from Dynalist <https://dynalist.io>.
anonymous
anonymous / windscribe-connect-usable.sh
Created December 3, 2017 05:55
windscribe scan for decent server.
# Script that tries to find a windscribe vpn server with decent speeds
# Requires the windscribe command line client, and the speedtest.net
# python cli from here: https://github.com/sivel/speedtest-cli
#!/bin/bash
windscribe disconnect
speed=`speedtest --simple |grep -i download | cut -d ' ' -f 2`
@sgillies
sgillies / advanced_rasterio_features.ipynb
Last active July 23, 2024 17:26
Advanced Rasterio features notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.