This article details how I used the Plantower PMS5003 particulate matter (“PM”) sensor on a PC or laptop, using an FT232H breakout board to make the connection.
Articles tagged with "python3"
After some initial experiments with sqlite as a replacement for a json data file format (which I did not pursue in the end), I have now started using sqlite in earnest. And I must say that I quite like it.
This document explores how an SQLite database could be used to store data for the resin-calculator. Normally, the recipes are a dictionary keyed to the name of the resin. The value of each recipe is a list of (component, parts-by-weight) tuples. Since a database only contains tables, where each row has the same form, how do we store such infomation in a database?
As an engineer I do a lot of calculations. These can be done with pen and paper and a calculator, in an IPython notebook or in a throwaway spreadsheet. All of these methods have shortcomings, though.
Pen and paper is hard to share and (in my case) hard for others to read. In IPython you can assign the results of calculations to a variable, but you have to perform a separate action to display them. And spreadsheets in general show you the results but not the calculations.
So I wrote a simple function in Python to help me with that. Using this function I can print both simple assignments and relatively complex calculations. And it shows both the calculation and the result.
With leading white space governing the indentation level and so the grouping of statements, Python code already looks relatively clean.
Yet there are additional tools that will help you improve your code.
Sometimes I miss the C’s plain old
Of course Python has dictionaries, but I prefer to write
Here are several ways of doing something akin to a
According to my revision control systems (
rcsin those days), I’ve been using gnuplot to make graphs since at least 2002. And I’ve got it set up via a custom gnuplotrc to match the style of the TeX documents I often use the graphs in.
At work we have an Instron 3369 machine for material testing. Recently, I wanted to visualize some tensile test data in ways that I couldn’t get into the test report.
This article contains several useful tricks for manipulating PDF files.
The focus of this article is on Open Source and Free software, that are available for UNIX-like operating systems. These tools are made for use on the command-line of a shell.
This article document how I updated python3 from version 3.5 to 3.6 on FreeBSD.