Commit Graph

318 Commits

Author SHA1 Message Date
Christian Clauss
7acf4bf73b
Rename binary_tree_traversals.md to README.md (#10599) 2023-10-16 10:16:09 -04:00
Pooja Sharma
e6aae1cf66
Dynamic programming/matrix chain multiplication (#10562)
* updating DIRECTORY.md

* spell changes

* updating DIRECTORY.md

* real world applications

* updating DIRECTORY.md

* Update matrix_chain_multiplication.py

Add a non-dp solution with benchmarks.

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

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

* Update matrix_chain_multiplication.py

* Update matrix_chain_multiplication.py

* Update matrix_chain_multiplication.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Pooja Sharma <poojasharma@MyBigMac.local>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-16 01:32:45 +02:00
Jeel Gajera
d00888de76
feat: adding Apriori Algorithm (#10491)
* feat: adding Apriori Algorithm

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

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

* fix: doctest, typo

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

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

* fix: type error, code refactore

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

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

* fix: refactore code

* fix: doctest

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

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

* fix: E501, B007

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

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

* fix: err

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

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

* fix: arg typ err

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

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

* fix: typo

* fix: typo

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

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

* Replace generate_candidates() with itertools.combinations()

* mypy

* Update apriori_algorithm.py

---------

Co-authored-by: Jeel Gajera <jeelgajera00@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>
2023-10-15 23:49:53 +02:00
Christian Clauss
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
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
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
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
Vipin Karthic
6d13603667
Fixes #9943 Added Doctests to binary_exponentiation_3.py (#10121)
* Python mirror_formulae.py is added to the repository

* Changes done after reading readme.md

* Changes for running doctest on all platforms

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

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

* Change 2 for Doctests

* Changes for doctest 2

* updating DIRECTORY.md

* Doctest whitespace error rectification to mirror_formulae.py

* updating DIRECTORY.md

* Adding Thermodynamic Work Done Formulae

* Work done on/by body in a thermodynamic setting

* updating DIRECTORY.md

* updating DIRECTORY.md

* Doctest adiition to binary_exponentiation_3.py

* Change 1

* updating DIRECTORY.md

* Rename binary_exponentiation_3.py to binary_exponentiation_2.py

* updating DIRECTORY.md

* updating DIRECTORY.md

* Formatting

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-10 01:52:37 -04:00
Anshu Sharma
66e4ea6a62
Consolidated two scripts reverse_letters.py and reverse_long_words.py into one (#10140)
* Conolidated two scripts reverse_letters.py and reverse_long_words.py into one because of similar functionality

* Added a new line to accomodate characters without going over 88 char limit

* fixed grammar to pass pre-commit

* Changed faulty test case entirely to pass pre commit

* fixed a test case which was wrong

---------

Co-authored-by: Keyboard-1 <142900182+Keyboard-1@users.noreply.github.com>
2023-10-09 09:17:22 +13:00
Tianyi Zheng
8e108ed92a
Rename maths/binary_exponentiation_3.py (#9656)
* updating DIRECTORY.md

* Rename binary_exponentiation_3.py

Rename binary_exponentiation_3.py to binary_exponentiation_2.py because
the original binary_exponentiation_2.py was renamed to
binary_multiplication.py in PR #9513

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-09 08:43:07 +13:00
Christian Clauss
d0c54acd75
Use dataclasses in singly_linked_list.py (#9886) 2023-10-06 15:31:11 +13:00
Christian Clauss
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
Vipin Karthic
0d324de7ab
Doctest Error Correction of mirror_formulae.py (#9782)
* Python mirror_formulae.py is added to the repository

* Changes done after reading readme.md

* Changes for running doctest on all platforms

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

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

* Change 2 for Doctests

* Changes for doctest 2

* updating DIRECTORY.md

* Doctest whitespace error rectification to mirror_formulae.py

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-05 09:48:15 +02:00
Vipin Karthic
935d1d3225
Added Mirror Formulae Equation (#9717)
* Python mirror_formulae.py is added to the repository

* Changes done after reading readme.md

* Changes for running doctest on all platforms

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

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

* Change 2 for Doctests

* Changes for doctest 2

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-05 07:57:55 +02:00
piyush-poddar
26d650ec28
Moved relu.py from maths/ to neural_network/activation_functions (#9753)
* Moved file relu.py from maths/ to neural_network/activation_functions

* Renamed relu.py to rectified_linear_unit.py

* Renamed relu.py to rectified_linear_unit.py in DIRECTORY.md
2023-10-04 16:28:19 -04:00
Tianyi Zheng
dfdd78135d
Fix mypy errors in circular_linked_list.py and swap_nodes.py (#9707)
* updating DIRECTORY.md

* Fix mypy errors in circular_linked_list.py

* Fix mypy errors in swap_nodes.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-04 18:05:00 +02:00
Christian Clauss
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
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
Dhruv Manilawala
24e7edbe5b
Remove myself from CODEOWNERS (#9325) 2023-10-01 23:18:16 +02:00
Christian Clauss
596d934238
Fix ruff warning (#9272) 2023-10-01 17:28:30 +05:30
Tianyi Zheng
aaf7195465
Fix mypy error in web_programming/reddit.py (#9162)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Fix mypy error in web_programming/reddit.py

web_programming/reddit.py:36: error: Missing named argument "response" for "HTTPError"  [call-arg]

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-01 16:10:33 +13:00
Caeden Perelli-Harris
dec96438be
Create word search algorithm (#8906)
* feat(other): Create word_search algorithm

* updating DIRECTORY.md

* doc(word_search): Link to wikipedia article

* Apply suggestions from code review

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update word_search.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-09-30 00:57:56 -04:00
Tianyi Zheng
f9b8759ba8
Move bitwise add (#9097)
* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* Move and rename maths/sum_of_two_positive_numbers_bitwise.py

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-09-27 15:54:40 +02:00
Tianyi Zheng
76767d2f09
Consolidate the two existing kNN implementations (#8903)
* Add type hints to k_nearest_neighbours.py

* Refactor k_nearest_neighbours.py into class

* Add documentation to k_nearest_neighbours.py

* Use heap-based priority queue for k_nearest_neighbours.py

* Delete knn_sklearn.py

* updating DIRECTORY.md

* Use optional args in k_nearest_neighbours.py for demo purposes

* Fix wrong function arg in k_nearest_neighbours.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-09-27 14:01:18 +02:00
Tianyi Zheng
fbad85d3ec
Delete empty junk file (#9062)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Delete empty junk file

* updating DIRECTORY.md

* Fix ruff errors

* Fix more ruff errors

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-09-17 00:12:31 +02:00
pre-commit-ci[bot]
1488cdea70
[pre-commit.ci] pre-commit autoupdate (#9056)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.287 → v0.0.288](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.287...v0.0.288)
- [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-09-12 01:56:50 +02:00
pre-commit-ci[bot]
421ace81ed
[pre-commit.ci] pre-commit autoupdate (#9013)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.285 → v0.0.286](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.285...v0.0.286)
- [github.com/tox-dev/pyproject-fmt: 0.13.1 → 1.1.0](https://github.com/tox-dev/pyproject-fmt/compare/0.13.1...1.1.0)

* updating DIRECTORY.md

* Fis ruff rules PIE808,PLR1714

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-08-29 15:18:10 +02:00
pre-commit-ci[bot]
c7aeaa3fd8
[pre-commit.ci] pre-commit autoupdate (#9006)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.284 → v0.0.285](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.284...v0.0.285)
- [github.com/abravalheri/validate-pyproject: v0.13 → v0.14](https://github.com/abravalheri/validate-pyproject/compare/v0.13...v0.14)
- [github.com/pre-commit/mirrors-mypy: v1.5.0 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.0...v1.5.1)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-22 07:42:14 +02:00
Caeden Perelli-Harris
04fd5c1b5e
Create langtons ant algorithm (#8967)
* updating DIRECTORY.md

* feat(cellular_automata): Langonts ant algorithm

* updating DIRECTORY.md

* Update cellular_automata/langtons_ant.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Apply suggestions from code review

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* fix(langtons-ant): Set funcanimation interval to 1

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-08-21 16:20:51 -07:00
Caeden Perelli-Harris
1210559deb
Consolidate decimal to binary iterative and recursive (#8999)
* updating DIRECTORY.md

* refactor(decimal-to-binary): Consolidate implementations

* updating DIRECTORY.md

* refactor(decimal-to-binary): Rename main and helper recursive

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-21 06:25:20 -07:00
Tianyi Zheng
5ecb6baef8
Move and reimplement convert_number_to_words.py (#8998)
* Move and reimplement convert_number_to_words.py

- Move convert_number_to_words.py from web_programming/ to conversions/
- Reimplement the algorithm from scratch because the logic was very
  opaque and too heavily nested
- Add support for the Western numbering system (both short and long)
  because the original implementation only supported the Indian
  numbering system
- Add extensive doctests and error handling

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-20 08:36:00 -04:00
Caeden Perelli-Harris
945803f65d
Unmark fetch anime and play as BROKEN and fix type errors (#8988)
* updating DIRECTORY.md

* type(fetch-anime-and-play): Fix type errors and re-enable

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-18 05:19:25 -07:00
Caeden Perelli-Harris
5f7819e1cd
Fix get top billionaires BROKEN file (#8970)
* updating DIRECTORY.md

* fix(get-top-billionaires): Handle timestamp before epoch

* updating DIRECTORY.md

* revert(pyproject): Re-implement ignore lru_cache

* fix(age): Update age to current year

* fix(doctest): Make years since dynamic

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-18 05:13:38 -07:00
Boris Galochkin
72c7b05caa
Fix sorts/bucket_sort.py implementation (#5786)
* Fix sorts/bucket_sort.py

* updating DIRECTORY.md

* Remove unused var in bucket_sort.py

* Fix list index in bucket_sort.py

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-17 18:38:19 -07:00
Caeden Perelli-Harris
fd7cc4cf8e
Rename norgate to nor_gate to keep consistency (#8968)
* refactor(boolean-algebra): Rename norgate to nor_gate

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-16 18:21:00 -07:00
Saksham1970
bfed2fb788
Added Continued fractions (#6846)
* updating DIRECTORY.md

* added continued fractions

* updating DIRECTORY.md

* Update maths/continued_fraction.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update maths/continued_fraction.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-08-16 00:24:12 -07:00
Caeden Perelli-Harris
fb1b939a89
Consolidate find_min and find_min recursive and find_max and find_max_recursive (#8960)
* updating DIRECTORY.md

* refactor(min-max): Consolidate implementations

* updating DIRECTORY.md

* refactor(min-max): Append _iterative to func name

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-14 04:17:27 -07:00
Adithya Awati
ac68dc1128
Fixed Pytest warnings for machine_learning/forecasting (#8958)
* updating DIRECTORY.md

* Fixed pyTest Warnings

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-14 01:34:16 -07:00
Caeden Perelli-Harris
4b7ecb6a81
Create is valid email address algorithm (#8907)
* feat(strings): Create is valid email address

* updating DIRECTORY.md

* feat(strings): Create is_valid_email_address algorithm

* chore(is_valid_email_address): Implement changes from code review

* Update strings/is_valid_email_address.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

* chore(is_valid_email_address): Fix ruff error

* Update strings/is_valid_email_address.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>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-14 01:28:52 -07:00
Adithya Awati
c290dd6a43
Update run.py in machine_learning/forecasting (#8957)
* Fixed reading CSV file, added type check for data_safety_checker function

* Formatted run.py

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-14 00:16:24 -07:00
Caeden Perelli-Harris
9d86d4edaa
Create wa-tor algorithm (#8899)
* feat(cellular_automata): Create wa-tor algorithm

* updating DIRECTORY.md

* chore(quality): Implement algo-keeper bot changes

* Update cellular_automata/wa_tor.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

* refactor(repr): Return repr as python object

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* refactor(display): Rename to display_visually to visualise

* refactor(wa-tor): Use double for loop

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

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

* chore(wa-tor): Implement suggestions from code review

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
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: Tianyi Zheng <tianyizheng02@gmail.com>
2023-08-13 17:58:17 -07:00
Tianyi Zheng
ae0fc85401
Fix ruff errors (#8936)
* Fix ruff errors

Renamed neural_network/input_data.py to neural_network/input_data.py_tf
because it should be left out of the directory for the following
reasons:

1. Its sole purpose is to be used by neural_network/gan.py_tf, which is
   itself left out of the directory because of issues with TensorFlow.

2. It was taken directly from TensorFlow's codebase and is actually
   already deprecated. If/when neural_network/gan.py_tf is eventually
   re-added back to the directory, its implementation should be changed
   to not use neural_network/input_data.py anyway.

* updating DIRECTORY.md

* Change input_data.py_tf file extension

Change input_data.py_tf file extension because algorithms-keeper bot is being picky about it

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-09 13:25:30 +05:30
pre-commit-ci[bot]
ac62cdb94f
[pre-commit.ci] pre-commit autoupdate (#8930)
* [pre-commit.ci] pre-commit autoupdate

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

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-07 19:52:39 -04:00
Tianyi Zheng
5cf34d901e
Ruff fixes (#8913)
* updating DIRECTORY.md

* Fix ruff error in eulerian_path_and_circuit_for_undirected_graph.py

* Fix ruff error in newtons_second_law_of_motion.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-07-31 13:53:26 -07:00
Tianyi Zheng
629eb86ce0
Fix merge conflicts to merge change from #5080 (#8911)
* Input for user choose his Collatz sequence

Now the user can tell the algorithm what number he wants to run on the Collatz Sequence.

* updating DIRECTORY.md

---------

Co-authored-by: Hugo Folloni <hugofollogua07@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-07-31 07:23:23 +02:00
Tianyi Zheng
0ef9306976
Disable quantum/quantum_random.py (attempt 2) (#8902)
* Disable quantum/quantum_random.py

Temporarily disable quantum/quantum_random.py because it produces an illegal instruction error that causes all builds to fail

* updating DIRECTORY.md

* Disable quantum/quantum_random.py attempt 2

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-07-28 22:08:40 +02:00
Alex Bernhardt
a0b642cfe5
Physics/basic orbital capture (#8857)
* Added file basic_orbital_capture

* updating DIRECTORY.md

* added second source

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

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

* fixed spelling errors

* accepted changes

* updating DIRECTORY.md

* corrected spelling error

* Added file basic_orbital_capture

* added second source

* fixed spelling errors

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

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

* applied changes

* reviewed and checked file

* added doctest

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

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

* removed redundant constnant

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

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

* added scipy imports

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

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

* added doctests to capture_radii and scipy const

* fixed conflicts

* finalizing file. Added tests

* Update physics/basic_orbital_capture.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: Christian Clauss <cclauss@me.com>
2023-07-28 20:30:05 +02:00
Tianyi Zheng
e406801f9e
Reimplement polynomial_regression.py (#8889)
* Reimplement polynomial_regression.py

Rename machine_learning/polymonial_regression.py to
machine_learning/polynomial_regression.py

Reimplement machine_learning/polynomial_regression.py using numpy
because the old original implementation was just a how-to on doing
polynomial regression using sklearn

Add detailed function documentation, doctests, and algorithm
explanation

* updating DIRECTORY.md

* Fix matrix formatting in docstrings

* Try to fix failing doctest

* Debugging failing doctest

* Fix failing doctest attempt 2

* Remove unnecessary return value descriptions in docstrings

* Readd placeholder doctest for main function

* Fix typo in algorithm description

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-07-28 20:17:46 +02:00
Tianyi Zheng
a0eec90466
Consolidate duplicate implementations of max subarray (#8849)
* Remove max subarray sum duplicate implementations

* updating DIRECTORY.md

* Rename max_sum_contiguous_subsequence.py

* Fix typo in dynamic_programming/max_subarray_sum.py

* Remove duplicate divide and conquer max subarray

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-07-11 11:44:12 +02:00
pre-commit-ci[bot]
929d3d9219
[pre-commit.ci] pre-commit autoupdate (#8842)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.274 → v0.0.275](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.274...v0.0.275)
- [github.com/tox-dev/pyproject-fmt: 0.12.0 → 0.12.1](https://github.com/tox-dev/pyproject-fmt/compare/0.12.0...0.12.1)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.3.0...v1.4.1)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-06-27 07:23:54 +02:00