{"id":17492199,"url":"https://github.com/chunkhang/bogosort","last_synced_at":"2025-03-28T17:13:42.400Z","repository":{"id":91765306,"uuid":"96344229","full_name":"chunkhang/bogosort","owner":"chunkhang","description":"In bogo we trust","archived":false,"fork":false,"pushed_at":"2017-07-05T18:11:36.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T11:31:41.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chunkhang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-05T17:24:36.000Z","updated_at":"2017-07-06T05:15:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e86f399f-cfd9-4b05-ad47-5931e17170e1","html_url":"https://github.com/chunkhang/bogosort","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"94b85345943bc2c387d8208829f36dbf200da3cc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunkhang%2Fbogosort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunkhang%2Fbogosort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunkhang%2Fbogosort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunkhang%2Fbogosort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chunkhang","download_url":"https://codeload.github.com/chunkhang/bogosort/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246068302,"owners_count":20718503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-19T08:23:42.372Z","updated_at":"2025-03-28T17:13:42.371Z","avatar_url":"https://github.com/chunkhang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bogosort [![Travis](https://img.shields.io/travis/chunkhang/bogosort.svg)](https://travis-ci.org/chunkhang/bogosort)\n\nAn implementation of the infamous [bogosort](https://en.wikipedia.org/wiki/Bogosort), albeit imperfect due to the [pseudorandomness](https://docs.python.org/2/library/random.html#random.shuffle). Briefly, bogosort works by shuffling the list of numbers until it is sorted. Now you can marvel at the miraculous sorting algorithm's simplicity and efficiency. It might take seconds; it might take hours. Take a sip of coffee, and witness real magic at work.\n\n## Note\n\n\u003cimg src=\"https://www.python.org/static/community_logos/python-logo-master-v3-TM.png\" alt=\"Python\" width=\"200px\"\u003e \u003c/img\u003e\n\u003cbr/\u003e\nbogosort requires [Python 3](http://www.diveintopython3.net/installing-python.html).\n\n## Instructions\n\nEverything is in one file: [bogosort.py](https://raw.githubusercontent.com/chunkhang/bogosort/master/src/bogosort.py)\n\n```sh\n# Download\n$ curl -O https://raw.githubusercontent.com/chunkhang/bogosort/master/src/bogosort.py\n# Run\n$ python -B bogosort.py\n```\n\n## Sample Output\n\n```sh\nNumbers (Use space):\n8  8  130  90  930  2  1  9  18  123\nStarting bogosort...\n--------------------------------------------------------------------------------\n#0: [8, 8, 130, 90, 930, 2, 1, 9, 18, 123]\n#1: [130, 18, 90, 2, 8, 9, 8, 930, 123, 1]\n#2: [18, 1, 8, 90, 123, 930, 130, 9, 2, 8]\n#3: [8, 90, 9, 18, 123, 8, 930, 1, 2, 130]\n#4: [123, 2, 90, 9, 8, 130, 18, 1, 930, 8]\n#5: [2, 930, 9, 8, 8, 18, 1, 130, 123, 90]\n#6: [8, 18, 90, 8, 2, 130, 9, 930, 1, 123]\n#7: [90, 8, 18, 930, 9, 130, 123, 8, 2, 1]\n#8: [8, 90, 2, 123, 1, 9, 18, 130, 930, 8]\n#9: [8, 130, 1, 930, 123, 18, 90, 9, 8, 2]\n#10: [9, 8, 8, 90, 2, 123, 930, 1, 18, 130]\n#11: [2, 930, 9, 90, 8, 123, 18, 130, 1, 8]\n#12: [8, 930, 123, 18, 130, 9, 90, 2, 8, 1]\n#13: [8, 1, 8, 18, 9, 2, 90, 930, 130, 123]\n. \n.\n.\n#1295723: [123, 930, 2, 1, 18, 9, 130, 8, 90, 8]\n#1295724: [1, 8, 123, 90, 9, 930, 18, 130, 8, 2]\n#1295725: [1, 2, 930, 130, 9, 18, 90, 123, 8, 8]\n#1295726: [9, 18, 8, 90, 1, 2, 123, 130, 930, 8]\n#1295727: [930, 8, 123, 90, 18, 2, 9, 8, 130, 1]\n#1295728: [130, 90, 123, 8, 2, 8, 9, 930, 18, 1]\n#1295729: [2, 90, 930, 123, 18, 9, 8, 1, 8, 130]\n#1295730: [9, 8, 2, 8, 1, 130, 123, 18, 930, 90]\n#1295731: [1, 8, 9, 8, 90, 18, 930, 130, 123, 2]\n#1295732: [1, 9, 90, 930, 18, 123, 130, 2, 8, 8]\n#1295733: [2, 930, 8, 90, 1, 18, 8, 123, 9, 130]\n#1295734: [8, 930, 2, 130, 123, 1, 8, 18, 90, 9]\n#1295735: [8, 90, 9, 130, 8, 930, 18, 123, 1, 2]\n#1295736: [1, 2, 8, 8, 9, 18, 90, 123, 130, 930]\n--------------------------------------------------------------------------------\nBogosort completed for 10 elements.\nShuffles done: 1,295,736\nTime elapsed : 17s\n```\n\n## Contact\n\nReport bugs or suggest features: \u003cbr /\u003e\n[Marcus Mu](http://marcusmu.me) - chunkhang@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchunkhang%2Fbogosort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchunkhang%2Fbogosort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchunkhang%2Fbogosort/lists"}