How to check CPU information through command line in Unix based operating systems

Sometimes you need to find information about your CPU on your Linux machine and there are many ways to do it. So in this tutorial I will teach you how to find details about your CPU such as processor, architecture, vendor name and many others that are very useful to you.

I like to learn how to do the same thing in different ways, especially when it comes to the Linux command line because it makes me practice many things and I feel closer to my dream of being a ninja. Continue reading “How to check CPU information through command line in Unix based operating systems”

How to read and write csv files with the help of Python programming language

When one starts their computer programming journey, there are many already builtin libraries and functions they need to explore with the main purpose of stepping their coding skills to the next level. A very useful Python package is the csv, a module which helps the Python programmer with prebuiltin utilities that can deal with comma-separated values.

For those of you who have never been exposed to the csv file format; a csv file is a simply a text file in which each line of data contains values separated by commas. Based on my personal experience with this popular format, it is mostly and widely being used to represent tabular data.
Continue reading “How to read and write csv files with the help of Python programming language”

How to automatically zip your files with Python

People make use of zip files to store data on their computers and even transmit files over the Internet. Zipping data through different applications available out there, helps to pack a group of files into a single archive that takes less space than the originals.

Almost everyone who is reading this article had to zip files on their computer with the main purpose of sharing them via email, at least once in their own lives. Zipping files into archives is not rocket science. There are many free applications shared on the Internet that can help the user accomplish that.

Being a coder and passionate about discovering new ways of achieving computer tasks, I thought to give a try to available Python libraries to zip my files.

Although there are many ways to automatically zip files with the help of the Python computer programming language, this article will treat two of them. Continue reading “How to automatically zip your files with Python”

How to create a simple logger in Python, second part

As I explained in the first part of ‘How to create a simple logger’ in Python series, logging is a very important aspect of software development, especially for the professional software developer. Although a junior Python developer, there is a project which I am coding in which I need to make use of the Python’s logging builtin module.
Continue reading “How to create a simple logger in Python, second part”

How to write a wrapper for ffmpeg with the help of Python, first part

The Python computer programming language is very handy when it comes to automating stuff, especially prototyping. Easy to read and write, the Python computer technology offers rapid development. It is a perfect tool for wrapping functionalities of existing software. As I have mentioned in many of the previous articles being shared in here, I am currently working on a project which wraps some of the functionalities present in the FFMpeg multimedia framework.
Continue reading “How to write a wrapper for ffmpeg with the help of Python, first part”

How to access the elements of a generator object in Python

A generator object in the Python computer programming language is totally different from a normal function, as it returns multiple values one by one through the yield statement.

As you may already know, a normal function in Python returns one value to the caller through the return statement. One can easily access the value returned by the normal function just by calling it. Continue reading “How to access the elements of a generator object in Python”

A practical case of an error class in Python

Many beginners of the Python computer programming language have a difficulty in understanding custom error classes; especially when they want to make use of them in their projects.

I am writing this article with the main purpose of giving a practical example of an error class which I am making use of in a personal project.
Continue reading “A practical case of an error class in Python”