Basic iOS app with React Native

Taking some time-off from Swift-programming, I wanted to share an app I created in React Native. The idea was to create an interface to display JavaScript (Google) maps. Even throughout the blog quite a few of these maps have accumulated. They are by design interactive and a user benefits hugely from being able to click on markers to get more information to zooming in and really understanding the location (or perhaps switching to satellite view).


Read More »

Centroids and Centres – Numpy & R

I recently had the task of calculating the (un-weighted) geometric mean for a group of points (technically checking what was calculate using ArcGIS) e.g. we have 5 points in a group (and perhaps 10 groups) and so we want 10 centres. Now, the script below works fine for this task – however it brought about an interesting question for me: why does the gCentroid {rgeos} command give a mean and not a centroid?

Read More »

Millions of Drive-Times (OSM + Python + STATA)

So far I have found two offline-routers that work well (in my opinion) with Open Street Map data and I have enjoyed using:

  1. OSRM – OSRM is a very fast C++ routing engine
  2. GraphHopper – GraphHopper is Java based

Both of these methods involve a local server set-up, which accepts HTTP connections. Because I/O delay is negligible, we find ourself limited by CPU processing-power and thus I have that using multi-tasking (notably multi-processing rather than threading to overcome cPython’s GIL) compared to asynchronous techniques brings about the greatest speed benefit. Further; GraphHopper allows a persistent connection and thus we can use connection-pooling for an even bigger speed boost

Read More »

Millions of Distances – High Performance Python

Let’s imagine we have 100,000 points and we want to find the distances for all the pairs that are within 10km of each other. Would we need to calculate 100,000 * 100,000 = 10,000,000,000 distances (10 billion) and how long would that take? Would it even fit into RAM? I wanted to experiment with NumPy for a long-time and saw this as the perfect setting. NumPy’s arrays are more compact than Python lists (taking up much less RAM), operations are generally much faster and convenient, and can be vectorised to be performed element-wise.

Read More »

Cracking MS Office Hashes with a GPU

In a similar spirit to an old post, where I compared the cracking speed of various GPUs and CPUs, however hopefully more useful (and shorter)…

My experience with MS Office passwords is that they do more harm than good – after several months the password is lost and the document meaningless.

Let’s a create an Office 2013 excel spreadsheet which is password-protected (“economist91”):


Now, imagine half a year has passed and we have forgotten the password.

Read More »