How to Lowercase a String in Python?

To convert a string to a lowercase string in Python, use the string.lower() built-in string method. This returns a lowercase string version. As you read over the explanations below, feel free to watch our video guide about this particular string method: If you want to perform case insensitive matching in languages such as German or … Read more

How to Insert an Element at the End of a List in Python

Problem Formulation Given a list and an element. How to insert the element at the last position of the list? Two Solutions There are two main ways to insert an element at the end of a given list. Use list.append(element) to add the element to the end of the list. This is the most idiomatic … Read more

How to Handle Timezone Differences in Python

Article Overview: In a previous post, we discussed the datetime module in Python and used it to iterate through a range of dates. Today, let’s learn how to manage timezones in Python using the datetime module and a third-party package called dateutil.Β  I aim to choose a range of world cities and print the local … Read more

How to Convert a Tensor to a NumPy Array in TensorFlow?

There are two ways to convert a Tensor to a NumPy array: TensorFlow version 2.x — use tensor.numpy() TensorFlow version 1.x — use tensor.eval(session=tf.compat.v1.Session()) Let’s dive into these two methods in greater detail. Method 1: Explicit Tensor to NumPy Array Conversion in TensorFlow 2.x To convert a tensor t to a NumPy array in TensorFlow … Read more

The Best Blockchain and Cryptocurrency Freelancing Platforms

Can you earn money for cryptocurrencies? With the increasing adoption of cryptocurrencies such as Bitcoin, Ethereum, and Cardano, the question naturally arise: can you sell your services for cryptocurrencies BTC, ETH, or ADA instead of USD, EUR, or CHF? The answer is: YES. And it gets better: the main idea of the blockchain is to … Read more

How to Check Your TensorFlow Version in Colab?

To check your TensorFlow version in your Jupyter Notebook such as Google’s Colab, use the following two commands: import tensorflow as tf This imports the TensorFlow library and stores it in the variable named tf. print(tf.__version__) This prints the installed TensorFlow version number in the format x.y.z. The following code example uses the dunder attribute … Read more

How to Check the Pandas Version in Your Script?

What is the Pandas Library? The pandas library provides data structures and functionality to represent and manipulate labelled and tabular data. Think of it as like an advanced spreadsheet program in your code with functionality includingβ€”but not limited to: creating spreadsheets, accessing individual rows by name, calculating basic statistics over rows and columns, and summing … Read more

Inheritance in Python

You have the eyes of your mother. One could say, you “inherited” the eyes of your mother. As you may have guessed, this article is about inheritance in Python. Inheritance is one of the most important features of object orientation. It’s a simple and intuitive concept but even advanced coders circumvent using inheritance because they … Read more

[FANG KILLER ICP] Will the Internet Computer Disrupt Big Tech?

What is the Internet Computer? The Internet Computer is blockchain technology and computing infrastructure initiated by the non-profit organization DFinity. Like the public Internet, the Internet Computer is a distributed computing platform consisting of thousands of connected and decentralized servers that host backend software. This idea mitigates the increasing monopolization of Internet services and enables … Read more