Decorator
Webpage Decorator is a small extension that allows you to customize the webpage's properties as you will. You can change the background color, attach an image as background, increase or decrease the font size and so on.
Platforms: Windows
License: Freeware | Size: 41 KB | Download (76): Webpage Decorator Download |
This script defines a decorator that allows for an abbreviated slice syntax in function arguments: {start:end}. Step is notsupported. Valid quickslices are dictionaries with a single integer key which has an integer value. Arguments can be strings or integers, and indicate the positional or...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Quickslice decorator Download |
This one-line decorator call adds caching to functions with hashable arguments and no keyword arguments.When the maximum size is reached, the least recently used entry is discarded -- appropriate for long-running processes which cannot allow caches to grow without bound. Includes built-in...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): LRU cache decorator Download |
Decorator for main method script shows how to do the same thing with a decorator that makes the code much cleaner.This allows option and argument parsing to be hidden from the main code in your program. The user simply passes an optional getopt string and the number of required arguments. Then...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (55): Decorator for main method Download |
This is a decorator that lets you annotate function definitions with argument type requirements. These type requirements are automatically checked by the system at function invocation time. The decorator frees you from writing type-checking boilerplate code by hand.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Type-checking decorator Download |
This simple decorator is different to other memoize decorators in that it will only cache results for a period of time. It also provides a simple method of cleaning the cache of old entries via the .collect method. This will help prevent excessive or needless memory consumption.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): Memoize Decorator with Timeout Download |
This script is a caching decorator that collects garbage in a separate thread (for performance).It allows each cached function to (optionally) set a custom maximum age for entries, and allows individual cache entries to be selectiries, andlidated.This kind of caching decorator is often useful...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Caching decorator with timeout invalidation Download |
Eclipse plugin: configurable decorator for icons and labels. Can be adjusted to decorate icons and text depending on (regexp) substring matching on certain nodes in tree views (Package Explorer, Navigator,...). Works with Eclipse 2.1 or later.
Platforms: Windows, Mac, Linux
License: Freeware | Size: 134.87 KB | Download (54): Universal Label Decorator Eclipse Plugin Download |
This tail recursion decorator can eliminate the tail calls for recursive functions.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): New Tail Recursion Decorator Download |
Defining a property involves the definition of nested functions for one or more of fget,fset,fdel. The decorator probes the decorated function, captures its locals() just before it returns and looks for the names "fget", "fset" and "fdel". The found values, along with the function's docstring are...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): Property decorator for python Download |
A set of utilities for the use of decorators in a Java web application. The goal of this project is to offer an easy way to 'decorate' data for presentation purposes. This is partially done by using concepts introduced by the Decorator Design Pattern.
Platforms: Windows, Mac, Linux
License: Freeware | Size: 652.17 KB | Download (51): Decorator Utilities Download |
protect_utf8 is a function decorator that can prevent naive functions from breaking UTF-8. If the wrapped function takes a string, and that string happens to be valid UTF-8, converts it to a unicode object and call the wrapped function. If a conversion was done and if a unicode object was...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (57): ProtectUTF8 Download |
Python symbols is a toy module that shows a way to define symbols inside functions, using a decorator.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Python symbols Download |
This decorator can be used to cast argument types automatically, using a pre-specified list of types, when a function is called.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Automatic argument type conversion Download |
This script explains how to check that a given function does not run slower than a given pystone rate. It first calculates the pystone ratio on your box. This decoraone ratiot to use in production code, and would rather fit in functional or unit tests. This make performance tests portable to any...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (57): Pystone measurement decorator Download |
This function decorates a function with tail call optimization. It does this by throwing an exception if it is it's own grandparent, and catching such exceptions to fake the tail call optimization. This function fails if the decorated function recurses in a non-tail contexif the de />
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (56): Tail Call Optimization Decorator Download |
This script tries to be a safer and faster memoize decorator, it works with mutable types and with keyword args too. The code comes from many different versions found around. This code isn't much tested yet, so it must be used with care.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (55): Another memoize Download |
A decorator to interact with argparse based on function signature. This is a decorator library that helps one to write small scripts in Python. There are three main features that it provides: * Automatically running a function when a script is called directly, but not when it is included as...
Platforms: *nix
License: Freeware | Size: 10.24 KB | Download (41): entrypoint Download |
Easy option parsing introspected from function signature opterator is a decorator for a script's main entry point that uses a function function signature and docstring to pseudo-automatically create an option parser. When invoked, the option parser automatically maps command-line arguments to...
Platforms: *nix
License: Freeware | Size: 10.24 KB | Download (35): opterator Download |
A Python-to-Vim bridge decorator that allows transparent calls to Python functions in native Vim scripts. * Read more vim_bridge is a Python-to-Vim bridge decorator that allows transparent calls to Python functions in native Vim scripts. The following data types have proven to work: * Strings...
Platforms: *nix
License: Freeware | Size: 10.24 KB | Download (40): vim_bridge Download |