{"id":18735866,"url":"https://github.com/tsimpdim/aplos","last_synced_at":"2026-07-22T11:02:14.216Z","repository":{"id":57410985,"uuid":"140953680","full_name":"TsimpDim/Aplos","owner":"TsimpDim","description":"Aplos is a simple and elegant linear problem(LP) parser. It allows one to get all the information he needs about any linear problem given with the correct syntax.","archived":false,"fork":false,"pushed_at":"2019-04-06T19:56:52.000Z","size":75,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-25T12:46:21.788Z","etag":null,"topics":["linear-programming","python","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TsimpDim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-14T14:45:41.000Z","updated_at":"2020-07-17T11:34:53.000Z","dependencies_parsed_at":"2022-09-05T14:32:09.885Z","dependency_job_id":null,"html_url":"https://github.com/TsimpDim/Aplos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TsimpDim/Aplos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TsimpDim%2FAplos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TsimpDim%2FAplos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TsimpDim%2FAplos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TsimpDim%2FAplos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TsimpDim","download_url":"https://codeload.github.com/TsimpDim/Aplos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TsimpDim%2FAplos/sbom","scorecard":{"id":144196,"data":{"date":"2025-08-11","repo":{"name":"github.com/TsimpDim/Aplos","commit":"1239114582b0f8e2e53fd7b98b286f84f2cf8afb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/9 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":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE.txt: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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 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-16T09:00:25.635Z","repository_id":57410985,"created_at":"2025-08-16T09:00:25.635Z","updated_at":"2025-08-16T09:00:25.635Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35759166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"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":["linear-programming","python","python3"],"created_at":"2024-11-07T15:18:25.107Z","updated_at":"2026-07-22T11:02:14.194Z","avatar_url":"https://github.com/TsimpDim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![Aplos](https://i.imgur.com/2LhCOIn.png)  \n[![Build Status](https://travis-ci.org/TsimpDim/Aplos.svg?branch=master)](https://travis-ci.org/TsimpDim/Aplos) [![Coverage Status](https://coveralls.io/repos/github/TsimpDim/Aplos/badge.svg?branch=master)](https://coveralls.io/github/TsimpDim/Aplos?branch=master)\n\nAplos is a simple and elegant linear problem(LP) parser. It allows one to get all the information they need about any linear problem given with the correct syntax. You can read more about Linear Programming [here.](https://en.wikipedia.org/wiki/Linear_programming)\n\n#### Expected LP format\n\n\u003emin/max c\u003csup\u003eT\u003c/sup\u003ex  \n\u003e\n\u003es.t /st /s.t. /subject to Ax ⊗ b  \n\u003e\n\u003eEnd\n\nWhere ⊗ can be any of the following =, \u003c=, \u003e=\n\nVariable(x) constraints/domains are not taken into consideration *(not yet)*.\n\n---\nExamples:\n\n1. Max 3x1 +2x2\n\n    s.t. x1+2x2\u003c=9\n\n\t2x1+5x2\u003c=4\n\n\tEnd\n    \n 2. min 3x1 - 5x2 + x4  \n \tst x2 + x3 = 2  \n    2x1 + 3x2 + 5x4 \u003e= 5  \n    x1 - 5x2 + 2x3 - 4x4 \u003c= 10  \n    END\n       \n## Usage\n``` python\nimport Aplos\n\n# Initialization\n# From a file\nparser = Aplos.AplosParser(filename='lp.txt')\n\n# From a string\ntext_lp = '''Max 3x1 +2x2\n\ns.t. x1+2x2\u003c=9\n\n2x1+5x2\u003c=4\n\nEnd'''\n\nparser = Aplos.AplosParser(text=text_lp)\n\n# From a string with a custom delimeter\ntext = \"Max 3x1 +2x3 + x5,s.t. x1+2x2\u003c=9,2x1+5x2\u003c=4,End\"\n\nparser = Aplos.AplosParser(text=text, delimeter=',')\n\n\n# Getting the variables\nvariables_of_line = parser.get_vars(line_idx=0)\n# variables_of_line = {\"existing\":['x1','x3'], \"extended\":['x1','x2','x3','x4','x5']}\nvariables_all = parser.get_vars()\n# variables_all = ['x1','x2','x3','x4','x5']\n\n# Detect errors\nerrors = parser.detect_errors() # set print_msg=True to print the full list of errors\n\nif not errors:\n    # Get dimensions\n    dimensions = parser.get_dimensions()\n    m = dimensions['m']\n    n = dimensions['n']\n\n    # Get any matrix (A,b,c,Eqin or MinMax)\n    # Eqin and MinMax have values corresponding to symbols\n    # Eqin -- '\u003c=': -1 | '\u003e=' : 1 | '=' : 0\n    # MinMax -- 'max':1 | 'min':-1\n    matrix_A = parser.get_matrix('a')\n    matrix_b = parser.get_matrix('B')\n    # And so on\n\n    # Otherwise, get all matrices at once.\n    # Keys are : A,b,c,Eqin \u0026 MinMax\n    matrices = parser.get_matrices()\n    matrix_A = matrices['A']\n    # And so on\n\n    # Save matrices to file\n    parser.write_matrices_to_file('output.txt')\n\n    # Get dual matrices\n    # Variable constraints -- 'free' : 0 | '\u003e= 0' : 1 | '\u003c= 0' : -1}\n    dual_A = parser.get_dual_matrix('a')\n\n    # Variable constraints are calculated assuming that x(i) \u003e= 0\n    # for every i. This is subject to change.\n    dual_var_constr = parser.get_dual_matrix('var_constr')\n    # And so on\n\n    # You can also get all the dual matrices together\n    # Similarly keys are : A,b,c,Eqin,MinMax \u0026 VarConstr\n    dual_matrices = parser.get_dual_matrices()\n    dual_A = dual_matrices['A']\n    # And so on\n\n    # Save dual matrices to file\n    parser.write_matrices_to_file('output_dual.txt', dual=True)\n\n\n    # After saving matrices (non-dual), you can also read them back\n    saved_matrices = parser.read_matrices_from_file('output.txt')\n\n    # If dual\n    saved_d_matrices = parser.read_matrices_from_file('output_dual.txt', dual=True)\n    \n```\n\n\n*As the project continues, the 'usage' section will get updated and eventually (hopefully) be moved in a documentation file/page altogether.*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsimpdim%2Faplos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsimpdim%2Faplos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsimpdim%2Faplos/lists"}