{"id":19847841,"url":"https://github.com/mascrypt0/calculator","last_synced_at":"2026-06-11T19:30:57.450Z","repository":{"id":224394550,"uuid":"763146869","full_name":"mascrypt0/calculator","owner":"mascrypt0","description":"Simple calculator build in python","archived":false,"fork":false,"pushed_at":"2024-02-25T17:34:37.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T22:59:16.238Z","etag":null,"topics":["calculator-python","python"],"latest_commit_sha":null,"homepage":"https://github.com/mascrypt0/calculator","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/mascrypt0.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-25T17:21:12.000Z","updated_at":"2024-02-25T17:38:07.000Z","dependencies_parsed_at":"2024-02-25T18:49:13.030Z","dependency_job_id":null,"html_url":"https://github.com/mascrypt0/calculator","commit_stats":null,"previous_names":["mascrypt0/calculator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mascrypt0/calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascrypt0%2Fcalculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascrypt0%2Fcalculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascrypt0%2Fcalculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascrypt0%2Fcalculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mascrypt0","download_url":"https://codeload.github.com/mascrypt0/calculator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascrypt0%2Fcalculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34215253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":["calculator-python","python"],"created_at":"2024-11-12T13:15:20.863Z","updated_at":"2026-06-11T19:30:57.145Z","avatar_url":"https://github.com/mascrypt0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scientific Python Calculator\n\nScientific Python Calculator is a library for doing mathematics computation. It works similar to a calculator.\n\n:raised_hands: This is my first python package. It will be improved over time. Feel free to contribute to this beautiful work of art.\n\n## Installation\n:warning: only tested with python 3. \n\n**Installation via PYPI**\n```sh\n$ pip install scipy-calculator\n```\n**Installation via Github**\nthis is for the stable released version\n```sh\n$ pip install git+https://github.com/mascrypt0/calculator\n```\n\nscipy_calculator uses multipledispatch dependency and pytest for automated test\n\n## Usage\nThe calculator can be used for basic mathematical computation. The calculator has a memory that caches the last result until it is reset. The cached result is used in the next computation if not reset. \n\nThe `reset` is used to clear the cache\n\nExamples will be shown below\n\n## Sample Code\n```python\nfrom calculator import Calculator\n\nmy_cal = Calculator()\n```\n### Addition\n```python\n\u003e\u003e\u003e my_cal.add(10)\n10\n```\n#### Subtraction\n`subtract`\n```python\n\u003e\u003e\u003e my_cal.subtract(5)\n5\n```\nbecause the memory was not reset, `5` was subtracted from previous value `10`\n\n\n#### Division\nFor `divide`, zero division returns `None` and description\n```python\n\u003e\u003e\u003e cal.divide(2)\n2.5\n```\n```python\n\u003e\u003e\u003e cal.divide(0)\nnumber cannot be zero =\u003e float division by zero\nNone\n\n\u003e\u003e\u003e cal.memory_val\n2.5\n```\n\n\n#### Multiply\n```python\n\u003e\u003e\u003e cal.multiply(2.5)\n6.25\n```\n#### Modulo\n```python\n\u003e\u003e\u003e cal.modulo(5)\n1.25\n```\n#### Square root\n```python\n\u003e\u003e\u003e cal.sqrt(16)\n4\n```\n\n#### Reset\n```python\n\u003e\u003e\u003e cal.reset()\n\u003e\u003e\u003e cal.memory_val\n0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmascrypt0%2Fcalculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmascrypt0%2Fcalculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmascrypt0%2Fcalculator/lists"}