Commit Graph

3340 Commits

Author SHA1 Message Date
Maxim Smolskiy
3925b8155b
Fix ARG005 per file ignore (#11383) 2024-04-24 06:32:25 +02:00
Maxim Smolskiy
d016fda51c
Enable ruff RUF003 rule (#11376)
* Enable ruff RUF003 rule

* Update pyproject.toml

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-22 21:56:14 +02:00
Maxim Smolskiy
4700297b3e
Enable ruff RUF002 rule (#11377)
* Enable ruff RUF002 rule

* Fix

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-22 21:51:47 +02:00
Maxim Smolskiy
79dc7c97ac
Enable ruff RUF001 rule (#11378)
* Enable ruff RUF001 rule

* Fix

* Fix
2024-04-22 21:45:24 +02:00
pre-commit-ci[bot]
dbfa21813f
[pre-commit.ci] pre-commit autoupdate (#11380)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.7 → v0.4.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.7...v0.4.1)
- [github.com/tox-dev/pyproject-fmt: 1.7.0 → 1.8.0](https://github.com/tox-dev/pyproject-fmt/compare/1.7.0...1.8.0)

* from keras import layers, models

* Update lstm_prediction.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-22 21:43:19 +02:00
Maxim Smolskiy
2702bf9400
Enable ruff S113 rule (#11375)
* Enable ruff S113 rule

* [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>
2024-04-21 19:34:18 +02:00
Maxim Smolskiy
7b88e15b1c
Enable ruff RUF007 rule (#11349)
* Enable ruff RUF005 rule

* Enable ruff RUF007 rule

* Fix

* Fix

* Fix

* Update sorts/bead_sort.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update sorts/bead_sort.py

* Revert "Update sorts/bead_sort.py"

This reverts commit b10e5632e4.

* Revert "Update sorts/bead_sort.py"

This reverts commit 2c1816bf10.

* Update sorts/bead_sort.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-20 16:20:27 +02:00
Kelvin
42593489d9
Add doctests in all functions in basic_string.py (#11374)
* Add doctests in all functions in basic_string.py

* Revert back to original basic_string.py

* Add doctest in basic_string.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update genetic_algorithm/basic_string.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-20 12:50:37 +02:00
Maxim Smolskiy
a42eb35702
Enable ruff E741 rule (#11370)
* Enable ruff E741 rule

* [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>
2024-04-19 21:30:22 +02:00
pre-commit-ci[bot]
0a9a860eb1
[pre-commit.ci] pre-commit autoupdate (#11364)
updates:
- [github.com/MarcoGorelli/auto-walrus: v0.2.2 → 0.3.3](https://github.com/MarcoGorelli/auto-walrus/compare/v0.2.2...0.3.3)
- [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.3.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.5...v0.3.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-15 22:21:33 +02:00
pre-commit-ci[bot]
14ca726951
[pre-commit.ci] pre-commit autoupdate (#11355)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-09 07:23:51 +02:00
Jiayou Qin
9e55c9d984
Added documentations (#11352)
* Added documentations

* Update data_structures/queue/circular_queue.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-08 13:35:22 +02:00
Maxim Smolskiy
cc2f5b1308
Do not fix ruff EXE001 rule (#11350)
* Do not fix ruff EXE001 rule

* Fix
2024-04-08 13:22:54 +02:00
Maxim Smolskiy
53b2926704
Enable ruff PGH003 rule (#11345)
* Enable ruff PGH003 rule

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 21:29:34 +02:00
Maxim Smolskiy
f5bbea3776
Enable ruff RUF005 rule (#11344) 2024-04-02 21:18:47 +02:00
Maxim Smolskiy
f437f92279
Enable ruff INP001 rule (#11346)
* Enable ruff INP001 rule

* Fix

* Fix

* Fix

* Fix

* Fix
2024-04-02 21:13:56 +02:00
Maxim Smolskiy
f8cdb3e948
Enable ruff S105 rule (#11343)
* Enable ruff S105 rule

* Update web_programming/recaptcha_verification.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-02 18:44:37 +02:00
Maxim Smolskiy
93fb555e0a
Enable ruff SIM102 rule (#11341)
* Enable ruff SIM102 rule

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* [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>
2024-04-02 03:27:56 +02:00
Maxim Smolskiy
f8a948914b
Enable ruff NPY002 rule (#11336) 2024-04-01 21:39:31 +02:00
Maxim Smolskiy
39daaf8248
Enable ruff RUF100 rule (#11337) 2024-04-01 21:36:41 +02:00
pre-commit-ci[bot]
c328b000ec
[pre-commit.ci] pre-commit autoupdate (#11339)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.4 → v0.3.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.4...v0.3.5)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-01 21:35:37 +02:00
Maxim Smolskiy
f2246ce7fd
Enable ruff ICN001 rule (#11329)
* Enable ruff ICN001 rule

* [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>
2024-03-28 18:03:23 +00:00
Maxim Smolskiy
efb7463cde
Enable ruff PLW0120 rule (#11330)
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-03-28 18:28:54 +01:00
Maxim Smolskiy
da47d5c88c
Enable ruff N999 rule (#11331)
* Enable ruff N999 rule

* updating DIRECTORY.md

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
2024-03-28 18:26:41 +01:00
Maxim Smolskiy
516a3028d1
Enable ruff PLR5501 rule (#11332)
* Enable ruff PLR5501 rule

* [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>
2024-03-28 18:25:41 +01:00
MrBubb1es
19fd435042
Improved doctests for some functions (#11334) 2024-03-28 18:19:51 +01:00
Maxim Smolskiy
b5cb1fba0d
Enable ruff DTZ005 rule (#11327)
* Enable ruff DTZ005 rule

* Fix other/gauss_easter.py

* Fix

* Fix web_programming/instagram_pic.py

* Fix web_programming/instagram_video.py

* Apply suggestions from code review

* Update instagram_pic.py

* datetime.now(tz=UTC).astimezone()

* .astimezone()

* Fix

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-03-25 21:54:11 +01:00
pre-commit-ci[bot]
ead54314f2
[pre-commit.ci] pre-commit autoupdate (#11328)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.3 → v0.3.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.3...v0.3.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-25 20:21:21 +01:00
Maxim Smolskiy
102e9a31b6
Enable ruff DTZ001 rule (#11326)
* updating DIRECTORY.md

* Enable ruff DTZ001 rule

* Fix other/gauss_easter.py

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
2024-03-25 08:43:24 +01:00
Mehdi Oudghiri
481c071e84
add vicsek to fractals (#11306)
Co-authored-by: BastosLaG <bastien.capiaux@gmail.com>
2024-03-20 15:07:55 +01:00
Maxim Smolskiy
a936e94704
Enable ruff ARG001 rule (#11321)
* Enable ruff ARG001 rule

* Fix dynamic_programming/combination_sum_iv.py

* Fix machine_learning/frequent_pattern_growth.py

* Fix other/davis_putnam_logemann_loveland.py

* Fix other/password.py

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix physics/n_body_simulation.py

* Fix project_euler/problem_145/sol1.py

* Fix project_euler/problem_174/sol1.py

* Fix scheduling/highest_response_ratio_next.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* Fix

* Fix scheduling/job_sequencing_with_deadline.py

* Fix scheduling/job_sequencing_with_deadline.py

* Fix

* Fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-20 15:00:17 +01:00
Margaret
8faf823e83
adding a proper fractions algorithm (#11224)
* adding a proper fractions algorithm

* Implementing suggestions in maths/numerical_analysis/proper_fractions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Implementing suggestions to proper_fractions.py

* Fixing ruff errors in proper_fractions.py

* Apply suggestions from code review

* ruff check --output-format=github .

* Update maths/numerical_analysis/proper_fractions.py

* Update proper_fractions.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-20 14:33:40 +01:00
pre-commit-ci[bot]
435309a61a
[pre-commit.ci] pre-commit autoupdate (#11325)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.2 → v0.3.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.2...v0.3.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-18 20:46:32 +01:00
pre-commit-ci[bot]
bc8df6de31
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [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>
2024-03-13 07:52:41 +01:00
guangwu
5f95d6f805
fix: function name typo (#11319)
* fix: function name typo

Signed-off-by: guoguangwu <guoguangwug@gmail.com>

* lfu_cache.py: Use f-strings

* rsa_cipher.py: Use f-strings

---------

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-03-12 09:40:32 +01:00
Maxim Smolskiy
fd27953d44
Reenable files when TensorFlow supports the current Python (#11318)
* Remove python_version < '3.12' for tensorflow

* Reenable dynamic_programming/k_means_clustering_tensorflow.py

* updating DIRECTORY.md

* Try to fix ruff

* Try to fix ruff

* Try to fix ruff

* Try to fix ruff

* Try to fix ruff

* Reenable machine_learning/lstm/lstm_prediction.py

* updating DIRECTORY.md

* Try to fix ruff

* Reenable computer_vision/cnn_classification.py

* updating DIRECTORY.md

* Reenable neural_network/input_data.py

* updating DIRECTORY.md

* Try to fix ruff

* Try to fix ruff

* Try to fix mypy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Try to fix ruff

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-12 09:35:49 +01:00
pre-commit-ci[bot]
c6ca1942e1
[pre-commit.ci] pre-commit autoupdate (#11296)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.1 → v0.2.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.1...v0.2.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-19 23:00:06 +01:00
pre-commit-ci[bot]
5d6846b2bd
[pre-commit.ci] pre-commit autoupdate (#11292)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.2.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.2.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-12 21:53:20 +01:00
pre-commit-ci[bot]
ed8d9209da
[pre-commit.ci] pre-commit autoupdate (#11275)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.14...v0.2.0)

* Upgrade pyproject.toml

* Revert sudoku_solver.py RUF017 Avoid quadratic list summation

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-02-05 20:48:10 +01:00
Anthony Klarman
4128f19170
Fixed lines that needed to be uncommented after Hacktoberfest (#11267)
* uncommented lines

* uncommented lines

* Update CODEOWNERS

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-02-02 09:22:58 +01:00
dependabot[bot]
6a169740e8
Bump actions/cache from 3 to 4 (#11265)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 08:11:41 +01:00
Christian Clauss
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
AtomicVar
c1d29ba459
Add smooth l1 loss algorithm (#11239) 2024-01-30 09:18:56 +01:00
pre-commit-ci[bot]
c0e700c91c
[pre-commit.ci] pre-commit autoupdate (#11261)
updates:
- [github.com/abravalheri/validate-pyproject: v0.15 → v0.16](https://github.com/abravalheri/validate-pyproject/compare/v0.15...v0.16)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-29 21:00:37 +01:00
Geoffrey Logovi
b092d7755c
fixes #11256 : computer vision link update in .computer_vision/README.md (#11257) 2024-01-24 07:15:39 +01:00
pre-commit-ci[bot]
b01571dc4f
[pre-commit.ci] pre-commit autoupdate (#11255)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.13 → v0.1.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.13...v0.1.14)
- [github.com/tox-dev/pyproject-fmt: 1.6.0 → 1.7.0](https://github.com/tox-dev/pyproject-fmt/compare/1.6.0...1.7.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-22 19:20:43 +01:00
AtomicVar
3952ba703a
Add categorical focal cross-entropy loss algorithm (#11248) 2024-01-18 13:41:29 +01:00
Suyash Dongre
05a5cdacc3
Added doctest to skew_heap.py (#11147)
* Added doctest to skew_heap.py

* Update skew_heap.py

* Update data_structures/heap/skew_heap.py

Co-authored-by: Saptadeep Banerjee  <69459134+imSanko@users.noreply.github.com>

* Update skew_heap.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update skew_heap.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Saptadeep Banerjee <69459134+imSanko@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-18 13:39:27 +01:00
Ataf Fazledin Ahamed
0101dd42dc
Fixed Inappropriate Logical Expression (#11203)
Signed-off-by: fazledyn-or <ataf@openrefactory.com>
2024-01-16 09:43:33 +01:00
AtomicVar
4b6f688344
Use compiled black as the pre-commit formatter (#11247)
* Use compiled black as the pre-commit formatter

* ruff-format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Keep GitHub Actions up to date with Dependabot

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-16 09:39:54 +01:00