Using Feedparser in Python to read RSS

In this post, we will take a closer look at how to fetch and parse syndicated feeds with Feedparser library in Python. The detailed documentation of this library can be…

Running a simple http server

In the world of web engineering and development, developing web-based applications always need a web application server where all web pages are accommodated. Depending on what web technology as well…

Measure running time a routine in Python

I think this helps us a lot for estimation of how long a program runs in Python. When dealing with a huge amount of data, it takes long time. Showing…

Delete columns in numpy.array

a=array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15]]) delete(a, s_[1:3], axis=0) # remove rows 1 and 2 output: array([[…

Select column from a matrix

from operator import itemgetter nested_list = [[1, 2, 3], [10, 20, 30], [100, 200, 300]] map(itemgetter(1), nested_list) Result: [2, 20, 200]   Found it here: http://www.gossamer-threads.com/lists/python/python/770606

How to implement an array with string index

I had shown you how to implement an array with string based index in Python programming language in the previous post. In this post, I will explain the same problem…

Sự ra đời của lập trình hướng đối tượng

Ngôn ngữ lập trình hướng đối tượng cung cấp cho người lập trình 3 đặc điểm chính mạnh cơ bản với mục đích cải tiến và đơn giản hóa việc…

Array, List, etc. with String Indices

(Tiếng Việt) Trong lập trình, chúng ta cũng hay gặp nhiều trường hợp phải tạo một danh mục mà index của nó là các chuỗi kí tự. Có một khái niệm để mô tả loại đối tượng này, thường gọi là HashMap hay HashTable.

Counting how many times each string appears in a list

To count how many times a word appearing in a list of words, we can do as follows:

An Introduction to Multiprocessing in Python

Multiprocessing with Python http://toastdriven.com/blog/2008/nov/11/brief-introduction-multiprocessing/