A quick start for Python decorators
Synopsis #!/usr/bin/env python3 import shutil # Decorator which pre-checks the space in /tmp # and throws an exception if the space is more than #...
Some thoughts
Synopsis #!/usr/bin/env python3 import shutil # Decorator which pre-checks the space in /tmp # and throws an exception if the space is more than #...
This is for fun, for silliness and for do not use anywhere-ness – or to quote the instructions: If you’ve ever wondered just how egregious...
This is really a quick reminder about a perl function which does a little more than you’d perhaps expect. Need to convert a binary (or...
A very quick and simple comment on building single-quoted strings in shell scripts which include single quotes. Note that it’s not possible to include a...
Scenario For a certain code-base it’s decided it would be useful to be able to trigger an exception on-demand (mid-way through a process working). Why?...
You want to use pip to install a module from PyPI. However your server distribution in a little old (at the time of writing this...
It’s important to read the documentation, and then read it again once or twice. PHP’s date_parse function parses a datetime string and returns an “array with information...
This article starts with a conversation about adjusting compiled perl regular expressions and a sudden realisation – which went a little along the lines of:...
It’s often the case when analysing system logs that you want to create a summary bringing together data from different lines of a log –...
I was entertained by Numberphile’s dice-based generation of an approximate of pi so thought I’d throw together a quick script to try this out: random_vals_pi The...