Python __rmod__() Magic Method

Syntax object.__rmod__(self, other) The Python __rmod__() method implements the reverse modulo operation with reflected, swapped operands. So, when you call x % y, Python attempts to call x.__mod__(y). If the method is not implemented, Python attempts to call __rmod__ on the right operand and if this isn’t implemented either, it raises a TypeError. We call … Read more

Massive Action — A Foolproof Way to Find Clients as a Freelance Programmer

How to really find clients on freelancing platforms such as Upwork, Fiverr, or Topcoder? Massive action! This article shows you a simple and statistically sound way of increasing your odds of finding new clients as a freelancer. I recently read the “10x” book by Grant Cardone. In his book, he invented the concept of taking … Read more

Python __rfloordiv__() Magic Method

Syntax object.__rfloordiv__(self, other) The Python __rfloordiv__() method implements the reverse floor (integer) division operation with reflected, swapped operands. So, when you call x // y, Python attempts to call x.__floordiv__(y). If the method is not implemented, Python attempts to call __rfloordiv__ on the right operand and if this isn’t implemented either, it raises a TypeError. … Read more

Python Excel – Manipulating Worksheet Data

Building on the skill(s) you learned earlier, Part 3 centers around manipulating the data. This skill is another must-have if you are interested in pursuing a career as a Data Scientist. Background After completing Part 2 of this series, you should be comfortable using Python to: access a single row/column value, access a range of … Read more

Top 10 Python Libraries for E-commerce

In this article, we explore 10 Python libraries, platforms, tools, and frameworks that are useful for e-commerce. Criteria for the list included their relevance to e-commerce, popularity, the level of maintenance that is given to the code base, and their usefulness. We searched far and wide and narrowed down our search to the following: Saleor … Read more

Python Dictionary clear()

In this blog post, you’ll learn about the Python Dictionary clear() method. But, before I cover the clear() method I would like to give a brief definition of what a Python Dictionary is. Definition: A Python dictionary data structure is a collection of key-value pairs that are unordered, and are accessed by a key instead … Read more

Python __rtruediv__() Magic Method

Syntax object.__rtruediv__(self, other) The Python __rtruediv__() method implements the reverse true division operation with reflected, swapped operands. So, when you call x / y, Python attempts to call x.__truediv__(y). If the method is not implemented, Python attempts to call __rtruediv__ on the right operand and if this isn’t implemented either, it raises a TypeError. We … Read more

Python __ror__() Magic Method

Syntax object.__ror__(self, other) The Python __ror__() method implements the reverse Bitwise OR | operation with reflected, swapped operands. So, when you call x | y, Python attempts to call x.__or__(y). If the method is not implemented, Python attempts to call __ror__ on the right operand and if this isn’t implemented either, it raises a TypeError. … Read more

Solidity Error Handling with assert(), require(), revert() – A Guide for Python Coders

In Solidity, you can use the require, revert, and assert functions to check error conditions and handle exceptions, but they look similar at first glance, and you might get confused about how to use them. This article will explain their differences, specifically to Python developers. We use a simple smart contract below, taken from the … Read more