GeezerVison is showing github.com — Create codespell.yml (#1698) · SharathKumarGithub/Python@bfcb95b
File treeExpand file treeCollapse file tree Open diff view settings arithmetic_analysis/image_data
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# GitHub Action to automate the identification of common misspellings in text files | | 2 | +# https://github.com/codespell-project/codespell | | 3 | +name: codespell | | 4 | +on: [push, pull_request] | | 5 | +jobs: | | 6 | + codespell: | | 7 | + runs-on: ubuntu-latest | | 8 | + steps: | | 9 | + - uses: actions/checkout@v2 | | 10 | + - uses: actions/setup-python@v1 | | 11 | + - run: pip install codespell flake8 | | 12 | + - run: | | | 13 | + SKIP="./.*,./other/dictionary.txt,./other/words,./project_euler/problem_22/p022_names.txt,*.bak,*.gif,*.jpeg,*.jpg,*.json,*.png,*.pyc" | | 14 | + codespell -L ans,fo,hist,iff,secant,tim --skip=$SKIP |
Collapse file Copy file name to clipboardExpand all lines: DIRECTORY.md +8-4Lines changed: 8 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 177 | 177 | * [Longest Sub Array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_sub_array.py) | 178 | 178 | * [Matrix Chain Order](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/matrix_chain_order.py) | 179 | 179 | * [Max Sub Array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/max_sub_array.py) | 180 | | - * [Max Sum Contigous Subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/max_sum_contigous_subsequence.py) | | 180 | + * [Max Sum Contiguous Subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/max_sum_contiguous_subsequence.py) | 181 | 181 | * [Minimum Partition](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/minimum_partition.py) | 182 | 182 | * [Rod Cutting](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/rod_cutting.py) | 183 | 183 | * [Subset Generation](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/subset_generation.py) | 184 | 184 | * [Sum Of Subset](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/sum_of_subset.py) | 185 | 185 |
| 186 | 186 | ## File Transfer | 187 | | - * [Recieve File](https://github.com/TheAlgorithms/Python/blob/master/file_transfer/recieve_file.py) | | 187 | + * [Receive File](https://github.com/TheAlgorithms/Python/blob/master/file_transfer/receive_file.py) | 188 | 188 | * [Send File](https://github.com/TheAlgorithms/Python/blob/master/file_transfer/send_file.py) | 189 | 189 |
| 190 | 190 | ## Fuzzy Logic | | 219 | 219 | * [Kahns Algorithm Topo](https://github.com/TheAlgorithms/Python/blob/master/graphs/kahns_algorithm_topo.py) | 220 | 220 | * [Minimum Spanning Tree Kruskal](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_kruskal.py) | 221 | 221 | * [Minimum Spanning Tree Prims](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_prims.py) | 222 | | - * [Multi Hueristic Astar](https://github.com/TheAlgorithms/Python/blob/master/graphs/multi_hueristic_astar.py) | | 222 | + * [Multi Heuristic Astar](https://github.com/TheAlgorithms/Python/blob/master/graphs/multi_heuristic_astar.py) | 223 | 223 | * [Page Rank](https://github.com/TheAlgorithms/Python/blob/master/graphs/page_rank.py) | 224 | 224 | * [Prim](https://github.com/TheAlgorithms/Python/blob/master/graphs/prim.py) | 225 | 225 | * [Scc Kosaraju](https://github.com/TheAlgorithms/Python/blob/master/graphs/scc_kosaraju.py) | | 319 | 319 | * [Sieve Of Eratosthenes](https://github.com/TheAlgorithms/Python/blob/master/maths/sieve_of_eratosthenes.py) | 320 | 320 | * [Simpson Rule](https://github.com/TheAlgorithms/Python/blob/master/maths/simpson_rule.py) | 321 | 321 | * [Softmax](https://github.com/TheAlgorithms/Python/blob/master/maths/softmax.py) | | 322 | + * [Square Root](https://github.com/TheAlgorithms/Python/blob/master/maths/square_root.py) | 322 | 323 | * [Sum Of Arithmetic Series](https://github.com/TheAlgorithms/Python/blob/master/maths/sum_of_arithmetic_series.py) | 323 | 324 | * [Test Prime Check](https://github.com/TheAlgorithms/Python/blob/master/maths/test_prime_check.py) | 324 | 325 | * [Trapezoidal Rule](https://github.com/TheAlgorithms/Python/blob/master/maths/trapezoidal_rule.py) | | 469 | 470 | * [Sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_28/sol1.py) | 470 | 471 | * Problem 29 | 471 | 472 | * [Solution](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_29/solution.py) | | 473 | + * Problem 30 | | 474 | + * [Soln](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_30/soln.py) | 472 | 475 | * Problem 31 | 473 | 476 | * [Sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_31/sol1.py) | 474 | 477 | * Problem 32 | | 508 | 511 | * [Quick Select](https://github.com/TheAlgorithms/Python/blob/master/searches/quick_select.py) | 509 | 512 | * [Sentinel Linear Search](https://github.com/TheAlgorithms/Python/blob/master/searches/sentinel_linear_search.py) | 510 | 513 | * [Simple-Binary-Search](https://github.com/TheAlgorithms/Python/blob/master/searches/simple-binary-search.py) | | 514 | + * [Simulated Annealing](https://github.com/TheAlgorithms/Python/blob/master/searches/simulated_annealing.py) | 511 | 515 | * [Tabu Search](https://github.com/TheAlgorithms/Python/blob/master/searches/tabu_search.py) | 512 | 516 | * [Ternary Search](https://github.com/TheAlgorithms/Python/blob/master/searches/ternary_search.py) | 513 | 517 |
| | 564 | 568 | * [Reverse Words](https://github.com/TheAlgorithms/Python/blob/master/strings/reverse_words.py) | 565 | 569 | * [Split](https://github.com/TheAlgorithms/Python/blob/master/strings/split.py) | 566 | 570 | * [Upper](https://github.com/TheAlgorithms/Python/blob/master/strings/upper.py) | 567 | | - * [Word Occurence](https://github.com/TheAlgorithms/Python/blob/master/strings/word_occurence.py) | | 571 | + * [Word Occurrence](https://github.com/TheAlgorithms/Python/blob/master/strings/word_occurrence.py) | 568 | 572 |
| 569 | 573 | ## Traversals | 570 | 574 | * [Binary Tree Traversals](https://github.com/TheAlgorithms/Python/blob/master/traversals/binary_tree_traversals.py) | |
Collapse file Copy file name to clipboard File renamed without changes. Collapse file Copy file name to clipboard File renamed without changes. Collapse file Copy file name to clipboardExpand all lines: backtracking/n_queens.py +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -40,8 +40,8 @@ def isSafe(board, row, column): | 40 | 40 |
| 41 | 41 | def solve(board, row): | 42 | 42 | """ | 43 | | - It creates a state space tree and calls the safe function untill it receives a | 44 | | - False Boolean and terminates that brach and backtracks to the next | | 43 | + It creates a state space tree and calls the safe function until it receives a | | 44 | + False Boolean and terminates that branch and backtracks to the next | 45 | 45 | poosible solution branch. | 46 | 46 | """ | 47 | 47 | if row >= len(board): | @@ -58,7 +58,7 @@ def solve(board, row): | 58 | 58 | """ | 59 | 59 | For every row it iterates through each column to check if it is feesible to place a | 60 | 60 | queen there. | 61 | | - If all the combinations for that particaular branch are successfull the board is | | 61 | + If all the combinations for that particular branch are successful the board is | 62 | 62 | reinitialized for the next possible combination. | 63 | 63 | """ | 64 | 64 | if isSafe(board, row, i): | @@ -70,7 +70,7 @@ def solve(board, row): | 70 | 70 |
| 71 | 71 | def printboard(board): | 72 | 72 | """ | 73 | | - Prints the boards that have a successfull combination. | | 73 | + Prints the boards that have a successful combination. | 74 | 74 | """ | 75 | 75 | for i in range(len(board)): | 76 | 76 | for j in range(len(board)): | |
Collapse file Copy file name to clipboardExpand all lines: ciphers/hill_cipher.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3 | 3 | Hill Cipher: | 4 | 4 | The below defined class 'HillCipher' implements the Hill Cipher algorithm. | 5 | 5 | The Hill Cipher is an algorithm that implements modern linear algebra techniques | 6 | | -In this algortihm, you have an encryption key matrix. This is what will be used | | 6 | +In this algorithm, you have an encryption key matrix. This is what will be used | 7 | 7 | in encoding and decoding your text. | 8 | 8 |
| 9 | | -Algortihm: | | 9 | +Algorithm: | 10 | 10 | Let the order of the encryption key be N (as it is a square matrix). | 11 | 11 | Your text is divided into batches of length N and converted to numerical vectors | 12 | 12 | by a simple mapping starting with A=0 and so on. | 13 | 13 |
| 14 | | -The key is then mulitplied with the newly created batch vector to obtain the | | 14 | +The key is then multiplied with the newly created batch vector to obtain the | 15 | 15 | encoded vector. After each multiplication modular 36 calculations are performed | 16 | 16 | on the vectors so as to bring the numbers between 0 and 36 and then mapped with | 17 | 17 | their corresponding alphanumerics. | |
Collapse file Copy file name to clipboardExpand all lines: ciphers/rsa_cipher.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 |
| 7 | 7 | def main(): | 8 | 8 | filename = "encrypted_file.txt" | 9 | | - response = input(r"Encrypte\Decrypt [e\d]: ") | | 9 | + response = input(r"Encrypt\Decrypt [e\d]: ") | 10 | 10 |
| 11 | 11 | if response.lower().startswith("e"): | 12 | 12 | mode = "encrypt" | |
Collapse file Copy file name to clipboardExpand all lines: ciphers/rsa_key_generator.py +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -42,12 +42,12 @@ def makeKeyFiles(name, keySize): | 42 | 42 |
| 43 | 43 | publicKey, privateKey = generateKey(keySize) | 44 | 44 | print("\nWriting public key to file %s_pubkey.txt..." % name) | 45 | | - with open("%s_pubkey.txt" % name, "w") as fo: | 46 | | - fo.write("{},{},{}".format(keySize, publicKey[0], publicKey[1])) | | 45 | + with open("%s_pubkey.txt" % name, "w") as out_file: | | 46 | + out_file.write("{},{},{}".format(keySize, publicKey[0], publicKey[1])) | 47 | 47 |
| 48 | 48 | print("Writing private key to file %s_privkey.txt..." % name) | 49 | | - with open("%s_privkey.txt" % name, "w") as fo: | 50 | | - fo.write("{},{},{}".format(keySize, privateKey[0], privateKey[1])) | | 49 | + with open("%s_privkey.txt" % name, "w") as out_file: | | 50 | + out_file.write("{},{},{}".format(keySize, privateKey[0], privateKey[1])) | 51 | 51 |
| 52 | 52 |
| 53 | 53 | if __name__ == "__main__": | |
Collapse file Copy file name to clipboardExpand all lines: compression/burrows_wheeler.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -157,11 +157,11 @@ def reverse_bwt(bwt_string: str, idx_original_string: int) -> str: | 157 | 157 | entry_msg = "Provide a string that I will generate its BWT transform: " | 158 | 158 | s = input(entry_msg).strip() | 159 | 159 | result = bwt_transform(s) | 160 | | - bwt_output_msg = "Burrows Wheeler tranform for string '{}' results in '{}'" | | 160 | + bwt_output_msg = "Burrows Wheeler transform for string '{}' results in '{}'" | 161 | 161 | print(bwt_output_msg.format(s, result["bwt_string"])) | 162 | 162 | original_string = reverse_bwt(result["bwt_string"], result["idx_original_string"]) | 163 | 163 | fmt = ( | 164 | | - "Reversing Burrows Wheeler tranform for entry '{}' we get original" | | 164 | + "Reversing Burrows Wheeler transform for entry '{}' we get original" | 165 | 165 | " string '{}'" | 166 | 166 | ) | 167 | 167 | print(fmt.format(result["bwt_string"], original_string)) |
Collapse file Copy file name to clipboardExpand all lines: compression/huffman.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -21,7 +21,7 @@ def __init__(self, freq, left, right): | 21 | 21 | def parse_file(file_path): | 22 | 22 | """ | 23 | 23 | Read the file and build a dict of all letters and their | 24 | | - frequences, then convert the dict into a list of Letters. | | 24 | + frequencies, then convert the dict into a list of Letters. | 25 | 25 | """ | 26 | 26 | chars = {} | 27 | 27 | with open(file_path) as f: | |
|