{"id":17925977,"url":"https://github.com/poyea/ternary-balance","last_synced_at":"2025-06-20T20:35:34.458Z","repository":{"id":50170620,"uuid":"261618755","full_name":"poyea/ternary-balance","owner":"poyea","description":"⚖️ Python solver for the balance problem","archived":false,"fork":false,"pushed_at":"2023-07-25T20:50:37.000Z","size":24,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T00:08:46.989Z","etag":null,"topics":["hacktoberfest","math","problem-solving","python","python-3","python3","sphinx","sphinx-doc","ternary"],"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/poyea.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}},"created_at":"2020-05-06T01:05:31.000Z","updated_at":"2021-10-21T18:41:41.000Z","dependencies_parsed_at":"2023-01-27T19:31:55.664Z","dependency_job_id":null,"html_url":"https://github.com/poyea/ternary-balance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poyea/ternary-balance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fternary-balance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fternary-balance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fternary-balance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fternary-balance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poyea","download_url":"https://codeload.github.com/poyea/ternary-balance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fternary-balance/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261012870,"owners_count":23096928,"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":["hacktoberfest","math","problem-solving","python","python-3","python3","sphinx","sphinx-doc","ternary"],"created_at":"2024-10-28T20:58:35.464Z","updated_at":"2025-06-20T20:35:29.443Z","avatar_url":"https://github.com/poyea.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ternary Balance System\n\u003e Given an integer N, find a way to balance the integer with weights from the set {1, 3, 9, 27, ...}, i.e. the powers of 3.\n\n![Ternary Balance](https://github.com/poyea/ternary-balance/workflows/Ternary%20Balance/badge.svg)\n\n  * [Features](#features)\n  * [Getting started](#getting-started)\n  * [Usage](#usage)\n  * [Run tests](#run-tests)\n  * [Build the documentation](#build-the-documentation)\n  * [Style](#style)\n  * [License](#license)\n\n\n## Features\n* Solve the ternary balance problem\n* Provide numeric utilities for exploration and testing\n\n## Getting started\nMake sure your Python is up-to-date:\n```\n$ python --version\nPython 3.8.2\n```\nSet up a python environment:\n```\n$ python -m venv ternary\n```\nInstall the requirement:\n```\n(ternary) $ pip install -r requirements.txt\n```\n\n## Usage\nOne query:\n```python\nfrom ternary_balance.solver import ternary_balance\n\nsolver = ternary_balance()\nsolver.solve()\n```\nMany queries:\n```python\nfrom ternary_balance.solver import ternary_balance\n\nsolver = ternary_balance()\nfor _ in range(10):\n    solver.solve()\n```\n\n## Run tests\nTo run the doctests,\n```\n(ternary) $ cd ternary_balance/utils\n(ternary) $ python numerics.py -v\n```\n\n## Build the documentation\nTo use Sphinx with Napoleon,\n```\n(ternary) $ cd docs\n(ternary) $ sphinx-apidoc --version\nsphinx-apidoc 3.0.3\n(ternary) $ sphinx-apidoc -o . ..\n(ternary) $ make html\n```\nThe documentation is available in `docs/_build`.\n\n## Style\nTo format the code, run\n```\n(ternary) $ black .\n```\n\n## License\nMIT\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Fternary-balance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoyea%2Fternary-balance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Fternary-balance/lists"}