Skip to content

Instantly share code, notes, and snippets.

Avatar

Vincent Engelmann engelmav

View GitHub Profile
View test_nlu.py
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']))
@engelmav
engelmav / buses_to_pabt_8-815_lat_ln.sql
Created Dec 9, 2012
NJ Buses to Port Authority b/w and 8:15 w/ Lat/Lon
View buses_to_pabt_8-815_lat_ln.sql
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
View all_buses_morning_commute.sql
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
View gist:4136271
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";
View gist:4136198
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 Nov 22, 2012
All 113 Buses (to PABT)
View 113_buses.sql
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.sql
Created Nov 22, 2012
Buses to Port Authority
View buses_to_pabt.sql
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