Blogs about: Worldly Knowledge

Featured Blog

Renunciation1 comment

Tashi Nyima wrote 7 months ago: External objects, persons, or situations will never make us happy. Wealth, beauty, power, fame, and … more →

Tags: Dharma View, Wealth, happiness, Renunciation, Beauty, Power, Fame!, false belief

Installing scipy with easy_install-2.7 on Lion (upgraded from snow leopard)

gawk wrote 8 months ago: I had compilation issues with gfortran when I ran easy_install-2.7 scipy Fixed it by using gfortran … more →

Tags: Python, Living with Linux, Homebrew, Scipy

Autogenerating documentation - Python

gawk wrote 9 months ago: Here is a neatly written article: http://iraniweb.com/blog/?p=110 In summary, we can explore 3 resou … more →

Tags: Python, Documentation, pydoc, epydoc, Sphinx

Removing non-words and empty words in a list

gawk wrote 9 months ago: Suppose x = ['abc', 'def', '!@' '@33','']; To remove nonwords (‘!@’) and empty words: wo … more →

Quick screen-scraping

gawk wrote 9 months ago: Use beautiful soup! Love the documentation! http://www.crummy.com/software/BeautifulSoup/bs4/doc/ Ho … more →

Tags: Python, beautifulsoup, screen scraping

Writing a utf-8 file in python

gawk wrote 9 months ago: code snippet: import codecs; fid = codecs.open('filename','w','utf-8'); fid.write('mystuff'); fid.cl … more →

Tags: Python, Codecs, UTF-8

Fixing mime-type issues/Down you want to download a file issues when using apache

gawk wrote 9 months ago: Just started using web.py with wsgi. It turns out that when you name a file with the extension .py, … more →

Tags: Python, WSGI, Apache, mime, web.py

Sed one-liner to pick a random line from a file

gawk wrote 9 months ago: Put this into a file (eg. pickrandom.sh): #!/bin/bash sed -n $((RANDOM%$(wc -l < ${1})+1))p ${1} … more →

Tags: Living with Linux, Bash, sed

Resources for parallel processing in python

gawk wrote 9 months ago: It all started with my search for the Matlab’s parfor equivalent in python. Here are some link … more →

Tags: Python, multiprocessing, parfor, parallel processing

Simplifying a function's signature in python

gawk wrote 9 months ago: One could use partial() in functools. Documentation here: http://docs.python.org/library/functools.h … more →

Tags: functools, Partial, Python

Working with data on python

gawk wrote 9 months ago: An interesting project: http://alfven.org/wp/hdf5-for-python/ … more →

Tags: Python, HDF5, h5py

‘I Can Do This’

nutritionnaturally4u wrote 9 months ago: “I CAN DO THIS” says I. ‘This’ includes living a healthy lifestyle as a means of helping myself feel … more →

Tags: attitudes, Life, experience?, Thoughts, Attitude, I can, Little Things, difference, small stuff

Cleaning up subplots with matplotlib

gawk wrote 10 months ago: If there is an overlap of axes, titles, etc. In a plot with several subplots, we can use plt.tight_l … more →

Tags: Python, Living with Linux, MatPlotLib

Searching very large files in python

gawk wrote 10 months ago: Reference: http://stackoverflow.com/questions/2299454/how-do-quickly-search-through-a-csv-file-in-py … more →

Fixing records with new line characters in awk

gawk wrote 10 months ago: Suppose you have the following: ID1. Apples ID2. Oranges TypeA ID3. Oranges TypeB And you desire the … more →

Tags: Living with Linux, awk, Bash Scripting, Text Processing

Fixing Virtual Size does not fit available size (Ubuntu 12.04)

gawk wrote 10 months ago: Reset xorg.conf settings: sudo aticonfig –initial Set multi-desktop settings with sudo amdcccl … more →

Tags: Living with Linux, xorg

Kicking off with hadoop/map reduce

gawk wrote 11 months ago: Kicking off with hadoop/mapreduce, couchdb/mapreduce Some useful links: For mac: http://wiki.apache. … more →

Tags: Hadoop, mapreduce, CouchDb

Going live with django+wsgi+apache - fixing the admin static files

gawk wrote 1 year ago: On my Mac, I had to make the following changes to httpd.conf to get the admin static files in place. … more →

Tags: Python, Django, WSGI

Solutions to pythonchallenge.com (1-10)

gawk wrote 1 year ago: Here’s the python code to generate the results for problems 2-10 on python challenge.com. It w … more →

Tags: Python, Mac, pythonchallenge, Programming, python code


Related Tags
All →

Follow this tag via RSS