{"id":20671521,"url":"https://github.com/hopson97/pyrpn","last_synced_at":"2025-06-25T08:32:56.177Z","repository":{"id":145669045,"uuid":"285282316","full_name":"Hopson97/PyRPN","owner":"Hopson97","description":"Mini Reverse Polish Notation (Postfix notation) parser and evaluator","archived":false,"fork":false,"pushed_at":"2020-08-05T20:52:31.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-17T13:48:28.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hopson97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-08-05T12:31:50.000Z","updated_at":"2020-08-08T17:48:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"c46d6f3d-1669-4f66-ba8e-95c20b15d4b3","html_url":"https://github.com/Hopson97/PyRPN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopson97%2FPyRPN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopson97%2FPyRPN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopson97%2FPyRPN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopson97%2FPyRPN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hopson97","download_url":"https://codeload.github.com/Hopson97/PyRPN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242890680,"owners_count":20202201,"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-11-16T20:27:47.772Z","updated_at":"2025-03-10T17:25:37.494Z","avatar_url":"https://github.com/Hopson97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyRPN\nMini Reverse Polish Notation (Postfix notation) parser and evaluator\n\nIt uses a stack based system.\n\n\n| Keyword | Definition                                            | Stack Before | Stack After |\n|---------|-------------------------------------------------------|--------------|-------------|\n| `dup`   | Duplicates the stack top                              | 5 5 4        | 5 5 4 4     |\n| `swap`  | Swap the top 2 stack items                            | 1 2 3        | 1 3 2       |\n| `rot`   | Rotates the top 3 stack items                         | 1 2 3        | 3 1 2       |\n| `drop`  | Removes the last stack item                           | 1 2 3        | 1 2         |\n| `sum`   | Sums up the stack, and pushes the result              | 1 2 3        | 6           |\n| `avg`   | Averages the stack, pushes result                     | 2 4 6        | 3           |\n| `print` | Pops and prints the stack top                         | 5 5          | 5           |\n| `+`     | Adds the top two stack items, pushes the result       | 5 10 15      | 5 25        |\n| `-`     | Subtracts the top two stack items, pushes the result  | 5 10 15      | 5 -5        |\n| `*`     | Multiplies the top two stack items, pushes the result | 2 5.5 2      | 11.0        |\n| `/`     | Divides the top two stack items, pushes the result    | 5 10 2       | 5 5         |\n\nExample:\n\nInput: `15.5 1.5 + 2 swap + 2 5 * - print `\n\nOutput: `-9.0`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopson97%2Fpyrpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhopson97%2Fpyrpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopson97%2Fpyrpn/lists"}