-
Notifications
You must be signed in to change notification settings - Fork 679
Python_index_0
Keyword Argument Injection with Python Decorators
Ten's Multiplication Algorithms in Python
"bothmethods": decorator that combines staticmethod and classmethod
"Comma float" to float
"conditionals" in expressions
"Effcient" Prime Number Generator in Python
"enumerate" before Python 2.3
"execfile()" IS BACK! Backwards Compatibility part 5...
"More Sex is Safer Sex" Paradox
"once" decorator
"Oneliner" for reverse/sort/extend strings/tuple/lists NOT in place
"only on change" decorator
"page x of y" with reportlab
"public" decorator, adds an item to all
"raw_input" For All Versions Of Python...
"Real" class methods in Python
"Safe" Eval
"safely" defining setattr
"Smart" Links
"Static-methods" (aka "class-methods") in Python
"tail -f" with inode monitor
"To sort a dictionary"
# Welcome to the simple recipe calculat
'Which' for Windows
'with' statement for StringIO
'Zip walker' - Zip file tree generator
(Ab)Using Modules as Namespaces
(gopytranslte) script google translator
(S)earch (A)nd (D)estroy
(Yet another) Assignment in expression Recipe
Very simple accountant's calculator
with statement example, an entry in a table
with statement example, to do select, update and insert with with statement in python
10 lines for a beginner to try out the Spyder IDE for python programming
2 very basic text games.
2-3 Tree
2D Discrete Fourier Transform
2D Fluid Simulation using FHP LGCA
2D polygon area
2D slice of 4D Mandelbrot Fractal and Map it in 3D
3 Point Area Finder
3D polygon area
3d Surface fitting to N random points
4D Mandelbrot Fractal
8 queens
8 Queens Problem
== Ruby Array#each_cons, each_slice (overlapping and non-overlapping windows onto iterable seq)
@deprecated
@replier using tweet-sauce
@statemethod
@unittest.skip_others decorator
[python3-tk/ttk] Onager Scratchpad
[Twisted] From blocking functions to deferred functions
[xtopdf] Publish Delimiter-Separated Values (DSV data) to PDF
getattr: handle with care
_winreg Wrapper
A basic time profiler
A basic undo mechanism
A Basic USe flag EDitor for Gentoo Linux supporting on-the-fly editing
A basic WSGI PDF server
a better assertRaises() for unittest.py
a better better command line calculator
A binary file split utility in Python
A Buttonbar program with color
A class decorator for creating named tuples
A Class Decorator that Adds a copy() Method
A class which keeps a (weak) reference to it's instances.
A command-line musical alarm clock
A Complete Morse Code Generator in Python with Sound
A Crude Baby Alarm For Standard Text Mode Python And Linux.
A Date module.
A DEMO Frequency Counter With A Difference - Text Mode Python.
A DEMO To Show How To Expand A Standard Python Terminal On The Fly...
A DEMO to show how to write text into the Python terminal Title Bar...
A dict proxy metaclass.
A dictionary with multiple values for each key.
A Dictionary-based two-dimensional ragged array.
A fast & memory-wise prime number generator up to N
A fast prime number list generator
A File-Like Object to True File Object Adapter
A flexible state machine class
A foldable panel with a Windows XP look and feel (wxPython)
a friendly mkdir()
A fun litle tree class..
A function to 'unzip' simple list-like objects
A function to check if a number is a power of a prime
A function to check if a number is prime
A Function To Create A 1 Second Sinewave WAVE Beep File.
A general purpose file iterator class
A general purpose file iterator class
A general solution of Eight Queens
A generator for an arbitrary number of 'for' loops
A Generator That Helps Simplify Queue Consumers
A generator to help flatten nested loops
A generic factory factory.
A generic jython taglib for tomcat
A generic programming thread pool
A generic, multi protocol asynchronous server
A higher level struct module
A lazy, memoized attribute space.
A List of Dictionaries, for the Memory Scrooge.
A matrix generated by shifting the zeroth row
A memoize decorator for instance methods
A meta-class that provides class behavior like Ruby
A metaclass that hides details of the attribute name when called.
A Moderately Simple Buttonbar Program
A modification of the blogger exemple for adding category
A more clean implementation for Ordered Dictionary
A MSSQL XML importer for MySQL
A multithreaded, concurrent version of map()
A MutableMapping that Can Use Unhashable Objects as Keys
A native implementation of threading.Lock and threading.RLock using Pyrex
A new method for computing the hypergeometric function 1F1(a,b,t)
A nicer password container than str
A nicer syntax for super(cls,self)
A numarray set complement
A Phone Book GUI Built in wxPython Connected To Database Using Data Grid View
A point-in-polygon program (S.W. Sloan algorithm)
A powerful yet simple switch-like dispatch system for Python
A Profiling Tool
A Protocol for Making Objects Immutable
A pseudo-echo, (or printf), function for any Python version.
A Python chat program using process intercommunication
A Python Code
a Python daemon
A Python decorator that re-executes the function on condition
A python replacement for java.util.Properties
A Python script to test download mirrors
A Python-based descriptive statistical analysis tool.
A pythonic implementation of xrange
A Pythonic ratio that equals pi
A queue for string data, which looks like a File object.
A quick and dirty Client and Server Socket class
A real lockfile implementation
A recursive function to get permutation of a list
A SAX filter for normalizing text events
A script evaluating PSNR metric of two YUV420 frames
A Script that Adds a Directory to sys.path Permanently
A script to generate and print perfect numbers
A self-cleaning dict-like container which limits the number and lifetime of its items
A server that waits through dropped connections
A set class for mutable objects with unique and hashable 'id' attributes
a Set class for python
A simple and useful doctester for your documentation
A simple calculator that works with whole numbers written in C/Python.
A Simple Class for Transforming Python Source Files
A Simple Clock, Well Maybe Not That Simple...
A simple date class ...
A simple enum type
A simple equation solver using attribute access and introspection
A simple extension type for Python
A simple function benchmarking module
a simple genetic algorithm
A Simple HTTP Web Server
A simple KD Tree example with custom Euclidean distance ball query.
A simple login with dictionary
A simple Matrix class
A Simple Namespace Class
A simple non-recursive directory walker
A simple Object Relational Mapper
a simple pycrypto-Blowfish encryption script
A simple raw hexdumper.
A simple text file pager in Python
A simple time-out class.
A Simple Timing Function
A simple Tkinter notebook-like widget
a simple way to create and change your registry on windows
A Simple Webcrawler
A simple XML-RPC server
A Simple ZODB viewer in wxPython
A Simpler Namespace Class
A Sinus Plasma, using Pygame
A small python script to detect .net framwork versions installed on your local windows machine
A speed limited, or governed range
A stoppable XMLRPCServer
A ThreadedProxy wrapper
A threading.Event you can pickle
A ThunkSpace for Python
A tidy property idiom
a time determinant logarithmic progression, with a movable target and energy factor.
A time value of money class demonstrating properties
A Tree Finder
A UNIX-like "which" command for Python
A utility like Unix seq (command-line), in Python
A very simple session handling example
A way to deal with checking for types
A wxPython GUI To Create Sqlite3 Databases
A-star Shortest Path Algorithm
a64l
Abstract method decorator
Abstract methods/classes
AbstractFactory
accent2htmlcode.py - convert accents and special characters to html code
Accented Characters for Tkinter Widgets
Accepting Four Points in 2-space
Access Cairo surface from numpy and pygame
Access grep from python
Access mplayer (slave mode) from python
Access password-protected web applications for scraping.
Access PDF annotations
Accessing current function
Accessing cursors by field name
Accessing DCOP services
accessing MS exchange with webdav part 1
Accessing Substrings
Accessor function for private variables in Py3.x
Accordion Widget (Tkinter)
Accurate "Look before you leap" for safer (but still full) polymorphism
Accurately find duplicate files
Active Objects
ActiveState recipe importer
ActiveState recipe statistics
actorish decorator for making async code look more like sync one and a less blocking
Adaptive Replacement Cache in python
Add a method to a class instance at runtime
Add account to group in Active Directory
Add an entry to a dictionary, unless the entry is already there
Add function to Python's builtin module through C API - Python source
Add key= argument to min(), max(), heapq.nsmallest() and nlargest()
add password masking ability to getpass.getpass()
Add support for the "in" operator to the attributes map of minidom elements
Add thousands separator commas to formatted numbers
Adding implements to subclasses during ABCMeta.register
Adding Active Directory users to a ctive directory group, importing the users from a txt file,
Adding SQLite sign() function
Adding the directory of the python executable to the system PATH under windows
adduser/login/passwd/userdel (not posix) password db access
admin django
ADMIN PLEASE REMOVE THIS RECIPE
ADMIN PLEASE REMOVE THIS RECIPE
ADO primary key and table creation
adventure game base
aebovl - Automatic Exposure Bracket Image Overlay
Aens Time
Aens Time Clock
affinity.py
Aggregates using groupby, defaultdict and Counter
Alarm Clock
alarm.py
Alias class attributes
Align text filter
Align text string using spaces between words to fit specified width
align XML ElementTrees with original text
All [iter] is Instance of [class/type/tuple]
All in one Area Calculator
All k-subsets from an n-set.
Allowing the Python profiler to profile C modules
Alphametics solver
Altering immutable string object.
Alternative to del through finalize and finalattrs
Alternative to del using weakrefs and metaclasses
Alternatve generation of the parity or sign of a permutation
Amaze - An object-oriented maze generator/solver in Python
Amazing estimation of Pi using the Mandlebrot set
Amazon SNS handler for the logging module
Amplitude Modulation - Tremolo, Was:- An Audio/Sound Snippet For Linux... ;o)
An ActiveRecord like ORM (object relation mapper) under 200 lines
An alternative way to draw parallels and meridians with basemap
An analogue of enumerate for nested lists.
An asynchronous HTTP server with CGI support
An easy password generator using standard Python modules
An easy to use Configuration reader
An editable buffer for the Python shell (similar to '\e' on sql prompts)
An EM87/6HU6 Magic Eye Valve/Tube Animation DEMO...
An Entry with autocompletion for the Tkinter GUI
An Erlang Port in Python
An extensible Conway's Game of Life
An extension to Do.py Win32 Command submitter
An interval mapping data structure
An interval mapping data structure
An Introduction to Deferred Default Arguments
An IPv4 class
An object-oriented enum (Java-like)
An unofficial interface of Yahoo's Chinese segmentation.
Anagram Fetcher
Anagrams, vowels, and consonants.
analog clock
Analog clock
Analog Clock
Analog stopclock
And Now For Something COMPLETELY Different Using Text Mode Python...
And yet another round-robin generator
Android Gmail: export messages from SQLite database blobs
Animated raster graphics demo in Tkinter
Anonymous functions without lambda
Another "conditionals in expressions"
Another approach to the "automatic super" issue
another curry...
Another Extremely Unusual Text Mode Python Upload...
Another generator for an arbitrary number of 'for' loops
Another memoize
Another Odict
Another relative filepath script
Another Singleton Implentation
Another use for lambdas and function references
another way to read lines backwards
Apache Client Cache-rate Calculator
Apollonian Gasket Fractal using IFS
Apparent Infection Rate Calculation
Appending Encrypted Username and Passwords to a File
Application lock
Apply decorators to all functions in a module
Approximately Equal
Arbitrary order attribute writing with ElementTree
Arbitrary precision binary floating point arithmetic
Archimedes method for calculating PI
Archimedes Method for PI (arbitrary precision)
Archiving time series
Arduino Diecimila Board Access Inside Linux DEMO.
Arduino Diecimila Board Access Inside Windows 32 Bit DEMO.
Arduino Diecimila Board Access Inside WinUAE DEMO.
Area of Polygon using Shoelace formula
Area Under the Curve using Monte Carlo method
ARFF to SQL Database importer
argdeclare: declarative interface to argparse
argmin
arithmetic coder
Arithmetics class for measurement values of known percentual error
Artificial Neuroglial Network (ANGN)
Artificial Windows
ascii anamation module
ascii anamation using ascii anamation module
ASCII encoding guess
Ascii Encryptor
ascii2wide Translate printable non-whitespace ascii characters to wide characters
ASIO
ASIO Proxy
Ask a question with Yahoo! Answers and YQL
Assertion that a code fragment throws a particular exception (self-test utility, Python 3)
Assertion that all base class initializers get called (metaclass solution)
Assign and test
Assignment in expression
asskick.py
Associating multiple values with each key in a dictionary.
Assuring that an entry is a valid number
AST Pretty Printer
AST Pretty Printer
Async subprocess check_output replacement for Twisted
AsyncGetter
Asynchronous HTTP server
Asynchronous pipe communication using asyncore
Asynchronous port forwarding
Asynchronous subprocess using asyncore
asyncore scheduler
Asyncore/asynchat in GTK
Atomically execute a block of Python statements
Attempt to estimate a size of Python object
AttrDict
attrdict - a dict whose items can also be accessed as member variables
Attribute - easy way to define interface
Attribute - easy way to define interface
attribute proxy - forwarding attribute access
Attribute-based Framework 1: Basics
Attribute-based Framework 2: Notifications
Attributes as local variables inside a with clause
Attributes WithProtection without pain
attrview(): dict-style access to attributes
AUDPC Calculation
Authenticate users through a third party POP-server
Authenticate with twisted.web.xmlrpc
Authenticated encryption with PyCrypto
Authenticating Twisted with Zope/Plone
Auto assign self attributes in init using PEP 484
Auto differentiation
Auto Generate Simple SQL statements
Auto Generation of SQL Insert Statement Columns and Values from Object
Auto Incrementer an Example of call and yield
Auto Named Decriptors
Auto-detect XML encoding
Auto-Initialisation with default attribute values
Autogenerate API docs in Markdown
AutoLoader
Automagically dispatch commands using regex token classes
Automate CATIA V5 with Python and Pywin32
Automate creation of new Subversion project
Automate performance monitoring via telnet and ftp in a production environment
Automated management of CLI devices
Automated Stock Market Trading Simulation
Automated swigging for creating simple C shared modules.
Automatic argument type conversion.
Automatic attribute assignment
Automatic Delegation
Automatic delegation as an alternative to inheritance
Automatic delegation through descriptors
Automatic explicit file close
Automatic fields pickling
Automatic indentation of output based on frame stack
Automatic Recursion
Automatic ref-count management in C++ using a smart ptr
Automatic resized Text widget (Tkinter)
Automatic unittesting - pretest.py
Automatically generate slots attribute for classes and assign attributes on instances
Automatically initializing instance variables from init parameters
Automatically set all passed parameters to self
Automatically start the debugger on an exception
automatically upgrade class instances on reload()
AutomaticClass
Automating simple property creation
Automation of unix shell or DOS shell programs
AutoRename.py
autosetup for simplified default values
Autoslots
autosuper to the limit
autovivication dictonaries
autovivication dictonaries
Available disk space monitoring for concurrent writes
Averaging Literal Numbers
avoid running multiple copies of pine
Avoiding having to type long attribute names in interactive use
Avoiding lambda in writing callback functions
AWK like text processing
awk-like module
Axis POJO stripper.
babelizer - API for simple access to babelfish.altavista.com.
BackgroundCall: Threading like function calling
Backpropagation-ANGN source code
backtrace2line - stack traces with source file name and line numbers
Backtracking template method
backup a file to up to number of versions
Backup all your config files in once
Backup your files
Backup/download your tweets or anyone's tweets.
Backwards Compatibility part 3...
Backwards Compatibility part 4...
Backwards compatibility...
Bacwards compatibility part 2...
Bader-Offer Method (Hagenbach-Bischoff)
Bag class
bag collection class
Balance / Refunds of dues between friends
Banner
Barcodes - Convert UPC-E to UPC-A
Bare Bones Password Generator
Barebones VC++ code: invoking Python COM factory and factory-made COM object
Base Conversion decimal to base = len(map)
Base Expansion/Conversion Algorithm Python
base255 (V1)
Base64 encode-decode Five Liner
base64 encoding - oneliner
base64 encoding prototype
BaseDict -- a dict that (1) accesses data thru attributing (2) copy correctly
BaseDocTemplate with 2 PageTemplate
BaseHTTPServer with socket timeout
Bash completed man and info pages generation
BashReader.py
Basic class code generator
Basic Exception handling idiom using decorators
Basic FTP with Python
Basic Gtk.TreeView Example with two sortable columns
Basic interface to Apache Solr
Basic Linear Algebra Matrix
Basic Multiplication in Python
Basic synchronization decorator
Basic threaded Python TCP server
Basics of heapq w/python 2.4 additions
Batch conversion of text files to PDF with fileinput and xtopdf
Batch download all the pinned pictures in your Pinterest board to a local folder
Batting-ball
Bazaar as a setuptools file finder
beep based alarm - command line utility
Behavior like a list object is carried out to an instance.
Bell permutations using Even's nonrecursive algorithm
Benchmark code with the with statement
Benchmark code with the with statement
Benford's Law demo
Better quote module for bash shells
Bezier Curve using De Casteljau algorithm
BFS (breadth first search) graph traversal
BI_RLE Decoder
Bible Verse Quiz - compare.py
Bible Verse Quiz - database.py
Bible Verse Quiz - diff.py
Bible Verse Quiz - html.py
Bible Verse Quiz - library.py
Bible Verse Quiz - manager.py
Bible Verse Quiz - servlet.py
Bible Verse Quiz - state.py
Bible Verse Quiz - timeout.py
Bible Verse Quiz - verse.py
Bible Verse Quiz - VerseMatch.py
bier-soup.py, a small example of BeautifulSoup
Bifurcation diagram of logistic map
big file sorting
BigDirs - Where's my disk space gone?
Bilinear Interpolation
Binary BCD clock using curses
Binary floating point summation accurate to full precision
Binary Matrix Fractals using iteration method
Binary Matrix Fractals using recursion
Binary Matrix IFS Fractals
Binary ordered tree
Binary search
Binary search and insert in Python
Binary search function.
Binary search in one line.
Binary Search with the bisect Module
binary-converter1.0
Binary_Decimal Recursion
binascii.crc32 result to hex
bind all tkinter "bug"
Bind wxPython and XML-RPC server together
binding main skript and modules to one executable with python-2.3 under UNIX
Binomial Queues
Bisection Method in Python
bit field manipulation
bitfield rev2
Bitmap Maker
Bitset
BitSort
Bitsort algorithm
BK-tree
Black Jack
Blackjack
Blender
Bless Classes into Singletons
Blobby Planet
Blocking, Polling, Pipes, Queues in multiprocessing and how they are affected by the OS's time-slicing schedule
Blocks for python
Bloom Filter
Bloom Filter
Bloom Filter
BlueMon
BMI calculator
BMI calculator Metric
BMI Code
Boids 2.0 for Python 3.1
Boids Demonstration
Boids Version 1.1
bookmarks browser for firefox
Boolean operations beyond the limit
Boost.Bind in Python (a variation of Curry technique, partial function application)
Boring Constructor Pattern
Bouncing Ball Simulation
Bouncy Balls
Bound Inner Classes
Bound Inner Classes, Using An Alternate Approach
Bound Method Function Dispatch
Bound Method Weakref
Bounded Buffer Example (1)
Bounded Buffer Example (2)
Boyer-Moore-Horspool string searching
Breadth first file iterator
Breadth first traversal of tree
Breaking large XML documents into chunks to speed processing
Bresenham's line algorithm in n-dimensions
Broken Test decorator
Brownian Motion of Stock
Browser Automation tool - py class file
Browser history data structure
Brute Force Break Caesar Cipher in Python
Brute-force sudoku solver
bubblebabble
bubblebabble
Buffered Stream with Multiple Forward-Only Readers
Build a compressed self-extracting executable script on UNIX
Build a white list of email address from "Sent Items" mailbox.
Build extension modules inplace with a Makefile
Build section numbers for a table of contents
Build sqlite3 database like a locatedb
building a crontab to start jobs in hourly batches (administrators one-stop-shopping)
Building GTK GUIs interactively
Builtin i18n _() function in a multi-threaded environment.
Bunch class created from attributes in class
button-tip for Tkinter buttons
Byte Frequency Analyzer
Byte to Hex and Hex to Byte String Conversion
Bytes-to-human / human-to-bytes converter
Bzipped Tar Files