This article document how I updated python3 from version 3.5 to 3.6 on FreeBSD.
Articles tagged with "python"
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.
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.
By default, the pelican blog generator that I use creates a random tag cloud. I wanted one that was alphabetically sorted. So I modified the source code.
After updating the site generator that powers this website, I had to make some adjustments.
More and more, IPython has become my tool of choice as the ultimate calculator and to try out concepts and code for use in my programs.
While I generally use the terminal-based interactive shell, notebooks offer more capabilities for integrating text, formulas and graphics.
With Python 2.7 effectively mostly ...
As an engineer, I often do diverse calculations that I want to save in my logbooks which I write in LaTeX. Up to now I’ve either formatted those by hand or used the listings package to include calculations made in IPython.
From the release of version 3.2, the py-stl software has been renamed to stltools. The reason I made this change mostly has to do with how FreeBSD handles packages. Programs that require an interpreter are prefixed with its name and version. So py-stl would become py27-py-stl, which would be ...
Sometimes one has to convert numbers from and to different formats. Below are some examples in Python that I picked up over time. What you see are excerpts of IPython sessions.
To and from hexadecimal (base 16):
In : hex(100) Out: '0x64' In : int(0xa7) Out[2 ...
Now that I got an EPUB reader, I started looking for a way to make EPUB documents.
In principle, an EPUB file is a zipfile with a certain layout, as can be seen on the wikipedia page linked above.
The actual contents are just XHTML, while the metadata files are ...