There are a few one-liners that I use in the shell to do some really nifty stuff. I struggle to quickly find and reuse these and asked for a solution on Mastodon. A handy one-liner might be something like (taken from here): This converts all the flac files in subfolders into mp3 files. Obviously, we […]
Tag: code
Pledging My Time V: analysing race results in R
It’s been a while since I posted a breakdown of half marathon times. The last time seems to have been 2018. I decided to give my old code a clean-up and quickly crunched the numbers from the 2022 Kenilworth Half Marathon. First, the results: Briefly, the code below reads in a csv file of race […]
Line Up: Waffle plots for colocalisation data
Quantifying the degree of colocalisation of two signals in microscopy images is very tricky. Lots has been written on this topic, including in my book The Digital Cell. The focus of this post is on visualising colocalisation. One way to look at colocalisation is two think about two sets of objects and how many of […]
All That Noise: The vesicle packing problem
This week Erick Martins Ratamero and I put up a preprint on vesicle packing. This post is a bit of backstory but please take a look at the paper, it’s very short and simple. The paper started when I wanted to know how many receptors could fit in a clathrin-coated vesicle. Sounds like a simple […]
Cloud Eleven: A cloud-based code sharing solution for IgorPro
This post is something of a “how to” guide. The problem is how can you share code with a small team and keep it up-to-date? For ImageJ, the solution is simple. You can make an ImageJ update site and then push any updated code to the user when they startup ImageJ. For IgorPro, there is […]
Adventures in Code VI: debugging and silly mistakes
This deserved a bit of further explanation, due to the stupidity involved. “Debugging is like being the detective in a crime movie where you are also the murderer.” – Filipe Fortes My code was giving an unexpected result and I was having a hard time figuring out the problem. The unexpected result was that a […]
Frankly, Mr. Shankly
I read about Antonio Sánchez Chinchón’s clever approach to use the Travelling Salesperson algorithm to generate some math-art in R. The follow up was even nicer in my opinion, Pencil Scribbles. The subject was Boris Karloff as the monster in Frankenstein. I was interested in running the code (available here and here), so I thought I’d […]
Adventures in Code IV: correcting filenames
A large amount of time doing data analysis is the process of cleaning, importing, reorganising and generally not actually analysing data but getting it ready to analyse. I’ve been trying to get over the idea to non-coders in the group that strict naming conventions (for example) are important and very helpful to the poor person who has […]
Tips from the blog X: multi-line commenting in Igor
This is part-tip, part-adventures in code. I found out recently that it is possible to comment out multiple lines of code in Igor and thought I’d put this tip up here. Multi-line commenting in programming is useful two reasons: writing comments (instructions, guidance) that last more than one line the ability to temporarily remove a […]
Calendars and Clocks
This is a quick post about the punch card feature on GitHub. This is available from Graphs within each repo and is also directly accessible via the API. I was looking at the punch card for two of my projects: one is work related and the other, more of a kind of hobby. The punch […]