<?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>Inspirated &#187; PyGTK</title>
	<atom:link href="http://inspirated.com/tag/pygtk/feed" rel="self" type="application/rss+xml" />
	<link>http://inspirated.com</link>
	<description>krkhan&#039;s blog</description>
	<lastBuildDate>Mon, 02 Jan 2012 20:58:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Summing up Google Summer of Code 2011</title>
		<link>http://inspirated.com/2011/10/04/summing-up-gsoc-2011</link>
		<comments>http://inspirated.com/2011/10/04/summing-up-gsoc-2011#comments</comments>
		<pubDate>Tue, 04 Oct 2011 07:32:49 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>
		<category><![CDATA[Vidalia]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=363</guid>
		<description><![CDATA[Due to a number of commitments which I had pinned back during the summer for GSoC I was unable to attend much to the Internet over the past few weeks. Now that I&#8217;m back a summary of this year&#8217;s coding festival is in order: The Program This year I was working with Electronic Frontier Foundation/The [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Due to a number of commitments which I had pinned back during the summer for GSoC I was unable to attend much to the Internet over the past few weeks. Now that I&#8217;m back a summary of this year&#8217;s coding festival is in order:</p>
<h3>The Program</h3>
<p>This year I was working with Electronic Frontier Foundation/<a href="http://www.torproject.org/">The Tor Project</a> for improving the Anonymizing Relay Monitor (arm). The original proposal can be downloaded from <a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">this link</a> are accessed via a browser at <a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>. However, do note that not all of the goals from the proposal were met. Some were modified, some were removed altogether while some new ones were added &#8212; the details of which I&#8217;ll be explaining in the following sections.</p>
<p>Overall the program has been an extraordinarily enjoyable and learning experience for me. My involvement with Ubuntu last year had already taught me how invaluable it is to merge with your mentoring organizing&#8217;s developer community. This year most of my collaboration took place in <code>#tor-dev</code> on OFTC. Many times when I was stuck or heading towards an improper direction with my code the core Tor developers helped me and provided advice for design decisions as well as general guidance about the way things work in Tor. It wasn&#8217;t only a privilege to be helped by such rockstars, but was also vital as I can see in hindsight how disastrous it would have been if I had attempted to work through the program entirely on my own.</p>
<p>A <em>huge</em> thanks goes to my mentor <a href="http://www.atagar.com/">Damian</a>. Most of the credit for making this program an enjoyable and stimulating experience for me goes directly to him. He has one of the best combinations of code-people skills among people I&#8217;ve known. I would&#8217;ve loved meeting him and the Tor community in PETS &#8217;11 but couldn&#8217;t travel due to some paperwork fiasco which was entirely a result of my slothful attitude towards anything involving government offices. Nevertheless, I do hope to meet the guys next year in PETS &#8217;12.</p>
<h3>The Code</h3>
<p>In order to not sound repetitious, I&#8217;ll provide a quick summary of the milestones while linking to the posts which explain them in detail:</p>
<h4>Menus for arm CLI</h4>
<p>My first task was to <a href="http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python">add dropdown menus</a> for the curses interface to arm. Even though the menus were replaced by Damian&#8217;s rewrite, they went a long way in helping me assimilate myself with the arm codebase:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-menus.png"><img src="http://inspirated.com/uploads/arm-menus-thumb.jpg" alt="Drop-down menus for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<h4>Graphs and logs for arm GUI</h4>
<p>GTK+ was chosen as the toolkit for developing the arm GUI prototype. While GTK+ has its own disadvantages when compared to Qt (platform portability &#8212; or the lack thereof &#8212; being the foremost), it fared well in light-weight Unix environment such as Live CDs (e.g., <a href="http://tails.boum.org/">Tails</a>). <a href="http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid">Bandwidth graphs and logs</a> for various arm events were added to the prototype:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-cli.png"><img src="http://inspirated.com/uploads/arm-bwstats-cli-thumb.jpg" alt="CLI bandwidth stats for arm" /></a></p>
<p style="text-align: center; font-size: x-small"><img src="http://inspirated.com/uploads/down-arrow.jpg" alt="Down arrow" /></p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-gui.png"><img src="http://inspirated.com/uploads/arm-bwstats-gui-thumb.jpg" alt="GUI bandwidth stats for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<h4>Connections and general stats for arm GUI</h4>
<p><a href="http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1">Moving on with the GUI</a>, next up was to improve its conformity with the rest of the user&#8217;s desktop:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-graphs.png"><img src="http://inspirated.com/uploads/garm-0.1-graphs-thumb.jpg" alt="Graphs panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>And then re-use arm&#8217;s CLI connection resolvers in order to display stats about Tor circuits and control connections:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-conn.png"><img src="http://inspirated.com/uploads/garm-0.1-conn-thumb.jpg" alt="Connections panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>A small addition was migration of the &#8220;sticky&#8221; panel from CLI which was moved under a &#8220;General&#8221; tab and provided miscellaneous info about Tor and arm:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-general.png"><img src="http://inspirated.com/uploads/garm-0.1-general-thumb.jpg" alt="General panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<h4>Configuration panel for GUI</h4>
<p>Another important panel in the arm CLI was its configuration interface which provided a nice and documented approach to altering Tor&#8217;s settings. It was <a href="http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration">migrated to GUI</a> with nice dialogs for validating user input:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-config.png"><img src="http://inspirated.com/uploads/garm-config-thumb.jpg" alt="Configuration panel for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Along with the configuration panel a few patches to Tor and Vidalia were developed which would allow arm to be notified of changes made by an external program via a <code>CONF_CHANGED</code> event. The support for <code>CONF_CHANGED</code> still isn&#8217;t solid in all Tor controllers yet which I plan on addressing in coming months.</p>
<h4>Exit node selector for arm CLI &#038; GUI</h4>
<p>A popular feature request among Tor users was to be able to select the country for their exit nodes. While I initially planned on providing them more fine-grained control over their circuits (such as path length), Tor developers advised against it and hence the selection was limited to the exit-node&#8217;s locale:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-exitnode-selector.png"><img src="http://inspirated.com/uploads/garm-exitnode-selector-thumb.jpg" alt="Exit node selector for garm" /></a><br />
<a href="http://inspirated.com/uploads/arm-exitnode-selector.png"><img src="http://inspirated.com/uploads/arm-exitnode-selector-thumb.jpg" alt="Exit node selector for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<h3>The Nutshell</h3>
<blockquote><p>&#8220;It goes on forever &#8212; and &#8212; oh my God &#8212; it&#8217;s full of stars!&#8221;</p></blockquote>
<p>It&#8217;s just that awesome, seriously. Stars from the FLOSS strata gather around and help inexperienced and aspiring developers all over the globe for two months in order to bring more code and &#8212; more importantly &#8212; more people to the open-source world. The experience with GSoC not only helps me in general open-source development, but also proves to be <em>priceless</em> at my workplace for my research in software defined networks. If you&#8217;re even remotely interested in open-source do keep an eye on the <a href="http://code.google.com/soc/">program&#8217;s website</a> for future updates.</p>
<div class="shr-publisher-363"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/10/04/summing-up-gsoc-2011">Permalink</a> |
<a href="http://inspirated.com/2011/10/04/summing-up-gsoc-2011#comments">One comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a>, <a href="http://inspirated.com/tag/vidalia" rel="tag">Vidalia</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/10/04/summing-up-gsoc-2011/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Exit node selection</title>
		<link>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection</link>
		<comments>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection#comments</comments>
		<pubDate>Sun, 04 Sep 2011 08:49:02 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=361</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log The final weeks of GSoC 2011 were spent by me working on exit node selection for Tor users. The GUI controller can now be used to define a list of countries, after which only those [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>The final weeks of GSoC 2011 were spent by me working on exit node selection for Tor users. The GUI controller can now be used to define a list of countries, after which only those exit nodes shall be used which lie in one of the specified territories:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-exitnode-selector.png"><img src="http://inspirated.com/uploads/garm-exitnode-selector-thumb.jpg" alt="Exit node selector for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>For the CLI, Damian decided that the general use case for exit node selection is specification of a <em>single</em> country so pressing &#8216;E&#8217; in the connections panel brings up a list from which one can be chosen:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-exitnode-selector.png"><img src="http://inspirated.com/uploads/arm-exitnode-selector-thumb.jpg" alt="Exit node selector for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Please note that the exit node restriction works only for circuits built <em>after</em> the selection. Therefore it might be a good idea to send a <code>NEWNYM</code> to Tor after specifying the countries &#8212; which you&#8217;ll have to do manually for the time being until I add the feature to (g)arm controllers.</p>
<p>In my next post I&#8217;ll cover a summary of my involvement with GSoC this year, that is, after I finish with the regular chores of code submission etc.</p>
<div class="shr-publisher-361"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection">Permalink</a> |
<a href="http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Tor configuration</title>
		<link>http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration</link>
		<comments>http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration#comments</comments>
		<pubDate>Thu, 11 Aug 2011 23:52:40 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>
		<category><![CDATA[Vidalia]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=358</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log &#8220;O Marvelous! what new configuration will come next? I am bewildered with multiplicity.&#8221; &#8212; William Carlos Williams Up until now my GSoC development was dealing with the &#8220;monitoring&#8221; aspects of arm. In addition to being [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<blockquote><p>&#8220;O Marvelous! what new configuration will come next? I am bewildered with multiplicity.&#8221; &#8212; <em>William Carlos Williams</em></p></blockquote>
<p>Up until now my GSoC development was dealing with the &#8220;monitoring&#8221; aspects of arm. In addition to being a monitor a Tor controller is also supposed to, well, control the Tor client. Tor offers a detailed <a href="https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt">specification</a> which can be used to interact with a running client and control it in a myriad of ways. This specification is then used by controllers like arm and Vidalia to fetch and/or update the client configuration.</p>
<p>The CLI configuration panel for arm already understood the control specification quite well. The first step towards reusing those portions for the GUI was to rewrite the inheritance code so that underlying data structures of the CLI were automagically connected to the Gtk+ models. That made the actual implementation of GUI configuration panel a whole lot cleaner. As things are, the panel detects the data types of configuration options and opens pertinent dialogs for user input:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-config.png"><img src="http://inspirated.com/uploads/garm-config-thumb.jpg" alt="Configuration panel for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Next item in to-do list was implementing a path selection panel in arm. After a thorough discussion on IRC with the core Tor developers it was decided that giving end-users <em>complete</em> access to the <code>PathSupport</code> component of TorCtl would ultimately hurt their anonymity with little (<a href="https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ#Youshouldletpeoplechoosetheirpathlength.">if any</a>) pay-off. Letting them choose the country of their exit relay was still seen as a useful feature which is what I&#8217;m working on right now.</p>
<p>Meanwhile, while setting the configuration options needed to choose an exit country I figured that arm should be notified of any changes made by other controllers to the options in question. Damian pointed me to ticket <a href="https://trac.torproject.org/projects/tor/ticket/1692">#1692</a> which proposed an enhancement for this very purpose. He had already created a patch for the job but few quirks needed to be addressed before the patch was ready for being merged. Thanks to help from Nick Mathewson and Robert Ransom I was able to fix the code and get it inside the <a href="https://gitweb.torproject.org/tor.git?a=search&#038;st=author&#038;s=krkhan%40inspirated.com">tor</a> and <a href="https://gitweb.torproject.org/torspec.git?a=search&#038;st=author&#038;s=krkhan%40inspirated.com">tor-spec</a> repositories.</p>
<p>To make use of the new <code>CONF_CHANGED</code> event I also wrote patches for TorCtl and Vidalia. The TorCtl patch shall help me in making arm aware of configuration changes. While the Vidalia one is a proof-of-concept which created a signal and connected it to a debug function which for the time being just logs the options changed for the running Tor instance.</p>
<p>I hope to be done with exit node selection within a couple of days after which I&#8217;ll port the feature to CLI version of arm. It&#8217;ll be a good little exercise to start decoupling the arm interfaces from its backend so that future development is more streamlined and fun.</p>
<div class="shr-publisher-358"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration">Permalink</a> |
<a href="http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a>, <a href="http://inspirated.com/tag/vidalia" rel="tag">Vidalia</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: garm 0.1</title>
		<link>http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1</link>
		<comments>http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1#comments</comments>
		<pubDate>Sun, 17 Jul 2011 12:16:25 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=353</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log Damian and I have decided that the GUI prototype for arm should be released to the public for a feedback round. As always, the code is available from the Git repository. So far, the graphs [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>Damian and I have decided that the GUI prototype for arm should be released to the public for a feedback round. As always, the code is available from the Git <a href="https://gitweb.torproject.org/user/krkhan/arm.git">repository</a>.</p>
<p>So far, the graphs and logs now support a look more conforming with the rest of the GTK+ theme:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-graphs.png"><img src="http://inspirated.com/uploads/garm-0.1-graphs-thumb.jpg" alt="Graphs panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>The connections panel lists circuits and control ports in use. The resolvers in use are in fact, the same ones used by the CLI so the results are pretty consistent:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-conn.png"><img src="http://inspirated.com/uploads/garm-0.1-conn-thumb.jpg" alt="Connections panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>The &#8220;sticky&#8221; or &#8220;header&#8221; panel which provided general Tor/arm info has been moved to the notebook for giving it more horizontal space:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-general.png"><img src="http://inspirated.com/uploads/garm-0.1-general-thumb.jpg" alt="General panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Owing to my lack of creativity the GUI was named &#8220;garm&#8221;. Which coincidentally turned out to be the name of a talking dog from <a href="http://en.wikipedia.org/wiki/Farmer_Giles_of_Ham">one</a> of Tolkein&#8217;s short stories. Proving once again that Tolkein/Middle Earth/Norse mythology are any geek&#8217;s safe fallback plan for being imaginative.</p>
<p>While the GUI is still in infancy, we&#8217;d love any feedback we can get. If you have a suggestion you can post a comment here, drop by at <code>#tor-dev</code> or (preferably) mail your thoughts to <a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk">tor-talk</a>. I&#8217;ll be grateful for any ideas that end up making garm more useful for relay operators.</p>
<div class="shr-publisher-353"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1">Permalink</a> |
<a href="http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Graphs, logs and acid</title>
		<link>http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid</link>
		<comments>http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid#comments</comments>
		<pubDate>Tue, 28 Jun 2011 14:06:59 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=350</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log The great thing about a command line application is being able to SSH into the thing from anywhere and with anything. Nevertheless, the general public appeal of GUIs has always remained undeniable. After all, over [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>The great thing about a command line application is being able to SSH into the thing from anywhere and with anything. Nevertheless, the general public appeal of GUIs has always remained undeniable. After all, over the decades one of the favorite pass times of Steve Jobs &#8212; the man who knows a thing or two about public appeal &#8212; <a href="http://community.seattletimes.nwsource.com/archive/?date=19930602&#038;slug=1704430">has</a> <a href="http://www.engadget.com/2011/04/18/apple-sues-samsung-over-for-copying-the-iphone-and-ipad/">been</a> <a href="http://www.engadget.com/2010/03/02/apple-vs-htc-a-patent-breakdown/">suing</a> and/or <a href="http://www.nytimes.com/1989/12/20/business/xerox-vs-apple-standard-dashboard-is-at-issue.html">getting sued</a> for patents related to GUI. It&#8217;s not to say that we are planning an iTorMonitor for App Store (you still have <a href="http://www.zinger-soft.com/iSSH_features.html">iSSH</a> if you&#8217;d like), but a graphical interface shall hopefully go a long way for attracting newbie relay operators.</p>
<p>The first items to be ported to GUI were the bandwidth graphs. After a thorough discussion on <code>#tor-dev</code> regarding how to achieve graphing with respect to feature sets, packaging issues and wheel reinvention; <a href="http://code.google.com/p/cagraph/">cagraph</a> was chosen as the way to go (among Matplotlib and drawing directly to GDK surfaces). I took screenshots of both interfaces running side-by-side in order to judge how accurate the graphs were and the results look fine:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-cli.png"><img src="http://inspirated.com/uploads/arm-bwstats-cli-thumb.jpg" alt="CLI bandwidth stats for arm" /></a></p>
<p style="text-align: center; font-size: x-small"><img src="http://inspirated.com/uploads/down-arrow.jpg" alt="Down arrow" /></p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-gui.png"><img src="http://inspirated.com/uploads/arm-bwstats-gui-thumb.jpg" alt="GUI bandwidth stats for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<p>Next up were the log messages dispatched by arm or Tor. While Damian would not be entirely happy with the fact that I&#8217;m not terribly innovative with the UI translation <img src='http://inspirated.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  , I did stumble upon an interesting side-feature of using timestamp based sorting. The user can sort the entries in ascending order and he&#8217;ll always see the recent-most entry as it pops up in the view, or he can revert the order and see old entries at his leisure while the new entries populate elsewhere below.</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-log.png"><img src="http://inspirated.com/uploads/arm-log-thumb.jpg" alt="Log panel for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>One other aspect I noticed while designing the UIs was that I have atrocious color selection skills. The color scheme of the entire application isn&#8217;t consistent and might even invite a backlash once it goes public. Therefore I plan on discarding all hardcoded colors in favor of theme colors from GTK+ itself &#8212; lest the GUI be packaged into a separate <code>arm-trippy</code> once it makes to major distros.</p>
<div class="shr-publisher-350"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid">Permalink</a> |
<a href="http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid#comments">One comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bookmark Undertaker v0.3 &#8212; Picking up the threads</title>
		<link>http://inspirated.com/2010/02/21/bookmark-undertaker-v0-3-picking-up-the-threads</link>
		<comments>http://inspirated.com/2010/02/21/bookmark-undertaker-v0-3-picking-up-the-threads#comments</comments>
		<pubDate>Sun, 21 Feb 2010 15:09:55 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Beautiful Soup]]></category>
		<category><![CDATA[Bookmark Undertaker]]></category>
		<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Deb]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=265</guid>
		<description><![CDATA[Threads are love. Threads are speed. And more often than not, threads are a consistent PITA. However, I&#8217;ve had an accidental epiphany just a few hours ago: &#8220;When in doubt When you need to communicate among threads, use synchronized Queues.&#8221; There. This magic mantra will solve more issues in your life than you can ever [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Threads are love. Threads are speed. And more often than not, threads are a consistent <abbr title="Pain in the Ass">PITA</abbr>. However, I&#8217;ve had an accidental epiphany just a few hours ago:</p>
<blockquote><p>&#8220;<del datetime="2010-02-21T14:27:15+00:00">When in doubt</del> When you need to communicate among threads, use synchronized <a href="http://docs.python.org/library/queue.html">Queue</a>s.&#8221;</p></blockquote>
<p>There. This magic mantra will solve more issues in your life than you can ever imagine, and certainly more than I expected.</p>
<p>Getting back to the topic at hand, adding threading support to the program has sped up the bookmark checking process by a factor of about 435895234. Coupled with fixing of some parsing bugs, <a href="https://launchpad.net/bmundertaker/trunk/0.3">Bookmark Undertaker v0.3</a> is finally capable of providing a quick, stable and consistent way of sanitizing your Firefox favorites:</p>
<p style="text-align: center"><img src="http://inspirated.com/uploads/bmundertaker-0.3.jpg" alt="Boomark Undertaker v0.3 Screenshot" /></p>
<p>This time, I&#8217;ve also tried to provide <a href="http://launchpad.net/bmundertaker/trunk/0.3/+download/bmundertaker_0.3-1_all.deb">Deb</a> and <a href="http://launchpad.net/bmundertaker/trunk/0.3/+download/bmundertaker-0.3-1.noarch.rpm">RPM</a> packages on the release page for easy installation by the Debian/Ubuntu/Fedora populace.</p>
<p>Ushering in the era of communist applications:</p>
<blockquote><p>&#8220;If everyone gives one thread, the poor person will have a shirt.&#8221; &#8212; <em>Russian Proverb</em></p></blockquote>
<div class="shr-publisher-265"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2010/02/21/bookmark-undertaker-v0-3-picking-up-the-threads">Permalink</a> |
<a href="http://inspirated.com/2010/02/21/bookmark-undertaker-v0-3-picking-up-the-threads#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/beautiful-soup" rel="tag">Beautiful Soup</a>, <a href="http://inspirated.com/tag/bookmark-undertaker" rel="tag">Bookmark Undertaker</a>, <a href="http://inspirated.com/tag/bookmarks" rel="tag">Bookmarks</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/deb" rel="tag">Deb</a>, <a href="http://inspirated.com/tag/debian" rel="tag">Debian</a>, <a href="http://inspirated.com/tag/fedora" rel="tag">Fedora</a>, <a href="http://inspirated.com/tag/firefox" rel="tag">Firefox</a>, <a href="http://inspirated.com/tag/mozilla" rel="tag">Mozilla</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/python" rel="tag">Python</a>, <a href="http://inspirated.com/tag/red-hat" rel="tag">Red Hat</a>, <a href="http://inspirated.com/tag/rpm" rel="tag">RPM</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a>, <a href="http://inspirated.com/tag/threading" rel="tag">Threading</a>, <a href="http://inspirated.com/tag/ubuntu" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2010/02/21/bookmark-undertaker-v0-3-picking-up-the-threads/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(GUI, Mathematical Equations, Scientific Plotting) = (GTK+, LaTeX, Matplotlib)</title>
		<link>http://inspirated.com/2010/01/06/gui-mathematical-equations-scientific-plotting-gtk-latex-matplotlib</link>
		<comments>http://inspirated.com/2010/01/06/gui-mathematical-equations-scientific-plotting-gtk-latex-matplotlib#comments</comments>
		<pubDate>Wed, 06 Jan 2010 05:16:17 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Equation]]></category>
		<category><![CDATA[Flag 42]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Matplotlib]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Plot]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[TeX]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=259</guid>
		<description><![CDATA[GTK+ needs no introduction. LaTeX is the first thing that pops in anyone&#8217;s mind if mathematical equations&#8217; typesetting is under consideration. Matplotlib &#8212; while not as well-known as the former two &#8212; is the super easy and elegant solution for scientific plotting on *nix platforms. For an application demo, I required all three. Past experience [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>GTK+ needs no introduction. LaTeX is the first thing that pops in anyone&#8217;s mind if mathematical equations&#8217; typesetting is under consideration. Matplotlib &#8212; while not as well-known as the former two &#8212; is the super easy and elegant solution for scientific plotting on *nix platforms.</p>
<p>For an application demo, I required all three. Past experience has taught me that the most straightforward way of &#8220;gluing&#8221; things together is Python. GTK+ therefore = PyGTK. Next up was LaTeX, and a previous solution of mine for <a href="http://inspirated.com/2009/09/10/howto-use-latex-mathematical-expressions-in-pygtk">embedding LaTeX in PyGTK</a> came to the rescue. The final requirement of Matplotlib was fulfilled without any hassle since the library was already written in Python.</p>
<p>The collective result was pretty:</p>
<p style="text-align: center"><a href="http://inspirated.com/uploads/radareq-0.1.tar.gz">radareq-0.1.tar.gz</a></p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/gtk-latex-matplotlib.png"><img src="http://inspirated.com/uploads/gtk-latex-matplotlib-thumb.jpg" alt="Screenshot of GTK+ with LaTeX and Matplotlib" width="400" height="316" /></a><br />
(Click on the image for larger version.)</p>
<p>The linked tarball contains the Python scripts for the application. For everything to run smoothly, LaTeX and Matplotlib packages need to be installed on your system. If you encounter any issues running the code, feel free to flame your distribution for the apparent lack of sanity regarding package management.</p>
<div class="shr-publisher-259"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2010/01/06/gui-mathematical-equations-scientific-plotting-gtk-latex-matplotlib">Permalink</a> |
<a href="http://inspirated.com/2010/01/06/gui-mathematical-equations-scientific-plotting-gtk-latex-matplotlib#comments">2 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/equation" rel="tag">Equation</a>, <a href="http://inspirated.com/tag/flag-42" rel="tag">Flag 42</a>, <a href="http://inspirated.com/tag/graphics" rel="tag">Graphics</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/latex" rel="tag">LaTeX</a>, <a href="http://inspirated.com/tag/matplotlib" rel="tag">Matplotlib</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/plot" rel="tag">Plot</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/python" rel="tag">Python</a>, <a href="http://inspirated.com/tag/tex" rel="tag">TeX</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2010/01/06/gui-mathematical-equations-scientific-plotting-gtk-latex-matplotlib/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bookmark Undertaker &#8212; Check your Firefox favorites for dead links</title>
		<link>http://inspirated.com/2009/12/03/bookmark-undertaker-check-your-firefox-favorites-for-dead-links</link>
		<comments>http://inspirated.com/2009/12/03/bookmark-undertaker-check-your-firefox-favorites-for-dead-links#comments</comments>
		<pubDate>Thu, 03 Dec 2009 16:24:44 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Beautiful Soup]]></category>
		<category><![CDATA[Bookmark Undertaker]]></category>
		<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=258</guid>
		<description><![CDATA[No matter how much you try to keep the browser bookmarks clean, inevitably they jumble up and one day you realize that you have no idea which links are working and which aren&#8217;t. This is where a small utility named AM-Deadlink comes to the rescue for Windows users which checks the links for errors. Somehow, [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>No matter how much you try to keep the browser bookmarks clean, inevitably they jumble up and one day you realize that you have no idea which links are working and which aren&#8217;t. This is where a small utility named AM-Deadlink comes to the rescue for Windows users which checks the links for errors. Somehow, the utility lacked an alternative in the open-source world. And this is where <a href="http://code.inspirated.com/pygtk/bmundertaker/">Bookmark Undertaker</a> comes into picture:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/bmundertaker.png"><img src="http://inspirated.com/uploads/bmundertaker-thumb.jpg" alt="Bookmark Undertaker Screenshot" width="450" height="356" /></a><br />
(Click on the image for larger version.)</p>
<p>For the utility, I chose PyGTK as UI backend. For parsing the <code>bookmarks.html</code> files exported from Firefox, I used <a href="http://www.crummy.com/software/BeautifulSoup/">Beautiful Soup</a>. The latter, I must say, made my life a lot easier by cleverly sanitizing the insanity contained in Firefox&#8217;s exported favorites, staying true to the project tagline:</p>
<blockquote><p>You didn&#8217;t write that awful page. You&#8217;re just trying to get some data out of it. Right now, you don&#8217;t really care what HTML is supposed to look like.</p>
<p>Neither does this parser.</p></blockquote>
<p>And indeed it does not.</p>
<p>For the time being, the application imports the bookmarks properly and displays their attributes including the favorite icons. It then checks the linked URLs for errors in a separate thread and marks them as working or non-working accordingly. Exporting the bookmarks is next on the TODO-list, while it&#8217;s possible that in future I will internationalize the application as well.</p>
<p>Time to purge those pesky outdated 404&#8242;s.</p>
<div class="shr-publisher-258"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2009/12/03/bookmark-undertaker-check-your-firefox-favorites-for-dead-links">Permalink</a> |
<a href="http://inspirated.com/2009/12/03/bookmark-undertaker-check-your-firefox-favorites-for-dead-links#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/beautiful-soup" rel="tag">Beautiful Soup</a>, <a href="http://inspirated.com/tag/bookmark-undertaker" rel="tag">Bookmark Undertaker</a>, <a href="http://inspirated.com/tag/bookmarks" rel="tag">Bookmarks</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/firefox" rel="tag">Firefox</a>, <a href="http://inspirated.com/tag/mozilla" rel="tag">Mozilla</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/python" rel="tag">Python</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2009/12/03/bookmark-undertaker-check-your-firefox-favorites-for-dead-links/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emu8086 Hardware Interrupt Editor &amp; Generator</title>
		<link>http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator</link>
		<comments>http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator#comments</comments>
		<pubDate>Mon, 05 Oct 2009 14:41:36 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[8086]]></category>
		<category><![CDATA[8088]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Emu8086]]></category>
		<category><![CDATA[Emu8086 Hardware Interrupt Editor & Generator]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[Interrupt]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Vector]]></category>
		<category><![CDATA[x86]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=246</guid>
		<description><![CDATA[If there has been a closed-source software which I have enjoyed using at my university, it&#8217;s Emu8086. The shareware, as the name suggests, emulates the 8086 processor down to the minutest detail. Since 8086/8088 processors form a significant part of my Microprocessor Interfacing &#038; Programming course, I have grown rather fond of the software&#8217;s workings. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If there has been a closed-source software which I have enjoyed using at my university, it&#8217;s <a href="http://www.emu8086.com/">Emu8086</a>. The shareware, as the name suggests, emulates the 8086 processor down to the minutest detail. Since 8086/8088 processors form a significant part of my Microprocessor Interfacing &#038; Programming course, I have grown rather fond of the software&#8217;s workings.</p>
<p>Recently, I needed to generate hardware interrupts on the emulator. Not only that, but I wanted to use my own service routines for the interrupts so that I could try to understand what happens behind-the-scenes in such scenarios. Reading through the Emu8086 documentation, I figured out that two files are responsible for accomplishing the required tasks:</p>
<ol>
<li><code>INT_VECT</code>: A 1024-byte interrupt vector containing 256 entries, with each entry being a 4-byte <code>offset</code>:<code>segment</code> pair.</li>
<li><code>emu8086.hw</code>: A 256-byte file with each byte representing a corresponding interrupt. A non-zero byte signifies that particular interrupt being active. The byte is set to zero again after the interrupt is serviced.</li>
</ol>
<p>As manually editing these files became cumbersome, I had to code two PyGTK apps for editing these files in a pretty interface:</p>
<div style="text-align: center"><a href="http://inspirated.com/uploads/intvecteditor.zip">intvecteditor.py</a> &amp; <a href="http://inspirated.com/uploads/hwintgen.zip">hwintgen.py</a></div>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/emu8086int.png"><img src="http://inspirated.com/uploads/emu8086int-thumb.jpg" alt="Emu8086 Hardware Interrupt Editor &#038; Generator Screenshot" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>The <code>intvecteditor.py</code> file lets the user load/edit/save an 8086 interrupt vector. Similarly, the <code>hwintgen.py</code> allows the user to load an <code>emu8086.hw</code> and then generate/monitor interrupts in it. The utilities require PyGTK to run, but I find it infinitely easier now to analyze interrupt behavior of the emulator. This also lead to an interesting observation, as the emulator checked for interrupts at the <em>beginning</em> of an instruction instead of at its <em>end</em> &#8212; something which didn&#8217;t confirm with the actual 8086 working model.</p>
<p><code>x86</code> is fun. After all,</p>
<blockquote><p>&ldquo;Do you program in assembly?&rdquo;<br />
&ldquo;<code>NOP</code>&rdquo;</p></blockquote>
<div class="shr-publisher-246"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator">Permalink</a> |
<a href="http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/8086" rel="tag">8086</a>, <a href="http://inspirated.com/tag/8088" rel="tag">8088</a>, <a href="http://inspirated.com/tag/assembly" rel="tag">Assembly</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/emu8086" rel="tag">Emu8086</a>, <a href="http://inspirated.com/tag/emu8086-hardware-interrupt-editor-generator" rel="tag">Emu8086 Hardware Interrupt Editor &amp; Generator</a>, <a href="http://inspirated.com/tag/intel" rel="tag">Intel</a>, <a href="http://inspirated.com/tag/interrupt" rel="tag">Interrupt</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/python" rel="tag">Python</a>, <a href="http://inspirated.com/tag/vector" rel="tag">Vector</a>, <a href="http://inspirated.com/tag/x86" rel="tag">x86</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Use LaTeX mathematical expressions in PyGTK</title>
		<link>http://inspirated.com/2009/09/10/howto-use-latex-mathematical-expressions-in-pygtk</link>
		<comments>http://inspirated.com/2009/09/10/howto-use-latex-mathematical-expressions-in-pygtk#comments</comments>
		<pubDate>Thu, 10 Sep 2009 17:04:19 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Equation]]></category>
		<category><![CDATA[Flag 42]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[TeX]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=243</guid>
		<description><![CDATA[I had never really laid my hands on LaTeX until I required it in one of the helper applications for my graduation project. Unfortunately, the requirement wasn&#8217;t as simple as producing some documents as I had to embed mathematical expressions on the fly in my PyGTK apps. Googling around for the solution, I found GtkMathView [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I had never really laid my hands on LaTeX until I required it in one of the helper applications for my graduation project. Unfortunately, the requirement wasn&#8217;t as simple as producing some documents as I had to embed mathematical expressions on the fly in my PyGTK apps. Googling around for the solution, I found <a href="http://helm.cs.unibo.it/mml-widget/">GtkMathView</a> which accomplished something similar to this albeit using MathML. However, my luck ran out on me again as the widget lacked Python bindings. The other solution was to generate transparent PNGs on the fly and include them as <code>GtkImage</code>s. This worked rather well, as the final code allowed easy modifications to the generated expressions.</p>
<p>Requirements for the code were:</p>
<ul>
<li><a href="http://www.latex-project.org/">LaTeX</a></li>
<li><a href="http://sourceforge.net/projects/dvipng/">dvipng</a></li>
<li><a href="http://code.google.com/p/latexmath2png/">latexmath2png</a></li>
</ul>
<p>Final results:</p>
<div style="text-align: center"><img src="http://inspirated.com/uploads/gtktex.jpg" alt="LaTeX in PyGTK" /></div>
<p>And the simple code behind it:</p>
<div style="text-align: center"><a href="http://inspirated.com/uploads/gtktex.zip">gtktex.py</a></div>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #483d8b;">&quot;&quot;&quot;An example demonstrating usage of latexmath2png module for embedding math
equations in PyGTK
&nbsp;
Author: Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;
&quot;&quot;&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> gtk
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> latexmath2png
&nbsp;
pre = <span style="color: #483d8b;">'gtktex_'</span>
eqs = <span style="color: black;">&#91;</span>
	r<span style="color: #483d8b;">'$<span style="color: #000099; font-weight: bold;">\a</span>lpha_i &gt; <span style="color: #000099; font-weight: bold;">\b</span>eta_i$'</span>,
	r<span style="color: #483d8b;">'$<span style="color: #000099; font-weight: bold;">\s</span>um_{i=0}^<span style="color: #000099; font-weight: bold;">\i</span>nfty x_i$'</span>,
	r<span style="color: #483d8b;">'$<span style="color: #000099; font-weight: bold;">\l</span>eft(<span style="color: #000099; font-weight: bold;">\f</span>rac{5 - <span style="color: #000099; font-weight: bold;">\f</span>rac{1}{x}}{4}<span style="color: #000099; font-weight: bold;">\r</span>ight)$'</span>,
	r<span style="color: #483d8b;">'$s(t) = <span style="color: #000099; font-weight: bold;">\m</span>athcal{A}<span style="color: #000099; font-weight: bold;">\s</span>in(2 <span style="color: #000099; font-weight: bold;">\o</span>mega t)$'</span>,
	r<span style="color: #483d8b;">'$<span style="color: #000099; font-weight: bold;">\s</span>um_{n=1}^<span style="color: #000099; font-weight: bold;">\i</span>nfty<span style="color: #000099; font-weight: bold;">\f</span>rac{-e^{i<span style="color: #000099; font-weight: bold;">\p</span>i}}{2^n}$'</span>
	<span style="color: black;">&#93;</span>
latexmath2png.<span style="color: black;">math2png</span><span style="color: black;">&#40;</span>eqs, <span style="color: #dc143c;">os</span>.<span style="color: black;">getcwd</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, prefix = pre<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> window_destroy<span style="color: black;">&#40;</span>widget<span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>eqs<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
		<span style="color: #dc143c;">os</span>.<span style="color: black;">unlink</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">getcwd</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, <span style="color: #483d8b;">'%s%d.png'</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>pre, i + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	gtk.<span style="color: black;">main_quit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
window = gtk.<span style="color: black;">Window</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
window.<span style="color: black;">set_border_width</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span>
window.<span style="color: black;">set_title</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'LaTeX Equations in GTK'</span><span style="color: black;">&#41;</span>
window.<span style="color: black;">connect</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'destroy'</span>, window_destroy<span style="color: black;">&#41;</span>
vbox = gtk.<span style="color: black;">VBox</span><span style="color: black;">&#40;</span>spacing = <span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span>
window.<span style="color: black;">add</span><span style="color: black;">&#40;</span>vbox<span style="color: black;">&#41;</span>
&nbsp;
images = <span style="color: black;">&#91;</span><span style="color: #008000;">None</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">*</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>eqs<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>eqs<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
	images<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span> = gtk.<span style="color: black;">image_new_from_file</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%s%d.png'</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>pre, i + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	vbox.<span style="color: black;">pack_start</span><span style="color: black;">&#40;</span>images<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
window.<span style="color: black;">show_all</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
gtk.<span style="color: black;">main</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<div class="shr-publisher-243"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2009/09/10/howto-use-latex-mathematical-expressions-in-pygtk">Permalink</a> |
<a href="http://inspirated.com/2009/09/10/howto-use-latex-mathematical-expressions-in-pygtk#comments">2 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/equation" rel="tag">Equation</a>, <a href="http://inspirated.com/tag/flag-42" rel="tag">Flag 42</a>, <a href="http://inspirated.com/tag/graphics" rel="tag">Graphics</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/latex" rel="tag">LaTeX</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/python" rel="tag">Python</a>, <a href="http://inspirated.com/tag/tex" rel="tag">TeX</a>, <a href="http://inspirated.com/tag/tutorial" rel="tag">Tutorial</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2009/09/10/howto-use-latex-mathematical-expressions-in-pygtk/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.891 seconds -->

