Photo by Caspar Camille Rubin on Unsplash
Photo by Caspar Camille Rubin on Unsplash
Photo by Caspar Camille Rubin on Unsplash


A while back I was thinking of ways in which I could annoy my friends by spamming them with messages for a few minutes, and while doing some research I came across the Android Debug Bridge. In this quick guide I will show you how you can interface with it using Python and how to create 2 quick scripts.

The ADB (Android Debug Bridge) is a command line tool (CLI) which can be used to control and communicate with an Android device. You can do many things such as install apps, debug apps, find hidden features and use a shell…


Cryptocurrencies are rising in popularity by the minute, as more and more people are investing in them for short-term and long-term gains. Even I have bought some. But one thing which is hard to do is keeping track of the price of a certain cryptocurrency continually. Today I will show you how to create a Telegram bot which can alert you if a cryptocurrency surpasses a target price.

To interface with telegram bots, you can send them a message that starts with a command, and any arguments if required.

The syntax diagram for our alerting command
The syntax diagram for our alerting command
The syntax diagram for our alerting command

You must make sure that you tell the bot which cryptocurrency…


After publishing my previous article on , I thought about how I could use the sequence to show Benford’s Law, and how I could create a graph in Python (as opposed to Excel). Now before we get started, I had never used matplotlib before writing this article, so this tutorial is aimed at total beginners like me. But even if you know what you’re doing, please do stick around, you might learn something new.

Here’s a quick list of sections we will cover:

  1. What is Benford’s Law?
  2. Plotting a static frequency graph
  3. Plotting a live graph

No, the title is not clickbait at all! A few days ago I really wanted to find the optimal solution to calculating Fibonacci numbers and I wanted to try to calculate the 100,000thnumber in the sequence, but I thought; if I could calculate the 100,000th, what’s stopping me finding the 1,000,000th? So today, I am going to show you how I went about doing this and all the issues I came across.

The Fibonacci sequence is one of the most well known mathematical sequences and is the most basic example of recurrence relations. Each number in the sequence consists…


In this 3-part tutorial, I will show you how you can create your own sudoku ‘engine’ which is capable of solving and generating sudokus in pure Python with no external libraries. Please keep in mind that the algorithms I will show you today are very greedy and not the fastest approach. If you want to create a fast sudoku solver/generator then consider using a faster programming language such as C. This tutorial is meant for those who have a basic understanding of Python but try to follow along anyways. Click this link to check out the Github repo!

Here are…

These Python code snippets can save you a bunch of time on your next project so make sure to read along!

A photo of some Python code by Chris Ried on Unsplash
A photo of some Python code by Chris Ried on Unsplash
Photo by Chris Ried on Unsplash

Sometimes when writing code you find yourself needing to do something trivial but you’re just not sure how to do it, and when you eventually find a solution it might not be the most efficient or prettiest thing you could’ve came up with. That’s why today I’ve compiled a list of very useful Python one-liners which can help you with those trivial tasks. There is no need to install any third-party libraries for any of these snippets as they all use built-in modules.

Here’s a list of the topics we will cover today:

  1. Ordering a dictionary based on its values

As cryptocurrencies are beginning to being brought into our society as a norm, more and more people are interested in them. People are trading with them, investing in them and even using them to create further products. In today’s article I will show you how you can plot beautiful graphs using Plotly to display critical price data. We will be plotting two graphs: one of a simple candlestick chart and 2 simple moving averages and the other of 4 different cryptocurrencies to see how they correlate with each other:

  1. Plotting a candlestick chart for Bitcoin
  2. Plotting multiple cryptocurrency graphs


Finishing the Generator

When we play a sudoku 98% of the time we expect there to be only one solution, hence we need to generate sudokus which only have one solution so we can mark it right or wrong. For this we need two helper functions and one main function which is called during the generation of the board. The general idea is that we find the different empty positions on the board, and on each position solve the sudoku board and check to see how many solutions there are in total.

Firstly, we will create two helper methods, similar to how we…

Creating the Solver

Welcome back to part 2 of this 3 part tutorial, in this section we will create the solver for our sudoku engine, so let’s get straight into the code. But, firstly we need to create two methods which will aid the main solving method.

Here we iterate through the board and return the row and column in a tuple of the index position of the first empty square we come across, if there is no square then False is returned otherwise.

Next we will create a method which can check and tell us if a number can be inputted…


18 year old self-taught Python dev | Been learning for 4 years | Love making weekend projects | U.K.

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