Skip to content

Instantly share code, notes, and snippets.

View miketahani's full-sized avatar

Mike Tahani miketahani

View GitHub Profile
@lifewinning
lifewinning / predictive_policing_bibliography.md
Last active March 17, 2023 21:44
Recommended Reading/Bibliography on Predictive Policing/Sorry and Thanks

OK. So I wrote some article about predictive policing. And it had lots of links, and it turns out sometimes editors see your links and are like ¯_(ツ)_/¯ to keeping those links when they publish the article. This is probably in part my own fault because I should have included those links as footnotes, and because working in print vs working online is Different, etc etc--the point is I feel really rotten that lots of really good reporting wasn't given due credit. Putting this list together does not totally fix it but will hopefully help people interested in the topic.

Also: there is a part at the end of this gist that explains my mixed feelings about the piece in general. The citations are probably more important, but if you want to watch me tableflip a little scroll down.


@kylemcdonald
kylemcdonald / example.png
Last active August 29, 2015 14:20
Small script for submitting algorithmically designed work to the Moon Drawings project http://www.moondrawings.org/draw
example.png
@dannguyen
dannguyen / nypd-stop-and-frisk-2014.md
Last active August 29, 2015 14:17
NYPD Stop and Frisk 2014 update: Now there's official CSVs!
@dannguyen
dannguyen / easypipe.py
Last active February 10, 2022 16:45
Using scikit-learn to classify NYT columnists
# some convenience functions here, nothing new
'''
# usage:
from easypipe import easy_pipeline
from easypipe import print_metrics
data_folder = "data-hold/20news"
p = easy_pipeline()
print_metrics(p, data_folder)
'''
@nderkach
nderkach / read_mitmproxy_dumpfile.py
Last active April 18, 2023 21:36
Read a mitmproxy dump file and generate a curl command
#!/usr/bin/env python
#
# Simple script showing how to read a mitmproxy dump file
#
### UPD: this feature is now avaiable in mitmproxy: https://github.com/mitmproxy/mitmproxy/pull/619
from libmproxy import flow
import json, sys
@briantjacobs
briantjacobs / storytelling_from_space.md
Last active February 18, 2024 10:02
Storytelling from Space

Storytelling from Space: Tools/Resources

This list of resources is all about acquring and processing aerial imagery. It's generally broken up in three ways: how to go about this in Photoshop/GIMP, using command-line tools, or in GIS software, depending what's most comfortable to you. Often these tools can be used in conjunction with each other.

Acquiring Landsat & MODIS

Web Interface

  • Landsat archive
@patriciogonzalezvivo
patriciogonzalezvivo / postgisOSM-LAS.md
Last active May 10, 2022 08:55
Loading OSM and LIDar to PostGIS
@YKCzoli
YKCzoli / Lidar_walkthrough.md
Last active November 15, 2023 18:35
Lidar_walkthrough

Processing LiDAR to extract building heights

Walk through

Detailed walk through of building extraction using postgis

First lets pull a data layer from of openstreetmap. You can do this any which way you’d like, as there are a variety of methods for pulling openstreetmap data from their database. Check the [wiki] (http://wiki.openstreetmap.org/wiki/Downloading_data) for a comprehensive list. My favourite method thus far is pulling the data straight into QGIS using the open layers plugin. For those who may want to explore this method, check [this tutorial] (http://www.qgistutorials.com/en/docs/downloading_osm_data.html). For building extraction you only need building footprints, and include the building tags. Not all polygons are of type building in OSM, so we can download all the polygons, and then filter the layer for only polygons tagged as buildings.

LiDAR data was pulled from USGS via the Earth Explorer site. [Here] (http://earthobservatory.nasa.gov/blogs/ele

@mojodna
mojodna / tilelive-minimal.js
Created July 30, 2014 21:15
A minimal tilelive source.
"use strict";
/**
* Note:
*
* setImmediate(callback, null, {});
*
* is shorthand for:
*
* setImmediate(function() {
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 9, 2024 10:22
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)