Skip to content

Commit 031904b

Browse files
committed
Merge branch 'master' of git://github.com/TheAlgorithms/Python
2 parents 6901a3c + 26df2aa commit 031904b

File tree

85 files changed

+1980
-968
lines changed

Some content is hidden

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

85 files changed

+1980
-968
lines changed

Diff for: .github/FUNDING.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: TheAlgorithms
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: ['http://paypal.me/TheAlgorithms/1000', 'https://donorbox.org/thealgorithms']

Diff for: .lgtm.yml

-12
This file was deleted.

Diff for: .travis.yml

+4-25
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
language: python
2-
cache: pip
3-
python:
4-
- 2.7
5-
- 3.6
6-
#- nightly
7-
#- pypy
8-
#- pypy3
9-
matrix:
10-
allow_failures:
11-
- python: nightly
12-
- python: pypy
13-
- python: pypy3
14-
install:
15-
#- pip install -r requirements.txt
16-
- pip install flake8 # pytest # add another testing frameworks later
17-
before_script:
18-
# stop the build if there are Python syntax errors or undefined names
19-
- flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics
20-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
21-
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
22-
script:
23-
- true # pytest --capture=sys # add other tests here
24-
notifications:
25-
on_success: change
26-
on_failure: change # `always` will be the setting once code changes slow down
2+
dist: xenial # required for Python >= 3.7
3+
python: 3.7
4+
install: pip install flake8
5+
script: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

Diff for: CONTRIBUTING.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ We want your work to be readable by others; therefore, we encourage you to note
7272

7373
- Write tests to illustrate your work.
7474

75-
The following "testing" approaches are not encouraged:
75+
The following "testing" approaches are **not** encouraged:
7676

77-
```python
77+
```python*
7878
input('Enter your input:')
7979
# Or even worse...
8080
input = eval(raw_input("Enter your input: "))
@@ -97,20 +97,18 @@ We want your work to be readable by others; therefore, we encourage you to note
9797

9898
#### Other Standard While Submitting Your Work
9999

100-
- File extension for code should be `.py`.
101-
102-
- Please file your work to let others use it in the future. Here are the examples that are acceptable:
100+
- File extension for code should be `.py`. Jupiter notebook files are acceptable in machine learning algorithms.
103101

104-
- Camel cases
105-
- `-` Hyphenated names
106-
- `_` Underscore-separated names
102+
- Strictly use snake case (underscore separated) in your file name, as it will be easy to parse in future using scripts.
107103

108104
If possible, follow the standard *within* the folder you are submitting to.
109105

110106
- If you have modified/added code work, make sure the code compiles before submitting.
111107

112108
- If you have modified/added documentation work, make sure your language is concise and contains no grammar mistake.
113109

110+
- Update the README file if you have added any new algorithm. Only entry corresponding to the algorithm is to be made, not need to add sample data, test files or solutions to problems like Project Euler, in the README.
111+
114112
- Add a corresponding explanation to [Algorithms-Explanation](https://github.com/TheAlgorithms/Algorithms-Explanation) (Optional but recommended).
115113

116114
- Most importantly,

Diff for: DIRECTORY.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
## Analysis
2-
* Compression Analysis
3-
* [psnr](https://github.com/TheAlgorithms/Python/blob/master/analysis/compression_analysis/psnr.py)
41
## Arithmetic Analysis
52
* [bisection](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/bisection.py)
63
* [intersection](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/intersection.py)
@@ -39,17 +36,19 @@
3936
* [xor cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/xor_cipher.py)
4037
## Compression
4138
* [huffman](https://github.com/TheAlgorithms/Python/blob/master/compression/huffman.py)
39+
## Compression Analysis
40+
* [psnr](https://github.com/TheAlgorithms/Python/blob/master/compression_analysis/psnr.py)
4241
## Data Structures
4342
* [arrays](https://github.com/TheAlgorithms/Python/blob/master/data_structures/arrays.py)
4443
* [avl](https://github.com/TheAlgorithms/Python/blob/master/data_structures/avl.py)
4544
* [LCA](https://github.com/TheAlgorithms/Python/blob/master/data_structures/LCA.py)
4645
* Binary Tree
47-
* [AVL tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/AVL_tree.py)
48-
* [binary search tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/binary_search_tree.py)
49-
* [fenwick tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/fenwick_tree.py)
50-
* [lazy segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/lazy_segment_tree.py)
51-
* [segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/segment_tree.py)
52-
* [treap](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/treap.py)
46+
* [AVL tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/AVL_tree.py)
47+
* [binary search tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/binary_search_tree.py)
48+
* [fenwick tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/fenwick_tree.py)
49+
* [lazy segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/lazy_segment_tree.py)
50+
* [segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/segment_tree.py)
51+
* [treap](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/treap.py)
5352
* Hashing
5453
* [double hash](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/double_hash.py)
5554
* [hash table](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/hash_table.py)
@@ -192,8 +191,9 @@
192191
* Tests
193192
* [test fibonacci](https://github.com/TheAlgorithms/Python/blob/master/maths/tests/test_fibonacci.py)
194193
## Matrix
195-
* [matrix multiplication addition](https://github.com/TheAlgorithms/Python/blob/master/matrix/matrix_multiplication_addition.py)
194+
* [matrix operation](https://github.com/TheAlgorithms/Python/blob/master/matrix/matrix_operation.py)
196195
* [searching in sorted matrix](https://github.com/TheAlgorithms/Python/blob/master/matrix/searching_in_sorted_matrix.py)
196+
* [spiralPrint](https://github.com/TheAlgorithms/Python/blob/master/matrix/spiralPrint.py)
197197
## Networking Flow
198198
* [ford fulkerson](https://github.com/TheAlgorithms/Python/blob/master/networking_flow/ford_fulkerson.py)
199199
* [minimum cut](https://github.com/TheAlgorithms/Python/blob/master/networking_flow/minimum_cut.py)
@@ -294,6 +294,8 @@
294294
* [p022 names](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/p022_names.txt)
295295
* [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol1.py)
296296
* [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol2.py)
297+
* Problem 234
298+
* [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_234/sol1.py)
297299
* Problem 24
298300
* [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_24/sol1.py)
299301
* Problem 25

0 commit comments

Comments
 (0)