Python is great for maths, and as home schooling continues here in the UK due to the Coronavirus lockdown I'm using the time to look at converting percentages (%) using Python. This is the second of my Maths and Python posts, with fractions being my first. I'm trying to include more f string usage in … Continue reading Percentages With Python
Author: Geek_Dude
Tackling Fractions With Python
Fractions, not something I've really looked at since my school days. However with home schooling currently taking place here in the UK due to another Coronavirus lockdown, it is something that I've been refreshing my knowledge on this week. Note: https://www.calculatorsoup.com/calculators/math/fractions.php provides an online calculator to help with fractions. The site also provides the formulas … Continue reading Tackling Fractions With Python
Using An API Call To Make Multiple Grafana Users (Python)
A little while ago I looked at using Grafana on a Raspberry Pi ( https://geektechstuff.com/2020/06/25/grafana-prometheus-and-node-exporter-on-raspberry-pi-via-ansible-raspberry-pi-and-linux/ ), today I created a quick Python script to create new Grafana user accounts using the Grafana API. Why Use The API? Grafana does have a graphical web based interface for creating users, and if creating a single user account … Continue reading Using An API Call To Make Multiple Grafana Users (Python)
Real World Python – Book Review (Python)
However, I also have periods where a form of writer’s block kicks in and wonder, “What else could I use Python for?”. As if by magic, Lee Vaughan has answered with “Real World Python” which contains examples of real-world problems being answered by Python and then expands on the solutions with fun challenge projects and further reading.
Kubernetes Cluster On Raspberry Pi
Can a Kubernetes cluster be built using Raspberry Pis? Yes, it can. The Raspberry Pi is a fantastic computer and I've used it in a variety of projects to assist with me learning more. Over the summer (2020) I used an Ansible playbook created by Jeff Geerling to briefly create a small Pi Kubernetes cluster, … Continue reading Kubernetes Cluster On Raspberry Pi
Raspberry Pi DHCP Server (Linux / Raspberry Pi)
Previously I have connected my Raspberry Pi devices to my home wi-fi and that raised the question, could I have my own home dev network which would keep my Pi devices away from my home network? I disconnected the Raspberry Pi boards from their various locations in the house, grabbed a desktop switch, some ethernet … Continue reading Raspberry Pi DHCP Server (Linux / Raspberry Pi)
BBC micro:bit Discovery Kit
GeekTechV2 has started to learn about electronics and circuits. To assist with this we have got the BBC micro:bit (https://microbit.org) out and purchased a Discovery Kit (https://thepihut.com/collections/new-products-micro-bit-store/products/discovery-kit-for-the-bbc-micro-bit). With the two products GeekTechV2 can build circuits and program the micro:bit so that he can interact with them. GeekTechV2 is using a micro:bit version 1 as we … Continue reading BBC micro:bit Discovery Kit
Credit Card Number Checker (JavaScript)
Credit card details are frequently used online and you may be wondering how a website checks if a card number is legitimate or not. During my CodeAcademy “Back-End Engineer” I have tackled the Credit Card Checker project which involves using the Luhn algorithm to check credit card numbers. Quoting Wikipedia (https://en.wikipedia.org/wiki/Luhn_algorithm#Description): “Each of the numbers … Continue reading Credit Card Number Checker (JavaScript)
30 Day Coding Challenge & Personal Update 2020
I live in a part of the UK that has been under restrictions since March (with a few unrestricted weeks at the beginning of Summer) due to Coronavirus. When October kicked in my mood went a little bit bleaker as the light summer months had been and gone, darker days where setting in and sadly … Continue reading 30 Day Coding Challenge & Personal Update 2020
The DRY principle: Ansible and variables
One of the frequent teachings I have learned whilst learning programming languages is that repeated blocks of code should be, where possible, placed into a function so that the function can be called multiple times instead of writing out the code multiple times. This approach as the benefits of: Producing repeatable resultsReducing the chances of … Continue reading The DRY principle: Ansible and variables