Skip to content

Instantly share code, notes, and snippets.

View engelmav's full-sized avatar

Vincent Engelmann engelmav

View GitHub Profile
@engelmav
engelmav / buses_to_pabt.sql
Created November 22, 2012 16:28
Buses to Port Authority
SELECT
BusRoute.route_id
,bustrip.trip_id
,bustrip.trip_headsign
,BusStopTime.arrival_time
,busstopTime.stop_sequence
,busstop.stop_name
--,BusTripShape.shape_pt_sequence
FROM routes BusRoute
LEFT JOIN trips BusTrip
@engelmav
engelmav / 113_buses.sql
Created November 22, 2012 16:39
All 113 Buses (to PABT)
SELECT
BusRoute.route_id
,bustrip.trip_id
,bustrip.trip_headsign
,BusStopTime.arrival_time
,busstopTime.stop_sequence
,busstop.stop_name
--,BusTripShape.shape_pt_sequence
FROM routes BusRoute
LEFT JOIN trips BusTrip
@engelmav
engelmav / gist:4136198
Created November 23, 2012 15:47
weekday_113
SELECT
BusRoute.route_id
,bustrip.trip_id
,bustrip.trip_headsign
,BusStopTime.arrival_time
,busstopTime.stop_sequence
,busstop.stop_name
--,BusTripShape.shape_pt_sequence
FROM routes BusRoute
LEFT JOIN trips BusTrip
use strict;
use DBI;
use Data::Dumper;
use DateTime;
use Text::CSV_XS;
my $pg_dbname = "gtfs_njtransit";
my $pg_host = "dbi:Pg:dbname=$pg_dbname";
my $pg_user = "xxxx";
my $pg_pass = "xxxx";
@engelmav
engelmav / all_buses_morning_commute.sql
Created November 23, 2012 16:57
all_buses_morning_commute
SELECT
BusRoute.route_id
,bustrip.trip_id
,bustrip.trip_headsign
,BusStopTime.arrival_time
,busstopTime.stop_sequence
,busstop.stop_name
--,BusTripShape.shape_pt_sequence
FROM routes BusRoute
LEFT JOIN trips BusTrip
@engelmav
engelmav / buses_to_pabt_8-815_lat_ln.sql
Created December 9, 2012 16:54
NJ Buses to Port Authority b/w and 8:15 w/ Lat/Lon
SELECT
BusRoute.route_id
,bustrip.trip_id
,bustrip.trip_headsign
,BusStopTime.arrival_time
,busstopTime.stop_sequence
,busstop.stop_name
,busstop.stop_lat
,busstop.stop_lon
,busstop.stop_id
from rasa_nlu.model import Interpreter, RasaNLUConfig
from rasa_core import utils
import logging
def test_loop(user_messages):
for message in user_messages:
result = interpreter.parse(message)
logger.info("test message: `{}`, result: {} with confidence {}".format(message, result['intent']['name'],
result['intent']['confidence']))