Did you know you can host a webpage using nothing but Python code? You don’t have to use things like IIS or Apache. While you may not get all of the same features. When you are trying to write a simple application. Or if you want to host an API, this route is an option …
Python
Error Handling in Python using: With, Try, Exception and Finally
In this article we will discuss error handling using Python With Statements Try/Except/Finally statements, show how to use these in combination, and compare how it works to try/catch code blocks in other languages. What is error handling? Error handling is when you put in some extra code to tell your script what to do when …
How to create word clouds with Python
Creating word clouds in Python is easy thanks to a few open source libraries. Today, we we’ll use the ammueler word cloud library and matplotlib to draw some word clouds. Word clouds are useful visualization tools for looking at the general theme of a document. As a document contains more instances of a given word, …
Graphing using Python and Matplotlib
In this article I will introduce you to graphing in python using matplotlib. There are many kinds of charts you can use with matplot lib. By the end of this article, you should understand how to draw basic bar, line, and scatterplot charts. As you go through each of the example charts, you will see …
Building a classifier using Python and Scikit Learn
Scikit Learn is an easy to use Machine Learning library for Python. In this article, we will discuss how to create a basic classifier application where you can feed it data, and it will properly classify it for you. In this case we will use data on cars and classify them as Sedans, Pickup Trucks, …
Python Basics – Getting started with Python
In this article, we will cover python basics. We will discuss what is python, where you can download python from, the basic syntax of python, how to input and output information in and out of your python scripts, how to do loops, conditional operators (if/else/elif), and how to write basic functions. What is Python? Python …
Python Switch Statements
In languages like C, you have Switch statements allowing you to evaluate the input, then have a few options for the output. Switch statements are used in place of a series of if/else statements in order to make your code more readable. Case statements can also have better performance than a traditional if/else setup. This …
Python If, Else, and Else If conditional statements
Conditional statments are a large part of writing computer programs and switches. You want to take some sort of input, evaluate it, then take some action based on what the input was. The decision you make about what to do is called a conditional statement. The first conditional statement we will look at is an …
Python For loops and While loops
Python like all other major programming languages support both For and While loops for running the same block of code over and over again. In this article I will discuss the difference between a python for loop and a while loop. Generally the difference between the two kinds of loops is that you declare and …
Face and Object Detection using Python and OpenCV
For those who want to do object or face detection, the standard way to do it is with OpenCV. OpenCV is a programming library for Object recognition and is very flexible. You can train it to recognize any number of different objects. For the purpose of this tutorial, I will be using Python3. However, you …