{ "info": { "author": "Eric Astor", "author_email": "eric.astor@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "=============\nRandomSources\n=============\n\nRandomSources is a Python module, providing multiple implementations of\nPython's random-number generator interface backed by remote random-number\nsources. It provides simple, drop-in style replacements for Random with data\nprovided by the ANU Quantum Random Numbers server (generated by measuring\nquantum fluctuations of the vacuum) and by random.org (generated by measuring\natmospheric noise). Typical usage looks like this::\n\n >>> import randomSources\n \n >>> qRandom = randomSources.QuantumRandom()\n >>> print qRandom.random()\n 0.799872387678\n >>> print qRandom.randint(1, 20)\n 4\n \n >>> randomDotOrg = randomSources.RandomDotOrg()\n >>> randomDotOrg.checkBitQuota()\n 990178\n >>> print randomDotOrg.random()\n 0.951470705142\n >>> print randomDotOrg.random(4)\n [0.5996488097316547, 0.40146785806967766, 0.9956706001515375, 0.345638811037305]\n >>> randomDotOrg.checkBitQuota()\n 989910\n >>> print randomDotOrg.randint(1, 20)\n 1\n >>> print randomDotOrg.randint(1, 20, 12)\n [6, 10, 13, 20, 3, 14, 5, 3, 10, 18, 20, 14]\n >>> randomDotOrg.checkBitQuota()\n 989780\n\nNote that random.org provides a bit quota limited per IP per 24 hours; many\nfunctions therefore provide an optional final parameter 'n' to simulate\nmultiple calls, allowing the system to merge some smaller requests in order to\nminimize bit waste. Towards the same goal, the RandomDotOrg class prefers to\nsubdivide fetches, sending multiple smaller requests when it can prevent waste.\n\nOn the other hand, the ANU Quantum Random Numbers server has no bit limit;\ntherefore, the QuantumRandom class fetches 16 KB at a time to serve small\nrequests, minimizing requests to the server. Larger requests are fetched\ndynamically.\n\nAs of version 0.1, these objects are *not* thread-safe.\n\nCredits\n=======\n\nMuch of the code of this module is derived directly from the Python 2.7 source\nfor the Random class and its subclasses, rendering this a derivative work.\nThanks to the Python Software Foundation and its BDFL, Guido van Rossum.\n\nIn addition, significant inspiration (and some direct code) was taken from the\nquantumrandom (http://github.com/lmacken/quantumrandom) and randomdotorg\n(http://code.google.com/p/randomdotorg/) modules, especially as basic reference\nfor the APIs of their respective random-number sources. Thanks and attribution\nare therefore due to Luke Macken (author of quantumrandom) and Clovis Fabricio\n(author of randomdotorg).\n\nLicense\n=======\n\nThis module is licensed under the GNU GPL version 3, as a derivative work of\nthe randomdotorg module. This is confirmed compatible with both the Python\nSoftware Foundation License, covering Python 2.7, and the MIT License, covering\nthe quantumrandom module.\n\nIf permission is granted by Clovis Fabricio, this module will be relicensed\nunder the Python Software Foundation License, or, if that is not acceptable,\nunder the GNU LGPL version 3.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ericastor/RandomSources/", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "RandomSources", "package_url": "https://pypi.org/project/RandomSources/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/RandomSources/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ericastor/RandomSources/" }, "release_url": "https://pypi.org/project/RandomSources/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Drop-in replacements for Random, providing remote random-number sources.", "version": "0.1.3" }, "last_serial": 746253, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9bb8b806050df2cd704bd8e05b860a61", "sha256": "e745b9b71ccc2d3a0d0f2182a17aa5a98a865042a773c12998f193b6e508c83f" }, "downloads": -1, "filename": "RandomSources-0.1.0.zip", "has_sig": false, "md5_digest": "9bb8b806050df2cd704bd8e05b860a61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21003, "upload_time": "2012-07-13T02:25:37", "url": "https://files.pythonhosted.org/packages/6a/64/49754ec213cb90f7bf37d55610b471e99dfb298ef92e454679eafd9b64c5/RandomSources-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6b0ca33b01925879073c35af50476cfe", "sha256": "b6a2eb2e22fa77ee865a98be747c29af507900f29eb7179376bb1c4ee1a34663" }, "downloads": -1, "filename": "RandomSources-0.1.1.zip", "has_sig": false, "md5_digest": "6b0ca33b01925879073c35af50476cfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19594, "upload_time": "2012-07-13T02:37:56", "url": "https://files.pythonhosted.org/packages/18/61/23e4fc69dd9a903d7f8f8ecd61da0846b626681bfaf3343a7974cd44e943/RandomSources-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "1387b6368ec2a94a3bc47572668e8d90", "sha256": "646376bde2b85fe2b164bab37a611318d7495774f31fb402d717262c5755b9d8" }, "downloads": -1, "filename": "RandomSources-0.1.2.zip", "has_sig": false, "md5_digest": "1387b6368ec2a94a3bc47572668e8d90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21074, "upload_time": "2012-07-19T00:44:35", "url": "https://files.pythonhosted.org/packages/f4/c3/276c96d713da3e9bfc5683e555a57200e564ca8da90b2ba81589c8fce330/RandomSources-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "830d55b0ed0e8de4a25a8758bf3c9857", "sha256": "14c3b04042de2ca3b536707993bddf8471ab73bf32f608a26d6e092bd9bb3782" }, "downloads": -1, "filename": "RandomSources-0.1.3.zip", "has_sig": false, "md5_digest": "830d55b0ed0e8de4a25a8758bf3c9857", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21100, "upload_time": "2012-07-19T02:36:47", "url": "https://files.pythonhosted.org/packages/f4/42/62be1909b97bfa8ff3614435bdf0b4e5fbb87a4d462596b5c5c2dcd08933/RandomSources-0.1.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "830d55b0ed0e8de4a25a8758bf3c9857", "sha256": "14c3b04042de2ca3b536707993bddf8471ab73bf32f608a26d6e092bd9bb3782" }, "downloads": -1, "filename": "RandomSources-0.1.3.zip", "has_sig": false, "md5_digest": "830d55b0ed0e8de4a25a8758bf3c9857", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21100, "upload_time": "2012-07-19T02:36:47", "url": "https://files.pythonhosted.org/packages/f4/42/62be1909b97bfa8ff3614435bdf0b4e5fbb87a4d462596b5c5c2dcd08933/RandomSources-0.1.3.zip" } ] }