{"id":23158779,"url":"https://github.com/mitchs-dev/combination-calculator","last_synced_at":"2025-04-04T18:41:01.801Z","repository":{"id":181110652,"uuid":"589858745","full_name":"mitchs-dev/combination-calculator","owner":"mitchs-dev","description":"Calculates combinations","archived":false,"fork":false,"pushed_at":"2023-01-17T05:24:31.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T03:46:25.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mitchs-dev.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}},"created_at":"2023-01-17T05:20:47.000Z","updated_at":"2023-01-17T05:21:46.000Z","dependencies_parsed_at":"2023-07-14T04:36:10.592Z","dependency_job_id":null,"html_url":"https://github.com/mitchs-dev/combination-calculator","commit_stats":null,"previous_names":["mitchs-dev/combination-calculator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fcombination-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fcombination-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fcombination-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fcombination-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchs-dev","download_url":"https://codeload.github.com/mitchs-dev/combination-calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234841,"owners_count":20905852,"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-12-17T22:27:36.639Z","updated_at":"2025-04-04T18:41:01.772Z","avatar_url":"https://github.com/mitchs-dev.png","language":"Go","readme":"# Combination Calculator\n\n## What is it?\n\nThis simple calculator provides all possible combinations, avoiding comparisons to duplicate values as well as priority on the first available match (I.e 1 + 4 would take priority over 4 + 1 matching.)\n\nHere is an example of valid values if you are looking for all possible combinations of \"4\" values:\n\n| \u003cspan style=\"font-weight:normal\"\u003e\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e1\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e2\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e3\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e4\u003c/span\u003e |\n| -------------- | -------------- | -------------- | -------------- | -------------- |\n| 1 | ❌ | ✅ | ✅ | ✅ |\n| 2 | ❌ | ❌ | ✅ | ✅ |\n| 3 | ❌ | ❌ | ❌ | ✅ |\n| 4 | ❌ | ❌ | ❌ | ❌ |\n\nThis provides you with **6** possible combinations.\n\n## Weight\n\nAn additional feature of this tool is the `--weight` flag which allows you to specify a percentage to allow weight to these values.\n\nFor example, if you were to set `--weight 50` and `--value 100` this means that 50% of the values would be discarded. It's important to note that which combinations are discarded are determined after the initial prioritization and combinations are generated and the discarded values are, in theory, \"random\" as they are not _actually_ calculated.\n\nA few additional details:\n\n* The percentage can be any positive standard percentage integer value between. (0-100)\n* The final weight is rounded to the nearest whole number.\n* You can use a decimal value or a whole number value.\n\nHere is an example of valid values if you are looking for combinations for a value of \"4\" with a 50% weight:\n\n| \u003cspan style=\"font-weight:normal\"\u003e\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e1\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e2\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e3\u003c/span\u003e | \u003cspan style=\"font-weight:normal\"\u003e4\u003c/span\u003e |\n| -------------- | -------------- | -------------- | -------------- | -------------- |\n| 1 | ❌ | ✅ | ❌ | ❌ |\n| 2 | ❌ | ❌ | ✅ | ❌ |\n| 3 | ❌ | ❌ | ❌ | ✅ |\n| 4 | ❌ | ❌ | ❌ | ❌ |\n\nThis provides you with **3** possible combinations.\n\n## Flags\n\nThere are a few flags available that do various things \n\n| Name | Description | Required | Usage |\n| :-----: | :-----: | :-----: | :-----: |\n| value |  Value to check combinations for | ✅ | `--value \u003cNUMBER\u003e` |\n| weight |  Specify a percentage to adjust the outcome to the highest rounded whole number | ❌ | `--weight \u003cNUMBER\u003e` |\n| silent | Only return count | ❌ | `--silent` |\n| debug |  Enable debug mode | ❌ | `--debug` |\n| version |   Shows version of this tool | ❌ | `--version` |\n\n## Example\n\n```golang\n$ ./combination-calculator --value 10 --weight 25\nINFO[0000] Completed Cycle (1/10)                       \nINFO[0000] Completed Cycle (2/10)                       \nINFO[0000] Completed Cycle (3/10)                       \nINFO[0000] Completed Cycle (4/10)                       \nINFO[0000] Completed Cycle (5/10)                       \nINFO[0000] Completed Cycle (6/10)                       \nINFO[0000] Completed Cycle (7/10)                       \nINFO[0000] Completed Cycle (8/10)                       \nINFO[0000] Completed Cycle (9/10)                       \nINFO[0000] Completed Cycle (10/10)                      \n----------------------------------\nTotal Combinations:  34\n```\n\n## Disclaimer\n\nThis was created as a personal \"hackathon\" project and it wasn't ever intended to be maintained or updated and will be provided as is.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchs-dev%2Fcombination-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchs-dev%2Fcombination-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchs-dev%2Fcombination-calculator/lists"}