Ruby script to convert stops.txt
and shapes.txt
to GeoJSON.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /boot/config.txt | |
# For more options and information see | |
# http://www.raspberrypi.org/documentation/configuration/config-txt.md | |
# Some settings may impact device functionality. See link above for details | |
# rotate Display | |
display_rotate=1 | |
arm_freq=700 | |
core_freq=250 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en-US"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en-US"> <![endif]--> | |
<!--[if gt IE 8]><!--> | |
<html class="no-js" lang="en-US"> | |
<!--<![endif]--> | |
<head> | |
<title>Commute Cost Calculator</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"features": [ | |
{ | |
"geometry": { | |
"coordinates": [ | |
34.1685, | |
-118.377 | |
], | |
"type": "Point" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"features": [ | |
{ | |
"geometry": { | |
"coordinates": [ | |
[ | |
34.1685, | |
-118.377 | |
], | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import simplejson as json | |
""" | |
Run this code in an iPython console that has the stations available. ie: | |
python manage.py shell | |
//[0] = ID number for AutoComplete | |
//[1] = Station Name | |
//[2] = X-Coordinate |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
from: http://charlesleifer.com/blog/using-python-and-k-means-to-find-the-dominant-colors-in-images/ | |
start with a bunch of data points. For simplicity let's say they're numbers on a number-line. | |
You want to group the numbers into "k" clusters, so pick "k" points randomly from the data to | |
use as your "clusters". | |
Now loop over every point in the data and calculate its distance to each of the "k" clusters. | |
Find the nearest cluster and associate that point with the cluster. When you've looped over |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USAGE | |
# python color_kmeans.py --image images/jp.png --clusters 3 | |
# or | |
# python color_kmeans.py -g "images/chase*.png" -c9 | |
# import the necessary packages | |
from sklearn.cluster import KMeans | |
import matplotlib.pyplot as plt | |
import argparse | |
import utils |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.