{"id":26950422,"url":"https://github.com/subatomicplanets/simplestringmath","last_synced_at":"2025-04-02T23:29:25.647Z","repository":{"id":209812019,"uuid":"655733119","full_name":"SubatomicPlanets/SimpleStringMath","owner":"SubatomicPlanets","description":"A very simple python script which can do math on user-written strings","archived":false,"fork":false,"pushed_at":"2024-06-20T19:56:09.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T14:00:04.204Z","etag":null,"topics":["algorithms","data-structures","lightweight","math","numbers","python","python3","real-time","shunting-yard-algorithm","simple","string-algorithms","string-manipulation","strings"],"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/SubatomicPlanets.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":"2023-06-19T13:40:34.000Z","updated_at":"2024-06-21T14:00:12.359Z","dependencies_parsed_at":null,"dependency_job_id":"d1bcee0c-8791-4f3d-83b6-e475fdc42770","html_url":"https://github.com/SubatomicPlanets/SimpleStringMath","commit_stats":null,"previous_names":["subatomicplanets/strtomath","subatomicplanets/simplestringmath"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubatomicPlanets%2FSimpleStringMath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubatomicPlanets%2FSimpleStringMath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubatomicPlanets%2FSimpleStringMath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubatomicPlanets%2FSimpleStringMath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SubatomicPlanets","download_url":"https://codeload.github.com/SubatomicPlanets/SimpleStringMath/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246910054,"owners_count":20853503,"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":["algorithms","data-structures","lightweight","math","numbers","python","python3","real-time","shunting-yard-algorithm","simple","string-algorithms","string-manipulation","strings"],"created_at":"2025-04-02T23:29:25.203Z","updated_at":"2025-04-02T23:29:25.640Z","avatar_url":"https://github.com/SubatomicPlanets.png","language":"Python","readme":"# SimpleStringMath\nThis is a very simple example on how to evaluate a mathematical expression from a string.  \nIt is only one file, simple to use, and is only 100 lines long.  \nIt can evaluate written out words, and calculate math expressions.  \nI made this in python 3.8.10, but really any version should work. I am using only one library, which is built in.  \n  \nCurrently only + - * / ^ % are possible.\nIf there are any issues, please let me know. I did not have a lot of time for testing.  \n\n# Examples:\n- \"what's fifty three+7*6/2?\" -\u003e  74  \n- \"what is 9 * 67+90?\"         -\u003e  693  \n- \"2^7\"                        -\u003e  128  \n- \"tell me what pi - 23 * (((((-6) + (2 / (65.4 - one hundred and fourteen))) + 20) - ((5 * 3) * two)) - (0.5 / 0.9)) is.\"  -\u003e  384.865871835391  \n- \"-pi+pi\"                     -\u003e  0  \n- \"-pi*two\"                    -\u003e  -6.283184\n- \"(twenty two*2)+one\"         -\u003e  45\n\n# How to use\n1. you can just read the code, if it interests you.  \n2. you can use it as a library by downloading it, importing it in other files, and running the \"evaluate\" function.  \n3. you can download the file and modify it.  \n   - add this code to the bottom of the file to make it run when you start it:  \n     ```\n     while True:\n         print(evaluate(input(\"You: \")))\n     ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubatomicplanets%2Fsimplestringmath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubatomicplanets%2Fsimplestringmath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubatomicplanets%2Fsimplestringmath/lists"}