<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Python on Fazal Majid&#39;s low-intensity blog</title>
    <link>https://blog.majid.info/categories/python/</link>
    <description>Recent content in Python on Fazal Majid&#39;s low-intensity blog</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 13 Dec 2020 17:54:05 +0000</lastBuildDate>
    <atom:link href="https://blog.majid.info/categories/python/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Automating Epson SSL/TLS certificate renewal</title>
      <link>https://blog.majid.info/epson-certificates/</link>
      <pubDate>Sun, 13 Dec 2020 17:54:05 +0000</pubDate>
      <guid>https://blog.majid.info/epson-certificates/</guid>
      <description>&lt;p&gt;Network-capable Epson printers like my new &lt;a href=&#34;https://www.epson.co.uk/products/printers/inkjet-printers/for-home/ecotank-et-16600&#34;&gt;ET-16600&lt;/a&gt; have a web-based user&#xA;interface that supports HTTPS. You can even upload publicly recognized&#xA;certificates from Let&amp;rsquo;s Encrypt et al, unfortunately the only options they&#xA;offer is a Windows management app (blech) or a manual form.&lt;/p&gt;&#xA;&lt;img src=&#34;https://blog.majid.info/epson-certificates/form.png&#34; alt=&#34;&#34; width=&#34;832&#34; height=&#34;509&#34; class=&#34;fullwidth&#34;/&gt;&#xA;&lt;p&gt;When you have to upload this every month (that&amp;rsquo;s when I automatically renew my&#xA;Let&amp;rsquo;s Encrypt certificates), this gets old really fast, and strange errors&#xA;happen if you forget to do so and end up with an expired certificate.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Street sweeping reminders in iCal</title>
      <link>https://blog.majid.info/ical-street-sweeping/</link>
      <pubDate>Sat, 27 Jul 2013 01:48:50 +0000</pubDate>
      <guid>https://blog.majid.info/ical-street-sweeping/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://blog.majid.info/images/2013/07/sfsign.jpg&#34; alt=&#34;Parking sign&#34; width=&#34;200&#34; height=&#34;357&#34; class=&#34;right10px&#34; align=&#34;right&#34; /&gt;San Francisco sweeps streets twice a month in residential neighborhoods, and you will be fined if your car is parked on a street being swept. On my street, the schedule is the first and third Monday of each month, between 9am and 11am. I was trying to create reminders to myself in my calendar. Unfortunately, iCal does not have the ability to specify a recurring event with that definition.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Scanning your iTunes library for DRM-infested books</title>
      <link>https://blog.majid.info/drm-books/</link>
      <pubDate>Sat, 21 Jul 2012 05:48:27 +0000</pubDate>
      <guid>https://blog.majid.info/drm-books/</guid>
      <description>&lt;p&gt;Tor, the leading publisher for Science Fiction and Fantasy books, announced they would be doing away with DRM in their eBooks. The product pages for their books on iBooks now mention “At the publisher’s request, this title is being sold without Digital Rights Management software (DRM) applied”. I figured it would be a good idea to uncripple the many Tor eBooks I have in my collection.&lt;/p&gt;&#xA;&lt;p&gt;I wrote a &lt;a href=&#34;https://blog.majid.info/code/drmbooks.py&#34;&gt;quick little Python script&lt;/a&gt; to scan my growing iBooks library&#xA;for books that could be updated. The procedure is to delete the book from both&#xA;iTunes and iPads, then download it anew (restarting iTunes is also needed&#xA;after deleting). Apple keeps track of your purchases and will not charge you&#xA;again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Clearing custom crop aspect ratios in Lightroom</title>
      <link>https://blog.majid.info/lightroom-crops/</link>
      <pubDate>Sat, 04 Jun 2011 17:04:31 +0000</pubDate>
      <guid>https://blog.majid.info/lightroom-crops/</guid>
      <description>&lt;p&gt;Lightroom’s crop tool allows you to constrain the aspect ratio to a&#xA;proportion of your choice, e.g. to 4:3, defaulting to the same aspect ratio as&#xA;the original. The last 5 or so custom crop aspect ratios are saved, but a&#xA;minor annoyance is you are unable to clear the list.&lt;/p&gt;&#xA;&lt;p&gt;Python on the Mac and SQLite to the rescue: this simple script&#xA; &lt;a href=&#34;https://blog.majid.info/code/lraspect.zip&#34;&gt;lraspect.zip&lt;/a&gt; will reset them. If you use a non-default name for your&#xA;Lightroom catalog, you will need to edit it. To run it, quit Lightroom and run&#xA;the script. It will back up your catalog for you just in case.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Just enough Weave</title>
      <link>https://blog.majid.info/just-enough-weave/</link>
      <pubDate>Thu, 10 Sep 2009 00:36:07 +0000</pubDate>
      <guid>https://blog.majid.info/just-enough-weave/</guid>
      <description>&lt;p class=&#34;post-it&#34;&gt;&#xA;Note: I am keeping this code around for historical purposes, but it has not&#xA;worked since Weave 1.0 RC2. I created this because Mozilla&amp;#8217;s public sync&#xA;servers were initially quite unreliable, but they have remedied the situation&#xA;and performance problems are a thing of the past. I also learned the inner&#xA;workings of Weave/Firefox Sync in the process, and am satisfied as to the&#xA;security of the system. Since I no longer use Firefox myself, I do not expect&#xA;to ever revive this project. Feel free to take it over, otherwise you are best&#xA;served by using Mozilla&amp;#8217;s cloud.&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Inserting graphviz diagrams in a CVStrac wiki</title>
      <link>https://blog.majid.info/inserting-graphviz-diagrams-in-a-cvstrac-wiki/</link>
      <pubDate>Wed, 22 Nov 2006 02:43:11 +0000</pubDate>
      <guid>https://blog.majid.info/inserting-graphviz-diagrams-in-a-cvstrac-wiki/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.cvstrac.org/&#34;&gt;CVStrac&lt;/a&gt; is an amazing productivity booster for any software development&#xA;group. This simple tool, built around a &lt;a href=&#34;http://www.sqlite.org/&#34;&gt;SQLite&lt;/a&gt; database (indeed, by the&#xA;author of SQLite) combines a bug-tracking database, a CVS browser and a&#xA;wiki. The three components are fully cross-referenced and build off the&#xA;strengths of each other. You can handle almost all aspects of the software&#xA;development process in it, and since it is built on an open database with a&#xA;radically simple schema, it is trivial to extend. I use CVStrac for&#xA;&lt;a href=&#34;http://www.temboz.com/temboz/&#34;&gt;Temboz&lt;/a&gt; to track bugs, but also to trace changes in the code base to&#xA;requirements or to bugs, and last but not least, the wiki makes documentation&#xA;a snap.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Python driver for the Symbol CS 1504 bar code scanner</title>
      <link>https://blog.majid.info/a-python-driver-for-the-symbol-cs-1504-bar-code-scanner/</link>
      <pubDate>Mon, 27 Mar 2006 09:15:24 +0000</pubDate>
      <guid>https://blog.majid.info/a-python-driver-for-the-symbol-cs-1504-bar-code-scanner/</guid>
      <description>&lt;p&gt;One of my cousins works for Symbol, the world’s largest bar code reader manufacturer. The fashionable action today is in RFID, but the humble bar code is relatively untapped at the consumer level. The unexpected success of &lt;a href=&#34;http://www.delicious-monster.com/&#34;&gt;Delicious Library&lt;/a&gt; shows people want to manage their collection of books, CDs and DVDs, and as with businesses, scanning bar codes is the fastest and least error-prone way to do so. Delicious Library supports scanning bar codes with an Apple iSight camera, but you have to wonder how reliable that is.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A reader-writer lock for Python</title>
      <link>https://blog.majid.info/a-reader-writer-lock-for-python/</link>
      <pubDate>Fri, 05 Nov 2004 05:22:25 +0000</pubDate>
      <guid>https://blog.majid.info/a-reader-writer-lock-for-python/</guid>
      <description>&lt;p&gt;Python offers a number of useful synchronization primitives in the &lt;a href=&#34;http://docs.python.org/lib/module-threading.html&#34;&gt;threading&lt;/a&gt; and &lt;a href=&#34;http://docs.python.org/lib/module-Queue.html&#34;&gt;Queue&lt;/a&gt; modules. One that is missing, however, is a simple reader-writer lock (RWLock). A RWLock allows improved concurrency over a simple mutex, and is useful for objects that have high read-to-write ratios like database caches.&lt;/p&gt;&#xA;&lt;p&gt;Surprisingly, I haven’t been able to find any implementation of these semantics, so I rolled my own in a module &lt;a href=&#34;https://blog.majid.info/code/rwlock.py&#34;&gt;rwlock.py&lt;/a&gt; to implement a RWLock class, along with lock promotion/demotion. Hopefully it can be added to the standard library threading module. This code is hereby placed in the public domain.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Threadframe module version 0.2</title>
      <link>https://blog.majid.info/threadframe-module-version-0-2/</link>
      <pubDate>Fri, 11 Jun 2004 02:54:02 +0000</pubDate>
      <guid>https://blog.majid.info/threadframe-module-version-0-2/</guid>
      <description>&lt;p&gt;After a &lt;a href=&#34;http://www.wsanchez.net/MovableType/mt-comments.cgi?entry_id=69&#34;&gt;comments thread&lt;/a&gt; on a &lt;a href=&#34;http://www.wsanchez.net/blog/archives/2004_06.html#000069&#34;&gt;request&lt;/a&gt; in Wilfredo Sanchez’ blog, including valuable contributions by Bob Ippolito, I have updated my &lt;a href=&#34;https://blog.majid.info/threadframe-multithreaded-stack-frame-extraction-for-python/&#34;&gt;threadframe module&lt;/a&gt; to leverage new thread tracking functionality added in Python 2.3. The module now allows Python 2.3 users to extract the stack frame of any given thread using its thread ID.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Threadframe: multithreaded stack frame extraction for Python</title>
      <link>https://blog.majid.info/threadframe-multithreaded-stack-frame-extraction-for-python/</link>
      <pubDate>Fri, 11 Jun 2004 00:47:47 +0000</pubDate>
      <guid>https://blog.majid.info/threadframe-multithreaded-stack-frame-extraction-for-python/</guid>
      <description>&lt;p class=&#34;post-it&#34;&gt;&#xA;  Note: threadframe is obsolete. Python 2.5 and later include a function &lt;tt&gt;sys._current_frames()&lt;/tt&gt; that does the same thing. Threadframe is only useful for Python 2.2 through 2.4.&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;rationale&#34;&gt;Rationale&lt;/h3&gt;&#xA;&lt;p&gt;I was encountering deadlocks in a multi-threaded CORBA server (implemented using omniORB). Debugging using GDB gave me too low-level information, and what I needed was an equivalent of the GDB command “info threads”. There was no such facility available from within Python’s standard library, so I rolled my own.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
