In this third part of our article series we will learn how to code the secure session checkout creator for Stripe.
What we will learn today:
In our previous article we made possible for the user to check the available products in our website and choose one between the options: Regular, Pro and Platinum. Now before continuing defining the payment workflow we need to register this products with associated prices in Stripe
Go to Stripe Dashboard → Products → + Add product and fill the basic information for a product. For the pricing choose one time and fill the price we defined in our front store…
In this part, we’ll perform exploratory data analysis (EDA) on our data, which is a crucial part of most machine learning problems. Although we might not end up increasing our score, we will draw invaluable insights from our data, which is often one of the primary objectives of real-world machine learning. We are going to use some of the traditional EDA techniques, but we’ll also touch on a few underused ones as well. You can find the notebook for this tutorial here.
Without further ado, let’s get coding (in Colab)!
From the previous article, we have a vague idea of what partial dependence is, the problem it tries to solve, and how it does so. However, quite a few of the details were left out, so this article will be devoted to filling those empty spots. …
NLTK is an essential library supports tasks such as classification, stemming, tagging, parsing, semantic reasoning, and tokenization in Python. It’s basically your main tool for natural language processing and machine learning. Today it serves as an educational foundation for Python developers who are dipping their toes in this field (and machine learning).
It’s a free and open-source library that is available on Windows, Mac OS and Linux with plenty of tutorials to make your entry into the world of NLP smooth.
· Documentation — https://www.nltk.org/
· NLTK Book — http://www.nltk.org/book/
It has been a while that I posted data structure since I covered stack. In this post, I would like to talk about one of the easiest trees, Heap. Let’s crack into it!
Before understanding Heap, you need to know what Priority Queue is. Priority Queue is an abstract data type(ADT) in which data has priority and the one that has higher priority will be deleted first. It has three primary operations. Hold on, what is an abstract data type? It is data structure like queue and stack.
Testing applications is something that I find extremely important. Sadly, the urge to actually sit down and write out unit tests, write behavior tests, or utilize test-driven development is something that I continually put off. In fact, writing the tests gets put off for so long, that in the end, they never end up getting written. Obviously, this is a pretty bad habit. Fortunately, all of that is about to change! Utilizing a previous API I wrote (you can read more about that here), we are going to create a couple of behavior tests for it.
Before we start writing any code, I want to take a moment to explain a few things. Essentially, when tied in with Agile, Behavior Driven Development is very popular in the business world. It helps your non-technical users hash out the features they want to see in their new systems. At the same time, it helps developers understand the requests of the business. In a nutshell, one of the major goals of BDD is to encourage collaboration between teams. …
In these article series we will learn how to setup a simple payment workflow with Django using the Stripe payment platform. We will use the Stripe dashboard to manage products and configure our pricing model and taxes so we don’t need to worry about handling this in our app.
We will keep track as well of unique users registering new customers in Stripe every time we have a new registration in our app, this will be useful for tracking customer value and providing customer support. I expect from the reader some minimal knowledge of Python and Django but I will explain every step in detail from the beginning. …
Writing fast code is a trademark of our perception of what constitutes an efficient programmer. Even though the bottleneck for good programming performance is most definitely not how fast you type, it can have a very positive effect in the way you think and solve problems.
Today I want to share an approach to optimizing your coding productivity by using keyboard shortcuts with AutoHotkey to write a variety of repetitive python snippets of code.
AutoHotkey is a free, open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts (or hotkeys), to allows users of every level of computer skill to automate repetitive tasks in any Windows application. …
Today we will look at how to make gifs. Amaze your readers and viewers with these stunning GIFS. Make your point with style!
I will leave the complete code at the bottom of the article.
Once we downloaded our data, it will look something like this.
We have to do one more cosmetics thing, delete the lines highlighted in blue in the above picture. Our basic aim is to convert this into a simple CSV. We could solve this later programmatically, but this allows us to make our code more understandable later. …
Many simple “for loops” in Python can be replaced with list comprehensions. You can often hear that list comprehension is “more Pythonic” (almost as if there was a scale for comparing how Pythonic something is, compared to something else 😉). In this article, I will compare their performance and discuss when a list comprehension is a good idea, and when it’s not.
Let’s use a simple scenario for a loop operation — we have a list of numbers, and we want to remove the odd ones. …
In this article series I want to help total beginners in Django to setup real-world apps with minimal knowledge of the platform to be dangerous and build awesome modern web apps.
In this first article we will cover the basic of setting the up the development environment and installing Django with the default admin panel. No previous knowledge of Python is required for this article.
What you will learn today:
Open your favorite terminal, create a project folder and we will start installing our dependencies with Python pip. We will use a virtual environment to setup our development environment dependencies to be isolated from our system. So first let’s install the
virtualenv package, create the development virtual environment and activate it. …