Categories
Koding

Fargelegg gamle sort-hvitt bilder fra kommandolinja i linux med Python

Jeg har tidligere skrevet om hvordan du kan fikse og rette opp et gammel scannet sort-hvitt bilde med Gimp og et nettsted som lar deg fargelegge bilder ved bruk av algoritmer. Men hvis du har mange gamle sort-hvitt bilder liggende på disken din, kan du med et lite Python-script automatisere fargeleggingen. Jeg utvidet et eksempelscript […]

Categories
analyse

Et år i farger

Se for deg at du står på ett sted i et helt år. Fra 1. januar til 31. desember. Du holder i hånden en termometer og et fargekart. På formiddagen 1. januar, den første dagen, gjør du en måling, noterer ned hvor mange grader celcius det var. Så ser du på fargekartet og finner en […]

Categories
Sound

Modem dialup sound slowed down 9000%

If you ever connected a computer to the Internet before everything was online all the time (pre-2000), you probably remember that you connected the computer to a phone line via a modem. This modem made an odd sound when connecting, that sounded like this: I’m not going into the details about what happens in that […]

Categories
matematikk

Self numbers and self primes

In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. A number N is said to be a self number if it cannot be written as m + the sum of digits of m for any m. To find out if a given number is a self number, the idea is […]

Categories
Koding

If my name was a number, is it perhaps a prime number?

My wife is reading a book at the moment: “The Curious Incident of the Dog in the Night-Time by Mark Haddon“ Sitting in our sofa, she read out aloud for me from one of the pages, something she knew I would enjoy: “If you see someone’s name and you give each letter a value from […]

Categories
matematikk

100 000 Pi (π) decimals vs. random numbers

I have previously written a post about how I decided to visualize 100k decimals of Pi, Tau and e with Python. To do that I chose a simple set of three rules that was repeated for each decimal digit; For each of the decimals: First, draw a tiny square and fill it with a color […]

Categories
python

Find taglines for any film at IMDb

Lots of times when I am watching a film, I get curious what the movie taglines are. I look it up at imdb.com, but that isn’t always so smart, as I might end up see more than I should. Who likes spoilers? That’s why I wrote this simple little script to to to IMDb for […]