This file contains hidden or 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
SELECT DISTINCT | |
stop_id, | |
stop_name, | |
group_concat(DISTINCT route_short_name ORDER BY cast(route_id AS INT)) routes, | |
group_concat(DISTINCT trip_headsign ORDER BY cast(route_id AS INT)) headsigns | |
FROM stop_times | |
INNER JOIN stops using (stop_id) | |
INNER JOIN trips using (trip_id) | |
INNER JOIN routes using (route_id) | |
WHERE trip_operation_type = 1 -- do not list services in/outbound of depots |
This file contains hidden or 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
-- Query GTFS tables | |
SELECT DISTINCT | |
x.stop_id, | |
next_stop, | |
stops.stop_name | |
FROM | |
( | |
SELECT | |
stop_id, | |
stop_sequence, |
This file contains hidden or 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
# Based on https://stackoverflow.com/a/17383621 | |
import os, numpy, PIL | |
from PIL import Image | |
# Access all PNG files in directory | |
allfiles=os.listdir(os.getcwd()) | |
imlist=[filename for filename in allfiles if filename[-4:] in [".png",".PNG"]] | |
# Assuming all images are the same size, get dimensions of first image |
This file contains hidden or 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
cat /dev/urandom | tr -cd "0-9" | head -c 60 | sed "s/.\{4\}/&\n/g" |
This file contains hidden or 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
date = luxon.DateTime.fromISO("2024"); | |
final = luxon.DateTime.fromISO("2024-04-30"); | |
string = ""; | |
for (;date < final; date = date.plus({minutes: 90})){ | |
Y = date.toFormat("y"); | |
M = date.toFormat("LL"); | |
D = date.toFormat("dd"); | |
h = date.toFormat("HH"); | |
m = date.toFormat("mm"); | |
s = date.toFormat("ss"); |