{"id":32306833,"url":"https://github.com/adventuresmith/dart_collection_sampler","last_synced_at":"2026-02-20T22:02:23.290Z","repository":{"id":56827683,"uuid":"112720350","full_name":"Adventuresmith/dart_collection_sampler","owner":"Adventuresmith","description":"a small library implementing methods to sample items from collections","archived":false,"fork":false,"pushed_at":"2022-12-08T05:10:42.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-08-20T21:43:33.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","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/Adventuresmith.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-01T09:21:56.000Z","updated_at":"2023-05-30T08:20:57.000Z","dependencies_parsed_at":"2023-01-24T11:45:14.028Z","dependency_job_id":null,"html_url":"https://github.com/Adventuresmith/dart_collection_sampler","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/Adventuresmith/dart_collection_sampler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adventuresmith%2Fdart_collection_sampler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adventuresmith%2Fdart_collection_sampler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adventuresmith%2Fdart_collection_sampler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adventuresmith%2Fdart_collection_sampler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adventuresmith","download_url":"https://codeload.github.com/Adventuresmith/dart_collection_sampler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adventuresmith%2Fdart_collection_sampler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29666432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-10-23T07:10:41.820Z","updated_at":"2026-02-20T22:02:23.270Z","avatar_url":"https://github.com/Adventuresmith.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dart_collection_sampler\n[![Pub Package](https://img.shields.io/pub/v/dart_collection_sampler.svg)](https://pub.dartlang.org/packages/dart_collection_sampler)\n[![Dart](https://github.com/Adventuresmith/dart_collection_sampler/actions/workflows/dart.yml/badge.svg)](https://github.com/Adventuresmith/dart_collection_sampler/actions/workflows/dart.yml)\n[![codecov](https://codecov.io/gh/Adventuresmith/dart_collection_sampler/branch/master/graph/badge.svg?token=77209PUWLS)](https://codecov.io/gh/Adventuresmith/dart_collection_sampler)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)\n\n\na small library implementing methods to sample items from collections\n\n## Usage\n\nA simple usage example:\n\n```dart\n\nvoid deal(int n, List\u003cString\u003e items, {required bool unique}) {\n  stdout.writeln(\"Picking $n from $items (unique: $unique)\\n\");\n\n  if (n == 1) {\n    stdout.writeln(\"Selected item: ${CollectionSampler().pick(items)}\");\n  } else {\n    stdout.writeln(\n      \"Selected items: ${CollectionSampler().pickN(items, n, unique: unique)}\",\n    );\n  }\n}\n```\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/Adventuresmith/dart_collection_sampler/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadventuresmith%2Fdart_collection_sampler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadventuresmith%2Fdart_collection_sampler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadventuresmith%2Fdart_collection_sampler/lists"}