# Month: August 2021

## People Who Bought X Also Bought …? An Introduction to NumPy Association Analysis

Imagine you are Jeff Bezos. One of the most successful features of your company Amazon is product recommendation. “People who bought X also bought Y.” Roughly speaking, this feature alone has made you billions. For you, Jeff Bezos, product recommendation is the most important algorithm in the world, isn’t it? In this article, you’ll learn …

## Python Print Without Arguments

Python’s print() function prints a string representation of any number of arguments to the standard output. It has many arguments such as the sep argument to set a custom separator string between the printed objects, the end argument to set a custom ending string, or the file argument to print a string into a file. …

## [Interview Question] How to Solve The Maximum Product Subarray Problem in Python?

Learn – How to Solve The Maximum Product Subarray Problem in Python?

## Python Print Without Escape Characters

Problem Formulation Python has special “escape characters” that start with the single backslash such as \n, \t, and \”. If you print a string with escape characters, Python prints the special meaning—for example, a new line for the newline character \n. You can see that the output prints the special meaning of the escape characters: …

## Python Escape Characters

Python Escape Characters Table Escape Character Explanation \’ Single Quote \” Double Quote \n Newline Character \t Tabular Character \b Backspace Character \r Carriage Return \\ Backslash \ Form Feed \ooo Octal Value \xhh Hex Value Examples The following examples show the working of the different escape characters in a Python context. We provide the …

## How to Fix : “ImportError: Cannot import name X” in Python

Learn – How to Fix : “ImportError: Cannot import name X” in Python.

## [Google Interview] How To Solve The Power of Two Problem In Python

Learn to solve The Power of Two Interview Question In Python in this article.

## NumPy all() – A Simple Guide with Video

Syntax numpy.all(a, axis=None, out=None, keepdims=<no value>, *, where=<no value>) Argument Type Description a array_like Input array axis None, int, or tuple of int Optional. One axis or multiple axes along which logical AND should be performed. Per default, it computes logical AND on the flat array. If this is a tuple of integers, calculates logical …

## Python Print Without Quotes

Problem Formulation In Python’s interactive mode, each line is assumed to be an expression that is evaluated. The return value is provided to the user. Thus, if you evaluate a string expression or call a function or an operation that returns a string, the output will display quotes around the string to tell the user …

## Newspaper3k – How to Generate a Word Cloud in Python

To carry on from our introduction to Newspaper3k, we can now take our basic knowledge and realize the possibilities of what we can do with this library. Here I’m going to demonstrate for you a project which takes articles from a set of different news agencies, picks out the most used words from them, and …

## Flask vs Django: Comparing the Two Most Popular Python Web Frameworks

When it comes to developing web applications in Python there are lots of frameworks. Some examples are Pyramid, Web2Py, Bottle or CherryPy, among others. However, the two most popular ones are Flask and Django. We can confirm this fact by having a look at the most starred Python libraries in GitHub: As we will see …

## How to Print the Full NumPy Array Without Truncation?

Problem Formulation In some shell environments, when printing a large NumPy array, the Python interpreter automatically displays only a small, truncated portion of the array, using the triple dots ‘…’ to indicate that some values are missing in the textual representation of the array. Here’s an example of a truncated array: Here’s how that looks …