Popular recipes by Victor Yang http://code.activestate.com/recipes/users/627255/2011-12-09T07:38:28-08:00ActiveState Code RecipesShow all the telecommuting jobs from the Python Job Board (Python)
2011-12-09T07:38:28-08:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/577979-show-all-the-telecommuting-jobs-from-the-python-jo/
<p style="color: grey">
Python
recipe 577979
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/screenscrape/">screenscrape</a>).
</p>
<p>It is running as a cronjob on a VPS(Virutal Private Server). The output html can be served by any web server. </p>
Packet monitoring with pcap and dpkt (Python)
2011-09-13T06:56:36-07:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/576678-packet-monitoring-with-pcap-and-dpkt/
<p style="color: grey">
Python
recipe 576678
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/sniff/">sniff</a>).
Revision 3.
</p>
<p>This recipe shows how to use pypcap and dpkt to monitor network traffic and grep with regular expression. Python 2.3 up required
pypcap: <a href="http://code.google.com/p/pypcap/" rel="nofollow">http://code.google.com/p/pypcap/</a>
dpkt: <a href="http://code.google.com/p/dpkt/" rel="nofollow">http://code.google.com/p/dpkt/</a> </p>
Automate performance monitoring via telnet and ftp in a production environment (Python)
2006-10-24T23:07:29-07:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/498210-automate-performance-monitoring-via-telnet-and-ftp/
<p style="color: grey">
Python
recipe 498210
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/network/">network</a>).
Revision 2.
</p>
<p>This code snippet shows how to kich off a performance data gathering shell script with telnetlib and download the data back to a local workstation with ftplib.</p>
Decimal to Roman numerals (Python)
2005-05-27T08:11:02-07:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/415384-decimal-to-roman-numerals/
<p style="color: grey">
Python
recipe 415384
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
</p>
<p>Convert decimals to Roman numerials.
I use a recursive algorithm here since it reflects the thinking clearly in code.
A non-recursive algothrithm can be done as well.</p>
Use Jython to time Java code (Python)
2005-02-07T04:57:15-08:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/363219-use-jython-to-time-java-code/
<p style="color: grey">
Python
recipe 363219
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/jython/">jython</a>).
Revision 3.
</p>
<p>Use Jython to time java code. An inexpensive solution to measure Java code's performance. In the following example, jtimeit.py is created to measure Main.doHttpGet()'s performance. Used google and yahoo as examples.</p>
Foreign Exchange Rate Alert, CSV version ($CAD<->$USD) (Python)
2011-12-09T07:32:23-08:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/252546-foreign-exchange-rate-alert-csv-version-cad-usd/
<p style="color: grey">
Python
recipe 252546
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/forex/">forex</a>, <a href="/recipes/tags/web/">web</a>).
Revision 11.
</p>
<ul>
<li>The following code snippet can be used as daily crontab or windows scheduled task to watch the foreign exchange rate from BankOfCanada web site. </li>
<li><p>The file format is not fancy XML but a simple CSV for noon rate for last 5 days. </p></li>
<li><p>urllib2.urlopen is used as it can auto detect the proxy if it is used. </p></li>
<li>The default url connnect timeout is 60 seconds here.</li>
</ul>
Reverse Lookup Yellow Page (Python)
2002-08-15T16:07:17-07:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/145126-reverse-lookup-yellow-page/
<p style="color: grey">
Python
recipe 145126
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/web/">web</a>).
</p>
<p>look up personal/home address from a phone number (US & Canada)
usage: ryp.py -s <a href="http://sendmail.your.com" rel="nofollow">sendmail.your.com</a> -e <a href="mailto:dude@your.com">dude@your.com</a> -p 416-345-3432
it has built in email & phone # validation.
The phone number can take most common format.</p>
Oracle SQL describe (based on DCOracle2) (Python)
2002-08-14T13:10:43-07:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/144837-oracle-sql-describe-based-on-dcoracle2/
<p style="color: grey">
Python
recipe 144837
by <a href="/recipes/users/627255/">Victor Yang</a>
(<a href="/recipes/tags/database/">database</a>).
</p>
<p>"desc.py scott/tiger order " will list the column info for table "order".
"desc.py scott/tiger@production order " will list the column info for table "order" of tns name "production".</p>