Skip to content

Instantly share code, notes, and snippets.

View RaghavSood's full-sized avatar

Raghav Sood RaghavSood

View GitHub Profile
@RaghavSood
RaghavSood / Room 15 Giveaway Rules
Created September 18, 2012 16:29
StackOverflow room 15 giveaway
Rules
=====
1) Add https://plus.google.com/106245824841620354963 to your circles
2) Follow https://twitter.com/Appaholics16 (if you have a twitter account)
3) Send me a message somehow (email, G+, twitter, fb whatever. Pick your poison).
There are 0x3 copies available in this giveaway.
The book being given away is http://www.apress.com/9781430239451
var candidates = $( ".vote-count-post" ).map(function() {
var score, name, reputation, helpfulFlags,
postEl, repEl;
score = Math.max( +$( this ).text(), 1 );
postEl = $( this ).closest( "tr" );
postHeight = postEl.find( ".post-text" ).height();
name = postEl.find( ".user-details a" ).text();
repEl = postEl.find( ".user-details .reputation-score" );
reputation = +( repEl.attr( "title" ).replace( /[^0-9]/g, "" ) || repEl.text().replace( /[^0-9]/g, "" ) );
import urllib2
import os
baseurl = "http://ceodelhi.gov.in/WriteReadData/AssemblyConstituency/AC"
constituencyCount = 67
constituencyTotal = 70 #Delhi has 70 sub sections
while constituencyCount <= constituencyTotal:
import os
import sys
subfolders = 70
basepath = "/Users/raghavsood/Downloads/Elections/Delhi/"
currentfolder = 1
directory = "/Users/raghavsood/Downloads/Elections/Delhi/Analysed/"
import os
import sys
import re
directory = "/Users/raghavsood/Downloads/Elections/Delhi/Analysed/Lists/"
inputdirectory = "/Users/raghavsood/Downloads/Elections/Delhi/Analysed/"
try:
os.makedirs(directory)
except OSError:
import sqlite3 as lite
import sys
import os
con = None
try:
dbdirectory = "/Users/raghavsood/Downloads/Elections/Delhi/Analysed/Database/"
try:
os.makedirs(dbdirectory)
import sqlite3 as lite
import sys
import os
def luhn_checksum(card_number):
def digits_of(n):
return [int(d) for d in str(n)]
digits = digits_of(card_number)
odd_digits = digits[-1::-2]
even_digits = digits[-2::-2]
package com.appaholics.buzz;
import android.graphics.drawable.Drawable;
public class ListRow {
private Drawable image;
private String title;
private String packageName;
private boolean selected;
from lxml import html
import requests
import os
import json
import shelve
import sys
scriptid = int(sys.argv[1])
p = shelve.open("//Users/raghavsood/Development/CBSE/2015/shelve" + str(scriptid) + ".db")
#!/bin/bash
echo "Enter the client name"
read name
echo "Generating keys and config for $name"
cd /etc/openvpn
SERVER_IP=$(curl -s4 canhazip.com || echo "<insert server IP here>")