Graph Algorithms: Prim’s Algorithm in Python

Minimum Spanning Tree (MST) algorithms find the shortest path that connects all the points in a graph. Tree algorithms that find minimum spanning trees are useful in network design, taxonomies, or cluster analysis. On PythonAlgos, we’ve already covered one MST algorithm, Kruskal’s algorithm. Prim’s algorithm is similar to Kruskal’s algorithm. Whereas Kruskal’s adds to theContinue reading “Graph Algorithms: Prim’s Algorithm in Python”

Level 1 Python: Scientific Calculator

As part of the Super Simple Python series, we made a basic, four-function calculator. Since then, we’ve also covered how to do math in Python. From the math tutorial, we learned how we could use the Python math module to perform operations outside of the basic add, subtract, divide, and multiply.  Let’s use the mathContinue reading “Level 1 Python: Scientific Calculator”

Generator Functions, Yield, and Yield From in Python

Introduced in PEP 255, Generators are a special type of Python function that return lazy iterators. That means that the iterator does not hold its contents in memory. This comes in useful when dealing with large amounts of data and for optimizing space complexity. They’re also useful for animations, as we saw in our guideContinue reading “Generator Functions, Yield, and Yield From in Python”

Create Your Own AI Content Moderator – Part 3

As content on the web increases, content moderation becomes more and more important to protect sensitive groups such as children and people who have suffered from trauma. We’re going to learn how to create your own AI content moderator using Python, Selenium, Beautiful Soup 4, and The Text API. Our AI content moderator will beContinue reading “Create Your Own AI Content Moderator – Part 3”

Dijkstra’s Algorithm in 5 Steps with Python

Dijkstra’s Algorithm is one of the most well-known graph algorithms. It is also one of the hardest to spell and pronounce. It’s pronounced “dike-struss” algorithm. Dijkstra’s algorithm is a shortest path algorithm with many variations. In this post we’ll be going over two Python implementations of Dijkstra’s algorithm. The first is the naive implementation, theContinue reading “Dijkstra’s Algorithm in 5 Steps with Python”

A Python Guide to the NY Times Movie Review Search

A while ago I wrote an article on How to Download Archived News Headlines using the NY Times API. In this post, we’re going to go over how to use the Movie Reviews API from the NY Times to pull movie review articles. The only non-native Python library you’ll need for this is the requestsContinue reading “A Python Guide to the NY Times Movie Review Search”

Super Simple Python: Generate a Deck of Cards

Super Simple Python is a series of Python projects you can do in under 15 minutes. In this episode, we’ll be covering how to generate a standard deck of cards in about 30 lines of code. For a video version see: Many of the Super Simple Python projects have revolved around random number generation orContinue reading “Super Simple Python: Generate a Deck of Cards”

Super Simple Python: Plot a Random Dataset

Super Simple Python is a series of Python projects you can do in under 15 minutes. In this episode, we’ll be covering how to build a simple way to plot a random dataset in 10 lines of Python! For a video version: Much like the Dice Roll Simulator, Random Number Generator, High Low Guessing Game,Continue reading “Super Simple Python: Plot a Random Dataset”

Super Simple Python: Unit Convertor

Super Simple Python is a series of Python projects you can do in under 15 minutes. In this episode, we’ll be covering how to build a simple unit convertor in under 25 lines of Python! For a video version: Unit conversion is annoying for humans at best, but very simple for machines. If you wentContinue reading “Super Simple Python: Unit Convertor”

Search Twitter from Your Command Line with Python

Recently I was curious to see Twitter’s sentiment on Black Friday. It turns out, so was much of the internet, as I got hundreds of views on my post within hours. In this post, we’re going to walk through how you can search Twitter from your command line with Python. To follow this tutorial, you’llContinue reading “Search Twitter from Your Command Line with Python”

%d bloggers like this: