Skip to content

Instantly share code, notes, and snippets.

View prafulfillment's full-sized avatar
🐶
Speaking to 🐶 & 🐬

praful mathur prafulfillment

🐶
Speaking to 🐶 & 🐬
View GitHub Profile

Dividing by 100:

Airport Parking => (44.8545276, -88.1565606)

Map: http://goo.gl/maps/0JKPA

Tried xy2latlon:

I knew it wasn't an x,y coordinate but wanted to see what was happening and I get the following:

vagrant@vagrant-ubuntu-precise-32:~/planet$ osm2pgsql --slim -d gis -C 16000 --number-processes 3 ~/planet/planet-latest.osm.pbf
osm2pgsql SVN version 0.81.0 (64bit id space)
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE: table "planet_osm_point" does not exist, skipping
NOTICE: table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE: table "planet_osm_line" does not exist, skipping
NOTICE: table "planet_osm_line_tmp" does not exist, skipping
@prafulfillment
prafulfillment / tollbooth_out_osm
Created April 2, 2013 23:35
How does lat/lon work in OSM?
id | lat | lon | tags
------------+-----------+------------+------------------------------------------------------------
356727456 | 471488295 | -861308679 | {barrier,toll_booth}
356742659 | 471231474 | -859785100 | {barrier,toll_booth}
356894354 | 471719801 | -861979645 | {barrier,toll_booth}
356894449 | 471652531 | -861890538 | {barrier,toll_booth}
356898029 | 472134064 | -862510737 | {barrier,toll_booth}
356898417 | 472324101 | -862721481 | {barrier,toll_booth}
440262751 | 438468665 | -848306075 | {barrier,toll_booth}
443801422 | 450912481 | -863370725 | {barrier,toll_booth}
@prafulfillment
prafulfillment / apply_sabotage.py
Last active December 15, 2015 01:48
Testing out pytest.
import pytest
######### CONSTANTS #########
TIMEOUT = 10
######### TEST #########
@pytest.mark.timeout(TIMEOUT)
def test_func(assert_stmt, func_to_test, apply_penalties):
# Track global vars
# Ring the bell if any background window rang a bell
set -g bell-action any
# Default termtype. If the rcfile sets $TERM, that overrides this value.
#set -g default-terminal screen-256color
set -g default-terminal "screen-256color"
# Keep your finger on ctrl, or don't
bind-key ^D detach-client
! escape = caps_lock; caps_lock = control_l; control_l = escape
!keycode 37 = Control_L
!keycode 66 = Caps_Lock
!keycode 9 = Escape
!remove Lock = Caps_Lock
!add Lock = Escape
!remove Control = Control_L
!add Control = Caps_Lock
# set your user tokens as enivornment variables, such as ~/.secrets
# See the README for examples.
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
" ===================================================
" P R A F U L ' S V I M R C
" ===================================================
" ================ Vundle ======================
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
@prafulfillment
prafulfillment / arandr.md
Last active December 14, 2015 13:09
Quick fix that deals with resolutions such as '900_59.90' that xrandr produces.

Arandr Fix

Fixing the arandr issue which depended on all modes to have a <width>x<height> name.

Bug report

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507521

Bugs / Caveats

Changes while running are not caught.

  • Versions before 0.1.7 depended on all modes to have a x name (see debian bug #507521); if ARandR does not start up, please install the latest version. (On different bugtrackers, this is called the ValueError / "1080p" / "1024x768i" problem).
  • See TODO for planned features.
@prafulfillment
prafulfillment / test_fib
Last active December 12, 2015 06:59
Testing out various versions of nested & unnested of fibonacci
fibonacci_memo
0.268512010574
fibonacci_memo_nested
11.6659519672
Diff: 11.3974399567
Ratio: 43.4466672172
----------------------------------------