Using MicroPython on FireBeetle ESP32

Motivation In Fire Beetle ESP 32 Project I wrote about connecting the FireBeetle ESP32 with the Arduino IDE and writing a little C-style program. Another interesting approach is to use MicroPython. Installing MicroPython Install esptool To get MicroPython onto the board we use the esptool command line. Because we are in the Python ecosystem we…

Mailbox IoT ESP 32 Project

Motivation Out of curiosity I bought a ESP32 board to tinker with, but for almost half a year hadn’t got an idea what to do with it… But then! Project Idea The idea: Every time I get mail into my physical snail mail mailbox, the mailbox shall send a message via Telegram to my smartphone:…

Introduction to matplotlib – Part 3

  After laying the foundation in Introduction to matplotlib and Introduction to matplotlib – Part 2 I want to show you another important chart Bar Charts A bar chart is useful to show total values over time e.g. the revenue of a company. years = (2017, 2018, 2019) revenue = (5000, 7000, 9000) plt.bar(years, revenue, width=0.35)…

Linear Regression with sklearn – cheat sheet

# import and instantiate model from sklearn.linear_model import LinearRegression model = LinearRegression() #prepare test data features_train = df_train.loc[:, ‘feature_name’] target_train = df_train.loc[:, ‘target_name’] #fit (train) model and print coefficient and intercept model.fit(features_train , target_train ) print(model.coef_) print(model.intercept_) # calculate model quality from sklearn.metrics import mean_squared_error from sklearn.metrics import r2_score target_prediction = model.predict(features_train) print(mean_squared_error(target_train , target_prediction))…

pytest Tutorial – Part 1

At PyConDE Berlin 2019 Florian Bruhin gave a really nice session about testing with pytest, which I try to recap here. Writing Tests If You want to work with pytest you can install it via: pip install pytest When you know basic python unittest fixtures, good news ahead: pytest is compatible and will run your…

BarCamp Regensburg 2019

Sessions 110 Sldies from Sascha Pallenberg Working out loud Creativity Techniques “Quantity beats Quality” 6-3-5 Methode 6 People – 3 ideas each – 5 times pass around Worldcafe Lessons Learned in Apprenticeship Impressions

SQL-LIKE and wildcards

This article is part of my SQL-Tutorial Motivation Sometimes you need to retrieve data from a database without knowing the exact string to look up so wildcards for the rescue Underscore Se_en represents a pattern with a wildcard character. The _ means you can substitute any individual character here without breaking the pattern. It matches…