{ "info": { "author": "Tal Einat", "author_email": "taleinat@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development" ], "description": "============\nRunningCalcs\n============\n--------------------------------------------\nA library for executing running calculations\n--------------------------------------------\n\nIntroduction\n============\n\nInstances of the ``RunnincCalc`` classes in this library can be fed one input value at a time. This allows running several calculations in a single pass over an iterator. This isn't possible with the built-in variants of most calculations, such as ``max()`` and ``heapq.nlargest()``.\n\n``RunningCalc`` instances can be fed values directly, for example::\n\n mean_rc, stddev_rc = RunningMean(), RunningStdDev()\n for x in values:\n mean_rc.feed(x)\n stddev_rc.feed(x)\n mean, stddev = mean_rc.value, stddev_rc.value\n\nAdditionally, the ``apply_in_parallel()`` function is supplied, which makes performing several calculations in parallel easy (and fast!). For example::\n\n mean, stddev = apply_in_parallel([RunningMean(), RunningStdDev()], values)\n five_smallest, five_largest = apply_in_parallel([RunningNSmallest(5), RunningNLargest(5)], values)\n\nOptimizations\n=============\nIn addition to the basic ``feed()`` method, some ``RunningCalc`` classes also implement an optimized ``feedMultiple()`` method, which accepts a sequence of values to be processed. This allows values to be processed in chunks, allowing for faster processing in many cases.\n\nThe ``apply_in_parallel()`` function automatically splits the given iterable of input values into chunks (chunk size can be controlled via the ``chunk_size`` keyword argument). Therefore using ``apply_in_parallel()`` is both fast and easy.\n\nWriting Your Own RunningCalc Class\n==================================\n1. sub-class ``RunningCalc``\n2. implement the ``__init__()`` and ``feed()`` methods\n3. make the calculation output value accessible via the ``value`` attribute\n4. optionally implement an optimized ``feedMultiple()`` method\n Note: the ``RunningCalc`` base class includes a default naive implementation of ``feedMultiple()``", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/taleinat/runningcalcs/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "RunningCalcs", "package_url": "https://pypi.org/project/RunningCalcs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/RunningCalcs/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/taleinat/runningcalcs/" }, "release_url": "https://pypi.org/project/RunningCalcs/0.4/", "requires_dist": null, "requires_python": null, "summary": "A library for executing running calculations", "version": "0.4" }, "last_serial": 785555, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d68ce7d3d72385b1aae5f4f420f9e7ca", "sha256": "3418886ec1ca7b46185b9b5cc2b786a3fde993d3d9c685d0a3ddf3450127347b" }, "downloads": -1, "filename": "RunningCalcs-0.1.zip", "has_sig": false, "md5_digest": "d68ce7d3d72385b1aae5f4f420f9e7ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6379, "upload_time": "2011-09-13T23:37:24", "url": "https://files.pythonhosted.org/packages/dc/38/9de65da49e74d21a2ad6242dbb0b9d9ec5961f783e315d7577bde67ce233/RunningCalcs-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "6e9dbe17d26f5c732dc488335a606c63", "sha256": "f5d0e8c5add811d242641a330ff2dc697c8d92bc561982dbe4c5452952ca0b7d" }, "downloads": -1, "filename": "RunningCalcs-0.2.zip", "has_sig": false, "md5_digest": "6e9dbe17d26f5c732dc488335a606c63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6486, "upload_time": "2011-09-25T22:52:55", "url": "https://files.pythonhosted.org/packages/ad/26/a6a9372785f902d66e3bccf715709dfef09a42d751388461f833626b07b7/RunningCalcs-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "cd57b179c0cb385f8b2863fc7c87c7a5", "sha256": "0785acfad65a532b2fb8208052fff50d1cddd862d0d61c088ef8fe9fe40ec90f" }, "downloads": -1, "filename": "RunningCalcs-0.3.zip", "has_sig": false, "md5_digest": "cd57b179c0cb385f8b2863fc7c87c7a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6497, "upload_time": "2011-09-26T14:57:22", "url": "https://files.pythonhosted.org/packages/67/54/be492b75ca6a3ee5d445bae0d63b4b3ead780cae082be2c3c2e2fca8927b/RunningCalcs-0.3.zip" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "0b865454d8d7dc43bc99c82fe31beea4", "sha256": "f763b0900de2922c0b31dfcead5e132050895285f709ccf6eee84dcaa56def2b" }, "downloads": -1, "filename": "RunningCalcs-0.4.zip", "has_sig": false, "md5_digest": "0b865454d8d7dc43bc99c82fe31beea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6622, "upload_time": "2013-02-17T13:29:18", "url": "https://files.pythonhosted.org/packages/b1/d7/eba1b3f001b59083d295219494af9514849ded5dbf19421ac777cac87087/RunningCalcs-0.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b865454d8d7dc43bc99c82fe31beea4", "sha256": "f763b0900de2922c0b31dfcead5e132050895285f709ccf6eee84dcaa56def2b" }, "downloads": -1, "filename": "RunningCalcs-0.4.zip", "has_sig": false, "md5_digest": "0b865454d8d7dc43bc99c82fe31beea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6622, "upload_time": "2013-02-17T13:29:18", "url": "https://files.pythonhosted.org/packages/b1/d7/eba1b3f001b59083d295219494af9514849ded5dbf19421ac777cac87087/RunningCalcs-0.4.zip" } ] }