Skip to content

Instantly share code, notes, and snippets.

View ShalbafZadeh's full-sized avatar

Reza Shalbaf Zadeh ShalbafZadeh

View GitHub Profile
@ShalbafZadeh
ShalbafZadeh / oreilly_downloader.py
Created October 10, 2016 16:58
Download Oreilly Free books by url
#license WTFPL
#example of usage : python oreilly_downloader.py < url_list
#url_list should contain list of urls , a url per line
import sys
import urllib2
from urllib2 import URLError
#making url ready fo download
def reformat_url(url):
@ShalbafZadeh
ShalbafZadeh / gist:6c476cfcbda04defb67e7fca3bb361f8
Created April 14, 2016 20:33
How many seconds until Summer of 2016 ?
echo -e 'import time\nprint abs(int(time.time() - 1466462040 ))' | python
'''
Created on Sep 15, 2013
@author: Mohammad reza Kamalifard
'''
import Image
import sys