SQLite3 databases get messy over time (especially if there’s churn on the database).
I’ve noticed that “vacuuming” them from time to time can speed up searching in Squeezebox Center… so I have the following cron job (as root):
file /var/lib/squeezeboxserver/cache/*.db | grep SQLite | cut -d: -f 1 | xargs -I % sqlite3 % vacuum
Hope that helps 🙂
We have a scanner with a document feeder (Officejet Pro 8500 A910), which is really useful, but it can’t deal with double sided documents… which is annoying 🙂
This perl script takes two PDF files created by first scanning the front pages (odd) in the correct order and then the back pages (even) in reverse order. This means that you don’t need to re-order the real pages, you just scan them face up then, when they’re done, turn the whole stack over and scan them again.
Seems to work a treat 🙂
Having been collecting river levels for various rivers for a few weeks via Munin, I thought I’d make a specific graph watching Canterbury. Luckily there are stations just upstream and just downstream of Canterbury on the Great Stour!
Isolating just these two datasets and plotting them results in:
Recently I’ve made available two little mini-projects…
If you find either of these useful and would like more motorways or rivers added, please let me know!
This morning I published (two) Wordles based on the content of my Twitter timeline for 2011 which I’ve been archiving to a SQLite database since July 2010.
- Export tweets
- Process into words
- Count word frequency
- Upload to Wordle
Wordle accepts data input in the form:
First output was:
This was a little skewed towards the various travel and weather related feeds I follow (@SEtrafficnews, @nationalrailenq, @NRE_SEastern, @SEplaying, @KentWeatherObs) so I then excluded them…
And finally… a Wordle of my
Two and a bit months ago, I started archiving my friends timeline on Twitter into a SQLite database for posterity (I didn’t really like the idea that it just vanishes after a while).
It then occurred to me earlier that I didn’t actually know how many tweets I read in two months… the answer appears to be over 40,000.
Posting this fact on twitter, the first reply I got was “how many are about sandwiches?” to which the answer is 39. Wow. What wonders 🙂
I thought about the only useful thing I could probably do in the short term was make a pretty graph of the rate of tweet flying past my friends timeline per day… so here it is:
Other interesting facts:
- @TelegraphNews accounts for 6% of the throughput
- 62 tweets contain the word “argh”
- 350 mentioned “facebook”
I may get around to thinking up new and more interesting stuff to do with this data later… maybe 🙂
Another “let’s just cook something and see what happens” moment occurred so I thought I’d better document it for future reference 🙂
- Red onion, diced
- A soft apple (Braeburn or alike), diced
- Pork steak
- Rosemary (fresh)
- Pork Stock
- New Potatoes
There are two options with cooking method, eat now (well, in a few hours) or eat later … for the former, I’d do the whole thing in a La Creuset-esque casserole dish and stick it in the oven but this time I’m doing it the night before to put in our slow cooker tomorrow morning so I’ve just used a deep, wide pan with a lid.
Fry the onion to get that going (5 minutes on medium heat) then add the rosemary, apple and carrots and fry for a few more minutes.
Place the steaks in the dish and cover with stock and top up with water so everything is (mostly) covered.
Cook for a few more minutes on the hob either transfer to the oven (at a guess, 180C for 60-90 minutes) or to the slow cooker for as long as you like 🙂
I plan to serve with new potatoes but it could go equally well with rice or plain cous-cous.
Will hopefully be able to update tomorrow with some idea of how it turned out……….
A while ago, I acquired a G4 Cube off Canterbury Freecycle. Having tried to install Tiger and Leopard on it (all the PPC media I could find) and neither working, I decided to try Ubuntu.
As it’s rather old (2001) and doesn’t have much memory in it (128M) and is only a 450MHz G4 (slow!) I thought I’d try the “alternate” XUbuntu. After some effort, I got this installed (trying off a USB stick cos the 9.10 installer is just over 700M and wouldn’t fit on my CD-Rs just didn’t work) so I went for the 9.04 xUbuntu installer which was only 650M… much nicer.
This installed ok, but then I couldn’t log in. Bummer.
Broke into the system (
init=/bin/bash saves the day once more) and tried resetting root’s password… failed.
Turned out (after a lot of anger and two reinstalls with various extra flags to the installer) that PAM doesn’t like having a date set before the epoch … 1904. It looks like the PowerPC had reset the system clock before to time began.
Then X … needed some extra hand-holding as I was just getting a blank black screen… http://ubuntuforums.org/showthread.php?t=772808 worked for me.
Having forced the time to be correct (2010 — over a hundred years in the future!) it all worked fine.
Dist-upgrading to 9.10 then “just worked”. Well, I say, “just worked” — it thought I was using ATI rather than the Rage 128 driver for X.
So now I have a reasonably nice looking (it’s Apple, after all) system, albeit old, but still useful 😀
Today, the VOSA released data pertaining to a Freedom of Information request from the BBC detailing the rates and reasons for vehicles failing the MOT Test in the UK
There’s a rather interesting report on the content of the data on the BBC news site but the only way to download the data is as a PDF from VOSA or as a Excel spreadsheet from the BBC. Both of these are not very parseable so I’ve converted them into a CSV and a MySQL dump file.
These files are not small… it’s over 12,600 rows in the following format:
- make varchar
- model varchar
- year int
- passes int
- failures int
- failrate float
- body int
- brakes int
- driverview int
- emissions int
- lights int
- identity int
- wheels int
- belts int
- steering int
- suspension int
- tyres int
- othercycles int
- controls int
- nottested int
The data is public, and the following files are released under the Creative Commons licence (see below for more info).
The two files available are:
I would be interested to hear of any interesting uses for this data, please feel free to comment below or let me know via Twitter (@fooflington)
Reworking of VOSA FoI data about MOT Test failures by Matthew Slowe is licensed under a Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License.
Based on a work at www.vosa.gov.uk.