{"id":13507871,"url":"https://github.com/stocks29/dice","last_synced_at":"2025-07-17T06:32:45.264Z","repository":{"id":27041107,"uuid":"30506235","full_name":"stocks29/dice","owner":"stocks29","description":"Roll the dice, in elixir","archived":false,"fork":false,"pushed_at":"2016-12-13T17:46:59.000Z","size":5,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T13:40:50.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/stocks29.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":"2015-02-08T21:19:55.000Z","updated_at":"2024-08-31T13:54:33.000Z","dependencies_parsed_at":"2022-07-24T13:31:49.897Z","dependency_job_id":null,"html_url":"https://github.com/stocks29/dice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stocks29/dice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocks29%2Fdice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocks29%2Fdice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocks29%2Fdice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocks29%2Fdice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stocks29","download_url":"https://codeload.github.com/stocks29/dice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocks29%2Fdice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265573470,"owners_count":23790438,"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-08-01T02:00:41.711Z","updated_at":"2025-07-17T06:32:45.227Z","avatar_url":"https://github.com/stocks29.png","language":"Elixir","funding_links":[],"categories":["Examples and funny stuff"],"sub_categories":[],"readme":"Dice\n====\n\nTest the results of rolling different sided dice.\n\n### Add as Dependency\n\n```elixir\n{:dice, \"~\u003e 0.0.1\"}\n```\n\n### Build CLI App\n\n```bash\nmix escript.build\n```\n\n### Run CLI App\n\n```bash\n./dice $num_trials $num_sides_die_1 $num_sides_die_2 $num_sides_die_3 ...\n```\n\n### Use Library\n\n```elixir\n# Create 2 x 6-sided die\ndice = Dice.new([6, 6])\n\n# Roll the dice\nresult = Dice.roll(dice)\n# =\u003e 7\n\n# Run several trials of the dice\nresults = Dice.trials(dice, 1000)\n# =\u003e %{2 =\u003e 19, 3 =\u003e 52, 4 =\u003e 53, 5 =\u003e 81, 6 =\u003e 89, 7 =\u003e 167, 8 =\u003e 158, 9 =\u003e 118, 10 =\u003e 118, 11 =\u003e 86, 12 =\u003e 59}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstocks29%2Fdice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstocks29%2Fdice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstocks29%2Fdice/lists"}