{"id":18551781,"url":"https://github.com/tomhea/numx","last_synced_at":"2025-05-15T11:10:30.499Z","repository":{"id":211246453,"uuid":"727308847","full_name":"tomhea/numx","owner":"tomhea","description":"Import numbers.","archived":false,"fork":false,"pushed_at":"2023-12-07T10:57:03.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-27T06:39:25.379Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomhea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-04T15:53:30.000Z","updated_at":"2023-12-04T15:53:37.000Z","dependencies_parsed_at":"2023-12-07T11:02:38.976Z","dependency_job_id":"865d9e51-20a0-4884-8637-8afdaeff286a","html_url":"https://github.com/tomhea/numx","commit_stats":null,"previous_names":["tomhea/numx"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhea%2Fnumx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhea%2Fnumx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhea%2Fnumx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhea%2Fnumx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomhea","download_url":"https://codeload.github.com/tomhea/numx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328389,"owners_count":22052633,"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-06T21:10:19.931Z","updated_at":"2025-05-15T11:10:25.489Z","avatar_url":"https://github.com/tomhea.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NumX - Import Numbers\n\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/tomhea/numx)](https://github.com/tomhea/numx)\n[![GitHub](https://img.shields.io/github/license/tomhea/numx)](LICENSE)\n[![PyPI - Version](https://img.shields.io/pypi/v/numx)](https://pypi.org/project/numx/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/numx)](https://pypi.org/project/numx/)\n\nJust Import Numbers.\n\n```python\n\u003e\u003e from numx import p25  # The 25th prime\n\u003e\u003e print(p25)\n97\n```\n\nThis library allows importing useful numbers, as the Nth prime, prime lists, random numbers, fibonacci, e, pi, ...  \nThe library is [thoroughly tested](#how-to-test), and uses [sympy](https://pypi.org/project/sympy/) as its computational mind.\n\n### How to Download\n```\npip install numx\n```\n\n# Supported Number Types\n- `pN`  - the Nth prime.\n- `plN` - list of the first N primes.\n- `PN`  - count the primes upto N.\n- `PLN` - list of primes upto N.\n- `nN`  - the number N.\n- `rN`  - random integer in range [0, N].\n- `piN` - pi to N decimal places (as numx.__Float).\n- `eN`  - e to N decimal places (as numx.__Float).\n- `tN`  - Euler's totient function of N.\n- `faN` - N! (N factorial).\n- `fiN` - fibonacci(N), starting from fi0 == 0.\n\nMoreover, for big numbers you can use: \n- `2e7` to denote `2 * 10**7`\n- `2p7` to denote `2 ** 7`\n- `_` as a dot, so: `6_25p_5` is `6.25 ** 0.5`\n\nAn import can fail only when importing a variable written in a bad format (e.g. numx.n7e will fail).  \nWhen it fails, numx will raise the numx.__NumXError exception, which inherits from ValueError.\n\nnumx.__Float is sympy.Float, which supports the str() and float() functions.\n\n### How to Test\n\nThe library is thoroughly tested. If you want to run the test, just run:\n```\n\u003e\u003e git clone https://github.com/tomhea/numx.git\n\u003e\u003e pytest numx\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomhea%2Fnumx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomhea%2Fnumx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomhea%2Fnumx/lists"}