public marks

PUBLIC MARKS with tags python & recipe

November 2005

ASPN : Python Cookbook : Simple HTTP server supporting SSL secure communications

by roberto & 1 other
This recipe describes how to set up a simple HTTP server supporting SSL secure communications. It extends the SimpleHTTPServer standard module to support the SSL protocol. With this recipe, only the server is authenticated while the client remains unauthenticated (i.e. the server will not request a client certificate from the browser). So, the client (typically the browser) will be able to verify the server identity and secure its communications with the server.

October 2005

ASPN : Python Cookbook : Simple web request benchmark

by roberto
This recipe measures the amount of time to perform each portion of a request to a single file many times, and prints the results in a somewhat reasonable fashion.

ASPN : Python Cookbook : Generator Based Concurrency, with Real Threads when Needed.

by roberto
This recipe uses NanoThreads. http://lgt.berlios.de/ It shows how simulated concurrency, (using generators as tasks), can be transparently combined with OS Level Python threads, as and when needed.

ASPN : Python Cookbook : List comprehensions for database requests

by roberto
The usual way to make a request to a database is to write a string with the SQL syntax, then execute this request and get the result as a list with cursor.fetchall() or cursor.fetchone() Python has list comprehensions to select items in an iterable if a certain condition is true ; this is very similar to database requests This recipe wraps a table of a DB-API compliant database in a class that implements the iteration protocol, so that you can use the for ... in ... if ... syntax

October 2004

Cache decorator in python 2.4

by roberto
Recipe for memoized functions defined by decorators.

PUBLIC TAGS related to tag python

c# +   c++ +   for:pedro.custodio +   for:rliberato +   for:zenuno +   java +   pattern +   programming +   rubyonrails +   singleton +  

Active users

roberto
last mark : 01/11/2005 14:51