Spotify Playlist Generator

I’ve made a Spotify Playlist Generator that uses Last.fm to find songs by similar artists.

Download the Playlist Generator or as a zip with the instructions.

It’s Windows only (for now) and it requires the .NET framework v3.5 or greater.
The source code is available under the GPLv3 if you would like to build on it.

Playlist Generator Screen Shot

Playlist Generator Screen Shot

Instructions:

  1. Enter an artist’s name in the artist box.
  2. Click the button and wait until completion.
  3. Select all of the links then drag into a Spotify playlist.

Listen and enjoy!

Advanced:
Select a few tracks and paste the Spotify track links into the large box. Leave the artist box empty and then click for a compilation.

Super Advanced:
The generator will try to auto detect your region but you can override it and other settings. Create a shortcut to the executable, go to the target in the properties and add the 2 character ISO country code after a space: e.g. PlaylistGenerator.exe GB. You can also modify the maximum number of artists: e.g. PlaylistGenerator.exe GB 49. And even the maximum number of tracks per artist: e.g. PlaylistGenerator.exe GB 49 3. If you modify these then they are displayed in the main window when you first run it.

Thanks to http://www.doogal.co.uk/spotify.php and http://code.google.com/p/lastfm-sharp/

“This product uses a SPOTIFY API but is not endorsed, certified or otherwise approved in any way by Spotify. Spotify is the registered trade mark of the Spotify Group.”

MonitorES (Energy Saver) Tool

I came across this tool and think it’s awesome. I’ve been using it for a while and it works well.

MonitorES is a small windows utility that turns off your monitor when you lock your machine. It can also pause all running media programs and play when you return.

http://code.google.com/p/monitores/

Alternatively, there is MonitorES Lite for low end & corporate machines which only has the turn off monitor feature and is also available as an MSI for easy deployment.

Outlook 2010 Email Delayed Send

Ever sent an email then instantly regretted it or hit Ctrl-Enter when you actually meant to hit Ctrl-K (check names)? You could just add a gibberish recipient to a draft email to prevent it sending, but there must be another way. Here is how to add a delay so that an email stays in your Outlook outbox for a minute before being sent.

From the Rules button on the home tab of the Outlook ribbon click Create Rule… then follow the pictures.

Remote Desktop Max Connections Fix

If you have the problem of not being able to log onto a server because it has exceed the maximum number of connections (usually 2) here is an easy fix.

Open a command prompt and type:
query user /server:{YOUR SERVER NAME}

You will get something back like this:

USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
user1   1 Disc none 2011-03-10 20:25
user2 rdp-tcp#121 2 Active 6 2011-03-20 11:29

You can then either ask the users to log off or you can forcibly log them off by typing:
logoff {ID FROM ABOVE} /server:{YOUR SERVER NAME}

If the query user syntax doesn’t work (e.g. Win XP) you can type:
qwinsta /server:{YOUR SERVER NAME}

Home-made Soldering Iron Holder

I made this soldering iron holder a while ago. Here’s how to make one yourself from things you probably have lying around. Much cheaper than a bought one and more fun:

You will need:

  • An old hard drive
  • A wire coat hanger
  • A kitchen sponge
  • Assorted tools

Steps:

  1. Gut the hard drive and keep the cast base
  2. Cut and straighten the coat hanger
  3. Wrap coat hanger around a shaft to form a coil
  4. Attach hanger to base through existing holes
  5. Solder end of hanger to form a closed loop
  6. Cut sponge to size (smaller as it will swell when wet)

Here are some pics:

Bank Holiday Calendar File

The next 2 years are a bit special, as in the UK we get a couple of extra bank holidays (Royal Wedding and Diamond Jubilee). However, a lot of calendar software doesn’t realise this.

I’ve put together an iCalendar (.ics) file from the dates on the official page of the bank holidays for England and Wales. Download it and import into whatever you use (Outlook, iCal, Google etc.).

Energy Saving Plug and Water Widget Review

I applied for a free Energy Saving Plug and Water Widget through a government sponsored scheme and here are my thoughts.

Energy Saving Plug

“Households in the UK now spend around 10% of their electricity bill on standby power annually, with the average household having up to 12 gadgets left on standby at any one time (source: Energy Saving Trust). Leaving items on standby wastes energy and money…”

I was very satisfied with the plug although there are some caveats:

  • It’s not suitable for use with broadband modems;
  • Should not be used with a PVR/Sky+/HD box etc.;
  • The appliances need to be close together; and
  • You can’t switch it more than once a minute (to protect the items).

The plug was not very complicated to install and after a while you don’t notice it anymore. It just works. I’ve fitted it to our lounge entertainment system so it can be remotely switched off. This also makes for an excellent prank if you don’t like what’s on!

I have a meter fitted to the socket and to the main feed so I’ll monitor if the draw of the plug is outweighed by the power saving from the off appliances.

Water Widget

“One fifth of a household’s carbon footprint already comes just from heating water (source: Act On CO2). This clever gadget takes less than 5 minutes to fit and reduces the amount of water used by up to 70% whilst still maintaining the performance of your shower…”

I’ve fitted the Water Widget to my shower which was very easy. It works by sucking air into the water feed which aerates the water and reduces the amount of water used whilst maintaining the same volume of fluid. Water didn’t flow out of the hole indicating that it is appropriate for use with my shower as the flow rate is high enough. The flow rate of my shower has not been reduced, but it does make a different sound now (which spooked my housemates).

We don’t have a water meter so it will be hard to measure the flow. I can monitor the gas meter to see if heating less water reduces the amount of gas we use, but it will be difficult to isolate the data from the increase due to the bloody freezing weather lately!

For more info check out: http://www.littlefoot.co.uk/

Coffee Order Template

I made this coffee order template for taking orders when doing a coffee run. It’s designed for Costa but should work well at other coffee shops too. Just print it out and then put a tally in each box.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

MS Office File Shrink Tool

I created some software which reduces the size of Microsoft Office 2007+ files (.xlsx, .docx, etc.) called Office Shrink. It’s written in batch and makes use of 7-Zip, but was mainly an excuse to play with NSIS (Nullsoft Scriptable Install System). You could build this as a compiled application but batch is more flexible and easier to change for simple tasks. You can download the source code if you want to modify/build the installer yourself.

The tool decompresses an Office 2007 file and repacks it smaller. It then optionally zips the resulting file. The compression is lossless and the file will work as normal. This can be done because the default Office compression is optimised for speed and not for size.

Installation:
Run the installer executable from within the zip file
Click Allow at the UAC prompt (if enabled)
Read the introduction
Click OK
Select if start menu shortcuts are not required
Click Next
Change the installation folder if desired
Click Install
Click Close

Two new options are added to the windows explorer right click menu for Office 2007 files: “Shrink” and “Shrink and Zip”.

How to use:
Ensure the Office 2007 file to compress is not open
Right click the Office 2007 file in windows explorer
Click “Shrink” to shrink the file
or click “Shrink and Zip” to shrink the file and also zip the shrunk file

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

University Final Year Project (CBIR)

I’ve put up my University final year project (Scalable Visual Descriptors for Content Based Image Retrieval) which I wrote in LaTeX. Please keep in mind that this was written in early 2007.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

Abstract
This project investigated the effects of scaling images with JPEG2000 emulation software on a CBIR system based on MPEG-7. A CBIR system was built that consisted of indexing and retrieval. The performance of the system was evaluated with standard metrics.
Various different versions of images were created with a process that simulates the behaviour of JPEG2000 with a wavelet transform. The resolution and compression quality of a selection of images were reduced and then MPEG-7 descriptors were extracted from them. The descriptors for various resolutions and qualities for the same image were then compared. Three MPEG-7 descriptors were used. They were the colour layout descriptor, scalable colour descriptor and edge histogram descriptor.
It was found that as the resolution and quality decreased, the descriptors became less similar to the originals; a trend which all descriptors were observed to follow. The colour layout descriptor was found to be the least sensitive to changes in resolution and quality.
It was found that not all of the data from an image is required in order to generate descriptors that can be used in image searches. The results of these searches, although not as good as ones done with the original images, provide satisfactory image matching.
Reducing the amount of data could be useful in environments where bandwidth or storage are scarce, such as is the case with mobile devices. Further work, expanding on these findings, has been recommended.