{"id":24926837,"url":"https://github.com/jaytwolab/poker_hand_probabilities","last_synced_at":"2025-03-28T12:26:27.774Z","repository":{"id":273569699,"uuid":"919339819","full_name":"JayTwoLab/poker_hand_probabilities","owner":"JayTwoLab","description":"Poker Probability Calculator. :kr: 포커 확률 계산기","archived":false,"fork":false,"pushed_at":"2025-01-22T00:07:48.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T03:07:34.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/JayTwoLab.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":"2025-01-20T08:02:49.000Z","updated_at":"2025-01-22T00:06:57.000Z","dependencies_parsed_at":"2025-01-21T17:49:36.518Z","dependency_job_id":"bd9a380f-2927-4424-9187-307c473c6a55","html_url":"https://github.com/JayTwoLab/poker_hand_probabilities","commit_stats":null,"previous_names":["jaytwolab/poker_hand_probabilities"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2Fpoker_hand_probabilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2Fpoker_hand_probabilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2Fpoker_hand_probabilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2Fpoker_hand_probabilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayTwoLab","download_url":"https://codeload.github.com/JayTwoLab/poker_hand_probabilities/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246028524,"owners_count":20712038,"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":"2025-02-02T12:53:27.917Z","updated_at":"2025-03-28T12:26:27.751Z","avatar_url":"https://github.com/JayTwoLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### `poker_hand_probabilities` : Poker Probability Calculator\n\n\u003e [English](README.md) , [Korean](README.ko.md)\n\nThis project is a Python program that calculates the probabilities of various poker hands. You can exclude or add specific cards to the standard deck and analyze how the probabilities change.\n\n---\n\n#### Key Features\n\n1. **Poker Probability Calculation**  \n   Calculates probabilities for the following poker hands using a standard 52-card deck:\n   - `High Card`\n   - `One Pair`\n   - `Two Pair`\n   - `Three of a Kind`\n   - `Straight`\n   - `Flush`\n   - `Full House`\n   - `Four of a Kind`\n   - `Straight Flush`\n   - `Royal Straight Flush`  \n\n2. **Excluding and Adding Cards**  \n   - Exclude specific cards from the deck or add new cards to recalculate probabilities.\n   - Example: Exclude four Queens (Q) or add four extra Aces (A).\n\n3. **Usage**  \n   - The `calculate_poker_probabilities` function calculates probabilities considering excluded or added cards.\n   - The `main` function demonstrates different scenarios (full deck, excluded cards, added cards) and prints the corresponding probabilities.\n\n---\n\n#### Code Example\n\n```python\n# Calculate probabilities for a full 52-card deck\nprobabilities = calculate_poker_probabilities()\n\n# Exclude four Queens (Q)\nexcluded_cards = [\"QH\", \"QD\", \"QC\", \"QS\"]\nprobabilities_excluded = calculate_poker_probabilities(excluded_cards=excluded_cards)\n\n# Add four extra Aces\nadded_cards = [\"Extra_A1\", \"Extra_A2\", \"Extra_A3\", \"Extra_A4\"]\nprobabilities_added = calculate_poker_probabilities(added_cards=added_cards)\n```\n\n- Result\n```\n--- Full Deck (52 cards) ---\nHigh Card: 50.117739%\nOne Pair: 42.256903%\nTwo Pair: 4.753902%\nThree of a Kind: 2.112845%\nStraight: 0.392465%\nFlush: 0.196540%\nFull House: 0.144058%\nFour of a Kind: 0.024010%\nStraight Flush: 0.001539%\nRoyal Flush: 0.000154%\n\n--- Excluding QH, QD, QC, QS ---\nHigh Card: 24.291014%\nOne Pair: 64.138144%\nTwo Pair: 7.215541%\nThree of a Kind: 3.206907%\nStraight: 0.595689%\nFlush: 0.298312%\nFull House: 0.218653%\nFour of a Kind: 0.033405%\nStraight Flush: 0.002336%\nRoyal Flush: 0.000234%\n\n--- Adding 4 extra Aces ---\nHigh Card: 66.059308%\nOne Pair: 28.751123%\nTwo Pair: 3.234501%\nThree of a Kind: 1.437556%\nStraight: 0.267029%\nFlush: 0.133724%\nFull House: 0.098015%\nFour of a Kind: 0.017697%\nStraight Flush: 0.001047%\nRoyal Flush: 0.000105%****\n```\n\n---\n\n#### How to Run\n\n1. Ensure Python 3.x or higher is installed on your system.\n2. Run the program using the following command:\n   ```bash\n   python poker.py\n   ```\n3. The program will output probabilities for each scenario.\n\n---\n\n#### Contribution and License\n\n- **Contribution**: Feedback and contributions are welcome. Please submit your changes through a Pull Request.\n- **License**: This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytwolab%2Fpoker_hand_probabilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaytwolab%2Fpoker_hand_probabilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytwolab%2Fpoker_hand_probabilities/lists"}