This is a Python-based test harness which can be used to simulate a GTFS-realtime feed with trips on a frequency-based route. Specifically, it simulates arrivals on the AirBART route (obtain BART GTFS here), at the AirBART_OAK stop. For convenience, the script simulates two vehicles, which are perpetually three and seven minutes away, respectively.
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
{ | |
"currentTime": 1391381290937, | |
"text": "OK", | |
"data": { | |
"instanceDetails": [ | |
{ | |
"contactEmail": "onebusaway@kurt-p7-1539", | |
"instanceName": "OneBusAway on kurt-p7-1539", | |
"twitterUrl": "", | |
"language": "en-US", |
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
Sort sort = new Sort(_spatialStrategy.makeDistanceValueSource(shape.getCenter()).getSortField(false)).rewrite(_searcher); |
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
Tue Jun 30 19:59:55 2015 :$GPZDA,235955.00,30,06,2015,00,00*68 | |
Tue Jun 30 19:59:56 2015 :$GPZDA,235956.00,30,06,2015,00,00*6B | |
Tue Jun 30 19:59:57 2015 :$GPZDA,235957.00,30,06,2015,00,00*6A | |
Tue Jun 30 19:59:58 2015 :$GPZDA,235958.00,30,06,2015,00,00*65 | |
Tue Jun 30 19:59:59 2015 :$GPZDA,235959.00,30,06,2015,00,00*64 | |
Tue Jun 30 19:59:59 2015 :$GPZDA,235960.00,30,06,2015,00,00*6E | |
Tue Jun 30 20:00:00 2015 :$GPZDA,000000.00,01,07,2015,00,00*66 | |
Tue Jun 30 20:00:01 2015 :$GPZDA,000001.00,01,07,2015,00,00*67 | |
Tue Jun 30 20:00:02 2015 :$GPZDA,000002.00,01,07,2015,00,00*64 | |
Tue Jun 30 20:00:03 2015 :$GPZDA,000003.00,01,07,2015,00,00*65 |
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
#!/usr/local/bin/perl -T | |
#NRC ENR Atom feed generator | |
#Kurt Raschke | |
#kurt@kurtraschke.com | |
#Resources: | |
#http://linuxgazette.net/108/oregan2.html | |
#http://linuxgazette.net/109/oregan.html | |
#http://ttul.org/repos/cpan/trunk/Kwiki-Atom/lib/Kwiki/Atom.pm |
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
#!/bin/sh | |
#set -x | |
# | |
################################################################### | |
# smb.sh Charles Gillanders charles.gillanders@toucan.ie | |
# Modified by Kurt Raschke <kurt@kurtraschke.com>: | |
# No longer requires a valid user/pass for each machine | |
# Minor bug-fixing; better handling of the "dialup" and "nonetpage" directives | |
# | |
# A Big Brother External Script |
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 BibDesk URLs to shortDOI shortcuts | |
Kurt Raschke | |
kurt@kurtraschke.com | |
Licensed under the BSD license | |
*) | |
on run | |
tell application "BibDesk" | |
tell document 1 |
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
function makeLinks() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var twitterDataRange = ss.getRangeByName("Twitter3"); | |
vals = twitterDataRange.getValues(); | |
for (i in vals) { | |
var row = vals[i]; | |
for (j in row) { | |
var col = vals[i][j]; | |
vals[i][j] = makeLink(col); |
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
function setComments() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var twitterDataRange = ss.getRangeByName("Twitter3"); | |
vals = twitterDataRange.getValues(); | |
for (i in vals) { | |
var row = vals[i]; | |
for (j in row) { | |
var col = vals[i][j]; | |
if (col.length > 0) { |
Get an API key from developer.wmata.com, and put it in buspos.sh
.
If you don't happen to have a web server running, but you do have Python, do the following:
chmod +x buspos.sh
chmod a+r bus.xslt
mkdir cgi-bin
mv buspos.sh bus.xslt cgi-bin
python -m CGIHTTPServer 8001
OlderNewer