<?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>stick&#039;s corner &#187; python</title>
	<atom:link href="http://stick.gk2.sk/blog/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://stick.gk2.sk</link>
	<description>Look at you, hacker. A pathetic creature of meat and bone. How can you challenge a perfect, immortal machine?</description>
	<lastBuildDate>Mon, 26 Jul 2010 16:31:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Popcorn &#8211; Popularity Contest (for RPM)</title>
		<link>http://stick.gk2.sk/blog/2009/03/popcorn-popularity-contest-for-rpm/</link>
		<comments>http://stick.gk2.sk/blog/2009/03/popcorn-popularity-contest-for-rpm/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 08:18:55 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[popcon]]></category>
		<category><![CDATA[popcorn]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=173</guid>
		<description><![CDATA[A few days ago I came across Feature #305877. What is it about? Well, Debian has the Popularity Contest, which tracks installed packages, how often they are used and sends an anonymized report once a week to their server. This maps the usage of Debian packages and as a nice side effect Debian guys can [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-174" style="margin-right: 16px;" title="Popcorn" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/03/popcorn-128x128.png" alt="Popcorn" width="128" height="128" /></p>
<p style="text-align: justify;">A few days ago I came across <a href="https://features.opensuse.org/305877">Feature #305877</a>. What is it about? Well, Debian has the <a href="http://popcon.debian.org/">Popularity Contest</a>, which tracks installed packages, how often they are used and sends an anonymized report once a week to their server. This maps the usage of Debian packages and as a nice side effect Debian guys can estimate the size of their user base on various platforms and releases. This also gives information about the community structure (e.g. how many users use development tools or graphic applications). This would be a very neat thing to have in openSUSE too!</p>
<p style="text-align: justify;">At first, the task seemed pretty straightforward &#8211; just to replace dpkg calls with corresponding calls to rpm. There was one catch, though. Because of the transactions, which RPM uses, scanning on my openSUSE 11.1 machine took 2 minutes instead of 2 seconds on Debian! That&#8217;s because RPM creates one transaction for each package and constant locking and unlocking of rpmdb makes this process really slow. I rewrote the script to python, just to see how long will it take using only one long transaction and was very pleasantly surprised that it got back to 2 seconds. <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Moreover, rpmdb can tell you the exact time when the package was installed, so there was no need to check for <a href="http://en.wikipedia.org/wiki/Stat_(Unix)">ctime</a> for files inside the packages like Debian does. (We still have to check for files <a href="http://en.wikipedia.org/wiki/Stat_(Unix)">atime</a> to determine whether the package is used or not, though).</p>
<p style="text-align: justify;">For the server part I was pretty sure about writing it in C to have it very fast and responsive, because I want to process incoming requests on the fly. The problem was with the storage. At the beginning I thought about using <a href="http://www.sqlite.org/">SQLite</a>, but after some testing I decided to use much lighter disk-based hashtables <a href="http://tdb.samba.org/">TDB</a> from the <a href="http://samba.org/">Samba</a> team, because they perfectly fitted my humble needs.</p>
<p style="text-align: justify;">Has this caught your interest? You can dig through the code at <a href="http://gitorious.org/opensuse/popcorn">gitorious</a> and any help is deeply welcome!. Yes, and why popcorn? Because the original is called popcon, but everybody at work just kept calling it popcorn during the discussions. Later I found another reason: popcorn is intended for RPM packages, so we definitively need an extra R in the name. <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/03/popcorn-popularity-contest-for-rpm/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Scout: bash-completion, documentation, python indexes and Java demo</title>
		<link>http://stick.gk2.sk/blog/2008/06/scout-bash-completion-documentation-python-indexes-and-java-demo/</link>
		<comments>http://stick.gk2.sk/blog/2008/06/scout-bash-completion-documentation-python-indexes-and-java-demo/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 11:02:49 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[docbook]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scout]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=25</guid>
		<description><![CDATA[A lot has happened since the public release of scout. Blogpost registered more than 400 hits, Marek Stopka created bash-completion, Thomas Schraitle wrote docbook documentation and Michal Vyskocil prepared module for python and its indexes. Thank you all! I started a wikipage like Thomas suggested and indexed Packman repositories for their binaries. Michal also prepared [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">A lot has happened since the <a href="http://stick.gk2.sk/blog/?p=15">public release of scout</a>. Blogpost registered more than 400 hits, Marek Stopka created bash-completion, Thomas Schraitle wrote docbook documentation and Michal Vyskocil prepared module for python and its indexes. Thank you all! I started a <a href="http://en.opensuse.org/Scout">wikipage</a> like Thomas suggested and indexed Packman repositories for their binaries.</p>
<p style="text-align: justify;">Michal also prepared small demonstration video about using scout in java wrapper. The wrapper runs java application and greps stderr for exceptions. When NoClassDefFoundError/ClassNotFoundException is detected, the classname is taken to scout, which resolves it to package name, installs the package with zypper and tries to run application again! I like this idea pretty much. Michal is currently working on perl indexes and we will probably index also ruby and pkgconfig files.</p>
<p>Watch mentioned java demonstration video here:</p>
<p><embed src="http://blip.tv/play/AcKYYI3nGQ" type="application/x-shockwave-flash" width="504" height="372" allowscriptaccess="always" allowfullscreen="true"></embed><br />
or <a href="http://blip.tv/file/get/Stickac-ScoutJavaWrapperDemonstration287.avi">download</a> it &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2008/06/scout-bash-completion-documentation-python-indexes-and-java-demo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://blip.tv/file/get/Stickac-ScoutJavaWrapperDemonstration287.avi" length="670376" type="video/x-msvideo" />
		</item>
	</channel>
</rss>
