From 4d3970ee6b3987ff623fca32c74dd88ba6c798d5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 19:35:06 +0000 Subject: [PATCH 1/7] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.0.0 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v3.0.0...v3.1.0) - [github.com/codespell-project/codespell: v2.2.1 → v2.2.2](https://github.com/codespell-project/codespell/compare/v2.2.1...v2.2.2) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aea82d12cd13..da7547b8a9cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - --profile=black - repo: https://github.com/asottile/pyupgrade - rev: v3.0.0 + rev: v3.1.0 hooks: - id: pyupgrade args: @@ -55,7 +55,7 @@ repos: additional_dependencies: [types-requests] - repo: https://github.com/codespell-project/codespell - rev: v2.2.1 + rev: v2.2.2 hooks: - id: codespell args: From 513db55da9f16a836446ba99d94dd5e96a8a1379 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Mon, 17 Oct 2022 19:35:21 +0000 Subject: [PATCH 2/7] updating DIRECTORY.md --- DIRECTORY.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DIRECTORY.md b/DIRECTORY.md index fae9a5183f04..94ec42832e41 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -642,6 +642,7 @@ * [Tower Of Hanoi](other/tower_of_hanoi.py) ## Physics + * [Casimir Effect](physics/casimir_effect.py) * [Horizontal Projectile Motion](physics/horizontal_projectile_motion.py) * [Lorentz Transformation Four Vector](physics/lorentz_transformation_four_vector.py) * [N Body Simulation](physics/n_body_simulation.py) @@ -928,6 +929,7 @@ * [Deutsch Jozsa](quantum/deutsch_jozsa.py) * [Half Adder](quantum/half_adder.py) * [Not Gate](quantum/not_gate.py) + * [Q Full Adder](quantum/q_full_adder.py) * [Quantum Entanglement](quantum/quantum_entanglement.py) * [Ripple Adder Classic](quantum/ripple_adder_classic.py) * [Single Qubit Measure](quantum/single_qubit_measure.py) From 4d65394bae2f5a175a7a7821e588c425702eca25 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 17 Oct 2022 21:38:58 +0200 Subject: [PATCH 3/7] Fix typo discovered by codespell --- maths/is_square_free.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maths/is_square_free.py b/maths/is_square_free.py index 8d83d95ffb67..4134398d258b 100644 --- a/maths/is_square_free.py +++ b/maths/is_square_free.py @@ -15,7 +15,7 @@ def is_square_free(factors: list[int]) -> bool: False These are wrong but should return some value - it simply checks for repition in the numbers. + it simply checks for repetition in the numbers. >>> is_square_free([1, 3, 4, 'sd', 0.0]) True From e9ffdbc749d44b9f0afd29c0ea6a1d6d76f7333f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 17 Oct 2022 21:40:41 +0200 Subject: [PATCH 4/7] Fix typo discovered by codespell --- .../local_weighted_learning/local_weighted_learning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/local_weighted_learning/local_weighted_learning.md b/machine_learning/local_weighted_learning/local_weighted_learning.md index 5c7895e75104..ef4dbc958600 100644 --- a/machine_learning/local_weighted_learning/local_weighted_learning.md +++ b/machine_learning/local_weighted_learning/local_weighted_learning.md @@ -29,7 +29,7 @@ This training phase is possible when data points are linear, but there again com So, here comes the role of non-parametric algorithm which doesn't compute predictions based on fixed set of params. Rather parameters $\theta$ are computed individually for each query point/data point x.

-While Computing $\theta$ , a higher "preferance" is given to points in the vicinity of x than points farther from x. +While Computing $\theta$ , a higher preference is given to points in the vicinity of x than points farther from x. Cost Function J($\theta$) = $\sum_{i=1}^m$ $w^i$ (($\theta$)$^T$ $x^i$ - $y^i$)$^2$ From 9893c455e15238dada7b800506300077cff64d8c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 17 Oct 2022 21:42:49 +0200 Subject: [PATCH 5/7] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da7547b8a9cc..1b62c867c4ef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,7 +60,7 @@ repos: - id: codespell args: - --ignore-words-list=ans,crate,damon,fo,followings,hist,iff,mater,secant,som,sur,tim,zar - - --skip="./.*,./strings/dictionary.txt,./strings/words.txt,./project_euler/problem_022/p022_names.txt" + - --skip="./.*,*.txt" exclude: | (?x)^( strings/dictionary.txt | From a96fbb4b7bb1fc9c7a66d90f920c25f72e99fe69 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 17 Oct 2022 21:50:10 +0200 Subject: [PATCH 6/7] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b62c867c4ef..03845a180b7f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,7 +60,7 @@ repos: - id: codespell args: - --ignore-words-list=ans,crate,damon,fo,followings,hist,iff,mater,secant,som,sur,tim,zar - - --skip="./.*,*.txt" + - --skip="./.*,./ciphers/prehistoric_men.txt,./strings/dictionary.txt,./strings/words.txt,./project_euler/problem_022/p022_names.txt" exclude: | (?x)^( strings/dictionary.txt | From ea63c7874595e60742a832f5c7b9aa50080d2e32 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 17 Oct 2022 21:56:02 +0200 Subject: [PATCH 7/7] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03845a180b7f..5bdda50be0c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,9 +60,9 @@ repos: - id: codespell args: - --ignore-words-list=ans,crate,damon,fo,followings,hist,iff,mater,secant,som,sur,tim,zar - - --skip="./.*,./ciphers/prehistoric_men.txt,./strings/dictionary.txt,./strings/words.txt,./project_euler/problem_022/p022_names.txt" exclude: | (?x)^( + ciphers/prehistoric_men.txt | strings/dictionary.txt | strings/words.txt | project_euler/problem_022/p022_names.txt