{"id":18728978,"url":"https://github.com/uberswe/randompick","last_synced_at":"2025-06-13T03:02:38.807Z","repository":{"id":149465892,"uuid":"518033882","full_name":"uberswe/randompick","owner":"uberswe","description":"A simple function which takes a map of weighted options and picks one at random. This might be useful for a lottery or raffle where participants might have multiple tickets.","archived":false,"fork":false,"pushed_at":"2022-07-26T11:32:03.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-19T20:33:23.062Z","etag":null,"topics":["random-pick","random-pick-with-weight"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uberswe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-07-26T11:30:54.000Z","updated_at":"2022-07-26T11:32:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"4bc66f68-7f4f-4aca-9df1-3d07842b9a39","html_url":"https://github.com/uberswe/randompick","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uberswe/randompick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Frandompick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Frandompick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Frandompick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Frandompick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uberswe","download_url":"https://codeload.github.com/uberswe/randompick/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Frandompick/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259571641,"owners_count":22878182,"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":["random-pick","random-pick-with-weight"],"created_at":"2024-11-07T14:25:09.978Z","updated_at":"2025-06-13T03:02:36.681Z","avatar_url":"https://github.com/uberswe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"RandomPick\n\nA simple function which takes a map of weighted options and picks one at random. This might be useful for a lottery or raffle where participants might have multiple tickets.\n\n```go\nrand.Seed(time.Now().UnixNano())\n\nm := map[string]int{\n    \"Bob\": 900,\n    \"Steve\": 2000,\n    \"Kyle\": 300,\n}\n\nfmt.Println(randompick.Result(m))\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberswe%2Frandompick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuberswe%2Frandompick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberswe%2Frandompick/lists"}