Calculating compound interest with Python 3

Compound stonks only go up! I have a growing interest in finance and analytics, so it felt like a great idea to start creating my own set of financial tools with Python. This article will explain how I created a simple but effective script for calculating compound interest with Python. I wrote this in Python 3 (as all new Python projects should be from now onwards), but the library dependencies are very lightweight, making this something that could easily be re-written from Python 2....

January 3, 2021 · 3 min · Tom

How to invoke UAC in a Windows Batch script

Here is my quick and easy way to raise the privilage level of a Windows Batch script; allowing you to run your code at an administrator level. This is not a new question and has been asked many times on StackOverflow forums. The best answer I was able to find was the following from dbenham: https://stackoverflow.com/questions/1894967/how-to-request-administrator-access-inside-a-batch-file/10052222#10052222 That being said there are many ways to skin this cat, so I came up with my own method, all be it derivative....

December 29, 2020 · 2 min · Tom

Copy Paste in vSphere before installing VMware tools

I’ve spent enough time building VMs in vSphere to know that the first few minutes between starting the VM and getting VMware Tools installed is agonising. Similar to my ‘Copy Paste With Powershell Sendkeys‘ script, I have another tool written in AutoIT which sends defined keyboard strokes to the system. So this is not exactly ‘copy paste in vSphere’, but it achieves the same goal. If you actually want to enable clipboard sync between host and VM, you can follow this guide here: Enable Copy and Paste Operations Between the Guest Operating System and Remote Console....

May 18, 2020 · 2 min · Tom

Python 3 SSH with Paramiko

I have a number of projects which I am currently working on which usually involve a raspberry pi and so other TCP enabled object. One project, in particular, is to control a KVM server with buttons connected to a raspberry pi (follow on social media or RSS for that future post). I have been using Python 3 SSH with Paramiko to send commands KVM server from the pi. Here is how I do that…...

May 15, 2020 · 3 min · Tom

How To: Python infinite loops with while true

Here is a quick guide on how to create an infinite loop in python using a ‘while true’ statement. There are number of reason that you might want to implement this; a great use case would be outputting a fluctuating variable to the terminal such as a temperature reading from a sensor. loops that make your brain hurt A ‘while true’ statement allows us to run a sequence of code until a particular condition is met....

May 5, 2020 · 2 min · Tom