<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3222954470682392376</id><updated>2012-01-23T15:38:15.480+05:30</updated><category term='iep'/><category term='mobile'/><category term='chaco'/><category term='pydev'/><category term='proxy'/><category term='academic calendar'/><category term='cluster'/><category term='open hardware'/><category term='phoenix kit'/><category term='blender'/><category term='fedora'/><category term='nnps'/><category term='tracing'/><category term='firefox'/><category term='readibility'/><category term='overheat'/><category term='thermal_handler'/><category term='nokia'/><category term='cython'/><category term='python'/><category term='real programmer'/><category term='hard disk'/><category term='sph'/><category term='3proxy'/><category term='parallel'/><category term='windows'/><category term='citation'/><category term='animate'/><category term='eclipse'/><category term='linux'/><category term='simulation'/><category term='coverage'/><category term='fractured monsoon'/><category term='kitten'/><category term='research'/><category term='gdb'/><category term='transparent proxy'/><category term='debuginfo'/><category term='bench'/><category term='graphics'/><category term='N8'/><category term='courseware'/><category term='spyder'/><category term='systemtap'/><category term='numpy'/><category term='exfalso'/><category term='salome'/><category term='smoking'/><category term='kernel'/><category term='optimization'/><category term='zotero'/><category term='ide'/><category term='audio tag editor'/><category term='nautilus'/><title type='text'>novice blogger</title><subtitle type='html'>To b(log) or not to b(log), that is the question</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.pankajp.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5899773478477649452</id><published>2011-06-27T22:32:00.001+05:30</published><updated>2011-06-27T22:36:22.871+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sph'/><title type='text'>SPH in movies</title><content type='html'>&lt;h1 class="entry-title five"&gt;Superman returns – but who’s looking after his&amp;nbsp;water?&lt;/h1&gt;&lt;div id="slot1" class="image1"&gt;      &lt;img alt="Aapone-20090513000179000144-topshots-australia-film-auction-superman-original" data-id="1146" src="http://cdn.theconversation.edu.au/files/1146/width440/aapone-20090513000179000144-topshots-australia-film-auction-superman-original.jpg"&gt;&lt;br /&gt;        &lt;div&gt;          Is it a plane? No, it’s Smoothed Particle Hydrodynamics.&lt;br /&gt;          &lt;span class="source" title="Source"&gt;William West/AFP&lt;/span&gt;&lt;br /&gt;        &lt;/div&gt;    &lt;/div&gt;        &lt;p&gt;Watching films such as Superman Returns or The Day after Tomorrow, you would have seen dramatic sequences of surging water and crumbling buildings.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;While doing so, mathematics was probably the last thing you thought about; but without it, scenes of this nature would be virtually impossible.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Take the 2006 film Superman Returns. In one scene, a giant spherical object smashes into a water tank releasing a huge amount of water (see below).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;img src="http://cdn.theconversation.edu.au/files/1144/width440/Screen_shot_2011-05-18_at_4.02.30_PM.jpg"&gt;&lt;div&gt;Still image from Superman Returns. &lt;span style="color:#ccc;"&gt;Courtesy of Sony Pictures Imageworks&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Traditionally, the only possible way to create this kind of sequence would be to use small models – which produce unrealistic results. Or we could create a computer simulation.&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;Swapping droplets for particles&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;These days, one of the most popular methods for simulating water is to replace fluid with millions of individual particles within a computer simulation.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And the way these particles move is determined by an algorithm that my colleagues and I invented to simulate the formation of stars in our galaxy’s giant molecular clouds.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The method is known as &lt;a href="http://en.wikipedia.org/wiki/Smoothed-particle_hydrodynamics"&gt;Smoothed Particle Hydrodynamics&lt;/a&gt; (SPH) and the use of SPH in Superman Returns is the work of an American visual effects company called &lt;a href="http://www.tweaksoftware.com/tweak-films/tweak-films"&gt;Tweak&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Superman Returns certainly isn’t the only film to feature SPH fluid simulations: think of &lt;a href="http://www.youtube.com/watch?v=UqlaeTphDho#t=0m06s"&gt;Gollum falling into the lava of Mount Doom&lt;/a&gt; in Lord of the Rings: Return of the King; or the huge alligator splashing through a swamp in Primeval.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;These particular scenes are the work of people at a Spanish visual effects company called &lt;a href="http://www.nextlimit.com/"&gt;NextLimit&lt;/a&gt;, who &lt;a href="http://architosh.com/2008/01/next-limit-wins-academy-award/"&gt;received an Oscar&lt;/a&gt; for their troubles.&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;How does SPH work?&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;Rather than trying to model a body of water as a whole, SPH replaces the fluid with a set of particles. A mathematical technique then uses the position and masses of these particles to determine the density of the fluid being modelled.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Using the density and pressure of the fluid, SPH makes it possible to map the force acting on each particle within the fluid. This technique provides results quite similar to the actual fluid being modelled. And the more particles used in the simulation, the more accurate the model becomes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;iframe src="http://www.youtube.com/embed/PCS7EgAftRQ?rel=0#t=0m02s" allowfullscreen="" frameborder="0" height="280" width="440"&gt;&lt;/iframe&gt;&lt;div&gt;This SPH simulation uses 128,000 particles to model a fluid.&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;Beyond the basics&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;In Superman Returns, gravity also affects how the body of water behaves (the water spills out of the water tank) and SPH can easily be adapted to accomodate this.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In addition, fluids often need to flow around solid bodies such as rocks and buildings that might be carried, bobbing along, by the flow. The SPH method can be easily extended to handle this combination of solid bodies and fluids by adding sets of particles to the equation, to represent the solid bodies.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;These adjustments and extensions to SPH can be made to produce very realistic-looking results.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In industry, SPH is used to describe the motion of offshore rigs in a storm, fluid flow in pumps, and injection moulding of liquid metals. In zoology, it’s being used to investigate the dynamics of fish.&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;SPH and the stars&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;As hinted at above, it’s not just water and its inhabitants that can be modelled using this technique.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;SPH simulations of star formation by Matthew Bate, from the University of Exeter, and Daniel Price, of Monash, have been able to &lt;a href="http://users.monash.edu.au/%7Edprice/pubs/magsf/price_stromlo06.pdf"&gt;predict the masses of the stars&lt;/a&gt;, and the number of stable two- and three-star systems that form from a typical molecular cloud.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In the case of stable two-star systems (known as &lt;a href="http://www.universetoday.com/24203/what-is-a-binary-star/"&gt;binaries&lt;/a&gt;) SPH can predict the shape of the orbits in good agreement with astronomical observations.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;To get this level of accuracy, millions of particles are used in the SPH calculation, and the motion of these particles is calculated on a number of computer systems that work together in &lt;a href="https://computing.llnl.gov/tutorials/parallel_comp/#Whatis"&gt;parallel&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;iframe src="http://www.youtube.com/embed/IxKdtjVDh8s?rel=0" allowfullscreen="" frameborder="0" height="360" width="440"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;SPH is also the method of choice for following the evolution of the universe after the Big Bang. This evolution involves &lt;a href="http://theconversation.edu.au/articles/new-chatter-on-dark-matter-1633"&gt;dark matter&lt;/a&gt; and gas, and the simulations have one set of SPH particles for the dark matter and one set for the gas.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;An advanced SPH code – known as &lt;a href="http://www.mpa-garching.mpg.de/gadget/"&gt;Gadget&lt;/a&gt; –  used for this purpose was developed by Volker Springel. The code enables astrophysicists to predict the way galaxies form and their distribution in the universe, including the effects of General Relativity.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But for non-astrophysicists, admittedly, the movies may be more of a draw.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So next time you’re watching a film and you see large swathes of water in unusual places or doing incredibly destructive things, think about maths for a moment: without it, such breathtaking scenes would be virtually impossible.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5899773478477649452?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://theconversation.edu.au/superman-returns-but-whos-looking-after-his-water-680' title='SPH in movies'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5899773478477649452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2011/06/sph-in-movies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5899773478477649452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5899773478477649452'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2011/06/sph-in-movies.html' title='SPH in movies'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/PCS7EgAftRQ/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5013968770100744179</id><published>2011-03-18T10:15:00.000+05:30</published><updated>2011-03-18T10:15:18.155+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='readibility'/><title type='text'>Readibility</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt; &lt;br /&gt;Note to myself:&lt;br /&gt;Quoted from &lt;a href="http://bethesignal.org/blog/2011/03/18/moving-needle-gnome-leadership/"&gt;http://bethesignal.org/blog/2011/03/18/moving-needle-gnome-leadership/ &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Contributors are your participants. If there is  nothing to contribute, you have no participants. If you have no  participants, you barely even have a project, let alone co-development!  For FLOSS projects, change has an incentive beyond improving the  software.&lt;/div&gt;&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Readability is the key to creating code that others will  use. Because in the end? We can scale silicon, but carbon? People are  much harder to scale.&lt;/blockquote&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;– Brian Aker,&amp;nbsp;&lt;a href="http://krow.livejournal.com/700783.html" target="_blank"&gt;Drizzle goes GA, From “What If”, to “What has”&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5013968770100744179?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://bethesignal.org/blog/2011/03/18/moving-needle-gnome-leadership/' title='Readibility'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5013968770100744179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2011/03/readibility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5013968770100744179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5013968770100744179'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2011/03/readibility.html' title='Readibility'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-8232037206034317061</id><published>2011-03-05T15:55:00.000+05:30</published><updated>2011-03-05T15:55:33.092+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='nokia'/><category scheme='http://www.blogger.com/atom/ns#' term='N8'/><title type='text'>My new mobile</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;At long last, i've got a new mobile, after years of using the venerable good old fellow Nokia 1100&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-3ZEKFae6TCI/TXIGW6D1Q8I/AAAAAAAAAQ4/lqXb4LKfQpc/s1600/22022011080.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="https://lh3.googleusercontent.com/-3ZEKFae6TCI/TXIGW6D1Q8I/AAAAAAAAAQ4/lqXb4LKfQpc/s320/22022011080.jpg" width="178" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;My old phone: Nokia N8 (circa 2005)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;There was not much wrong with the old phone apart from battery problem. However there was one thing which made me buy new phone earlier.&lt;br /&gt;Earlier last month Nokia announced at MWC its deal with MSFT, and the trojan horse that Elop proved himself. I loved Nokia and was waiting for a long time for the N9 with Meego to come to market. However this announcement quashed all my hopes. Hence i bought a Nokia phone while it was still available w/o Windows OS. And the best Nokia phone in market at the time in India was the Nokia N8.&lt;br /&gt;So this is my new phone, a silver Nokia N8.&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://www.youtube.com/watch?v=zULDfSS7h20" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="177" src="http://www.nokian8.org/nokia-n8-liggend.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;My new phone: Nokia N8&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Many people have asked my why Nokia instead of Android. Well it has really awesome hardware, even if the software Symbian^3 is not as snappy and does not have a million stupid apps in the Ovi store.&lt;br /&gt;Here are some things which impressed me:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;12 MPx camera with carl-zeiss lenses and xenon flash: I can assure you it can take really awesome pics and i know mega-pixels are not everything in photography. It has a really large sensor for a camera phone. Of course it cannot replace a dedicated DSLR camera (i don't have one), but is handy and good as my primary camera.&lt;/li&gt;&lt;li&gt;FM Transmitter: Yes you can start your own radio station upto a few meters. Not that i have any idea to use it, but still its a cool technology.&lt;/li&gt;&lt;li&gt;USB on the go: I can connect usb storage drives (pen drives and external hard disk drives directly to my mobile). USB keyboard and mouse can also be connected to the mobile.A mouse cursor moving in the mobile looks really cool.&lt;/li&gt;&lt;li&gt;Proper wireless and proxy support: My friend's android cannot connect to ad-hoc wireless networks and also does not support proxy on wlan, so the he needs to be connected to gprs.&lt;/li&gt;&lt;li&gt;I do not want google to know "ALL" about me. &lt;/li&gt;&lt;/ul&gt;One con of this mobile is that development on symbian has stopped, and linux support for symbian development is abysmal, and there's no FOSS compiler on linux to compile to symbain, and nokia remote compiler does not support proxy.&lt;br /&gt;If only pyside would work on N8, i'd be really happy. Anyone interested in a GSOC project for this please check here &lt;a href="http://developer.qt.nokia.com/wiki/PySide_GSoc_Ideas"&gt;http://developer.qt.nokia.com/wiki/PySide_GSoc_Ideas&lt;/a&gt;. Treat assured :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-8232037206034317061?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.nokia.co.in/find-products/products/nokia-n8' title='My new mobile'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/8232037206034317061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2011/03/my-new-mobile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8232037206034317061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8232037206034317061'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2011/03/my-new-mobile.html' title='My new mobile'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh3.googleusercontent.com/-3ZEKFae6TCI/TXIGW6D1Q8I/AAAAAAAAAQ4/lqXb4LKfQpc/s72-c/22022011080.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-8295336353592487264</id><published>2011-01-22T12:41:00.000+05:30</published><updated>2011-01-22T12:41:34.842+05:30</updated><title type='text'>Stay Healthy By Taking Breaks</title><content type='html'>&lt;a href="http://feedproxy.google.com/%7Er/amit/tech/%7E3/hCGKD-qpunk/stay-healthy-by-taking-breaks.html"&gt;Stay Healthy By Taking Breaks&lt;/a&gt;: "&lt;img src="http://planet.fedoraproject.org/images/heads/default.png" alt="" style="float: right;" /&gt;&lt;br /&gt;Most of us lead sedentary lifestyles these days -- most of our time is spent in front of computers. This slowly is causing a lot of problems people from previous generations haven't experienced: back aches, knee problems, wrist pains, myopia, among others. And just going to a gym or putting in one hour of physical activity a day isn't enough. It doesn't help balance the inactivity over the entire day.&lt;br /&gt;&lt;br /&gt;I recently wrote an &lt;a href="http://amitshah.fedorapeople.org/articles/Healthy-breaks.pdf"&gt;article&lt;/a&gt; in the &lt;a href="http://benefitmag.com/"&gt;BenefIT magazine&lt;/a&gt; that talks about two tools: &lt;a href="http://workrave.org/"&gt;Workrave&lt;/a&gt; and &lt;a href="http://www.rsibreak.org/"&gt;RSIBreak&lt;/a&gt;. Thanks to the publishers, the article is available in pdf format under a CC license.&lt;br /&gt;&lt;br /&gt;I've tried both the software but have been using Workrave for quite a while now and am quite happy with it. To briefly introduce them: both software prompt the user to take a break at regular intervals. They have timers that trigger at configured intervals asking the user to take a break. Workrave also has some stretching exercises suggested that can be performed in the longer breaks. The shorter (and more frequent) breaks can be used to take the eyes off the monitor and to relax them. &lt;a href="http://amitshah.fedorapeople.org/articles/Healthy-breaks.pdf"&gt;Read the article&lt;/a&gt; for more details.&lt;br /&gt;&lt;br /&gt;I've reviewed Workrave version 0.9.1 in the article, though the current version as of now is 0.9.3, which has a few differences from those mentioned in the article. The prime difference is the addition of a 'Natural Rest Break' that gets triggered when the screen-saver gets activated, which is nice since if the user walks away from the computer for a prolonged period of time, the rest break in effect has been taken, and the next one is scheduled after the configured duration once the screen-saver is unlocked.&lt;br /&gt;&lt;br /&gt;Both software are available in the Fedora repository: Workrave is based on the GTK toolkit (and integrates nicely with the GNOME desktop), whereas RSIBreak is based on the Qt toolkit (and integrates nicely with the KDE desktop). Give these software a try for a cheap but effective way of staying healthy!&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/8184990-7748997973838865843?l=log.amitshah.net" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/%7Er/amit/tech/%7E4/hCGKD-qpunk" width="1" height="1" /&gt;"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've installed Workrave now from the fedora repos. It seems much better than the gnome-typing-break in the keyboard preferences. RSIBreak tries to install a whole lot of KDE dependencies. If anyone of you sits for long hours on a computer, please be nice to yourself and prevent RSI (repetitive strain injury) and other such problems. If you think that working out a few hours in gym will counter it, you are mistaken.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-8295336353592487264?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://feedproxy.google.com/~r/amit/tech/~3/hCGKD-qpunk/stay-healthy-by-taking-breaks.html' title='Stay Healthy By Taking Breaks'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/8295336353592487264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2011/01/stay-healthy-by-taking-breaks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8295336353592487264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8295336353592487264'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2011/01/stay-healthy-by-taking-breaks.html' title='Stay Healthy By Taking Breaks'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-8209758155204308489</id><published>2011-01-18T10:46:00.000+05:30</published><updated>2011-01-18T10:46:11.665+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><title type='text'>firefox 4b9</title><content type='html'>Firefox 4 beta 9 is looking good, apart from no hw acceleration on linux.&lt;br /&gt;The minizable menu-bar is a very cool feature. Now all the UI is reduced to a single line on my firefox :)&lt;br /&gt;&lt;br /&gt;Here's a screenshot running &lt;a href="http://www.mozilla.com/en-US/firefox/beta/"&gt;firefox 4b9&lt;/a&gt; on &lt;a href="http://live.gnome.org/GnomeShell"&gt;gnome-shell&lt;/a&gt;. See how the menu, back-forward buttons, awesomebar, tabs, tabs-list, panorama all fit into a single line. Now thats some use of the wide laptop screens.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_Ai25IUBxGbI/TTUh8vtqQVI/AAAAAAAAAPw/YXNGSvgRE3U/s1600/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_Ai25IUBxGbI/TTUh8vtqQVI/AAAAAAAAAPw/YXNGSvgRE3U/s640/Screenshot-1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_Ai25IUBxGbI/TTUh6uIhygI/AAAAAAAAAPs/JeLK-TeTtGo/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_Ai25IUBxGbI/TTUh6uIhygI/AAAAAAAAAPs/JeLK-TeTtGo/s640/Screenshot.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-8209758155204308489?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.mozilla.com/en-US/firefox/' title='firefox 4b9'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/8209758155204308489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2011/01/firefox-4b9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8209758155204308489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8209758155204308489'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2011/01/firefox-4b9.html' title='firefox 4b9'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Ai25IUBxGbI/TTUh8vtqQVI/AAAAAAAAAPw/YXNGSvgRE3U/s72-c/Screenshot-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-4752878772249729273</id><published>2011-01-18T10:12:00.000+05:30</published><updated>2011-01-18T10:12:43.228+05:30</updated><title type='text'>Mathematics, History and worms eating manuscripts…</title><content type='html'>&lt;a href="http://feedproxy.google.com/%7Er/SatyamevaJayate/%7E3/wj_BqZcqd8E/"&gt;Mathematics, History and worms eating manuscripts…&lt;/a&gt;: "&lt;p&gt;This is &lt;strong&gt;a sad story of forgetten history, indifference towards ancient knowledge and wisdom &amp;amp; callous neglect&lt;/strong&gt;…Read on.. From &lt;strong&gt;&lt;a href="http://www.livemint.com/2011/01/03192858/A-search-for-India8217s-mat.html?atype=tp"&gt;A search for India’s mathematical roots&lt;/a&gt;&lt;/strong&gt;, some depressing &lt;strong&gt;excerpts&lt;/strong&gt; (emphasis added):&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;K. Ramasubramanian is the head of the Indian Institute of Technology, Bombay (IIT-B) research Cell for Indian Science and Technology in Sanskrit (CISTS), the only one of its kind in the country, where doctoral students translate the work of ancient Indian scientists into English, study language technology in Sanskrit that will help computers to analyse a wide range of speech and text, and make the translation and interpretation of Sanskrit texts easy.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;…“No country should allow the distortion of its own history,”&lt;/strong&gt; said Murli Manohar Joshi, former Union minister for human resource development, who had directed all the IIT campuses to set up a CISTS in 2002. Following the directive, IIT-B appointed Kulkarni to spearhead research in Sanskrit language technology in 2003. A year later, the institute brought Ramasubramanian on board.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;His students are now at different stages of translating primary Sanskrit texts (dating between the seventh and 15th centuries) of the Kerala School mathematics…All these texts work on the same principles, but work on different timescales. For instance, “Siddhanta texts help predict astronomical positions for a mahayuga (great age), which is about 4,320,000 years. The intermediate Tantra texts work with a yuga, one-tenth of that time—432,000 years. Finally, the Karna texts help quick calculations for as little as one month. My students are working with all three of these texts,” said Ramasubramanian.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;…But not every member of the team has scientific training. One of them is a trained astrologer and delighted to read the future. Dinesh Mohan Joshi, (grandson of an astrologer) said: “I saw my grandfather look at kundalis (a graphical representation of planetary positions at birth that charts the life course of the baby) and makes predictions. I saw them come true. I was fascinated. I wanted to be able to do that too. So, I went to (Shri) Lal Bahadur (Shastri) Sanskrit Vidyapeeth, Rashtriya Sanskrit Vidyapeeth and became an acharya (teacher) there. Then a friend told me about this cell and I decided to come.” Unlike Bhatt, his was an uphill struggle to master the mathematics, “because I had no formal training in the subject”.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;…And in Joshi’s struggle to learn mathematics, lies the biggest challenge that this venture faces, because “there just aren’t enough people who are skilled in both. If they know Sanskrit, they know little science. And if they are good scientists, they are not interested in Sanskrit or translation of Indian texts”, said Subramanian, explaining why, despite making an enormous effort, IIT has not been able to expand the cell. &lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align:center"&gt;&lt;a href="http://satyameva-jayate.org/wp-content/uploads/2011/01/K-Ramasubramanian.jpg"&gt;&lt;img title="K Ramasubramanian" src="http://satyameva-jayate.org/wp-content/uploads/2011/01/K-Ramasubramanian-182x300.jpg" alt="" height="300" width="182" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Photograph of &lt;strong&gt;K. Ramasubramanian, &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;courtesy: &lt;a href="http://www.hss.iitb.ac.in/faculty.php#ram"&gt;IIT Mumbai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Another challenge is of a different nature: Original manuscripts are either rotting or missing&lt;/strong&gt;. “I had gone to find out some text related to my research at the Kerala University library of manuscripts when I found worms eating four of seven manuscripts. I bought lemongrass oil and gave it to the librarian who said they were too short staffed to look after the documents,” said Ramasubramanian, lamenting that it was the same story across the country. “We simply do not take our historical heritage, intellectual heritage seriously.”&lt;/p&gt;&lt;br /&gt;&lt;p&gt;…&lt;strong&gt;The professors and students say they have to battle for respect in a country where history, especially the history of science has little value&lt;/strong&gt;. “Only recently, the cell has started getting more visibility, people have begun asking us to come and talk about our work. Slowly, people are becoming interested…” Kulkarni said.&lt;/p&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Reminded me of: &lt;a rel="bookmark" href="http://satyameva-jayate.org/2005/11/25/does-no-one-remember-the-hindu-contribution-to-mathematics/"&gt;Does no one remember the Hindu contribution to Mathematics?&lt;/a&gt; and t&lt;a href="http://satyameva-jayate.org/2007/08/20/hindu-contribution-to-mathematics-part2/"&gt;his on the Kerala School&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?a=wj_BqZcqd8E:I7rmfxwj5sc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?d=yIl2AUoC8zA" border="0" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?a=wj_BqZcqd8E:I7rmfxwj5sc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?i=wj_BqZcqd8E:I7rmfxwj5sc:F7zBnMyn0Lo" border="0" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?a=wj_BqZcqd8E:I7rmfxwj5sc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?i=wj_BqZcqd8E:I7rmfxwj5sc:gIN9vFwOqvQ" border="0" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?a=wj_BqZcqd8E:I7rmfxwj5sc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?d=qj6IDK7rITs" border="0" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?a=wj_BqZcqd8E:I7rmfxwj5sc:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?d=l6gmwiTKsz0" border="0" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?a=wj_BqZcqd8E:I7rmfxwj5sc:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/%7Eff/SatyamevaJayate?i=wj_BqZcqd8E:I7rmfxwj5sc:D7DqB2pKExk" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/%7Er/SatyamevaJayate/%7E4/wj_BqZcqd8E" height="1" width="1" /&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-4752878772249729273?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://feedproxy.google.com/~r/SatyamevaJayate/~3/wj_BqZcqd8E/' title='Mathematics, History and worms eating manuscripts…'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/4752878772249729273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2011/01/mathematics-history-and-worms-eating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4752878772249729273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4752878772249729273'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2011/01/mathematics-history-and-worms-eating.html' title='Mathematics, History and worms eating manuscripts…'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-6821169692884226888</id><published>2010-11-14T14:41:00.000+05:30</published><updated>2010-11-14T14:41:06.891+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='debuginfo'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>whY kernel development is not for the light-hearted</title><content type='html'>&amp;nbsp;The linux kernel is a huge behemoth &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[pankaj@pankajlaptop pysph-perf]$ su -&lt;br /&gt;Password: &lt;br /&gt;[root@pankajlaptop ~]# yum --enablerepo fedora-debuginfo --enablerepo updates-debuginfo install kernel-debuginfo&lt;br /&gt;Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit&lt;br /&gt;Adding en_US to language list&lt;br /&gt;Found 1 installed debuginfo package(s)&lt;br /&gt;Enabling rpmfusion-nonfree-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Debug&lt;br /&gt;Enabling rpmfusion-free-updates-debuginfo: RPM Fusion for Fedora 14 - Free - Updates Debug&lt;br /&gt;Enabling rpmfusion-free-debuginfo: RPM Fusion for Fedora 14 - Free - Debug&lt;br /&gt;Enabling rpmfusion-nonfree-updates-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Updates Debug&lt;br /&gt;Setting up Install Process&lt;br /&gt;Resolving Dependencies&lt;br /&gt;--&amp;gt; Running transaction check&lt;br /&gt;---&amp;gt; Package kernel-debuginfo.x86_64 0:2.6.35.6-48.fc14 set to be installed&lt;br /&gt;--&amp;gt; Processing Dependency: kernel-debuginfo-common-x86_64 = 2.6.35.6-48.fc14 for package: kernel-debuginfo-2.6.35.6-48.fc14.x86_64&lt;br /&gt;--&amp;gt; Running transaction check&lt;br /&gt;---&amp;gt; Package kernel-debuginfo-common-x86_64.x86_64 0:2.6.35.6-48.fc14 set to be installed&lt;br /&gt;--&amp;gt; Finished Dependency Resolution&lt;br /&gt;&lt;br /&gt;Dependencies Resolved&lt;br /&gt;&lt;br /&gt;=============================================================================================================================================================&lt;br /&gt;&amp;nbsp;Package&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Arch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Repository&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Size&lt;br /&gt;=============================================================================================================================================================&lt;br /&gt;Installing:&lt;br /&gt;&amp;nbsp;kernel-debuginfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x86_64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.6.35.6-48.fc14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updates-debuginfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 239 M&lt;br /&gt;Installing for dependencies:&lt;br /&gt;&amp;nbsp;kernel-debuginfo-common-x86_64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x86_64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.6.35.6-48.fc14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updates-debuginfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 37 M&lt;br /&gt;&lt;br /&gt;Transaction Summary&lt;br /&gt;=============================================================================================================================================================&lt;br /&gt;Install&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 Package(s)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Total download size: 276 M&lt;br /&gt;Installed size: 1.6 G&lt;/b&gt;&lt;br /&gt;Is this ok [y/N]: y&lt;br /&gt;Downloading Packages:&lt;br /&gt;Setting up and reading Presto delta metadata&lt;br /&gt;Processing delta metadata&lt;br /&gt;Package(s) data still to download: 276 M&lt;br /&gt;(1/2): kernel-debuginfo-2.6.35.6-48.fc14.x86_64.rpm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 239 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01:11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;(2/2): kernel-debuginfo-common-x86_64-2.6.35.6-48.fc14.x86_64.rpm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp; 37 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.3 MB/s | 276 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01:23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Running rpm_check_debug&lt;br /&gt;Running Transaction Test&lt;br /&gt;Transaction Test Succeeded&lt;br /&gt;Running Transaction&lt;br /&gt;&amp;nbsp; Installing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : kernel-debuginfo-common-x86_64-2.6.35.6-48.fc14.x86_64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/2 &lt;br /&gt;&amp;nbsp; Installing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : kernel-debuginfo-2.6.35.6-48.fc14.x86_64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/2 &lt;br /&gt;&lt;br /&gt;Installed:&lt;br /&gt;&amp;nbsp; kernel-debuginfo.x86_64 0:2.6.35.6-48.fc14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Dependency Installed:&lt;br /&gt;&amp;nbsp; kernel-debuginfo-common-x86_64.x86_64 0:2.6.35.6-48.fc14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Complete!&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@pankajlaptop ~]# &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-6821169692884226888?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/6821169692884226888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/11/why-kernel-development-is-not-for-light.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6821169692884226888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6821169692884226888'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/11/why-kernel-development-is-not-for-light.html' title='whY kernel development is not for the light-hearted'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5180827693042539728</id><published>2010-11-11T18:02:00.002+05:30</published><updated>2010-11-12T00:26:51.674+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='iep'/><category scheme='http://www.blogger.com/atom/ns#' term='spyder'/><title type='text'>python editors in python: spyder and iep</title><content type='html'>This post is gonna be about python editors (IDEs if you may call, not but quite so)&lt;br /&gt;&lt;br /&gt;If you are looking for IDEs, check out pydev and SPE, these are some of the best ones out there with integrated debugging features. There's also a wing editor which many people say is quite good, but i've never used it&lt;br /&gt;&lt;br /&gt;Here i'm gonna list opinions about &lt;a href="http://code.google.com/p/iep/"&gt;IEP&lt;/a&gt; and &lt;a href="http://code.google.com/p/spyderlib/"&gt;Spyder&lt;/a&gt;. I'm really interested in both of them and run their repository version.&lt;br /&gt;My main issue is i want a good editor for &lt;b&gt;cython&lt;/b&gt;, for which i am willing to get my hands dirty (a bit) and add some features myself (see &lt;a href="http://powerpan.blogspot.com/2010/10/cython-functions-coverage-revsited.html"&gt;http://powerpan.blogspot.com/2010/10/cython-functions-coverage-revsited.html&lt;/a&gt;), so if any of you can help me or have an opinion please do so.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Common features:&lt;/b&gt;&lt;br /&gt;Both are python editors written in python (pyqt)&lt;br /&gt;Both provide code completion support and outline&lt;br /&gt;Both have integrated python shells&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Differences:&lt;/b&gt;&lt;br /&gt;&lt;i&gt;Pros:&lt;/i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Spyder seems a bit more mature project&lt;br /&gt;Spyder has ipython shell which is more useful than a python shell&lt;br /&gt;IEP has outline support for cython&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Cons:&lt;/i&gt;&lt;br /&gt;Spyder seems to excessively misuse screen real estate - see this &lt;a href="http://code.google.com/p/spyderlib/issues/detail?id=443"&gt;issue&lt;/a&gt; (editor areas are quite small)&lt;br /&gt;IEP lacks some features such as tree file browser, shell variables, variable occurances marker, pylint support annotation&lt;br /&gt;IEP is officially only for Python3, though you can surely work with python2 files (Also check &lt;a href="http://code.google.com/r/pankaj86-iep-python2/source/browse"&gt;http://code.google.com/r/pankaj86-iep-python2/source/browse&lt;/a&gt; if you really want to run it in python2 only)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Features both lack:&lt;/b&gt;&lt;br /&gt;&lt;i&gt;Graphical Debugger:&lt;/i&gt; get the code from pydev/winpdb to provide a graphical debugger&lt;br /&gt;&lt;i&gt;Cython support:&lt;/i&gt; I could certainly do well with more cython support. Outlining (iep does that), completion support in cython and goto definition (including into cython file from a python file)&lt;br /&gt;&lt;i&gt;Profiling support:&lt;/i&gt; Simply run profiling and put the result data into a table (spreadsheet widget)&lt;br /&gt;&lt;i&gt;Documentation:&lt;/i&gt; More documentation is needed for both the projects, especially developer documentation to implement new interesting plugins, such as profiling, debugging etc&lt;br /&gt;Also it'd be cool if tooltips could be added to the editor to show documentation and other information on hovering on words in the editor, as in pydev&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Few ideas:&lt;/b&gt;&lt;br /&gt;Merge features from IEP to Spyder and vice versa. Add new features to both. Having two different projects is good in a way as it keep diversity and help in bringing new ideas. However that shouldn't mean they are independent without any co-operation. Both should surely work together to bring new features.&lt;br /&gt;&lt;br /&gt;NOTE: The content may get outdated as you are reading it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5180827693042539728?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5180827693042539728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/11/python-editors-in-python-spyder-and-iep.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5180827693042539728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5180827693042539728'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/11/python-editors-in-python-spyder-and-iep.html' title='python editors in python: spyder and iep'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-4290296149558299585</id><published>2010-10-31T10:35:00.003+05:30</published><updated>2010-10-31T11:07:26.937+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='3proxy'/><category scheme='http://www.blogger.com/atom/ns#' term='transparent proxy'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>linux proxy problem revisited</title><content type='html'>Some time &lt;a href="http://powerpan.blogspot.com/2010/06/linux-proxy-problem.html"&gt;back&lt;/a&gt; i posted how to setup a local forwarding proxy in linux so that u do not need to set your proxy password in each and every program that asks, and that anyone and everyone cannot see your passwords by simply typing "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;echo $http_proxy&lt;/span&gt;"&lt;br /&gt;But again it was not so automatic, you still needed to set the proxy to localhost "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;http://127.0.0.1:3128/&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;Now this post is to make that also redundant. No program connecting to http (port 80) (not https) needs to have the proxy set. This is done by a &lt;b&gt;transparent proxy (intercepting proxy)&lt;/b&gt;, which 3proxy is by default without requiring any specific configuration (squid needs some option to be set in its config file)&lt;br /&gt;&lt;br /&gt;Firstly set up the local forwarding proxy as mentioned in my previous post &lt;a href="http://powerpan.blogspot.com/2010/06/linux-proxy-problem.html"&gt;http://powerpan.blogspot.com/2010/06/linux-proxy-problem.html&lt;/a&gt;&lt;br /&gt;Now you need to set an iptables (default linux firewall) policy which will redirect all outgoing traffic to port 80 to the local proxy at port 3128&lt;br /&gt;You also need some way to exclude&amp;nbsp; the proxy itself from being redirected. So do the following:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Create a specific user for 3proxy&lt;/b&gt;: &lt;br /&gt;Create a user on your computer (say 3proxy) with a specific uid (say 480)&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# useradd -u 480 3proxy&lt;/span&gt;&lt;br /&gt;Now in the 3proxy config file set it to change its user to 3proxy. Just before the "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;proxy&lt;/span&gt;" line in /etc/3proxy.cfg add the following line:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;setuid 480&lt;/span&gt;&lt;br /&gt;and restart the 3proxy service:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# service 3proxy restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Redirect outgoing http traffic to local proxy&lt;/b&gt;&lt;br /&gt;Here's an iptables rule that forwards outgoing traffic on port 80 (excluding those from user 3proxy) to the local proxy.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner 3proxy --dport 80 -j REDIRECT --to-port 3128&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thats all. Now you are done. To make it persistent across reboots add it to some startup file (/etc/profile.d/).&lt;br /&gt;&lt;br /&gt;If you are on &lt;a href="http://fedoraproject.org/"&gt;Fedora&lt;/a&gt; there's a better way:&lt;br /&gt;Create a file (&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/etc/iptables-transparent-proxy&lt;/span&gt;) with the following line:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-A OUTPUT -p tcp -m owner ! --uid-owner 3proxy -m tcp --dport 80 -j REDIRECT --to-ports 3128&lt;/span&gt;&lt;br /&gt;Now open &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;system -&amp;gt; config -&amp;gt; firewall&lt;/span&gt; and in the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Custom Rules&lt;/span&gt; (bottommost filter on the left) add a new rule with &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;protocol:ipv4&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;table:nat&lt;/span&gt; and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;file:/etc/iptables-transparent-proxy&lt;/span&gt; and you are done.&lt;br /&gt;&lt;br /&gt;To test it, open a terminal, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;unset http_proxy&lt;/span&gt; and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;wget google.com&lt;/span&gt;. The &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;index.html&lt;/span&gt; file should be downloaded&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This automatic forwarding does not work for https sites which are specifically designed to prevent such things (man-in-the-middle attacks)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Outgoing http traffic to any port other than 80 is not redirected&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-4290296149558299585?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/4290296149558299585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/10/linux-proxy-problem-revisited.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4290296149558299585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4290296149558299585'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/10/linux-proxy-problem-revisited.html' title='linux proxy problem revisited'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-1609211193365736224</id><published>2010-10-30T19:04:00.000+05:30</published><updated>2010-10-30T19:04:00.500+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='coverage'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='cython'/><title type='text'>cython functions coverage revsited</title><content type='html'>A &lt;a href="http://powerpan.blogspot.com/2010/10/cython-functions-coverage-using.html"&gt;few days back&lt;/a&gt; i showed how to get coverage of cython functions using Ned Batchelder's coverage.py&lt;br /&gt;In that post i had posted a patch to coveragepy to enable cython function coverage.&lt;br /&gt;&lt;br /&gt;However i realize that many of my friends have never applied a patch before, dont have admin rights on few machines few other problems which may hinder their using this new feature, so here's a good new for you.&lt;br /&gt;&lt;br /&gt;I've rewritten the patch into a single file &lt;a href="https://sites.google.com/site/pankaj86/files/pyx_coverage.py"&gt;pyx_coverage.py&lt;/a&gt; . You can directly use this file instead of 'coverage' command to get cython function coverage, no need to patch anything. You still need to have Ned's coveragepy installed though.&lt;br /&gt;&lt;br /&gt;All commands/options/configuration files for coveragepy are applicable here too.&lt;br /&gt;&lt;br /&gt;To find coverage of cython files (pyx extension) you need to do following:&lt;br /&gt;1. compile cython code to 'c' with directive profile=True&lt;br /&gt;2. keep source pyx files in same locations as the compiled .so files&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i.e. use 'python setup.py build_ext --inplace' or 'python setup.py develop'&lt;br /&gt;3. run coverage (this file) with the option timid enabled (can also set in in .coveragerc)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i.e. 'python pyx_coverage.py run --timid my_module.py'&lt;br /&gt;&lt;br /&gt;You can use nose test collector as follows:&lt;br /&gt;$ python pyx_coverage.py run /path/to/nosetests /path/to/source&lt;br /&gt;&lt;br /&gt;replacing the /paths as appropriate&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download the file from here&lt;/b&gt;: &lt;a href="https://sites.google.com/site/pankaj86/files/pyx_coverage.py"&gt;https://sites.google.com/site/pankaj86/files/pyx_coverage.py&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reader's Bonus&lt;/b&gt;: If you can help me write a python c extension for this treat assured.&lt;br /&gt;Hint: See Ned's coverage.tracer python c extension.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-1609211193365736224?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/1609211193365736224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/10/cython-functions-coverage-revsited.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/1609211193365736224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/1609211193365736224'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/10/cython-functions-coverage-revsited.html' title='cython functions coverage revsited'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-6024325216616459228</id><published>2010-10-25T15:50:00.000+05:30</published><updated>2010-10-25T15:50:42.330+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='coverage'/><category scheme='http://www.blogger.com/atom/ns#' term='cython'/><title type='text'>cython functions coverage using coverage.py</title><content type='html'>For all the coders out there, if you have not been writing &lt;a href="http://en.wikipedia.org/wiki/Unit_testing"&gt;unit tests&lt;/a&gt; for your code then god bless you, but if you do write tests here's another tool you must use: &lt;a href="http://en.wikipedia.org/wiki/Code_coverage"&gt;code coverage&lt;/a&gt;.&lt;br /&gt;In python, on of the  most popular code coverage tools is Ned Batchelder's coverage.py. It reports statement coverage of all your tests and also can report coverage in beautiful html pages.Its a very nice tool and also integrates well with testing frameworks such as &lt;a href="http://code.google.com/p/python-nose/"&gt;nose&lt;/a&gt; to automate your testing and coverage reporting tasks.&lt;br /&gt;&lt;br /&gt;But, for all those who use &lt;a href="http://www.cython.org/"&gt;cython&lt;/a&gt;, you must surely be aware of the difficulties it brings along while testing, you can never be sure if "all is well". coverage.py doesn't report coverage of cython modules, as those are compiled into native functions.&lt;br /&gt;To mitigate this problem to some extent, i wrote a simple &lt;a href="https://sites.google.com/site/pankaj86/files/pyx_patch.diff"&gt;patch &lt;/a&gt;to enable coverage.py to report function coverage (not statement coverage) of cython pyx files too, hurray. So now after applying the patch to coverage, all you need to do is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;compile cython code with profiling enabled (cython --directive profile=True)&lt;/li&gt;&lt;li&gt;run your tests under coverage  as you would normally do taking care to add the timid option (coverage --timid test.py)&lt;/li&gt;&lt;li&gt;???&lt;/li&gt;&lt;li&gt;profit&lt;/li&gt;&lt;/ol&gt;So now that you can profit, i'd be greatly thankful if someone comes up and writes this patch into the &lt;b&gt;tracer.c&lt;/b&gt; file in the coverage source (it's very simple, get the source using $ &lt;i&gt;hg clone http://bitbucket.org/ned/coveragepy&lt;/i&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-6024325216616459228?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/6024325216616459228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/10/cython-functions-coverage-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6024325216616459228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6024325216616459228'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/10/cython-functions-coverage-using.html' title='cython functions coverage using coverage.py'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5083431361140559385</id><published>2010-07-13T14:38:00.000+05:30</published><updated>2010-07-13T14:38:03.792+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='audio tag editor'/><category scheme='http://www.blogger.com/atom/ns#' term='exfalso'/><category scheme='http://www.blogger.com/atom/ns#' term='nautilus'/><title type='text'>Nautilus media tag editor extension by yours truly</title><content type='html'>Over this weekend, i was searching for something to do (not that i dont have tasks piled up), and i remembered there was no easy way to edit audio files tags. I know there are some excellent programs out there such as &lt;a href="http://easytag.sourceforge.net/"&gt;easytag&lt;/a&gt; and &lt;a href="http://code.google.com/p/quodlibet/"&gt;exfalso&lt;/a&gt; . However they need you to run a separate program to edit the tags.&lt;br /&gt;Also there is a nautilus extension provided by totem that displays the metadata in the file properties dialog, but cannot edit it. I thought i may be a good idea to make a metadata editor extension for nautilus, so thats what i came up with.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installation:&lt;/b&gt;&lt;br /&gt;The extension requires that exfalso be installed on your computer (since it directly uses the exfalso metadata editor). On fedora, its a simple command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ yum install quodlibet&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The extension itself is a single python file which you need to put into a directory ~/.nautilus/python-extensions/ (create the directory if it does not exist). The file is available at: &lt;a href="https://sites.google.com/site/pankaj86/files/media_tag_editor.py"&gt;https://sites.google.com/site/pankaj86/files/media_tag_editor.py&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now the mandatory screenshot:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_Ai25IUBxGbI/TDwrsZpL8MI/AAAAAAAAAOE/T6COxom-Ti0/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_Ai25IUBxGbI/TDwrsZpL8MI/AAAAAAAAAOE/T6COxom-Ti0/s640/Screenshot.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_Ai25IUBxGbI/TDwr2zlIYxI/AAAAAAAAAOI/gsGt7lciUBA/s1600/Screenshot-file.mp3+Properties.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="325" src="http://1.bp.blogspot.com/_Ai25IUBxGbI/TDwr2zlIYxI/AAAAAAAAAOI/gsGt7lciUBA/s400/Screenshot-file.mp3+Properties.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5083431361140559385?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5083431361140559385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/07/nautilus-media-tag-editor-extension-by.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5083431361140559385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5083431361140559385'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/07/nautilus-media-tag-editor-extension-by.html' title='Nautilus media tag editor extension by yours truly'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Ai25IUBxGbI/TDwrsZpL8MI/AAAAAAAAAOE/T6COxom-Ti0/s72-c/Screenshot.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-4017282159745503724</id><published>2010-07-12T12:03:00.001+05:30</published><updated>2010-07-12T12:04:25.322+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><category scheme='http://www.blogger.com/atom/ns#' term='bench'/><title type='text'>benchmarking pitfalls</title><content type='html'>In this post i'm going to list some of the pitfalls which can happen when you are trying to optimize your code and test the timings of specific code snippets.&lt;br /&gt;&lt;br /&gt;As an example, consider the case of testing the performance of custom array class implemented in pysph at &lt;a href="http://code.google.com/p/pysph/source/browse/source/pysph/base/carray.pyx?repo=kunalp-alternate"&gt;http://code.google.com/p/pysph/source/browse/source/pysph/base/carray.pyx?repo=kunalp-alternate&lt;/a&gt; , which is a simple substitute for 1D numpy arrays.&lt;br /&gt;&lt;br /&gt;Now in orfer to test the performace i wrote a simple benchmark code:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;cpdef dict loopget(ns=Ns):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef double t, t1, t2, num&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef int N, i&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef dict ret = {}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; empty = numpy.empty&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; zeros = numpy.zeros&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef DoubleArray carr&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef numpy.ndarray[ndim=1, dtype=numpy.float64_t] narr&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for N in ns:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; carr = DoubleArray(N)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t = time()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(N):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num = carr[i]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t = time()-t&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; narr = zeros(N)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1 = time()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(N):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num = narr[i]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1 = time()-t1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t2 = time()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(N):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num = carr.data[i]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t2 = time()-t2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret['carr loopget %d'%N] = t/N&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret['carrd loopget %d'%N] = t2/N&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret['narr loopget %d'%N] = t1/N&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ret&lt;/div&gt;&lt;br /&gt;This snippet simply times the retrieval of a value from a custom DoubleArray class (using its data attribute which is a c array) versus a numpy buffer, both should ideally be at c speed, but the numpy buffer is not unless you disable cython array bounds check.&lt;br /&gt;Now if you run it you would be surprized to see the timings:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 9.05990600586e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 3.38554382324e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 10000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 3.42130661011e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 100000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 3.51309776306e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 9.53674316406e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 9.53674316406e-10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 10000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 9.53674316406e-11&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 100000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 9.53674316406e-12&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 9.53674316406e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 1.90734863281e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 10000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 1.09672546387e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 100000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 1.01089477539e-09&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Strangely, getting the value in the c data array is extremely fast, and in fact takes the same time independent of the size of the array.&lt;br /&gt;My first thought was that the access time in C was extremely small as compared to the time it took to call the python's time function. However my readings about gcc and compiler optimizations came to my mind.&lt;br /&gt;Trick: Note that the assignment which is tested in the code snippet does not affect any other part of the code, and the variable num is never even read again. Hence the compiler optimizes it away (this technique is called dead code removal). Thus in the case of C array access the assignments do not occur at all. This does not happen for the other two parts because in calling python functions the compiler can never be sure what is done of the variables, and hence cannot reliably determine whether the assignment has any side-effect or not, so that the assignment is not removed while compilation.&lt;br /&gt;&lt;br /&gt;Keeping this fact in mind, let us try to modify the test code so that this specific optimization does not take place. Consider our new test code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;cpdef dict loopget(ns=Ns):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef double t, t1, t2, num&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef int N, i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef dict ret = {}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; empty = numpy.empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; zeros = numpy.zeros&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="background-color: yellow;"&gt;cdef dict d = {}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef DoubleArray carr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef numpy.ndarray[ndim=1, dtype=numpy.float64_t] narr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for N in ns:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; carr = DoubleArray(N)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t = time()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(N):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num = carr[i]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t = time()-t&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="background-color: yellow;"&gt;d[num] = num&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; narr = zeros(N)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1 = time()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(N):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num = narr[i]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1 = time()-t1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="background-color: yellow;"&gt;d[num] = num&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t2 = time()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(N):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num = carr.data[i]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t2 = time()-t2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="background-color: yellow;"&gt;d[num] = num&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret['carr loopget %d'%N] = t/N&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret['carrd loopget %d'%N] = t2/N&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret['narr loopget %d'%N] = t1/N&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ret&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The purpose of these added statements is to make sure that the assignment to num is not useless and that the compiler does not optimize it away. Since the new statements occur outside the time() calls it shouldn't affect our tests.&lt;br /&gt;Let us now check the new timings:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 1.19209289551e-07&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 4.19616699219e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 10000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 4.52041625977e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carr loopget 100000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 4.62603569031e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 9.53674316406e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 3.09944152832e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 10000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 1.31130218506e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;carrd loopget 100000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 1.07049942017e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 2.14576721191e-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 2.86102294922e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 10000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 1.69277191162e-09&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;narr loopget 100000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 2.29835510254e-09&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see now the times are more reasonable.&lt;br /&gt;Conclusion: Timing  testing code is not a trivial thing to do :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-4017282159745503724?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/4017282159745503724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/07/benchmarking-pitfalls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4017282159745503724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4017282159745503724'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/07/benchmarking-pitfalls.html' title='benchmarking pitfalls'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-2813315486979846219</id><published>2010-07-09T22:04:00.001+05:30</published><updated>2010-07-09T22:12:40.402+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='nnps'/><title type='text'>nearest particle search</title><content type='html'>Nearest neighbour particle search (NNPS) is&amp;nbsp; a common requirement of (meshfreee) particle methods, such as SPH. The requirement is to locate all particles within a fixed distance (the kernel support) of a specified particle, and the trick is to avoid doing brute-force distance comparison of every particle with every other particle (O(N^2)). There are many techniques available to implement this. One of the simplest for a fixed kernel support of all particles is to bin the particles and then search for the particles only in the neighbouring bins. Such a technique is implemented here: &lt;a href="http://code.google.com/p/pysph/source/browse/source/pysph/base/nnps.pyx?repo=kunalp-alternate"&gt;http://code.google.com/p/pysph/source/browse/source/pysph/base/nnps.pyx?repo=kunalp-alternate&lt;/a&gt;.&lt;br /&gt;Here i'm gonna present some timings for the nnps. Note that the timings are old and also include some constant extra times for other operations (calling of rand() numpy function which i've now converted to the c rand() function).&lt;br /&gt;&lt;br /&gt;Here are the timings result (Click on image to view the raw data sheet) :&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://spreadsheets.google.com/pub?key=0AomYDYyBBNkkdGNTME81TWgxN1p2alZndGFXd0NfZlE&amp;amp;authkey=CNWZrsME&amp;amp;hl=en&amp;amp;single=true&amp;amp;gid=0&amp;amp;output=html" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://spreadsheets.google.com/oimg?key=0AomYDYyBBNkkdGNTME81TWgxN1p2alZndGFXd0NfZlE&amp;amp;oid=1&amp;amp;zx=amk8wx-yj1kav" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://spreadsheets.google.com/pub?key=0AomYDYyBBNkkdGNTME81TWgxN1p2alZndGFXd0NfZlE&amp;amp;authkey=CNWZrsME&amp;amp;hl=en&amp;amp;single=true&amp;amp;gid=0&amp;amp;output=html" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://spreadsheets.google.com/oimg?key=0AomYDYyBBNkkdGNTME81TWgxN1p2alZndGFXd0NfZlE&amp;amp;oid=2&amp;amp;zx=ut1jyw-r72nw4" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As you can see, it shows that the bin size should be atleast thrice the kernel support size to get good performance.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://spreadsheets.google.com/pub?key=0AomYDYyBBNkkdGNTME81TWgxN1p2alZndGFXd0NfZlE&amp;amp;authkey=CNWZrsME&amp;amp;hl=en&amp;amp;single=true&amp;amp;gid=0&amp;amp;output=html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-2813315486979846219?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/2813315486979846219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/07/nearest-particle-search.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2813315486979846219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2813315486979846219'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/07/nearest-particle-search.html' title='nearest particle search'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-6732813668773976826</id><published>2010-07-07T21:39:00.002+05:30</published><updated>2010-07-07T21:40:54.303+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><title type='text'>aero nebula cluster</title><content type='html'>For those who do not know, i'm currently in my last year of the DD program in Aerospace engineering, and my project is implementation of solid mechanics code using SPH (smoothed particle hydrodynamics) integrated into the &lt;a href="http://code.google.com/p/pysph/"&gt;pysph&lt;/a&gt; project.&lt;br /&gt;It pysph is basically a SPH implementation framework written in python/cython. (Now you know my reason for all those optimization posts :) ).&lt;br /&gt;Now for most CFD codes, you need to run them in parallel on clusters so as to reduce the time required. So i just saw the specs of the nebula cluster (on which i have login) in aero department. Its really wonderful. The specs are:&lt;br /&gt;20 nodes (15 working) each node with 12 six-core AMD opteron 2427 processors with 2.2 GHz xloxk speed and 12 GB RAM, in all 180 6-core processors.&lt;br /&gt;This is sure gonna make parallelizing much more fun and interesting.&lt;br /&gt;PS: I just rad and saw quite a few videos from google about their patented map-reduce technique. It would be interesting to implement SPH in map-reduce and let it run in the "cloud", the buzzword of today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-6732813668773976826?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/6732813668773976826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/07/aero-cluster.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6732813668773976826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6732813668773976826'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/07/aero-cluster.html' title='aero nebula cluster'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-7301547294431370503</id><published>2010-06-17T21:55:00.005+05:30</published><updated>2010-10-31T21:01:44.959+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='3proxy'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>the linux proxy problem</title><content type='html'>For those of you who use linux for anything more than web browsing (in university/office) must be aware of the problems a proxy can pose. In many places as in my institute, you need to necessarily use a specified proxy server to access outside world, needing authentication for your credentials.&lt;br /&gt;In my college, a common login registered in a central ldap server provides for all authentication services (used for course registration/fees payments/emails/proxy/...). Hence it is very important to protect it. Here i will show one way to avoid anyone easily getting your password.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Network proxy loophole in GNOME:&lt;/b&gt;&lt;br /&gt;If you are using GNOME (default Fedora/Ubuntu) and you set your proxy details in "system-&amp;gt;preferences-&amp;gt;network proxy" then you open a simple loophole in the settings.&lt;br /&gt;After setting your username/password, open a new terminal and type&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $http_proxy&lt;/span&gt;&lt;br /&gt;Now you can clearly see your password as&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://&amp;lt;user&amp;gt;:&amp;lt;pass&amp;gt;@proxy.com:3128/&lt;br /&gt;Now since many people come to your rooms in colleges you can see how simple it is to get your credentials.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Is there a way out:&lt;/b&gt;&lt;br /&gt;There may be other ways, but here's the one which i follow. I create a local forwarding proxy server on my own computer and direct all applications to use that proxy. The settings for my proxy server are written in a file only readable by the root.&lt;br /&gt;What follows is a step-by-step guide to set it up. Tested on Fedora&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What do i use:&lt;/b&gt;&lt;br /&gt;I use a small proxy server &lt;a href="http://www.3proxy.ru/"&gt;3proxy&lt;/a&gt;, you could also use any other proxy server such as &lt;a href="http://www.squid-cache.org/"&gt;squid&lt;/a&gt;. In fact i used to use squid before i came to know of 3proxy (when it was packaged in fedora). Squid is a much more feature rich and heavy proxy. When i was using it had a bug whereby it would do at least 100 cpu wakeups per second, using precious power on my laptop. This may have been fixed by now.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installation:&lt;/b&gt;&lt;br /&gt;&amp;nbsp;On Fedora systems you can do&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; yum install 3proxy&lt;/span&gt;&lt;br /&gt;A similar command for apt-get may work on Ubuntu (i've never tried)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Configuration:&lt;/b&gt;&lt;br /&gt;The configuration you need to do is&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open the file /etc/3proxy.cfg in editor of your choice as root&lt;/li&gt;&lt;li&gt;Locate the line containing 'proxy -n'&lt;/li&gt;&lt;li&gt;Above this line, upto the line 'dnspr', comment out all uncommented lines and instead add the following lines:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;auth iponly&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;allow * * 127.0.0.0/24,&amp;lt;local_IPs&amp;gt; * * * *&lt;/span&gt; &lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;allow * * * * * * *&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;parent 1000 http &amp;lt;proxy.server.com&amp;gt; &amp;lt;port&amp;gt; &amp;lt;proxy_user&amp;gt; &amp;lt;proxy_pass&lt;/span&gt;&amp;gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;proxy -n&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The values in angle brackets need to be replaced by you configuration The values for my college are given in parenthesis&lt;br /&gt;&amp;lt;local IPs&amp;gt; = ips not connected through proxy [10.0.0.0/8]&lt;br /&gt;&amp;lt;proxy.server.name&amp;gt; = proxy server [netmon.iitb.ac.in]&lt;br /&gt;&amp;lt;port&amp;gt; = proxy port [80]&lt;br /&gt;&amp;lt;proxy_user&amp;gt; = proxy authentication username&lt;br /&gt;&amp;lt;proxy_pass&amp;gt; = proxy authentication password&lt;/li&gt;&lt;li&gt;Comment out all lines with the content:&lt;br /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;socks&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;  &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;pop3p&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;  &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ftppr&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;  &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;admin&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;  &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;dnspr&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;  &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;tcppm&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;  &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;udppm&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Save the file&lt;/li&gt;&lt;li&gt;as root run (this will make the file only readable by root user)&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; chmod o-rwx /etc/3proxy.cfg&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; chkconfig 3proxy on&lt;/span&gt;&lt;/li&gt;&lt;li&gt;??&lt;/li&gt;&lt;li&gt;profit&lt;/li&gt;&lt;/ol&gt;The details of the 3proxy.cfg file are documented at &lt;a href="http://www.3proxy.ru/doc/html/man3/3proxy.cfg.3.html"&gt;http://www.3proxy.ru/doc/html/man3/3proxy.cfg.3.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now in whichever application you need to set the proxy server, set it as&lt;br /&gt;&lt;br /&gt;&lt;b style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;http://127.0.0.1:3128/&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;without any authentication.&lt;br /&gt;Thats it, now only root knows your ldap password, and no one else can snoop&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDIT:&lt;/b&gt;&lt;br /&gt;If you automatically want to set the proxy environment variable of the whole system, then you can create a file &lt;i&gt;/etc/profile.d/proxy.sh&lt;/i&gt; with the following content&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;export http_proxy=http://127.0.0.1:3128/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;export https_proxy=$http_proxy&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;export ftp_proxy=$http_proxy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Many (not all) programs on linux use these environment variables to get proxy settings.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDIT2&lt;/b&gt; :&lt;br /&gt;To set multiple proxies (different hosts go through different proxies) you can do something like below (see 3proxy.cfg manual for much more detail and many other options):&lt;br /&gt;&lt;dl class="avatar-comment-indent" id="comments-block"&gt;&lt;dd class="comment-body" id="Blog1_cmt-670331920463891991"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# direct connection &lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;allow * 127.0.0.1 127.0.0.0/24,&amp;lt;local_IPs&amp;gt; * *&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# through proxy1 &lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;allow * * &amp;lt;hosts_thru_proxy1&amp;gt; * *&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;parent 1000 http &amp;lt;proxy1.server.com&amp;gt; &amp;lt;port&amp;gt; &amp;lt;proxy_user&amp;gt;&amp;nbsp;&lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# through proxy2  &lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;allow * * &amp;lt;hosts_thru_proxy2&amp;gt; * *&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;parent 1000 http &amp;lt;proxy2.server.com&amp;gt; &amp;lt;port&amp;gt; &amp;lt;proxy_user&amp;gt;&amp;nbsp;&lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# through proxy3  &lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;allow * * &amp;lt;hosts_thru_proxy3&amp;gt; * *&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;parent 1000 http &amp;lt;proxy3.server.com&amp;gt; &amp;lt;port&amp;gt; &amp;lt;proxy_user&amp;gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;allow * * * * *&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;proxy -n&lt;/span&gt; &lt;/dd&gt;&lt;dd class="comment-footer"&gt;&lt;span class="comment-timestamp"&gt; &lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-7301547294431370503?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/7301547294431370503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/06/linux-proxy-problem.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7301547294431370503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7301547294431370503'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/06/linux-proxy-problem.html' title='the linux proxy problem'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-2704081110980858817</id><published>2010-05-30T15:01:00.001+05:30</published><updated>2010-05-30T15:02:56.647+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='zotero'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='citation'/><title type='text'>research made simple with zotero</title><content type='html'>If you are into study/research of any kind (academic/non-academic) which involves reading up things and keeping track of them then you are in for a great productivity boost.&amp;nbsp; This will help if you are reading books/news/articles/wikipedia/journals or any such sort of thing. The too I'm talking about is &lt;a href="http://www.zotero.org/"&gt;zotero&lt;/a&gt;&lt;br /&gt;With zotero you can save proper bibliographic references of lots of material you see on the internet and manage/search/cite them in various forms. Its really difficult to describe all the wonderful things zotero can do for your research, so it'll be really good for you if you watch the screencast &lt;a href="http://www.zotero.org/support/screencast_tutorials/zotero_tour"&gt;http://www.zotero.org/support/screencast_tutorials/zotero_tour&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some features you'll find helpful:&lt;br /&gt;Collect: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Single click saving of references. For example single click on any sciencedirect article, if you have subscribed (as in my college), a single click will save all information about the article, including the pdf (with well thought name instead of fulltext.pdf) if its available.&lt;/li&gt;&lt;li&gt;To enable saving pdf select in Zotero Preferences-&amp;gt;General tab -&amp;gt; automatically attach associated pdfs and other files when saving. &lt;/li&gt;&lt;li&gt;In search tab in preferences, you may also want to enable indexing of pdfs if you need.&lt;/li&gt;&lt;li&gt;Clicking on sites with references to lots of articles (wikipedia references, cited by in Scopus etc), you can easily select all the references you need to save&lt;/li&gt;&lt;/ul&gt;Manage:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You can search all your saved articles, add notes, tags etc&lt;/li&gt;&lt;li&gt;You can group all articles in collections based on topic&lt;/li&gt;&lt;li&gt;You can create saved searches based on various criteria&lt;/li&gt;&lt;/ul&gt;Cite:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To cite an article(s) simply select them and right click to 'create bibliography from selectd articles' and choose a format style from the many available (including all popular journals) and you are done&lt;/li&gt;&lt;li&gt;If you are using bibtex to manage bibliographies for your article then select the articles and right click to do 'export selected items' and select bibtex format&lt;/li&gt;&lt;li&gt;Zotero plugins are available for Openoffice  and MS Office too, so you can easily insert the references in your articles, without the pain of collecting anf formatting&lt;/li&gt;&lt;/ul&gt;Share:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you work in team then this is a really wonderful feature. Create a simple login on the zotero server (you can also use openid)&lt;/li&gt;&lt;li&gt;In zotero preferences-&amp;gt;sync tab enter your zotero login details and enable sync my library and group library.&lt;/li&gt;&lt;li&gt;All synced items (including attached pdfs) are available on the internet anywhere without even installing zotero addon. You just need to login to zotero and see your collection. This is very useful if your college has access to some journals but when you are somewhere else in a conference and you need to check and article. 100 MB space is freely available and you can buy even more. &lt;/li&gt;&lt;li&gt;'My library' is your personal collection. Group libraries are shared collections, which can be shared with other people you are working with.&lt;/li&gt;&lt;/ul&gt;So what are you waiting for, install it now. If you did not install it yet, then you need to watch the screencast &lt;a href="http://www.zotero.org/support/screencast_tutorials/zotero_tour"&gt;http://www.zotero.org/support/screencast_tutorials/zotero_tour&lt;/a&gt; now&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-2704081110980858817?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.zotero.org/' title='research made simple with zotero'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/2704081110980858817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/05/research-made-simple-with-zotero.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2704081110980858817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2704081110980858817'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/05/research-made-simple-with-zotero.html' title='research made simple with zotero'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-1996532341669244157</id><published>2010-05-29T15:54:00.003+05:30</published><updated>2010-06-16T19:02:33.379+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='numpy'/><title type='text'>numpy array performance / divide and conquer considered harmful</title><content type='html'>This is again a post about python code speed, the data and inference are more than a few months old but still valid.&lt;br /&gt;Here's a spreadsheet showing speed of array math operations (+, -, *, /) between numpy arrays and python lists.&lt;br /&gt;Check this spreadsheet to see the timings of various operations&lt;br /&gt;&lt;a href="https://spreadsheets.google.com/ccc?key=0AomYDYyBBNkkdHAtMkdHMF9TZ29lMmZQV3UwYkxWNFE&amp;amp;hl=en"&gt;https://spreadsheets.google.com/ccc?key=0AomYDYyBBNkkdHAtMkdHMF9TZ29lMmZQV3UwYkxWNFE&amp;amp;hl=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The operations I considered for comparison were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;x+0.1&lt;/li&gt;&lt;li&gt;x-0.1&lt;/li&gt;&lt;li&gt;x*0.1&lt;/li&gt;&lt;li&gt;x/0.1&lt;/li&gt;&lt;li&gt;x*(1/0.1)&lt;/li&gt;&lt;li&gt;x+y&lt;/li&gt;&lt;li&gt;x-y&lt;/li&gt;&lt;li&gt;x*y&lt;/li&gt;&lt;li&gt;x/y&lt;/li&gt;&lt;li&gt;[p+yp[j] for j,p in enumerate(xp)]&lt;/li&gt;&lt;li&gt;[xp[j]+yp[j] for j in xrange(i)]&lt;/li&gt;&lt;/ul&gt;where &lt;b&gt;x&lt;/b&gt; and &lt;b&gt;y&lt;/b&gt; are numpy arrays, &lt;b&gt;xp&lt;/b&gt; and &lt;b&gt;yp&lt;/b&gt; are python lists, all of size &lt;b&gt;N&lt;/b&gt; which is varied for the comparison.&lt;br /&gt;The raw timings data is available here: &lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;a href="https://spreadsheets.google.com/pub?key=0AomYDYyBBNkkdHAtMkdHMF9TZ29lMmZQV3UwYkxWNFE&amp;amp;hl=en&amp;amp;output=html"&gt;https://spreadsheets.google.com/pub?key=0AomYDYyBBNkkdHAtMkdHMF9TZ29lMmZQV3UwYkxWNFE&amp;amp;hl=en&amp;amp;output=html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;See the timings plot yourself&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://doc-0k-b8-docs.googleusercontent.com/docs/secure/ha0ro937gcuc7l7deffksulhg5h7mbp1/tn8kmqubsk7ihmesna4339vi28lu2e4i/1275112800000/09163134879685239802/*/0B4mYDYyBBNkkZDUyMzUxMjEtZWUzMC00OTBjLTkyODctOWFiYzZiOWFiMzlh" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="359" src="https://doc-0k-b8-docs.googleusercontent.com/docs/secure/ha0ro937gcuc7l7deffksulhg5h7mbp1/tn8kmqubsk7ihmesna4339vi28lu2e4i/1275112800000/09163134879685239802/*/0B4mYDYyBBNkkZDUyMzUxMjEtZWUzMC00OTBjLTkyODctOWFiYzZiOWFiMzlh" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Conclusion:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Use numpy arrays for size &amp;gt; 10&lt;/li&gt;&lt;li&gt;Avoid division as much as you can to improve the speed of your numerical codes&lt;/li&gt;&lt;li&gt;Instead of &lt;b&gt;x/0.1&lt;/b&gt; do &lt;b&gt;x*(1/0.1)&lt;/b&gt; . This itself causes large speedup as N is increased. &lt;/li&gt;&lt;li&gt;&lt;b&gt;x/0.1&lt;/b&gt; and &lt;b&gt;x/y&lt;/b&gt; take almost the same time&lt;/li&gt;&lt;li&gt;&lt;b&gt;+&lt;/b&gt;, &lt;b&gt;-&lt;/b&gt;, &lt;b&gt;*&lt;/b&gt; take almost same time, &lt;b&gt;/&lt;/b&gt; takes much more time, and its expense increases as &lt;b&gt;N&lt;/b&gt; is increased.&lt;/li&gt;&lt;li&gt;Once again, &lt;b&gt;do not divide&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;The same thing is valid in cython code also. Avoid division even in cython code, and even if you are using &lt;b&gt;double&lt;/b&gt; instead of numpy arrays (buffer). Rewrite expressions to minimize the usage of division operator.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-1996532341669244157?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='https://spreadsheets.google.com/ccc?key=0AomYDYyBBNkkdHAtMkdHMF9TZ29lMmZQV3UwYkxWNFE&amp;hl=en' title='numpy array performance / divide and conquer considered harmful'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/1996532341669244157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/05/numpy-array-performance-divide-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/1996532341669244157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/1996532341669244157'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/05/numpy-array-performance-divide-and.html' title='numpy array performance / divide and conquer considered harmful'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-2499864853916076510</id><published>2010-05-26T22:58:00.004+05:30</published><updated>2010-05-26T23:24:47.147+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='cython'/><title type='text'>cython timings test</title><content type='html'>&lt;h1&gt;The TASK : To optimize cython functions&lt;/h1&gt;&lt;h1&gt;Detailed: functions which depend on a once initialized attribute value&lt;/h1&gt;This often comes handy in many cases, for example to write a Laplacian function of a scalar field in spherical/axisymmetric coordinate system, you would need three independent cases for 1,2,3 dimensions for performance purposes and if u do not write all functions as general 3D functions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The test CODE : test_kernel.pyx&lt;/h2&gt;&lt;br /&gt;&lt;table border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="at02" style="font-family: Courier New;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%"&gt;cdef class Kernel:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef int dim&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef double (*func)(Kernel,double)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self, dim=1):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.dim = dim&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if dim == 1:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.func = self.func1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif dim == 2:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.func = self.func2&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef double func1(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 1+x&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef double func2(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 2+x&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef double c_func(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '''this is only to make function signature compatible with func1 and func2'''&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.func(self, x)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def p_func(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.func(self, x)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpdef double py_func(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.func(self, x)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpdef double py_c_func(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.c_func(x)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def py_func1(self, x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.func1(x)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def py_func2(self, x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.func2(x)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef double func_common(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef int dim = self.dim&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if dim == 1:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 10+x&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif dim == 2:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 20+x&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def py_func_c_common(self, x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.func_common(x)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpdef double py_func_common(self, double x):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cdef int dim = self.dim&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if dim == 1:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 10+x&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif dim == 2:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 20+x&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Compilation command:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;cython -a test_kernel.pyx;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;gcc &amp;lt;optimization-flag&amp;gt; -shared -fPIC test_kernel.c -lpython2.6 -I /usr/include/python2.6/ -o test_kernel.so&lt;br /&gt;where optimization flag is either empty or "-O2" or "-O3"&lt;br /&gt;&lt;br /&gt;Cython optimization&lt;br /&gt;&lt;b&gt;Tip 1:&lt;/b&gt;&lt;br /&gt;Type (cdef) as many variables as you can. You also need to type the locals in each function. Try to try to use C data types wherever possible.&lt;br /&gt;&lt;b&gt;Tip 2:&lt;/b&gt;&lt;br /&gt;use:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;cython -a file.pyx&lt;br /&gt;command to generate a html file which shows lines which cause expensive python functions to be called. Clicking on a line shows the corresponding C code generated, highlighting expensive calls in shades of red. Try to eliminate as many such calls as you can.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;b&gt;The TEST&lt;/b&gt; :&lt;/h2&gt;time_kernel.py&lt;br /&gt;&lt;br /&gt;&lt;table border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="ex4m" style="font-family: Courier New;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%"&gt;&lt;div&gt;import timeit&lt;/div&gt;&lt;br /&gt;&lt;div&gt;def time(s):&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;'''returns time in microseconds'''&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;t = 1e6*timeit.timeit(s,'import test_kernel;k1=test_kernel.Kernel(1);k2=test_kernel.Kernel(2);',number=1000000)/1000000.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;print s, t&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return t&lt;/div&gt;&lt;br /&gt;time('k1.p_func(0)')&lt;br /&gt;time('k1.py_func(0)')&lt;br /&gt;time('k1.py_func1(0)')&lt;br /&gt;time('k1.py_c_func(0)')&lt;br /&gt;time('k1.py_func_c_common(0)')&lt;br /&gt;time('k1.py_func_common(0)')&lt;br /&gt;&lt;br /&gt;time('k2.p_func(0)')&lt;br /&gt;time('k2.py_func(0)')&lt;br /&gt;time('k2.py_func2(0)')&lt;br /&gt;time('k2.py_c_func(0)')&lt;br /&gt;time('k2.py_func_c_common(0)')&lt;br /&gt;time('k2.py_func_common(0)')&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2&gt;Timings : &lt;/h2&gt;&lt;br /&gt;&lt;table border="0" cellspacing="0" class="zeroBorder" cols="8" frame="VOID" rules="NONE"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="left" height="17" width="39"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left" valign="top" width="167"&gt;&lt;b&gt;&lt;span style="font-family: Liberation Serif;"&gt;function&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;td align="center" colspan="5" valign="top" width="428"&gt;&lt;b&gt;&lt;span style="font-family: Liberation Serif;"&gt;time (μs)&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;td align="left" width="86"&gt;&lt;b&gt;(ns)&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" height="17"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;&lt;span style="font-family: Liberation Serif;"&gt;Optimization flag -&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;None&lt;/b&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;-O2&lt;/b&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;-O3&lt;/b&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;sum&lt;/b&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;(k1+k2)/2&lt;/b&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;penalty&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;1&lt;/td&gt;&lt;td align="left"&gt;k1.p_func(0)&lt;/td&gt;&lt;td align="right"&gt;0.20178&lt;/td&gt;&lt;td align="right"&gt;0.18321&lt;/td&gt;&lt;td align="right" bgcolor="#00ff00"&gt;0.18035&lt;/td&gt;&lt;td align="right" bgcolor="#00ff00"&gt;0.18845&lt;/td&gt;&lt;td align="right" bgcolor="#00ff00"&gt;0.19368&lt;/td&gt;&lt;td align="right"&gt;0.0000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;2&lt;/td&gt;&lt;td align="left"&gt;k1.py_func(0)&lt;/td&gt;&lt;td align="right"&gt;0.23224&lt;/td&gt;&lt;td align="right"&gt;0.18599&lt;/td&gt;&lt;td align="right"&gt;0.18393&lt;/td&gt;&lt;td align="right"&gt;0.20072&lt;/td&gt;&lt;td align="right"&gt;0.19541&lt;/td&gt;&lt;td align="right"&gt;1.7345&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="16"&gt;3&lt;/td&gt;&lt;td align="left"&gt;k1.py_func1(0)&lt;/td&gt;&lt;td align="right"&gt;0.21477&lt;/td&gt;&lt;td align="right"&gt;0.18991&lt;/td&gt;&lt;td align="right" bgcolor="#ff0000"&gt;0.19252&lt;/td&gt;&lt;td align="right"&gt;0.19907&lt;/td&gt;&lt;td align="right" bgcolor="#ff0000"&gt;0.19802&lt;/td&gt;&lt;td align="right"&gt;4.3456&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;4&lt;/td&gt;&lt;td align="left"&gt;k1.py_c_func(0)&lt;/td&gt;&lt;td align="right" bgcolor="#ff0000"&gt;0.23395&lt;/td&gt;&lt;td align="right" bgcolor="#ff0000"&gt;0.19196&lt;/td&gt;&lt;td align="right"&gt;0.19243&lt;/td&gt;&lt;td align="right" bgcolor="#ff0000"&gt;0.20611&lt;/td&gt;&lt;td align="right"&gt;0.19761&lt;/td&gt;&lt;td align="right"&gt;3.9311&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;5&lt;/td&gt;&lt;td align="left"&gt;k1.py_func_c_common(0)&lt;/td&gt;&lt;td align="right" bgcolor="#00ff00"&gt;0.19566&lt;/td&gt;&lt;td align="right"&gt;0.18458&lt;/td&gt;&lt;td align="right"&gt;0.19062&lt;/td&gt;&lt;td align="right"&gt;0.19029&lt;/td&gt;&lt;td align="right"&gt;0.19767&lt;/td&gt;&lt;td align="right"&gt;3.9960&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;6&lt;/td&gt;&lt;td align="left"&gt;k1.py_func_common(0)&lt;/td&gt;&lt;td align="right"&gt;0.21981&lt;/td&gt;&lt;td align="right"&gt;0.18707&lt;/td&gt;&lt;td align="right"&gt;0.18984&lt;/td&gt;&lt;td align="right"&gt;0.19891&lt;/td&gt;&lt;td align="right"&gt;0.19510&lt;/td&gt;&lt;td align="right"&gt;1.4237&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;7&lt;/td&gt;&lt;td align="left"&gt;k2.p_func(0)&lt;/td&gt;&lt;td align="right"&gt;0.20448&lt;/td&gt;&lt;td align="right"&gt;0.18388&lt;/td&gt;&lt;td align="right"&gt;0.18194&lt;/td&gt;&lt;td align="right"&gt;0.19010&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;8&lt;/td&gt;&lt;td align="left"&gt;k2.py_func(0)&lt;/td&gt;&lt;td align="right"&gt;0.21798&lt;/td&gt;&lt;td align="right"&gt;0.18859&lt;/td&gt;&lt;td align="right"&gt;0.18437&lt;/td&gt;&lt;td align="right" bgcolor="#00ff00"&gt;0.19698&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="16"&gt;9&lt;/td&gt;&lt;td align="left"&gt;k2.py_func2(0)&lt;/td&gt;&lt;td align="right"&gt;0.20413&lt;/td&gt;&lt;td align="right" bgcolor="#00ff00"&gt;0.18124&lt;/td&gt;&lt;td align="right"&gt;0.18194&lt;/td&gt;&lt;td align="right"&gt;0.18910&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;10&lt;/td&gt;&lt;td align="left"&gt;k2.py_c_func(0)&lt;/td&gt;&lt;td align="right"&gt;0.23114&lt;/td&gt;&lt;td align="right"&gt;0.19166&lt;/td&gt;&lt;td align="right"&gt;0.19238&lt;/td&gt;&lt;td align="right"&gt;0.20506&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;11&lt;/td&gt;&lt;td align="left"&gt;k2.py_func_c_common(0)&lt;/td&gt;&lt;td align="right"&gt;0.19860&lt;/td&gt;&lt;td align="right"&gt;0.18783&lt;/td&gt;&lt;td align="right"&gt;0.18745&lt;/td&gt;&lt;td align="right"&gt;0.19129&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right" height="17"&gt;12&lt;/td&gt;&lt;td align="left"&gt;k2.py_func_common(0)&lt;/td&gt;&lt;td align="right"&gt;0.21609&lt;/td&gt;&lt;td align="right"&gt;0.18747&lt;/td&gt;&lt;td align="right"&gt;0.18640&lt;/td&gt;&lt;td align="right"&gt;0.19666&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" height="16"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;b&gt;Average&lt;/b&gt;&lt;/td&gt;&lt;td align="right"&gt;0.21560&lt;/td&gt;&lt;td align="right"&gt;0.18681&lt;/td&gt;&lt;td align="right"&gt;0.18703&lt;/td&gt;&lt;td align="right"&gt;0.19648&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div align="center" style="text-align: left;"&gt;&lt;h2&gt;Result :&lt;/h2&gt;&lt;/div&gt;The best is to write separate C function and a python accessor function.&lt;br /&gt;&lt;br /&gt;&lt;table border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="uuvu"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;b&gt;task&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;td valign="top"&gt;&lt;b&gt;function&lt;/b&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;b&gt;penalty cost (&lt;span style="font-family: Liberation Serif;"&gt;ns&lt;/span&gt;)&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;C function + python accessor : base case&lt;/td&gt;&lt;td valign="top"&gt;p_func&lt;/td&gt;&lt;td width="50%"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;cpdef instead of def&lt;/td&gt;&lt;td valign="top"&gt;py_func&lt;/td&gt;&lt;td valign="top"&gt;1.7345&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;calling a cdef class method instead of a function pointer attribute&lt;/td&gt;&lt;td valign="top"&gt;py_func1,py_func2&lt;/td&gt;&lt;td valign="top"&gt;4.3456&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;one extra c function call&lt;/td&gt;&lt;td valign="top"&gt;py_c_func&lt;/td&gt;&lt;td valign="top"&gt;3.9311&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;(def + cdef) instead of (cpdef)&lt;/td&gt;&lt;td valign="top"&gt;py_func_c_common-py_func_common&lt;/td&gt;&lt;td valign="top"&gt;2.5723&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;One C comparison vs one C function call&lt;/td&gt;&lt;td valign="top"&gt;py_func_common&lt;/td&gt;&lt;td valign="top"&gt;1.4237&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2&gt;Conclusion :&lt;/h2&gt;As can be clearly seen that the results are clearly inconclusive :)&lt;br /&gt;This was a small test carried on my laptop with no controlled environment. Also thought the results seemed close to repeatable, nevertheless many trials should be conduction and each value should have a standard deviation also to check the repeatability. However one clear conclusion is do not forget to add optimization flags. Setuptools already does that for you.&lt;br /&gt;Also using a function pointer is not so bad after all. It would become more advantageous in case of more number of comparisons.&lt;br /&gt;Cython provides great speedups (who didn't know that :) ). The pure python version of py_func_common took 0.408&lt;span style="font-family: Liberation Serif;"&gt;μs&lt;/span&gt; for dim=1 and 0.518&lt;span style="font-family: Liberation Serif;"&gt;μs&lt;/span&gt; for dim=2&lt;br /&gt;These results are purely from python point of view. The effect of cdef/cpdef should also be considered in c/cython code which calls these functions.&lt;br /&gt;&lt;h2&gt;CAVEAT:&lt;/h2&gt;I am no optimization expert. I have done this out of out of sheer boredom :)&lt;br /&gt;If anyone wants to verify, you are welcome&lt;br /&gt;Any information content is purely coincindental&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-2499864853916076510?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://docs.google.com/View?id=dhmfm9tn_94fgb37vf5' title='cython timings test'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/2499864853916076510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/05/kernel-timings-test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2499864853916076510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2499864853916076510'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/05/kernel-timings-test.html' title='cython timings test'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-3842262110893628584</id><published>2010-04-27T22:04:00.006+05:30</published><updated>2010-04-29T12:13:17.152+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tracing'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='systemtap'/><title type='text'>Tracing python programs</title><content type='html'>Coming with the easier python debugging enabled by the new gdb with python hooks is another awesome python feature coming in the new Fedora "Goddard" 13 release. That is tracing of python processes and their function calls. This feature is developed on top of systemtap, the linux analogue of Sun's awesome Dtrace system tracer.&lt;br /&gt;So what does it mean? For the uninitiated, it implements hooks (tracepoints) in the python main shared libraries (libpython.so and libpython3.so) so that systemtap can trace whenever a python function is entered/exited in any python process on the system. This means you can anytime check a python process to see which functions are being called and how many times etc. This has really cool uses. More information about this feature is available at &lt;a href="https://fedoraproject.org/wiki/Features/SystemtapStaticProbes#Python_2"&gt;https://fedoraproject.org/wiki/Features/SystemtapStaticProbes#Python_2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Just to illustrate the use try the following examples (from the above link)&lt;br /&gt;First install &lt;i&gt;python-debuginfo&lt;/i&gt;. Now add yourself to &lt;i&gt;stapdev &lt;/i&gt;and&lt;i&gt; stapusr &lt;/i&gt;groups or run the following command as root:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ stap /usr/share/doc/python3-libs-3.1.2/pyfuntop.stp&lt;br /&gt;This will display a &lt;i&gt;top&lt;/i&gt; like output on the terminal showing the python functions which are called by all running processes and the number of times its being called. Its fun to watch, just run a python program and check all the functions being called :)&lt;br /&gt;Here's a sample output from my laptop&lt;br /&gt;&lt;pre&gt;PID                                                                         FILENAME   LINE                       FUNCTION  CALLS&lt;br /&gt; 15479                                 /usr/lib/python2.6/site-packages/yum/packages.py    261                         verCMP  15768&lt;br /&gt; 15479                                 /usr/lib/python2.6/site-packages/yum/packages.py    270                        __cmp__  15767&lt;br /&gt; 15479                             /usr/lib/python2.6/site-packages/rpmUtils/updates.py    129                   returnNewest   9045&lt;br /&gt; 15479                           /usr/lib/python2.6/site-packages/rpmUtils/miscutils.py     36                     compareEVR   1191&lt;br /&gt; 15479                                 /usr/lib/python2.6/site-packages/yum/packages.py     48                   comparePoEVR    578&lt;br /&gt; 15479                                 /usr/lib/python2.6/site-packages/yum/packages.py    296                          verEQ    556&lt;br /&gt; 15479                                 /usr/lib/python2.6/site-packages/yum/packages.py     55                 comparePoEVREQ    556&lt;br /&gt; 15479                                 /usr/lib/python2.6/site-packages/yum/__init__.py    778                       &lt;lambda&gt;      2&lt;br /&gt; 15479                                 /usr/lib/python2.6/site-packages/yum/__init__.py    206                     _getConfig      2&lt;br /&gt; 15479                                   /usr/lib/python2.6/site-packages/yum/config.py     69                        __get__      2&lt;br /&gt; 15479                                         /usr/lib64/python2.6/logging/__init__.py   1026                          debug      1&lt;br /&gt; 15479                                         /usr/lib64/python2.6/logging/__init__.py   1236                   isEnabledFor      1&lt;br /&gt; 15479                                         /usr/lib64/python2.6/logging/__init__.py   1222              getEffectiveLevel      1&lt;br /&gt; 15479                             /usr/lib/python2.6/site-packages/rpmUtils/updates.py    272                      doUpdates      1&lt;br /&gt;&lt;/pre&gt;This shows the functions called during a 1 second interval (the script updates the display every second) by checking of available updates by packagekit.&lt;br /&gt;Another system script displays the python function  call hierarchy of any program you run. Try this by running&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ stap -v /usr/share/doc/python-libs-2.6.4/systemtap-example.stp -c python&lt;br /&gt;Now you will get a python terminal after a long hierarchy of function calls. Here you can see all python functions called for each line you enter on the python terminal. Its not as much fun, but useful if you want to check where all those extra unneeded function calls are being made.&lt;br /&gt;Read a short writeup from the developer of these features at &lt;a href="http://fedoraproject.org/wiki/Python_in_Fedora_13"&gt;http://fedoraproject.org/wiki/Python_in_Fedora_13&lt;/a&gt; and also check &lt;a href="http://press.redhat.com/2010/04/27/fedora-13-spotlight-feature-exploring-new-frontiers-of-python-development/"&gt;http://press.redhat.com/2010/04/27/fedora-13-spotlight-feature-exploring-new-frontiers-of-python-development/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-3842262110893628584?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/3842262110893628584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/04/tracing-python-programs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3842262110893628584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3842262110893628584'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/04/tracing-python-programs.html' title='Tracing python programs'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-6753078939283002875</id><published>2010-04-24T18:18:00.000+05:30</published><updated>2010-04-24T18:18:45.705+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='hard disk'/><title type='text'>hard disk speed and os partition</title><content type='html'>I knew this for quite some time, but now i have experimental evidence also that installing your os and keeping your home partition near the front of the hard disk results in more responsive computer. This is because conventional hard disks are rotary which means the read data faster from the outer sectors than from the inner sectors. So the next time you install your os keep it near the front partition.&lt;br /&gt;Here's a screenshot of the palimpsest utility (Applications -&amp;gt; system tools -&amp;gt; disk utility in fedora, package gnome-disk-utility) showing the read only benchmark speed and access (seek) times. As you can see the initial part has nearly double the speed than the last part. Seek times don't show any such obvious relation.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_Ai25IUBxGbI/S9LoksCj3sI/AAAAAAAAAM8/lx0grwS6GPc/s1600/Screenshot-160+GB+Hard+Disk+%28ATA+ST9160827AS%29+%E2%80%93+Benchmark.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="376" src="http://2.bp.blogspot.com/_Ai25IUBxGbI/S9LoksCj3sI/AAAAAAAAAM8/lx0grwS6GPc/s640/Screenshot-160+GB+Hard+Disk+%28ATA+ST9160827AS%29+%E2%80%93+Benchmark.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-6753078939283002875?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/6753078939283002875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/04/hard-disk-speed-and-os-partition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6753078939283002875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6753078939283002875'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/04/hard-disk-speed-and-os-partition.html' title='hard disk speed and os partition'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Ai25IUBxGbI/S9LoksCj3sI/AAAAAAAAAM8/lx0grwS6GPc/s72-c/Screenshot-160+GB+Hard+Disk+%28ATA+ST9160827AS%29+%E2%80%93+Benchmark.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-3265836107618695751</id><published>2010-04-23T21:31:00.001+05:30</published><updated>2010-04-23T21:36:09.724+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='gdb'/><category scheme='http://www.blogger.com/atom/ns#' term='cython'/><title type='text'>Easier cython/python/c debugging with new GDB</title><content type='html'>We all know how debugging is an dreaded integral part of every programmer's work. It can also be fun sometimes depending on the time to deadline, complexity of the bug and time already spent.&lt;br /&gt;So if anyone is still left who does assignments or other programs without debugging (using print statements etc) then please consider learning it. Else you are simply increasing your work and frustration.&lt;br /&gt;For debugging in any programming language my advise would be to use the eclipse debugger gui which provides all the standard features present in any debugger and integration with java, c/c++, python and a host of other languages.&lt;br /&gt;&lt;br /&gt;This post was not about plain debugging. Its about the new features in GDB 7 (the GNU debugger) which enables writing pretty printers in python. More information can be had from the net. However it means a much easier debugging experience with cython. The good folks at Fedora have written some cool scripts to integration python scripting capability of gdb to enable easier cython debugging.&lt;br /&gt;Check out the awesomeness at &lt;a href="https://fedoraproject.org/wiki/Features/EasierPythonDebugging"&gt;https://fedoraproject.org/wiki/Features/EasierPythonDebugging&lt;/a&gt;&lt;br /&gt;In short now you can do the following easily with the new gdb&lt;br /&gt;&lt;ul&gt;&lt;li&gt;automatically display python frame information in PyEval_EvalFrameEx  in gdb backtraces, including in &lt;a href="https://fedorahosted.org/abrt/"&gt;ABRT&lt;/a&gt;:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;python source file, line number, and function names&lt;/li&gt;&lt;li&gt;values of locals, if available  &lt;/li&gt;&lt;/ul&gt;&lt;li&gt; name of function for wrapped C functions&lt;/li&gt;&lt;/ul&gt;&amp;nbsp;This gonna make my life easier, especially since my DD project is in cyton/python.&lt;br /&gt;&lt;br /&gt;Also not to forget the uber cool features it could enable not only for python developers but for all. As an example check out the blog at &lt;a href="http://labs.trolltech.com/blogs/2010/04/22/peek-and-poke-vol-3/"&gt;http://labs.trolltech.com/blogs/2010/04/22/peek-and-poke-vol-3/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-3265836107618695751?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/3265836107618695751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/04/easier-cythonpythonc-debugging-with-new.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3265836107618695751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3265836107618695751'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/04/easier-cythonpythonc-debugging-with-new.html' title='Easier cython/python/c debugging with new GDB'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-83760625754487261</id><published>2010-03-04T23:16:00.000+05:30</published><updated>2010-03-04T23:16:04.124+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>funny slashdot comment about windows</title><content type='html'>Are you saying that this linux can run on a computer without windows underneath it, at all ? As in, without a boot disk, without any drivers, and without any services ? That sounds preposterous to me. If it were true (and I doubt it), then companies would be selling computers without a windows. This clearly is not happening, so there must be some error in your calculations. I hope you realise that windows is more than just Office ? Its a whole system that runs the computer from start to finish, and that is a very difficult thing to acheive. A lot of people dont realise this. Microsoft just spent $9 billion and many years to create Vista, so it does not sound reasonable that some new alternative could just snap into existence overnight like that. It would take billions of dollars and a massive effort to achieve. IBM tried, and spent a huge amount of money developing OS/2 but could never keep up with Windows. Apple tried to create their own system for years, but finally gave up recently and moved to Intel and Microsoft. Its just not possible that a freeware like the Linux could be extended to the point where it runs the entire computer fron start to finish, without using some of the more critical parts of windows. Not possible. I think you need to re-examine your assumptions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-83760625754487261?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://ask.slashdot.org/comments.pl?sid=1571214&amp;cid=31359216' title='funny slashdot comment about windows'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/83760625754487261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/03/funny-slashdot-comment-about-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/83760625754487261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/83760625754487261'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/03/funny-slashdot-comment-about-windows.html' title='funny slashdot comment about windows'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-3430012303228705067</id><published>2010-02-27T17:38:00.001+05:30</published><updated>2010-06-16T19:00:36.779+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='courseware'/><title type='text'>Increasing coursework</title><content type='html'>&amp;nbsp;I just realized that the coursework in my college increases at a very fast pace as the years go by.&lt;br /&gt;Here's the proof:&lt;br /&gt;my directory sizes of the data in each year's courseware. 4th years data is as yet incomplete as mid-terms are just over and half a sem is still remaining. (y* are the year's coursework directories)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[pankaj@localhost courseware]$ du -sh y*&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;158M&amp;nbsp;&amp;nbsp;&amp;nbsp; y1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;322M&amp;nbsp;&amp;nbsp;&amp;nbsp; y2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;1.7G&amp;nbsp;&amp;nbsp;&amp;nbsp; y3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;2.2G&amp;nbsp;&amp;nbsp;&amp;nbsp; y4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;UPDATE: The score is 6.9 GB for y4 at the end of the year, most of it is a single course, with hundreds of MB of datasets and simulation videos&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_Ai25IUBxGbI/S4kK33APGeI/AAAAAAAAAMU/wL54e05Ue9s/s1600-h/coursework.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Ai25IUBxGbI/S4kK33APGeI/AAAAAAAAAMU/wL54e05Ue9s/s1600-h/coursework.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Ai25IUBxGbI/S4kK33APGeI/AAAAAAAAAMU/wL54e05Ue9s/s1600-h/coursework.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Ai25IUBxGbI/S4kK33APGeI/AAAAAAAAAMU/wL54e05Ue9s/s1600-h/coursework.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="480" src="http://2.bp.blogspot.com/_Ai25IUBxGbI/S4kK33APGeI/AAAAAAAAAMU/wL54e05Ue9s/s640/coursework.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-3430012303228705067?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/3430012303228705067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/02/increasing-coursework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3430012303228705067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3430012303228705067'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/02/increasing-coursework.html' title='Increasing coursework'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Ai25IUBxGbI/S4kK33APGeI/AAAAAAAAAMU/wL54e05Ue9s/s72-c/coursework.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-7796353299681097917</id><published>2010-02-27T17:02:00.000+05:30</published><updated>2010-02-27T17:02:50.278+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='real programmer'/><title type='text'>real programmers</title><content type='html'>i just found a funny old article about programming. I'm glad i'm not a 'real' programmer (just for your information, i'm a complex programmer)&lt;br /&gt;check the link &lt;a href="http://www.pbm.com/%7Elindahl/real.programmers.html"&gt;http://www.pbm.com/~lindahl/real.programmers.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-7796353299681097917?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/7796353299681097917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/02/real-programmers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7796353299681097917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7796353299681097917'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/02/real-programmers.html' title='real programmers'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-6101435581460850515</id><published>2010-02-23T22:02:00.001+05:30</published><updated>2010-02-23T22:06:25.731+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='academic calendar'/><title type='text'>my academic schedule</title><content type='html'>Now you know how stupid my lectures are scheduled.&lt;br /&gt;Legend:&lt;br /&gt;Blue : Moodle calendar (academic assignments, submissions etc)&lt;br /&gt;Green : Indian holidays&lt;br /&gt;Yellow : My edited calendar for lecture schedules and other academic things :)&lt;br /&gt;&lt;br /&gt;&lt;iframe src="https://www.google.com/calendar/embed?mode=WEEK&amp;amp;height=600&amp;amp;wkst=1&amp;amp;bgcolor=%23FFFFFF&amp;amp;src=rci8qskcv4gt6mdmtb3pms89m8%40group.calendar.google.com&amp;amp;color=%23AB8B00&amp;amp;src=ijds0h7h560a2g3tu72gmq7a2luv0vtu%40import.calendar.google.com&amp;amp;color=%235229A3&amp;amp;src=en.indian%23holiday%40group.v.calendar.google.com&amp;amp;color=%230D7813&amp;amp;ctz=Asia%2FCalcutta" style=" border:solid 1px #777 " width="800" height="600" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-6101435581460850515?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/6101435581460850515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2010/02/my-academic-schedule.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6101435581460850515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/6101435581460850515'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2010/02/my-academic-schedule.html' title='my academic schedule'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5898852164149432283</id><published>2009-11-26T23:50:00.003+05:30</published><updated>2010-01-27T18:20:45.827+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='salome'/><title type='text'>Installing Salome platfrom on Fedora (12 x86_64)</title><content type='html'>The salome platform is a good open source platform for FEA/CFD etc. It includes a good preprocessor to easily create geometries, mesh them in a variety of ways and also import/export various types of formats. I generally use it with OpenFOAM, which is a FVM library and collection of programs to solve various types of flows and also structures and other problems.&lt;br /&gt;Check them out at &lt;a href="http://www.salome-platform.org/"&gt;http://www.salome-platform.org/&lt;/a&gt; and &lt;a href="http://www.openfoam.com/features/"&gt;http://www.openfoam.com/features/&lt;/a&gt;&lt;br /&gt;So the main thing i'm writing this is as a reminder to me and to save hoursof other people's time who try installing salome-platform on any of the modern linux distros.&lt;br /&gt;&lt;br /&gt;Step 1 &amp;gt; Download the package. If the package is not available for you distro choose debian or mandriva whichever is closer to your distro (both work in case of fedora)&lt;br /&gt;Step 2 &amp;gt; Extract (tar -xvf filename) to a convenient location (your home or anywhere else doesn't matter. u can delete this later)&lt;br /&gt;Step 3 &amp;gt; Change the file config_files/gcc-common.sh to match your installation of gcc. I replaced gcc_root="/usr/bin".&lt;br /&gt;Step 4 &amp;gt; Run ./runInstall. Choose appropriate options in the gui and finish the wizard.&lt;br /&gt;Step 5 &amp;gt; To run salome type:&lt;br /&gt;$ . KERNEL_&amp;lt;version&amp;gt;/salome.sh&lt;br /&gt;$ runSalome&lt;br /&gt;Thats it&lt;br /&gt;Step 6 &amp;gt; Now steps 1 to 5 are simple, anyone can do it without any help. Here comes the main point which took me hours despite me already having installed and used various versions of salome in previous fedora installations.&lt;br /&gt;If you see an error message like&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Configure parser: Warning : could not find user configuration file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;runSalome running on localhost&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Configure parser: Warning : could not find user configuration file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Searching for a free port for naming service: 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 - OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Searching Naming Service ++++++++++Failed to narrow the root naming context&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Traceback (most recent call last):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/runSalome.py", line 648, in useSalome&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clt = startSalome(args, modules_list, modules_root_dir)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/runSalome.py", line 429, in startSalome&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clt=orbmodule.client(args)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/orbmodule.py", line 48, in __init__&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.initNS(args or {})&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; File "/opt/salome_5.1.2/KERNEL_5.1.2/bin/salome/orbmodule.py", line 81, in initNS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.exit(1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SystemExit: 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;on running salome then here's what you need to do.&lt;br /&gt;&lt;br /&gt;1 &amp;gt; edit /etc/hosts (of course you need root for that) and make sure you have a line such as&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;127.0.0.1 &amp;lt;hostname&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;in there. Most probably on a desktop system &amp;lt;hostname&amp;gt; will be localhost&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;2 &amp;gt; If you still get the same error then&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;delete any lines in /etc/hosts corresponding to IPv6, i.e. of the type&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;::1 localhost&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;This is the part that took me hours to figure out. So now you know, omniorb probably does not support IPv6 as of yet. Someone should hopefully fix it soon.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5898852164149432283?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5898852164149432283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/11/installing-salome-platfrom-on-fedora-12.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5898852164149432283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5898852164149432283'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/11/installing-salome-platfrom-on-fedora-12.html' title='Installing Salome platfrom on Fedora (12 x86_64)'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5455799938619642043</id><published>2009-11-15T12:38:00.001+05:30</published><updated>2009-11-15T12:59:27.550+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>Why i use Fedora linux</title><content type='html'>This question crops up fairly too often in my conversation with friends who use linux (most of them use ubuntu). So i decided to settle the matter once and for all.&lt;br /&gt;My reason for using fedora is simple, its the same reason why some people like strawberry flavoured ice-creams and some hate it, its THEIR OWN PREFERENCE.&lt;br /&gt;Also i first started with fedora because it was the first linux i ever saw (in my NSL computer lab for cs101 course). Yes, contrary to popular belief, i did not use linux from my childhood, the first computer in my home was 3 months before i joined IIT. And the first linux i saw was in IIT. I event learnt my first two languages C/C++ and Java by READING BOOKS, and even read the complete print copy of "Dive into Python" before actually diving into python! &lt;br /&gt;The first linux i used was Knoppix live which came with a dvd of a magazine. I used it exclusively for 2 weeks as i didn't know how to install an os. Then after burning about 6-7 cds (i wasted a few) i installed my first linux, Fedora 5 Bordeaux and have installed every Fedora release ever since, and never felt the need to change my distro. Most of them are mostly the same from the inside.&lt;br /&gt;&lt;br /&gt;However, just in case you want to make points, i'll list a few:&lt;br /&gt;&lt;a href="http://fedoraproject.org/wiki/Overview"&gt;http://fedoraproject.org/wiki/Overview &lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Fedora (+RH) devs work hard on bringing new features in linux. Many of the new features in linux are brought by them. For example the latest features in linux have been developed by fedora/RH devs including but not limited to the NetworkManager, pulseaudio, packagekit,.pulseaudio and many more. Also check &lt;a href="http://fedoraproject.org/wiki/Red_Hat_contributions"&gt;http://fedoraproject.org/wiki/Red_Hat_contributions &lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&amp;nbsp;The openness of fedora is what i really like and wish all the world were so open. By this open i do not mean open-source code, i mean openness of mind, acceptance of others, openness of governance, openness of activities, no hidden agenda.&lt;/li&gt;&lt;li&gt;The fedora features mention exactly what is there in a new fedora release (many of the things are own contributions). Compare &lt;a href="http://fedoraproject.org/wiki/Releases/12/FeatureList"&gt;http://fedoraproject.org/wiki/Releases/12/FeatureList&lt;/a&gt; with &lt;a href="http://www.ubuntu.com/products/whatisubuntu/910features"&gt;http://www.ubuntu.com/products/whatisubuntu/910features&lt;/a&gt; . I couldn't figure out what different from the previous release apart from firefox 3.5, openoffice 3.1 and ubuntuone.&lt;/li&gt;&lt;li&gt;Fedora stays closer to upstream and is generally more updated.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fedoraproject.org/wiki/Foundations"&gt;http://fedoraproject.org/wiki/Foundations&lt;/a&gt; &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;As someone put it somewhere on a blog, Fedora is about doing right, Ubuntu is about making things work. Of course you could make things work in short term by a few hacks,&amp;nbsp; but long term working requires doing the right thing :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5455799938619642043?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://fedoraproject.org/wiki/Foundations' title='Why i use Fedora linux'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5455799938619642043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/11/why-i-use-fedora-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5455799938619642043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5455799938619642043'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/11/why-i-use-fedora-linux.html' title='Why i use Fedora linux'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-893810989722230814</id><published>2009-10-07T18:44:00.000+05:30</published><updated>2009-10-07T18:44:12.677+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><title type='text'>use more screen space in firefox</title><content type='html'>Many of my friends and not so friends have seemed to like google chrome browser in that it makes available more screen space for the web page to display. Of course its a good things, especially for laptops with wider screens and scant vertical space. However not many know that firefox has been customizable enough for long so that you can make available more space for you if you need. Though it cannot compete with chrome, you can still extract much more from it. Here's my compact menubar+addressbar+bookmarks bar in firefox all in a single line.&lt;br /&gt;To do this right click on the menubar and click customize. Then modift the toolbars and menubars to your hearts content.&lt;br /&gt;&lt;br /&gt;Here's my firefox compact look especially for notebooks. Also notice how the fastdial extension gives you access to most frequently used websites without the need of a separate bookmarks toolbar.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_Ai25IUBxGbI/SsyTfFzieOI/AAAAAAAAAKw/scRmVcBwtzE/s1600-h/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_Ai25IUBxGbI/SsyTfFzieOI/AAAAAAAAAKw/scRmVcBwtzE/s400/Screenshot.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Notice what i did. Moved the addressbar, search bar and bookmarks bar into the menubar. Thats it.&lt;br /&gt;Here's the customization screen&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_Ai25IUBxGbI/SsyTvUW3RTI/AAAAAAAAAK4/ew2PRLDaAcQ/s1600-h/Screenshot-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_Ai25IUBxGbI/SsyTvUW3RTI/AAAAAAAAAK4/ew2PRLDaAcQ/s400/Screenshot-2.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So enjoy the more real estate in firefox.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-893810989722230814?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/893810989722230814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/10/use-more-screen-space-in-firefox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/893810989722230814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/893810989722230814'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/10/use-more-screen-space-in-firefox.html' title='use more screen space in firefox'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Ai25IUBxGbI/SsyTfFzieOI/AAAAAAAAAKw/scRmVcBwtzE/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-7498219101530761512</id><published>2009-10-03T12:13:00.002+05:30</published><updated>2009-10-04T12:40:13.384+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='thermal_handler'/><category scheme='http://www.blogger.com/atom/ns#' term='overheat'/><title type='text'>thermal handler : protect your computer from overheat</title><content type='html'>So recently i started encoding some of the videos i had from dvds into compressed formats as the dvds are getting scratched and damaged. So i used the avidemux program for it. However my laptop gets overheated a lot during high cpu usage.&lt;br /&gt;Other problems with overheating came when i had to run my dsmc and other assignments. Since they run for a looong time, my laptop overheats and i used to keep it hanging on its side during overnight runs. To my horror once when i compiled openfoam on my laptop overnight, i saw it shutdown in the morning with a failed compile and overheat. So here's my solution for all those who suffer from the problem of overheating computers (for linux users only).&lt;br /&gt;Checkout the all new "thermal handler" from yours truly. The solution for all your computer overheat problems due to high cpu usage.&lt;br /&gt;&lt;b&gt;What it does:&lt;/b&gt;&lt;br /&gt;Checks the temperature periodically and pauses processes using high cpu when a certain temperature is reached (default 90) and resumes them when the temperature falls below a certain value (default 65). None of your data crashes. The programs resume from the same state they were paused. No data loss. (Note that root processes cant be paused by the user)&lt;br /&gt;&lt;b&gt;What you need to do:&lt;/b&gt;&lt;br /&gt;just run from a shell:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;$ python thermal_handler.py [temp_lo&lt;temp_lo&gt; [, temp_hi&lt;temp_hi&gt;]]&lt;/temp_hi&gt;&lt;/temp_lo&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here's thermal handler at work:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_Ai25IUBxGbI/Ssbx5W3xx-I/AAAAAAAAAKQ/OnhzZiiO_5k/s1600-h/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_Ai25IUBxGbI/Ssbx5W3xx-I/AAAAAAAAAKQ/OnhzZiiO_5k/s400/Screenshot-1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Download it from here : &lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/thermal_handler.py"&gt;http://home.iitb.ac.in/%7Epankajp/web/downloads/thermal_handler.py&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;EDIT: Thanks to Prashant Agrawal for reporting that the initial version didn't work on AMD cpus and helping me to test. I've updated the file to work on AMD cpus now. check it out&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-7498219101530761512?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='' href='http://home.iitb.ac.in/%7Epankajp/web/downloads/thermal_handler.py' length='0'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/7498219101530761512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/10/thermal-handler-protect-your-computer.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7498219101530761512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7498219101530761512'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/10/thermal-handler-protect-your-computer.html' title='thermal handler : protect your computer from overheat'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Ai25IUBxGbI/Ssbx5W3xx-I/AAAAAAAAAKQ/OnhzZiiO_5k/s72-c/Screenshot-1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-1987195816477244682</id><published>2009-10-02T19:44:00.008+05:30</published><updated>2009-10-09T17:01:23.212+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='animate'/><category scheme='http://www.blogger.com/atom/ns#' term='chaco'/><title type='text'>animate2</title><content type='html'>Now i present before you the much improved animate2.&lt;br /&gt;Here are the major changes&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Plot saving is fixed when multiple subplots are present&lt;/li&gt;&lt;li&gt;animate() is retained for compatibility, new users are expected to use animate2() with changed api for the function&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Much more customizability&lt;/li&gt;&lt;li&gt;Plot frame traits (properties) can now be specified. Ex: plot title, axes labels, ticks, colors etc using extended traits notation to set the plot object properties&lt;/li&gt;&lt;li&gt;Each plot (line) can be customized. Plots can now be of various types such as scatted, line etc. Their properties can also be set such colors, thickness, style (dot-dash etc). Plots can also be labelled to add legends to the plot&lt;/li&gt;&lt;li&gt;Read the docstrings and the examples in __main__. They explain a lot of common uses. &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So what are you waiting for. Try the latest animate2. Dont forget to check out the demo sample usage in the '__main__' section of the file&lt;br /&gt;Check out the video below&lt;br /&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ZkDWxKYfjUU&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/ZkDWxKYfjUU&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Video with subtitles explaining the video is available here:&lt;br /&gt;&lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/animate2.mkv"&gt;http://home.iitb.ac.in/%7Epankajp/web/downloads/animate2.mkv&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Requirements:&lt;br /&gt;To run this you will need the &lt;a href="http://code.enthought.com/"&gt;Enthought tool suite ETS&lt;/a&gt; (only traits with wx backend and chaco are required)&lt;br /&gt;Hope this is useful for someone.&lt;br /&gt;You can get the code &lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/animate.py"&gt;animate.py&lt;/a&gt; from here that is:&lt;br /&gt;&lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/animate.py"&gt;http://home.iitb.ac.in/%7Epankajp/web/downloads/animate.py&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-1987195816477244682?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/1987195816477244682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/10/animate2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/1987195816477244682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/1987195816477244682'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/10/animate2.html' title='animate2'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-3239269308273790051</id><published>2009-09-23T15:16:00.004+05:30</published><updated>2009-09-23T15:56:39.351+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='animate'/><category scheme='http://www.blogger.com/atom/ns#' term='simulation'/><category scheme='http://www.blogger.com/atom/ns#' term='chaco'/><title type='text'>Animate simulations in python</title><content type='html'>I've recently written a nice short code in python to animate the results (plots) of a simulation using chaco (part of &lt;a href="http://code.enthought.com/"&gt;Enthought ETS&lt;/a&gt;)&lt;br /&gt;It is not actually very difficult, but i've just made up this one for myself, and it also has some cool features, so i thought i'd share it with others may as well benefit from it.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This if useful for you if you ever do coding in python and need to plot somethings which may change with time. Example lets say you are plotting the evolution of temperature over a rod with time or solving a 1D Euler equation (say shock tube problem)&lt;/li&gt;&lt;li&gt;This code provides a simple function to do it easily.&lt;/li&gt;&lt;li&gt;You can play-pause the code (simulation) at any time.&lt;/li&gt;&lt;li&gt;You can zoom-pan theplot&lt;/li&gt;&lt;li&gt;You can plot multiple subplots in a single window (Example the velocity, density and pressure in a shock tube problem)&lt;/li&gt;&lt;li&gt;You can edit axis labels, font, grids using gui&lt;/li&gt;&lt;li&gt;You can save the plots&lt;/li&gt;&lt;/ul&gt;Usage:&lt;br /&gt;This is the only function defined in the file&amp;nbsp; you need to know:&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;def animate(func, delay=0.1, total_time=0.0, time_factor=1.0, size=(800, 600), title='Plot'):&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '''function to animate the values returned by a function&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; func : function which returns a tuple of x,y values to animate on each call&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x is shape (N,), y is shape (N,) or (p,N), N is number of points, p is number of plots (properties)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay is the time interval in which to call the func after the previous func has returned(seconds)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; total_time is the time at which to stop the animation&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; animation will stop when total_time &amp;gt; self.time / time_factor &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total_time &amp;lt;= 0 will continue indefinitely&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_factor is the time to display as title (displayed_time=time/time_factor)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In the plot window:&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pressing 'p' key will toggle animation play-pause&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pressing Ctrl-S will open a dialog to save a rendering of the plot&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pressing 'ESC' will reset the zoom level of the plot&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double clicking on some parts of the plot allows you to edit them in a gui,&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (axis titles, grids, ticks etc)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the window becomes unresponsive, pause the animation for a while&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '''&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;The docstring explains most of the things you need to know.&lt;br /&gt;Here's how you could use it:&lt;br /&gt;First we see how to animate a single plot (A moving sine wave in this case) &lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from animate import animate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from numpy import linspace, sin&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;x = linspace(-10, 10, 101)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;i = 0.0&lt;br /&gt;def get_data():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global i&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i += 0.1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return x + i, sin(x + i)&lt;br /&gt;animate(func=get_data)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;The above code snippet will generate a nice moving animation window. Here's a plot from the same&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_Ai25IUBxGbI/Srnz5V0ULJI/AAAAAAAAAIs/18JicnONUws/s1600-h/saved_plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_Ai25IUBxGbI/Srnz5V0ULJI/AAAAAAAAAIs/18JicnONUws/s400/saved_plot.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Plotting multiple values is just as simple. You only need to pass on a tuple of the y values:&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from animate import animate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from numpy import linspace, sin, cos&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;x = linspace(-10, 10, 101)&lt;br /&gt;i = 0.0&lt;br /&gt;def get_data2():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i += 0.1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return x + i, (1 / (1 + x ** 2), sin(x + i), cos(x + i), sin(x + i), cos(x + i),)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;animate(func=get_data2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Here's a plot from the above snippet:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_Ai25IUBxGbI/Srn099AFccI/AAAAAAAAAI0/rIfHxAfMwrY/s1600-h/saved_plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_Ai25IUBxGbI/Srn099AFccI/AAAAAAAAAI0/rIfHxAfMwrY/s400/saved_plot.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;As you can see i have tried to make it as easy as possible without losing out on functionality.&lt;br /&gt;&lt;br /&gt;Requirements:&lt;br /&gt;To run this you will need the &lt;a href="http://code.enthought.com/"&gt;Enthought tool suite ETS&lt;/a&gt; (only traits with wx backend and chaco are required)&lt;br /&gt;Hope this is useful for someone.&lt;br /&gt;You can get the code &lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/animate.py"&gt;animate.py&lt;/a&gt; from here that is:&lt;br /&gt;&lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/animate.py"&gt;http://home.iitb.ac.in/%7Epankajp/web/downloads/animate.py&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-3239269308273790051?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/3239269308273790051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/09/animate-simulations-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3239269308273790051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3239269308273790051'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/09/animate-simulations-in-python.html' title='Animate simulations in python'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Ai25IUBxGbI/Srnz5V0ULJI/AAAAAAAAAIs/18JicnONUws/s72-c/saved_plot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-7852104474623383972</id><published>2009-09-18T10:47:00.002+05:30</published><updated>2009-09-18T10:48:42.832+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='kitten'/><title type='text'>cutie kitten</title><content type='html'>&lt;div style="padding: 3px; text-align: left;"&gt;&lt;a href="http://www.flickr.com/photos/pankajp/3055686253/" title="photo sharing"&gt;&lt;img alt="" src="http://farm4.static.flickr.com/3029/3055686253_05de5b2bbb.jpg" style="border: 2px solid rgb(0, 0, 0);" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size: 0.8em; margin-top: 0px;"&gt;&lt;a href="http://www.flickr.com/photos/pankajp/3055686253/"&gt;cutie kitten&lt;/a&gt;, originally uploaded by &lt;a href="http://www.flickr.com/people/pankajp/"&gt;pankaj86&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;Such a lovely pair of kitten.&lt;br /&gt;So much contrast yet so much togetherness.&lt;br /&gt;Friendship knows no barriers.&lt;br /&gt;Hope men could learn.&lt;br /&gt;&lt;br /&gt;(Courtesy Suchit, this pic was taken by Suchit &lt;a href="http://suchit-de-fundae.blogspot.com/"&gt;http://suchit-de-fundae.blogspot.com/&lt;/a&gt; using his mobile cam in the mess of hostel 6)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-7852104474623383972?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/7852104474623383972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/09/cutie-kitten.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7852104474623383972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7852104474623383972'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/09/cutie-kitten.html' title='cutie kitten'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3029/3055686253_05de5b2bbb_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-4329865510462575833</id><published>2009-09-18T10:42:00.001+05:30</published><updated>2009-09-18T10:42:35.229+05:30</updated><title type='text'>Flickr</title><content type='html'>This is a test post from &lt;a href="http://www.flickr.com/r/testpost"&gt;&lt;img alt="flickr" src="http://www.flickr.com/images/flickr_logo_blog.gif" width="41" height="18" border="0" align="absmiddle" /&gt;&lt;/a&gt;, a fancy photo sharing thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-4329865510462575833?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/4329865510462575833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/09/flickr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4329865510462575833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4329865510462575833'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/09/flickr.html' title='Flickr'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5989184699894376032</id><published>2009-09-02T16:26:00.003+05:30</published><updated>2009-09-02T16:38:41.709+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='smoking'/><title type='text'>No smoking</title><content type='html'>All the junta out there, listen, please STOP smoking. Ya thats right, stop smoking, stop it NOW.&lt;br /&gt;FREEZE,&lt;br /&gt;Now throw away that cigarette in your hand and empty you wallets of the packets.&lt;br /&gt;Now repeat with me thrice&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I will not smoke&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I will not smoke&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I will not smoke&lt;br /&gt;If you are feeling withdrawal symptoms, contact me, i can help you and take you to rehab. Don't worry, its not worse than dying of choked lungs and killing many others in the process. Its also better than some fanatic like me shooting your brain at point blank range just for that single smoke.&lt;br /&gt;&lt;br /&gt;join us in the mission, spread the word &lt;br /&gt;&lt;a href="http://www.thetruth.com/"&gt;http://www.thetruth.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5989184699894376032?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5989184699894376032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/09/no-smoking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5989184699894376032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5989184699894376032'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/09/no-smoking.html' title='No smoking'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-8994025430532089453</id><published>2009-09-01T22:21:00.002+05:30</published><updated>2009-09-01T22:24:06.518+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='blender'/><title type='text'>Blend it like Blender</title><content type='html'>Few days back this summer, i decided to be a bit creative and joined a free (as in freedom) workshop on blender in my college. I attended only a few days, but blender was really impressive. The main aim of the workshop was to teach sufficient blender to enable you to create educational content. As such it was not meant to teach character animation. So in just a few days, i learnt a lot of basics of 3D modeling. Most of the initial time was taken up in learning the interface, but i can assure you that once you learn it, it enables you to be highly productive.&lt;br /&gt;So here's a sample of what i did after just 3 days of learning blender. Of course as you know what happens in life, i've never been able to spend any time on blender since then...&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_Ai25IUBxGbI/Sp1Ok2sRsAI/AAAAAAAAAHQ/B7dU2WmGso8/s1600-h/table.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_Ai25IUBxGbI/Sp1Ok2sRsAI/AAAAAAAAAHQ/B7dU2WmGso8/s400/table.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The blend files can be downloaded from here &lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/table.blend"&gt;Blender .blend file&lt;/a&gt;, &lt;a href="http://home.iitb.ac.in/%7Epankajp/web/downloads/textures.tar.gz"&gt;Textures&lt;/a&gt;&lt;br /&gt;Hope sometime i do get time to learn all the cool features of blender&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-8994025430532089453?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.blender.org/' title='Blend it like Blender'/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/8994025430532089453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/09/blend-it-like-blender.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8994025430532089453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/8994025430532089453'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/09/blend-it-like-blender.html' title='Blend it like Blender'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Ai25IUBxGbI/Sp1Ok2sRsAI/AAAAAAAAAHQ/B7dU2WmGso8/s72-c/table.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-2762049521454085510</id><published>2009-08-25T22:38:00.001+05:30</published><updated>2009-08-25T22:39:40.326+05:30</updated><title type='text'>back on my feet</title><content type='html'>Yahoo,&lt;br /&gt;Today i am back on my feet. I walked on my own two feet for the first time in a month. There was still some swelling and pain in the feet, which has subsided enough that i walked to lectures today without the crutches. It feels great. Thought my gait is still awkward, and it still pains somewhat. I found out that my fracture which was at the base of the 5th metatarsal of the left foot, is also known as jones fracture, and takes  longer time to heal. Hopefully i'd be jumping and dancing soon :-)&lt;br /&gt;Today we also had two quizzes (a better name for class tests) for vibrations course and aircraft design lab. I should say i didn't do much good in both, but then its a routine for me :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-2762049521454085510?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/2762049521454085510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/08/back-on-my-feet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2762049521454085510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/2762049521454085510'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/08/back-on-my-feet.html' title='back on my feet'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-3681317489485003027</id><published>2009-08-22T14:56:00.001+05:30</published><updated>2009-09-02T16:39:09.632+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='pydev'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>eclipse+ for python (pydev)</title><content type='html'>This semester i have taken a course in particle methods for fluid flow, whose instructor is a big fan of python, and has written large applications in python. So most of my classmates have indeed chosen to use python for the assignments. As they mostly use MS Windows, it is easier to install some python bundle such as &lt;a href="http://www.enthought.com/products/epd.php"&gt;EPD&lt;/a&gt; or &lt;a href="http://www.pythonxy.com/foreword.php"&gt;python(x,y)&lt;/a&gt;. I'd like to recommend python(x,y) for windows users. Though i myself don't use windows (i use Fedora 11 x64 fyi), i did try python(x,y) at my home this summer. (I know epd since much before that). The only reason for this is that python(x,y) includes eclipse with pydev, and it make much more sense to use an ide in the learning phase than using the silly notepad on windows (or any other advanced notepad). For those who are beginning afresh, here are a few clues why you should use an ide.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Code formatting is easily performed in pydev. Try commenting out a 20 line function your editor. (pydev hint: source-&amp;gt;comment menu)&lt;/li&gt;&lt;li&gt;Syntax checking: You don't need to run you module to find out that you missed a semicolon after an if statement, the annotations in the editor will help you. Many more annotations to guide you to catch errors.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Code completion: Do you remember if the function inverse tan (arc tan) in math is called arctan or atan? (pydev hint: try math.&lt;ctrl+space&gt; and check if its arctan or atan)&lt;br /&gt;Do you remember the arguments of the asarray function of numpy or whether it makes a copy of the array? (pydev hint: check the documentation by hovering the mouse on the function)&lt;br /&gt;&lt;/ctrl+space&gt;&lt;/li&gt;&lt;li&gt;Refactoring: Though pydev does not have the awsome refactoring capabilities of the statically typed languages (its difficult in python) it can still rename attributes and methods across modules with sufficient accuracy.&lt;/li&gt;&lt;li&gt;Templates: Do you find yourself bored typing the bolierplate code for classes or unittests or new modules? The templates are you friends. Example the new pydev module dialog box will help you easily create boilerplate code for classes and unittests. Typing 'main&lt;ctrl+space&gt;' in the editor will complete it to "if __name__ == '__main__':" block&lt;/ctrl+space&gt;&lt;/li&gt;&lt;li&gt;Debugger: This cannot be emphasised enough. If you are not using a debugger, you have not been coding enough. It simplifies the task of locating the errors in a program. You can pause, continue, step through the code and check the values of any variable defined in the program. You can create conditional breakpoints and watch arbitrary expressions. Hovering over any attribute displays its value, selecting an expression displays its values. You can also switch to any frame. The debugger is probably the biggest benefit of using an ide like pydev.&lt;/li&gt;&lt;/ul&gt;Ok so all this was just to make programming beginners have a look at pydev ide. If you find anything unclear or want a short guide to do something please leave your comments and i'll try to help if possible.&lt;br /&gt;In future i'd like to post a short note on beginners use of pydev and the common tasks you need to know. Tell me if you'd like to have it soon rather than later&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-3681317489485003027?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/3681317489485003027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/08/eclipse-for-python-pydev.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3681317489485003027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/3681317489485003027'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/08/eclipse-for-python-pydev.html' title='eclipse+ for python (pydev)'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-7135646979537355214</id><published>2009-08-22T13:38:00.002+05:30</published><updated>2009-08-22T13:43:44.746+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fractured monsoon'/><title type='text'>conclude yourself</title><content type='html'>A few days back i posted about my fractured leg. Now i have the plaster of Paris on my leg removed. I'm so rejoiced. Anyway, if you did read my previous post, its time for my theory to be put to test. So if you are in India (more specifically Mumbai) then check out the status of the rains. And if my theory indeed turns out to be correct, please don't mind for me holding out the monsoons :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-7135646979537355214?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/7135646979537355214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/08/conclude-yourself.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7135646979537355214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7135646979537355214'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/08/conclude-yourself.html' title='conclude yourself'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-5536199420293262182</id><published>2009-07-26T19:08:00.002+05:30</published><updated>2009-08-20T22:58:50.185+05:30</updated><title type='text'>new sem</title><content type='html'>Once in a while, there come moments which jolt you and wake you up from your dreamland into reality, and you realise the true worth of life and regret all the moments you lost to your inertia to do things as you want. Now few days back i experienced such a thing. Though a fracture is not really a BIG deal, its still a pretty big deal.&lt;br /&gt;Ok so i've fractured the base of my 5th MT (metatarsal) of the left leg (simply put, my foot). Hopping around in crutches is not good, especially in the rain. Actually i had a hypothesis, it rained so less this year just to protect me from getting wet in the rain (you know, the plaster of Paris cast on my leg shudn't get wet, and with crutches in my hands i cant even hold an umbrella). Anyway, one of the predictions of this theory is that it will start raining well again when the cast from my leg goes away. Hope the theory is really correct :-)&lt;br /&gt;This has really been a life changing experience for me. I've really found out my true friends, who'd go to great lengths to make me feel comfortable. Separated the wheat from the chaff :-) Also i have begun to appreciate life much more than before. Too bad it take such a thing to wake us up to reality...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-5536199420293262182?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/5536199420293262182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/07/new-sem.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5536199420293262182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/5536199420293262182'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/07/new-sem.html' title='new sem'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-428040167931840882</id><published>2009-02-25T18:25:00.008+05:30</published><updated>2009-02-25T19:01:15.400+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='phoenix kit'/><category scheme='http://www.blogger.com/atom/ns#' term='open hardware'/><title type='text'></title><content type='html'>&lt;span style="font-size:100%;"&gt;Phoenix is an open hardware (circuit layout freely available) started by &lt;a href="http://www.iuac.ernet.in/"&gt;Inter University Accelerator Centre&lt;/a&gt;, with the objective of improving the laboratory facilities at Indian Universities, and growing with the support of the user community. Basically it is an electronic kit interfaced with a computer which has the following features:&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;" center="" align=""&gt;&lt;span style="font-size:100%;"&gt;Hardware  Features&lt;br /&gt;&lt;/span&gt;       &lt;/div&gt;       &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;4 Analog Inputs (10 bit resolution)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;1 Analog Output ( 8 bit)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;4 Digital Inputs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;4 Digital  Outputs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Frequency Counter&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Square  wave generator&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Constant Current Source  (1 mA)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;2 Inverting Amplifiers  (gain set plugin resistors)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;1 Non-inverting Amplifier&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;2 Level Shifting Amplifiers&lt;br /&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;RS232 / USB interface&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;ATmega16 micro-controller&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:100%;"&gt;Basically its design use was as a helper for performing educational/scientific experiment though is can be used for many things only bounded by your imagination. Phoenix provides Analog and Digital Input/Output capabilities to a computer through the sockets on the top panel. Experiments are designed utilizing these I/O capabilities and suitable sensor elements to convert physical parameters into voltage signals. The program running on the micro-controller makes the measurements as per the commands send from the PC through RS232 or USB links. Users can access all these features by calling functions from a Python library. Python language is chosen due to its simplicity and ease of doing scientific computation and graphics using it.&lt;br /&gt;The figure below shows an actual phoenix kit. Also there is a plot of diode (red LED) characteristics as obtained by connecting to the kit. Also it shows the nice monochrome lcd display which can be used to display small texts. Also visible is a snippet of the code for the same. Notice how easy it is to use, because it was mainly targetted for science students and not hor expert hackers.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://homepages.iitb.ac.in/%7Epankajp/web/images/phoenix.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 120%;" src="http://homepages.iitb.ac.in/%7Epankajp/web/images/phoenix.png" alt="Phoenix kit screenshot+photo : http://homepages.iitb.ac.in/~pankajp/web/?Things_you_may_find_useful:Electrical%2FElectronics:Phoenix_Kit&amp;amp;normal" id="BLOGGER_PHOTO_ID_5306722205783896226" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-428040167931840882?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.nsc.res.in/~elab/phoenix/' title=''/><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/428040167931840882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2009/02/phoenix-is-open-hardware-circuit-layout.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/428040167931840882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/428040167931840882'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2009/02/phoenix-is-open-hardware-circuit-layout.html' title=''/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-4313170585304492521</id><published>2008-01-31T14:44:00.001+05:30</published><updated>2009-08-22T15:04:05.740+05:30</updated><title type='text'>circuit simulation</title><content type='html'>I would like to share some of the things which i feel may help you if yor are interested in electrical/electronics simulation etc...&lt;br /&gt;&lt;a href="http://ktechlab.org/"&gt;KTechlab&lt;/a&gt; is an opensource software which can very nicely simulate a circuit. You can drag-drop components to make a circuit and can also use it to program PIC microcontrollers. available components include normal lump circuit elements and also electronic ones like BJTs, FETs, LCDs, RAM, Serial/Parallel bus, Flip-Flops, op-amp, 555, logic-gates and many other useful ones. It can also plot the probe values as in an oscilloscope. So check it out if u wanna see some cool circuit simulation.&lt;br /&gt;Screenshots at &lt;a href="http://ktechlab.org/wiki/index.php?title=Index:Screenshots"&gt;http://ktechlab.org/wiki/index.php?tit&lt;/a&gt;&lt;a href="http://ktechlab.org/wiki/index.php?title=Index:Screenshots"&gt;le=Index:Screenshots&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also theres '&lt;a href="http://qucs.sourceforge.net/"&gt;qucs&lt;/a&gt;' which is a more advanced . It has advance features which could check out yourself(as i dont know so much about electrical). However its features include a component library (find components by their no : brigdes, FETs etc) and AC/DC analysis, Transient analysis, S-Component Analysis and many more advanced things (eg u can add transmission-line as a component in ur circuit analysis and consider its effects!)&lt;br /&gt;From the site : " Qucs, briefly for Quite Universal Circuit Simulator, is a circuit simulator with graphical user interface (GUI).  The software aims to support all kinds of circuit simulation types, e.g. DC, AC, S-parameter, Harmonic Balance analysis, noise analysis, etc."&lt;br /&gt;Screenshots at &lt;a href="http://qucs.sourceforge.net/screenshots.html"&gt;http://qucs.sourceforge.net/screenshots.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check the screenshots of  KTechlab and QUCS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ktechlab.org/images/stories/screenshots/screenshot.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" src="http://ktechlab.org/wiki/images/e/e6/Screenshot.png" style="display: block; height: 529px; margin: 0px auto 10px; text-align: center; width: 664px;" /&gt;&lt;/a&gt;&lt;a href="http://qucs.sourceforge.net/images/q14.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" src="http://qucs.sourceforge.net/images/q14.png" style="cursor: pointer; display: block; height: 457px; margin: 0px auto 10px; text-align: center; width: 662px;" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-4313170585304492521?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/4313170585304492521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2008/01/circuit-simulation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4313170585304492521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/4313170585304492521'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2008/01/circuit-simulation.html' title='circuit simulation'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3222954470682392376.post-7693940104616261661</id><published>2008-01-05T11:40:00.000+05:30</published><updated>2008-01-05T11:42:09.481+05:30</updated><title type='text'>i'm a newbee</title><content type='html'>so i'll hav to wait till i find out what how when where why about blogging.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3222954470682392376-7693940104616261661?l=blog.pankajp.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pankajp.com/feeds/7693940104616261661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.pankajp.com/2008/01/im-newbee.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7693940104616261661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3222954470682392376/posts/default/7693940104616261661'/><link rel='alternate' type='text/html' href='http://blog.pankajp.com/2008/01/im-newbee.html' title='i&apos;m a newbee'/><author><name>Pankaj Pandey</name><uri>https://profiles.google.com/103825278236061266805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KBuYwqz9cns/AAAAAAAAAAI/AAAAAAAAAi8/ID7I8PraIfk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
