Skip to content

Instantly share code, notes, and snippets.

Devdatta Tengshe devdattaT

  • Pune
Block or report user

Report or block devdattaT

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Dams.csv
We can't make this file beautiful and searchable because it's too large.
86.2955202501893,25.0331853491585,"1",Ajan Dam,D00105,BR02HH0020,25.033076,86.295052,Jamui,Jamui,BR,Ajan,2A,TE,"1989","518.3","39.02",,CH,"76.25","123.32","878.5",UG,,,,,Vineeta,,"Anjan, Azan",Completed,Seismic Zone-IV,,,,,,,Jamui,,,Class 2,"Water Resources Department, Govt.of Bihar",UG,25.03318596,86.29551697,,,,,dam
devdattaT /
Created Feb 14, 2019
How to Visualize your Google Location History

Google is extremely transparent about the Location History it has on you. You can check it out on the timeline feature in the Google Maps application on the phone, or on It is possible that you have that turned off, and in that case, consider yourself lucky.

If there is data there, you can view it online, or Download and Analyze it yourself.

import json
import csv
import sys
import datetime
import os
def make_reader(in_json):
# Open location history data
devdattaT / HawkerCenters.csv
Created Jan 22, 2019
Location information for Hawker Centres
View HawkerCenters.csv
Name Latitude Longitude
Maxwell Food Center 1.2804887 103.8446716
Chomp Chomp Food Centre 1.3641944 103.8663601
Lau Pa Sat 1.2806279 103.8502290
Tiong Bahru Market 1.2847589 103.8326789
devdattaT / MRT.qml
Created Jan 22, 2019
Style for MRT subway routes
View MRT.qml
<qgis simplifyMaxScale="1" labelsEnabled="0" hasScaleBasedVisibilityFlag="0" simplifyAlgorithm="0" readOnly="0" simplifyDrawingTol="1" simplifyLocal="1" minScale="1e+8" simplifyDrawingHints="1" version="3.2.0-Bonn" maxScale="0">
<renderer-v2 symbollevels="0" enableorderby="0" attr="name" forceraster="0" type="categorizedSymbol">
<category symbol="0" render="true" label="Circle Line" value="Circle Line"/>
<category symbol="1" render="true" label="Circle Line Extension" value="Circle Line Extension"/>
<category symbol="2" render="true" label="Circle Line MRT" value="Circle Line MRT"/>
<category symbol="3" render="true" label="Downtown Line" value="Downtown Line"/>
<category symbol="4" render="true" label="Downtown Line MRT" value="Downtown Line MRT"/>
<category symbol="5" render="true" label="MRT East West Line (EW)" value="MRT East West Line (EW)"/>
devdattaT / Upgrading Postgresql Client to 10.x on Ubuntu
Last active Jun 5, 2018
Upgrading Postgresql Client to 10.x on Ubuntu
View Upgrading Postgresql Client to 10.x on Ubuntu
Upgrading Postgresql Client to 10.x on Ubuntu
We need to first check which Postgresql components are currently installed. This can be done by running a command like:
`dpkg -l | grep postgres`
This returned:
ii postgresql-client 9.5+173ubuntu0.1 all front-end programs for PostgreSQL (supported version)
devdattaT / nodeApp.js
Created Apr 23, 2018
Area Mismatch with PostGIS
View nodeApp.js
var turf = require( "turf" );
let input='{"type":"Polygon","coordinates":[[[81.84447939698728,25.457757],[81.84430664903012,25.456003060556696],[81.84379504376571,25.45431652402258],[81.84296424189746,25.452762203050835],[81.84184617067527,25.45139982932473],[81.84048379694916,25.450281758102534],[81.83892947597742,25.449450956234294],[81.8372429394433,25.448939350969884],[81.835489,25.44876660301271],[81.83373506055669,25.448939350969884],[81.83204852402257,25.449450956234294],[81.83049420305083,25.450281758102534],[81.82913182932472,25.45139982932473],[81.82801375810253,25.452762203050835],[81.82718295623428,25.45431652402258],[81.82667135096987,25.456003060556696],[81.82649860301271,25.457757],[81.82667135096987,25.459510939443305],[81.82718295623428,25.46119747597742],[81.82801375810253,25.462751796949167],[81.82913182932472,25.464114170675273],[81.83049420305083,25.465232241897468],[81.83204852402257,25.466063043765708],[81.83373506055669,25.466574649030118],[81.835489,25.46674739698729],[81.8372429394
devdattaT / mohallas.geojson
Last active Jun 24, 2016
The Polygons of Mohallas of Delhi
View mohallas.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
devdattaT /
Created Jul 14, 2014
Downloading of Slippy Tiles using Shapely.
import math
import os
import urllib
from shapely.geometry import Polygon
def deg2num(lat_deg, lon_deg, zoom):
lat_rad = math.radians(lat_deg)
n = 2.0 ** zoom
xtile = int((lon_deg + 180.0) / 360.0 * n)
ytile = int((1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n)
You can’t perform that action at this time.