Improving my Python coding
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.
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 struct
in Python.
Of course Python has dictionaries, but I prefer to write a.b
over a['b']
.
Here are several ways of doing something akin to a struct
in Python.
State machines can be relatively easy defined as a data structure.
After the 2017-05-12 mesa port consolidation, there were packages left with missing dependencies. This is how to fix them
Clone the repository from https://github.com/jbaiter/gphoto2-cffi
.
> cd ~/github
> git clone https://github.com/jbaiter/gphoto2-cffi
By accident I checked 60-odd full-size photographs into the git history of my
website. I shrunk them in a next commit, but the history was still there
leading to a bloated .git
directory. This took a lot of time when making
backups. This documents how I cleaned up this mess.
According to my revision control systems (rcs
in 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.
Recently FreeBSD changed the multimedia/ffmpeg
port to drop the
-ffast-math
and -fno-finite-math-only
from the CFLAGS when building an
optimized binary. The following experiment was conducted to see how much of
a difference this makes.
This article contains several useful tricks for manipulating PDF files.
The focus of this article is on Free Software, that are available for UNIX-like operating systems. These tools are made for use on the command-line of a shell.