Python shutil – Extract files from zip file

In this post we will be creating a Python script that will extract all files within an existing zip file using the shutil module. The module provides a high-level interface for performing file and directory operations, such as copying, moving, and deleting files. It also supports archiving and compression, and can be especially useful forContinue reading “Python shutil – Extract files from zip file”

Python Itertools – Incremental number Iterator

In this post we will be creating a Python script that will create an iterator consisting of incremental numbers, to do this we will be using the Itertools module implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML. See the sample of Python code that creates an incremental number iterator andContinue reading “Python Itertools – Incremental number Iterator”

Python rich – Create a progress bar

In this post we will be creating a Python script that will display a progress bar whilst running. To do this we will be using the ‘rich’ library which allows us to aesthetically pleasing command line applications. The library is very useful whereby it allows formatting to many elements of output. To install the richContinue reading “Python rich – Create a progress bar”

Python random – Random password generator

In this post we will be creating a Python script that will generate for us a random password, to this we will be using the random module. The script will take input in the form of an integer which will define the length of the password. We then have a variable named ‘store’ which containsContinue reading “Python random – Random password generator”

Microsoft Excel – Adding colour scales

In this tutorial we will be adding colour scales to the cells within our Excel spreadsheet, this function will apply a gradient fill to our cells and help give us a better idea of where each cell sits within range of others. To add colour scales to your Excel spreadsheet carry out the following steps.Continue reading “Microsoft Excel – Adding colour scales”

Microsoft Excel – Draw line sparklines in cell

In this tutorial we will be drawing line sparklines within an Excel spreadsheet, these are especially useful in showing trends in data. Sparklines are small charts that appear within a cell and are typically drawn without axes or coordinates. To add sparklines to you Excel spreadsheet carry out the following steps. You will then be returnedContinue reading “Microsoft Excel – Draw line sparklines in cell”

Python Int – Generating a random number

Here we will be creating a script in Python that will generate a random number within a given range. To do this we will be using the random module which enables us to a random number generator. We begin by importing the module and make use of the ‘randint’ function which will return a randomContinue reading “Python Int – Generating a random number”

Python datetime – Birthday countdown

In todays post we will be creating a script that will countdown the number of days till the users birthday. To do this we will be using the ‘datetime’ module which supplies classes for manipulating dates and times. We start by taking the users birthday as input and then pass this to our ‘get_days’ function.Continue reading “Python datetime – Birthday countdown”