Easy-breezy REST API in Python

A Simple Tutorial Example of a REST API with Flask

Photo by on

For a recent two day hackathon, I worked with a software developer (Roman Turner) to make a . I’m a Data Scientist, so my superpowers are Python, Data Science and Flask. His superpowers are JavaScript and React (amongst others). …


How to effectively use Python’s built in sorting algorithm

Sorting with Keys and Lambda Function in Python

Photo by on

As a high school Computer Science teacher, I found that sorting lists using keys was often challenging for students. Sorting is a routine coding task essential for almost any Python project, so mastering its use is essential to your programming future.

This article will walk you through the most common…


Learn list comprehensions with examples

The Pythonic Way to Create Lists

the rough syntax

This article is intended to introduce novice Pythonistas to the art of List Comprehension. It is a vital building block for advanced coding in Python, and should be embraced soon after you become comfortable creating loops and lists in Python.

I have spent 7 years teaching Python to high school…


Pick a simple baseline accuracy to demonstrate that your classification model has skill on a problem

Photo by on

When you evaluate a new machine learning model and end up with an accuracy number or other metric, you need to know if it is meaningful. Particularly in imbalanced classification models, it can appear that your model isn’t really doing much better than guessing. …


An example NLP classification model using a Recurrent Neural Network with the Keras Python library

Photo by on

This will be a minimal working example of Natural Language Processing (NLP) using deep learning with a Recurrent Neural Network (RNN) in Python. For this project, you should have a solid grasp of Python and a working knowledge of Neural Networks (NN) with Keras.

The goal here to build a…


Python Geolocation

Photo by on

Nominatim is the Latin for (‘by name’). It is also a tool to search OpenStreetMap data by address or location (geocoding). Nominatim is included in the GeoPy in the GeoPy Python library. …


Do red light cameras reduce traffic accidents?

Photo by on

I recently received a $100 red light ticket from the city of Chicago. Along with the ticket was a link to a picture and video of my vehicle not coming to a full stop when turning right at a red light. I fell victim to the dreaded Chicago red light…


Make and deploy a simple Flask app for your ML project

The purpose of this article is to show you a very simple ‘productionization’ of a machine learning model using Flask, Heroku, and GitHub. This article assumes a solid understanding of Python code and that you have already trained a Machine Learning model in Python but have not made a Flask…


Photo by on

This is a quick start example of how to create a basic PySpark session in Google Colab. This is not a tutorial for the use PySpark or Colab, simply a quick example to get you up and running.

Why I use Google Colab for PySpark projects:

  • PySpark can be challenging to setup on some computers. I found Colab…


Modeling US elections using chain stores

If your county has more Dollar Tree stores than Starbucks, you’re likely a Republican. If you have even a single Trader Joe’s store in your county, you’re probably a Democrat.

Photo by on

The chain stores found in a community can tell us a lot about the people that live there. Think about…

Aaron Lee

Data Scientist, Computer Science Teacher, and Veteran.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store