{"id":17857179,"url":"https://github.com/caferrari/shuffle","last_synced_at":"2025-10-13T11:37:04.894Z","repository":{"id":13521128,"uuid":"16212301","full_name":"caferrari/Shuffle","owner":"caferrari","description":"Shuffle a huge amount of numbers","archived":false,"fork":false,"pushed_at":"2014-01-26T21:54:12.000Z","size":136,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T08:47:36.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caferrari.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}},"created_at":"2014-01-24T18:02:25.000Z","updated_at":"2016-02-26T11:46:37.000Z","dependencies_parsed_at":"2022-09-05T08:40:13.618Z","dependency_job_id":null,"html_url":"https://github.com/caferrari/Shuffle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FShuffle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FShuffle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FShuffle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2FShuffle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caferrari","download_url":"https://codeload.github.com/caferrari/Shuffle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866209,"owners_count":20846530,"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-28T03:11:46.632Z","updated_at":"2025-10-13T11:36:59.858Z","avatar_url":"https://github.com/caferrari.png","language":"PHP","readme":"Caf\\Shuffle [![Build Status](https://travis-ci.org/caferrari/Shuffle.png?branch=master)](https://travis-ci.org/caferrari/Shuffle)\n===========\n\nThis lib was made with the objective to shuffle a huge amount of numbers\n\nPerformance\n-----------\n\nIt's a lot slower than the combo range + shuffle functions but it does have a nice memory advantage:\n\n10000000 (10 million) numbers:\n\n    range + shuffe: 1425.28 MB in 9 seconds\n    Caf\\Shuffle: 38.59 MB in 24 seconds // Exported file: 40MB\n\n100000000 (100 million) numbers:\n\n    range + shuffe: PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 32 bytes)\n    Caf\\Shuffle: 381.79Mb in 228 seconds // Exported file: 400MB\n\nAdvantages\n----------\n\nYou can export the generated numbers in a nice binary file to be used later or in another place so it becomes more useful\n\n    $r = new Caf\\Shuffle\\Shuffle(10000000);\n    $r-\u003einitialize();\n    $r-\u003eshuffle();\n    $r-\u003eexportToFile('rand.bin');\n\nIt's very easy to reuse later:\n\n    $r = new Caf\\Shuffle\\Shuffle(10000000);\n    $r-\u003eloadFile('rand.bin');\n\n    foreach ($r-\u003egetIterator() as $number) {\n        echo $number . PHP_EOL\n    }\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaferrari%2Fshuffle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaferrari%2Fshuffle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaferrari%2Fshuffle/lists"}