Building a recommender engine - part 2

Building on the excellent work by Max Humber that I mentioned in my previous post, I wrote some code to collect some data and create a nearest-neighbors recommender. The code and instructions for use can be found at https://github.com/rericsson/hop-prescribe. In a nutshell, this will get some data from Beeradvocate, create a model and save it into a file so it can be published. My next entry on this topic will be about publishing the model as a web service.

Read More

Building a recommender engine - part 1

I recently watched a session by Max Humber on building a recommender engine on O’Reilly. What I really liked about it was that he didn’t use the standard Movielens data. The problem with the standard datasets is that they omit the hardest part about any sort of machine learning or modeling: getting the data and formatting it to work properly in the model. I wanted to build upon the recommender that he constructed using beer data.

Read More

Python console in a post

I was looking at the some more pythonanywhere docs and came across a way to do an embeddable console. That seemed like an interesting trick, so I put it in a post. Only problem, it doesn’t show up. Instead there is a comment in the generated HTML that says Raw HTML omitted. I did a bit of searching around the Hugo site and found that you can make it work if you add the following to your config.

Read More

Checking out pythonanywhere

I’m looking into building a simple recommender in Python and was looking for a place to host it. I know I can create a server in Hetzner. That’s easy and pretty flexible but I wanted to try something different. I did some DuckDuckGo searching and found pythonanywhere. They have a free tier and it looked like an interesting platform. I signed up and had the hello world site up in a few minutes.

Read More

The Python Walrus

Python evolves over time. Mostly for the good as it adds features that make things easier and more sensible. One of those is the assignment expression. If you have a C background, you are used to assignment expressions. In C, x = 10 both assigns the value 10 to x and also returns the value 10 so you can use it in logical expressions and the like. In Python, this is not the case.

Read More

Slow down script kiddies and other malcreants

The null program is a really great blog written by Chris Wellons. He has a great amount of interesting stuff on a wide array of programming topics. One that caught my attention recently, is Endlessh: an SSH Tarpit. Essentially, what he is proposing is a very simple and low cost way to slow down unsophisticated attacks on Internet facing servers. If you’ve ever had an Internet facing server with port 22 open, you can immediately see the value of this.

Read More