Home / Programming / Programming Languages

Programming Languages

Ngôn ngữ lập trình

Read and write with file CSV in Python

An example of CSV format

It is possible to read and write CSV (comma separated values) files using Python 2.4 Distribution. Like most languages, file operations can be done with Python. Writing a CSV file with Python can be done by importing the CSV module and creating a write ...

Read More »

How to use urllib in Python

Today, with the development of the internet, network programming to exchange packets is no longer as complicated as it was a few decades ago. Python is no exception when it provides programmers with [crayon-5dadf4572d7b5766968258-i/]  packages to interact with applications via ...

Read More »

How to loop a dictionary in Python

Dictionary is one of the most widely used data structures in programming, especially with Python. To understand how to loop on it, extract its keys as well as retrieve all its values are important for any programmer. In this post, ...

Read More »

Using Feedparser in Python to read RSS

BioModels' Models of The Month RSS feeds

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 found here. As usual, the post will begin with an ...

Read More »

Running a simple http server

A demonstration of http server in Python

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 as scripting language is used at server-side, commands to run ...

Read More »

Measure running time a routine in Python

Compute the running time of your program 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 the running time, started time and end time are useful ...

Read More »

Delete columns in numpy.array

delete columns in matrix with numpy.array

[crayon-5dadf4572f566115896618/] output: array([[ 0, 1, 2, 3], [12, 13, 14, 15]]) [crayon-5dadf4572f573659738978/] output: array([[ 0, 3], [ 4, 7], [ 8, 11], [12, 15]]) Solution was found here: http://stackoverflow.com/questions/1642730/how-to-delete-columns-in-numpy-array

Read More »

Select column from a matrix

Select columns in matrix with numpy.array

[crayon-5dadf4572fa07654923916/] Result: [2, 20, 200]   Found it here: http://www.gossamer-threads.com/lists/python/python/770606

Read More »

How to implement an array with string index

Associative Array

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 but the programming language for the implementation is C++. The ...

Read More »

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 thiết kế phần mềm. Đó là: encapsulation, inheritance, và polymorphism ...

Read More »