The Mimic Pendant Lamp

This is a prototype for a dining table pendant lamp. A camera monitors what’s underneath the lamp and tries to mimic the colors it sees with the LED:s on the top of the lamp. This creates a somewhat matching ambient light in the room. It is made from oak wood and it uses a Python script on a Raspberry PI Zero W for the image analysis. The drawback is that the boot time is close to 20 seconds....

May 13, 2020 · Peter Krantz

The unreasonable effectiveness of recipe generation with the GPT-2 sample model

The release of the OpenAI GPT-2 sample language model from the paper Language Models are Unsupervised Multitask Learners (also see Better Language Models and Their Implications) shows great promise of what is to come. The paper describes how training data was collected by following outbound links from Reddit. This got me thinking about what types of content it has seen. I have experimented with triggering recipe generation from the model by using “recipe” and similar conditioning texts....

February 27, 2019 · Peter Krantz

Chat Roulette Kastanjett at Stupid Hackathon Sweden

The Stupid Hackathon is a one-day event where participants conceptualize and create projects that have no value whatsoever. Me and Memeleader made Chat Roulette Kastanjett - a service for all castanet players who want to talk to other castanet players over castanet morse code. We made a small chat website (with the help of and Heroku), wired up castanets with a micro Arduino controller running morse code debugging code. And we won a prize!...

February 12, 2017 · Peter Krantz

Nurse Christmas Havin's Love or Using Deep Learning for Romantic Novel Titles

Torch is a scientific computing framework with wide support for machine learning algorithms. Andrej Karpathy has an excellent blog post explaining recurrent neural networks (RNNs) and character level models. With his sample code for Torch it is very easy to get started creating your own RNN by using text from a specific domain. This model learns to predict the next character in a sequence. The model can be used to generate text character by character that looks similar to the original training data....

December 23, 2015 · Peter Krantz

Meanwhile, on the west coast of Sweden

A small crab attacked my GoPro camera.

August 8, 2012 · Peter Krantz

A lightweight semantic interoperability framework for countries and large organizations (and small ones)

This post is a summary of some ideas for a lightweight semantic interoperability framework It is mainly a composition of existing open standards to form a framework for organisations to be able to ensure that semantic and technical descriptions stay connected over time. The idea is to provide a framework that allows for an increasing semantic interoperability emerging over time without having a large centralized organisation defining vocabularies. Main points:...

December 15, 2010 · Peter Krantz

Implement open data for EU institutions

Jonathan Gray of the Open Knowledge Foundation participated in a conference of the Communia project, a European thematic network on the digital public domain. In a great post about the meeting at the OKFN blog, he recommends two improvements to the current PSI work; 1: Broaden the scope of the PSI Directive to include publicly funded cultural heritage organisations and 2: Broaden the evidence base for opening up PSI. A third recommendation An important value of public sector information is the increased transparency in government decision making....

July 12, 2010 · Peter Krantz

Joining the Swedish eGovernment Delegation

A while ago I was offered a position with the Swedish eGovernment Delegation. I will be working with IT standardisation issues and the next revision of guidelines for public websites.

November 21, 2009 · Peter Krantz

Solving Project Euler Problems With Ioke

For those of you that have been following Ola Bini’s work on Ioke, the dynamic language for the JVM, I am happy to report that the current release 0.1.1 is usable enough to solve Project Euler problems with. I wanted to learn more about Ioke and the best way to learn a new language is to use it on your own. So, here is some example Ioke code for some of the simpler Project Euler problems....

January 3, 2009 · Peter Krantz

Building your own Twitter client with Fluid and jQuery

Like many before me, I was searching (unsuccessfully) for a decent twitter client. There are many, but most seem to be ad sponsored or based on a rather hefty framework like AIR (which by now, I guess, has been silently installed on my computer anyhow). Update: This project is now deprecated and Twitter has removed basic authentication. Custom apps have major implications for usability so I decided to roll my own....

July 31, 2008 · Peter Krantz