Skip to content

Commit 899b518

Browse files
author
GUO Joanna
committed
Add files via upload
1 parent 0088dce commit 899b518

File tree

6 files changed

+12
-16
lines changed

6 files changed

+12
-16
lines changed

build/lib/find_primes/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
except ImportError:
2020
NUMPY_ENABLED = False
2121

22-
PRIME_TEST = False
23-
FACTOR_TEST = False
22+
PRIME_TEST = True
23+
FACTOR_TEST = True
2424
try:
2525
from rsa import newkeys, __version__
2626
print('Detected rsa version {__version__}'.format(**locals()))
@@ -2909,7 +2909,7 @@ def multiply_point(P, k, curve):
29092909

29102910
return P2
29112911

2912-
def lenstra(n, mode = 1, tries = 10):
2912+
def factor(n, mode = 1, tries = 10):
29132913
factors = []
29142914
for i in (2, 3):
29152915
while n % i == 0:
@@ -2990,7 +2990,7 @@ def lenstra(n, mode = 1, tries = 10):
29902990
factors.sort()
29912991
return factors
29922992

2993-
return lenstra(n)
2993+
return factor(n)
29942994

29952995
def factor_pollardpm1(n, retry = 1):
29962996
'''
@@ -3219,9 +3219,7 @@ def test():
32193219

32203220
if __name__ == '__main__':
32213221
if version_info[0] == 3 and version_info[1] >= 6:
3222-
if list(reversed(list(vars(args).values()))) == list(vars(args).values()):
3223-
test()
3224-
print(factor_williamspp1(137817))
3222+
test()
32253223

32263224
else:
32273225
print('The test method can\'t run in your python version.')
53 KB
Binary file not shown.

dist/find_primes-2.1.5.tar.gz

39.4 KB
Binary file not shown.

find_primes.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: find-primes
3-
Version: 2.1.4
3+
Version: 2.1.5
44
Summary: A module for finding primes and finding factors of big numbers.
55
Home-page: https://github.com/git4robot/pypi_find_primes
66
Author: JamesJ

find_primes/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
except ImportError:
2020
NUMPY_ENABLED = False
2121

22-
PRIME_TEST = False
23-
FACTOR_TEST = False
22+
PRIME_TEST = True
23+
FACTOR_TEST = True
2424
try:
2525
from rsa import newkeys, __version__
2626
print('Detected rsa version {__version__}'.format(**locals()))
@@ -2909,7 +2909,7 @@ def multiply_point(P, k, curve):
29092909

29102910
return P2
29112911

2912-
def lenstra(n, mode = 1, tries = 10):
2912+
def factor(n, mode = 1, tries = 10):
29132913
factors = []
29142914
for i in (2, 3):
29152915
while n % i == 0:
@@ -2990,7 +2990,7 @@ def lenstra(n, mode = 1, tries = 10):
29902990
factors.sort()
29912991
return factors
29922992

2993-
return lenstra(n)
2993+
return factor(n)
29942994

29952995
def factor_pollardpm1(n, retry = 1):
29962996
'''
@@ -3219,9 +3219,7 @@ def test():
32193219

32203220
if __name__ == '__main__':
32213221
if version_info[0] == 3 and version_info[1] >= 6:
3222-
if list(reversed(list(vars(args).values()))) == list(vars(args).values()):
3223-
test()
3224-
print(factor_williamspp1(137817))
3222+
test()
32253223

32263224
else:
32273225
print('The test method can\'t run in your python version.')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name = 'find_primes',
10-
version = '2.1.4',
10+
version = '2.1.5',
1111
author = 'JamesJ',
1212
author_email = 'GGJamesQQ@yeah.net',
1313
description = 'A module for finding primes and finding factors of big numbers.',

0 commit comments

Comments
 (0)