How to Install the Solidity Compiler via Source Code Compilation?
In this article, we’ll produce, i.e., compile a Solidity compiler from its source code. Platform compilation is not an operation regular computer users explicitly do very often, if ever. However, in some unusual situations, we need specific software in terms of its (previous) version, or it should run in our exotic environment, etc. Regardless of … Read more
Double Hyphen (ββ) Not Single Dash (β) in WordPress
WordPress automatically replaces ‐‐ with the long dash –. But for technical text, you often need the double minus symbol, e.g., when writing scripts and command line flags such as –option. π¬ How to prevent WordPress from replacing the double hyphen (minus) with the long dash? Here’s the surprisingly simple fix: You can simply edit … Read more
How to Delete Variables & Objects from Memory
Problem Formulation and Solution Overview This article will show you how to delete variables and objects from memory using the del or None keywords. The Python language has several built-in reserved words having specific meanings called keywords. These keywords are reserved for Python and can not be used anywhere else. For example, declaring a variable, … Read more
How to Convert a Log to a CSV File in Python?
A not-so-fictious problem: Say, you’ve created a web application that runs on a dedicated Linux server in the cloud. Thousands of users visit your web app and suddenly … it crashes. Your users start complaining, and you lose revenue. More importantly, you bleed credibility by the hour. Your server is down, so what do you … Read more
Tensors: The Vocabulary of Neural Networks
In this article, we will introduce one of the core elements describing the mathematics of neural networks: tensors. 𧬠Although typically, you won’t work directly with tensors (usually they operate under the hood), it is important to understand what’s going on behind the scenes. In addition, you may often wish to examine tensors so that … Read more
Plot Circle in Pyplot
How to Plot a Circle in Python? You can easily plot a circle in Matplotlib’s Pyplot library by calling plt.gca() to “get the current axis”. Then call the axis.add_patch() function and pass a plt.Circle() object into it. For example, the one-liner plt.gca().add_patch(plt.Circle((0.5, 0.5), 0.2, color=’lightblue’)) adds a lightblue circle to the plot at position x=0.5, … Read more
Pandas – How to Find DataFrame Row Indices with NaN or Null Values
Problem Formulation and Solution Overview This article will show you how to find DataFrame row indices in Python with NaN or Null (empty) values. To make it more interesting, we have the following scenario: Rivers Clothing has given you a CSV file that requires a clean-up to make it usable for Payroll and Data Analysis. … Read more
How to Install the Solidity Compiler via Docker on Ubuntu?
In this article, we continue building on our previous topic, the Solidity compiler installation: π Previous Topic: Solidity Compiler Installation (NPM) The previous article was focused on an installation via npm, and in this article, weβll go through the installation and use of the Solidity compiler via Docker. π Related Tutorials: Install Solidity Compiler via … Read more
Print a List Without Quotes in Python – 5 Best Ways
Problem Formulation π¬ How to print a list without quotes in Python? Given a Python list of strings such as [‘1’, ‘2’, ‘3’]. If you print the list to the shell using print([‘1’, ‘2’, ‘3’]), the output is enclosed in square brackets and the strings have quotes like so: “[‘1’, ‘2’, ‘3’]”. This article will … Read more
How to Print a List Without Brackets and Commas in Python?
Problem Formulation Given a Python list of elements. If you print the list to the shell using print([1, 2, 3]), the output is enclosed in square brackets and separated by commas like so: “[1, 2, 3]”. But you want the list without brackets and commas like so: 1 2 3. How to print the list … Read more
How to Create a Python Tuple of Size n?
Use the tuple concatenation operation * with a tuple with one element (42,) as a right operand and the number of repetitions of this element as a left operand. For example, the expression (42,) * n creates the tuple (42, 42, 42, 42, 42) for n=5. Let’s play with an interactive code shell before you’ll … Read more