Popular recipes by Maxim Krikun http://code.activestate.com/recipes/users/1085177/2006-03-27T02:12:32-08:00ActiveState Code Recipesmin/max "peaks" with Numeric (Python) 2006-03-27T02:12:32-08:00Maxim Krikunhttp://code.activestate.com/recipes/users/1085177/http://code.activestate.com/recipes/475188-minmax-peaks-with-numeric/ <p style="color: grey"> Python recipe 475188 by <a href="/recipes/users/1085177/">Maxim Krikun</a> (<a href="/recipes/tags/algorithms/">algorithms</a>). </p> <p>Given a large one-dimensional array, break it into blocks of contstant length and compute min and max for each block, the so-called "peaks data".</p> Linear equations solver in 3 lines (Python) 2005-01-31T22:06:30-08:00Maxim Krikunhttp://code.activestate.com/recipes/users/1085177/http://code.activestate.com/recipes/365013-linear-equations-solver-in-3-lines/ <p style="color: grey"> Python recipe 365013 by <a href="/recipes/users/1085177/">Maxim Krikun</a> (<a href="/recipes/tags/programs/">programs</a>). Revision 2. </p> <p>Just a little bit of hack: a linear equations solver using eval and built-in complex numbers:</p> <pre class="prettyprint"><code>&gt;&gt;&gt; solve("x - 2*x + 5*x - 46*(235-24) = x + 2") 3236.0 </code></pre> Shell-like data processing (Python) 2004-04-06T15:06:40-07:00Maxim Krikunhttp://code.activestate.com/recipes/users/1085177/http://code.activestate.com/recipes/276960-shell-like-data-processing/ <p style="color: grey"> Python recipe 276960 by <a href="/recipes/users/1085177/">Maxim Krikun</a> (<a href="/recipes/tags/text/">text</a>). Revision 2. </p> <p>This module introduces an alternative syntax a-la shell pipes for sequence-oriented functions, such as filter, map, etc., via certain classes that override __ror__ method.</p>