[pull] master from TheAlgorithms:master - #12
Open
pull[bot] wants to merge 2072 commits into
Open
Conversation
Enable `uv run scripts/validate_solutions.py` or `pipx run scripts/validate_solutions.py` * https://peps.python.org/pep-0723 * https://docs.astral.sh/uv/guides/scripts/#declaring-script-dependencies
updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.9](astral-sh/ruff-pre-commit@v0.11.8...v0.11.9) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added iterative solution for power calculation * Added iterative solution for power calculation * Added iterative solution for power calculation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added iterative solution for power calculation fixes #12709 * Added iterative solution for power calculation FIXES NUMBER 12709 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Escape velocity is the minimum speed an object must have to break free from a celestial body's gravitational pull without further propulsion. Takes input as the Mass of the Celestial body (M) and Radius fron the center of mass (M) * Fix: added header comment to escape_velocity.py * Trigger re-PR with a minor change * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix: resolve Ruff linter errors and add Wikipedia reference * Add: work done calculation for orbital transfer between orbits * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update escape_velocity.py * Delete maths/power_using_iteration.py * Update and rename workdone.py to orbital_transfer_work.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>
* Replace dependency `requests` with `httpx` Fixes #12742 Signed-off-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com> * updating DIRECTORY.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com> Co-authored-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add median() function using Quickselect * Update quick_select.py * Update quick_select.py * Update quick_select.py --------- Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Add bidirectional search algorithm implementation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix style and linting issues in bidirectional search * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add doctest for main function * Add doctest for main function * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed deprications * fixed deprications * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed unused import * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update bidirectional_search.py * Update bidirectional_search.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update bidirectional_search.py * [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> Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Mutable _Item * document falsy item * resize_down: expected test result * resize_down: actual result This is a problem since it causes rapid cycling * improve comment about falsy item Co-authored-by: Andrey <Cjkjvfnby@gmail.com> * fix long line * Update hash_map.py * Update hash_map.py --------- Co-authored-by: Andrey <Cjkjvfnby@gmail.com> Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Add tests and cleanup sum_of_subsets algorithm. * Update sum_of_subsets.py * Update sum_of_subsets.py * Update sum_of_subsets.py * Update sum_of_subsets.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.9 → v0.11.11](astral-sh/ruff-pre-commit@v0.11.9...v0.11.11) - [github.com/tox-dev/pyproject-fmt: v2.5.1 → v2.6.0](tox-dev/pyproject-fmt@v2.5.1...v2.6.0) * updating DIRECTORY.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
* maths/radix2_fft.py: Fix calculation for Python 3.14 As suggested at: * #12729 (comment) * #12710 (comment) @MaximSmolskiy @KirilBangachev @skirpichev Careful review, please. I am just implementing the suggestion, but I do not have any expertise in this area. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Change test results * GitHub Actions: Rename job from build to directory_writer It is confusing to have two jobs named `build`. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jeonghyun Min <20122791@tafe.wa.edu.au>
* Add doctests for the boyer_moore_search algorithm. * Update boyer_moore_search.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update boyer_moore_search.py * Update boyer_moore_search.py --------- Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add unit tests for factorial.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * uvx --python=3.12 unittest2pytest --write test_factorial.py * Update error message in current_stock_price.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>
* add post-installation script * set zsh as default terminal and make post-install execution on postcreate * rename file * rename script * Create devcontainers_ci.yml * Update devcontainer.json * Update devcontainers_ci.yml Never push image built here. It's for build testing purpose only. * postCreateCommand update to reflect that the shell script has been renamed. * update devcontainer readme file * trigger workflow only on devcontainer/** changes * prettier refactor
#12841) * Update .pre-commit-config.yaml to reflect current linting and formatting setup - Replaced outdated references to `black` with the actual tools used in the repo: `ruff` and `ruff-format`. - Ensured all configured hooks are up to date and relevant to Python development. - This aligns the linting and formatting setup with the project's actual pre-commit pipeline. - Improves consistency for contributors by preventing confusion between formatting tools. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * We use httpx, not requests * response = httpx.get(request_url, timeout=10).raise_for_status() --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.11 → v0.12.2](astral-sh/ruff-pre-commit@v0.11.11...v0.12.2) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.1](pre-commit/mirrors-mypy@v1.15.0...v1.16.1) * Update .pre-commit-config.yaml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.3 → v0.12.4](astral-sh/ruff-pre-commit@v0.12.3...v0.12.4) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.0](pre-commit/mirrors-mypy@v1.15.0...v1.17.0) * Apply suggestion from @cclauss --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.4 → v0.12.5](astral-sh/ruff-pre-commit@v0.12.4...v0.12.5) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.0](pre-commit/mirrors-mypy@v1.15.0...v1.17.0) * Apply suggestion from @cclauss * --ignore=web_programming/current_stock_price.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>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.12.5 → v0.12.8](astral-sh/ruff-pre-commit@v0.12.5...v0.12.8) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.1](pre-commit/mirrors-mypy@v1.15.0...v1.17.1) * Apply suggestion from @cclauss --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' 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>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.8 → v0.12.9](astral-sh/ruff-pre-commit@v0.12.8...v0.12.9) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.1](pre-commit/mirrors-mypy@v1.15.0...v1.17.1) * Apply suggestion from @cclauss --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](actions/upload-pages-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-version: '4' 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>
* Simplify the capitalize function using ASCII arithmetic to make the algorithm five times faster. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update capitalize.py * Update capitalize.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Fix #12840 code style * Update README.md --------- Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
…15225) * ci: daily Hacktoberfest 2026 prep tracker refresh (cron 11:50 UTC) Adds .github/workflows/hacktoberfest_prep.yml (schedule: 50 11 * * *) and scripts/hacktoberfest_prep_update.py. Each run: - ticks tracked PR rows in docs/hacktober_2026_prep.md that are now merged/closed (`[ ]` -> `[x]`), - rewrites an 'Automated statistics' section with the current open issue and open PR counts plus the top three directories with the most open 'awaiting reviews' PRs, - exits non-zero once Hacktoberfest 2026 has begun (>= 2026-10-01), so the prep window closing is loud and the job gets retired. Standard library only; uses the Actions GITHUB_TOKEN. Refs #15081. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * style: wrap implicit string concatenations (ISC004) * refactor: use httpx2 for API calls, drop unneeded future import Address review feedback on the Hacktoberfest prep cron: - Switch the tracker script from urllib to httpx2, the repo's standard HTTP client, and add an install step to the workflow. - Drop 'from __future__ import annotations' (unnecessary on Python >= 3.14t). --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…er (#15226) The daily prep job spent ~16 minutes because it looked up the changed files of every open 'awaiting reviews' PR one request at a time. Those lookups are independent, so fire them concurrently through a single httpx2.AsyncClient bounded by a small semaphore, and likewise resolve the tracked-row PR states and the issue/PR counts concurrently. Report progress to stderr (flushed) so a human watching the Actions log can see the job is alive. Runtime drops from ~16 min of serial round-trips to well under a minute.
* ci: dry-run hacktoberfest prep on push/PR, add path filters
* ci: use double quotes in path filters (prettier)
* fix: resolve tracker rows via /issues so issue rows don't 404
The tracker's 'Open issues' section lists issue numbers; querying them
against /pulls/{n} returns 404 and crashed the whole refresh. Query the
unified /issues/{n} endpoint instead, which resolves for both PRs and
issues; a row is 'merged' only when it's a PR with merged_at set.
Signed-off-by: hariomloharapps <hariomlohar.new@gmail.com>
* Fix sumset docstring * Add empty set test for sumset --------- Co-authored-by: Christian Clauss <cclauss@me.com>
* Update softmax.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update softmax.py * [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>
* maths: add weighted_average function * style: fix blank line after imports * maths: simplify empty input check in weighted_average * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Delete maths/average_weighted.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>
* Added Derangement calculator * Updated derangement.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated derangement.py * updating DIRECTORY.md * Apply suggestion from @cclauss --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added function that calculates Pell numbers * Fixed ruff error * Renamed input argument to be more descriptive * updating DIRECTORY.md --------- Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* added convolution * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed ruff issues * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing ruff errors * addressing automated concerns * addressing automated concerns * addressing automated concerns * addressing automated concerns * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * addressing automated concerns * updating DIRECTORY.md * Apply suggestion from @cclauss --------- Co-authored-by: AlexB <acbucha@clemson.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* weddle's integration rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * checks passed * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added return type hint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added type hints to function parameters and return types * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added descriptive names * safe eval used * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * changed parameter hint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updated function signatures, type hints, and docstrings; modified function implementations and variable names. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * changes made in doctest * updating DIRECTORY.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Add files via upload An algorithm to find intersection between 2 lines. * Added doctest to function * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed ruff issues * updating DIRECTORY.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
…raging (#11834) * feat: add Matrix Exponentiation method docs: updated the header documentation and added new documentation for the new function. * feat: added new function matrix exponetiation method * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: This function uses the tail-recursive form of the Euclidean algorithm to calculate * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * reduced the number of characters per line in the comments * removed unwanted code * feat: Implemented a new function to swaap numbers without dummy variable * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed previos code * Done with the required changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Done with the required changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Done with the required changes * Done with the required changes * Done with the required changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update maths/fibonacci.py Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Done with the required changes * Done with the required changes * Done with the required changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat(timing): enhance timing function with adaptive units and run averaging * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat(timing): enhance timing function with adaptive units and run averaging --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* Add cholesky_decomposition * Simplify equations, rename variables * Enforce symmetry on A * Fix typo * Rename variables * Rename variables * updating DIRECTORY.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added Trailing Zero Algo Created an algorithm that return the trailing zeroes of a number * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updating DIRECTORY.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Add doctests for sum_of_arithmetic_series function * [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> Co-authored-by: Christian Clauss <cclauss@me.com>
* Create logarithmic_series.py This is an implementation of logarithmic series in Python. Reference: https://math.stackexchange.com/questions/3973429/what-is-a-logarithmic-series * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update logarithmic_series.py Fixed long line issue * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update logarithmic_series.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updating DIRECTORY.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Add improved doctrings and doctests for math/perfect_number.py * [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> Co-authored-by: Christian Clauss <cclauss@me.com>
* Add Tonelli-Shanks modular square root algorithm. Implements Legendre symbol checks and both the p≡3 (mod 4) fast path and the full Tonelli-Shanks procedure, with doctests for success and error cases. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix ruff EM102 by assigning exception messages before raise. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Algorithm to get maximum path sum of a binary tree. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added "TreeNode | None" as traverse method argument type hints to accept both * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added doctest for construct_tree and type hints for TreeNode * Added type hint and doctest * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Preformatted using black * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Organized imports * updating DIRECTORY.md * Apply suggestion from @cclauss --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
…5084) * Add Fast Walsh-Hadamard Transform (FWHT) for bitwise convolutions * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * refactor: remove unnecessary whitespace in fast_walsh_hadamard_transform.py * Move fast_walsh_hadamard_transform.py to bit_manipulation --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* Add Brent's Method for root finding (numerical analysis) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix parameter names and lint issues in Brent's Method * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix import name * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Rename maths/brent_method.py to maths/numerical_analysis/brent_method.py --------- Co-authored-by: debesh <debeshmaheshwari008@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* Add Sieve of Atkin algorithm for efficient prime generation Implement the Sieve of Atkin algorithm as an alternative to the existing Sieve of Eratosthenes. This modern algorithm offers better theoretical complexity O(n / log log n) and uses quadratic forms for prime detection. Features: - Comprehensive docstring with algorithm explanation - Type hints and input validation - Extensive doctests covering edge cases - Follows repository coding conventions * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix: add missing newline at end of file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Delete pr_description.txt * Enhance documentation for Sieve of Atkin Added additional explanation about the Sieve of Atkin algorithm. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* feat: add numerical laplace transform * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update maths/laplace_transformation.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: add input validation and fix doctest precision * fix: address PR review comments Updated module docstring, added validation for non-negative s_value, and replaced arrange with linspace for clarity. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Refactor docstring and remove unnecessary blank lines Removed extra blank lines and cleaned up docstring. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Refactor error handling for s_value check * Fix indentation for s_value validation * [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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix ty invalid assignment diagnostics * updating DIRECTORY.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix unused typing import * Fix gradient accumulation type handling * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix automatic differentiation gradient dtype handling --------- Co-authored-by: kadubhumika <kadubhumika@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add docstring to prompt() * Enhance docstring for prompt function Updated prompt function docstring with examples. * Enhance prompt function with width parameter Updated prompt function to accept width parameter and modified example outputs accordingly. --------- Co-authored-by: Jarvis Jeason Jacob <jarvis@Jarviss-MacBook-Pro.local> Co-authored-by: Christian Clauss <cclauss@me.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )