Skip to content

Instantly share code, notes, and snippets.

@willgeary
willgeary / gist:c8074268dcda519511bb7394bd797ffb
Last active May 1, 2023 21:26
Create a distance matrix
from geopy import distance
import pandas as pd
def make_distance_matrix(coords, addresses):
from_list = []
to_list = []
distance_list = []
for a in list(range(len(coords))):
for b in list(range(len(coords))):
@willgeary
willgeary / Oakland Street Sweeping Schedule
Created January 6, 2021 16:34
Oakland, California Street Sweeping Schedule
{'name': 'DAY_ODD',
'type': 'esriFieldTypeString',
'alias': 'DAY_ODD',
'length': 25,
'domain': {'type': 'codedValue',
'name': 'StreetSweepingD',
'codedValues': [{'name': 'Everyday', 'code': 'E'},
{'name': 'No Signage', 'code': 'N-S'},
{'name': 'No Sweeping (Exempt)', 'code': 'N'},
{'name': 'No Odd Addresses', 'code': 'N-O'},
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willgeary
willgeary / noiseloop.pde
Created November 30, 2017 04:43 — forked from golanlevin/noiseloop.pde
Processing code to demonstrate seamless loop of 1D noise
// Processing 3.0x code to demonstrate seamless loop of 1D noise
// Inspired by, and created in support of:
// "Drawing from noise, and then making animated loopy GIFs from there" by Etienne Jacob (@n_disorder)
// https://necessarydisorder.wordpress.com/2017/11/15/drawing-from-noise-and-then-making-animated-loopy-gifs-from-there/
// Note: this program has no dependencies, and does not require SimplexNoise.
// Demo GIF: https://media.giphy.com/media/xUOxeU2ELSPeTbevle/giphy.gif or http://gph.is/2Ah5kqG
PGraphics offscreenImg;
float myScale = 0.01;
float radius = 100.0;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willgeary
willgeary / GoogleMapDownloader.py
Created September 21, 2017 15:29 — forked from sebastianleonte/GoogleMapDownloader.py
A python script to download high resolution Google map images given a longitude, latitude and zoom level. (Works with Python 3)
#!/usr/bin/python
# GoogleMapDownloader.py
# Created by Hayden Eskriett [http://eskriett.com]
#
# A script which when given a longitude, latitude and zoom level downloads a
# high resolution google map
# Find the associated blog post at: http://blog.eskriett.com/2013/07/19/downloading-google-maps/
import urllib.request
from PIL import Image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@willgeary
willgeary / WORKSHOP.md
Created August 29, 2017 04:07 — forked from aman-tiwari/WORKSHOP.md
Document containing install instructions and cool links for the Making Maps with ML workshop!

Messing with Maps and ML quickstart

This document: https://goo.gl/AqGoE8

Installation instructions

By far the most annoying part of getting started with messing with ML is installing researcher-made code and turning it into something fun to play with.

Before doing any of these, please install Miniconda. If you don't have it installed already, here's how:

For OSX, this is:

@willgeary
willgeary / WORKSHOP.md
Created August 29, 2017 04:06 — forked from aman-tiwari/WORKSHOP.md
Document containing install instructions and cool links for the Making Maps with ML workshop!

Messing with Maps and ML quickstart

This document: https://goo.gl/AqGoE8

Installation instructions

By far the most annoying part of getting started with messing with ML is installing researcher-made code and turning it into something fun to play with.

Before doing any of these, please install Miniconda. If you don't have it installed already, here's how:

For OSX, this is: