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
from django.db.models.query import QuerySet | |
from django.core.cache import cache | |
from django.db import models | |
import random | |
# douglas goodwin 4/2010 | |
# eculver's code with a couple of fixes and instructions | |
# | |
# maybe not the nest way to do it but... | |
# |
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
# Set cache dir | |
proxy_cache_path /var/cache/nginx levels=1:2 | |
keys_zone=microcache:5m max_size=1000m; | |
# Virtualhost/server configuration | |
server { | |
listen 80; | |
server_name yourhost.domain.com; | |
# Define cached location (may not be whole site) |
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
// FFmpeg settings for vimeo.com | |
// ============================= | |
// Trying to find the best settings for encoding videos as described here: | |
// http://vimeo.com/help/compression | |
// | |
// Input file: MOV | |
// Video: PAL DV, 720x576, 25fps | |
// Audio: aac Audio, Stereo, 48kHz, 256kbps | |
// | |
// OUT |
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
# get images to go with those codes | |
import json | |
import os | |
import time | |
import requests | |
from PIL import Image | |
from StringIO import StringIO | |
from requests.exceptions import ConnectionError | |
def go(query, path): |
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
# Build dependencies for OpenResty. | |
sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev | |
# Install standard Nginx first so that you get the relevant service scripts installed too | |
sudo apt-get install nginx | |
# If you want to access Postgres via Nginx | |
# sudo apt-get install libpq-dev |
dgoodwin fork for Python3 and Los Angeles downtown.
Accompanies blog post: Transit dimensions: Transitland Schedule API
The frequency.py script:
- Fetches all trips on a given date, between a start time and end time, inside of a bounding box
- Calculates the number of connections between every stop
- Uses a colormap and line width to show more frequent service
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
0.2 | 1.4 | 5.1 | 3.5 | Iris-setosa | |
---|---|---|---|---|---|
0.2 | 1.4 | 4.9 | 3 | Iris-setosa | |
0.2 | 1.3 | 4.7 | 3.2 | Iris-setosa | |
0.2 | 1.5 | 4.6 | 3.1 | Iris-setosa | |
0.2 | 1.4 | 5 | 3.6 | Iris-setosa | |
0.4 | 1.7 | 5.4 | 3.9 | Iris-setosa | |
0.3 | 1.4 | 4.6 | 3.4 | Iris-setosa | |
0.2 | 1.5 | 5 | 3.4 | Iris-setosa | |
0.2 | 1.4 | 4.4 | 2.9 | Iris-setosa | |
0.1 | 1.5 | 4.9 | 3.1 | Iris-setosa |
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
license: gpl-3.0 |
OlderNewer