<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Autarchy of the Private Cave &#187; Programming</title> <atom:link href="https://bogdan.org.ua/categories/programming/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Wed, 28 Dec 2022 16:09:04 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>Kite AI coding assistant is saying farewell</title><link>https://bogdan.org.ua/2022/12/28/kite-ai-coding-assistant-is-saying-farewell.html</link> <comments>https://bogdan.org.ua/2022/12/28/kite-ai-coding-assistant-is-saying-farewell.html#comments</comments> <pubDate>Wed, 28 Dec 2022 16:08:46 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Machine learning]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Technologies]]></category> <category><![CDATA[copilot]]></category> <category><![CDATA[kite]]></category> <category><![CDATA[mutable]]></category> <category><![CDATA[tabnine]]></category> <guid
isPermaLink="false">https://bogdan.org.ua/?p=2578</guid> <description><![CDATA[I&#8217;m looking at AI/ML-powered coding assistants (such as mutable.ai, github&#8217;s CoPilot, tabnine, and even Alibaba AI assistant &#8211; but there everything was in Chinese so I didn&#8217;t proceed at all with it), and found &#8211; with sadness &#8211; that Kite, one of the longer-existing solutions (since 2014!) has gone out of business&#8230; Here is Kite&#8217;s [&#8230;]]]></description> <content:encoded><![CDATA[<p>I&#8217;m looking at AI/ML-powered coding assistants (such as <a
href="https://mutable.ai/pricing/" title="mutable.ai pricing" class="broken_link" rel="nofollow">mutable.ai</a>, <a
href="https://github.com/pricing" title="GitHub CoPilot pricing">github&#8217;s CoPilot</a>, <a
href="https://www.tabnine.com/pricing" title="tabnine pricing">tabnine</a>, and even Alibaba AI assistant &#8211; but there everything was in Chinese so I didn&#8217;t proceed at all with it), and found &#8211; with sadness &#8211; that Kite, one of the longer-existing solutions (since 2014!) has gone out of business&#8230;</p><p>Here is <a
href="https://www.kite.com/blog/product/kite-is-saying-farewell/" title="Kite farewell">Kite&#8217;s farewell</a> for you to read.</p><p>Kite did open-source many parts of <a
href="https://github.com/kiteco" title="Kite GitHub">their technology/software stack</a>, though I didn&#8217;t check how comprehensive those parts are, and if that is anywhere near enough to fork/continue their work.<br
/> I wonder if there already exists an open-source project focusing on ML-based code completion for e.g. Python &#8211; let me know in the comments if you know one!</p><p><span
id="more-2578"></span></p><p>Kite cites two reasons for a shutdown: <strong>1) technology not being quite there yet</strong>, and <strong>2) failure to monetize</strong>.<br
/> Kite had up to 500k daily developers using the platform, but apparently extremely few were willing to pay for it.<br
/> If you do look at current ML code assistants, there seems to always exist at least some free tier &#8211; I wonder if that is <em>forced</em> by the same lackluster, non-paying developers attitude as for Kite.</p><p>Kite&#8217;s farewell had another interesting number: <strong>18%</strong>.<br
/> That is by how much individual developer&#8217;s productivity could increase thanks to Kite&#8217;s assistance.<br
/> This isn&#8217;t bad at all; for a team of 5 largely independent developers, it&#8217;s almost one extra &#8220;affordable&#8221; developer.<br
/> Kite was striving to achieve a &#8220;10x improvement&#8221;, but at least to me the <strong>18% improvement</strong> sounds good enough for sales.</p><p>I&#8217;m very curious to try some of these assistants out.<br
/> I can imagine them to be very helpful for relatively experienced developers when starting to work with a new library/ecosystem &#8211; for example, OpenVision Python bindings.<br
/> Even the common autocomplete can significantly simplify &#8220;onboarding&#8221; to a new library &#8211; and a more intelligent autocomplete should be able to help with boilerplate code (that you usually don&#8217;t have when you begin), as well as with some <em>idiomatic</em> expressions and statements.</p><p>Have you already played with some of the <em>smarter</em> code assistants?<br
/> What was your experience?<br
/> Please share <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2022%2F12%2F28%2Fkite-ai-coding-assistant-is-saying-farewell.html&amp;linkname=Kite%20AI%20coding%20assistant%20is%20saying%20farewell" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2022%2F12%2F28%2Fkite-ai-coding-assistant-is-saying-farewell.html&amp;linkname=Kite%20AI%20coding%20assistant%20is%20saying%20farewell" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2022%2F12%2F28%2Fkite-ai-coding-assistant-is-saying-farewell.html&amp;linkname=Kite%20AI%20coding%20assistant%20is%20saying%20farewell" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2022%2F12%2F28%2Fkite-ai-coding-assistant-is-saying-farewell.html&amp;linkname=Kite%20AI%20coding%20assistant%20is%20saying%20farewell" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2022%2F12%2F28%2Fkite-ai-coding-assistant-is-saying-farewell.html&amp;linkname=Kite%20AI%20coding%20assistant%20is%20saying%20farewell" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2022%2F12%2F28%2Fkite-ai-coding-assistant-is-saying-farewell.html&#038;title=Kite%20AI%20coding%20assistant%20is%20saying%20farewell" data-a2a-url="https://bogdan.org.ua/2022/12/28/kite-ai-coding-assistant-is-saying-farewell.html" data-a2a-title="Kite AI coding assistant is saying farewell"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2022/12/28/kite-ai-coding-assistant-is-saying-farewell.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to update a multisite Drupal 6/7 installation using Drush</title><link>https://bogdan.org.ua/2014/08/25/how-to-update-a-multisite-drupal-6-7-installation-using-drush.html</link> <comments>https://bogdan.org.ua/2014/08/25/how-to-update-a-multisite-drupal-6-7-installation-using-drush.html#comments</comments> <pubDate>Mon, 25 Aug 2014 15:35:27 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[D6]]></category> <category><![CDATA[D7]]></category> <category><![CDATA[drupal]]></category> <category><![CDATA[drush]]></category> <category><![CDATA[update]]></category> <category><![CDATA[upgrade]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2167</guid> <description><![CDATA[There are quite a lot of posts on how to do this, but my differs a tiny little bit, so I&#8217;m saving it for my own future reference, and also for the benefits of the wider audience. I am updating a multisite Drupal 6 installation. To the best of my knowledge, the only difference for [&#8230;]]]></description> <content:encoded><![CDATA[<p>There are quite a lot of posts on how to do this, but my differs a tiny little bit, so I&#8217;m saving it for my own future reference, and also for the benefits of the wider audience.</p><p>I am updating a multisite Drupal 6 installation. To the best of my knowledge, the only difference for Drupal 7 is that instead of the <strong>site_offline</strong> D6 variable the <strong>maintenance_mode</strong> variable is used in D7.</p><p>On Debian stable and later, you can <code>sudo aptitude install drush</code> and then just use it immediately after that.</p><p>Note: I recommend <code>su webuser</code> (or <code>sudo -s</code> followed by <code>sudo -s -u webuser</code>) before you run any non-testing <a
href="http://drush.ws/">drush</a> commands, where <em>webuser</em> is the user which owns your web-exposed files (e.g. Debian&#8217;s default is, I think, <strong>www-data</strong>). I&#8217;ve seen a lot of recommendations to run drush as a super-user, but that does not make sense, and may actually cause problems with file ownership.</p><p>One last thing before we start: if your <a
href="http://bogdan.org.ua/2014/08/25/drush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html">drush seems to work fine but hangs when untarring modules &#8211; check this solution</a>.</p><p><span
id="more-2167"></span></p><ol><li>Run some innocent command in drush to see if it produces any PHP warnings/errors you may want to fix before running actual update: <code>drush @sites core-status</code>. In my case, all the sites had the <a
href="https://www.drupal.org/project/cacherouter" class="broken_link" rel="nofollow">CacheRouter</a> module for in-RAM caching with a server daemon back-end, which was not initialized properly when drush bootstrapped Drupal from the command line. In my case, the only working solution was to edit <code>settings.php</code> files of every site to comment out the CacheRouter configuration for the period of update. If you get no warnings/errors, proceed to the next step. <em>Note: I was running drush from the Drupal&#8217;s root (directory which has top-level <code>index.php</code> and <code>.htaccess</code> files), but this should also work if you run from <code>sites/</code> or even <code>sites/sitename</code>.</em></li><li>Here would be several more steps &#8211; copying your production website(s) to a dev-server (if you do not have one already), performing an update on the dev-server first to see if anything breaks and needs fixes, then migrating updated website(s) from the dev-server to production server. Drush actually has tools to simplify all of these procedures. However, the websites I was updating were not critical, and short downtime was not a problem, so I was updating <strong>live</strong> websites. Modify these steps as you see fit to make the process more reliable.</li><li>Backup databases of all your sites. With drush: <code>drush @sites sql-dump --result-file --gzip</code>. This puts backups somewhere into the home directory of your <em>webuser</em>. Backups are named with a human-readable timestamp. Of course, you can also create a manual <a
href="https://www.drupal.org/project/backup_migrate" class="broken_link" rel="nofollow">Backup and Migrate</a> backup, or use phpMyAdmin, or just <code>mysqldump</code>.</li><li>Backup your site&#8217;s files. This step might be unnecessary, as drush seems to backup modules it is upgrading. I would still recommend making a backup, e.g. with <code>tar -acf multidrupal.tar.bz2 html</code>, where <em>html</em> is the directory containing your multisite Drupal&#8217;s root <code>index.php</code>.</li><li>Put the websites into maintenance mode and clear all caches; see the D7-specific note above: <code>drush @sites variable-set site_offline 1 ; drush @sites cache-clear all</code>.</li><li>The actual update! The easiest way would probably be to <code>drush @sites pm-update</code>, but I haven&#8217;t tested that and used a process which I understand better, and which seems more reliable to me (if anything goes wrong). If in your drupal root you have <strong>sites/site1</strong> and <strong>sites/site2</strong>, then run:<br
/> <code><br
/> drush site1 pm-updatecode<br
/> drush @sites updatedb<br
/> drush site2 pm-updatecode<br
/> drush @sites updatedb<br
/> </code><br
/> The <code>pm-updatecode</code> command only updates files, and does not run database update. So with these commands I am first updating modules from site1, then running database update on all sites, then update modules of site2, and run database update on all sites again. Running <code>drush @sites updatedb</code> multiple times, even when there are no updates, should be safe. Take note of any warnings/errors reported, you will want to fix them later, for example:</p><blockquote><p>WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.</p></blockquote></li><li>Disable maintenance mode. Cleaning the cache seems unnecessary, as <code>updatedb</code> command does that. <code>drush @sites variable-set site_offline 0</code>.</li><li>Finalize: re-enable anything disabled before the updates, fix warnings/errors you noted during the update.</li></ol><p>This worked well for me, and I hope it works well for you.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fhow-to-update-a-multisite-drupal-6-7-installation-using-drush.html&amp;linkname=How%20to%20update%20a%20multisite%20Drupal%206%2F7%20installation%20using%20Drush" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fhow-to-update-a-multisite-drupal-6-7-installation-using-drush.html&amp;linkname=How%20to%20update%20a%20multisite%20Drupal%206%2F7%20installation%20using%20Drush" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fhow-to-update-a-multisite-drupal-6-7-installation-using-drush.html&amp;linkname=How%20to%20update%20a%20multisite%20Drupal%206%2F7%20installation%20using%20Drush" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fhow-to-update-a-multisite-drupal-6-7-installation-using-drush.html&amp;linkname=How%20to%20update%20a%20multisite%20Drupal%206%2F7%20installation%20using%20Drush" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fhow-to-update-a-multisite-drupal-6-7-installation-using-drush.html&amp;linkname=How%20to%20update%20a%20multisite%20Drupal%206%2F7%20installation%20using%20Drush" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fhow-to-update-a-multisite-drupal-6-7-installation-using-drush.html&#038;title=How%20to%20update%20a%20multisite%20Drupal%206%2F7%20installation%20using%20Drush" data-a2a-url="https://bogdan.org.ua/2014/08/25/how-to-update-a-multisite-drupal-6-7-installation-using-drush.html" data-a2a-title="How to update a multisite Drupal 6/7 installation using Drush"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2014/08/25/how-to-update-a-multisite-drupal-6-7-installation-using-drush.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Alternatives to GNU make</title><link>https://bogdan.org.ua/2013/10/19/alternatives-to-gnu-make.html</link> <comments>https://bogdan.org.ua/2013/10/19/alternatives-to-gnu-make.html#comments</comments> <pubDate>Sat, 19 Oct 2013 00:49:38 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[alternative]]></category> <category><![CDATA[anduril]]></category> <category><![CDATA[doit]]></category> <category><![CDATA[make]]></category> <category><![CDATA[paver]]></category> <category><![CDATA[rake]]></category> <category><![CDATA[ruffus]]></category> <category><![CDATA[SCons]]></category> <category><![CDATA[snakemake]]></category> <category><![CDATA[waf]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2019</guid> <description><![CDATA[Right now, when I see that I have to often repeat/retype some sets and sequences of commands, I&#8217;m trying to wrap them up into some kind of a script, every time choosing the most appropriate language &#8211; shell when I need to start lots of existing command-line tools, Python when there&#8217;s some data handling and [&#8230;]]]></description> <content:encoded><![CDATA[<p>Right now, when I see that I have to often repeat/retype some sets and sequences of commands, I&#8217;m trying to wrap them up into some kind of a script, every time choosing the most appropriate language &#8211; shell when I need to start lots of existing command-line tools, Python when there&#8217;s some data handling and processing involved, and R when I&#8217;m invoking commands from R packages. So far I have been avoiding the fairly popular makefile-based approach to automating pipelines and workflows which rely heavily on existing tools. However, being curious, I&#8217;ve compiled a short list of modern make-like alternatives, to possibly explore&#8230; sometime later&#8230;</p><ul><li>First comes <a
href="http://software-carpentry.org/v4/make/index.html" class="broken_link" rel="nofollow">make</a> itself &#8211; the oldest and the most widely used software build tool. Stable and powerful. Still, even people who got used to using <strong>make</strong>, have some gripes about it. The most detailed list of gripes is probably <a
href="http://www.conifersystems.com/whitepapers/gnu-make/">here</a>.</li><li><a
href="http://www.scons.org/">SCons</a> is a build tool written in Python. I guess I like that &#8220;configuration files are Python scripts&#8221; &#8211; maybe knowing Python is enough to use SCons, which makes SCons a better choice than <strong>make</strong> for me. SCons seems to have gained <a
href="http://software-carpentry.org/blog/2010/07/popular-fast-or-usable-pick-one.html">some support</a> (scroll down for comments/discussion). There were some doubts about SCons performance (<a
href="http://www.electric-cloud.com/blog/2010/03/08/how-scalable-is-scons/">1</a>, <a
href="http://www.electric-cloud.com/blog/2010/07/21/a-second-look-at-scons-performance/">2</a>, and <a
href="http://www.electric-cloud.com/blog/2010/08/11/the-last-word-on-scons-performance/">3</a>); not sure where SCons is at right now in that regard.</li><li><a
href="http://code.google.com/p/waf/" class="broken_link" rel="nofollow">waf</a>, a Python-based framework for configuring, compiling and installing applications.</li><li>py<a
href="http://pydoit.org/">DoIt</a> is a Python automation tool. It seems to use Python syntax. It aims at bringing the power of build-tools to execute <em>any</em> kind of task, where a task describes some computation to be done (actions), and contains some extra meta-data. Based on the description alone, I&#8217;m quite intrigued! I wonder if anyone had already worked with pyDoIt and can share experiences?&#8230;</li><li>Rake &#8211; Ruby make &#8211; is a simple build program with capabilities similar to those of make. Had seen a lot of positive feedback about this one &#8211; mostly regarding simplicity of use. Still [py]DoIt so far looks more attractive to me personally.</li><li><a
href="http://code.google.com/p/ruffus/">Ruffus</a> is a lightweight python module for running computational pipelines. Sounds like some good competition to [py]DoIt!</li><li><a
href="http://www.anduril.org/anduril/site/">Anduril</a> is an open source component-based workflow framework for scientific data analysis. Sounds promising, though the latest downloadable version is over 400 MBs&#8230; It probably already contains a bunch of binaries and maybe even data and complete workflows for data analysis. Probably worth a look, but may turn out a little overweight for simple pipelining.</li><li><a
href="https://bitbucket.org/johanneskoester/snakemake/wiki/Home">snakemake</a> is a scalable bioinformatics workflow engine. I get the feeling that Python is truly dominating the pipelines/workflows world: snakemake, as even the name suggests, is in Python, too. The front-page example is so simple and clear, that snakemake immediately pushes DoIt down from the 1st place! Awesome.</li><li><a
href="http://paver.github.io/paver/">Paver</a> is a yet-another Python-based software project scripting tool along the lines of Make or Rake, designed to help out with repetitive tasks with the convenience of Pythonâ€™s syntax. Sounds similar to DoIt. Have no idea how they actually compare to each other.</li></ul><p>That is it for now.</p><p>What were your experiences with automating repetitive tasks and building simple pipelines?</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F19%2Falternatives-to-gnu-make.html&amp;linkname=Alternatives%20to%20GNU%20make" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F19%2Falternatives-to-gnu-make.html&amp;linkname=Alternatives%20to%20GNU%20make" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F19%2Falternatives-to-gnu-make.html&amp;linkname=Alternatives%20to%20GNU%20make" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F19%2Falternatives-to-gnu-make.html&amp;linkname=Alternatives%20to%20GNU%20make" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F19%2Falternatives-to-gnu-make.html&amp;linkname=Alternatives%20to%20GNU%20make" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F19%2Falternatives-to-gnu-make.html&#038;title=Alternatives%20to%20GNU%20make" data-a2a-url="https://bogdan.org.ua/2013/10/19/alternatives-to-gnu-make.html" data-a2a-title="Alternatives to GNU make"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2013/10/19/alternatives-to-gnu-make.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>GUIs for R</title><link>https://bogdan.org.ua/2013/10/17/guis-for-r.html</link> <comments>https://bogdan.org.ua/2013/10/17/guis-for-r.html#comments</comments> <pubDate>Thu, 17 Oct 2013 20:59:01 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Science]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[cantor]]></category> <category><![CDATA[deducer]]></category> <category><![CDATA[ipython]]></category> <category><![CDATA[notebook]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[R]]></category> <category><![CDATA[rkward]]></category> <category><![CDATA[rstudio]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1870</guid> <description><![CDATA[I&#8217;ve tried [briefly] Cantor (which also supports Octave and KAlgebra as backends), rkward, deducer/JGR, R Commander, and RStudio. My personal choice was RStudio: it is good-looking, intuitive, easy-to-use, while powerful. Next step would be using some R-equivalent of the excellent ipython&#8217;s Mathematica-like Notebook webinterface&#8230;]]></description> <content:encoded><![CDATA[<p>I&#8217;ve tried [briefly] Cantor (which also supports Octave and KAlgebra as backends), rkward, deducer/JGR, R Commander, and RStudio.</p><p>My personal choice was RStudio: it is good-looking, intuitive, easy-to-use, while powerful.</p><p>Next step would be using some R-equivalent of the excellent ipython&#8217;s Mathematica-like Notebook webinterface&#8230;</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&#038;title=GUIs%20for%20R" data-a2a-url="https://bogdan.org.ua/2013/10/17/guis-for-r.html" data-a2a-title="GUIs for R"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2013/10/17/guis-for-r.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Migrating from Redmine to Bitbucket</title><link>https://bogdan.org.ua/2013/10/17/migrating-from-redmine-to-bitbucket.html</link> <comments>https://bogdan.org.ua/2013/10/17/migrating-from-redmine-to-bitbucket.html#comments</comments> <pubDate>Thu, 17 Oct 2013 20:53:29 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[bitbucket]]></category> <category><![CDATA[migration]]></category> <category><![CDATA[redmine]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1947</guid> <description><![CDATA[In one of the previous posts I&#8217;ve mentioned that BitBucket is Ã¼ber-cool Redmine is also really cool, and is actually more feature-reach than what BitBucket has to offer, but maintaining it needs just a tiny bit more time and attention than I&#8217;m willing to spend these days. So, migration it is! Redmine has issue 3647 [&#8230;]]]></description> <content:encoded><![CDATA[<p>In one of the previous posts I&#8217;ve mentioned that <a
href="http://bogdan.org.ua/2012/08/29/free-private-git-repository-hosting.html">BitBucket is Ã¼ber-cool</a> <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p><p>Redmine is also really cool, and is actually more feature-reach than what BitBucket has to offer, but maintaining it needs just a tiny bit more time and attention than I&#8217;m willing to spend these days. So, migration it is!</p><p>Redmine has <a
href="http://www.redmine.org/issues/3647">issue 3647</a> titled &#8220;Data import/export system&#8221;; it is not resolved, but has a number of links to other resources. Like the <a
href="http://www.hostedredmine.com/news/500">redmine exporter</a> at hostedredmine.com, which provides free <a
href="http://www.hostedredmine.com/">hosted redmine service</a>. Redmine itself has <a
href="http://www.redmine.org/projects/redmine/wiki/Rest_api">REST API</a>, though I have no idea if it allows exporting all the data I may need. There&#8217;s also an <a
href="http://www.redmine.org/boards/3/topics/11986">XLS export plugin</a>, but it has to be installed first, and I&#8217;m too lazy <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> There&#8217;s also <a
href="http://www.taskadapter.com/">TaskAdapter</a>, but they do not support BitBucket (yet?).</p><p>For the complete backup, I think of using the pure-ruby <a
href="https://github.com/yukkyna/redmine-export-project-data" class="broken_link" rel="nofollow">redmine project data export script</a>. To migrate issues only, I&#8217;ll consider the <a
href="http://blog.tommorris.org/post/23816787178/hackdiary-redmine-to-bitbucket-conversion-script" class="broken_link" rel="nofollow">redmine2bitbucket script</a>.</p><p>P.S. Not implying anything (yet?), but my previous migration was from Trac to Redmine&#8230; At that time, Trac seemed to have less features than I wanted. And now I&#8217;m migrating back to &#8220;less features&#8221;, but with a benefit of no support required from me.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fmigrating-from-redmine-to-bitbucket.html&amp;linkname=Migrating%20from%20Redmine%20to%20Bitbucket" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fmigrating-from-redmine-to-bitbucket.html&amp;linkname=Migrating%20from%20Redmine%20to%20Bitbucket" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fmigrating-from-redmine-to-bitbucket.html&amp;linkname=Migrating%20from%20Redmine%20to%20Bitbucket" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fmigrating-from-redmine-to-bitbucket.html&amp;linkname=Migrating%20from%20Redmine%20to%20Bitbucket" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fmigrating-from-redmine-to-bitbucket.html&amp;linkname=Migrating%20from%20Redmine%20to%20Bitbucket" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fmigrating-from-redmine-to-bitbucket.html&#038;title=Migrating%20from%20Redmine%20to%20Bitbucket" data-a2a-url="https://bogdan.org.ua/2013/10/17/migrating-from-redmine-to-bitbucket.html" data-a2a-title="Migrating from Redmine to Bitbucket"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2013/10/17/migrating-from-redmine-to-bitbucket.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Graphs in Python</title><link>https://bogdan.org.ua/2013/07/13/graphs-in-python.html</link> <comments>https://bogdan.org.ua/2013/07/13/graphs-in-python.html#comments</comments> <pubDate>Sat, 13 Jul 2013 18:06:26 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[graph]]></category> <category><![CDATA[graph-tool]]></category> <category><![CDATA[graphs]]></category> <category><![CDATA[igraph]]></category> <category><![CDATA[networkx]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1953</guid> <description><![CDATA[Sooner or later, everyone has to deal with graphs. Some people have to do programming with graphs, and a subset of those &#8211; do that in Python. NetworkX is a pure Python implementation, where anything can be nodes. Both nodes and edges have attributes. NetworkX supports directed graphs and multigraphs (where there are multiple edges [&#8230;]]]></description> <content:encoded><![CDATA[<p><img
src="http://bogdan.org.ua/wp-content/uploads/2013/07/directed-200x180.png" alt="directed graph" width="200" height="180" class="alignleft size-thumbnail wp-image-1956" />Sooner or later, everyone has to deal with <a
href="https://en.wikipedia.org/wiki/Graph_(mathematics)">graphs</a>. Some people have to do programming with graphs, and a subset of those &#8211; do that in Python.</p><p><a
href="http://networkx.github.com/" class="broken_link" rel="nofollow">NetworkX</a> is a pure Python implementation, where <em>anything</em> can be nodes. Both nodes and edges have attributes. NetworkX supports directed graphs and multigraphs (where there are multiple edges between nodes). It might be <a
href="http://projects.skewed.de/graph-tool/wiki/Performance" class="broken_link" rel="nofollow">slower than other implementations</a>, but you may even not notice that &#8211; especially when working with smaller graphs, or not applying computationally-intensive algorithms to your graphs.</p><p><a
href="http://projects.skewed.de/graph-tool/" class="broken_link" rel="nofollow">graph-tool</a> uses the Boost graph library (C++), so it should be really fast. It could be the only multi-threaded graph library for Python. It supports pickling the graphs, allows interactive graph drawing, and has well-illustrated documentation. If performance and efficiency are of utmost importance &#8211; could be the best choice.</p><p><a
href="http://igraph.sourceforge.net/">igraph</a> is also really fast &#8211; just like graph-tool when using 1 CPU; graph-tool only wins conclusively when it is run on multiple CPUs/cores. igraph has an R package bindings to C.</p><p><a
href="http://www.python.org/doc/essays/graphs.html" class="broken_link" rel="nofollow">Pure python</a> is also an option for really smaller cases.</p><p>Finally, there&#8217;s a discussion around <a
href="http://wiki.python.org/moin/PythonGraphApi">Python Graph API</a> to simplify the inter-changeability and inter-operability of various existing Python graph modules. It also has a list of some less-known Python graph libraries, so check it out.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F07%2F13%2Fgraphs-in-python.html&amp;linkname=Graphs%20in%20Python" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F07%2F13%2Fgraphs-in-python.html&amp;linkname=Graphs%20in%20Python" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F07%2F13%2Fgraphs-in-python.html&amp;linkname=Graphs%20in%20Python" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F07%2F13%2Fgraphs-in-python.html&amp;linkname=Graphs%20in%20Python" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F07%2F13%2Fgraphs-in-python.html&amp;linkname=Graphs%20in%20Python" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2013%2F07%2F13%2Fgraphs-in-python.html&#038;title=Graphs%20in%20Python" data-a2a-url="https://bogdan.org.ua/2013/07/13/graphs-in-python.html" data-a2a-title="Graphs in Python"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2013/07/13/graphs-in-python.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Beanstalkd and related tools for easy parallelizing and backgrounding</title><link>https://bogdan.org.ua/2012/02/18/beanstalkd-related-tools-for-easy-parallelizing-backgrounding.html</link> <comments>https://bogdan.org.ua/2012/02/18/beanstalkd-related-tools-for-easy-parallelizing-backgrounding.html#comments</comments> <pubDate>Sat, 18 Feb 2012 11:07:56 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[beanstalk]]></category> <category><![CDATA[beanstalkd]]></category> <category><![CDATA[queue]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1818</guid> <description><![CDATA[beanstalkd: a simple, fast work queue. Jack and the Beanstalkd: a web-app for basic work queue administration. beanstalkc: a simple beanstalkd client library for Python. queueit: a CLI interface tool which helps to integrate beanstalkd into shell scripts.]]></description> <content:encoded><![CDATA[<p><a
href="http://kr.github.com/beanstalkd/" class="broken_link" rel="nofollow">beanstalkd</a>: a simple, fast work queue.<br
/> <a
href="https://github.com/andreisavu/django-jack">Jack and the Beanstalkd</a>: a web-app for basic work queue administration.<br
/> <a
href="https://github.com/earl/beanstalkc">beanstalkc</a>: a simple beanstalkd client library for Python.<br
/> <a
href="https://github.com/chexov/queueit">queueit</a>: a CLI interface tool which helps to integrate beanstalkd into shell scripts.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F02%2F18%2Fbeanstalkd-related-tools-for-easy-parallelizing-backgrounding.html&amp;linkname=Beanstalkd%20and%20related%20tools%20for%20easy%20parallelizing%20and%20backgrounding" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F02%2F18%2Fbeanstalkd-related-tools-for-easy-parallelizing-backgrounding.html&amp;linkname=Beanstalkd%20and%20related%20tools%20for%20easy%20parallelizing%20and%20backgrounding" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F02%2F18%2Fbeanstalkd-related-tools-for-easy-parallelizing-backgrounding.html&amp;linkname=Beanstalkd%20and%20related%20tools%20for%20easy%20parallelizing%20and%20backgrounding" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F02%2F18%2Fbeanstalkd-related-tools-for-easy-parallelizing-backgrounding.html&amp;linkname=Beanstalkd%20and%20related%20tools%20for%20easy%20parallelizing%20and%20backgrounding" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F02%2F18%2Fbeanstalkd-related-tools-for-easy-parallelizing-backgrounding.html&amp;linkname=Beanstalkd%20and%20related%20tools%20for%20easy%20parallelizing%20and%20backgrounding" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2012%2F02%2F18%2Fbeanstalkd-related-tools-for-easy-parallelizing-backgrounding.html&#038;title=Beanstalkd%20and%20related%20tools%20for%20easy%20parallelizing%20and%20backgrounding" data-a2a-url="https://bogdan.org.ua/2012/02/18/beanstalkd-related-tools-for-easy-parallelizing-backgrounding.html" data-a2a-title="Beanstalkd and related tools for easy parallelizing and backgrounding"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2012/02/18/beanstalkd-related-tools-for-easy-parallelizing-backgrounding.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Python performance: set vs list</title><link>https://bogdan.org.ua/2011/08/15/python-performance-set-vs-list.html</link> <comments>https://bogdan.org.ua/2011/08/15/python-performance-set-vs-list.html#comments</comments> <pubDate>Mon, 15 Aug 2011 09:29:04 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Notepad]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[list]]></category> <category><![CDATA[membership]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[set]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1673</guid> <description><![CDATA[Sometimes there is a need to be sure that no identifier is processed twice &#8211; for example, when parsing a file into a database, with file potentially containing duplicate records. An obvious solution is to properly wrap the DB insertion code into try&#8230;except block, and process duplicate primary ID exceptions. Another, sometimes more desired solution [&#8230;]]]></description> <content:encoded><![CDATA[<p>Sometimes there is a need to be sure that no identifier is processed twice &#8211; for example, when parsing a file into a database, with file potentially containing duplicate records. An obvious solution is to properly wrap the DB insertion code into try&#8230;except block, and process <em>duplicate primary ID</em> exceptions. Another, sometimes more desired solution is to maintain a set/list of processed IDs internally, and check against that list prior to attempting the insertion of anything. So is it a set or a list?</p><p>There are already quite a few internet resources discussing &#8220;python set vs list&#8221;, but probably the simplest while elegant way to test that is below.<br
/> <span
id="more-1673"></span><br
/> First, test the speed of adding/appending to a set or a list (here, I&#8217;m mimicking the real-life application, thus the test case has an optional loop):</p><div
id="ig-sh-1" class="syntax_hilite"><div
class="code"><ol
class="code" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$python -mtimeit -s 'myset = set()' 'for x in xrange(1000): myset.add(x)'</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">10000 loops, best of 3: 133 usec per loop</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$python -mtimeit -s 'tmp = list()' 'for x in xrange(1000): tmp.append(x)'</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">10000 loops, best of 3: 116 usec per loop</div></li></ol></div></div><p>As we can see, set and list are comparable in the speed of adding new items, with list being slightly (~12%) faster than set.</p><p>Now, the speed of membership testing: &#8216;x in tmp&#8217;. For this test, I&#8217;ve deliberately chosen an imbalance of True (1%) and False (99%) results for the test &#8211; again, mimicking the real problem I have at hand:</p><div
id="ig-sh-2" class="syntax_hilite"><div
class="code"><ol
class="code" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$python -mtimeit -s 'tmp = set()' -s 'for x in xrange(1000): tmp.add(x)' 'for x in xrange(100000): x in tmp'</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">100 loops, best of 3: 7.27 msec per loop</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$python -mtimeit -s 'tmp = list()' -s 'for x in xrange(1000): tmp.append(x)' 'for x in xrange(100000): x in tmp'</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">10 loops, best of 3: 2.12 sec per loop</div></li></ol></div></div><p>List is much slower for membership testing, while <a
href="http://en.wikipedia.org/wiki/Collection_(computing)#Sets">sets were designed to be fast for doing just that</a>.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F08%2F15%2Fpython-performance-set-vs-list.html&amp;linkname=Python%20performance%3A%20set%20vs%20list" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F08%2F15%2Fpython-performance-set-vs-list.html&amp;linkname=Python%20performance%3A%20set%20vs%20list" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F08%2F15%2Fpython-performance-set-vs-list.html&amp;linkname=Python%20performance%3A%20set%20vs%20list" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F08%2F15%2Fpython-performance-set-vs-list.html&amp;linkname=Python%20performance%3A%20set%20vs%20list" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F08%2F15%2Fpython-performance-set-vs-list.html&amp;linkname=Python%20performance%3A%20set%20vs%20list" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2011%2F08%2F15%2Fpython-performance-set-vs-list.html&#038;title=Python%20performance%3A%20set%20vs%20list" data-a2a-url="https://bogdan.org.ua/2011/08/15/python-performance-set-vs-list.html" data-a2a-title="Python performance: set vs list"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2011/08/15/python-performance-set-vs-list.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Using Python in a Java project</title><link>https://bogdan.org.ua/2011/05/17/using-python-in-a-java-project.html</link> <comments>https://bogdan.org.ua/2011/05/17/using-python-in-a-java-project.html#comments</comments> <pubDate>Tue, 17 May 2011 11:33:52 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Movies]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Groovy]]></category> <category><![CDATA[java]]></category> <category><![CDATA[Jython]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1589</guid> <description><![CDATA[If you are a Python zealot, and Java doesn&#8217;t feel right, but the project you are working on is a Java project &#8211; try Jython &#8211; Python for the Java platform, compile your python scripts into Java bytecode Groovy &#8211; not Python, but still a scripting language which compiles to jars]]></description> <content:encoded><![CDATA[<p>If you are a Python zealot, and Java <em>doesn&#8217;t feel right</em>, but the project you are working on is a Java project &#8211; try</p><ul><li><a
href="http://www.jython.org/">Jython</a> &#8211; Python for the Java platform, compile your python scripts into Java bytecode</li><li><a
href="http://groovy.codehaus.org/" class="broken_link" rel="nofollow">Groovy</a> &#8211; not Python, but still a scripting language which compiles to jars</li></ul><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fusing-python-in-a-java-project.html&amp;linkname=Using%20Python%20in%20a%20Java%20project" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fusing-python-in-a-java-project.html&amp;linkname=Using%20Python%20in%20a%20Java%20project" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fusing-python-in-a-java-project.html&amp;linkname=Using%20Python%20in%20a%20Java%20project" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fusing-python-in-a-java-project.html&amp;linkname=Using%20Python%20in%20a%20Java%20project" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fusing-python-in-a-java-project.html&amp;linkname=Using%20Python%20in%20a%20Java%20project" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fusing-python-in-a-java-project.html&#038;title=Using%20Python%20in%20a%20Java%20project" data-a2a-url="https://bogdan.org.ua/2011/05/17/using-python-in-a-java-project.html" data-a2a-title="Using Python in a Java project"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2011/05/17/using-python-in-a-java-project.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Introduction to Python for bioinformatics</title><link>https://bogdan.org.ua/2011/02/25/introduction-to-python-for-bioinformatics.html</link> <comments>https://bogdan.org.ua/2011/02/25/introduction-to-python-for-bioinformatics.html#comments</comments> <pubDate>Fri, 25 Feb 2011 12:03:55 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1451</guid> <description><![CDATA[This overview presentation is two years old, but still a highly valuable resource: modules and tools mentioned are alive and useful. I think this is the second presentation by Giovanni I&#8217;m embedding (first one being about GNU/make for bioinformatics). Introduction to python for bioinformatics]]></description> <content:encoded><![CDATA[<p>This overview presentation is two years old, but still a highly valuable resource: modules and tools mentioned are alive and useful.<br
/> I think this is the second presentation by Giovanni I&#8217;m embedding (first one being about GNU/make for bioinformatics).</p><div
style="width:425px" id="__ss_1320208"><strong
style="display:block;margin:12px 0 4px"><a
href="http://www.slideshare.net/giovanni/introduction-to-python-for-bioinformatics" title="Introduction to python for bioinformatics">Introduction to python for bioinformatics</a></strong><object
id="__sse1320208" width="425" height="355"><param
name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=introduction-090421044444-phpapp02&#038;stripped_title=introduction-to-python-for-bioinformatics&#038;userName=giovanni" /><param
name="allowFullScreen" value="true"/><param
name="allowScriptAccess" value="always"/><embed
name="__sse1320208" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=introduction-090421044444-phpapp02&#038;stripped_title=introduction-to-python-for-bioinformatics&#038;userName=giovanni" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></div><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F25%2Fintroduction-to-python-for-bioinformatics.html&amp;linkname=Introduction%20to%20Python%20for%20bioinformatics" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F25%2Fintroduction-to-python-for-bioinformatics.html&amp;linkname=Introduction%20to%20Python%20for%20bioinformatics" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F25%2Fintroduction-to-python-for-bioinformatics.html&amp;linkname=Introduction%20to%20Python%20for%20bioinformatics" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F25%2Fintroduction-to-python-for-bioinformatics.html&amp;linkname=Introduction%20to%20Python%20for%20bioinformatics" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F25%2Fintroduction-to-python-for-bioinformatics.html&amp;linkname=Introduction%20to%20Python%20for%20bioinformatics" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F25%2Fintroduction-to-python-for-bioinformatics.html&#038;title=Introduction%20to%20Python%20for%20bioinformatics" data-a2a-url="https://bogdan.org.ua/2011/02/25/introduction-to-python-for-bioinformatics.html" data-a2a-title="Introduction to Python for bioinformatics"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2011/02/25/introduction-to-python-for-bioinformatics.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to easily install any PyPi/easy_install python module on Debian</title><link>https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html</link> <comments>https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html#comments</comments> <pubDate>Wed, 16 Feb 2011 17:22:20 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[debianize]]></category> <category><![CDATA[easy_install]]></category> <category><![CDATA[pycassa]]></category> <category><![CDATA[PyPi]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1430</guid> <description><![CDATA[Imagine you need to install pycassa (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu: if you don&#8217;t have the python-stdeb package: sudo aptitude install python-stdeb pypi-install pycassa That&#8217;s it. Refer to stdeb readme for more information. You will need that if [&#8230;]]]></description> <content:encoded><![CDATA[<p>Imagine you need to install <a
href="https://github.com/pycassa/pycassa">pycassa</a> (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu:</p><ul><li>if you don&#8217;t have the python-stdeb package: <strong>sudo aptitude install python-stdeb</strong></li><li><strong>pypi-install pycassa</strong></li></ul><p>That&#8217;s it.</p><p>Refer to <a
href="https://github.com/astraw/stdeb#readme">stdeb readme</a> for more information. You will need that if there are dependencies &#8211; which might not be resolved automatically by stdeb.</p><p>Before stdeb, it wasn&#8217;t exactly trivial to <a
href="http://showmedo.com/videotutorials/video?name=linuxJensMakingDeb">make a .deb from python module</a>.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&#038;title=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" data-a2a-url="https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html" data-a2a-title="How to easily install any PyPi/easy_install python module on Debian"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>DreamPie: the ultimate Python shell</title><link>https://bogdan.org.ua/2010/08/11/dreampie-the-ultimate-python-shell.html</link> <comments>https://bogdan.org.ua/2010/08/11/dreampie-the-ultimate-python-shell.html#comments</comments> <pubDate>Wed, 11 Aug 2010 14:54:40 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1107</guid> <description><![CDATA[DreamPie: the Python shell you&#8217;ve always dreamt about! â€¢ Type your code in the lower pane of the window. To execute, press Ctrl+Enter. One-liners can be executed by simply pressing Enter; If you don&#8217;t want them executed, press Space and then Enter. â€¢ Use Ctrl+Up and Ctrl+Down to navigate between code segments you&#8217;ve already executed. [&#8230;]]]></description> <content:encoded><![CDATA[<p><a
href="http://dreampie.sourceforge.net/">DreamPie: the Python shell you&#8217;ve always dreamt about!</a></p><blockquote><p>â€¢ Type your code in the lower pane of the window. To execute, press Ctrl+Enter. One-liners can be executed by simply pressing Enter; If you don&#8217;t want them executed, press Space and then Enter.</p><p>â€¢ Use Ctrl+Up and Ctrl+Down to navigate between code segments you&#8217;ve already executed. You can write a few letters before pressing Ctrl+Up, and DreamPie will only search through code segments starting with those letters.</p><p>â€¢ Press Tab or Ctrl+Space to show a list of completions to the current expression. It will also complete file names!</p><p>â€¢ Your results are stored in variables named _0, _1, and so on.</p><p>â€¢ Type a function name and press the space key and DreamPie will automatically add parentheses for you!</p></blockquote><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F08%2F11%2Fdreampie-the-ultimate-python-shell.html&amp;linkname=DreamPie%3A%20the%20ultimate%20Python%20shell" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F08%2F11%2Fdreampie-the-ultimate-python-shell.html&amp;linkname=DreamPie%3A%20the%20ultimate%20Python%20shell" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F08%2F11%2Fdreampie-the-ultimate-python-shell.html&amp;linkname=DreamPie%3A%20the%20ultimate%20Python%20shell" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F08%2F11%2Fdreampie-the-ultimate-python-shell.html&amp;linkname=DreamPie%3A%20the%20ultimate%20Python%20shell" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F08%2F11%2Fdreampie-the-ultimate-python-shell.html&amp;linkname=DreamPie%3A%20the%20ultimate%20Python%20shell" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F08%2F11%2Fdreampie-the-ultimate-python-shell.html&#038;title=DreamPie%3A%20the%20ultimate%20Python%20shell" data-a2a-url="https://bogdan.org.ua/2010/08/11/dreampie-the-ultimate-python-shell.html" data-a2a-title="DreamPie: the ultimate Python shell"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/08/11/dreampie-the-ultimate-python-shell.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Good online Python book with code examples</title><link>https://bogdan.org.ua/2010/03/01/good-online-python-book-with-code-examples.html</link> <comments>https://bogdan.org.ua/2010/03/01/good-online-python-book-with-code-examples.html#comments</comments> <pubDate>Mon, 01 Mar 2010 18:03:11 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[book]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1008</guid> <description><![CDATA[Building Skills in Python: A Programmer&#8217;s Introduction to Python by Steven F. Lott (Â© 2002, 2005, 2007, 2008 Steven F. Lott).]]></description> <content:encoded><![CDATA[<p><a
href="http://www.linuxtopia.org/online_books/programming_books/python_programming/index.html">Building Skills in Python: A Programmer&#8217;s Introduction to Python</a> by Steven F. Lott (Â© 2002, 2005, 2007, 2008 Steven F. Lott).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fgood-online-python-book-with-code-examples.html&amp;linkname=Good%20online%20Python%20book%20with%20code%20examples" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fgood-online-python-book-with-code-examples.html&amp;linkname=Good%20online%20Python%20book%20with%20code%20examples" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fgood-online-python-book-with-code-examples.html&amp;linkname=Good%20online%20Python%20book%20with%20code%20examples" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fgood-online-python-book-with-code-examples.html&amp;linkname=Good%20online%20Python%20book%20with%20code%20examples" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fgood-online-python-book-with-code-examples.html&amp;linkname=Good%20online%20Python%20book%20with%20code%20examples" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fgood-online-python-book-with-code-examples.html&#038;title=Good%20online%20Python%20book%20with%20code%20examples" data-a2a-url="https://bogdan.org.ua/2010/03/01/good-online-python-book-with-code-examples.html" data-a2a-title="Good online Python book with code examples"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/03/01/good-online-python-book-with-code-examples.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>R script to filter probesets with log-expression values below the lowest spike-in</title><link>https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html</link> <comments>https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html#comments</comments> <pubDate>Wed, 27 Jan 2010 12:44:02 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Science]]></category> <category><![CDATA[Affymetrix]]></category> <category><![CDATA[filter]]></category> <category><![CDATA[log-expression]]></category> <category><![CDATA[microarray]]></category> <category><![CDATA[probeset]]></category> <category><![CDATA[R]]></category> <category><![CDATA[spike-in]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=985</guid> <description><![CDATA[Sometimes there is a need to remove all the probesets, which have expression values below the minimal spike-in intensity on the Affymetrix microarray. The reasoning behind this procedure is simple: minimal-expression spike-ins represent the bottom margin of microarray sensitivity, and anything below that margin cannot be reliably quantified &#8211; which also means that both fold-change [&#8230;]]]></description> <content:encoded><![CDATA[<p>Sometimes there is a need to remove all the probesets, which have expression values below the minimal spike-in intensity on the <a
href="http://www.affymetrix.com/">Affymetrix</a> microarray. The reasoning behind this procedure is simple: minimal-expression spike-ins represent the bottom margin of microarray sensitivity, and anything below that margin cannot be reliably quantified &#8211; which also means that both fold-change and p-value of expression variance will be unreliable for these probesets.</p><p>Here&#8217;s a simple <a
href="http://www.r-project.org/">R</a> script to do just that. It is abundantly commented, and also contains an optional (commented out) fragment which allows the removal of more low-variance, low-intensity probesets.</p><p><span
id="more-985"></span><br
/> <em>Hint: click the &#8220;plain text&#8221; box header to be able to right-click the code, &#8220;Select All&#8221;, and then &#8220;Copy&#8221;.</em><br
/> [CODE]<br
/> filter_below_spikes = function(eset) {<br
/> # Finds max(lowest) AFFX/spike-in intensity, and removes rows consisting entirely of values below max(lowest).<br
/> # @param eset<br
/> # ExpressionSet<br
/> # @returns<br
/> # exprs(ExpressionSet), filtered</p><p> # Without Biobase exprs() will not work.<br
/> require(Biobase)<br
/> expr = exprs(eset)</p><p> # &#8216;expr&#8217; sample:<br
/> #                  1<br
/> # 1367452_at 10.880208<br
/> # 1367453_at 10.554647</p><p> cat(nrow(expr), &#8220;rows before filtering.\n&#8221;)</p><p> # Make a vector of spike row names.<br
/> spikes = grep(&#8220;AFFX&#8221;, rownames(expr), value = TRUE)<br
/> cat(&#8220;Expression matrix has&#8221;, length(spikes), &#8220;spike-in rows.\n&#8221;)<br
/> cat(&#8220;Summary of spike-in values distribution follows:\n&#8221;)<br
/> print(summary(expr[spikes, ]))</p><p> # Find max(lowest) spike-in values.<br
/> minval_max = max(as.double(substr(grep(&#8220;Min&#8221;, summary(expr[spikes, ]), value = TRUE), 10, 14)))<br
/> cat(&#8220;max(minimal spike-in log-intensity values) =&#8221;, minval_max, &#8220;\n&#8221;)</p><p> # Remove spike-ins from expr.<br
/> expr = expr[grep("AFFX", rownames(expr), value = TRUE, invert = TRUE), ]</p><p> nospike_rows = nrow(expr)<br
/> cat(nospike_rows, &#8220;rows remaining after the removal of&#8221;, length(spikes), &#8220;spike-in probesets.\n&#8221;)</p><p> # Optional: calculate max(SD) of all removed rows.<br
/> #bad_sds_max = max(apply(expr[!apply((expr > minval_max), 1, any),], 1, sd))</p><p> # Now remove all rows, where each value is <= minval_max.
expr = expr[!apply((expr <= minval_max), 1, all), ]
cat(nrow(expr), "rows remaining after filtering out", nospike_rows - nrow(expr), "probesets with all values below", minval_max, "\n")
#cat(bad_sds_max, "is max(SD) of all", nospike_rows - nrow(expr), "filtered probesets with all values below", minval_max, "\n")
# Optional: Remove *some* of the rows, which have at least one value below minval_max, and row_SD <= bad_sds_max.
#pre_final_rows = nrow(expr)
#expr = expr[(apply(expr, 1, sd) > bad_sds_max) | (apply(expr, 1, min) > minval_max), ]<br
/> #cat(pre_final_rows-nrow(expr), &#8220;rows with SD <=", bad_sds_max, "and min(row) <=", minval_max, "were removed.\n")
#cat(nrow(expr), "final rows returned.\n")
return(expr)
}
[/CODE]
Sample use:<blockquote> > source(&#8220;script.R&#8221;)<br
/> > expr.filtered = filter_below_spikes(eset)</p></blockquote><p>Comments and suggestions are welcome.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&#038;title=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" data-a2a-url="https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html" data-a2a-title="R script to filter probesets with log-expression values below the lowest spike-in"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Cloud-based bruteforcing, slowloris, and Golang: links</title><link>https://bogdan.org.ua/2009/11/13/cloud-based-bruteforcing-slowloris-and-golang-links.html</link> <comments>https://bogdan.org.ua/2009/11/13/cloud-based-bruteforcing-slowloris-and-golang-links.html#comments</comments> <pubDate>Fri, 13 Nov 2009 16:34:51 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[bruteforce]]></category> <category><![CDATA[complexity]]></category> <category><![CDATA[cost]]></category> <category><![CDATA[DOS]]></category> <category><![CDATA[EC]]></category> <category><![CDATA[go]]></category> <category><![CDATA[golang]]></category> <category><![CDATA[mod]]></category> <category><![CDATA[password]]></category> <category><![CDATA[security]]></category> <category><![CDATA[slowloris]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=931</guid> <description><![CDATA[A nice report on the cost of bruteforcing variable-length and variable-complexity passwords using cloud computing services (e.g. Amazon&#8217;s EC). There&#8217;s a kind of a tutorial in their previous post. Slow DoS attack with just 1 computer against a number of web servers, including Apache: slowloris. There is a solution for Apache, packaged for RedHat and [&#8230;]]]></description> <content:encoded><![CDATA[<p>A nice report on the <a
href="http://news.electricalchemy.net/2009/10/password-cracking-in-cloud-part-5.html">cost of bruteforcing variable-length and variable-complexity passwords</a> using cloud computing services (e.g. Amazon&#8217;s <abbr
title="Elastic Cloud">EC</abbr>). There&#8217;s a kind of a tutorial in their previous post.</p><p>Slow <abbr
title="Denial of Service">DoS</abbr> attack with just 1 computer against a number of web servers, including Apache: <a
href="http://ha.ckers.org/slowloris/" class="broken_link" rel="nofollow">slowloris</a>. There is a solution for Apache, packaged for <a
href="ftp://ftp.monshouwer.eu/pub/linux/mod_antiloris/">RedHat</a> and also available for <a
href="http://www.liranuna.com/securing-your-debian-server-against-slowloris/">Debian</a>.</p><p>Finally, there&#8217;s <a
href="http://golang.org/">Go programming language</a>. The most inspiring promise to me personally is the ease of execution parallelization with language&#8217;s built-in syntactic constructs. That is something highly desired. Also, I like that it is a compiled language. However, it might be 10%-20% slower than pure C. Let&#8217;s see how it grows.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F11%2F13%2Fcloud-based-bruteforcing-slowloris-and-golang-links.html&amp;linkname=Cloud-based%20bruteforcing%2C%20slowloris%2C%20and%20Golang%3A%20links" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F11%2F13%2Fcloud-based-bruteforcing-slowloris-and-golang-links.html&amp;linkname=Cloud-based%20bruteforcing%2C%20slowloris%2C%20and%20Golang%3A%20links" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F11%2F13%2Fcloud-based-bruteforcing-slowloris-and-golang-links.html&amp;linkname=Cloud-based%20bruteforcing%2C%20slowloris%2C%20and%20Golang%3A%20links" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F11%2F13%2Fcloud-based-bruteforcing-slowloris-and-golang-links.html&amp;linkname=Cloud-based%20bruteforcing%2C%20slowloris%2C%20and%20Golang%3A%20links" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F11%2F13%2Fcloud-based-bruteforcing-slowloris-and-golang-links.html&amp;linkname=Cloud-based%20bruteforcing%2C%20slowloris%2C%20and%20Golang%3A%20links" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F11%2F13%2Fcloud-based-bruteforcing-slowloris-and-golang-links.html&#038;title=Cloud-based%20bruteforcing%2C%20slowloris%2C%20and%20Golang%3A%20links" data-a2a-url="https://bogdan.org.ua/2009/11/13/cloud-based-bruteforcing-slowloris-and-golang-links.html" data-a2a-title="Cloud-based bruteforcing, slowloris, and Golang: links"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/11/13/cloud-based-bruteforcing-slowloris-and-golang-links.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Configuring web-server: for production and for development</title><link>https://bogdan.org.ua/2009/10/25/configuring-web-server-for-production-and-for-development.html</link> <comments>https://bogdan.org.ua/2009/10/25/configuring-web-server-for-production-and-for-development.html#comments</comments> <pubDate>Sun, 25 Oct 2009 15:16:10 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[development]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[production]]></category> <category><![CDATA[web-server]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=680</guid> <description><![CDATA[Production: see http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-debian-etch &#8211; it is for Debian Etch (which is old-stable), but many of the steps apply equally well to Debian Lenny (current-stable). Also, this is a very basic guide, as if you are going to host multiple sites from multiple clients, you most definitely will need some hosting control panel. Development: see http://www.ruzee.com/blog/2009/01/apache-virtual-hosts-a-clean-setup-for-php-developers. [&#8230;]]]></description> <content:encoded><![CDATA[<p><strong>Production</strong>: see <a
href="http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-debian-etch">http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-debian-etch</a> &#8211; it is for Debian Etch (which is old-stable), but many of the steps apply equally well to Debian Lenny (current-stable). Also, this is a very basic guide, as if you are going to host multiple sites from multiple clients, you most definitely will need some <a
href="http://bogdan.org.ua/2008/09/27/which-hosting-control-panel-to-use-for-a-debian-server.html">hosting control panel</a>.</p><p><strong>Development</strong>: see <a
href="http://www.ruzee.com/blog/2009/01/apache-virtual-hosts-a-clean-setup-for-php-developers">http://www.ruzee.com/blog/2009/01/apache-virtual-hosts-a-clean-setup-for-php-developers</a>. This setup works very well, unless you need to create several virtual hosts every day &#8211; in which case necessary actions could be partially scripted.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F25%2Fconfiguring-web-server-for-production-and-for-development.html&amp;linkname=Configuring%20web-server%3A%20for%20production%20and%20for%20development" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F25%2Fconfiguring-web-server-for-production-and-for-development.html&amp;linkname=Configuring%20web-server%3A%20for%20production%20and%20for%20development" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F25%2Fconfiguring-web-server-for-production-and-for-development.html&amp;linkname=Configuring%20web-server%3A%20for%20production%20and%20for%20development" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F25%2Fconfiguring-web-server-for-production-and-for-development.html&amp;linkname=Configuring%20web-server%3A%20for%20production%20and%20for%20development" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F25%2Fconfiguring-web-server-for-production-and-for-development.html&amp;linkname=Configuring%20web-server%3A%20for%20production%20and%20for%20development" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F25%2Fconfiguring-web-server-for-production-and-for-development.html&#038;title=Configuring%20web-server%3A%20for%20production%20and%20for%20development" data-a2a-url="https://bogdan.org.ua/2009/10/25/configuring-web-server-for-production-and-for-development.html" data-a2a-title="Configuring web-server: for production and for development"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/10/25/configuring-web-server-for-production-and-for-development.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Convenient design and debugging of regular expressions under Linux</title><link>https://bogdan.org.ua/2009/10/10/convenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html</link> <comments>https://bogdan.org.ua/2009/10/10/convenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html#comments</comments> <pubDate>Sat, 10 Oct 2009 15:51:18 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[debugging]]></category> <category><![CDATA[kodos]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[RE]]></category> <category><![CDATA[redet]]></category> <category><![CDATA[regexp]]></category> <category><![CDATA[regular expression]]></category> <category><![CDATA[txt2regexp]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=890</guid> <description><![CDATA[Regular expressions (regexps) are powerful indeed. But debugging non-trivial regexps is a burden even if you understand how regexps work, and remember most (if not all) regexp syntax. Miscellaneous tools exist to ease this task. This post was inspired by redet&#8217;s comparison of regexp helper tools &#8211; it could be sufficient to read only that, [&#8230;]]]></description> <content:encoded><![CDATA[<p><a
href="http://bogdan.org.ua/wp-content/uploads/2009/10/redet-supported-languages.png"><img
src="http://bogdan.org.ua/wp-content/uploads/2009/10/redet-supported-languages-199x171.png" alt="redet-supported languages" title="redet-supported languages" width="199" height="171" class="alignleft size-thumbnail wp-image-896" /></a>Regular expressions (regexps) are powerful indeed. But debugging non-trivial regexps is a burden even if you understand how regexps work, and remember most (if not all) regexp syntax.</p><p>Miscellaneous tools exist to ease this task. This post was inspired by <a
href="http://billposer.org/Software/redet.html#comparison">redet&#8217;s comparison of regexp helper tools</a> &#8211; it could be sufficient to read only that, if you&#8217;re going to try the mentioned tools yourself. Otherwise, read on.<br
/> <span
id="more-890"></span><br
/> <a
href="http://kodos.sourceforge.net/">Kodos</a> is an easy-to-use (but powerful enough) Python tool to verify regular expressions against sample user-provided strings. Available for both Linux and Windows. Generates ready-to-use Python regexp code.</p><p><a
href="http://billposer.org/Software/redet.html">redet</a> <a
href="http://billposer.org/Software/redet.html#comparison">assumes some knowledge</a> of REs. Unlike all the other helper tools, it has the widest code generation coverage &#8211; just go to &#8220;Tools->Save command information&#8221; to generate code (Python, Perl, C, grep &#8211; just to name a few of the <strong>57 (!)</strong> languages/tools/editors supported). At the same time, redet does not depend on specific versions of all supported RE engines &#8211; instead, redet automatically tests for features in available versions.</p><p><a
href="http://laurent.riesterer.free.fr/regexp/">visual-regexp</a> is similar to kodos in features.</p><p><a
href="http://txt2regex.sourceforge.net/">txt2regex</a> is a regex wizard written in bash, capable of generating code for <strong>24</strong> languages/editors/programs (by default, these are enabled: perl, php, postgres, python, sed and vim). It is really simple and convenient, though some understanding of &#8220;groups&#8221; and &#8220;character ranges&#8221; is highly recommended.</p><p><a
href="http://websvn.kde.org/trunk/playground/utils/kregexpeditor/" class="broken_link" rel="nofollow">KRegExpEditor</a> was a part of kde3-utils, and seems to be missing from current KDE 4.3. It is similar to kodos and visual-regexp in its philosophy and features.</p><p>I would recommend using one of kodos/visual-regexp/kregexpeditor to quickly test or design your regular expression, then use redet to generate appropriate source code. As an alternative (and when working in a console), just use txt2regexp to generate the code you need.</p><p>Tools I haven&#8217;t tried include <a
href="http://www.weitz.de/regex-coach/">regex coach</a> and <a
href="http://freshmeat.net/projects/regexpviewer/">regexpviewer</a>.</p><p>Please also see this extensive <a
href="http://billposer.org/Linguistics/Computation/Resources.html#patterns">list of regular expression and pattern-matching related</a> software.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F10%2Fconvenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html&amp;linkname=Convenient%20design%20and%20debugging%20of%20regular%20expressions%20under%20Linux" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F10%2Fconvenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html&amp;linkname=Convenient%20design%20and%20debugging%20of%20regular%20expressions%20under%20Linux" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F10%2Fconvenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html&amp;linkname=Convenient%20design%20and%20debugging%20of%20regular%20expressions%20under%20Linux" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F10%2Fconvenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html&amp;linkname=Convenient%20design%20and%20debugging%20of%20regular%20expressions%20under%20Linux" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F10%2Fconvenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html&amp;linkname=Convenient%20design%20and%20debugging%20of%20regular%20expressions%20under%20Linux" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F10%2Fconvenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html&#038;title=Convenient%20design%20and%20debugging%20of%20regular%20expressions%20under%20Linux" data-a2a-url="https://bogdan.org.ua/2009/10/10/convenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html" data-a2a-title="Convenient design and debugging of regular expressions under Linux"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/10/10/convenient-design-and-debugging-of-regular-expressions-under-linux-tools-comparison.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Screem HTML editor dies with &#8216;GSlice: assertion failed: sinfo-&gt;n_allocated &gt; 0&#8242;</title><link>https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html</link> <comments>https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html#comments</comments> <pubDate>Thu, 20 Aug 2009 11:51:20 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[XHTML/CSS]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[screem]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=847</guid> <description><![CDATA[Screem HTML/XML editor has tag-specific auto-complete, and is a nice editor for web-developers (at least as long as Quanta is not available for Debian testing). However, version 0.16.1 is very unstable, and dies with ***MEMORY-ERROR***: screem[5527]: GSlice: assertion failed: sinfo->n_allocated > 0 As a workaround (initially suggested for the highly similar Firestarter crashes), try running [&#8230;]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.screem.org/">Screem HTML/XML editor</a> has tag-specific auto-complete, and is a nice editor for web-developers (at least as long as Quanta is not available for Debian testing).</p><p>However, version 0.16.1 is very unstable, and dies with</p><blockquote><p>***MEMORY-ERROR***: screem[5527]: GSlice: assertion failed: sinfo->n_allocated > 0</p></blockquote><p>As a workaround (initially suggested for the highly similar Firestarter crashes), try running screem with this command:</p><blockquote><p>G_SLICE=always-malloc screem</p></blockquote><p>Too bad last development version of Screem is dated March 2006.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&#038;title=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" data-a2a-url="https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html" data-a2a-title="Screem HTML editor dies with ‘GSlice: assertion failed: sinfo-&gt;n_allocated &gt; 0′"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Bad memory handling and server stability</title><link>https://bogdan.org.ua/2009/07/13/bad-memory-handling-and-server-stability.html</link> <comments>https://bogdan.org.ua/2009/07/13/bad-memory-handling-and-server-stability.html#comments</comments> <pubDate>Mon, 13 Jul 2009 09:29:27 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[memory]]></category> <category><![CDATA[mtrace]]></category> <category><![CDATA[RAM]]></category> <category><![CDATA[valgrind]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=813</guid> <description><![CDATA[The two graphs below (clickable) are for CPU and RAM use during a period of a program going wild between 23:17 and 23:41 (24+ minutes of server&#8217;s downtime). The program was run non-root, it just consumed all the memory it could. It was killed by kernel, so the server started responding without any interventions &#8211; [&#8230;]]]></description> <content:encoded><![CDATA[<p>The two graphs below (clickable) are for CPU and RAM use during a period of a program going wild between 23:17 and 23:41 (24+ minutes of server&#8217;s downtime). The program was run non-root, it just consumed all the memory it could. It was killed by kernel, so the server started responding without any interventions &#8211; which were hard to perform, because none of the services (including ssh) were responding during downtime.<br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2009/07/cpugraph.png"><img
src="http://bogdan.org.ua/wp-content/uploads/2009/07/cpugraph-500x130.png" alt="cpugraph" title="cpugraph" width="500" height="130" class="aligncenter size-medium wp-image-814" /></a><br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2009/07/memgraph.png"><img
src="http://bogdan.org.ua/wp-content/uploads/2009/07/memgraph-500x138.png" alt="memgraph" title="memgraph" width="500" height="138" class="aligncenter size-medium wp-image-815" /></a></p><p>If you happen to be developing a C/C++ program &#8211; do use mtrace and valgrind, those are huge helpers against the problems akin to that shown on the graphs.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F07%2F13%2Fbad-memory-handling-and-server-stability.html&amp;linkname=Bad%20memory%20handling%20and%20server%20stability" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F07%2F13%2Fbad-memory-handling-and-server-stability.html&amp;linkname=Bad%20memory%20handling%20and%20server%20stability" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F07%2F13%2Fbad-memory-handling-and-server-stability.html&amp;linkname=Bad%20memory%20handling%20and%20server%20stability" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F07%2F13%2Fbad-memory-handling-and-server-stability.html&amp;linkname=Bad%20memory%20handling%20and%20server%20stability" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F07%2F13%2Fbad-memory-handling-and-server-stability.html&amp;linkname=Bad%20memory%20handling%20and%20server%20stability" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F07%2F13%2Fbad-memory-handling-and-server-stability.html&#038;title=Bad%20memory%20handling%20and%20server%20stability" data-a2a-url="https://bogdan.org.ua/2009/07/13/bad-memory-handling-and-server-stability.html" data-a2a-title="Bad memory handling and server stability"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/07/13/bad-memory-handling-and-server-stability.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>C: how to specify comparison operators floating precision</title><link>https://bogdan.org.ua/2009/06/11/c-how-to-specify-comparison-operators-floating-precision.html</link> <comments>https://bogdan.org.ua/2009/06/11/c-how-to-specify-comparison-operators-floating-precision.html#comments</comments> <pubDate>Thu, 11 Jun 2009 17:47:37 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[how-to]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[C]]></category> <category><![CDATA[comparison]]></category> <category><![CDATA[double]]></category> <category><![CDATA[example]]></category> <category><![CDATA[float]]></category> <category><![CDATA[floating]]></category> <category><![CDATA[operator]]></category> <category><![CDATA[precision]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=774</guid> <description><![CDATA[There is no way I&#8217;m aware of to do what the title says. However&#8230; I&#8217;m sure that you are aware of the fact that floats representation in any programming language is limited by the precision of the internal binary representations. In other words, you can never have an exact float representation &#8211; there will always [&#8230;]]]></description> <content:encoded><![CDATA[<p>There is no way I&#8217;m aware of to do what the title says. However&#8230;</p><p>I&#8217;m sure that you are aware of the fact that floats representation in any programming language is limited by the precision of the internal binary representations. In other words, you can never have an <strong>exact</strong> float representation &#8211; there will always be some precision associated with the float you are working with. The simplest example is the difference in precision between the <em>float</em> and <em>double</em> types in <strong>C</strong>.</p><p>Suppose I have the following code fragment:<br
/> [C] if ( result.score  >= input->raw_cut_off ) [/C]</p><p>Both <em>result.score</em> and <em>input->raw_cut_off</em> are of type <strong>float</strong>, and can have positive and negative values. When compared with the greater than or equal ( >= ) operator, it is not always that condition is true &#8211; for the precision reasons shortly mentioned above.</p><p>As I already said, there is no precision specification for equality operators in <strong>C</strong>. But it is quite simple to &#8220;invent&#8221; precision specification; e.g. if I wanted to test for equality only, I could write<br
/> [C] if ( fabsf( result.score &#8211; input->raw_cut_off ) <  0.000001 )[/C]
In this example, I'm effectively asking for 6-digit precision for the equality comparison of floating-point values. Note, that if you replace that 0.000001 with the actual precision limit of the floating type you are using, you will be "exactly" comparing floating-point numbers - up to that type's precision, of course <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> .</p><p>The first-most example with the >= operator can be rewritten as<br
/> [C] if ( result.score  > ( input->raw_cut_off &#8211; precision) ) [/C]<br
/> where <em>precision</em> is exactly what it is named, e.g. <em>precision</em> = 0.000001.</p><p>Sources used:</p><ul><li>comment by <a
href="http://bytes.com/topic/c-sharp/answers/233215-float-double-arithmetic-precision-error#post953273">Randy A. Ynchausti</a></li><li><a
href="http://www.shokhirev.com/nikolai/abc/sciprog/sciprognum.html">scientific programming</a></li></ul><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F06%2F11%2Fc-how-to-specify-comparison-operators-floating-precision.html&amp;linkname=C%3A%20how%20to%20specify%20comparison%20operators%20floating%20precision" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F06%2F11%2Fc-how-to-specify-comparison-operators-floating-precision.html&amp;linkname=C%3A%20how%20to%20specify%20comparison%20operators%20floating%20precision" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F06%2F11%2Fc-how-to-specify-comparison-operators-floating-precision.html&amp;linkname=C%3A%20how%20to%20specify%20comparison%20operators%20floating%20precision" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F06%2F11%2Fc-how-to-specify-comparison-operators-floating-precision.html&amp;linkname=C%3A%20how%20to%20specify%20comparison%20operators%20floating%20precision" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F06%2F11%2Fc-how-to-specify-comparison-operators-floating-precision.html&amp;linkname=C%3A%20how%20to%20specify%20comparison%20operators%20floating%20precision" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F06%2F11%2Fc-how-to-specify-comparison-operators-floating-precision.html&#038;title=C%3A%20how%20to%20specify%20comparison%20operators%20floating%20precision" data-a2a-url="https://bogdan.org.ua/2009/06/11/c-how-to-specify-comparison-operators-floating-precision.html" data-a2a-title="C: how to specify comparison operators floating precision"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/06/11/c-how-to-specify-comparison-operators-floating-precision.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>