{ "info": { "author": "Renuka Fernando", "author_email": "renukapiyumal@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "HackGen: Hackerrank Test-Case Generator\n=======================================\n\nGenerate test cases for your HackrRank challenge. You need your solution algorithm, input format and constraints only.\nGenerate the zipped file and upload :)\n\nInstallation\n------------\n\n::\n\n $ pip install hackgen\n\n\n\nExample usage\n-------------\n\n::\n\n >>> import random\n >>> from hackgen import TestInputFormat, TestGenerator, Language\n >>> class ClockDelayInputFormat(TestInputFormat):\n >>> \"\"\"\n >>> Input format of Clock Delay challenge.\n >>> https://www.hackerrank.com/contests/hourrank-28/challenges/clock-delay\n >>> \"\"\"\n >>>\n >>> # difficulty levels with test file number\n >>> # difficulty level is [0-9]\n >>> __diff = [(5, 10), (10, 30), (50, 100), (100, 300), (100, 300),\n >>> (300, 600), (600, 900), (800, 1000), (900, 1000), (950, 1000)]\n >>>\n >>> def inputs(self, difficult_level: int) -> None:\n >>> q = random.randint(*self.__diff[difficult_level]) # number of test cases\n >>> print(q)\n >>> for n in range(q):\n >>> # constraints for h1 m1 h2 m2 k\n >>> h1 = random.randint(0, 23)\n >>> m1 = random.randint(0, 60)\n >>> h2 = random.randint(h1, 24)\n >>> k = random.randint(h2 - h1 + 1 if h1 == h2 else h2 - h1, 24 - h1)\n >>> m2 = random.randint(0, (m1 if h1 + k == h2 else 60))\n >>> print(h1, m1, h2, m2)\n >>> print(k)\n >>>\n >>> # input format instance\n >>> input_format = ClockDelayInputFormat()\n >>>\n >>> # try with Language.java('Logic') also\n >>> test_generator = TestGenerator(10, input_format, Language.python('logic'), \"ClockDelay\")\n >>> test_generator.run()\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/renuka-fernando/hackgen", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hackgen", "package_url": "https://pypi.org/project/hackgen/", "platform": "", "project_url": "https://pypi.org/project/hackgen/", "project_urls": { "Homepage": "https://github.com/renuka-fernando/hackgen" }, "release_url": "https://pypi.org/project/hackgen/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "HackerRank Test-Case Generator", "version": "1.0.1" }, "last_serial": 4358746, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1e86e47e5902d746b0922165084b47fe", "sha256": "53a3c70ca3a74dc5b7a86b966f66b3ac632f1a6d7ef53e73305d89774d505a70" }, "downloads": -1, "filename": "hackgen-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1e86e47e5902d746b0922165084b47fe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1144, "upload_time": "2018-10-10T00:38:11", "url": "https://files.pythonhosted.org/packages/cf/0d/dbdaa9dcc2ebd67f448686932b63dd08e250846758ae408db998343ecf6a/hackgen-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55fbf5c8136065239b7d18a101000b26", "sha256": "7dc8abfebda23a5168ed17258ace9da8ab6786afb33c77b9227baac42bc9e5d8" }, "downloads": -1, "filename": "hackgen-0.0.1.tar.gz", "has_sig": false, "md5_digest": "55fbf5c8136065239b7d18a101000b26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 779, "upload_time": "2018-10-10T00:38:12", "url": "https://files.pythonhosted.org/packages/9a/ae/09efe0a6c111d677dd410e3833504d885c98910471e2bb4310ab11643dbf/hackgen-0.0.1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ac650b0e5ffa702968996f8f418a102a", "sha256": "c22916fcce302258349e9ecc11d34efaf4cba2c95034fc17581809d2a58ca853" }, "downloads": -1, "filename": "hackgen-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ac650b0e5ffa702968996f8f418a102a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4419, "upload_time": "2018-10-10T05:20:54", "url": "https://files.pythonhosted.org/packages/f2/29/a7293c91292db1b1440414ebed6c0ad545e568f7fd3ffbd6305985ed6cd7/hackgen-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5593e99cdc801c50b7860cb1ca42c7da", "sha256": "cfa926840618a1fc1109ef910cbe68edb091a7592d81e73f193162d7c86d2f38" }, "downloads": -1, "filename": "hackgen-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5593e99cdc801c50b7860cb1ca42c7da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3041, "upload_time": "2018-10-10T05:20:55", "url": "https://files.pythonhosted.org/packages/fe/4e/1431807ce1d6ea04b5bba10314cf09d0c3a4000905616af42ada271f2f08/hackgen-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ac650b0e5ffa702968996f8f418a102a", "sha256": "c22916fcce302258349e9ecc11d34efaf4cba2c95034fc17581809d2a58ca853" }, "downloads": -1, "filename": "hackgen-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ac650b0e5ffa702968996f8f418a102a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4419, "upload_time": "2018-10-10T05:20:54", "url": "https://files.pythonhosted.org/packages/f2/29/a7293c91292db1b1440414ebed6c0ad545e568f7fd3ffbd6305985ed6cd7/hackgen-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5593e99cdc801c50b7860cb1ca42c7da", "sha256": "cfa926840618a1fc1109ef910cbe68edb091a7592d81e73f193162d7c86d2f38" }, "downloads": -1, "filename": "hackgen-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5593e99cdc801c50b7860cb1ca42c7da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3041, "upload_time": "2018-10-10T05:20:55", "url": "https://files.pythonhosted.org/packages/fe/4e/1431807ce1d6ea04b5bba10314cf09d0c3a4000905616af42ada271f2f08/hackgen-1.0.1.tar.gz" } ] }