We have been moved for better. Look Here for an Updated Version. People are also contributing there for making it more beautiful. See you there!!!
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: Khaled Monsoor <k@kmonsoor.com> | |
modified: 09-Dec-2015 | |
license: The MIT License | |
""" | |
import sys | |
from datetime import datetime | |
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
# | |
# I inherited a large code base, where hundreds of code paths end up | |
# calling "common_function_called_in_gazillion_places". | |
# | |
# And the need arose for this function to access the HTTP request's | |
# headers... | |
# | |
# What to do? Refactor all the places leading up to here? In a dynamically | |
# typed language, with no compiler to tell us the places to refactor? | |
# |
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
'abandoned', | |
'beach', | |
'bike', | |
'birthday', | |
'broken', | |
'breakfast', | |
'business', | |
'cake', | |
'car', | |
'cat', |
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
# ======================================================================================= | |
# Startup file with magic functions: %my_run, %add_custom_path, %clean_custom_path and | |
# %show_custom_path, which runs stuff in the python path as well as user specified paths. | |
# | |
# The %my_run command executes a script as %run does but searching the script in | |
# the user path in addition to python path. | |
# | |
# --------------------------------------------------------------------------------------- | |
# This is a modification of the code done by Gaute Hope <gaute.hope@nersc.no> due to | |
# IPython issue 101 |
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/env python | |
# -*- coding: utf-8 -*- | |
""" | |
pip install networkx distance pattern | |
In Flipboard's article[1], they kindly divulge their interpretation | |
of the summarization technique called LexRank[2]. |
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
# ~/.gitconfig from @boblet | |
# initially based on http://rails.wincent.com/wiki/Git_quickstart | |
[core] | |
excludesfile = /Users/oli/.gitignore | |
legacyheaders = false # >git 1.5 | |
quotepath = false | |
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines | |
pager = less -r | |
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX |
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
# Get Graphics Magick | |
> cd / | |
> mkdir /dowload | |
> cd /download | |
> wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz | |
> tar -xzvf GraphicsMagick-LATEST.tar.gz | |
> cd GraphicsMagick-1.3.21 (or the lastest graphics magick) | |
# Install Graphics Magick | |
## Get libs |
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/env python2.7 | |
""" | |
Parallel RSS-Feed Downloader | |
---------------------------- | |
Download contents by grabbing links from a given RSS-feed. | |
Works over HTTP,FTP,HTTPS protocol transparently. | |
Currently, works on Linux, Mac OSX, and possibly on other Unix as well. | |
But, _NOT_ on Windows * yet. | |
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
from sre_parse import Pattern, SubPattern, parse as sre_parse | |
from sre_compile import compile as sre_compile | |
from sre_constants import BRANCH, SUBPATTERN | |
class Scanner(object): | |
def __init__(self, tokens, flags=0): | |
subpatterns = [] | |
pat = Pattern() |
OlderNewer