Function Grapher Ragnarok
This scripts shows you how to obtain the name of a method or a function from within the running method/function.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Obtaining the name of a function/method Download |
This function can extract a inner function from a class or a function. It may be useful when writing a unit test code.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Extract a inner function from a class Download |
This script defines a simple but useful class that emulates a function to gracefully permit latent assignment. In other words, you can use the emulating class as a valid function in assignments with the ability to later associate a function to perform the actual operations.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Function emulation using __call__ Download |
This script contains two classes that show two styles of function composition. The difference is only when the second function (g) returns a tuple. compose function passes the results of g as a tuple, mcompose treats it as a tuple of args to pass along. Note that extra args provided to...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Function composition Download |
This m-file finds and plots the autocorrelation and crosscorrelation function(ACF and CCF) of generated Gold codes of length 31.Crosscorrelations are three valued.
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (53): Autocorrelation and Crosscorrelation function of gold sequence 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 allows normal functions to be attached to a 'ThunkSpace' which causes the function to be lazily evaluated when the thunk is referenced. It is just an experiment using closures and descriptors to try and change python function call syntax.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): A ThunkSpace for Python Download |
This script contains a function, "rename_members", which takes an object, and two strings describing variable naming conventions (e.g. "allcamel", "underscores", etc). It translates attribute names on the given object from the first naming convention to the second (it doesn't delete the original...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Coding Standard Adaptor Download |
This script returns a tuple (cls,self,method), where: - cls is the class in wich you can find the definition of the method from which this function is called; - self is the instance passed as first argument to the method from which this function is called; - method is the unbound...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Autosuper to the limit Download |
This script contains a simple, easy to use wrapper function for doing quick tests of your functions using the timeit module.The timeit module provides an easy way of testing the performance of your Python code by running it in many iterations and averaging the timings. However it is not very...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Timeit module wrapper Download |
This script is a groupby function for arrays. Given a list of arrays and a `key` function, it will group each array based on the value of `key(args[0])`. The returned arrays will be two dimensional. The size of the first dimension is equal to the number of groups, and the size of the second...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Groupby for ndarrays Download |
PHP_FunctionCallTracer creates a function calls debug trace. Functions arguments, returned parameters and watched variables are reported in the same section. Traced variables can be processed by provided user functions for displaying purposes.
Platforms: BSD Solaris
License: Freeware | Download (53): PHP_FunctionCallTracer .0RC1 Download |
This simple function will use a system call to run Xfoil. It then loads the results into a data structure which you can then use in your Matlab script.For example to deflect the trailing edge of a NACA0009 by 5deg at 65% chord and run multiple incidence angles...[pol foil] =...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (53): Xfoil Interface Download |
For a symbolic input function f, returns the symbolic Hessian matrix. A real time saver imho I don't know how useful anyone will find this, but eh, my professor made us do it on the test, so I figure this will save at least someone the headache of having to find the Hessian by hand (provided they...
Platforms: Matlab
License: Freeware | Size: 51.2 KB | Download (53): Symbolic Hessian Evaluator Download |
this function calculates the price of Call option based on the GARCH option pricing formula of Heston and Nandi(2000). The input to the function are: current price of the underlying asset, strike price, unconditional variance of the underlying asset, time to maturity in days, and daily risk free...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (53): Heston Nandi Option price Download |
Sometimes inside a decorator that creates a function with a generic (*args, **kwargs) signature, you want to access a value passed for a particular parameter name to a wrapped function, but don't know whether that value will be passed as a positional or keyword argument, or whether the wrapped...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Finding the value passed to a function by name Download |
This function makes it easier to use the timeit module from the interactive interpreter. You should just specify function with (optional) arguments to run, optional number of runs, and optional name of module (which if not specified defaults to the name of the function).
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Convenience 'timeit' function Download |
Simple Math Parser is a small, effective parser specially designed for mathematical function that produces a tree to represent them. It is writen in Java and was mainly produced for use in the OpenPlotTool project, but is developed separately.
for WindowsAll
Platforms: Windows
License: Freeware | Download (52): Simple Math Parser 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 |
Flexible enumerate() script adds an additional start argument to the built-in enumerate function.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Flexible enumerate() Download |