With a Raspberry Pi Pico and a Pimoroni Pico Display in hand, I have decided to try and make a game. The Pico Display has a colour LED, so for my first attempt I decided to utilise it for a game of “Follow The LED”. The game is similar to one most people play as … Continue reading Follow The LED with Raspberry Pi Pico and Pico Display Part 1(Python)
Category: Python
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.
Caching Requests (Python)
Python's Requests module is a great way for interacting with data over the internet, however when designing/building a Python program that uses Requests that can mean lots (and lots) of Request calls to test a function. This is not too great if you are testing over a poor internet connection, or on limited bandwidth or … Continue reading Caching Requests (Python)
UK Covid-19 / Coronavirus Data (Python)
The UK recently lowered the alert level for Covid-19 / Coronavirus pandemic, with the UK at level 3 (at time of writing this blog, 24th June 2020) and there has been discussion in the media about R levels differing at local levels and of the possibility of local lock downs. On the 23rd June 2020 … Continue reading UK Covid-19 / Coronavirus Data (Python)
Trying To Write More Pythonic With PEP-8 (Python)
The Python language has a list of Python Enhancement Proposals (PEPs) that have been suggested as ways to improve Python. In this blog post I am going to look briefly at PEP-8. The Index Of PEPs Python.org keeps a list of all the PEPs at: https://www.python.org/dev/peps/ once a PEP has been assigned a PEP number, … Continue reading Trying To Write More Pythonic With PEP-8 (Python)
AttributeError: partially initialized module has no attribute…(Python)
Less of a blog post and more of a reminder to myself that when Python says: AttributeError: partially initialized module 'MODULE_NAME' has no attribute 'ATTRIBUTE_NAME' (most likely due to a circular import) It is normally because I have named my Python file the same as the module I am importing and caused a circular reference. … Continue reading AttributeError: partially initialized module has no attribute…(Python)
Python and nmap: Controlling The Output (Python)
In my previous post I looked at the ways of using nmap and Python to scan hosts, and in this post I am going to look at outputting the results. But first a public service announcement: DO NOT USE THE BELOW INFORMATION TO ATTACK, MONITOR OR BREAK INTO ANY COMPUTER / NETWORK / DEVICE THAT … Continue reading Python and nmap: Controlling The Output (Python)
Python and nmap: Scanning For Hosts (Python)
nmap is a powerful software tool that can be used to scan a network for hosts, see what ports they have open and even try to identify what operating system the hosts have running. I previously created a basic port scanner in Python, but in this blog post I am going to look at using … Continue reading Python and nmap: Scanning For Hosts (Python)