Python oct() Function

Python’s built-in oct(integer) function takes one integer argument and returns an octal string with prefix “0o”. If you call oct(x) on a non-integer x, it must define the __index__() method that returns an integer associated to x. Otherwise, it’ll throw a TypeError: object cannot be interpreted as an integer. Argument integer An integer value or … Read more

NumPy arange(): A Simple Illustrated Guide

The np.arange() function appears in 21% of the 35 million Github repositories that use the NumPy library! This illustrated tutorial shows you the ins and outs of the NumPy arange function. So let’s get started! What’s the NumPy Arange Function? The np.arange([start,] stop[, step]) function creates a new NumPy array with evenly-spaced integers between start … Read more

How to Plot the Confidence Interval in Python?

Problem Formulation: How to plot the confidence interval in Python? To plot a filled interval with the width ci and interval boundaries from y-ci to y+ci around function values y, use the plt.fill_between(x, (y-ci), (y+ci), color=’blue’, alpha=0.1) function call on the Matplotlib plt module. The first argument x defines the x values of the filled … Read more

Top 10 PyCharm Cheat Sheets

Hey Finxters! We all need cheat sheets for Python and all its intricacies. Python has many libraries and there are so many IDE applications you can useΒ  with it! One of these IDEs is called Pycharm! I want to introduce you to some of Pycharms shortcuts! Let’s get started right away! Full PyCharm Tutorial Finxter … Read more

Less Is More in Design

This chapter draft from my upcoming book “From One to Zero: Minimalism in Programming” will appear in revised form in 2021 with NoStarch (SanFrancisco). Stay tuned for updates on the book launch: In this chapter, you’ll enter a vital area in computer science that greatly benefits from a minimalistic mindset: design and user experience (UX). … Read more

How to Convert a Unicode String to a String Object in Python?

This tutorial will show you how to convert a Unicode string to a string in Python. If you already know about Unicode, you can skip the following background section and dive into the problem right away. Background Unicode A bit about Unicode from Wikipedia. Unicode is a character encoding standard that includes characters from almost … Read more

Top 10 Algorithm Cheat Sheets

Hey Finxters! Do you  know what time it is? That’s right! It’s time for some more cheat sheets!! These cheat sheets are meant to help you on your way to becoming a great Python developer and of course becoming one of the best Python freelancers globally! This article is all about algorithms used in software … Read more

How to Create an Interactive Web Application using a Jupyter Notebook

Summary: To create an interactive web application in a Jupyter Notebook, use the three libraries ipywidgets, voila, and binder. This requires only basic Python programming skills without the need to learn a new framework. There are various Python tools available to create web applications and frontend GUIs. For example, Flask and Django. As useful as … Read more

Python property() — What You Always Wanted to Know But Never Dared to Ask

Object-orientation is great way to encapsulate data in your application. This minimizes complexity and adheres to good software engineering principles. However, attributes in Python can be easily accessed from the outside—they’re not really encapsulated. That’s one of the reason the property() built-in function exists: it allows you to truly encapsulate data with the means of … Read more

Python Get Milliseconds

In this article we are going to look at how we can see time in milliseconds,Β  i.e. one thousandth (1000th) of a second, using Python. This could be for pure curiosity, benchmarking code or to getΒ  a very, very accurate time of day –Β  whatever the reason, the focus of the article is how to … Read more