Skip to content

Instantly share code, notes, and snippets.

{
"areaVisibility": true,
"maxTransferDistance": 1000,
"htmlAnnotations": true,
"fares": {
"type": "off"
},
"dataImportReport": true,
"extraEdgesStopPlatformLink": true
}
@sven4all
sven4all / error.log
Last active October 2, 2019 07:04
vernemq_log
2019-10-02 06:51:06.201 [error] <0.492.0>@vmq_diversity_script_state:handle_info:172 can't call function auth_on_register with args [{addr,<<"10.133.94.70">>},{port,36376},{mountpoint,<<>>},{client_id,<<"test-client">>},{username,<<"test-user">>},{password,<<"123">>},{clean_session,true}] in "./share/lua/auth/postgres.lua" due to {badarg,'#',[false]}
2019-10-02 06:56:48.049 [error] <0.491.0>@vmq_diversity_script_state:handle_info:172 can't call function auth_on_register with args [{addr,<<"10.244.1.1">>},{port,54702},{mountpoint,<<>>},{client_id,<<"test-client">>},{username,<<"test-user">>},{password,<<"123">>},{clean_session,true}] in "./share/lua/auth/postgres.lua" due to {badarg,'#',[false]}
mkdir -p /tmp/data/chb
cd /tmp/data/chb
echo "Import CHB passengerstopassignment started"
wget "data.ndovloket.nl/haltes/"
PSFILE="$(wget data.ndovloket.nl/haltes/ -O- | grep -o '<a class="link" href=".*">Passenger.*</a>' | sed -r 's/<([^>]*?)>//g')"
if [ -n "$PSFILE" ]; then
wget "data.ndovloket.nl/haltes/${PSFILE}" -O new_passenger_stop_assignment_export.xml.gz
@sven4all
sven4all / database_structure.sql
Last active October 25, 2018 21:59
This scripts was written for a Master Thesis research at the TU Delft to collect data about the usage characteristics of Mobike and derive trips of that data, for a movie that was made with help of the data collection performed with this script see https://www.youtube.com/watch?v=MVqJtJA6_wg
-- Database structure that was used to store the data
-- Postgresql 10.5 + PostGis 2.4.4
CREATE TABLE cycle_measurement (
sample_id INT,
bike_id VARCHAR(255),
location GEOGRAPHY,
bike_type VARCHAR(10)
);