Commit Graph

11 Commits

Author SHA1 Message Date
Muhammad Umer Farooq
cffdf99c55
Updated prime_numbers.py testcases. (#9851)
* Updated prime_numbers.py testcases.

* revert __main__ code.
2023-10-05 20:44:55 +02:00
Christian Clauss
5c92b7390e
prime_numbers.py: Tighten up the benchmarks (#7976)
* prime_numbers.py: Tighten up the benchmarks

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-10 15:42:14 +13:00
Caeden
d5a9f649b8
Add flake8-builtins to pre-commit and fix errors (#7105)
Ignore `A003`

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2022-10-13 19:53:59 +05:30
Christian Clauss
b75a7c77f8
pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0 (#6245)
* pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0

* pre-commit run --all-files
2022-07-11 10:19:52 +02:00
Leoriem-code
716beb32ed
Improved prime_numbers.py (#5592)
* Improved prime_numbers.py

* update prime_numbers.py

* Increase the timeit number to 1_000_000

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-26 09:21:44 +02:00
Christian Clauss
5f4da5d616
isort --profile black . (#2181)
* updating DIRECTORY.md

* isort --profile black .

* Black after

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-06 09:44:19 +02:00
Christian Clauss
565060aa99
actions/setup-python@v2 (#1986)
* actions/setup-python@v2

* fixup! Format Python code with psf/black push

* Update autoblack.yml

* updating DIRECTORY.md

* Update codespell.yml

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-16 08:49:56 +02:00
Steven Qu
c8fbdee229
improved prime number generator to check only up to sqrt(n) instead of n (#1984)
* improved prime number generator to check only up to sqrt(n) instead of n

* added old version as slow_primes() and named new, faster version primes()

* fixed docstring in slow_primes

* Add a timeit benchmark

* Update prime_numbers.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-15 00:33:50 +02:00
Níkolas Vargas
938dd0bbb5 improved prime numbers implementation (#1606)
* improved prime numbers implementation

* fixup! Format Python code with psf/black push

* fix type hint

* fixup! Format Python code with psf/black push

* fix doctests

* updating DIRECTORY.md

* added prime tests with negative numbers

* using for instead filter

* updating DIRECTORY.md

* Remove unused typing.List

* Remove tab indentation

* print("Sorted order is:", " ".join(a))
2019-12-07 06:39:08 +01:00
himanshujain171
53ff735701 Factors of a number (#1493)
* Factors of a number

* Update factors.py

* Fix mypy issue in basic_maths.py

* Fix mypy error in perceptron.py

* def primes(max: int) -> List[int]:

* Update binomial_heap.py

* Add a space

* Remove a space

* Add a space
2019-10-29 23:54:30 +01:00
5ur3
4880e5479a Create prime_numbers.py (#1519)
* Create prime_numbers.py

* Update prime_numbers.py
2019-10-29 21:28:51 +01:00