Christian Clauss and cclauss
91ebea1d99
Sphinx runs on ubuntu 24.04 arm ( #12530 )
...
* Speed up our Sphinx GitHub Action with ARM
# `runs-on: ubuntu-24.04-arm`
https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
* updating DIRECTORY.md
---------
Co-authored-by: cclauss <cclauss@users.noreply.github.com >
2025-01-19 08:33:35 +01:00
Christian Clauss and pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
0bcdfbdb34
Use Astral uv ( #12402 )
...
* Use Astral uv
* uvx vs uv run
* uv sync --group=euler-validate,test
* uv sync --group=euler-validate --group=test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* --group=test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-05 10:04:48 +05:30
Christian Clauss
e3bd7721c8
validate_filenames.py Shebang python for Windows (#12371 )
2024-11-15 14:59:14 +01:00
Christian Clauss
a19bede190
Add scripts/find_git_conflicts.sh ( #12343 )
2024-11-01 13:40:09 +01:00
Christian Clauss
e9e7c96465
Create GitHub Pages docs with Sphinx ( #11888 )
2024-10-08 19:09:28 +02:00
Christian Clauss
0abeeab39f
Drop six from our GitHub Actions ( #11621 )
...
Drop https://six.readthedocs.io
2024-10-01 17:32:31 +02:00
Christian Clauss
0177ae1cd5
Upgrade to Python 3.13 ( #11588 )
2024-09-30 23:01:15 +02:00
Christian Clauss
a9ca110d6b
Scripts for closing pull requests for Hacktoberfest ( #11587 )
...
* Scripts for closing pull requests for Hacktoberfest
* --limit=500
* Lose 2024
2024-09-30 12:49:31 +02:00
Christian Clauss and pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
8995f45cb5
Rename .github/.github/dependabot.yml to .github/dependabot.yml ( #11264 )
...
* Rename .github/.github/dependabot.yml to .github/dependabot.yml
* runs-on: macos-14 # ubuntu-latest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update build.yml
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-01 11:40:35 +05:30
Christian Clauss
c2c6cb0f5c
Add dataclasses to binary_search_tree.py ( #10920 )
2023-10-25 16:28:23 -04:00
Christian Clauss and github-actions
eb17fcf8f5
Use dataclasses in circular_linked_list.py ( #10884 )
...
* Use dataclasses in circular_linked_list.py
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-24 08:45:36 -04:00
26ffad9d17
Simplify is_bst.py ( #10627 )
...
* Simplify is_bst.py
* updating DIRECTORY.md
* Update is_bst.py
* Rename is_bst.py to is_sorted.py
* updating DIRECTORY.md
* Update data_structures/binary_tree/is_sorted.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com >
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com >
2023-10-19 13:31:51 -04:00
Christian Clauss
3923e590d7
Tree_sort.py: Disable slow doctest ( #10584 )
2023-10-16 10:17:48 -04:00
Christian Clauss
7acf4bf73b
Rename binary_tree_traversals.md to README.md ( #10599 )
2023-10-16 10:16:09 -04:00
Christian Clauss and github-actions
4004b862d5
Revert "validate_solutions.py: os.getenv('GITHUB_TOKEN', '')" ( #10552 )
...
* Revert "validate_solutions.py: os.getenv('GITHUB_TOKEN', '') (#10546 )"
This reverts commit 68e6d5ad7e .
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-15 15:40:13 -04:00
Christian Clauss and github-actions
68e6d5ad7e
validate_solutions.py: os.getenv('GITHUB_TOKEN', '') ( #10546 )
...
* validate_solutions.py: os.getenv('GITHUB_TOKEN', '')
@tianyizheng02
* updating DIRECTORY.md
* f this
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-15 13:11:05 -04:00
Christian Clauss and github-actions
79a91cca95
Fix typo in filename: ciphers/trifid_cipher.py ( #10516 )
...
* Update and rename trafid_cipher.py to trifid_cipher.py
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-15 10:57:08 -04:00
Christian Clauss and github-actions
3f094fe49d
Ruff pandas vet ( #10281 )
...
* Python linting: Add ruff rules for Pandas-vet and Pytest-style
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-11 14:30:02 -04:00
Christian Clauss
844270c6e9
Remove backslashes from is_palindrome.py ( #10169 )
...
@SaiHarshaK Fixes https://github.com/TheAlgorithms/Python/pull/10081#discussion_r1349651289
2023-10-10 06:42:07 +13:00
Christian Clauss
d0c54acd75
Use dataclasses in singly_linked_list.py ( #9886 )
2023-10-06 15:31:11 +13:00
Christian Clauss and github-actions
5869fda742
print reverse: A LinkedList with a tail pointer ( #9875 )
...
* print reverse: A LinkedList with a tail pointer
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-06 10:55:13 +13:00
Christian Clauss
e60779c202
Upgrade our Devcontainer to Python 3.12 on Debian bookworm ( #9580 )
2023-10-03 23:04:59 +13:00
Christian Clauss
da03c14d39
Fix accuracy in maclaurin_series on Python 3.12 ( #9581 )
2023-10-03 22:48:58 +13:00
Christian Clauss and github-actions
0f4e51245f
Upgrade to Python 3.12 ( #9576 )
...
* DRAFT: GitHub Actions: Test on Python 3.12
Repeats #8777
* #8777
Some of our dependencies will not be ready yet.
* Python 3.12: Disable qiskit and tensorflow algorithms
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-03 14:47:10 +05:30
Christian Clauss and github-actions
f964dcbf2f
pre-commit autoupdate && pre-commit run --all-files ( #9516 )
...
* pre-commit autoupdate && pre-commit run --all-files
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-10-03 05:05:43 +02:00
Christian Clauss
596d934238
Fix ruff warning ( #9272 )
2023-10-01 17:28:30 +05:30
Christian Clauss
46454e204c
[skip-ci] In .devcontainer/Dockerfile: pipx install pre-commit ruff ( #8893 )
...
[skip-ci] In .devcontainer/Dockerfile: pipx install pre-commit ruff
2023-07-28 18:54:45 +02:00
Christian Clauss
dbaff34572
Fix ruff rules ISC flake8-implicit-str-concat ( #8892 )
2023-07-28 17:53:09 +01:00
Christian Clauss
d764eec655
Fix failing pytest quantum/bb84.py ( #8838 )
...
* Fix failing pytest quantum/bb84.py
* Update bb84.py test results to match current qiskit
2023-06-26 08:54:50 +05:30
Christian Clauss and github-actions
3bfa89dacf
GitHub Actions build: Add more tests ( #8837 )
...
* GitHub Actions build: Add more tests
Re-enable some tests that were disabled in #6591 .
Fixes #8818
* updating DIRECTORY.md
* TODO: Re-enable quantum tests
* fails: pytest quantum/bb84.py quantum/q_fourier_transform.py
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-06-25 21:58:01 +05:30
Christian Clauss and pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
07e6812888
Update .pre-commit-config.yaml ( #8828 )
...
* Update .pre-commit-config.yaml
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-20 21:33:16 +05:30
4b79d771cd
Add more ruff rules ( #8767 )
...
* Add more ruff rules
* Add more ruff rules
* pre-commit: Update ruff v0.0.269 -> v0.0.270
* Apply suggestions from code review
* Fix doctest
* Fix doctest (ignore whitespace)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-26 09:34:17 +02:00
Christian Clauss and github-actions
dd3b499bfa
Rename is_palindrome.py to is_int_palindrome.py ( #8768 )
...
* Rename is_palindrome.py to is_int_palindrome.py
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-05-26 12:20:33 +05:30
Christian Clauss and github-actions
f6df26bf0f
Fix docstring in present_value.py ( #8702 )
...
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-05-01 06:29:42 +05:30
4c1f876567
Solving the Top k most frequent words problem using a max-heap ( #8685 )
...
* Solving the `Top k most frequent words` problem using a max-heap
* Mentioning Python standard library solution in `Top k most frequent words` docstring
* ruff --fix .
* updating DIRECTORY.md
---------
Co-authored-by: Amos Paribocci <aparibocci@gmail.com >
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-04-27 23:02:07 +05:30
Christian Clauss and github-actions
2f9b03393c
Delete queue_on_two_stacks.py which duplicates queue_by_two_stacks.py ( #8624 )
...
* Delete queue_on_two_stacks.py which duplicates queue_by_two_stacks.py
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-04-08 17:46:19 +05:30
Christian Clauss
179298e3a2
Revert "Add LeNet Implementation in PyTorch ( #7070 )" ( #8621 )
...
This reverts commit b2b8585e63 .
2023-04-08 06:22:26 +05:30
Christian Clauss and github-actions
5ca7189563
Rename quantum_random.py.DISABLED.txt to quantum_random.py ( #8601 )
...
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-04-02 10:18:19 +05:30
Christian Clauss
521fbca61c
Replace flake8 with ruff ( #8184 )
2023-03-16 13:31:29 +01:00
Christian Clauss and github-actions
c96241b5a5
Replace bandit, flake8, isort, and pyupgrade with ruff ( #8178 )
...
* Replace bandit, flake8, isort, and pyupgrade with ruff
* Comment on ruff rules
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2023-03-15 13:58:25 +01:00
Christian Clauss
64543faa98
Make some ruff fixes ( #8154 )
...
* Make some ruff fixes
* Undo manual fix
* Undo manual fix
* Updates from ruff=0.0.251
2023-03-01 17:23:33 +01:00
Christian Clauss and pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
c909da9b08
pre-commit: Upgrade psf/black for stable style 2023 ( #8110 )
...
* pre-commit: Upgrade psf/black for stable style 2023
Updating https://github.com/psf/black ... updating 22.12.0 -> 23.1.0 for their `2023 stable style`.
* https://github.com/psf/black/blob/main/CHANGES.md#2310
> This is the first [psf/black] release of 2023, and following our stability policy, it comes with a number of improvements to our stable style…
Also, add https://github.com/tox-dev/pyproject-fmt and https://github.com/abravalheri/validate-pyproject to pre-commit.
I only modified `.pre-commit-config.yaml` and all other files were modified by pre-commit.ci and psf/black.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-01 18:44:54 +05:30
Christian Clauss and github-actions
08c2245705
Upgrade to flake8 v6 ( #8007 )
...
* Upgrade to flake8 v6
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-11-29 16:56:41 +01:00
Christian Clauss and github-actions
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
Christian Clauss and github-actions
4cddb26908
atbash.py: Tighten up the benchmarks ( #7977 )
...
* atbash.py: Tighten up the benchmarks
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-11-10 15:41:28 +13:00
6aaf0a2c77
maths/number_of_digits.py: Streamline benchmarks ( #7913 )
...
* maths/number_of_digits.py: Streamline benchmarks
```
num_digits(262144): 6 -- 0.2226011250168085 seconds
num_digits_fast(262144): 6 -- 0.13145116699161008 seconds
num_digits_faster(262144): 6 -- 0.09273383300751448 seconds
num_digits(1125899906842624): 16 -- 0.6056742920191027 seconds
num_digits_fast(1125899906842624): 16 -- 0.15698366600554436 seconds
num_digits_faster(1125899906842624): 16 -- 0.1027024170034565 seconds
num_digits(1267650600228229401496703205376): 31 -- 1.1957934170495719 seconds
num_digits_fast(1267650600228229401496703205376): 31 -- 0.15552304196171463 seconds
num_digits_faster(1267650600228229401496703205376): 31 -- 0.13062308297958225 seconds
```
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update number_of_digits.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-08 11:49:47 +00:00
Christian Clauss and github-actions
45b3383c39
Flake8: Drop ignore of issue A003 ( #7949 )
...
* Flake8: Drop ignore of issue A003
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-11-02 19:20:45 +01:00
Christian Clauss and github-actions
d23e709aea
maths/sum_of_digits.py: Streamline benchmarks ( #7914 )
...
* maths/sum_of_digits.py: Streamline benchmarks
```
sum_of_digits(262144): 19 -- 0.3128329170285724 seconds
sum_of_digits_recursion(262144): 19 -- 0.34008108399575576 seconds
sum_of_digits_compact(262144): 19 -- 0.6086010000435635 seconds
sum_of_digits(1125899906842624): 76 -- 0.8079068749793805 seconds
sum_of_digits_recursion(1125899906842624): 76 -- 0.8435653329943307 seconds
sum_of_digits_compact(1125899906842624): 76 -- 1.247976207989268 seconds
sum_of_digits(1267650600228229401496703205376): 115 -- 1.6441589999594726 seconds
sum_of_digits_recursion(1267650600228229401496703205376): 115 -- 1.713684624992311 seconds
sum_of_digits_compact(1267650600228229401496703205376): 115 -- 2.2197747920290567 seconds
```
* updating DIRECTORY.md
* Update sum_of_digits.py
* Update sum_of_digits.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-11-01 14:07:11 +01:00
Christian Clauss and github-actions
a31edd4477
Test on Python 3.11 ( #6591 )
...
* Test on Python 3.11 release candidate 2
* tensorflow; python<3.11
* tensorflow; python_version < 3.11
* tensorflow; python_version < "3.11"
* sympy, tensorflow; python_version < "3.11"
* sklearn; python_version < "3.11"
* matplotlib, pandas, qiskit
* statsmodels; python_version < "3.11"
* Bring back Pandas
* Problem deps are qiskit, statsmodels, and tensorflow
* updating DIRECTORY.md
* python-version: 3.11-dev --> 3.11
* updating DIRECTORY.md
* Add pytest --ignore to pyproject.toml
* Update build.yml
* Update pyproject.toml
* Update pyproject.toml
* Python 3.11
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-10-31 14:50:03 +01:00
19bff003aa
Adopt Python >= 3.8 assignment expressions using auto-walrus ( #7737 )
...
* Adopt Python >= 3.8 assignment expressions using auto-walrus
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-28 15:54:54 +02:00
Christian Clauss and github-actions
74325d079c
Rename quantum_random.py to quantum_random.py.DISABLED.txt ( #7683 )
...
* Rename quantum_random.py to quantum_random.py.DISABLED.txt
#7682
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-10-26 22:08:53 +02:00
b8b63469ef
My favorite palindrome ( #7455 )
...
* My favorite palindrome
* updating DIRECTORY.md
* Update is_palindrome.py
* Update is_palindrome.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update strings/is_palindrome.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com >
* Update is_palindrome.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com >
2022-10-23 18:12:49 +02:00
Christian Clauss and github-actions
81ccf54c75
Rename xgboostclassifier.py to xgboost_classifier.py ( #7550 )
...
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-10-23 18:39:25 +05:30
Christian Clauss and github-actions
6be9500b2f
chore: remove checkbox in feature issue template ( #7212 )
...
We do not assign issues in this repo
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-10-15 12:32:07 +05:30
Christian Clauss and github-actions
bae08adc86
README.md: Lose LGTM badge because we don't use it ( #7063 )
...
* README.md: Lose LGTM badge because we don't use it
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-10-12 20:56:07 +01:00
Christian Clauss
e9862adafc
chore: remove pre-commit GHA ( #6565 )
...
[`pre-commit.ci` is working](https://results.pre-commit.ci/repo/github/63476337 ) so let's remove our redundant and less powerful GitHub Action.
2022-10-03 06:57:14 +05:30
Christian Clauss and github-actions
3d33b36e92
Fix pre-commit.ci: additional_dependencies: [types-requests] ( #6559 )
...
* Fix pre-commit.ci: additional_dependencies: [types-requests==2.28.11]
* updating DIRECTORY.md
* Update .pre-commit-config.yaml
* additional_dependencies: [types-requests]
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-10-02 21:59:17 +02:00
Christian Clauss and github-actions
dad789d903
Get rid of the Union ( #6246 )
...
* Get rid of the Union
* updating DIRECTORY.md
* Get rid of the Union
* Remove the redundant pre-commit runs.
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-07-11 13:11:17 +02:00
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
Christian Clauss and github-actions
0a0f4986e4
Upgrade GitHub Actions ( #6236 )
...
* Upgrade GitHub Actions
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-07-07 05:25:25 +02:00
Christian Clauss
885580b3a1
pyupgrade --py310-plus and run mypy in precommit, not build ( #5996 )
...
* pyupgrade --py310-plus and run mypy in precommit, not build
* pyupgrade --py310-plus web_programming/fetch_well_rx_price.py
* pyupgrade --py310-plus web_programming/fetch_well_rx_price.py
* Fix arithmetic_analysis/in_static_equilibrium.py
* Fix arithmetic_analysis/in_static_equilibrium.py
2022-02-13 11:01:58 +01:00
Christian Clauss and github-actions
f707f6d689
Upgrade to Python 3.10 ( #5992 )
...
* Upgrade to Python 3.10
* Upgrade to Python 3.10
* mypy || true
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-02-13 06:57:44 +01:00
Christian Clauss and github-actions
24d3cf8244
The black formatter is no longer beta ( #5960 )
...
* The black formatter is no longer beta
* pre-commit autoupdate
* pre-commit autoupdate
* Remove project_euler/problem_145 which is killing our CI tests
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2022-01-30 20:29:54 +01:00
Christian Clauss and github-actions
1ae5abfc3c
Replace typing.optional with new annotations syntax ( #5829 )
...
* Replace typing.optional with new annotations syntax
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-11-17 04:43:02 +01:00
Christian Clauss and Dylan Buchi
8ac86f2ce5
mypy: Exclude only 20 files that are still failing ( #5608 )
...
* DRAFT: Run a mypy reality check
Let's see what is required to finish #4052
* mypy --ignore-missing-imports --install-types --non-interactive
* Check our progress...
* Update build.yml
* Update build.yml
* Update build.yml
* Update build.yml
* mypy --exclude 20 files
* --exclude with no `=`
* Update build.yml
* 558 character regex!!!
* With quotes
* mypy.ini: mega exclude
* Update mypy.ini
* Update build.yml
* Update mypy.ini
* Update build.yml
* Update mypy.ini
* .py --> .p*
* Escape the dots!: `.` --> `\.`
* Remove the comment
* Leading slash
* Update mypy.ini
Co-authored-by: Dylan Buchi <devybuchi@gmail.com >
Co-authored-by: Dylan Buchi <devybuchi@gmail.com >
2021-11-06 13:58:15 +01:00
Christian Clauss and github-actions
74f4967126
Fix comment ( #5742 )
...
* Fix comment
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-11-01 18:07:47 +01:00
Christian Clauss and github-actions
477cc3fe59
Add pyupgrade to pre-commit ( #5638 )
...
* Add pyupgrade to pre-commit
* Remove unused imports
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-28 16:45:59 +02:00
Christian Clauss and github-actions
cb4dc19723
Financial: principle -> principal ( #5614 )
...
* Financial: principle -> principal
The originally invested amount of money: `principal`
-- https://www.grammarly.com/blog/principle-principal/
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-27 00:41:32 +08:00
Christian Clauss and github-actions
366a0f1839
Fix validate_initial_digits of credit_card_validator.py ( #5600 )
...
* Fix validate_initial_digits of credit_card_validator.py
@Bhargavishnu I think that I broke the logic of validate_initial_digits which should require that credit_card_number[0] is 3 before checking that credit_card_number[1] is 4, 5, or 7. Please verify the new changes and the new test cases to make sure that this is correct. Thanks!
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-26 14:32:34 +02:00
Christian Clauss and github-actions
bd9464e4ac
mandelbrot.py: Commenting out long running tests ( #5558 )
...
* mandelbrot.py: Commenting out long running tests
* updating DIRECTORY.md
* Comment out 9 sec doctests
* Update bidirectional_breadth_first_search.py
* Comment out slow tests
* Comment out slow (9.15 sec) pytests...
* # Comment out slow (4.20s call) doctests
* Comment out slow (3.45s) doctests
* Update miller_rabin.py
* Update miller_rabin.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-23 18:15:30 +02:00
Christian Clauss and github-actions
f7804334f1
length_conversion.py: Deal with uppercase and abbreviations ( #5433 )
...
* length_conversion.py: Deal with uppercase and abbreviations
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-19 11:11:49 +02:00
Christian Clauss and github-actions
aa0ace4df7
Remove exception detail from doctest ( #5430 )
...
* Remove exception detail from doctest
These details are configuration dependant so should be removed according to https://docs.python.org/3/library/doctest.html
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-19 08:05:20 +02:00
Christian Clauss and github-actions
8dc7cdbc57
Add tests to morse_code.py ( #5337 )
...
* Add tests to morse_code.py
@dhruvmanila @poyea Your reviews, please.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-16 18:57:38 +02:00
Christian Clauss and github-actions
ca842b4add
It is OK to test ./scripts ( #5290 )
...
* It is OK to test ./scripts
* updating DIRECTORY.md
* Update build.yml
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-10-14 18:19:47 +02:00
Christian Clauss and github-actions
15d1cfabb1
from __future__ import annotations ( #4763 )
...
* from __future__ import annotations
* updating DIRECTORY.md
* from __future__ import annotations
* from __future__ import annotations
* Update xor_cipher.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-09-22 23:11:51 +02:00
dc07a85076
Update and rename check_valid_ip_address.py to is_ip_v4_address_valid.py ( #4665 )
...
* Update and rename check_valid_ip_address.py to is_ip_v4_address_valid.py
New test cases that the algorithm must detect:
* [ ] an octet much bigger than 255
* [ ] an octet is negative
* [ ] number of octets is less than 4
* [ ] number of octets is greater than 4
* [ ] an octet is a letter
* updating DIRECTORY.md
* Add two more tests to is_ip_v4_address_valid.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: John Law <johnlaw.po@gmail.com >
2021-09-23 02:03:11 +08:00
Christian Clauss and github-actions
abc725f12d
mypy --install-types --non-interactive . ( #4530 )
...
* mypy --install-types --non-interactive .
@dhruvmanila Is this useful/needed given that we do not pin our dependencies?
https://mypy-lang.blogspot.com/2021/06/mypy-0910-released.html
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-09-23 01:37:18 +08:00
Christian Clauss and github-actions
cecf43d648
Pyupgrade to Python 3.9 ( #4718 )
...
* Pyupgrade to Python 3.9
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-09-07 13:37:03 +02:00
Christian Clauss
ef9827166e
Approve functions used as default arguments ( #4699 )
...
* Approve functions used as default argumenets
* The default value for **seed** is the result of a function call
The default value for **seed** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `LinearCongruentialGenerator.__init__()` will only be called once per instance and it ensures that each instance will generate a unique sequence of numbers.
* The default value for **backend** is the result of a function call
The default value for **backend** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `Aer.get_backend()` is called when the function is definition and that same backend is then reused for function calls.
* Update linear_congruential_generator.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
2021-08-31 07:56:19 +02:00
Christian Clauss
097f830238
Avoid mutable default arguments ( #4691 )
2021-08-31 06:56:15 +02:00
Christian Clauss and github-actions
46e56fa6f2
luhn.py: Favor list comprehensions over maps ( #4663 )
...
* luhn.py: Favor list comprehensions over maps
As discussed in CONTRIBUTING.md.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-08-27 11:45:14 +02:00
Christian Clauss and github-actions
78a5d3a558
boruvka.py: A few simplifications and f-strings ( #4660 )
...
* boruvka.py: A few simplifications and f-strings
Python f-strings simplify the code and [should speed up execution](https://www.scivision.dev/python-f-string-speed ).
@srkchowdary2000 Your review, please.
* updating DIRECTORY.md
* fixup! Streamline the test
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-08-24 15:27:31 +02:00
Christian Clauss
10d38eae67
CONTRIBUTING.md: Write for current Python ( #4507 )
2021-06-13 09:59:06 +05:30
Christian Clauss and github-actions
71b458cefe
Rename harriscorner.py to harris_corner.py ( #4470 )
...
* Rename harriscorner.py to harris_corner.py
* updating DIRECTORY.md
* Rename meanthreshold.py to mean_threshold.py
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-05-31 21:19:09 +05:30
Christian Clauss and Dhruv Manilawala
69457357e8
binary_tree_traversals.py: Simplify with dataclasses ( #4336 )
...
* binary_tree_traversals.py: Simplify with dataclasses
* Update data_structures/binary_tree/binary_tree_traversals.py
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com >
* Optional["Node"]
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com >
2021-04-26 10:15:26 +05:30
Christian Clauss
ba974810d6
Simplify password_generator() ( #4333 )
2021-04-22 14:22:54 +05:30
Christian Clauss
252df0a149
fix(mypy): Fix files in scripts/ ( #4320 )
2021-04-07 08:12:56 +05:30
895bca3654
[mypy] Fix web_programming directory ( #4297 )
...
* Update world_covid19_stats.py
* Delete monkeytype_config.py
* updating DIRECTORY.md
* Apply pyannotate suggestions to emails_from_url.py
* mypy web_programming/emails_from_url.py
* super().__init__()
* mypy --ignore-missing-imports web_programming/emails_from_url.py
* Update emails_from_url.py
* self.urls: list[str] = []
* mypy: Fix web_programming directory
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com >
2021-03-31 08:48:07 +05:30
Christian Clauss
c22c7d503b
mypy: Use a --exclude list ( #4296 )
...
* mypy: Use a --exclude list
* Graphics works on my machine
* A few more...
* A few more...
* Update build.yml
2021-03-31 08:32:25 +05:30
Christian Clauss
8d7ef6a7f5
build.yml: Run mypy --ignore-missing-imports ( #4276 )
...
* build.yml: Run mypy --ignore-missing-imports
* pip install mypy
* Remove failing directories
* Add fractals and drop python-m
2021-03-20 07:01:13 +01:00
Christian Clauss and github-actions
987567360e
Update our pre-commit dependencies ( #4273 )
...
* .pre-commit-config.yaml: mypy directories that pass
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-03-20 10:42:17 +05:30
Christian Clauss and github-actions
b8a19ccfea
GitHub Actions: fast-fail on black formatting issues ( #4268 )
...
* GitHub Actions: fast-fail on black formatting issues
Give fast feedback to contributors https://github.com/psf/black#github-actions
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2021-03-20 10:39:56 +05:30
3fdbf9741d
Python 3.9 ( #3926 )
...
* Upgrade to Python 3.9
* pip install wheel for faster builds
* updating DIRECTORY.md
* requirements.txt: tensorflow; python_version < '3.9'
* keras requires tensorflow
* Rename lstm_prediction.py to lstm_prediction.py_tf
* Update requirements.txt
* updating DIRECTORY.md
* Update requirements.txt
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com >
2020-11-24 12:41:10 +01:00
Christian Clauss and github-actions
bb693aa681
Delete Travis_CI_tests_are_failing.md ( #3902 )
...
* Delete Travis_CI_tests_are_failing.md
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2020-11-19 22:18:47 +05:30
Christian Clauss and github-actions
9b95e4f662
Pyupgrade to python3.8 ( #3616 )
...
* Upgrade to Python 3.8 syntax
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2020-10-21 12:46:14 +02:00
Christian Clauss and github-actions
a481bfa231
Fix broken build: Remove trailing spaces ( #3501 )
...
* Fix broken build: Remove trailing spaces
* updating DIRECTORY.md
* One more trailing space
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2020-10-18 18:07:27 +02:00
Christian Clauss and github-actions
f34434a214
Fix the build -- 88 chars per line max. ( #3437 )
...
* Fix the build -- 88 chars per line max.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2020-10-17 13:42:29 +02:00
Christian Clauss and github-actions
5b024f4dd5
BROKEN BUILD: Fix a failing precommit test ( #3344 )
...
* Fix a failing precommit test
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2020-10-16 00:33:25 +02:00
Christian Clauss and github-actions
2e90debab3
Tighten up quicksort() ( #3319 )
...
* Tighten up quicksort()
* updating DIRECTORY.md
* str does not support .pop()
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2020-10-15 15:07:34 +02:00
Christian Clauss and github-actions
7c5cc28ba2
Revert recent changes to .pre-commit-config.yaml ( #3318 )
...
* Revert recent changes to .pre-commit-config.yaml
We must continue to insist that algorithmic functions can not print() as discussed in CONTRIBUTING.md.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
2020-10-15 16:50:43 +05:30