RSSAmplifier

Blog

Peter Krantz

Recent content on Peter Krantz

peterkrantz.comRSS feed ↗157 posts

Latest posts

Evolution of AI Bot Blocking on News Websites

The training of Large Language Models and their subsequent use in AI chatbots require access to vast amounts of data, often scraped from various online sources, including news websites. This data is crucial for the bots to understand and generate human-like text. However, this practice of data scraping seems to have raised concerns among news websites. AI systems like ChatGPT can be seen as…

Photography

You will find my photography over att Instagram . Below are some of the photography techniques I am using. Algorithmic Photography Girl with seaweed Stockholm City Hall Train ride The Art Museum of Sven-Harry Plant boy Barcelona Run A laser scanner for photographic experiments The Gnostic Nihilist Slit-scan Photography (Stockholm Geekmeet presentation) Constraints make photography more fun In the…

Algorithmic Photography

For a long time I have been interested in thinking about what would happen if cameras could do more than capturing a somewhat realistic representation of the incoming light through a lens. I have experimented with long exposures, slit-scan s and other ways of interpreting the world. But what if we could express a photographic vision in an algorithm we could use when capturing images? We already…

Girl with seaweed

Projects

Ideas and things I have been working on in no particular order. SRT Equalizer A Python package to reduce line length of subtitles by splitting them into multiple subtitles if necessary. Postnummeruppror.nu An initative to crowd source an open data geolocated version of the Swedish post code system. We developed a website , apps for iOS and Android and produced datasets. Over 1000 people were…

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…

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…

Political advertising on social media is at risk of being lost forever

Not that long ago almost all political advertising was clearly visible in the physical world. Posters, newspaper ads and pamphlets were widely circulated, collected and preserved. It is not unlikely that you are able to walk into an antiquarian book shop and find examples of political propaganda hundreds of years old. Other copies will end up in attics, basements, shoeboxes and occasionally be…

Christmas carols and death metal lyrics in Tensorflow

After the previous experiment with a character based recurrent neural network (RNN) for romantic novel titles I wanted to find more details about word level RNN:s. I was happy to find that Sung Kim has made it easy to explore word-level RNN:s with Tensorflow in this repository . Training text is 50/50 Christmas carols and death metal lyrics. Output examples below. (added line breaks and bolded…

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 socket.io and Heroku), wired up castanets with a micro Arduino controller…

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…

Polonoise from 1790

The Gothenburg University Library has digitized several years of sheet music from a publication called Musikaliskt Tidsfördrif (“Musical pastime”). The first issue from 1790 contains a short Polonaise. I transcribed it in MuseScore and generated an audio file. It may be the first time it is played for two hundred years or so. You can listen to it here: Download the sheet music and mp3…

The first step to find out what users think

Empowering everyone to evaluate usability can improve the digital workplace. Here is how you take the first step with userpoll.io . Bad software makes a bad digital workplace Organizations that have been around for a few years typically have a large number of legacy systems. Ages ago, when they were created, it is likely that no one cared about their usability or design. Users were used to obeying…

Stockholm City Hall

Train ride

Haptic interface to e-government service - we need more APIs

A small hack to simplify the application for temporary parental benefit for care of children from the Swedish Social Insurance Agency (Försäkringskassan). Typically this involves multiple steps in a web browser. Now, moving a doll to a square and the computer will send relevant information to kindergarten and the social insurance agency.

Method and system for monitoring Lego hate on Twitter

(Cunningly illustrated using patent application art). A small Python script monitors twitter for the phrase “I hate lego”. Upon finding a matching tweet it sends a signal to an Arduino board that turns a servo pushing a small lego figurine over the edge of a table. Live example here (at approx 7:30). A hack for the Make All event in Stockholm.

Meanwhile, on the west coast of Sweden

A small crab attacked my GoPro camera.

Visualizing Statistics in Minecraft

Data about public sector spending is often hard to understand and compare. Statistics about government is often presented in tables. In this hack I have used open data from Eurostat (the EU statistics agency) about government expenditure for a set of countries and rendered sets of boxes in a Minecraft world. This makes it possible to explore the data by walking (flying) around the world. Boxes for…

The Queue Ticket UX

The queue ticket machine in Uppsala, Sweden.

The Art Museum of Sven-Harry

Publishing Open Data - Do you really need an API?

As open data is gaining momentum an increasing number of organizations are thinking about ways to make their data available for others to use. Here are some thought on how to approach design issues when making open government data available. TL;DR See if it is possible to publish your open data as file dumps instead of building advanced API:s that force entrepreneurs to integrate their apps with…

Harvard University Entrance Exam 1870

One can not help but wonder how many Harvard freshmen would pass this exam today. Click to see the Harvard admission document .

Data visualization tools

With the increasing availability of big/open data more people discover a need to make it understandable. One way of understanding data is by looking at it. As I have received a lot of questions lately here is a roundup of tools you can use to create visualizations of data. I have divided the tools into three groups: Libraries for using in your own web project. Client side applications that…

Plant boy

Plant boy

Barcelona Run

Keeping goals to yourself increase chances of completing them?

Did you think that by announcing your goals you would feel more pressure to work to achieve them? Apparently works the opposite way. When Intentions Go Public - Does Social Reality Widen the Intention-Behavior Gap? by Peter M. Gollwitzer et al.

Pointless Pong with Processing and the Kinect

I did a quick excursion using the Microsoft Kinect in Processing with Daniel Shiffmans excellent Kinect library . Source code for Kinect Pong is here .

Quotes from the Nato Software Engineering Conference in 1968

Sometimes we forget that other people have faced the same problems we face today in software development. These quotes are from the proceedings of the Nato Software Engineering conference in 1968 . On the management of software projects: Programming management will continue to deserve its current poor reputation for cost and schedule effectiveness until such time as a more complete understanding…

Changing energy behavior with real-time feedback

In this blog post I try to put household energy usage in a control theory context to see if we can find better ways to influence behavior. A lot of people are thinking about how we can reduce household energy use these days. Changing household energy use can be a challenge because to most people there is no working feedback loop available. Energy use is invisible. My own feedback loop consists of…

A laser scanner for photographic experiments

I want to see how shapes appear in long exposures when they are lit by a computer controlled laser beam. Check Flickr for updates.

Visualizing Eurostat data with the JIT

A small visualization hack for the Eurostat Hackday on december 16.

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…

Making FuzzyFinder work in MacVim 7.3

I have seen many posts that are having trouble getting FuzzyFinder to work in MacVim . In certain configurations you will see multiple errors “E806: using Float as a String”. This is because some locales make MacVim treat floating point numbers differently. Here is how I did to make it work on my system (OS X 10.6.4 and MacVim 7.3). As an added bonus we will map it to the Apple-T key…

A short summary of Codemocracy 2010

On september 4-5 we had our first open data hack day here in Sweden called Codemocracy . The event was a success (thank you Martin Svalin!) with close to 50 participants hacking away at various data sets. I did an intro on the state of open data but tried to keep it short so that everyone could start coding as soon as possible. On Sunday there were 12 teams presenting their apps. Some of the teams…

Beta testing the UR TWEETS SUCK Tee

My son has the dubious pleasure of being the primary beta tester of T-shirt messages. This time it is the first draft of the model that will be called “Twat”. Turned out pretty OK… Also see the Ballmer Tee .

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…

Politiska partier på Twitter 2010 – ett analysunderlag

Hur använder politiska partier Twitter som kommunikationskanal? Är de där för syns skull, finns det riktiga människor bakom kontot och deltar de i dialog? Genom att hämta data från Twitters API (ett slags gränssnitt för datorer där man kan läsa ner den öppet synliga information som finns på Twitter) kan man sammanställa information på ett sätt som förhoppningsvis gör att det blir lättare att…

Social Media in the Swedish Public Sector

Andrew Krzmarzick , Govloop community manager, asked me which swedish government agencies are using social media to communicate with citizens. The twitter message space is too short for an answer so here is a more thorough reply. I will specifically look at Twitter which seems to be gaining popularity in the swedish public sector. Use of social media tools in the public sector is in its infancy in…

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.

Dear DHL (and all other logistics companies)

Dear DHL (and other logistics companies because you tend to behave exactly the same). How is it that you are able to move my package from the UK to Sweden fast as hell but spend several days trying to move it from your terminal to my home address in the same city? Visa DHL delivery på en större karta Like most people living in Stockholm (and other cities I guess) I live in an apartment building to…

The case for uninterrupted work

Ho do you manage your interruptions? The myth of multitasking : … [a] research study, funded by Hewlett-Packard and conducted by the Institute of Psychiatry at the University of London, that found, “Workers distracted by e-mail and phone calls suffer a fall in IQ more than twice that found in marijuana smokers.” Stanford study: Cognitive control in media multitaskers : Results showed that…

Opengov.se launched

Says the Open Government Working Group: The Internet is the public space of the modern world, and through it governments now have the opportunity to better understand the needs of their citizens and citizens may participate more fully in their government. Information becomes more valuable as it is shared, less valuable as it is hoarded. Open data promotes increased civil discourse, improved public…

Rails vs Grails vs Django models

Coming back to Rails after being away from some time in Django land I discovered a huge difference in how Rails, Grails and Django treats your models. In Django and Grails you can look at a model class and see all the properties it has: [python] class Organization(models.Model): name = models.CharField(max_length=255) url = models.URLField(verify_exists=False) orgtype = models.ForeignKey(OrgType)…

Remixing Youtube

An interesting approach to chains of copyright but these are really interesting. None of the participants were involved in making these songs. At the same time all of them were. A guess is that remixes like these will become more and more popular. Where can I buy these songs? Who will get paid? More information at http://thru-you.com/

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.

Integrating Yahoo Search in a Django site in 5 easy steps

I have been experimenting with various search options for the eutveckling.se site for a while. Google Custom Search is nice and very fast, but the number of ads appearing in the search result page makes it difficult for users to separate result items from ads. (Update: I am sticking with Google Custom Search until I figure out how to get Yahoo search to present proper excerpts). I am a fast reader…

Twitter synchronicity

Everyone is celebrating this friday in a different way, apparently:

What Sun Should Do

Tim Bray has an interesting post titled What Sun Should Do where he lists some suggestions. I have been thinking about Sun for a while and how my own image of the company has changed over the years. A long time ago I was working for Cambridge Technology Partners (later acquired by Novell). We did a lot of interesting projects, some of which were deployed on Sun hardware. At that time (around…

The Gnostic Nihilist

Modelling by Niklas Lindström who also knows a lot about SPARQL, RDF and Brilliance .