Data Science

How to Display an Image as Grayscale in Python Matplotlib?

How to Display an Image as Grayscale in Python Matplotlib? You can convert a given image to a grayscale image using four simple steps: Import the PIL and Matplotlib libraries Open the image with PIL.Image.open(filename). Convert the opened image to grayscale using img.convert(“L”) with greyscale mode “L”. Display the image using Matplotlib’s plt.imshow(gray_img, cmap=’gray’) function. …

How to Display an Image as Grayscale in Python Matplotlib? Read More »

Your First Dash App – How to Get Started in 4 Minutes or Less

Minute 1: Install Dash Type the following command in your terminal/shell. Windows, macOS: Linux, Ubuntu: Minute 2: Create Minimal Dash Project File “app.py” Copy&paste the code into a new file called “app.py” in a folder – with path /path/to/dash_app/app.py: Minute 3: Run Dash App Open a terminal or shell in the /path/to/dash_app/ and run python …

Your First Dash App – How to Get Started in 4 Minutes or Less Read More »

Selective Indexing

Conditional Indexing: How to Conditionally Select Elements in a NumPy Array?

Problem Description: You have a Numpy array. You want to select specific elements from the array. But neither slicing nor indexing seem to solve your problem. What can you do? In this short tutorial, I show you how to select specific Numpy array elements via Boolean matrices. A feature called conditional indexing or selective indexing. …

Conditional Indexing: How to Conditionally Select Elements in a NumPy Array? Read More »

Akkio – How to Add Machine Learning to Your Python Project in 30 Lines

AI is hard! Transforming tensors, cleaning data, building complicated networks- these are all specialized skills that can take months or even years to learn. But the times are a-changin’. Businesses understand that adopting state-of-the-art AI is no longer a choice.  Of course, those burdened with actually implementing that AI are the software devs. High-level talk …

Akkio – How to Add Machine Learning to Your Python Project in 30 Lines Read More »

NumPy Tutorial – Everything You Need to Know to Get Started

This tutorial gives you a simple introduction to Python’s NumPy library. You don’t need any prerequisites to follow the tutorial. My goal was to give a practical and fun NumPy introduction for absolute beginners and with many examples. By reading through this tutorial, you will gain a basic understanding of the most important NumPy functionality. …

NumPy Tutorial – Everything You Need to Know to Get Started Read More »

How to Get an HTML Page from a URL in Python?

This tutorial shows you how to perform simple HTTP get requests to get an HTML page from a given URL in Python! Problem Formulation Given a URL as a string. How to extract the HTML from the given URL and store the result in a Python string variable? Example: Say, you want to accomplish the …

How to Get an HTML Page from a URL in Python? Read More »

Alexa Skill

How to Create Alexa Skills in Python? A Simple Overview for Beginners

Alexa is on the way to lead the next wave of technological disruption. Have you ever asked yourself about the exact steps needed to create an Alexa Skill? And how these steps interplay with each other? To answer these questions, I give you a quick overview of Alexa Skill development in Python. This article serves …

How to Create Alexa Skills in Python? A Simple Overview for Beginners Read More »