Why is Python Unittest file not discovered?

It is annoying when your current Python test function or file is not discovered in your editor (VSCode or PyCharm) especially when all other tests are discovered but only current one is not discovered i.e. no option to run test function directly from the editor and there is no error also.

It is assumed you have already setup proper unit test configurations. The goal is to get exact reason why test method is not discovered. If there is any syntax error related to test method, then it might not be included. This post explains how to recognize and troubleshoot the issue.

Setup Deep Learning environment: TensorFlow, Jupyter Notebook and Visual Studio Code

Few days back, I decided to setup development environment for deep learning on my Windows 10 laptop. In this article, I would share my experience in setting up a system typically for Data Science developers. Although I used Windows 10 but the steps will be same for Linux and Mac OS.

Being a developer, need IDE for coding and not fan of browser based editor. Jupyter Notebook is favourite tool for data scientist and we can’t skip that in case of data science. Fortunately, VS Code supports Jupyter notebook. You can now directly edit .ipynb files and get the interactivity of Jupyter notebooks with all of the power of VS Code. We will go through it.

Python: Data Visualization With MatPlotLib

This article explains how to perform different types of data visualizations in Python using Matplotlib – a Python 2D plotting library. Instead of covering features of the library, we will see the practical scenarios of data visualizations used in machine learning/deep learning. We will import pyplot function that allows us to interface with a MATLAB-like plotting environment.

To install Matplotlib, run following command in Python environment:

pip install matplotlib

I am using Python 3.7.6, Matplotlib 3.1.2 and Windows 10 environment for this article.

What is the difference between a deep copy and a shallow copy in Python?

A shallow copy creates a new object but doesn’t create a copy of nested objects, instead it just copies the reference of nested objects.

A deep copy creates a new object and recursively adds the copies of nested objects present in the original elements. It means that any changes made to a copy of object do not reflect in the original object.

copy.copy() function is used for shallow copy and copy.deepcopy() function is used for deep copy.