Skip to content

Instantly share code, notes, and snippets.

View thejeshgn's full-sized avatar

Thejesh GN thejeshgn

View GitHub Profile
@thejeshgn
thejeshgn / gis_database_install.md
Last active June 22, 2023 13:58
Postgres9 and PostGIS 2.0 on Ubuntu 12.04 LTS

###STEP0: Ubuntu Ubuntu 12.04 LTS

###STEP1: Install postgresSQL 9.1

apt-get install postgresql-9.1

Glances is a cross-platform curses-based monitoring tool written in Python.

#install
$ pip install Glances

#usage
$ glances
@thejeshgn
thejeshgn / burp.json
Created August 21, 2013 09:08
Initial feed is from alagu/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thejeshgn
thejeshgn / saverti.md
Created September 5, 2013 09:38
Email PM and Speaker about RTI amendments

Email the Speaker of the Lok Sabha, Smt. Meira Kumar. She has the power to refer this Bill to a standing committee and ensure that the public is consulted. Below is a sample email you can send her ([email protected]) with a copy to the Prime Minister ([email protected]).


Dear Madam,

I am writing this email to express my anguish over the proposed amendment to the RTI Act. The RTI Act has been a powerful tool for fighting corruption and I feel it is undemocratic to amend it without hearing the concerns of citizens. I therefore request you to refer this bill to a Standing Committee and thus enable more public discussion on this issue.

Thank you.
@thejeshgn
thejeshgn / qr-display.py
Created October 25, 2013 16:18
Quickly create QR code and display for scanning.
#i know pylab is a overkill but it makes it easy to display.
#If its already installed then why not?
from pylab import *
import qrcode
img = qrcode.make('Some data here')
imshow(img)
show()
@thejeshgn
thejeshgn / ews_quarters.geojson
Created November 15, 2013 12:13
EWS QUARTERS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Thejesh subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Laws" title="Laws">
<outline type="rss" text="SPICY IP" title="SPICY IP" xmlUrl="http://spicyipindia.blogspot.com/feeds/posts/default" htmlUrl="http://spicyipindia.blogspot.com/"/>
<outline type="rss" text="Live Law" title="Live Law" xmlUrl="http://www.livelaw.in/feed/" htmlUrl="http://www.livelaw.in"/>
@thejeshgn
thejeshgn / unicode-normalization.txt
Created December 17, 2013 06:59
unicode normalization in python
Python 2.7.3 (default, Jul 5 2013, 08:39:51)
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
DreamPie 1.1.1
>>> print u'\u0958' == u'\u0915\u093c'
False
>>> print 'क़' == 'क़'
False
>>> import unicodedata
>>> print unicodedata.normalize('NFC' ,u'\u0958') == unicodedata.normalize('NFC', u'\u0915\u093c')
@thejeshgn
thejeshgn / histogram.py
Created February 17, 2014 07:22
Hourly histogram of incoming calls
from datetime import datetime
from datetime import timedelta
diff_time_from_gmt = timedelta(minutes=330)
incoming = []
with open('/home/thej/Desktop/my_incoming_calls.csv', 'rb') as csvfile:
spamreader = csv.reader(csvfile, delimiter='\t', quotechar='|')
for row in spamreader:
incoming.append( ( datetime.strptime(row[4], '%Y-%m-%d %H:%M:%S')+ diff_time_from_gmt ))