On the surface Fortran has it all. Highly optimised compilers for many (if not all) platforms, awesome multi-dimensional arrays for use in numerical algorithms, a reasonably readable syntax, semi-automatic dynamic memory handling, etc. The main problem with modern Fortran is that there is too much friction: The language is generally perceived as old and outdated, there are "much better" modern…
I have searched but not found a python implementation that is reasonably equivalent to the unbiased xcorr Matlab function . This is my best solution so far: import numpy as np def xcorr(x, y=None): """Correlation like Matlab's xcorr (unbiased)""" if y is None: # perform auto-correlation y = x N = max(len(x), len(y)) z = np.correlate(x, y, mode='full') s = 1 / (N - np.arange(N-1)) z[N:] *= s if N %…
If you have the slightest interest in technology history, you should go watch this 3 hours long interview with Dave Cutler — a real gemstone, where Dave vividly recites detailed stories and many interesting sidelines from his long career in technology. The interview contains some really unique quotes, like: "I didn't want to work with these guys anyway, I didn't think Intel was all that sharp."…
The recommended approach to persist models created using scikit-learn is to pickle the python model object or use the ONNX format. When saving the model using pickle there is no way of ensuring compatibility with newer (or older) versions of scikit-learn. You are essentially bound to use the model in the exact same environment as the one in which it was created. When saving the model to the ONNX…
The tools available for building Python packages are many — way too many. The so-called Python Packaging Authority (PyPA), which is not an actual authority , publishes the Python Packaging User Guide that contains a very detailed page with Tool recommendations . The introduction to the Tool recommendations page makes it clear that there are "a landscape of different tools", and that PyPA "does not…
Atlassian is amazingly unresponsive to users of their Bitbucket product. Since the launch of the Bitbucket Pipelines "Runners" feature more than two years ago there has been an open issue with a suggestion to auto-update runners, or at least provide a way for users to know when a new runner version is available. In the issue comments users have suggested various work-arounds to use while waiting…
There may come a day where you want to stop using Confluence and just convert all the pages to simple Markdown text files. Luckily this is achievable using the Confluence XML export function, some custom XML parsing code and the markdownify Python package. Confluence stores data in an Atlassian specific xhtml-format with a mix of html and custom tags (with the namespace prefix "ac"). I have…
Apparently there is no need for the past when you develop with Tensorflow. I dared an attempt to load and use a year old Tensorflow/Keras model but tripped on the error: AttributeError: module 'tensorflow.python.distribute.input_lib' has no attribute 'DistributedDatasetInterface' There seems to be consensus that the issue is caused by the first-rate decision to include an old version of Keras in…
There is no other software that I use and pay for that can compare to Apple Music when it comes to severe bugs and annoyances. The worst of the Apple Music clients is that on macOS. Here is my list of the top 10 most annoying things about Apple Music on macOS: Adding a currently playing song to a playlist will stop the music and clear the play queue. Hitting play will start the music at some sound…
Here is my personal take on a simple and practical Matlab Style Guide that provides code formatting guidelines for Matlab code. General Code shall be formatted to maximise readability, and to avoid coding mistakes. Follow the recommendations from Matlab Code Analyzer, so there are no warnings (yellow markers on the bar on the editor's right side) in the code. Avoid creating scripts, make functions…