How to Randomly Sample from a Python List?

In data science, you will need to learn how to generate random numbers, which in Python, we can do with the random module. In this tutorial, you’ll learn how to solve the following programming challenge: βš”οΈ Challenge: How to do random sampling from a list in Python? Without further ado, let’s dive right into it! … Read more

How to Change Tuple Values in Python?

Problem Formulation and Solution Overview This article will show you how to change tuple values in Python. To make it more interesting, we have the following running scenario: Eddie, the Meteorologist at NTCV, has calculated an incorrect five (5) Day weather forecast. These values are saved as a Tuple and require updating. πŸ’¬ Question: How … Read more

Python Find Shortest List in Dict of Lists

Problem Formulation πŸ’¬ Programming Challenge: Given a dictionary where the values are lists of varying sizes. Find and return the shortest list! Here’s an example: Also, you’ll learn how to solve a variant of this challenge. πŸ’¬ Bonus challenge: Find only the key that is associated with the shortest list in the dictionary. Here’s an … Read more

The Math of Becoming a Millionaire in 13 Years

When I browse the web or social media, guides on how to become a millionaire pop up everywhere. If you read them, you’ll quickly find out that they’re filled with the same fluff. Let’s call it “slow-lane thinking” after DeMarco’s popular book. Most of those guides assume you have four decades of diligent savings left. … Read more

Python Time Series Forecast – A Guided Example on Bitcoin Price Data

A Time Series is essentially a tabular data with the special feature of having a time index. The common forecast task is ‘knowing the past (and sometimes the present), predict the future’. This task, taken as a principle, reveals itself in several ways: in how to interpret your problem, in feature engineering, and in which … Read more

Python Find Longest List in Dict of Lists

Problem Formulation πŸ’¬ Programming Challenge: Given a dictionary where the values are lists of varying sizes. Find and return the longest list! Here’s an example: Also, you’ll learn how to solve a variant of this challenge. πŸ’¬ Bonus challenge: Find only the key that is associated with the longest list in the dictionary. Here’s an … Read more

Plotly Dash Slider Component — Ultimate Guide

Welcome to the bonus content of “The Book of Dash“. πŸ€— Here you will find additional examples of Plotly Dash components, layouts and style. To learn more about making dashboards with Plotly Dash, and how to buy your copy of “The Book of Dash”, please see the reference section at the bottom of this article. … Read more

How to Check If a List of ENS (.eth) Domains are Available? (Python)

You can check programmatically in Python whether a certain ENS ‘.eth‘ domain name is available by using the urlopen() function from urllib.request module to access the URL ‘https://etherscan.io/enslookup-search?search=example.eth’, replacing the URL suffix ‘example.eth’ with your desired domain. In the following example code snippet, I show how you could check a list of names, one domain … Read more