Structures in Python
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.
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.
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.
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.
This article document how I updated python3 from version 3.5 to 3.6 on FreeBSD.
With Python it is relatively easy to make programs go faster by running things in parallel on multiple cores. This article shows you how.
We sill concentrate on a type of problem that is easy to parallelize.
While regular expressions can’t fully parse XML, they can be sufficient to extract data from it. In cases where the dataset is large and we are only interested in a small part of the data, this can be significantly faster than using a full XML parser.
This article documents the process I followed to update Python 3.4 to 3.5 on my FreeBSD machines.
This documents how I installed Python bindings for libmagic
.
There are actually different bindings for libmagic
. One set is part of the
original distribution. It can be found in /usr/src/contrib/file/python/
.
But in my opinion it is somewhat cumbersome to use and not very Pythonic.
The implementation from ahupp/python-magic in Github feels more natural.
This is a python implementation of the SHA256 command-line program, for operating systems that lack it.
This script “image for LaTeX” is meant for generating LaTeX figure
environments of pictures.