<?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>Jure Cuhalev &#187; python</title>
	<atom:link href="http://www.jurecuhalev.com/blog/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jurecuhalev.com/blog</link>
	<description>In pursuit of The Idea</description>
	<lastBuildDate>Sat, 28 Jan 2012 22:22:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Koornk network graph with pretty pictures</title>
		<link>http://www.jurecuhalev.com/blog/2008/12/28/koornk-network-graph-with-pretty-pictures/</link>
		<comments>http://www.jurecuhalev.com/blog/2008/12/28/koornk-network-graph-with-pretty-pictures/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 22:33:33 +0000</pubDate>
		<dc:creator>Jure Cuhalev</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Graph theory]]></category>
		<category><![CDATA[koornk]]></category>
		<category><![CDATA[Social network]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.jurecuhalev.com/blog/?p=678</guid>
		<description><![CDATA[Continuing my saga of visualizing Koornk social network I decided that obvious next step is to map out who talks to who and how much. For this task I used excellent Python library NetworkX that uses pygraphviz to draw the pretty pictures in the end.
Just to explain what you&#8217;re looking at:

I downloaded all public conversations [...]
Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2009/04/16/personal-branding-social-media-and-pretty-pictures/' rel='bookmark' title='Personal branding, social media and pretty pictures'>Personal branding, social media and pretty pictures</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/12/26/visualizing-koornk-chatter/' rel='bookmark' title='Visualizing Koornk chatter'>Visualizing Koornk chatter</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/11/15/graphing-koornk/' rel='bookmark' title='Graphing Koornk'>Graphing Koornk</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Continuing my saga of visualizing Koornk social network I decided that obvious next step is to map out who talks to who and how much. For this task I used excellent Python library <a href="http://networkx.lanl.gov/">NetworkX</a> that uses <a href="http://networkx.lanl.gov/pygraphviz/">pygraphviz</a> to draw the pretty pictures in the end.</p>
<p>Just to explain what you&#8217;re looking at:</p>
<ul>
<li>I downloaded all public conversations from Koornk and filtered out to the ones that use @ somewhere to reference someone else</li>
<li>You need to all-together reference or be referenced 60 times to get on the list (70 people from 1606 made it)</li>
<li>From those 70 people, if two of them talked more then 40-times they got a line between each other</li>
<li>Line thickness is then calculated based on how much they talked to each other</li>
<li>Circle size around each person tells you their cumulative chatter towards others</li>
</ul>
<p>Fun statistic: about 22% of all message looked at (N=81990), contained @ reference</p>
<p><strong>Pretty pictures</strong></p>
<p style="text-align: center;">
<p style="text-align: center;">
<div id="attachment_679" class="wp-caption aligncenter" style="width: 563px"><a href="http://www.jurecuhalev.com/blog/wp-content/uploads/2008/12/chatter3.png"><img class="size-large wp-image-679  " title="Top down view of all the 70 people who made the cut (click for bigger version)" src="http://www.jurecuhalev.com/blog/wp-content/uploads/2008/12/chatter3-1023x755.png" alt="Top down view of all the 70 people who made the cut (click for bigger version)" width="553" height="408" /></a><p class="wp-caption-text">Top down view of all the 70 people who made the cut (click for bigger version)</p></div>
<p>It turns out that there&#8217;s a smaller group of very vocal people within this view, so we naturally want to see zoomed version:</p>
<p style="text-align: center;">
<div id="attachment_680" class="wp-caption aligncenter" style="width: 512px"><a href="http://www.jurecuhalev.com/blog/wp-content/uploads/2008/12/chatter4.png"><img class="size-large wp-image-680   " title="Who talks to who on Koornk and how much" src="http://www.jurecuhalev.com/blog/wp-content/uploads/2008/12/chatter4-1024x727.png" alt="Who talks to who on Koornk and how much (click for bigger version)" width="502" height="356" /></a><p class="wp-caption-text">Who talks to who on Koornk and how much (click for bigger version)</p></div>
<p style="text-align: left;"><strong>Lessons learned</strong></p>
<ul>
<li>It takes about two days to properly get a hang of NetworkX library to draw something like that. It doesn&#8217;t mean you know anything about <a class="zem_slink" title="Graph theory" rel="wikipedia" href="http://en.wikipedia.org/wiki/Graph_theory">graph theory</a>, but at least you can start drawing pretty pictures.</li>
<li>Pictures are fun, but next step is probably interactive Flash diagram that allows you to explore these relationship for yourself</li>
<li>Throwing around these data structures actually takes a few seconds on modern PC. Finally something meaningful for it to process.</li>
<li>I wonder how much work would be to properly plot something like this for a subset of <a class="zem_slink" title="Twitter" rel="homepage" href="http://twitter.com">Twitter</a> relationship if I maybe drink from their fire-hose long enough. Maybe <a class="zem_slink" title="Gnip" rel="homepage" href="http://gnipcentral.com">Gnip</a> guys can fill up a few Terabytes of Hard Drives with back log, if they have it and we start crunching this. (I&#8217;m  assuming that there&#8217;s already a post-graduate student somewhere that&#8217;s doing exactly this)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/816408bd-1031-4732-814a-d3ff0aa562cc/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=816408bd-1031-4732-814a-d3ff0aa562cc" alt="Reblog this post [with Zemanta]" /></a></div>
<p>Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2009/04/16/personal-branding-social-media-and-pretty-pictures/' rel='bookmark' title='Personal branding, social media and pretty pictures'>Personal branding, social media and pretty pictures</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/12/26/visualizing-koornk-chatter/' rel='bookmark' title='Visualizing Koornk chatter'>Visualizing Koornk chatter</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/11/15/graphing-koornk/' rel='bookmark' title='Graphing Koornk'>Graphing Koornk</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jurecuhalev.com/blog/2008/12/28/koornk-network-graph-with-pretty-pictures/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Listing all keys in S3 bucket using python boto</title>
		<link>http://www.jurecuhalev.com/blog/2008/03/20/listing-all-keys-in-s3-bucket-using-python-boto/</link>
		<comments>http://www.jurecuhalev.com/blog/2008/03/20/listing-all-keys-in-s3-bucket-using-python-boto/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 10:41:36 +0000</pubDate>
		<dc:creator>Jure Cuhalev</dc:creator>
				<category><![CDATA[Planet Kiberpipa]]></category>
		<category><![CDATA[Planet LiveCD]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[boto]]></category>
		<category><![CDATA[Bucket]]></category>
		<category><![CDATA[iterator]]></category>
		<category><![CDATA[Mitchell Garnaat]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://www.jurecuhalev.com/blog/2008/03/20/listing-all-keys-in-s3-bucket-using-python-boto/</guid>
		<description><![CDATA[Source: FlickrWhen using python-boto package to list keys in your S3 bucket, you might hit a limit of 1000 keys when using function call bucket.get_all_keys(). In order to get full list of keys just do something along the lines of

keylist = [k for k in self.bucket]

since as it turns out, bucket has an iterator over [...]
Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2006/08/26/msn-live-search-python-api-access/' rel='bookmark' title='MSN Live Search python API access'>MSN Live Search python API access</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2007/03/03/python-myspace-api-proxy/' rel='bookmark' title='Python MySpace API proxy'>Python MySpace API proxy</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/10/02/posting-to-koornk-using-python/' rel='bookmark' title='Posting to Koornk using Python'>Posting to Koornk using Python</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span class="zemanta-img" style="margin: 1em; display: block; float: right"><a href="http://www.flickr.com/photos/90684505@N00/1645592932/" target="_blank"><img src="http://farm3.static.flickr.com/2264/1645592932_2123f3c875_m.jpg" style="border: medium none ; display: block" height="130" width="196" /></a><span style="margin: 1em 0pt 0pt; display: block">Source: <a href="http://www.flickr.com/photos/90684505@N00/1645592932/" target="_blank">Flickr</a></span></span>When using <a href="http://code.google.com/p/boto/" target="_blank">python-boto</a> package to list keys in your <a href="http://en.wikipedia.org/wiki/Amazon_S3" title="Amazon S3" rel="wikipedia" target="_blank" class="zem_slink">S3</a> bucket, you might hit a limit of 1000 keys when using function call <em>bucket.get_all_keys()</em>. In order to get full list of keys just do something along the lines of<br />
<code><br />
keylist = [k for k in self.bucket]<br />
</code></p>
<p>since as it turns out, bucket has an <a href="http://en.wikipedia.org/wiki/Iterator" title="Iterator" rel="wikipedia" target="_blank" class="zem_slink">iterator</a> over key name.</p>
<p>(Discovered through <a href="http://cvs.savannah.nongnu.org/viewvc/duplicity/duplicity/backends.py?root=duplicity&amp;r1=1.42&amp;r2=1.43" target="_blank">patch of Mitchell Garnaat to Duplicity project</a>).</p>
<p id="zemanta-pixie" style="margin: 5px 0pt; width: 100%"><a href="http://www.zemanta.com/" id="zemanta-pixie-a" title="Zemified by Zemanta"><img src="http://img.zemanta.com/pixie.png?x-id=7474d78a-e97d-4b0c-bdad-978483400539" id="zemanta-pixie-img" style="border: medium none ; float: right" /></a></p>
<p>Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2006/08/26/msn-live-search-python-api-access/' rel='bookmark' title='MSN Live Search python API access'>MSN Live Search python API access</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2007/03/03/python-myspace-api-proxy/' rel='bookmark' title='Python MySpace API proxy'>Python MySpace API proxy</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/10/02/posting-to-koornk-using-python/' rel='bookmark' title='Posting to Koornk using Python'>Posting to Koornk using Python</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jurecuhalev.com/blog/2008/03/20/listing-all-keys-in-s3-bucket-using-python-boto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevoz.org in Google Earth</title>
		<link>http://www.jurecuhalev.com/blog/2007/08/14/prevozorg-in-google-earth/</link>
		<comments>http://www.jurecuhalev.com/blog/2007/08/14/prevozorg-in-google-earth/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 23:40:29 +0000</pubDate>
		<dc:creator>Jure Cuhalev</dc:creator>
				<category><![CDATA[ideas]]></category>
		<category><![CDATA[Planet Kiberpipa]]></category>
		<category><![CDATA[Planet LiveCD]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.kiberpipa.org/~gandalf/blog/?p=81</guid>
		<description><![CDATA[I&#8217;ve been playing a bit with writing Google Earth xml files to try to make some nice visualizations. Here is a first screenshot of how users of Slovenian carpooling site Prevoz.org are traveling around the country.
(historical data of all carshares, only showing locations with 10 or more entries in the database).

Related posts:
Black / Dark Google [...]
Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2008/03/29/black-dark-google-for-earth-hour/' rel='bookmark' title='Black / Dark Google for Earth Hour'>Black / Dark Google for Earth Hour</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2010/01/03/migrating-prevoz-org-to-geodjangopostgis/' rel='bookmark' title='Migrating Prevoz.org to GeoDjango/postGIS'>Migrating Prevoz.org to GeoDjango/postGIS</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2006/07/05/passed/' rel='bookmark' title='Passed!'>Passed!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing a bit with writing Google Earth xml files to try to make some nice visualizations. Here is a first screenshot of how users of Slovenian carpooling site Prevoz.org are traveling around the country.</p>
<p>(historical data of all carshares, only showing locations with 10 or more entries in the database).</p>
<p><a href="http://www.marela.si/photos/16047"><img src="http://static.marela.si/users0/gandalf/3/xEtXJn7pl4T34NrpPBZ76cE5_uI.jpg" style="border: solid 2px #000000;" /></a></p>
<p>Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2008/03/29/black-dark-google-for-earth-hour/' rel='bookmark' title='Black / Dark Google for Earth Hour'>Black / Dark Google for Earth Hour</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2010/01/03/migrating-prevoz-org-to-geodjangopostgis/' rel='bookmark' title='Migrating Prevoz.org to GeoDjango/postGIS'>Migrating Prevoz.org to GeoDjango/postGIS</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2006/07/05/passed/' rel='bookmark' title='Passed!'>Passed!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jurecuhalev.com/blog/2007/08/14/prevozorg-in-google-earth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back at doing open source and community work</title>
		<link>http://www.jurecuhalev.com/blog/2007/04/10/back-at-doing-open-source-and-community-work/</link>
		<comments>http://www.jurecuhalev.com/blog/2007/04/10/back-at-doing-open-source-and-community-work/#comments</comments>
		<pubDate>Tue, 10 Apr 2007 22:11:32 +0000</pubDate>
		<dc:creator>Jure Cuhalev</dc:creator>
				<category><![CDATA[Planet Kiberpipa]]></category>
		<category><![CDATA[Planet LiveCD]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.kiberpipa.org/~gandalf/blog/?p=76</guid>
		<description><![CDATA[Aaahh, itâ€™s good to be awake again. Something in summer smell awoke my community and open source spirit in me again which in turn forced me to work once again on old projects and new open source ideas. Currently I only have to announce two things that managed to kick me back in action. Prevoz.org [...]
Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2008/02/23/open-source-and-your-mac/' rel='bookmark' title='Open source and your Mac'>Open source and your Mac</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2007/10/12/double-bind-for-better-this-experience/' rel='bookmark' title='Double bind() for better `this` experience'>Double bind() for better `this` experience</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2009/08/27/how-to-get-back-your-opera-10b3-preferences-when-upgrading-to-opera10-rc/' rel='bookmark' title='How to get back your Opera 10b3 preferences when upgrading to Opera10 RC'>How to get back your Opera 10b3 preferences when upgrading to Opera10 RC</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Aaahh, itâ€™s good to be awake again. Something in summer smell awoke my community and open source spirit in me again which in turn forced me to work once again on old projects and new open source ideas. Currently I only have to announce two things that managed to kick me back in action. <a href="http://www.prevoz.org/rss">Prevoz.org RSS</a> feeds, and an addition of new machine to <a href="http://www.morphix.org/autobuilds/">Morphix nightly builds</a>.<br />
It was of course community effort so greetings also go to administrators and other hackers that helped in making me active again.<br />
It also seems that there is quite some interest in python myspace api, so check out the Google Code project that was setup by Laszlo: <a href="http://code.google.com/p/myspace-api/">myspace-api</a>.</p>
<p>Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2008/02/23/open-source-and-your-mac/' rel='bookmark' title='Open source and your Mac'>Open source and your Mac</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2007/10/12/double-bind-for-better-this-experience/' rel='bookmark' title='Double bind() for better `this` experience'>Double bind() for better `this` experience</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2009/08/27/how-to-get-back-your-opera-10b3-preferences-when-upgrading-to-opera10-rc/' rel='bookmark' title='How to get back your Opera 10b3 preferences when upgrading to Opera10 RC'>How to get back your Opera 10b3 preferences when upgrading to Opera10 RC</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jurecuhalev.com/blog/2007/04/10/back-at-doing-open-source-and-community-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSN Live Search python API access</title>
		<link>http://www.jurecuhalev.com/blog/2006/08/26/msn-live-search-python-api-access/</link>
		<comments>http://www.jurecuhalev.com/blog/2006/08/26/msn-live-search-python-api-access/#comments</comments>
		<pubDate>Sat, 26 Aug 2006 22:28:21 +0000</pubDate>
		<dc:creator>Jure Cuhalev</dc:creator>
				<category><![CDATA[Planet Kiberpipa]]></category>
		<category><![CDATA[Planet LiveCD]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.kiberpipa.org/~gandalf/blog/?p=61</guid>
		<description><![CDATA[Here is a little code snippet that will allow your python script to access MSN Search. 
I&#8217;m posting it here in hope that google picks it up and that next person who wants to just google it won&#8217;t have to start from scratch.
(I&#8217;m not sure how to post it to retain formatting, but since it&#8217;s [...]
Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2008/03/20/listing-all-keys-in-s3-bucket-using-python-boto/' rel='bookmark' title='Listing all keys in S3 bucket using python boto'>Listing all keys in S3 bucket using python boto</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/02/12/usability-reflections-the-failure-of-search-in-online-stores/' rel='bookmark' title='Usability reflections: The failure of search in online stores'>Usability reflections: The failure of search in online stores</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2009/12/03/python-smtp-sink-server/' rel='bookmark' title='Python SMTP sink server'>Python SMTP sink server</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here is a little code snippet that will allow your python script to access <a href="http://search.msn.com/">MSN Search</a>. </p>
<p>I&#8217;m posting it here in hope that google picks it up and that next person who wants to just google it won&#8217;t have to start from scratch.</p>
<p>(I&#8217;m not sure how to post it to retain formatting, but since it&#8217;s a simple script anyway it doesn&#8217;t matter much)</p>
<p><code><br />
       from SOAPpy import WSDL</p>
<p>       wsdl_url = 'http://soap.search.msn.com/webservices.asmx?wsdl'<br />
       server = WSDL.Proxy(wsdl_url)</p>
<p>       params = {'AppID': '***!!!YOUR_API_KEY_HERE!!!***',<br />
                 'Query': query,<br />
                 'CultureInfo': 'en-US',<br />
                 'SafeSearch': 'Off',<br />
                 'Requests': {<br />
                  'SourceRequest':{<br />
                  'Source': 'Web',<br />
                  'Offset': 0,<br />
                  'Count': 10,<br />
                  'ResultFields': 'All',<br />
                 }}<br />
                }</p>
<p>       server_results = server.Search(Request=params)<br />
       results = server_results.Responses[0].Results[0]</p>
<p>       return results<br />
</code></p>
<p>Related posts:<ol>
<li><a href='http://www.jurecuhalev.com/blog/2008/03/20/listing-all-keys-in-s3-bucket-using-python-boto/' rel='bookmark' title='Listing all keys in S3 bucket using python boto'>Listing all keys in S3 bucket using python boto</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2008/02/12/usability-reflections-the-failure-of-search-in-online-stores/' rel='bookmark' title='Usability reflections: The failure of search in online stores'>Usability reflections: The failure of search in online stores</a></li>
<li><a href='http://www.jurecuhalev.com/blog/2009/12/03/python-smtp-sink-server/' rel='bookmark' title='Python SMTP sink server'>Python SMTP sink server</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jurecuhalev.com/blog/2006/08/26/msn-live-search-python-api-access/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.jurecuhalev.com @ 2012-02-12 16:33:36 by W3 Total Cache -->
