Neo4j: Cypher – Neo.ClientError.Statement.TypeError: Don’t know how to add...
I recently upgraded a Neo4j backed application from Neo4j 3.2 to Neo4j 3.3 and came across an interesting change in behaviour around type coercion which led to my application throwing a bunch of...
View ArticleYelp: Reverse geocoding businesses to extract detailed location information
I’ve been playing around with the Yelp Open Dataset and wanted to extract more detailed location information for each business. This is an example of the JSON representation of one business: $ cat...
View ArticleRunning asciidoctor-pdf on TeamCity
I’ve been using asciidoctor-pdf to generate PDF and while I was initially running the tool locally I eventually decided to setup a build on TeamCity. It was a bit trickier than I expected, mostly...
View ArticleNeo4j Import: java.lang.IllegalStateException: Mixing specified and...
I’ve been working with the Neo4j Import Tool recently after a bit of a break and ran into an interesting error message that I initially didn’t understand. I had some CSV files containing nodes that I...
View ArticleAsciidoctor: Creating a macro
I’ve been writing the TWIN4j blog for almost a year now and during that time I’ve written a few different asciidoc macros to avoid repetition. The most recent one I wrote does the formatting around...
View ArticleTensorflow: Kaggle Spooky Authors Bag of Words Model
I’ve been playing around with some Tensorflow tutorials recently and wanted to see if I could create a submission for Kaggle’s Spooky Author Identification competition that I’ve written about...
View ArticleAsciidoc to Asciidoc: Exploding includes
One of my favourite features in AsciiDoc is the ability to include other files, but when using lots of includes is that it becomes difficult to read the whole document unless you convert it to one of...
View ArticleStrava: Calculating the similarity of two runs
I go running several times a week and wanted to compare my runs against each other to see how similar they are. I record my runs with the Strava app and it has an API that returns lat/long coordinates...
View ArticleLeaflet: Fit polyline in view
I’ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to zoom the map the right amount to see all the...
View ArticleEthereum Hello World Example using solc and web3
I’ve been trying to find an Ethereum Hello World example and came across Thomas Conté’s excellent post that shows how to compile and deploy an Ethereum smart contract with solc and web3. In the latest...
View ArticleMorning Pages: What should I write about?
I’ve been journalling for almost 2 years now but some days I get stuck and can’t think of anything to write about. I did a bit of searching to see if anybody had advice on solving this problem and...
View Articlescikit-learn: Using GridSearch to tune the hyper-parameters of VotingClassifier
In my last blog post I showed how to create a multi class classification ensemble using scikit-learn’s VotingClassifier and finished mentioning that I didn’t know which classifiers should be part of...
View Articlescikit-learn: Building a multi class classification ensemble
For the Kaggle Spooky Author Identification I wanted to combine multiple classifiers together into an ensemble and found the VotingClassifier that does exactly that. We need to predict the probability...
View ArticlePython: Combinations of values on and off
In my continued exploration of Kaggle’s Spooky Authors competition, I wanted to run a GridSearch turning on and off different classifiers to work out the best combination. I therefore needed to...
View ArticleNeo4j: Cypher – Property values can only be of primitive types or arrays...
I ran into an interesting Cypher error message earlier this week while trying to create an array property on a node which I thought I’d share. This was the Cypher query I wrote: CREATE (:Person {id:...
View ArticlePython: Learning about defaultdict’s handling of missing keys
While reading the scikit-learn code I came across a bit of code that I didn’t understand for a while but in retrospect is quite neat. This is the code snippet that intrigued me: vocabulary =...
View Articlescikit-learn: Creating a matrix of named entity counts
I’ve been trying to improve my score on Kaggle’s Spooky Author Identification competition, and my latest idea was building a model which used named entities extracted using the polyglot NLP library....
View ArticlePython: polyglot – ModuleNotFoundError: No module named ‘icu’
I wanted to use the polyglot NLP library that my colleague Will Lyon mentioned in his analysis of Russian Twitter Trolls but had installation problems which I thought I’d share in case anyone else...
View ArticlePython 3: TypeError: unsupported format string passed to...
This post explains how to work around a change in how Python string formatting works for numpy arrays between Python 2 and Python 3. I’ve been going through Kevin Markham‘s scikit-learn Jupyter...
View ArticleKubernetes: Copy a dataset to a StatefulSet’s PersistentVolume
In this post we’ll learn how to copy an existing dataset to the PersistentVolumes used by a Neo4j cluster running on Kubernetes. Neo4j Clusters on Kubernetes This posts assumes that we’re familiar...
View Article