Skip to content

Commit 493e320

Browse files
authored
Add files via upload
First upload
1 parent c15706c commit 493e320

File tree

4 files changed

+119
-88
lines changed

4 files changed

+119
-88
lines changed

LICENSE

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
MIT License
2-
3-
Copyright (c) 2021 git4robot
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
Copyright (c) 2021 JamesJ
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
1-
[![Downloads](https://static.pepy.tech/personalized-badge/find-primes?period=total&units=international_system&left_color=lightgrey&right_color=yellowgreen&left_text=Downloads)](https://pepy.tech/project/find-primes)
2-
3-
**Find Primes is a library to find all kinds of primes.**
4-
5-
**Install**
6-
```shell
7-
pip install -U find-primes
8-
```
9-
**[Twin Primes](https://en.wikipedia.org/wiki/Twin_prime)**
10-
11-
A twin prime is a prime number that is either 2 less or 2 more than another prime number.
12-
13-
Example: Find all twin primes below 1000.
14-
```python
15-
from find_primes import find_twins
16-
print(find_twins(1000))
17-
```
18-
19-
**[Palindrome Primes](https://en.wikipedia.org/wiki/Palindromic_prime)**
20-
21-
A palindrome prime is a prime number that is also a palindrome number.
22-
23-
Example: Find all palindrome primes below 1000.
24-
```python
25-
from find_primes import find_palindromes
26-
print(find_palindromes(1000))
27-
```
28-
29-
**[Emirps](https://en.wikipedia.org/wiki/Emirp)**
30-
31-
An emirp is a prime number that results in a different prime when its decimal digits are reversed.
32-
33-
Example: Find all emirps below 1000.
34-
```python
35-
from find_primes import find_reverse
36-
print(find_reverse(1000))
37-
```
38-
39-
**[Primes in Arithmetic Progression](https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression)**
40-
41-
Primes in arithmetic progression are any sequence of at least three prime numbers that are consecutive terms in an arithmetic progression.
42-
43-
Example: Find all primes in arithmetic progression below 1000.
44-
```python
45-
from find_primes import find_arithmetic_prime_progressions
46-
print(find_arithmetic_prime_progressions(100))
47-
```
48-
49-
**[Mersenne Primes](https://en.wikipedia.org/wiki/Mersenne_prime)**
50-
51-
A mersenne prime is a prime number that is one less than a power of two.
52-
53-
Example: Find all mersenne primes below 600000.
54-
```python
55-
from find_primes import find_mersenne_primes
56-
print(find_mersenne_primes(600000))
57-
```
58-
59-
**[Fermat Pseudoprimes](https://en.wikipedia.org/wiki/Fermat_pseudoprime)**
60-
61-
A fermat pseudoprime is a pseudoprime that satisfies fermat's little theorem.
62-
63-
Example: Find all fermat pseudoprimes below 1000.
64-
```python
65-
from find_primes import find_fermat_pseudoprime
66-
print(find_fermat_pseudoprime(1000))
67-
```
1+
[![Downloads](https://static.pepy.tech/personalized-badge/find-primes?period=total&units=international_system&left_color=lightgrey&right_color=yellowgreen&left_text=Downloads)](https://pepy.tech/project/find-primes)
2+
3+
Find Primes is a library to find all kinds of primes.
4+
5+
**Install**
6+
```shell
7+
pip install -U find-primes
8+
```
9+
**[Twin Primes](https://en.wikipedia.org/wiki/Twin_prime)**
10+
11+
A twin prime is a prime number that is either 2 less or 2 more than another prime number.
12+
13+
Example: Find all twin primes below 1000.
14+
```python
15+
from find_primes import find_twins
16+
print(find_twins(1000))
17+
```
18+
19+
**[Palindrome Primes](https://en.wikipedia.org/wiki/Palindromic_prime)**
20+
21+
A palindrome prime is a prime number that is also a palindrome number.
22+
23+
Example: Find all palindrome primes below 1000.
24+
```python
25+
from find_primes import find_palindromes
26+
print(find_palindromes(1000))
27+
```
28+
29+
**[Emirps](https://en.wikipedia.org/wiki/Emirp)**
30+
31+
An emirp is a prime number that results in a different prime when its decimal digits are reversed.
32+
33+
Example: Find all emirps below 1000.
34+
```python
35+
from find_primes import find_reverse
36+
print(find_reverse(1000))
37+
```
38+
39+
**[Primes in Arithmetic Progression](https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression)**
40+
41+
Primes in arithmetic progression are any sequence of at least three prime numbers that are consecutive terms in an arithmetic progression.
42+
43+
Example: Find all primes in arithmetic progression below 1000.
44+
```python
45+
from find_primes import find_arithmetic_prime_progressions
46+
print(find_arithmetic_prime_progressions(100))
47+
```
48+
49+
**[Mersenne Primes](https://en.wikipedia.org/wiki/Mersenne_prime)**
50+
51+
A mersenne prime is a prime number that is one less than a power of two.
52+
53+
Example: Find all mersenne primes below 600000.
54+
```python
55+
from find_primes import find_mersenne_primes
56+
print(find_mersenne_primes(600000))
57+
```
58+
59+
**[Fermat Pseudoprimes](https://en.wikipedia.org/wiki/Fermat_pseudoprime)**
60+
61+
A fermat pseudoprime is a pseudoprime that satisfies fermat's little theorem.
62+
63+
Example: Find all fermat pseudoprimes below 1000.
64+
```python
65+
from find_primes import find_fermat_pseudoprime
66+
print(find_fermat_pseudoprime(1000))
67+
```

run.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
python setup.py sdist bdist_wheel
2+
twine upload --verbose -u JamesJ -p Promotion2020 --repository pypi dist/find_primes-1.2.*
3+
pause

setup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from setuptools import setup
2+
3+
from os import path
4+
this_directory = path.abspath(path.dirname(__file__))
5+
with open(path.join(this_directory, 'README.md'), encoding = 'utf-8') as f:
6+
long_description = f.read()
7+
8+
setup(
9+
name = 'find_primes',
10+
version = '1.2.1',
11+
author = 'JamesJ',
12+
author_email = 'GGJamesQQ@yeah.net',
13+
description = 'A module for finding primes.',
14+
classifiers = [
15+
'Programming Language :: Python :: 3 :: Only',
16+
'License :: OSI Approved :: MIT License',
17+
'Development Status :: 4 - Beta',
18+
'Programming Language :: Python :: 3.6',
19+
'Programming Language :: Python :: 3.7',
20+
'Programming Language :: Python :: 3.8',
21+
'Programming Language :: Python :: 3.9',
22+
'Programming Language :: Python :: 3.10',
23+
'Topic :: Scientific/Engineering :: Mathematics'
24+
],
25+
url = 'https://github.com/git4robot/PyPI/tree/main',
26+
packages = ['find_primes'],
27+
long_description = long_description,
28+
long_description_content_type = 'text/markdown',
29+
python_requires = '>=3.6'
30+
)

0 commit comments

Comments
 (0)