Popular recipes by Shashwat Anand http://code.activestate.com/recipes/users/4172995/2011-02-24T00:33:07-08:00ActiveState Code RecipesConverts from decimal to any base ( between 2 and 26 ) (Python) 2011-02-24T00:33:07-08:00Shashwat Anandhttp://code.activestate.com/recipes/users/4172995/http://code.activestate.com/recipes/577586-converts-from-decimal-to-any-base-between-2-and-26/ <p style="color: grey"> Python recipe 577586 by <a href="/recipes/users/4172995/">Shashwat Anand</a> (<a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/base/">base</a>). </p> <p>This function takes in any base-10 integer and returns the string representation of that number in its specified base-n form. The code was inspired from <a href="http://code.activestate.com/recipes/65212-convert-from-decimal-to-any-base-number/" rel="nofollow">http://code.activestate.com/recipes/65212-convert-from-decimal-to-any-base-number/</a> , thereby improving upon it.</p> SPOJ backup script (Python) 2010-02-09T08:50:44-08:00Shashwat Anandhttp://code.activestate.com/recipes/users/4172995/http://code.activestate.com/recipes/577036-spoj-backup-script/ <p style="color: grey"> Python recipe 577036 by <a href="/recipes/users/4172995/">Shashwat Anand</a> (<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/spoj/">spoj</a>, <a href="/recipes/tags/tools/">tools</a>). Revision 3. </p> <h4>Introduction</h4> <p>At Sphere Online Judge (<a href="http://www.spoj.pl" rel="nofollow">http://www.spoj.pl</a>) you are given the capability of trying out the challenging problems given. It also gives you the capability of viewing and downloading your own solution.</p> <p>The tool spojbackup tends to automatically backup all your Accepted submissions and save them on the desired location of your computer. The basic idea is to automate the process which can be used as a backup and an offline reference tool of your own codes.</p> <h4>Features</h4> <ul> <li><p>Resume downloads. spojbackup currently supports resuming of the solutions if internet connection is disrupted</p></li> <li><p>Incremental backup facility it'll not download the code already present on your machine. Only newer code added in your signedlist will be downloaded</p></li> <li><p>User-defined destination all codes are saved at user-defined destination if no option is given by user it saves in the folder from where command is run</p></li> <li><p>Proxy support Proxy support is provided as SPOJ users are generally university students and they are generally behind a proxy and university firewall.</p></li> </ul> <h4>Bugs</h4> <p>In case of finding a bug please drop a mail to the authors. We will try to sort out the problems.</p> partitionall() - partition until the end (Python) 2010-03-01T15:27:07-08:00Shashwat Anandhttp://code.activestate.com/recipes/users/4172995/http://code.activestate.com/recipes/577060-partitionall-partition-until-the-end/ <p style="color: grey"> Python recipe 577060 by <a href="/recipes/users/4172995/">Shashwat Anand</a> (<a href="/recipes/tags/string/">string</a>). Revision 4. </p> <p>Search for the separator sep in string s, and return the part before it, the separator itself, and the part after it continuously untill all the seperator finishes. If the separator is not found, return string s. It works like split() combined with partition()</p>