Skip to content

Commit 7457c0f

Browse files
committed
Merge branch 'master' into reduce-the-complexity-of-digital_image_processing/edge_detection/canny.py
2 parents 99bd1f9 + 7c5f091 commit 7457c0f

File tree

61 files changed

+1066
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1066
-305
lines changed

.flake8

-10
This file was deleted.

.github/ISSUE_TEMPLATE/other.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Other
2+
description: Use this for any other issues. PLEASE do not create blank issues
3+
labels: ["awaiting triage"]
4+
body:
5+
- type: textarea
6+
id: issuedescription
7+
attributes:
8+
label: What would you like to share?
9+
description: Provide a clear and concise explanation of your issue.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: extrainfo
15+
attributes:
16+
label: Additional information
17+
description: Is there anything else we should know about this issue?
18+
validations:
19+
required: false

.github/stale.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pulls:
4545
closeComment: >
4646
Please reopen this pull request once you commit the changes requested
4747
or make improvements on the code. If this is not the case and you need
48-
some help, feel free to seek help from our [Gitter](https://gitter.im/TheAlgorithms)
48+
some help, feel free to seek help from our [Gitter](https://gitter.im/TheAlgorithms/community)
4949
or ping one of the reviewers. Thank you for your contributions!
5050
5151
issues:
@@ -59,5 +59,5 @@ issues:
5959
closeComment: >
6060
Please reopen this issue once you add more information and updates here.
6161
If this is not the case and you need some help, feel free to seek help
62-
from our [Gitter](https://gitter.im/TheAlgorithms) or ping one of the
62+
from our [Gitter](https://gitter.im/TheAlgorithms/community) or ping one of the
6363
reviewers. Thank you for your contributions!

.github/workflows/ruff.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://beta.ruff.rs
2+
name: ruff
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
jobs:
11+
ruff:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: pip install --user ruff
16+
- run: ruff --format=github .

.pre-commit-config.yaml

+20-60
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ repos:
33
rev: v4.4.0
44
hooks:
55
- id: check-executables-have-shebangs
6+
- id: check-toml
67
- id: check-yaml
78
- id: end-of-file-fixer
89
types: [python]
@@ -14,88 +15,47 @@ repos:
1415
hooks:
1516
- id: auto-walrus
1617

18+
- repo: https://github.com/charliermarsh/ruff-pre-commit
19+
rev: v0.0.259
20+
hooks:
21+
- id: ruff
22+
1723
- repo: https://github.com/psf/black
1824
rev: 23.1.0
1925
hooks:
2026
- id: black
2127

22-
- repo: https://github.com/PyCQA/isort
23-
rev: 5.12.0
28+
- repo: https://github.com/codespell-project/codespell
29+
rev: v2.2.4
2430
hooks:
25-
- id: isort
26-
args:
27-
- --profile=black
31+
- id: codespell
32+
additional_dependencies:
33+
- tomli
2834

2935
- repo: https://github.com/tox-dev/pyproject-fmt
3036
rev: "0.9.2"
3137
hooks:
3238
- id: pyproject-fmt
3339

40+
- repo: local
41+
hooks:
42+
- id: validate-filenames
43+
name: Validate filenames
44+
entry: ./scripts/validate_filenames.py
45+
language: script
46+
pass_filenames: false
47+
3448
- repo: https://github.com/abravalheri/validate-pyproject
3549
rev: v0.12.1
3650
hooks:
3751
- id: validate-pyproject
3852

39-
- repo: https://github.com/asottile/pyupgrade
40-
rev: v3.3.1
41-
hooks:
42-
- id: pyupgrade
43-
args:
44-
- --py311-plus
45-
46-
- repo: https://github.com/charliermarsh/ruff-pre-commit
47-
rev: v0.0.253
48-
hooks:
49-
- id: ruff
50-
args:
51-
- --ignore=E741
52-
53-
- repo: https://github.com/PyCQA/flake8
54-
rev: 6.0.0
55-
hooks:
56-
- id: flake8 # See .flake8 for args
57-
additional_dependencies: &flake8-plugins
58-
- flake8-bugbear
59-
- flake8-builtins
60-
# - flake8-broken-line
61-
- flake8-comprehensions
62-
- pep8-naming
63-
64-
- repo: https://github.com/asottile/yesqa
65-
rev: v1.4.0
66-
hooks:
67-
- id: yesqa
68-
additional_dependencies:
69-
*flake8-plugins
70-
7153
- repo: https://github.com/pre-commit/mirrors-mypy
72-
rev: v1.0.1
54+
rev: v1.1.1
7355
hooks:
7456
- id: mypy
7557
args:
7658
- --ignore-missing-imports
7759
- --install-types # See mirrors-mypy README.md
7860
- --non-interactive
7961
additional_dependencies: [types-requests]
80-
81-
- repo: https://github.com/codespell-project/codespell
82-
rev: v2.2.2
83-
hooks:
84-
- id: codespell
85-
args:
86-
- --ignore-words-list=ans,crate,damon,fo,followings,hist,iff,mater,secant,som,sur,tim,zar
87-
exclude: |
88-
(?x)^(
89-
ciphers/prehistoric_men.txt |
90-
strings/dictionary.txt |
91-
strings/words.txt |
92-
project_euler/problem_022/p022_names.txt
93-
)$
94-
95-
- repo: local
96-
hooks:
97-
- id: validate-filenames
98-
name: Validate filenames
99-
entry: ./scripts/validate_filenames.py
100-
language: script
101-
pass_filenames: false

CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Before contributing
44

5-
Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you __read the whole guidelines__. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms).
5+
Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you __read the whole guidelines__. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms/community).
66

77
## Contributing
88

@@ -81,11 +81,11 @@ We want your work to be readable by others; therefore, we encourage you to note
8181
black .
8282
```
8383

84-
- All submissions will need to pass the test `flake8 . --ignore=E203,W503 --max-line-length=88` before they will be accepted so if possible, try this test locally on your Python file(s) before submitting your pull request.
84+
- All submissions will need to pass the test `ruff .` before they will be accepted so if possible, try this test locally on your Python file(s) before submitting your pull request.
8585

8686
```bash
87-
python3 -m pip install flake8 # only required the first time
88-
flake8 . --ignore=E203,W503 --max-line-length=88 --show-source
87+
python3 -m pip install ruff # only required the first time
88+
ruff .
8989
```
9090

9191
- Original code submission require docstrings or comments to describe your work.
@@ -176,7 +176,7 @@ We want your work to be readable by others; therefore, we encourage you to note
176176

177177
- Most importantly,
178178
- __Be consistent in the use of these guidelines when submitting.__
179-
- __Join__ us on [Discord](https://discord.com/invite/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms) __now!__
179+
- __Join__ us on [Discord](https://discord.com/invite/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms/community) __now!__
180180
- Happy coding!
181181

182182
Writer [@poyea](https://github.com/poyea), Jun 2019.

DIRECTORY.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,14 @@
196196
* [Disjoint Set](data_structures/disjoint_set/disjoint_set.py)
197197
* Hashing
198198
* [Double Hash](data_structures/hashing/double_hash.py)
199+
* [Hash Map](data_structures/hashing/hash_map.py)
199200
* [Hash Table](data_structures/hashing/hash_table.py)
200201
* [Hash Table With Linked List](data_structures/hashing/hash_table_with_linked_list.py)
201202
* Number Theory
202203
* [Prime Numbers](data_structures/hashing/number_theory/prime_numbers.py)
203204
* [Quadratic Probing](data_structures/hashing/quadratic_probing.py)
205+
* Tests
206+
* [Test Hash Map](data_structures/hashing/tests/test_hash_map.py)
204207
* Heap
205208
* [Binomial Heap](data_structures/heap/binomial_heap.py)
206209
* [Heap](data_structures/heap/heap.py)
@@ -314,6 +317,7 @@
314317
* [Longest Sub Array](dynamic_programming/longest_sub_array.py)
315318
* [Matrix Chain Order](dynamic_programming/matrix_chain_order.py)
316319
* [Max Non Adjacent Sum](dynamic_programming/max_non_adjacent_sum.py)
320+
* [Max Product Subarray](dynamic_programming/max_product_subarray.py)
317321
* [Max Sub Array](dynamic_programming/max_sub_array.py)
318322
* [Max Sum Contiguous Subsequence](dynamic_programming/max_sum_contiguous_subsequence.py)
319323
* [Min Distance Up Bottom](dynamic_programming/min_distance_up_bottom.py)
@@ -334,6 +338,7 @@
334338
## Electronics
335339
* [Builtin Voltage](electronics/builtin_voltage.py)
336340
* [Carrier Concentration](electronics/carrier_concentration.py)
341+
* [Circular Convolution](electronics/circular_convolution.py)
337342
* [Coulombs Law](electronics/coulombs_law.py)
338343
* [Electric Conductivity](electronics/electric_conductivity.py)
339344
* [Electric Power](electronics/electric_power.py)
@@ -936,6 +941,8 @@
936941
* [Sol1](project_euler/problem_097/sol1.py)
937942
* Problem 099
938943
* [Sol1](project_euler/problem_099/sol1.py)
944+
* Problem 100
945+
* [Sol1](project_euler/problem_100/sol1.py)
939946
* Problem 101
940947
* [Sol1](project_euler/problem_101/sol1.py)
941948
* Problem 102
@@ -970,6 +977,8 @@
970977
* [Sol1](project_euler/problem_125/sol1.py)
971978
* Problem 129
972979
* [Sol1](project_euler/problem_129/sol1.py)
980+
* Problem 131
981+
* [Sol1](project_euler/problem_131/sol1.py)
973982
* Problem 135
974983
* [Sol1](project_euler/problem_135/sol1.py)
975984
* Problem 144
@@ -982,6 +991,8 @@
982991
* [Sol1](project_euler/problem_174/sol1.py)
983992
* Problem 180
984993
* [Sol1](project_euler/problem_180/sol1.py)
994+
* Problem 187
995+
* [Sol1](project_euler/problem_187/sol1.py)
985996
* Problem 188
986997
* [Sol1](project_euler/problem_188/sol1.py)
987998
* Problem 191
@@ -1167,7 +1178,6 @@
11671178
* [Get Amazon Product Data](web_programming/get_amazon_product_data.py)
11681179
* [Get Imdb Top 250 Movies Csv](web_programming/get_imdb_top_250_movies_csv.py)
11691180
* [Get Imdbtop](web_programming/get_imdbtop.py)
1170-
* [Get Top Billionaires](web_programming/get_top_billionaires.py)
11711181
* [Get Top Hn Posts](web_programming/get_top_hn_posts.py)
11721182
* [Get User Tweets](web_programming/get_user_tweets.py)
11731183
* [Giphy](web_programming/giphy.py)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<a href="https://discord.gg/c7MnfGFGa6">
1717
<img src="https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=7289DA&style=flat-square" height="20" alt="Discord chat">
1818
</a>
19-
<a href="https://gitter.im/TheAlgorithms">
19+
<a href="https://gitter.im/TheAlgorithms/community">
2020
<img src="https://img.shields.io/badge/Chat-Gitter-ff69b4.svg?label=Chat&logo=gitter&style=flat-square" height="20" alt="Gitter chat">
2121
</a>
2222
<!-- Second row: -->
@@ -42,7 +42,7 @@ Read through our [Contribution Guidelines](CONTRIBUTING.md) before you contribut
4242

4343
## Community Channels
4444

45-
We are on [Discord](https://discord.gg/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms)! Community channels are a great way for you to ask questions and get help. Please join us!
45+
We are on [Discord](https://discord.gg/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms/community)! Community channels are a great way for you to ask questions and get help. Please join us!
4646

4747
## List of Algorithms
4848

0 commit comments

Comments
 (0)