Popular recipes tagged "meta:loc=123"http://code.activestate.com/recipes/tags/meta:loc=123/2017-03-06T12:40:28-08:00ActiveState Code RecipesCollpsible frame for Tkinter or Collapsible panel (Python) 2017-03-06T12:40:28-08:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580760-collpsible-frame-for-tkinter-or-collapsible-panel/ <p style="color: grey"> Python recipe 580760 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/collapse/">collapse</a>, <a href="/recipes/tags/collapsible/">collapsible</a>, <a href="/recipes/tags/frame/">frame</a>, <a href="/recipes/tags/panel/">panel</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 6. </p> <p>Click on button and frame will collapse or expand.</p> <p>If you want to fit the frame to width of contents, call method "udpate_width()".</p> <p>Simple API:</p> <ul> <li>open()</li> <li>close()</li> <li>toggle()</li> <li>update_width()</li> </ul> Roman Numeral Converter (Python) 2016-12-13T05:05:52-08:00Brandon Martinhttp://code.activestate.com/recipes/users/4194238/http://code.activestate.com/recipes/580731-roman-numeral-converter/ <p style="color: grey"> Python recipe 580731 by <a href="/recipes/users/4194238/">Brandon Martin</a> (<a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/numbers/">numbers</a>, <a href="/recipes/tags/numerals/">numerals</a>, <a href="/recipes/tags/roman/">roman</a>). </p> <p>Provides two functions: romanToNumber - Converts a string of Roman Numerals (I,V,X,L,C,D,M) into an integer. (ignores formatting, will return best guess if improperly formatted) numberToRoman - Converts an integer into a string of Roman Numerals</p> small stack language (Python) 2013-07-22T23:53:44-07:00Andrew Wayne Teesdale Jr.http://code.activestate.com/recipes/users/4187305/http://code.activestate.com/recipes/578617-small-stack-language/ <p style="color: grey"> Python recipe 578617 by <a href="/recipes/users/4187305/">Andrew Wayne Teesdale Jr.</a> (<a href="/recipes/tags/language/">language</a>, <a href="/recipes/tags/stack/">stack</a>). </p> <p>a small language in python</p> Benchmark (PHP) 2015-06-26T04:30:14-07:00Roger Mbiama Assogohttp://code.activestate.com/recipes/users/4178746/http://code.activestate.com/recipes/578235-benchmark/ <p style="color: grey"> PHP recipe 578235 by <a href="/recipes/users/4178746/">Roger Mbiama Assogo</a> (<a href="/recipes/tags/perl/">perl</a>, <a href="/recipes/tags/ppi/">ppi</a>, <a href="/recipes/tags/scripts/">scripts</a>, <a href="/recipes/tags/vim/">vim</a>). Revision 6. </p> <p>perl [ -sTtuUWX ] [ -hv ] [ -V[:configvar] ] [ -cw ] [ -d[t][:debugger] ] [ -D[number/list] ] [ -pna ] [ -Fpattern ] [ -l[octal] ] [ -0[octal/hexadecimal] ] [ -Idir ] [ -m[-]module ] [ -M[-]'module...' ] [ -f ] [ -C [number/list] ] [ -S ] [ -x[dir] ] [ -i[extension] ] [ [-e|-E] 'command' ] [ -- ] [ programfile ] [ argument ] [stap -L 'kernel.trace("*")'|sort] [feature]... BEGIN { my $b__dir = (-d '/home/angosson/perl'?'/var/www/cgi-bin/perl':( getpwuid($&gt;) )[7].'/perl');</p> <pre class="prettyprint"><code>unshift @INC,$b__dir.'5/lib/perl5',$b__dir.'5/lib/perl5/x86_64-linux-thread-multi',map { $b__dir . $_ } @INC; </code></pre> <p>} require LWP::UserAgent;</p> <p>my $ua = LWP::UserAgent-&gt;new; $ua-&gt;timeout(10); $ua-&gt;env_proxy;</p> angosson Recepes (Perl) 2012-07-24T13:54:34-07:00Roger Mbiama Assogohttp://code.activestate.com/recipes/users/4182949/http://code.activestate.com/recipes/578223-angosson-recepes/ <p style="color: grey"> Perl recipe 578223 by <a href="/recipes/users/4182949/">Roger Mbiama Assogo</a> (<a href="/recipes/tags/angosso_net/">angosso_net</a>). </p> <p>Stable Cpanel</p> Simulating concurrency with yield (Python) 2006-03-08T07:52:06-08:00Bernhard Mulderhttp://code.activestate.com/recipes/users/189076/http://code.activestate.com/recipes/474127-simulating-concurrency-with-yield/ <p style="color: grey"> Python recipe 474127 by <a href="/recipes/users/189076/">Bernhard Mulder</a> (<a href="/recipes/tags/threads/">threads</a>). </p> <p>Shows how you can yield out of nested function calls. The version here works with methods.</p> Formats current exception with stack trace so that it fits in single line and has known encoding. (Python) 2005-12-01T07:43:44-08:00Dmitry Dvoinikovhttp://code.activestate.com/recipes/users/2475216/http://code.activestate.com/recipes/444746-formats-current-exception-with-stack-trace-so-that/ <p style="color: grey"> Python recipe 444746 by <a href="/recipes/users/2475216/">Dmitry Dvoinikov</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). Revision 2. </p> <p>Have you ever tried to log an exception of unknown type ? What's in it ? How to fetch stack trace ? Will str(e) return plain ascii or international chars ? Is logger ready for it ? This recipe provides a formatting function.</p> Fix ugly file names to be UNIX shell-friendly. (Python) 2005-11-02T07:30:53-08:00Micah Elliotthttp://code.activestate.com/recipes/users/2649403/http://code.activestate.com/recipes/442517-fix-ugly-file-names-to-be-unix-shell-friendly/ <p style="color: grey"> Python recipe 442517 by <a href="/recipes/users/2649403/">Micah Elliott</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>You have files named with funky characters lying around in your filesystem. Ugly files like "My Document #3 - (2005)[1].txt" are common when you're sharing directories with Windows users, but you would like to have them renamed to something like "my_document_3_-_2005-1-.txt" so that your shell and other unix utilities won't have to deal with special characters.</p> MQJMS (Tcl) 2005-10-17T03:35:19-07:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/442320-mqjms/ <p style="color: grey"> Tcl recipe 442320 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/tclblend/">tclblend</a>). </p> <p>Put messages on remote MQ Series queue using IBM implementation of Java Messaging Service Specification.</p> verifying SMIME signed email with M2Crypto and no signer's certificate (Python) 2004-06-03T23:00:36-07:00ludovico magnocavallohttp://code.activestate.com/recipes/users/114743/http://code.activestate.com/recipes/285211-verifying-smime-signed-email-with-m2crypto-and-no-/ <p style="color: grey"> Python recipe 285211 by <a href="/recipes/users/114743/">ludovico magnocavallo</a> . Revision 3. </p> <p>A recipe to verify signed SMIME messages with M2Crypto if you don't have the signer's certificate, which is what usually happens when you have to verify Internet email.</p>