<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Musings and musicby Matt Kaufman
matt -at- mattkaufman.comFacebook PageSoundCloud Page

If you enjoy the music, please consider a donation.

</description><title>Kompato</title><generator>Tumblr (3.0; @kompato)</generator><link>http://www.kompato.com/</link><item><title>Giving It Away</title><description>&lt;p&gt;&lt;span&gt;I&amp;#8217;ve decided to make all my music freely downloadable.  If you don&amp;#8217;t see a download link in the SoundCloud widget on this site, you can get the song from the &lt;a href="http://soundcloud.com/kompato" target="_blank"&gt;Kompato SoundCloud Page&lt;/a&gt;.&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span&gt;If you enjoy the songs, please consider donating whatever you feel is fair by clicking the donate link on the right&lt;/span&gt;&lt;span&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks, and enjoy!&lt;/span&gt;&lt;/p&gt;</description><link>http://www.kompato.com/post/51847143475</link><guid>http://www.kompato.com/post/51847143475</guid><pubDate>Fri, 31 May 2013 21:40:20 -0400</pubDate></item><item><title>Suspicion leads down dark paths…</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F93975841&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Suspicion leads down dark paths…&lt;/p&gt;</description><link>http://www.kompato.com/post/51846653753</link><guid>http://www.kompato.com/post/51846653753</guid><pubDate>Fri, 31 May 2013 21:33:09 -0400</pubDate><category>music</category></item><item><title>On a night when the energy is high, the music and the city...</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F89795079&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;On a night when the energy is high, the music and the city lights share their intensity.&lt;/p&gt;</description><link>http://www.kompato.com/post/49371611620</link><guid>http://www.kompato.com/post/49371611620</guid><pubDate>Wed, 01 May 2013 14:06:12 -0400</pubDate><category>music</category></item><item><title>Even in the midst of stressful times there are moments of beauty...</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F87773581&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Even in the midst of stressful times there are moments of beauty to savor. Tension filled bass and drums are juxtaposed against gentle piano and strings.&lt;/p&gt;</description><link>http://www.kompato.com/post/48608547170</link><guid>http://www.kompato.com/post/48608547170</guid><pubDate>Mon, 22 Apr 2013 08:40:02 -0400</pubDate><category>music</category></item><item><title>Downtempo song, now available on iTunes.  Featuring Dan Lewis on...</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F86731978&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Downtempo song, now available on iTunes.  Featuring &lt;a href="http://thetomorrowfile.bandcamp.com/" target="_blank"&gt;Dan Lewis&lt;/a&gt; on guitar.&lt;/p&gt;</description><link>http://www.kompato.com/post/46754304960</link><guid>http://www.kompato.com/post/46754304960</guid><pubDate>Mon, 08 Apr 2013 12:00:00 -0400</pubDate><category>music</category></item><item><title>Chillout song produced with Ableton Live 9 + Push.
UPDATE: Now...</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F85613075&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Chillout song produced with Ableton Live 9 + Push.&lt;/p&gt;
&lt;p&gt;UPDATE: Now available on &lt;a href="https://itunes.apple.com/us/album/let-it-ride/id631246218?i=631246578"&gt;iTunes&lt;/a&gt;.&lt;/p&gt;</description><link>http://www.kompato.com/post/46753924320</link><guid>http://www.kompato.com/post/46753924320</guid><pubDate>Sun, 31 Mar 2013 08:49:00 -0400</pubDate><category>music</category></item><item><title>An orchestral piece I’m working on.</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F84729986&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;An orchestral piece I’m working on.&lt;/p&gt;</description><link>http://www.kompato.com/post/46282667473</link><guid>http://www.kompato.com/post/46282667473</guid><pubDate>Mon, 25 Mar 2013 17:59:00 -0400</pubDate><category>music</category></item><item><title>Granular synthesis experiment. The drone at the start of the...</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F85001502&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Granular synthesis experiment. The drone at the start of the piece is a classical acoustic guitar playing E minor, run through granular synthesis. The kick drum is a sampled hit against a padded piano bench, run through a bass amp and reverb.&lt;/p&gt;</description><link>http://www.kompato.com/post/46754772539</link><guid>http://www.kompato.com/post/46754772539</guid><pubDate>Sat, 23 Feb 2013 00:00:00 -0500</pubDate><category>music</category></item><item><title>Original house song.</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F72350477&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Original house song.&lt;/p&gt;</description><link>http://www.kompato.com/post/46754582988</link><guid>http://www.kompato.com/post/46754582988</guid><pubDate>Sun, 23 Dec 2012 00:00:00 -0500</pubDate><category>music</category></item><item><title>Short, simple piano and vocal piece. Vocals are placeholders, as...</title><description>&lt;iframe src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F55448953&amp;liking=false&amp;sharing=false&amp;origin=tumblr" frameborder="0" allowtransparency="true" class="soundcloud_audio_player" width="500" height="116"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Short, simple piano and vocal piece. Vocals are placeholders, as I am no singer.&lt;/p&gt;</description><link>http://www.kompato.com/post/46754715995</link><guid>http://www.kompato.com/post/46754715995</guid><pubDate>Sun, 05 Aug 2012 00:00:00 -0400</pubDate><category>music</category></item><item><title>In-Memory Zip in Python</title><description>&lt;p&gt;Below is a post of mine from May of 2008 on zipping in memory with Python, re-posted since Posterous is shutting down.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;I recently noticed that there is a for-pay component available to zip files in-memory with Python. Considering this is something that should be free, I threw together the following code. It has only gone through very basic testing, so if anyone finds any errors, let me know and I&amp;#8217;ll update this.&lt;/p&gt;
&lt;pre&gt;import zipfile
import StringIO

class InMemoryZip(object):
    def __init__(self):
        # Create the in-memory file-like object
        self.in_memory_zip = StringIO.StringIO()

    def append(self, filename_in_zip, file_contents):
        '''Appends a file with name filename_in_zip and contents of 
        file_contents to the in-memory zip.'''
        # Get a handle to the in-memory zip in append mode
        zf = zipfile.ZipFile(self.in_memory_zip, "a", zipfile.ZIP_DEFLATED, False)

        # Write the file to the in-memory zip
        zf.writestr(filename_in_zip, file_contents)

        # Mark the files as having been created on Windows so that
        # Unix permissions are not inferred as 0000
        for zfile in zf.filelist:
            zfile.create_system = 0        

        return self

    def read(self):
        '''Returns a string with the contents of the in-memory zip.'''
        self.in_memory_zip.seek(0)
        return self.in_memory_zip.read()

    def writetofile(self, filename):
        '''Writes the in-memory zip to a file.'''
        f = file(filename, "w")
        f.write(self.read())
        f.close()

if __name__ == "__main__":
    # Run a test
    imz = InMemoryZip()
    imz.append("test.txt", "Another test").append("test2.txt", "Still another")
    imz.writetofile("test.zip")&lt;/pre&gt;</description><link>http://www.kompato.com/post/43805938842</link><guid>http://www.kompato.com/post/43805938842</guid><pubDate>Thu, 01 May 2008 00:00:00 -0400</pubDate><category>python</category></item></channel></rss>
