It’s raining codes and docs. WMO weather interpretation code mapping and translation for english and german

It’s raining codes and docs. WMO weather interpretation code mapping and translation for english and german

Just wanted to let you know I wrote a little mapper / translation for WMO weather codes as the (free) API I use for current weather and forecast also provides it. An example API call to the weather API I am using and mapping the current weather code to readable format. The code is on…

Multitasking: “Fucking up multiple things at the same time!” – MicroPython uasyncio howto

Multitasking: “Fucking up multiple things at the same time!” – MicroPython uasyncio howto

Most code for simple IoT devices is a script with an endless loop with the code for the connected hardware like reading a sensor or polling something from the network followed by a delay. Keeping that pattern in mind helps to write new or convert your existing code for asynchronous execution. If you want to…

“These ARE the devices you are looking for” – a MAC based identifier in Python, Micropython and C++

“These ARE the devices you are looking for” – a MAC based identifier in Python, Micropython and C++

TLDR: Code for MAC address in (Micro)Python and C++ for D1 Mini, Raspberry devices and NodeMCU. I was looking for a unique static identifier to handle my IoT devices without baking the mqtt publish topics, name and location into the code. The code on identical devices should be the same, the the individual configuration should…

A snake with no name – Lambdas in Python (also functions and list comprehensions)

A snake with no name – Lambdas in Python (also functions and list comprehensions)

Sweet and short: Instead of a function you can write a single statement in Python as a lambda. Either is one either better or worse nor does one replace the other. They both have their place and intended use. Functions hopefully have describing names, are probably used multiple times and handle a specific part which…

“You won’t get IN with THIS E-Mail” – Python Regex to validate email (formally)

“You won’t get IN with THIS E-Mail” – Python Regex to validate email (formally)

Currently did some text analysis with Python and Regex. Came up with an E-Mail format validation method which could help you with the same problem and remind me of it in the future. Import package re and use the compile method to get a regex pattern with which you can match your desired String.For evaluation…