How to use NumPy for scientific computing in Linux

Get serious with scientific computing in Linux by learning to use NumPy. NumPy is a Python-based open-source scientific computing package released under the BSD license that serves as a free yet powerful alternative to proprietary packages (such as MATLAB) that come with licensing fees. The numerous built-in data analysis tools, extensive documentation, and detailed examples […]
Continue reading…

 

How to create and use Python CGI scripts

Have you ever wanted to create a webpage or process user input from a web-based form using Python? These tasks can be accomplished through the use of Python CGI (Common Gateway Interface) scripts with an Apache web server. CGI scripts are called by a web server when a user requests a particular URL or interacts […]
Continue reading…

 

How to check if a file exists on a remote server

There are circumstances where you want to test if a file exists somewhere on a remote Linux server (e.g., /var/run/test_daemon.pid), without logging in to the server interactively. For example, you may want your script to behave differently depending on whether or not a specific file exists on a remote server. In this tutorial, I will […]
Continue reading…

 

How to parse JSON string in Python

When developing a web service, you may often rely on a JSON-based web service protocol. If you are using Python for that, it is straightforward to deal with JSON-formatted messages due to its extensible modules. For example, Python’s JSON module which was introduced in Python 2.6 provides default JSON encoder and decoder in Python. There […]
Continue reading…