This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
See this gist: https://gist.github.com/1984424 | |
Download both of these gists. save it in same folder. The down_xkcd.py will download all the xkcd comics from net. And view comics using xkcd_viewer.py | |
""" | |
import pygtk | |
import gtk | |
from PIL import Image | |
import os | |
from random import randint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import urllib | |
#import re | |
from BeautifulSoup import BeautifulSoup | |
""" | |
Download this file in html version | |
https://docs.google.com/spreadsheet/ccc?key=0AsKzpC8gYBmTcGpHbFlILThBSzhmZkRhNm8yYllsWGc&hl=en#gid=0" | |
""" | |
url = "The URL of above file" # url = "file:///home/jay/Downloads/index.html" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import os | |
from BeautifulSoup import BeautifulSoup | |
BASE_URL = "http://xkcd.com" | |
proxy = {"http":"http://user:pass@proxy:port/", | |
"https":"https://user:pass@proxy:port/"} | |
Proxy = urllib2.ProxyHandler(proxy) | |
opener = urllib2.build_opener(Proxy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import mimetypes | |
def main(): | |
target_file = raw_input('Enter the name of the file(Separate with comma): ') | |
target_type = raw_input('Enter the type of the file(Separate with spaces): ').split() | |
target_dir = raw_input('Enter directory (Press Enter for current directory)(Separate with comma): ') | |
flag = 0 | |
if target_file: | |
target_file = target_file.split(',') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygtk | |
pygtk.require('2.0') | |
import gtk | |
import os | |
class TextBox: | |
def __init__(self): | |
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) | |
self.window.set_size_request(200,250) | |
self.window.connect("destroy", self.close_application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def makeDir(path): | |
if os.path.isdir(path): | |
return | |
dir1, dir2 = os.path.split(path) | |
makeDir(dir1) | |
os.mkdir(path) | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Author: Jay Rambhia | |
email : [email protected] | |
A new script supporting both Mozilla Firefox and Google Chrome bookmarks: | |
https://github.com/jayrambhia/Bookmark-Manager | |
''' | |
import os | |
import json | |
import pickle | |
import gdbm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Author : Jay Rambhia | |
email : [email protected] | |
twitter: @jayrambhia | |
''' | |
import os | |
import time | |
import threading | |
import sys | |
from multiprocessing import Process |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Fri Jan 27 21:48:58 2012 | |
@author: jay | |
""" | |
import json | |
import os | |
import gdbm | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
@author: jay | |
""" | |
from BeautifulSoup import BeautifulSoup | |
import gdbm | |
import pickle | |
import time | |
def main(): |