RSSAmplifier

Blog

Graham Lyons

Software Engineer

/RSS feed ↗10 posts

Latest posts

A Zero-Fricton Terraform Primer

What is Terraform and why should you care? How can you learn about it without having to provision real stuff in your Amazon account?

Why My Development Environment is the Best

How I set up my computer for local development

Machine Learning for the Lazy Beginner

An overview of classification using Javascript

Everything You Need To Know About Networking On AWS

An overview of virtual private networking on Amazon Web Services - with ASCII diagrams!

The Quickest Way to Run Python in Docker

What's the least effort required to get some Python into a Docker container?

Verifying SSL Connections to Amazon S3 in CentOS 6 via Ruby

Whilst building a development virtual machine to distribute to my colleagues I ran into a problem when using the Bundler gem in Ruby. Bundler is a dependency manager and so makes lots of HTTP requests to fetch the necessary Ruby gems and I found that bundle install commands kept failing with an SSL error:

A Simple In-Memory Cache for Python’s Httplib2

When making HTTP requests programmatically it’s always nice to have a transparent caching mechanism to make things more efficient when you start fetching the same resource thousands of times a second. I was very close to implementing one with Python’s httplib or urllib libraries when I came across exactly the functionality I needed in httplib2. Huzzah! No need to write (and maintain) anything…

Hello World WAR Using Tomcat and Maven on Ubuntu

Maven is the de facto build tool of Java projects and Tomcat is a very widely used and well-established servlet container. Together they provide an excellent basis for Java projects on the web. To that end I decided to document, from a fresh install of Ubuntu 12.04, the steps required to package and deploy a simple Java webapp, packaged as a WAR, on Tomcat using Maven. At the time of writing the…

How to call a function on each value in a Python dictionary

Python has great support for mapping over lists or tuples, creating new structures containing the results of calling a function on the members of the original. I was looking for something similar for the values in a dictionary, maintaining the original keys, and I didn’t find it described anywhere.

Investigating Local Variable Scope in Python with the ‘dis’ Module

Compared to something like Javascript, scoping in Python is pretty easy to follow. However, I found a situation recently which was confusing at first glance until I examined the Python byte code using the dis module (“dis - Disassembler of Python byte code into mnemonics”, from the help documentation).