GALua is a Lua module that lets you easily perform GA calculations from within a Lua script.