<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Trouble With Dreams &#187; internet</title>
	<atom:link href="http://troublewithdreams.com/category/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://troublewithdreams.com</link>
	<description></description>
	<lastBuildDate>Thu, 05 Jan 2012 10:02:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Last.fm Explorer</title>
		<link>http://troublewithdreams.com/2011/01/30/last-fm-explorer/</link>
		<comments>http://troublewithdreams.com/2011/01/30/last-fm-explorer/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 21:54:45 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[scrobbler]]></category>
		<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=432</guid>
		<description><![CDATA[A note to say that a successor to Historical Charts is available at twothreefall.co.uk/lastfmexplorer.  Redesign and restructure aside, new features alongside the charts that went before include:

Interactive charts and plots of weekly playcounts
Charts for only new artists
Information about extreme weeks

For an example see what it does with my data.
I&#8217;m pleased with how it&#8217;s turned [...]]]></description>
			<content:encoded><![CDATA[<p>A note to say that a successor to <a href="/scrobbler">Historical Charts</a> is available at <a href="http://twothreefall.co.uk/lastfmexplorer">twothreefall.co.uk/lastfmexplorer</a>.  Redesign and restructure aside, new features alongside the charts that went before include:</p>
<ul>
<li>Interactive charts and plots of weekly playcounts</li>
<li>Charts for only new artists</li>
<li>Information about extreme weeks</li>
</ul>
<p>For an example see what it does with <a href="http://twothreefall.co.uk/lastfmexplorer/user/aradnuk">my data</a>.</p>
<p>I&#8217;m pleased with how it&#8217;s turned out.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2011/01/30/last-fm-explorer/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Do not read this title</title>
		<link>http://troublewithdreams.com/2010/06/02/do-not-read-this-title/</link>
		<comments>http://troublewithdreams.com/2010/06/02/do-not-read-this-title/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 11:12:25 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[silly]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=407</guid>
		<description><![CDATA[This signature is at the bottom of every email from a company I&#8217;m in contact with at work, emphasis mine:
This e-mail may be confidential and privileged.  Do not open it if you are in any doubt that you are the intended recipient.  You must scan this e-mail and any attachments for the presence [...]]]></description>
			<content:encoded><![CDATA[<p>This signature is at the bottom of every email from a company I&#8217;m in contact with at work, emphasis mine:</p>
<blockquote><p>This e-mail may be confidential and privileged.  <b>Do not open it if you are in any doubt that you are the intended recipient.</b>  You must scan this e-mail and any attachments for the presence of viruses or any other unwelcome content.  This e-mail must be read in conjunction with the important legal notice at &#8230;.. </p></blockquote>
<p>I don&#8217;t understand the complete misunderstanding of email/technology you need to deem silly things like this legally useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2010/06/02/do-not-read-this-title/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django experiments</title>
		<link>http://troublewithdreams.com/2010/04/05/django-experiments/</link>
		<comments>http://troublewithdreams.com/2010/04/05/django-experiments/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 22:44:53 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[last.fm]]></category>
		<category><![CDATA[scrobbler]]></category>
		<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=337</guid>
		<description><![CDATA[I&#8217;ve been playing about with Django and Last.fm data, intended as an eventual upgrade to historical charts.  It&#8217;s fun .. I now know I play most music in March and November (university deadline time!), that my top three artists of 2010 so far are Animal Collective, Grizzly Bear and The Delgados, and that my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing about with Django and Last.fm data, intended as an eventual upgrade to <a href="/scrobbler"/>historical charts</a>.  It&#8217;s fun .. I now know I play most music in March and November (university deadline time!), that my top three artists of 2010 so far are <a href="http://www.last.fm/music/Animal Collective">Animal Collective</a>, <a href="http://www.last.fm/music/Grizzly Bear">Grizzly Bear</a> and <a href="http://www.last.fm/music/The Delgados">The Delgados</a>, and that my favourite three discoveries are <a href="http://www.last.fm/music/Starless &#038; Bible Black">Starless &amp; Bible Black</a>, <a href="http://www.last.fm/music/RM Hubbert">RM Hubbert</a> and <a href="http://www.last.fm/music/Soweto Kinch">Soweto Kinch</a>.</p>
<p>I also discovered that using a foreign key of an object returned by a Django QuerySet as a dictionary key prompts Django to look the actual data up.  I had something like the following:</p>
<blockquote><p><code>class WeekData(models.Model):<br />
&nbsp;&nbsp;&nbsp;&nbsp;artist = models.ForeignKey(Artist)<br />
&nbsp;&nbsp;&nbsp;&nbsp;plays  = models.PositiveIntegerField()<br />
&nbsp;&nbsp;&nbsp;&nbsp;..</code><br />
<code><br />
tracking = defaultdict(int)<br />
for week in WeekData.objects.all():<br />
&nbsp;&nbsp;&nbsp;&nbsp;tracking[week.artist] += week.plays<br />
</code>
</p></blockquote>
<p>The dictionary update was taking <em>ages</em>.  Confused, I enabled Mysql&#8217;s logging and discovered 25,000 lines of the following..</p>
<blockquote><p>
<code>SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 22<br />
SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 23<br />
SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 24<br />
SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 25</code>
</p></blockquote>
<p>At which point I realised that using <code>week.artist</code> as the key here looks up the artist <em>every</em> time, meaning 25,000 useless database queries and a really, really slow function.  Perhaps I was being too hopeful in my expectation that Django would be clever.</p>
<p>Changing the last line to:</p>
<blockquote><p>
<code>tracking[week.artist_id] += week.plays</code></p></blockquote>
<p>sped the function up by a factor of ten and lets me produce images like this in reasonable time:</p>
<p><img src="http://troublewithdreams.com/sometimesiwrite/wp-content/uploads/2010/04/tophist-snippet.png" alt="" title="tophist-snippet" class="aligncenter size-full wp-image-345" /></p>
<p>It&#8217;s showing which artists occupy which chart positions as the weeks go by.  The dark black line is for Fleet Foxes .. seems I went pretty mad for them :o</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2010/04/05/django-experiments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ask Lisa</title>
		<link>http://troublewithdreams.com/2009/07/26/ask-lisa/</link>
		<comments>http://troublewithdreams.com/2009/07/26/ask-lisa/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 14:20:03 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[silly]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=295</guid>
		<description><![CDATA[Noticed National Rail has a &#8216;virtual assistant&#8216;, sceptically wondered how bad it could be:

Rejected by a natural language processor!  That&#8217;ll teach me for being sceptical.
]]></description>
			<content:encoded><![CDATA[<p>Noticed National Rail has a &#8216;<a href="http://lisa.nationalrail.co.uk/NREBot/">virtual assistant</a>&#8216;, sceptically wondered how bad it could be:</p>
<p><img src="http://troublewithdreams.com/sometimesiwrite/wp-content/uploads/2009/07/ask-lisa1.jpg" alt="ask-lisa" title="ask-lisa" width="300" height="416" class="aligncenter size-full wp-image-298" /></p>
<p>Rejected by a natural language processor!  That&#8217;ll teach me for being sceptical.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2009/07/26/ask-lisa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sunburn</title>
		<link>http://troublewithdreams.com/2009/06/11/sunburn/</link>
		<comments>http://troublewithdreams.com/2009/06/11/sunburn/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 22:05:35 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[last.fm]]></category>
		<category><![CDATA[scrobbler]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=271</guid>
		<description><![CDATA[Exams are over, the sun came and went, I got a first (hurrah!), a job for a couple of months and now it&#8217;s just .. working out what now? Completing Chrono Trigger is my first priority :D
Spent some time moving the last.fm charts thing to Python, because Python is tasty, PHP is clumsy, and matplotlib [...]]]></description>
			<content:encoded><![CDATA[<p>Exams are over, the sun came and went, I got a first (hurrah!), a job for a couple of months and now it&#8217;s just .. working out what now? Completing Chrono Trigger is my first priority :D</p>
<p>Spent some time moving the <a href="/scrobbler">last.fm charts</a> thing to Python, because Python is tasty, PHP is clumsy, and <a href="http://matplotlib.sourceforge.net/">matplotlib</a> is a superb piece of kit.</p>
<p>Here&#8217;s a histogram of the number of tracks I&#8217;ve listened to each week for the last few years:</p>
<p><img src="http://troublewithdreams.com/sometimesiwrite/wp-content/uploads/2009/06/last-fm-histogrampng.png" alt="last-fm-histogrampng" title="last-fm-histogrampng" width="516" height="394" class="aligncenter size-full wp-image-285" /></p>
<p>(<em>x</em> is the number of tracks in a week.)  I looked at a few friends&#8217; and there seemed quite a split between those roughly following a Gaussian distribution and those following something rather more exponential.  I should experiment with different features of matplotlib, maybe narrow those bins a little.  I&#8217;ve lots of little plans for other graphs and combinations.</p>
<hr />
<p>Finally, there&#8217;s a great little piece about a quirk of the number 1/89 <a href="http://www.geom.uiuc.edu/~rminer/1over89/">here</a>.  Sum the numbers of the Fibonacci Sequence in the following manner:</p>
<blockquote>
<pre>  .01
  .001
  .0002
  .00003
  .000005
  .0000008
  .00000013
  .000000021
  .0000000034
  .00000000055
  .000000000089
  .0000000000144
        .
    +   .
        .
----------------
  .01123595505...    = 1/89</pre>
</blockquote>
<p>The link has an outline proof about why it&#8217;s true.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2009/06/11/sunburn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Charts update</title>
		<link>http://troublewithdreams.com/2009/03/24/charts-update/</link>
		<comments>http://troublewithdreams.com/2009/03/24/charts-update/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 13:15:09 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[last.fm]]></category>
		<category><![CDATA[scrobbler]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=256</guid>
		<description><![CDATA[Just a note to say I updated Historical Charts to take advantage of Last.fm automatically correcting misspelled info.
]]></description>
			<content:encoded><![CDATA[<p>Just a note to say I updated <a href="/scrobbler">Historical Charts</a> to take advantage of Last.fm automatically correcting misspelled info.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2009/03/24/charts-update/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Hidden Quotes</title>
		<link>http://troublewithdreams.com/2009/02/26/hidden-quotes/</link>
		<comments>http://troublewithdreams.com/2009/02/26/hidden-quotes/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 00:04:26 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[quotes]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=244</guid>
		<description><![CDATA[Take a look at the URLs used to make the charts at the bottom of this page.
ithankYouGodformostthisamazingdayfortheleapinggreenlyspiritsof
treesandabluetruedreamofskyandforeverythingwhichisnatural
whichisinfinitewhichisyesithankYouGodformostthisamazingday
fortheleapinggreenlyspiritsoftreesandabluetruedreamofskyand
foreverythingwhichisnaturalwhichisinfinitewhichisyeseecummings
It&#8217;d be even cooler if the chart was at all attractive..

]]></description>
			<content:encoded><![CDATA[<p>Take a look at the URLs used to make the charts at the <a href="http://code.google.com/apis/chart/formats.html#granularity">bottom of this page</a>.</p>
<blockquote><p>ithankYouGodformostthisamazingdayfortheleapinggreenlyspiritsof<br />
treesandabluetruedreamofskyandforeverythingwhichisnatural<br />
whichisinfinitewhichisyesithankYouGodformostthisamazingday<br />
fortheleapinggreenlyspiritsoftreesandabluetruedreamofskyand<br />
foreverythingwhichisnaturalwhichisinfinitewhichisyeseecummings</p></blockquote>
<p>It&#8217;d be even cooler if the chart was at all attractive..</p>
<p><img src="http://chart.apis.google.com/chart?cht=lc&#038;chs=200x100&#038;chd=s:ithankYouGodformostthisamazingdayfortheleapinggreenlyspiritsoftreesandabluetruedreamofskyandforeverythingwhichisnaturalwhichisinfinitewhichisyesithankYouGodformostthisamazingdayfortheleapinggreenlyspiritsoftreesandabluetruedreamofskyandforeverythingwhichisnaturalwhichisinfinitewhichisyeseecummings&#038;chxt=x,y&#038;chxl=1:|Apr|May|June|1:||50+Kb" /></p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2009/02/26/hidden-quotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Mystery Solved</title>
		<link>http://troublewithdreams.com/2009/02/05/a-mystery-solved/</link>
		<comments>http://troublewithdreams.com/2009/02/05/a-mystery-solved/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 18:59:29 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[last.fm]]></category>
		<category><![CDATA[radiohead]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=229</guid>
		<description><![CDATA[Forever ago, in the glory-days of Napster and Kazaa, I discovered Radiohead (hurrah!) and amidst the 28.8kb/s hunt for b-sides and rarities on other people&#8217;s computers found myself in possession of a song called Cogs.  It was a weird and haunting song that seemed to fit right into the Kid A/Amnesiac theme but didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Forever ago, in the glory-days of Napster and Kazaa, I discovered Radiohead (hurrah!) and amidst the 28.8kb/s hunt for b-sides and rarities on other people&#8217;s computers found myself in possession of a song called Cogs.  It was a weird and haunting song that seemed to fit right into the Kid A/Amnesiac theme but didn&#8217;t fit with <a href="http://www.greenplastic.com">GreenPlastic</a>&#8217;s suggestion that Cogs was an alternate title for <a href="http://www.greenplastic.com/lyrics/lastflowers.php">Last Flowers</a>.</p>
<p>It became this anomaly in my collection, Radiohead but not, and I forgot about it until today, when I thought I&#8217;d scan it with Last.fm&#8217;s <a href="http://www.last.fm/user/nova77LF/journal/2007/10/12/4kaf_fingerprint_(command_line)_client">command line fingerprinter</a> which told me:</p>
<blockquote><pre> &lt;track confidence="0.245223"&gt;
     &lt;artist&gt;Ennio Morricone&lt;/artist&gt;
     &lt;title&gt;Man With A Harmonica&lt;/title&gt;
     &lt;url&gt;http://www.last.fm/music/Ennio+Morricone/_/Man+With+A+Harmonica&lt;/url&gt;
 &lt;/track&gt;</pre>
</blockquote>
<p>Which wasn&#8217;t what I expected at all.</p>
<p>But now a six-year odd mystery has been solved and I&#8217;d love to know how the fingerprinter works.  Probably some hairy maths .. it&#8217;s impressive it can figure these things, especially now they&#8217;re automatically redirected.</p>
<p>It&#8217;s still an excellent song.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2009/02/05/a-mystery-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Last.fm Historical Charts v2</title>
		<link>http://troublewithdreams.com/2008/08/21/lastfm-historical-charts-v2/</link>
		<comments>http://troublewithdreams.com/2008/08/21/lastfm-historical-charts-v2/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 23:21:34 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[last.fm]]></category>
		<category><![CDATA[scrobbler]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=200</guid>
		<description><![CDATA[I updated my historical charts program to allow album and track charts, make it utf8 compatible and give it a graphical overhaul too, hurrahs all round.
Same process as before &#8211; when you first create each kind of chart it&#8217;ll take a while to fetch your data, subsequent charts will be created a whole lot faster. [...]]]></description>
			<content:encoded><![CDATA[<p>I updated my historical charts program to allow album and track charts, make it utf8 compatible and give it a graphical overhaul too, hurrahs all round.</p>
<p>Same process as before &#8211; when you first create each kind of chart it&#8217;ll take a while to fetch your data, subsequent charts will be created a whole lot faster.  Eventually I&#8217;ll make a script to purge the data stored for anybody who hasn&#8217;t used the program in a couple of months so keep popping back if you get fed up with the waits.</p>
<p>As always comments are welcome.  Oh and suggestions for a better name too..</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2008/08/21/lastfm-historical-charts-v2/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>LastFM Charts</title>
		<link>http://troublewithdreams.com/2008/03/18/lastfm-charts/</link>
		<comments>http://troublewithdreams.com/2008/03/18/lastfm-charts/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 03:05:34 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[last.fm]]></category>
		<category><![CDATA[scrobbler]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/2008/03/18/lastfm-charts/</guid>
		<description><![CDATA[I made my program to generate charts for any date range from LastFM data available to anybody a few weeks ago and it&#8217;s had a positive response, being included on build.last.fm as an interesting extra kindofthing.  Though still nobody has feedback or suggestions.  Maybe in itself it&#8217;s relatively complete and I should think [...]]]></description>
			<content:encoded><![CDATA[<p>I made my <a href="/scrobbler/">program to generate charts for any date range</a> from LastFM data <a href="http://www.last.fm/user/aradnuk/journal/2008/02/23/656429/">available to anybody</a> a few weeks ago and it&#8217;s had a positive response, being included on <a href="http://build.last.fm">build.last.fm</a> as an interesting extra kindofthing.  Though still nobody has feedback or suggestions.  Maybe in itself it&#8217;s relatively complete and I should think of other, related bits and pieces.  Anybody?</p>
<p>I&#8217;ve made it automatically updating, so you only need to add your data once the very first time you visit, and after that it&#8217;ll check whether there should be new charts available.  Maybe it should only happen a few days into the week &#8211; LastFM never get the charts out on time after all..</p>
<p>That and I added a few extra quick links, to 3/6/12/24 months previous.  No more &#8216;wait a month for charts to refresh&#8217; ;-).  I should totally see if I can make this into a greasemonkey script..</p>
<p>PHP&#8217;s <code>strtotime</code> function is no end of brilliance &#8211; <code>strtotime("-6 months")</code> and <code>strtotime("last sunday")</code> are genius conceptions.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2008/03/18/lastfm-charts/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

