{"id":17477727,"url":"https://github.com/jpetrucciani/gamble","last_synced_at":"2026-03-08T10:31:46.516Z","repository":{"id":46635729,"uuid":"205571962","full_name":"jpetrucciani/gamble","owner":"jpetrucciani","description":"🎲 A python library with various gambling and gaming classes","archived":false,"fork":false,"pushed_at":"2024-11-23T16:09:59.000Z","size":139,"stargazers_count":22,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-11T20:42:47.532Z","etag":null,"topics":["cards","dice","gamble","games","golf","hacktoberfest","library","playing-cards","python3"],"latest_commit_sha":null,"homepage":"https://jpetrucciani.github.io/gamble","language":"Python","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/jpetrucciani.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":"2019-08-31T16:54:18.000Z","updated_at":"2025-01-22T21:08:02.000Z","dependencies_parsed_at":"2024-03-08T03:29:28.886Z","dependency_job_id":"4e3e6dd7-e5e5-444a-8f05-fc7f93cb9f27","html_url":"https://github.com/jpetrucciani/gamble","commit_stats":{"total_commits":57,"total_committers":10,"mean_commits":5.7,"dds":0.6666666666666667,"last_synced_commit":"9e8d5b6b7f7c97a74652bde815e315b8d2e7c0c3"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/jpetrucciani/gamble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fgamble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fgamble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fgamble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fgamble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpetrucciani","download_url":"https://codeload.github.com/jpetrucciani/gamble/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fgamble/sbom","scorecard":{"id":535565,"data":{"date":"2025-08-11","repo":{"name":"github.com/jpetrucciani/gamble","commit":"13e746792a8dea1a44506e85f09d699494a3ac1b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/stale.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jpetrucciani/gamble/test.yml/main?enable=pin","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/stale.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-7cx3-6m66-7c5m","Warn: Project is vulnerable to: GHSA-48p4-8xcf-vxj5","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T06:52:22.738Z","repository_id":46635729,"created_at":"2025-08-20T06:52:22.738Z","updated_at":"2025-08-20T06:52:22.738Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273174035,"owners_count":25058462,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cards","dice","gamble","games","golf","hacktoberfest","library","playing-cards","python3"],"created_at":"2024-10-18T20:09:12.264Z","updated_at":"2026-03-08T10:31:46.463Z","avatar_url":"https://github.com/jpetrucciani.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/gamble.svg)](https://badge.fury.io/py/gamble)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Python 3.10+ supported](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/release/python-3100/)\n\n**gamble** is a simple library that implements a collection of some\ncommon gambling-related classes\n\n# Features\n\n- die, dice, d-notation\n- cards, decks, hands\n- poker ranks, hand comparison\n\n# Usage\n\n## Installation\n\n```bash\npip install gamble\n```\n\n# Basic Usage\n\n## Dice\n\n```python\nimport gamble\n\n# create dice, defaults to 2 6-sided dice\ndice = gamble.Dice()\n\n# roll\ndice.roll()\n\u003e\u003e\u003e 6\ndice.rolls\n\u003e\u003e\u003e 1\n\n# max, min\ndice.max\n\u003e\u003e\u003e 12\ndice.min\n\u003e\u003e\u003e 2\n\n# d-notation for dice constructor\ndice = gamble.Dice('d20+8')\n\n# max, min\ndice.max\n\u003e\u003e\u003e 28\ndice.min\n\u003e\u003e\u003e 9\n\n# parts\ndice.parts\n\u003e\u003e\u003e [\u003cd20 Die\u003e, 8]\n\n# roll_many\ndice.roll_many(2)\n\u003e\u003e\u003e [8, 4]\n\n# max_of, min_of\ndice.max_of(3)\n\u003e\u003e\u003e (11, [7, 3, 11])\ndice.min_of(3)\n\u003e\u003e\u003e (2, [2, 9, 4])\n```\n\n## Cards\n\n```python\nimport gamble\n\n# create a deck, defaults to the standard 52 card deck, no jokers\n# the deck will be shuffled by default, unless you pass shuffle=False\ndeck = gamble.Deck()\n\ndeck.cards_left\n\u003e\u003e\u003e 52\n\ndeck.top\n\u003e\u003e\u003e \u003cCard:7♠\u003e\ndeck.bottom\n\u003e\u003e\u003e \u003cCard:9♠\u003e\ndeck.shuffle()  # you can also pass times=(int) to shuffle more than once\n\ncard = deck.draw()  # you can also pass times=(int) to draw a list of cards\n\u003e\u003e\u003e \u003cCard:A♠\u003e\n\n# the unicode cards icons are implemented as well!\ncard.unicode\n\u003e\u003e\u003e \"🂡\"\n\n# draw a poker hand, default size 5\nhand = deck.draw_hand(). # you can pass size=(int) to draw a different size hand\n\u003e\u003e\u003e \u003cHand[5](straight flush) [A♠, 2♠, 3♠, 4♠, 5♠]\u003e\n\nhand.rank\n\u003e\u003e\u003e Rank(name='straight flush', value=8)\n\n# arbitrary hand, from text notation\nnew_hand = gamble.Hand.get(\"2c,3c,4c,Kc,Kh\")\n\u003e\u003e\u003e \u003cHand[5](pair) [2♣, 3♣, 4♣, K♣, K♥]\u003e\n\nnew_hand.rank\n\u003e\u003e\u003e Rank(name='pair', value=1)\n\nhand \u003e new_hand\n\u003e\u003e\u003e True\n```\n\n# Todo\n\n- hand equals/ge/le method\n- hand ranking when hands are very similar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetrucciani%2Fgamble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpetrucciani%2Fgamble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetrucciani%2Fgamble/lists"}