Skip to content

Instantly share code, notes, and snippets.

View hyperreality's full-sized avatar

hyperreality

View GitHub Profile
@hyperreality
hyperreality / overpass-walkable.txt
Created November 7, 2025 14:57
Overpass: Get off-road walkable routes
[out:json][timeout:60];
// Walkable-by-pedestrians (non-road) ways in current map view
(
/* Explicitly pedestrian-focused highways */
way
["highway"~"^(footway|path|pedestrian|steps|bridleway)$"]
["area"!="yes"]
["access"!~"^(no|private)$"]
["foot"!~"^(no|private)$"]
@hyperreality
hyperreality / overpass-turbo-cyclable.txt
Last active October 29, 2025 20:54
Get cyclable tracks in view on overpass turbo
[out:json][timeout:60];
// All rideable categories within the current map view
(
/* Bridleways */
way
["highway"="bridleway"]
["access"!~"no"]
["bicycle"!~"no"]
({{bbox}});
@hyperreality
hyperreality / overpass-districts.py
Last active October 30, 2025 02:24
Overpass Get England District Cyclable Density CSV
import requests
import csv
import time
with open("district_merged2.csv", newline="", encoding="utf-8") as f:
reader = csv.DictReader(f)
districts = [row for row in reader if row]
def length_query(selector):
return f"""
@hyperreality
hyperreality / cyclable-districts.csv
Last active October 22, 2025 23:11
Cyclable Density by Local Authority District Area
District Area CyclableLength CyclableDensity
City of London 3 16.94 5646
Cambridge 41 174.23 4249
Tower Hamlets 20 82.14 4107
Waltham Forest 39 156.75 4019
Newham 36 140.76 3910
Hackney 19 70.15 3692
Stevenage 26 91.22 3508
Southwark 29 94.44 3257
Gloucester 41 116.33 2837
@hyperreality
hyperreality / gethighways.txt
Created October 22, 2025 22:04
Overpass: Get Highways
[out:json][timeout:25];
// gather results
(
// query part for: “highway=*”
node["highway"]({{bbox}});
way["highway"]({{bbox}});
relation["highway"]({{bbox}});
);
// print results
out body;
Albigensian.com
Americanizations.com
Andrianampoinimerina.com
Anglicanisms.com
Araucanian.com
Brahmanisms.com
Chanukahs.com
Chayefsky.com
Churriguera.com
Confucianisms.com

Keybase proof

I hereby claim:

  • I am hyperreality on github.
  • I am hyperreality (https://keybase.io/hyperreality) on keybase.
  • I have a public key ASAZvP0Suk6P4hb_f_Vh8tSwTMkIzD6gJAwCj6lVjuk7fAo

To claim this, I am signing this object:

#!/usr/bin/python3
from collections import Counter
import operator
import string
def ic(ctext):
num = 0.0
den = 0.0
for val in Counter(ctext).values():
@hyperreality
hyperreality / so-debug.js
Last active October 28, 2018 17:46
Automatic Stack Overflow debugging (joke)
#!/usr/bin/env node
const opn = require('opn');
var path = require('path');
var argv = require('minimist')(process.argv.slice(2));
if (!argv._.length) {
console.log('Usage: so-debug FILE.js [-g search Google] [-b specify which browser to use]');
}
else {
python -c "import readline,subprocess as s;p=s.Popen('mira',shell=True,stdin=s.PIPE);[p.stdin.write(raw_input()+'\n') for _ in iter(int,1)]"