PradeepGowda.com http://pradeepgowda.com CC Attribution-NonCommercial-NoDerivs 3.0 30 Wed, 19 Nov 2008 14:50:55 GMT Wed, 19 Nov 2008 14:50:55 GMT http://blogs.law.harvard.edu/tech/rss yaki The Daily Checkin http://pradeepgowda.com/blog <div class="hentry p1 post publish alt"> <div class="entry-head"> <h1 class="entry-title"><a href="http://pradeepgowda.com/blog/2008/11/12" class="wikilink" rel="bookmark" title="permanent link to this entry">Book meme</a></h1> <!--small class="entry-meta"><span class="chronodata">Created on Nov 12, 20:08 by Pradeep Gowda, not updated since.</span></small --> </div> <!-- .entry-head --> <div class="entry-content"> <blockquote>They actually live (socially) in the kitchen and/or den area anyway, so what better place to spend your time working than with lots of light and room for equipment and your library?</blockquote> <p>by David Allen &#8220;Ready for Anything&#8221;.</p> <h4>continue the meme.</h4> <ul> <li>Grab the nearest book.</li> <li>Open it to page 56.</li> <li>Find the fifth sentence.</li> <li>Post the text of the sentence in your journal along with these instructions.</li> <li>Don&#8217;t dig for your favorite book, the cool book, or the intellectual one: pick the <span class="caps">CLOSEST</span>.</li> </ul> </div> <!-- .entry-content --> </div> <!-- #post-ID --> <div class="hentry p1 post publish alt"> <div class="entry-head"> <h1 class="entry-title"><a href="http://pradeepgowda.com/blog/2008/11/05" class="wikilink" rel="bookmark" title="permanent link to this entry">Announcing webgen.py</a></h1> <!--small class="entry-meta"><span class="chronodata">Created on Nov 05, 13:38 by Pradeep Gowda, not updated since.</span></small --> </div> <!-- .entry-head --> <div class="entry-content"> <p><a href="http://pradeepgowda.com/webgen.py/" title="external link to http://pradeepgowda.com/webgen.py/" class="http">webgen.py</a> is a simple static website generator written in Python.</p> <p>The source code is available on github &#8211; <a href="http://github.com/btbytes/webgen.py" title="external link to http://github.com/btbytes/webgen.py" class="http"></a><a href="http://github.com/btbytes/webgen.py" title="external link to http://github.com/btbytes/webgen.py" class="http">http://github.com/btbytes/webgen.py</a></p> </div> <!-- .entry-content --> </div> <!-- #post-ID --> <div class="hentry p1 post publish alt"> <div class="entry-head"> <h1 class="entry-title"><a href="http://pradeepgowda.com/blog/2008/10/23" class="wikilink" rel="bookmark" title="permanent link to this entry">Using Web.py's database library for data munging</a></h1> <!--small class="entry-meta"><span class="chronodata">Created on Oct 23, 18:51 by Pradeep Gowda, not updated since.</span></small --> </div> <!-- .entry-head --> <div class="entry-content"> <p>The more I use <a href="http://pradeepgowda.com/WebPy" class="wiki" title="WebPy is defined, but has not been indexed yet.">web.py</a>, the more I appreciate its compact libraries. </p> <p>Web.py's database library is very handy in writing scripts that do the manipulation and heavy lifting. </p> <p>Lets cut to the chase and see how to use web.py's database library.</p> <p>Consider the simple use-case of normalising all the tags for articles stored in <code>articles</code> table to a standard format of <code>lower__case_words</code> (often called a <code>slug</code>). The current tags have a mix of upper case words and whitespace, which does not look very neat (Ah! geek OCD). </p> <pre> import web db = web.database(dbn=os.environ.get('DATABASE_ENGINE', 'mysql'), db='devdb', user="user", passwd="passwd") def cleanup_blog_tags(): tags = db.select('tags') ccount = 0 for t in tags: name = t.name slug = slugify(name) print name, slug db.update('tags', where="id=$id", _test=False, vars={'id':t.id}, slug=slug, name=name) print '%s tags updated' % (ccount, ) def main(): cleanup_blog_tags() if __name__ == '__main__': main() </pre> </div> <!-- .entry-content --> </div> <!-- #post-ID --> <div class="hentry p1 post publish alt"> <div class="entry-head"> <h1 class="entry-title"><a href="http://pradeepgowda.com/blog/2008/10/07" class="wikilink" rel="bookmark" title="permanent link to this entry">Old wine, new bottle</a></h1> <!--small class="entry-meta"><span class="chronodata">Created on Oct 08, 15:33 by Pradeep Gowda, not updated since.</span></small --> </div> <!-- .entry-head --> <div class="entry-content"> <p>This blog continues to be served by Python, but by a different species &#8211; <a href="http://pradeepgowda.com/Yaki" class="wiki" title="Yaki is defined, but has not been indexed yet.">Yaki</a> . Yaki is a Blog and a Wiki rolled into one.</p> <p>As I have documented <a href="http://pradeepgowda.com/PublishingProcess" class="wiki" title="PublishingProcess is defined, but has not been indexed yet.">here</a>, I find doing blog posts from text-editor<sup class="footnote"><a href="/blog/2008/10/07#fn1" title="link to fn1 in this page" class="anchor">1</a></sup> quite liberating. I spend a lot of working hours inside a text editor editing code, so writing posts feels more natural opposed to blogging from within a browser window. I can understand why many people went gaga about <a href="http://hogbaysoftware.com/products/writeroom" title="external link to http://hogbaysoftware.com/products/writeroom" class="http">Darkroom</a> . Focus is a good thing to have.</p> <p>Yaki also removes the stress of figuring out where to put a blob of text. Should I write a blog post about the server configuration I did, or should I create a stand alone page because I might add something to it later? With Yaki, everything is just text so that I can just write what is there to be written, content with the fact that I can always just edit the file and the online version will be updated automatically. I see this approach of edit-it-and-forget-it approach enabling me to write longer, hopefully useful documents over time compared to yyyy/mm/dd trailing blog posts.</p> <p class="footnote" id="fn1"><sup>1</sup> Using TextWrangler because TextMate does not have native support for editing remote files.</p> </div> <!-- .entry-content --> </div> <!-- #post-ID --> <div class="hentry p1 post publish alt"> <div class="entry-head"> <h1 class="entry-title"><a href="http://pradeepgowda.com/blog/2008/09/20" class="wikilink" rel="bookmark" title="permanent link to this entry">Pi</a></h1> <!--small class="entry-meta"><span class="chronodata">Created on Sep 20, 21:20 by Pradeep Gowda, updated 2 weeks, 1 day ago.</span></small --> </div> <!-- .entry-head --> <div class="entry-content"> <a href="http://en.wikipedia.org/wiki/Pi" title="external link to http://en.wikipedia.org/wiki/Pi" class="http"><img src="http://pradeepgowda.comhttp://upload.wikimedia.org/wikipedia/commons/2/2e/Pi-symbol.svg" height="100" width="100" align="left" /></a> I constantly tweak my website, hoping that some combination of layout, design and colors will suddenly propel me into becoming a better writer. My tinkering of the website does not go from 1 to 2. Rather, it jumps back and forth between many ideas. A blog, a 'homepage', a "bliki":bliki, a minimalitic tumblr etc. "Pi":Pi seems to be a better change tracking sequence. 3.142... <p>I wrote my own <a href="http://pradeepgowda.com/CMS" title="CMS is defined, but has not been indexed yet." class="wiki"><span class="caps">CMS</span></a> using <a href="http://pradeepgowda.com/Django" class="wiki" title="Django is defined, but has not been indexed yet.">Django</a> and imported all the entries from the old blog running on <a href="http://wordpress.org" title="external link to http://wordpress.org" class="http">Wordpress</a>. Still I didn&#8217;t like the idea of having to use a browser window to write anything. <a href="http://the.taoofmac.com/space/Yaki" title="external link to http://the.taoofmac.com/space/Yaki" class="http">Yaki</a> looks to be what I consider to be an excellent balance between static and dynamic content, file-system based, fast, hackable and opinionated (uses relatively obscure <a href="http://snakelets.sourceforge.net" title="external link to http://snakelets.sourceforge.net" class="http">Snakelets</a> application server) system. To top it all, its written using <a href="http://pradeepgowda.com/Python" class="wiki" title="Python is defined, but has not been indexed yet.">Python</a>.</p> <p>I&#8217;m going to give it a serious try. So far, it is looking good. Considering I&#8217;ve written at-least three paragraphs after three months of hiatus.</p> </div> <!-- .entry-content --> </div> <!-- #post-ID --> <div class="technorati_tags" align="right"><small>Technorati Tags: <a href="http://technorati.com/tag/cms" rel="tag">cms</a>, <a href="http://technorati.com/tag/django" rel="tag">django</a>, <a href="http://technorati.com/tag/publishingprocess" rel="tag">publishingprocess</a>, <a href="http://technorati.com/tag/python" rel="tag">python</a>, <a href="http://technorati.com/tag/webpy" rel="tag">webpy</a>, <a href="http://technorati.com/tag/yaki" rel="tag">yaki</a></small></div><br/><small><a href="http://pradeepgowda.com/blog" title="link to http://pradeepgowda.com/blog">@</a></small> Fri, 14 Nov 2008 16:45:57 GMT Pradeep Gowda PradeepGowda.com wiki http://pradeepgowda.com/blog Book meme http://pradeepgowda.com/blog/2008/11/12 <blockquote>They actually live (socially) in the kitchen and/or den area anyway, so what better place to spend your time working than with lots of light and room for equipment and your library?</blockquote> <p>by David Allen &#8220;Ready for Anything&#8221;.</p> <h4>continue the meme.</h4> <ul> <li>Grab the nearest book.</li> <li>Open it to page 56.</li> <li>Find the fifth sentence.</li> <li>Post the text of the sentence in your journal along with these instructions.</li> <li>Don&#8217;t dig for your favorite book, the cool book, or the intellectual one: pick the <span class="caps">CLOSEST</span>.</li> </ul><br/><small><a href="http://pradeepgowda.com/blog/2008/11/12" title="link to http://pradeepgowda.com/blog/2008/11/12">@</a></small> Wed, 12 Nov 2008 20:08:19 GMT Pradeep Gowda PradeepGowda.com wiki http://pradeepgowda.com/blog/2008/11/12