August 2012

Python – How to sort dictionary by values

Sometimes we want to iterate over a dictionary in sorted order of values. We can do it by using key argument to python sorted() method read more

Python/Perl/Unix one liners

Here are some cool python one liners. Parse apache log using python: print 5th field python -c “import csv,sys;f=csv.reader(sys.stdin, delimiter=’ ‘); print ‘\n’.join([r[5] for r read more

Benefits of using Amazon AWS – EC2

If you want to try out stuff as root which can potentially break you site, you are always scared of trying that on your main read more