Commit Graph

2912 Commits

Author SHA1 Message Date
Juyoung Kim
a17791d022
fix: graphs/greedy_best_first typo (#8766)
#8764
2023-05-25 14:54:18 +02:00
Caeden Perelli-Harris
cfbbfd9896
Merge and add benchmarks to palindrome algorithms in the strings/ directory (#8749)
* refactor: Merge and add benchmarks to palindrome

* updating DIRECTORY.md

* chore: Fix failing tests

* Update strings/palindrome.py

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

* Update palindrome.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-05-25 12:56:23 +02:00
Ratnesh Kumar
a6631487b0
Fix CI badge in the README.md (#8137) 2023-05-25 12:34:11 +02:00
Chris O
200429fc47
Dual Number Automatic Differentiation (#8760)
* Added dual_number_automatic_differentiation.py

* updating DIRECTORY.md

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

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

* Update maths/dual_number_automatic_differentiation.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>
2023-05-25 08:04:42 +02:00
Caeden Perelli-Harris
df88771905
Mark fetch anime and play as broken (#8763)
* updating DIRECTORY.md

* updating DIRECTORY.md

* fix: Correct ruff errors

* fix: Mark anime algorithm as broken

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-25 07:59:15 +02:00
pre-commit-ci[bot]
ce43a8ac4a
[pre-commit.ci] pre-commit autoupdate (#8759)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.267 → v0.0.269](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.267...v0.0.269)
- [github.com/abravalheri/validate-pyproject: v0.12.2 → v0.13](https://github.com/abravalheri/validate-pyproject/compare/v0.12.2...v0.13)

* 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-05-23 05:54:30 +02:00
Daniel Luo
edc17b60e0
add __main__ around print (#8747) 2023-05-19 12:40:52 +12:00
Rohan Saraogi
cf5e34d479
Added is_palindrome.py (#8748) 2023-05-19 11:48:22 +12:00
Caeden Perelli-Harris
9b3e4028c6
Fixes broken "Create guess_the_number_search.py" (#8746) 2023-05-17 18:47:23 +12:00
Harkishan Khuva
a2783c6597
Create guess_the_number_search.py (#7937) 2023-05-17 12:22:24 +12:00
Alexander Pantyukhin
61cfb43d2b
Add h index (#8036) 2023-05-17 12:21:16 +12:00
Rohan Saraogi
3dc143f721
Added odd_sieve.py (#8740) 2023-05-17 12:08:56 +12:00
Tianyi Zheng
8102424950
local_weighted_learning.py: fix mypy errors and more (#8073) 2023-05-17 12:05:55 +12:00
Maxim Smolskiy
c0892a0651
Reduce the complexity of genetic_algorithm/basic_string.py (#8606) 2023-05-16 09:47:50 +12:00
pre-commit-ci[bot]
2a57dafce0
[pre-commit.ci] pre-commit autoupdate (#8716)
updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.263 → v0.0.267](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.263...v0.0.267)
- [github.com/tox-dev/pyproject-fmt: 0.11.1 → 0.11.2](https://github.com/tox-dev/pyproject-fmt/compare/0.11.1...0.11.2)
- [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-15 22:27:59 +01:00
Caeden Perelli-Harris
1faf10b5c2
Correct ruff failures (#8732)
* fix: Correct ruff problems

* updating DIRECTORY.md

* fix: Fix pre-commit errors

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-14 22:03:13 +01:00
Pronoy Mandal
793e564e1d
Create maximum_subsequence.py (#7811) 2023-05-11 07:00:59 +12:00
Margaret
6939538a41
adding the remove digit algorithm (#6708) 2023-05-11 06:55:48 +12:00
Margaret
997d56fb63
Switch case (#7995) 2023-05-11 06:53:47 +12:00
shricubed
44aa17fb86
Working binary insertion sort in Python (#8024) 2023-05-11 06:50:32 +12:00
Rohan Anand
209a59ee56
Update and_gate.py (#8690)
* Update and_gate.py

addressing issue #8656 by calling `test_and_gate()` , ensuring that all the assertions are verified before the actual output is printed.

* Update and_gate.py

addressing issue #8632
2023-05-10 21:38:52 +12:00
Pronoy Mandal
91cc3a240f
Update game_of_life.py (#8703)
Rectify spelling in docstring
2023-05-10 21:34:36 +12:00
Dipankar Mitra
7310514509
The ELU activation is added (#8699)
* tanh function been added

* tanh function been added

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

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

* tanh function is added

* tanh function is added

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

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

* tanh function added

* tanh function added

* tanh function is added

* Apply suggestions from code review

* ELU activation function is added

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

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

* elu activation is added

* ELU activation is added

* Update maths/elu_activation.py

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

* Exponential_linear_unit activation is added

* Exponential_linear_unit activation is added

---------

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-05-02 16:36:28 +02:00
pre-commit-ci[bot]
777f966893
[pre-commit.ci] pre-commit autoupdate (#8704)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.262 → v0.0.263](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.262...v0.0.263)
- [github.com/tox-dev/pyproject-fmt: 0.10.0 → 0.11.1](https://github.com/tox-dev/pyproject-fmt/compare/0.10.0...0.11.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-05-01 23:48:56 +02:00
Himanshu Tomar
e966c5cc0f
Added minimum waiting time problem solution using greedy algorithm (#8701)
* Added minimum waiting time problem solution using greedy algorithm

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

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

* ruff --fix

* Add type hints

* Added two more doc test

* Removed unnecessary comments

* updated type hints

* Updated the code as per the code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-01 12:23:03 +02:00
Christian Clauss
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
Sahil Goel
c4dcc44dd4
Added an algorithm to calculate the present value of cash flows (#8700)
* Added an algorithm to calculate the present value of cash flows

* added doctest and reference

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

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

* Resolving deprecation issues with typing module

* Fixing argument type checks and adding doctest case

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

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

* Fixing failing doctest case by requiring less precision due to floating point inprecision

* Updating return type

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

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

* Added test cases for more coverage

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

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

* Make improvements based on Rohan's suggestions

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

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

* Update financial/present_value.py

Committed first suggestion

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

* Update financial/present_value.py

Committed second suggestion

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

* Update financial/present_value.py

Committed third suggestion

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

---------

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-04-30 19:33:22 +02:00
Christian Clauss
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
Dipankar Mitra
c1b3ea5355
The tanh activation function is added (#8689)
* tanh function been added

* tanh function been added

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

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

* tanh function is added

* tanh function is added

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

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

* tanh function added

* tanh function added

* tanh function is added

* Apply suggestions from code review

---------

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-04-25 18:06:14 +02:00
pre-commit-ci[bot]
a650426350
[pre-commit.ci] pre-commit autoupdate (#8691)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.261 → v0.0.262](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.261...v0.0.262)
- [github.com/tox-dev/pyproject-fmt: 0.9.2 → 0.10.0](https://github.com/tox-dev/pyproject-fmt/compare/0.9.2...0.10.0)

* 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-04-25 06:05:45 +02:00
Rohan Anand
bf30b18192
Update linear_discriminant_analysis.py and rsa_cipher.py (#8680)
* Update rsa_cipher.py by replacing %s with {}

* Update rsa_cipher.py

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

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

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update machine_learning/linear_discriminant_analysis.py

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

* Update linear_discriminant_analysis.py

* updated

---------

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-04-24 07:28:30 +02:00
JulianStiebler
11582943a5
Create maths/pi_generator.py (#8666)
* Create pi_generator.py

* Update pi_generator.py

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

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

* Update pi_generator.py

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

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

* Update pi_generator.py

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

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

* Update pi_generator.py

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

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

* Update pi_generator.py

* Update pi_generator.py

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

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

* Updated commentary on line 28, added math.pi comparison & math.isclose() test

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

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

* Removed  # noqa: E501

* printf() added as recommended by cclaus

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-18 11:57:48 +02:00
Rohan Anand
458debc237
added a problem with solution on sliding window. (#8566)
* added a problem with solution on sliding window.

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

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

* added hint for return type and parameter

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

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

* Update minimum_size_subarray_sum.py

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

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

* Update minimum_size_subarray_sum.py

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

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

* Update minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.py

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

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

* Update minimum_size_subarray_sum.py

* removed un-necessary docs and added 2 test cases

* Rename sliding_window/minimum_size_subarray_sum.py to dynamic_programming/minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.py

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

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

* Update minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.py

* Update dynamic_programming/minimum_size_subarray_sum.py

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

* Update dynamic_programming/minimum_size_subarray_sum.py

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

* Update dynamic_programming/minimum_size_subarray_sum.py

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

* Update dynamic_programming/minimum_size_subarray_sum.py

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

* Update dynamic_programming/minimum_size_subarray_sum.py

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

* Update dynamic_programming/minimum_size_subarray_sum.py

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

* Update dynamic_programming/minimum_size_subarray_sum.py

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

* Update minimum_size_subarray_sum.py

* [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

* Update minimum_size_subarray_sum.py

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

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

* Update minimum_size_subarray_sum.py

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

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

* Update minimum_size_subarray_sum.py

* Update minimum_size_subarray_sum.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>
2023-04-18 10:02:20 +02:00
Rohan Anand
93ce8cb75d
added reference link. (#8667)
* added reference link.

* [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-04-18 09:44:06 +02:00
Rohan Anand
b5047cfa11
Create apparent_power.py (#8664)
* Create apparent_power.py

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

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

* Update apparent_power.py

* Update apparent_power.py

* Update apparent_power.py

* Update electronics/apparent_power.py

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

* Update electronics/apparent_power.py

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

* Update apparent_power.py

* Update electronics/apparent_power.py

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

* Update apparent_power.py

* Update apparent_power.py

* Update apparent_power.py

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

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

* Update apparent_power.py

* Update apparent_power.py

* Update apparent_power.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>
2023-04-18 09:30:01 +02:00
Rohan Anand
2b051a2de4
Create real_and_reactive_power.py (#8665) 2023-04-18 10:17:48 +12:00
Diego Gasco
54dedf844a
Dimensionality reduction (#8590) 2023-04-17 10:34:22 +12:00
pre-commit-ci[bot]
d182f95646
[pre-commit.ci] pre-commit autoupdate (#8634)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.260 → v0.0.261](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.260...v0.0.261)
- [github.com/pre-commit/mirrors-mypy: v1.1.1 → v1.2.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.1.1...v1.2.0)

* 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-04-10 23:43:17 +02:00
isidroas
14bdd174bb
Bloom Filter (#8615)
* Bloom filter with tests

* has functions constant

* fix type

* isort

* passing ruff

* type hints

* type hints

* from fail to erro

* captital leter

* type hints requested by boot

* descriptive name for m

* more descriptibe arguments II

* moved movies_test to doctest

* commented doctest

* removed test_probability

* estimated error

* added types

* again hash_

* Update data_structures/hashing/bloom_filter.py

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

* from b to bloom

* Update data_structures/hashing/bloom_filter.py

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

* Update data_structures/hashing/bloom_filter.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

* syntax error in dict comprehension

* from goodfather to godfather

* removed Interestellar

* forgot the last Godfather

* Revert "removed Interestellar"

This reverts commit 35fa5f5c4b.

* pretty dict

* Apply suggestions from code review

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

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

* Update bloom_filter.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>
2023-04-08 19:39:24 +02:00
Christian Clauss
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
amirsoroush
5cb0a000c4
Queue implementation using two Stacks (#8617)
* Queue implementation using two Stacks

* fix typo in queue/queue_on_two_stacks.py

* add 'iterable' to queue_on_two_stacks initializer

* make queue_on_two_stacks.py generic class

* fix ruff-UP007 in queue_on_two_stacks.py

* enhance readability in queue_on_two_stacks.py

* Create queue_by_two_stacks.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-04-08 13:41:08 +02:00
Christian Clauss
179298e3a2
Revert "Add LeNet Implementation in PyTorch (#7070)" (#8621)
This reverts commit b2b8585e63.
2023-04-08 06:22:26 +05:30
Ishan Dutta
b2b8585e63
Add LeNet Implementation in PyTorch (#7070)
* add torch to requirements

* add lenet architecture in pytorch

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

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

* add type hints

* remove file

* add type hints

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

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

* update variable name

* add fail test

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

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

* add newline

* reformatting

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-07 17:51:25 +02:00
pre-commit-ci[bot]
740ecfb121
[pre-commit.ci] pre-commit autoupdate (#8611)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.259 → v0.0.260](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.259...v0.0.260)
- [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0)
- [github.com/abravalheri/validate-pyproject: v0.12.1 → v0.12.2](https://github.com/abravalheri/validate-pyproject/compare/v0.12.1...v0.12.2)
---------

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-04-04 07:00:31 +05:30
Ishab
ebc2d5d79f
Add Project Euler problem 79 solution 1 (#8607)
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2023-04-02 17:34:11 +05:30
Christian Clauss
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
Tianyi Zheng
33114f0272
Revamp md5.py (#8065)
* Add type hints to md5.py

* Rename some vars to snake case

* Specify functions imported from math

* Rename vars and functions to be more descriptive

* Make tests from test function into doctests

* Clarify more var names

* Refactor some MD5 code into preprocess function

* Simplify loop indices in get_block_words

* Add more detailed comments, docs, and doctests

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* Add type hints to md5.py

* Rename some vars to snake case

* Specify functions imported from math

* Rename vars and functions to be more descriptive

* Make tests from test function into doctests

* Clarify more var names

* Refactor some MD5 code into preprocess function

* Simplify loop indices in get_block_words

* Add more detailed comments, docs, and doctests

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* Convert str types to bytes

* Add tests comparing md5_me to hashlib's md5

* Replace line-break backslashes with parentheses

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-04-01 22:05:01 +02:00
Maxim Smolskiy
56a40eb3ee
Reenable files when TensorFlow supports the current Python (#8602)
* Remove python_version < "3.11" for tensorflow

* Reenable neural_network/input_data.py_tf

* updating DIRECTORY.md

* [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

* Try to fix ruff

* Try to fix ruff

* Try to fix ruff

* Try to fix pre-commit

* Try to fix

* Fix

* Fix

* Reenable dynamic_programming/k_means_clustering_tensorflow.py_tf

* updating DIRECTORY.md

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

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

* Try to fix ruff

---------

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>
2023-04-01 19:43:11 +02:00
Blake Reimer
84b6852de8
Graham's Law (#8162)
* grahams law

* doctest and type hints

* doctest formatting

* peer review updates
2023-04-01 18:43:07 +02:00
Tianyi Zheng
a213cea5f5
Fix mypy errors in dilation_operation.py (#8595)
* updating DIRECTORY.md

* Fix mypy errors in dilation_operation.py

* Rename functions to use snake case

* updating DIRECTORY.md

* updating DIRECTORY.md

* Replace raw file string with pathlib Path

* Update digital_image_processing/morphological_operations/dilation_operation.py

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

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-04-01 18:39:22 +02:00