Popular recipes by Robert Lujo http://code.activestate.com/recipes/users/4044016/2011-09-24T18:09:00-07:00ActiveState Code RecipesTwitter incremental backup in YAML format - by HTML get and parse (Python)
2011-09-24T18:09:00-07:00Robert Lujohttp://code.activestate.com/recipes/users/4044016/http://code.activestate.com/recipes/577877-twitter-incremental-backup-in-yaml-format-by-html-/
<p style="color: grey">
Python
recipe 577877
by <a href="/recipes/users/4044016/">Robert Lujo</a>
(<a href="/recipes/tags/backup/">backup</a>, <a href="/recipes/tags/twitter/">twitter</a>, <a href="/recipes/tags/yaml/">yaml</a>).
</p>
<p>Yet another script for backing up Twitter posts (statuses). More information can be found <a href="http://robert-lujo.com/post/10603896621/twitter-backup">here</a>.</p>
<p>The script is based on <a href="http://code.activestate.com/recipes/576594/" rel="nofollow">http://code.activestate.com/recipes/576594/</a>,
<a href="http://movingtofreedom.org/2009/03/18/python-script-for-backing-up-twitter-statuses/." rel="nofollow">http://movingtofreedom.org/2009/03/18/python-script-for-backing-up-twitter-statuses/.</a></p>
Python HTTP POST binary file upload with pycurl (Python)
2008-08-14T04:47:36-07:00Robert Lujohttp://code.activestate.com/recipes/users/4044016/http://code.activestate.com/recipes/576422-python-http-post-binary-file-upload-with-pycurl/
<p style="color: grey">
Python
recipe 576422
by <a href="/recipes/users/4044016/">Robert Lujo</a>
(<a href="/recipes/tags/django/">django</a>, <a href="/recipes/tags/http/">http</a>, <a href="/recipes/tags/post/">post</a>, <a href="/recipes/tags/upload/">upload</a>).
</p>
<p>There is a way to upload file with standard python libraries (urllib, httplib, ...) as explained at <a href="http://code.activestate.com/recipes/146306/" rel="nofollow">http://code.activestate.com/recipes/146306/</a>. But that didn't worked for me for binary data. I didn't liked/tried solution explained at <a href="http://fabien.seisen.org/python/urllib2_multipart.html" rel="nofollow">http://fabien.seisen.org/python/urllib2_multipart.html</a>, so I tried with pycurl (<a href="http://pycurl.sourceforge.net/" rel="nofollow">http://pycurl.sourceforge.net/</a> wrapper for <a href="http://curl.haxx.se/libcurl/" rel="nofollow">http://curl.haxx.se/libcurl/</a>) because it is std. lib for php, and uploading the file is very simple (just add @<path-to-file> to post variable value). It was a little hard to find proper way because there is no such example or documentation. But I found it, and it is so simple ;)</p>
<p>I supply django test application which receives file that is uploaded.</p>
Reindenter (Python)
2008-09-01T04:26:45-07:00Robert Lujohttp://code.activestate.com/recipes/users/4044016/http://code.activestate.com/recipes/576475-reindenter/
<p style="color: grey">
Python
recipe 576475
by <a href="/recipes/users/4044016/">Robert Lujo</a>
(<a href="/recipes/tags/indent/">indent</a>, <a href="/recipes/tags/text/">text</a>).
Revision 3.
</p>
<p>Probably this is done for lots of times, but nevertheless I give my verybasicimplementation.</p>
Groupby hierarchy tree (Python)
2007-11-20T09:34:09-08:00Robert Lujohttp://code.activestate.com/recipes/users/4044016/http://code.activestate.com/recipes/535129-groupby-hierarchy-tree/
<p style="color: grey">
Python
recipe 535129
by <a href="/recipes/users/4044016/">Robert Lujo</a>
(<a href="/recipes/tags/search/">search</a>).
</p>
<p>Here is some thing i needed for some kind drill down (olap). It produces tree of grouped items in hierarchy.</p>