This file contains 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
#!/bin/bash | |
# Author : Abhinay Omkar (c) 2007 | |
# Description : wc using awk. without using wc. | |
# License : GPLv2 | |
# This is free software. You may redistribute copies of it under the terms of | |
# the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. | |
# There is NO WARRANTY, to the extent permitted by law. | |
# | |
# Copyright (C) 2007 Free Software Foundation, Inc. |
This file contains 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
#!/usr/bin/python | |
#Author: Abhinay Omkar | |
#Title: Guess Number Game | |
import random | |
class GuessNumber: | |
def startGame(self): | |
print 'Guess a number!' | |
t=0 |
This file contains 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
print "hello world!" |
This file contains 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
# Copy files of Source1, Source2 and Source 3 Directories to Destination Folder | |
find Source1 Source2 Source3 -type f -exec cp '{}' Destination/ \; | |
This file contains 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
#!/bin/bash | |
# forked from gist:320305 by mmalone | |
if [ $# -ne 1 ]; then | |
echo "Usage: pyedit <python module>" | |
exit 1 | |
fi | |
MODULE_LOCATION=`python -c "import $1; print $1.__file__.rstrip('c')"` |
This file contains 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
mkdir MyFlickrBackup | |
cd MyFlickrBackup | |
#Download FlickrBird Script | |
wget http://github.com/abhiomkar/FlickrBird/raw/master/flickrbird.py | |
#Give execute permissions to run it | |
chmod +x flickrbird.py | |
#Yah! run it... | |
./flickrbird.py |
This file contains 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: Abhinay Omkar | |
# Youtube Downloader | |
import sys | |
from urllib import urlopen, unquote | |
from urlparse import parse_qs, urlparse | |
youtube_watchurl = sys.argv[1] | |
url_query = urlparse(youtube_watchurl).query | |
video_id = parse_qs(url_query)['v'][0] | |
url_data = urlopen('http://www.youtube.com/get_video_info?&video_id=' + video_id).read() |
This file contains 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: Abhinay Omkar | |
# Title: One-liner to download youtube video in Python | |
from urllib import urlopen, unquote; from urlparse import parse_qs, urlparse; youtube_watchurl="http://www.youtube.com/watch?v=NeSuirvA6UE&playnext_from=TL&videos=MS3Hq4oBj08"; video_id = parse_qs(urlparse(youtube_watchurl).query)['v'][0]; open(video_id+'.mp4', 'wb').write(urlopen("http://www.youtube.com/get_video?video_id=%s&t=%s&fmt=18"%(video_id, parse_qs(unquote(urlopen('http://www.youtube.com/get_video_info?&video_id=' + video_id).read().decode('utf-8')))['token'][0])).read()) |
This file contains 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
google.pacman || | |
function () { | |
var a = true, | |
e = false, | |
g = {}, | |
i = [1, 4, 2, 8], | |
l = { | |
0: { | |
axis: 0, | |
increment: 0 |
This file contains 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
#!/usr/bin/python | |
# Author: Abhinay Omkar | |
# Title: Program to convert CSV Formatted data to HTML tables (without using any APIs) | |
def write2file(str, filename): | |
"""Write the content of 'str' to file - 'filename'""" | |
f = open(filename, 'w') | |
f.write(str) | |
f.close() |
OlderNewer