<?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>Scott Gorlin</title>
	<atom:link href="http://www.scottgorlin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottgorlin.com</link>
	<description>Ph.D. Candidate, Systems and Computational Neuroscience</description>
	<lastBuildDate>Mon, 12 Apr 2010 05:37:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Python bindings to Zenfolio.com</title>
		<link>http://www.scottgorlin.com/2009/12/python-bindings-to-zenfolio-com/</link>
		<comments>http://www.scottgorlin.com/2009/12/python-bindings-to-zenfolio-com/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 20:57:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.scottgorlin.com/?p=206</guid>
		<description><![CDATA[After receiving threatening letters from my webhost for storing too many photos online, I decided to move the photo backend of this site to Zenfolio.com.  I really enjoy the sophistication of their service in terms of privacy settings per photo and group, the ability to manage photos in folder-like objects (in a much better manner [...]]]></description>
			<content:encoded><![CDATA[<p>After receiving threatening letters from my webhost for storing too many photos online, I decided to move the photo backend of this site to Zenfolio.com.  I really enjoy the sophistication of their service in terms of privacy settings per photo and group, the ability to manage photos in folder-like objects (in a much better manner than Smugmug), direct printing, and unlimited storage for a fairly low price.  Even better, they gave me a free account when I told them I&#8217;d be writing Python code for it!</p>
<p>The end result of my switch is that I have wrapped their public API in Python.  I have made three packages available:</p>
<ul>
<li><a href="http://github.com/gorlins/zenapi" target="_blank">zenapi</a>, a proper Python interface to Zenfolio which exposes their API in clean Python objects</li>
<li><a href="http://github.com/gorlins/zensync" target="_blank">zensync</a>, a service built on zenapi which synchronizes a local directory with Zenfolio</li>
<li><a href="http://github.com/gorlins/djzen" target="_blank">djzen</a>, a Django plugin built on top of zenapi which mirrors a Zenfolio account into a Django database for all the Web 2.0 you can get.  This plugin is currently running on this site and providing all the integration between my Photos page and my Zenfolio account.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.scottgorlin.com/2009/12/python-bindings-to-zenfolio-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PyMVPA sprint</title>
		<link>http://www.scottgorlin.com/2009/12/pymvpa-sprint/</link>
		<comments>http://www.scottgorlin.com/2009/12/pymvpa-sprint/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 19:27:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.scottgorlin.com/?p=202</guid>
		<description><![CDATA[I have just returned from a week of overhauling the world&#8217;s most popular machine learning suite.  PyMVPA is an extremely powerful and flexible toolset for machine learning research and applications in Python, and although the 0.4x release is stable and wonderful enough for my own research, the upcoming 0.5 release features some amazing core improvements [...]]]></description>
			<content:encoded><![CDATA[<p>I have just returned from a week of overhauling <a href="http://www.pymvpa.org/workshops/2009-fall.html#chap-workshop-2009fall" target="_blank">the world&#8217;s most popular machine learning suite</a>.  PyMVPA is an extremely powerful and flexible toolset for machine learning research and applications in Python, and although the 0.4x release is stable and wonderful enough for my own research, the upcoming 0.5 release features some amazing core improvements that will reset the standards for multivariate data analysis.  Seriously, if you aren&#8217;t using PyMVPA for your own work, <a href="http://www.pymvpa.org/installation.html#chap-installation" target="_blank">start now</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottgorlin.com/2009/12/pymvpa-sprint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LaTeX and typesetting goodness</title>
		<link>http://www.scottgorlin.com/2009/09/latex-and-typesetting-goodness/</link>
		<comments>http://www.scottgorlin.com/2009/09/latex-and-typesetting-goodness/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 19:46:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.scottgorlin.com/?p=189</guid>
		<description><![CDATA[As I progressively include more and more math in my research and the documents I write become larger and larger, I have been gradually learning the LaTeX typesetting system.  Simply put, there is no better method for creating distinctive documents that don&#8217;t shout &#8216;I&#8217;m Times New Roman!&#8217;, or worse, &#8216;I&#8217;m Comic Sans!&#8217; (don&#8217;t even get [...]]]></description>
			<content:encoded><![CDATA[<p>As I progressively include more and more math in my research and the documents I write become larger and larger, I have been gradually learning the LaTeX typesetting system.  Simply put, there is no better method for creating distinctive documents that don&#8217;t shout &#8216;I&#8217;m Times New Roman!&#8217;, or worse, &#8216;I&#8217;m <a href="http://bancomicsans.com/">Comic Sans</a>!&#8217; (don&#8217;t even get me started on <a href="http://banpapyrus.com/">Papyrus</a>!).</p>
<p>A great way to learn the ins and outs of LaTeX was to put it to use updating my <a href="http://git.scottgorlin.com/?p=vitae.git;a=blob_plain;f=gorlin_resume.pdf;hb=HEAD">resume</a>, as hand-formatting those beasts in the past has lead me to no end of &#8216;why can&#8217;t Word just do this&#8230;&#8217;-syndrome. In case you like LaTeX and want to use my resume and cv class, <a href="http://git.scottgorlin.com/?p=vitae.git;a=blob_plain;f=scottcv.cls;hb=HEAD">feel free</a> (and browse the <a href="http://git.scottgorlin.com/?p=vitae.git;a=tree;hb=HEAD">repository</a> for my examples).  It was originally based on the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/moderncv/">moderncv</a> class but I found that too casual and clunky, so a good deal has been rewritten and I have not yet updated the license or documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottgorlin.com/2009/09/latex-and-typesetting-goodness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Galleria</title>
		<link>http://www.scottgorlin.com/2009/08/galleria/</link>
		<comments>http://www.scottgorlin.com/2009/08/galleria/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 20:18:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.scottgorlin.com/?p=197</guid>
		<description><![CDATA[This is the Django package I developed to run the photo backend on this site.  It is based on Justin Driscoll&#8217;s ImageKit but differs from most web photo album software (including Justin&#8217;s Photologue) in that it is designed to mirror a large filesystem of photos with minimal user intervention. Features: Django-powered database organization of all [...]]]></description>
			<content:encoded><![CDATA[<p>This is the Django package I developed to run the photo backend on this site.  It is based on Justin Driscoll&#8217;s <a href="http://bitbucket.org/jdriscoll/django-imagekit/wiki/Home">ImageKit</a> but differs from most web photo album software (including Justin&#8217;s Photologue) in that it is designed to mirror a large filesystem of photos with minimal user intervention.</p>
<p>Features:</p>
<ul>
<li>Django-powered database organization of all your photos (and potentially other media with some hacks), with all the templating and Python scripting Django has to offer</li>
<li>Automatically catalogs new photos on your server&#8217;s hard drive and incorporates them into the Django database, organized by the folder hierarchy of your photo directory.  That is, you never have to manually upload and organize photos.  Ever.  Just rsync or FTP photos from home to your server, and run the glLocalSync command through the Django admin shell (or set it up to run automatically via cron).</li>
<li>Automatically deletes photos and folders from the Django database when they are removed from your local folder (this can be turned off).</li>
<li>Various permission levels to control public visibility of photos and folders</li>
<li>All the fun image conversion and precaching available from ImageKit and ImageMagick.</li>
</ul>
<p>The source is available in my <a href="http://git.scottgorlin.com/?p=galleria.git;a=tree;hb=HEAD">galleria.git</a> repository.  Install it like any ol&#8217; Django app and add the variable GALLERIA_LOCAL_SYNC to your settings.py (this is the path containing your hierarchy of photos, not the Django media directory).  You&#8217;ll also need the ImageKit mentioned above.  Sorry but at this point there is no documentation and comments are probably sparser than ideal, but the source should be fairly straightforward for anyone interested in running or modifying it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottgorlin.com/2009/08/galleria/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding Django in PHP</title>
		<link>http://www.scottgorlin.com/2009/07/embedding-django-in-php/</link>
		<comments>http://www.scottgorlin.com/2009/07/embedding-django-in-php/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 02:04:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.scottgorlin.com/?p=169</guid>
		<description><![CDATA[Here's a quicky I solved while developing this site.  I'm an avid lover of <a href="python.org">Python</a> and so <a href="www.djangoproject.org">Django</a> was an obvious framework for this site; however, all the prebuilt goodies like Wordpress run in crusty old PHP.  How could I build the custom backends I need without recoding the wheel?
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quicky I solved while developing this site.  I&#8217;m an avid lover of <a href="http://www.python.org">Python</a> and so <a href="http://www.djangoproject.org">Django</a> was an obvious framework for this site; however, all the prebuilt goodies like WordPress run in crusty old PHP.  How could I build the custom backends I need without recoding the wheel?<br />
<span id="more-169"></span><br />
There is a custom TemplateLoader for Django which can read in PHP files or output, <a href="http://showmedo.com/videotutorials/video?name=pythonNapleonePyConTech2">seen here</a> and <a href="http://code.djangoproject.com/ticket/2440">downloadable here</a>.  This ran out of the box for me on Django 1.1 beta (I only had to set PHP_IN_SHELL = False in my settings.py to suppress some header output) but only solves the problem if Django is the <em>primary</em> framework; since this site runs mainly in WordPress I needed another solution.</p>
<p>Enter ModRewrite.  It may be possible to do this entirely within WordPress via $wp_rewrite but I dealt with it directly in my .htaccess file:</p>
<pre>AddHandler fcgid-script .fcgi

RewriteEngine On
RewriteBase /

# Static routes
RewriteRule ^(media.*)$ - [L]
RewriteRule ^(adminmedia.*)$ - [L]

# Django stuff
RewriteCond %{REQUEST_URI} !(django.fcgi)
RewriteRule ^(accounts.*)$ /django.fcgi/$1 [L]
RewriteRule ^(photos.*)$ /django.fcgi/$1 [L]
RewriteRule ^(admin.*)$ /django.fcgi/$1 [L]

# From WordPress install
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Options All -Indexes</pre>
<p>This, of course, is for Python running through fcgi as required by most shared hosts (Bluehost in my case).  A similar solution is likely available via Location and SetHandler tags in an Apache configuration.</p>
<p>All this does now is send my accounts, admin, and photos off to Django.  To actually integrate my photo gallery into WordPress I created a page called &#8216;photos&#8217; with the permalink http://www.scottgorlin.com/photos, which is the exact url I want my Django app to serve.</p>
<p>Now modify your Django base template system to read the WordPress page instead:</p>
<pre># In some base template
{% extends 'php:loadwp.php' %}
{% block wpwrap %}
My wordpress-wrapped content!
{% endblock %}

# loadwp.php
&lt;?php include('http://scottgorlin.com/index.php?pagename=photos') ?&gt;</pre>
<p>I could not get the PHP include to work for the direct url (&#8216;/index.php?&#8230;&#8217;) but this may be possible with some experimentation.  Note that it is important <em>not</em> to use the permalink since that is what we have rerouted through to Django!</p>
<p>Now if you point your browser to the permalink it is handled by Django (and php/WordPress runs in the background), but you still will get the naked PHP page by going through index.php.  All you have to do now is put template code in your WordPress post, ie:</p>
<pre>{% block wpwrap %}
{% endblock %}</pre>
<p>And you&#8217;re done!  You can see this in action on my Photos page.</p>
<p>I make no claims about the performance or security of this method, but it&#8217;s good enough for my personal site.  Short of using an iframe, the only other method I could derive was using a &lt;?php include(&#8216;djangourl&#8217;) ?&gt; within your php code; this works but I couldn&#8217;t get user authentication running with this method.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottgorlin.com/2009/07/embedding-django-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
