Matplotlib, decorators and plotting waves

In this tutorial, we will learn how generatate plots using Matplotlib and Numpy. Specifically we'll plot waveforms, which in our context just means periodic functions (i.e. functions f such that f(x + P) = f(x) for some P

Let's start by defining some key terms of waveforms: the period of a wave is the time it takes for one complete oscillation to occur; the frequency of a wave is the number of oscillations that occur in a given period of time and the amplitude of a wave is the measure of the height of the wave, it is the distance between the crest or trough and the mean position of the wave.

Once we have a basic understanding of these concepts, we can move on to using Matplotlib to plot waveforms. We will begin by plotting a single period wave, and then use a function decorator to make it periodic.

There are many different types of waveforms, each with its own unique characteristics and applications. In this tutorial we will be plotting four of the most commonly seen shapes: Square, Triangular, Sawtooth and Sine

Read More

Automating Flask applications deployments using Ansible, Gunicorn and Nginx

In this article we will explore the purposes, the tools and the steps necessary to automate the deployment of flask web applications using Ansible.

We will be covering:

Why it might be a good idea to automate your deployment processes

The value of deployment automation may vary depending on the size, complexity or volume of your processess but here are some key bennefits that automated deplyments can bring whether you are a regular user or a big business or organization:
- Faster deployments: once you have your automated deploying process set up, it can be performed in seconds. This might be quite handy either if you are making changes to your application, deploying to a new server or restoring your network services after a crash.
- Minimizing errors: deployments involve multiple steps, when doing it manually essential steps can be missed and small mistakes might be overlooked. Once your deployment automation has been correctly configured the proccess is set and you can rely on it to aways work the same way
- Scalability: If you are working with a single application, without continuous update releases and only one server, deploying i

Read More