December 7, 2023

How to Install Python Pip on Ubuntu 20.04

Pip is a tool for installing Python packages. With pip, you can search, download, and install packages from Python Package Index (PyPI) and other package indexes. This guide explains how to install pip for Python 3 and Python 2 on Ubuntu 20.04. We will also walk you through the basics of installing and otherwise managing Python packages with pip.

How to Install Python Pip on Ubuntu 20.04 Read More

What Is Numpy Used For In Python? Everything You Need To Know

Numpy is one of the most commonly used packages for scientific computing in Python. It provides a multidimensional array object, as well as variations such as masks and matrices, which can be used for various math operations. Numpy is compatible with, and used by many other popular Python packages, including pandas and matplotlib.

What Is Numpy Used For In Python? Everything You Need To Know Read More

What is Matplotlib in Python and How to use it for plotting

Matplotlib is a cross-platform, data visualization and graphical plotting library for Python and its numerical extension NumPy. As such, it offers a viable open source alternative to MATLAB. Developers can also use matplotlib’s APIs (Application Programming Interfaces) to embed plots in GUI applications. Pythonistas typically use the Matplotlib plotting library to display numeric data in plots, graphs and charts in Python.

What is Matplotlib in Python and How to use it for plotting Read More

Top 10 Python Libraries For Data Science for 2022

Python is the most widely used programming language today. When it comes to solving data science tasks and challenges, Python never ceases to surprise its users. Most data scientists are already leveraging the power of Python programming every day. Python is an easy-to-learn, easy-to-debug, widely used, object-oriented, open-source, high-performance language, and there are many more benefits to Python programming. Python has been built with extraordinary Python libraries for data science that are used by programmers every day in solving problems. Here’s the top 10 Python libraries for data science.

Top 10 Python Libraries For Data Science for 2022 Read More

Build a Production-Ready API with Rate-Limiter in 15 minutes

This post is a tutorial on how to build a production-ready API with a rate-limiter, in 15 minutes and with 100% reproducibility. You will know: how to add a rate-limiter to the API, how to use production-ready storages for API caching, Got a fully reproducible project template (via GitHub) that you can use to kickstart similar application.

Build a Production-Ready API with Rate-Limiter in 15 minutes Read More

Every Python Programmer Should Know LRU_cache From the Standard Library

You are just one line of code away from speeding up your functions by using simple caching functionality. The Python standard library comes with many lesser-known but powerful packages. For our example at hand, we will be using lru_cache from functools. (LRU stands for Least Recently Used and means exactly that, the cache is going to keep the most recent input/result pairs by discarding the least recent/oldest entries first)

Every Python Programmer Should Know LRU_cache From the Standard Library Read More

Python utility function: retry with exponential backoff

To make a setup more resilient we should allow for certain actions to be retried before they fail. We should not “hammer” our underlying systems, so it is wise to wait a bit before a retry (exponential backoff). Let’s see how we can make a function that implements a “retry and exponential backoff”. Note: this only works if actions are idempotent and you can afford to wait.

Python utility function: retry with exponential backoff Read More