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
# *** The trekking profile is for slow travel | |
# *** and avoiding car traffic, but still with | |
# *** a focus on approaching your destination | |
# *** efficiently. | |
---context:global # following code refers to global config | |
# Bike profile | |
assign validForBikes = true |
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
+----------------------------------------+------------+ | |
| Style name | # of rules | | |
+----------------------------------------+------------+ | |
| text-point | 1528 | | |
| roads-fill-fill | 802 | | |
| tunnels-fill | 794 | | |
| bridges-fill | 754 | | |
| amenity-points | 546 | | |
| landcover-high-zoom | 467 | | |
| landcover-upper-mid-zoom | 206 | |
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/bin/env python | |
import yaml | |
CYCLEWAYS_OUTLINES = [ | |
'lane', | |
'opposite_lane', | |
'track', | |
'opposite_track', | |
'share_busway', | |
'opposite_share_busway', |
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
class App { | |
public static void main(String [ ] args) | |
{ | |
int N_TESTS = 10000000; | |
double R = 6371000.; | |
double rad = Math.PI / 180; | |
double[] latlng1 = {48.8124, 2.3158}; | |
double[] latlng2 = {48.8204, 2.3210}; |
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
["01170", "01290", "01410", "01750", "06000", "06100", "06130", "06150", "06160", "06200", "06300", "06400", "06520", "06600", | |
"07160", "07190", "07310", "07320", "07510", "07630", "12140", "12350", "12460", "13090", "13100", "20000", "20090", "20200", | |
"20220", "20251", "20256", "20270", "20600", "26340", "26470", "30000", "30900", "33950", "33970", "34000", "34070", "34080", | |
"34090", "35000", "35200", "35700", "37000", "37100", "37200", "38000", "39120", "39330", "39600", "39800", "42000", "42100", | |
"44000", "44100", "44200", "44300", "45000", "45100", "46630", "49000", "49100", "50100", "50130", "57000", "57050", "57070", | |
"59000", "59260", "59491", "59493", "59650", "59777", "59800", "60113", "60190", "63000", "63100", "65200", "65710", "66000", | |
"66100", "67000", "67100", "67130", "67200", "67570", "68126", "68630", "75000", "76450", "76540", "76600", "76610", "76620", | |
"83000", "83100", "83200", "83370", "83530", "83600", "83700", "84000", "84140", "87000", "87100", "87280", "92190", "92360"] |
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
# *** The trekking profile is for slow travel | |
# *** and avoiding car traffic, but still with | |
# *** a focus on approaching your destination | |
# *** efficiently. | |
# | |
# TODO: https://github.com/abrensch/brouter/issues/98 | |
---context:global # following code refers to global config |
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
import i18n from '@/i18n'; | |
/* | |
* Code below is dapted from | |
* https://github.com/date-fns/date-fns/blob/v1/src/format/index.js | |
* Licensed under MIT © Sasha Koss. | |
*/ | |
export function addLeadingZeros(number, targetLength) { | |
let output = Math.abs(number).toString(); | |
while (output.length < targetLength) { |
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
DROP TABLE IF EXISTS z30; | |
-- Get all zone:maxspeed ways, with geometry in Lambert93 | |
CREATE TEMP TABLE z30 AS | |
SELECT | |
id, | |
tags, | |
ST_Transform(linestring, 2154) AS linestring | |
FROM | |
ways | |
WHERE |
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
# Load from https://opendata.hauts-de-seine.fr/explore/dataset/accidents-corporels-de-la-circulation-routiere/information/?disjunctive.cat_route1&sort=-date&location=18,48.81793,2.3158&basemap=jawg.streets | |
import json | |
import folium | |
import pandas | |
data = pandas.read_csv('accidents-corporels-de-la-circulation-routiere.csv', delimiter=';', parse_dates=['DATE']) | |
map = folium.Map(location=[48.816, 2.321], zoom_start=15, | |
tiles='https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png', attr='toto') |
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
# This file is part of QuTiP: Quantum Toolbox in Python. | |
# | |
# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# 1. Redistributions of source code must retain the above copyright notice, |
NewerOlder