From 39780323de4819abaf859d2f825da330e4c33863 Mon Sep 17 00:00:00 2001 From: Daniel Xu Date: Sat, 8 Jun 2019 18:02:00 -0400 Subject: [PATCH 1/3] Added script for automatically generating DIRECTORY.md --- DIRECTORY.md | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++ script.py | 64 +++++++++ 2 files changed, 438 insertions(+) create mode 100644 DIRECTORY.md create mode 100644 script.py diff --git a/DIRECTORY.md b/DIRECTORY.md new file mode 100644 index 000000000000..eb816875656c --- /dev/null +++ b/DIRECTORY.md @@ -0,0 +1,374 @@ +## Analysis + * Compression Analysis + * [psnr](https://github.com/TheAlgorithms/Python/blob/master/analysis/compression_analysis/psnr.py) +## Arithmetic Analysis + * [newton raphson method](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/newton_raphson_method.py) + * [newton method](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/newton_method.py) + * [intersection](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/intersection.py) + * [lu decomposition](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/lu_decomposition.py) + * [bisection](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/bisection.py) +## Binary Tree + * [basic binary tree](https://github.com/TheAlgorithms/Python/blob/master/binary_tree/basic_binary_tree.py) +## Boolean Algebra + * [quine mc cluskey](https://github.com/TheAlgorithms/Python/blob/master/boolean_algebra/quine_mc_cluskey.py) +## Ciphers + * [playfair cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/playfair_cipher.py) + * [elgamal key generator](https://github.com/TheAlgorithms/Python/blob/master/ciphers/elgamal_key_generator.py) + * [onepad cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/onepad_cipher.py) + * [affine cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/affine_cipher.py) + * [rsa cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rsa_cipher.py) + * [xor cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/xor_cipher.py) + * [hill cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/hill_cipher.py) + * [transposition cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/transposition_cipher.py) + * [brute force caesar cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/brute_force_caesar_cipher.py) + * [rabin miller](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rabin_miller.py) + * [caesar cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/caesar_cipher.py) + * [rot13](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rot13.py) + * [trafid cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/trafid_cipher.py) + * [vigenere cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/vigenere_cipher.py) + * [simple substitution cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/simple_substitution_cipher.py) + * [prehistoric men](https://github.com/TheAlgorithms/Python/blob/master/ciphers/prehistoric_men.txt) + * [base64 cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base64_cipher.py) + * [transposition cipher encrypt decrypt file](https://github.com/TheAlgorithms/Python/blob/master/ciphers/transposition_cipher_encrypt_decrypt_file.py) + * [morse Code implementation](https://github.com/TheAlgorithms/Python/blob/master/ciphers/morse_Code_implementation.py) + * [cryptomath module](https://github.com/TheAlgorithms/Python/blob/master/ciphers/cryptomath_module.py) + * [base32](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base32.py) + * [base16](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base16.py) + * [Atbash](https://github.com/TheAlgorithms/Python/blob/master/ciphers/Atbash.py) + * [rsa key generator](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rsa_key_generator.py) + * [base85](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base85.py) +## Compression + * [huffman](https://github.com/TheAlgorithms/Python/blob/master/compression/huffman.py) +## Data Structures + * [LCA](https://github.com/TheAlgorithms/Python/blob/master/data_structures/LCA.py) + * [arrays](https://github.com/TheAlgorithms/Python/blob/master/data_structures/arrays.py) + * [avl](https://github.com/TheAlgorithms/Python/blob/master/data_structures/avl.py) + * Binary Tree + * [AVL tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/AVL_tree.py) + * [treap](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/treap.py) + * [fenwick tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/fenwick_tree.py) + * [binary search tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/binary_search_tree.py) + * [segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/segment_tree.py) + * [lazy segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/lazy_segment_tree.py) + * Hashing + * [hash table](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/hash_table.py) + * [double hash](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/double_hash.py) + * [hash table with linked list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/hash_table_with_linked_list.py) + * [quadratic probing](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/quadratic_probing.py) + * Number Theory + * [prime numbers](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/number_theory/prime_numbers.py) + * Heap + * [heap](https://github.com/TheAlgorithms/Python/blob/master/data_structures/heap/heap.py) + * Linked List + * [is Palindrome](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/is_Palindrome.py) + * [swapNodes](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/swapNodes.py) + * [doubly linked list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/doubly_linked_list.py) + * [singly linked list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/singly_linked_list.py) + * Queue + * [double ended queue](https://github.com/TheAlgorithms/Python/blob/master/data_structures/queue/double_ended_queue.py) + * [queue on list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/queue/queue_on_list.py) + * [queue on pseudo stack](https://github.com/TheAlgorithms/Python/blob/master/data_structures/queue/queue_on_pseudo_stack.py) + * Stacks + * [infix to prefix conversion](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/infix_to_prefix_conversion.py) + * [balanced parentheses](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/balanced_parentheses.py) + * [stock span problem](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/stock_span_problem.py) + * [stack](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/stack.py) + * [infix to postfix conversion](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/infix_to_postfix_conversion.py) + * [postfix evaluation](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/postfix_evaluation.py) + * [next](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/next.py) + * Trie + * [trie](https://github.com/TheAlgorithms/Python/blob/master/data_structures/trie/trie.py) + * Union Find + * [tests union find](https://github.com/TheAlgorithms/Python/blob/master/data_structures/union_find/tests_union_find.py) + * [union find](https://github.com/TheAlgorithms/Python/blob/master/data_structures/union_find/union_find.py) +## Digital Image Processing + * Filters + * [median filter](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/filters/median_filter.py) +## Dynamic Programming + * [subset generation](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/subset_generation.py) + * [rod cutting](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/rod_cutting.py) + * [max sub array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/max_sub_array.py) + * [fast fibonacci](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/fast_fibonacci.py) + * [abbreviation](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/abbreviation.py) + * [longest common subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_common_subsequence.py) + * [knapsack](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/knapsack.py) + * [minimum partition](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/minimum_partition.py) + * [matrix chain order](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/matrix_chain_order.py) + * [Fractional Knapsack](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/Fractional_Knapsack.py) + * [coin change](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/coin_change.py) + * [k means clustering tensorflow](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/k_means_clustering_tensorflow.py) + * [longest sub array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_sub_array.py) + * [longest increasing subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_increasing_subsequence.py) + * [bitmask](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/bitmask.py) + * [edit distance](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/edit_distance.py) + * [floyd warshall](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/floyd_warshall.py) + * [integer partition](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/integer_partition.py) + * [longest increasing subsequence O(nlogn)](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_increasing_subsequence_O(nlogn).py) + * [fibonacci](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/fibonacci.py) +## File Transfer Protocol + * [ftp client server](https://github.com/TheAlgorithms/Python/blob/master/file_transfer_protocol/ftp_client_server.py) + * [ftp send receive](https://github.com/TheAlgorithms/Python/blob/master/file_transfer_protocol/ftp_send_receive.py) +## Graphs + * [page rank](https://github.com/TheAlgorithms/Python/blob/master/graphs/page_rank.py) + * [minimum spanning tree prims](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_prims.py) + * [dijkstra](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra.py) + * [check bipartite graph dfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/check_bipartite_graph_dfs.py) + * [articulation points](https://github.com/TheAlgorithms/Python/blob/master/graphs/articulation_points.py) + * [bfs shortest path](https://github.com/TheAlgorithms/Python/blob/master/graphs/bfs_shortest_path.py) + * [prim](https://github.com/TheAlgorithms/Python/blob/master/graphs/prim.py) + * [finding bridges](https://github.com/TheAlgorithms/Python/blob/master/graphs/finding_bridges.py) + * [depth first search](https://github.com/TheAlgorithms/Python/blob/master/graphs/depth_first_search.py) + * [Directed and Undirected (Weighted) Graph](https://github.com/TheAlgorithms/Python/blob/master/graphs/Directed_and_Undirected_(Weighted)_Graph.py) + * [a star](https://github.com/TheAlgorithms/Python/blob/master/graphs/a_star.py) + * [bellman ford](https://github.com/TheAlgorithms/Python/blob/master/graphs/bellman_ford.py) + * [basic graphs](https://github.com/TheAlgorithms/Python/blob/master/graphs/basic_graphs.py) + * [tarjans scc](https://github.com/TheAlgorithms/Python/blob/master/graphs/tarjans_scc.py) + * [check bipartite graph bfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/check_bipartite_graph_bfs.py) + * [even tree](https://github.com/TheAlgorithms/Python/blob/master/graphs/even_tree.py) + * [Eulerian path and circuit for undirected graph](https://github.com/TheAlgorithms/Python/blob/master/graphs/Eulerian_path_and_circuit_for_undirected_graph.py) + * [dijkstra 2](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra_2.py) + * [scc kosaraju](https://github.com/TheAlgorithms/Python/blob/master/graphs/scc_kosaraju.py) + * [BFS](https://github.com/TheAlgorithms/Python/blob/master/graphs/BFS.py) + * [breadth first search](https://github.com/TheAlgorithms/Python/blob/master/graphs/breadth_first_search.py) + * [minimum spanning tree kruskal](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_kruskal.py) + * [edmonds karp multiple source and sink](https://github.com/TheAlgorithms/Python/blob/master/graphs/edmonds_karp_multiple_source_and_sink.py) + * [floyd warshall](https://github.com/TheAlgorithms/Python/blob/master/graphs/floyd_warshall.py) + * [dijkstra algorithm](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra_algorithm.py) + * [kahns algorithm topo](https://github.com/TheAlgorithms/Python/blob/master/graphs/kahns_algorithm_topo.py) + * [multi hueristic astar](https://github.com/TheAlgorithms/Python/blob/master/graphs/multi_hueristic_astar.py) + * [graph list](https://github.com/TheAlgorithms/Python/blob/master/graphs/graph_list.py) + * [graph matrix](https://github.com/TheAlgorithms/Python/blob/master/graphs/graph_matrix.py) + * [kahns algorithm long](https://github.com/TheAlgorithms/Python/blob/master/graphs/kahns_algorithm_long.py) + * [DFS](https://github.com/TheAlgorithms/Python/blob/master/graphs/DFS.py) +## Hashes + * [chaos machine](https://github.com/TheAlgorithms/Python/blob/master/hashes/chaos_machine.py) + * [sha1](https://github.com/TheAlgorithms/Python/blob/master/hashes/sha1.py) + * [md5](https://github.com/TheAlgorithms/Python/blob/master/hashes/md5.py) +## Linear Algebra Python + * Src + * [lib](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra_python/src/lib.py) + * [tests](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra_python/src/tests.py) +## Machine Learning + * [scoring functions](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/scoring_functions.py) + * [perceptron](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/perceptron.py) + * [gradient descent](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/gradient_descent.py) + * [k means clust](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/k_means_clust.py) + * [decision tree](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/decision_tree.py) + * [logistic regression](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/logistic_regression.py) + * [linear regression](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/linear_regression.py) + * Random Forest Classification + * [random forest classification](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Classification/random_forest_classification.py) + * [Social Network Ads](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Classification/Social_Network_Ads.csv) + * Random Forest Regression + * [Position Salaries](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Regression/Position_Salaries.csv) + * [random forest regression](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Regression/random_forest_regression.py) +## Maths + * [Find Max](https://github.com/TheAlgorithms/Python/blob/master/maths/Find_Max.py) + * [Hanoi](https://github.com/TheAlgorithms/Python/blob/master/maths/Hanoi.py) + * [extended euclidean algorithm](https://github.com/TheAlgorithms/Python/blob/master/maths/extended_euclidean_algorithm.py) + * [basic maths](https://github.com/TheAlgorithms/Python/blob/master/maths/basic_maths.py) + * [fermat little theorem](https://github.com/TheAlgorithms/Python/blob/master/maths/fermat_little_theorem.py) + * [greater common divisor](https://github.com/TheAlgorithms/Python/blob/master/maths/greater_common_divisor.py) + * [lucasSeries](https://github.com/TheAlgorithms/Python/blob/master/maths/lucasSeries.py) + * [abs](https://github.com/TheAlgorithms/Python/blob/master/maths/abs.py) + * [abs Max](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_Max.py) + * [simpson rule](https://github.com/TheAlgorithms/Python/blob/master/maths/simpson_rule.py) + * [factorial recursive](https://github.com/TheAlgorithms/Python/blob/master/maths/factorial_recursive.py) + * [newton raphson](https://github.com/TheAlgorithms/Python/blob/master/maths/newton_raphson.py) + * [Find Min](https://github.com/TheAlgorithms/Python/blob/master/maths/Find_Min.py) + * [trapezoidal rule](https://github.com/TheAlgorithms/Python/blob/master/maths/trapezoidal_rule.py) + * [find lcm](https://github.com/TheAlgorithms/Python/blob/master/maths/find_lcm.py) + * [Binary Exponentiation](https://github.com/TheAlgorithms/Python/blob/master/maths/Binary_Exponentiation.py) + * [segmented sieve](https://github.com/TheAlgorithms/Python/blob/master/maths/segmented_sieve.py) + * [fibonacci sequence recursion](https://github.com/TheAlgorithms/Python/blob/master/maths/fibonacci_sequence_recursion.py) + * [Prime Check](https://github.com/TheAlgorithms/Python/blob/master/maths/Prime_Check.py) + * [average](https://github.com/TheAlgorithms/Python/blob/master/maths/average.py) + * [modular exponential](https://github.com/TheAlgorithms/Python/blob/master/maths/modular_exponential.py) + * [fibonacci](https://github.com/TheAlgorithms/Python/blob/master/maths/fibonacci.py) + * [3n+1](https://github.com/TheAlgorithms/Python/blob/master/maths/3n+1.py) + * [sieve of eratosthenes](https://github.com/TheAlgorithms/Python/blob/master/maths/sieve_of_eratosthenes.py) + * [abs Min](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_Min.py) + * [factorial python](https://github.com/TheAlgorithms/Python/blob/master/maths/factorial_python.py) + * Tests + * [test fibonacci](https://github.com/TheAlgorithms/Python/blob/master/maths/tests/test_fibonacci.py) +## Matrix + * [searching in sorted matrix](https://github.com/TheAlgorithms/Python/blob/master/matrix/searching_in_sorted_matrix.py) + * [matrix multiplication addition](https://github.com/TheAlgorithms/Python/blob/master/matrix/matrix_multiplication_addition.py) +## Networking Flow + * [minimum cut](https://github.com/TheAlgorithms/Python/blob/master/networking_flow/minimum_cut.py) + * [ford fulkerson](https://github.com/TheAlgorithms/Python/blob/master/networking_flow/ford_fulkerson.py) +## Neural Network + * [perceptron](https://github.com/TheAlgorithms/Python/blob/master/neural_network/perceptron.py) + * [convolution neural network](https://github.com/TheAlgorithms/Python/blob/master/neural_network/convolution_neural_network.py) + * [bpnn](https://github.com/TheAlgorithms/Python/blob/master/neural_network/bpnn.py) +## Other + * [password generator](https://github.com/TheAlgorithms/Python/blob/master/other/password_generator.py) + * [fischer yates shuffle](https://github.com/TheAlgorithms/Python/blob/master/other/fischer_yates_shuffle.py) + * [words](https://github.com/TheAlgorithms/Python/blob/master/other/words) + * [palindrome](https://github.com/TheAlgorithms/Python/blob/master/other/palindrome.py) + * [frequency finder](https://github.com/TheAlgorithms/Python/blob/master/other/frequency_finder.py) + * [primelib](https://github.com/TheAlgorithms/Python/blob/master/other/primelib.py) + * [word patterns](https://github.com/TheAlgorithms/Python/blob/master/other/word_patterns.py) + * [anagrams](https://github.com/TheAlgorithms/Python/blob/master/other/anagrams.py) + * [detecting english programmatically](https://github.com/TheAlgorithms/Python/blob/master/other/detecting_english_programmatically.py) + * [finding Primes](https://github.com/TheAlgorithms/Python/blob/master/other/finding_Primes.py) + * [dictionary](https://github.com/TheAlgorithms/Python/blob/master/other/dictionary.txt) + * [euclidean gcd](https://github.com/TheAlgorithms/Python/blob/master/other/euclidean_gcd.py) + * [sierpinski triangle](https://github.com/TheAlgorithms/Python/blob/master/other/sierpinski_triangle.py) + * [binary exponentiation 2](https://github.com/TheAlgorithms/Python/blob/master/other/binary_exponentiation_2.py) + * [binary exponentiation](https://github.com/TheAlgorithms/Python/blob/master/other/binary_exponentiation.py) + * [linear congruential generator](https://github.com/TheAlgorithms/Python/blob/master/other/linear_congruential_generator.py) + * [n queens](https://github.com/TheAlgorithms/Python/blob/master/other/n_queens.py) + * [nested brackets](https://github.com/TheAlgorithms/Python/blob/master/other/nested_brackets.py) + * [tower of hanoi](https://github.com/TheAlgorithms/Python/blob/master/other/tower_of_hanoi.py) + * [two sum](https://github.com/TheAlgorithms/Python/blob/master/other/two_sum.py) + * Game Of Life + * [sample](https://github.com/TheAlgorithms/Python/blob/master/other/game_of_life/sample.gif) + * [game o life](https://github.com/TheAlgorithms/Python/blob/master/other/game_of_life/game_o_life.py) +## Project Euler + * Problem 01 + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol3.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol2.py) + * [sol6](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol6.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol1.py) + * [sol5](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol5.py) + * [sol4](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol4.py) + * Problem 02 + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol3.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol1.py) + * [sol4](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol4.py) + * Problem 03 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_03/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_03/sol1.py) + * Problem 04 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_04/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_04/sol1.py) + * Problem 05 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_05/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_05/sol1.py) + * Problem 06 + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol3.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol1.py) + * Problem 07 + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol3.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol1.py) + * Problem 08 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_08/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_08/sol1.py) + * Problem 09 + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol3.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol1.py) + * Problem 10 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_10/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_10/sol1.py) + * Problem 11 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_11/sol2.py) + * [grid](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_11/grid.txt) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_11/sol1.py) + * Problem 12 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_12/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_12/sol1.py) + * Problem 13 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_13/sol1.py) + * Problem 14 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_14/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_14/sol1.py) + * Problem 15 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_15/sol1.py) + * Problem 16 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_16/sol1.py) + * Problem 17 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_17/sol1.py) + * Problem 19 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_19/sol1.py) + * Problem 20 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_20/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_20/sol1.py) + * Problem 21 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_21/sol1.py) + * Problem 22 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol1.py) + * [p022 names](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/p022_names.txt) + * Problem 24 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_24/sol1.py) + * Problem 25 + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol2.py) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol1.py) + * Problem 28 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_28/sol1.py) + * Problem 29 + * [solution](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_29/solution.py) + * Problem 31 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_31/sol1.py) + * Problem 36 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_36/sol1.py) + * Problem 40 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_40/sol1.py) + * Problem 48 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_48/sol1.py) + * Problem 52 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_52/sol1.py) + * Problem 53 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_53/sol1.py) + * Problem 76 + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_76/sol1.py) +## Searches + * [binary search](https://github.com/TheAlgorithms/Python/blob/master/searches/binary_search.py) + * [sentinel linear search](https://github.com/TheAlgorithms/Python/blob/master/searches/sentinel_linear_search.py) + * [tabu test data](https://github.com/TheAlgorithms/Python/blob/master/searches/tabu_test_data.txt) + * [quick select](https://github.com/TheAlgorithms/Python/blob/master/searches/quick_select.py) + * [test interpolation search](https://github.com/TheAlgorithms/Python/blob/master/searches/test_interpolation_search.py) + * [ternary search](https://github.com/TheAlgorithms/Python/blob/master/searches/ternary_search.py) + * [linear search](https://github.com/TheAlgorithms/Python/blob/master/searches/linear_search.py) + * [tabu search](https://github.com/TheAlgorithms/Python/blob/master/searches/tabu_search.py) + * [interpolation search](https://github.com/TheAlgorithms/Python/blob/master/searches/interpolation_search.py) + * [test tabu search](https://github.com/TheAlgorithms/Python/blob/master/searches/test_tabu_search.py) + * [jump search](https://github.com/TheAlgorithms/Python/blob/master/searches/jump_search.py) +## Simple Client + * [server](https://github.com/TheAlgorithms/Python/blob/master/simple_client/server.py) + * [client](https://github.com/TheAlgorithms/Python/blob/master/simple_client/client.py) +## Sorts + * [topological sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/topological_sort.py) + * [shell sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/shell_sort.py) + * [quick sort 3 partition](https://github.com/TheAlgorithms/Python/blob/master/sorts/quick_sort_3_partition.py) + * [Odd-Even transposition parallel](https://github.com/TheAlgorithms/Python/blob/master/sorts/Odd-Even_transposition_parallel.py) + * [bucket sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bucket_sort.py) + * [quick sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/quick_sort.py) + * [Odd-Even transposition single-threaded](https://github.com/TheAlgorithms/Python/blob/master/sorts/Odd-Even_transposition_single-threaded.py) + * [merge sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/merge_sort.py) + * [cycle sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/cycle_sort.py) + * [pancake sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/pancake_sort.py) + * [insertion sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/insertion_sort.py) + * [gnome sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/gnome_sort.py) + * [bubble sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bubble_sort.py) + * [random normal distribution quicksort](https://github.com/TheAlgorithms/Python/blob/master/sorts/random_normal_distribution_quicksort.py) + * [merge sort fastest](https://github.com/TheAlgorithms/Python/blob/master/sorts/merge_sort_fastest.py) + * [tim sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/tim_sort.py) + * [selection sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/selection_sort.py) + * [bogo sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bogo_sort.py) + * [radix sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/radix_sort.py) + * [counting sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/counting_sort.py) + * [tree sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/tree_sort.py) + * [wiggle sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/wiggle_sort.py) + * [external sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/external_sort.py) + * [heap sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/heap_sort.py) + * [tests](https://github.com/TheAlgorithms/Python/blob/master/sorts/tests.py) + * [cocktail shaker sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/cocktail_shaker_sort.py) + * [random pivot quick sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/random_pivot_quick_sort.py) + * [comb sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/comb_sort.py) + * [pigeon sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/pigeon_sort.py) + * [Bitonic Sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/Bitonic_Sort.py) +## Strings + * [rabin karp](https://github.com/TheAlgorithms/Python/blob/master/strings/rabin_karp.py) + * [knuth morris pratt](https://github.com/TheAlgorithms/Python/blob/master/strings/knuth_morris_pratt.py) + * [naive String Search](https://github.com/TheAlgorithms/Python/blob/master/strings/naive_String_Search.py) + * [min cost string conversion](https://github.com/TheAlgorithms/Python/blob/master/strings/min_cost_string_conversion.py) + * [levenshtein distance](https://github.com/TheAlgorithms/Python/blob/master/strings/levenshtein_distance.py) + * [manacher](https://github.com/TheAlgorithms/Python/blob/master/strings/manacher.py) +## Traversals + * [binary tree traversals](https://github.com/TheAlgorithms/Python/blob/master/traversals/binary_tree_traversals.py) diff --git a/script.py b/script.py new file mode 100644 index 000000000000..e51b91529ba1 --- /dev/null +++ b/script.py @@ -0,0 +1,64 @@ +""" +This is a simple script that will scan through the current directory +and generate the corresponding DIRECTORY.md file, can also specify +files or folders to be ignored. +""" +import os + + +# Target URL (master) +URL = "https://github.com/TheAlgorithms/Python/blob/master/" + + +def tree(d, ignores, ignores_ext): + return _markdown(d, ignores, ignores_ext, 0) + + +def _markdown(parent, ignores, ignores_ext, depth): + out = "" + dirs = [] + for i in os.listdir(parent): + full = os.path.join(parent, i) + name, ext = os.path.splitext(i) + if i in ignores or ext in ignores_ext: + continue + if os.path.isfile(full): + # generate list + pre = parent.replace("./", "").replace(" ", "%20") + # replace all spaces to safe URL + child = i.replace(" ", "%20") + out += " " * depth + "* [" + name.replace("_", " ") + "](" + URL + pre + "/" + child + ")\n" + else: + dirs.append(i) + # Sort directories + dirs.sort() + for i in dirs: + full = os.path.join(parent, i) + i = i.replace("_", " ").title() + if depth == 0: + out += "## " + i + "\n" + else: + out += " " * depth + "* " + i + "\n" + out += _markdown(full, ignores, ignores_ext, depth+1) + return out + + +# Specific files or folders with the given names will be ignored +ignores = [".vs", + ".gitignore", + ".git", + "script.py", + "__init__.py", +] +# Files with given entensions will be ignored +ignores_ext = [ + ".md", + ".ipynb", + ".png", + ".jpg", + ".yml" +] + +if __name__ == "__main__": + with open("DIRECTORY.md", "w+") as f: + f.write(tree(".", ignores, ignores_ext)) From 3b35c20b10eb08c9f16e3bc61f46918b616b8241 Mon Sep 17 00:00:00 2001 From: Daniel Xu Date: Sun, 9 Jun 2019 11:52:50 -0400 Subject: [PATCH 2/3] Sort and list files by alphabetical order --- DIRECTORY.md | 332 +++++++++++++++++++++++++-------------------------- script.py | 10 +- 2 files changed, 174 insertions(+), 168 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index eb816875656c..ad25772b56b6 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -2,57 +2,57 @@ * Compression Analysis * [psnr](https://github.com/TheAlgorithms/Python/blob/master/analysis/compression_analysis/psnr.py) ## Arithmetic Analysis - * [newton raphson method](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/newton_raphson_method.py) - * [newton method](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/newton_method.py) + * [bisection](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/bisection.py) * [intersection](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/intersection.py) * [lu decomposition](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/lu_decomposition.py) - * [bisection](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/bisection.py) + * [newton method](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/newton_method.py) + * [newton raphson method](https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/newton_raphson_method.py) ## Binary Tree * [basic binary tree](https://github.com/TheAlgorithms/Python/blob/master/binary_tree/basic_binary_tree.py) ## Boolean Algebra * [quine mc cluskey](https://github.com/TheAlgorithms/Python/blob/master/boolean_algebra/quine_mc_cluskey.py) ## Ciphers - * [playfair cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/playfair_cipher.py) - * [elgamal key generator](https://github.com/TheAlgorithms/Python/blob/master/ciphers/elgamal_key_generator.py) - * [onepad cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/onepad_cipher.py) * [affine cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/affine_cipher.py) - * [rsa cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rsa_cipher.py) - * [xor cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/xor_cipher.py) - * [hill cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/hill_cipher.py) - * [transposition cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/transposition_cipher.py) + * [Atbash](https://github.com/TheAlgorithms/Python/blob/master/ciphers/Atbash.py) + * [base16](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base16.py) + * [base32](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base32.py) + * [base64 cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base64_cipher.py) + * [base85](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base85.py) * [brute force caesar cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/brute_force_caesar_cipher.py) - * [rabin miller](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rabin_miller.py) * [caesar cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/caesar_cipher.py) + * [cryptomath module](https://github.com/TheAlgorithms/Python/blob/master/ciphers/cryptomath_module.py) + * [elgamal key generator](https://github.com/TheAlgorithms/Python/blob/master/ciphers/elgamal_key_generator.py) + * [hill cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/hill_cipher.py) + * [morse Code implementation](https://github.com/TheAlgorithms/Python/blob/master/ciphers/morse_Code_implementation.py) + * [onepad cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/onepad_cipher.py) + * [playfair cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/playfair_cipher.py) + * [prehistoric men](https://github.com/TheAlgorithms/Python/blob/master/ciphers/prehistoric_men.txt) + * [rabin miller](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rabin_miller.py) * [rot13](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rot13.py) - * [trafid cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/trafid_cipher.py) - * [vigenere cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/vigenere_cipher.py) + * [rsa cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rsa_cipher.py) + * [rsa key generator](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rsa_key_generator.py) * [simple substitution cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/simple_substitution_cipher.py) - * [prehistoric men](https://github.com/TheAlgorithms/Python/blob/master/ciphers/prehistoric_men.txt) - * [base64 cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base64_cipher.py) + * [trafid cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/trafid_cipher.py) + * [transposition cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/transposition_cipher.py) * [transposition cipher encrypt decrypt file](https://github.com/TheAlgorithms/Python/blob/master/ciphers/transposition_cipher_encrypt_decrypt_file.py) - * [morse Code implementation](https://github.com/TheAlgorithms/Python/blob/master/ciphers/morse_Code_implementation.py) - * [cryptomath module](https://github.com/TheAlgorithms/Python/blob/master/ciphers/cryptomath_module.py) - * [base32](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base32.py) - * [base16](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base16.py) - * [Atbash](https://github.com/TheAlgorithms/Python/blob/master/ciphers/Atbash.py) - * [rsa key generator](https://github.com/TheAlgorithms/Python/blob/master/ciphers/rsa_key_generator.py) - * [base85](https://github.com/TheAlgorithms/Python/blob/master/ciphers/base85.py) + * [vigenere cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/vigenere_cipher.py) + * [xor cipher](https://github.com/TheAlgorithms/Python/blob/master/ciphers/xor_cipher.py) ## Compression * [huffman](https://github.com/TheAlgorithms/Python/blob/master/compression/huffman.py) ## Data Structures - * [LCA](https://github.com/TheAlgorithms/Python/blob/master/data_structures/LCA.py) * [arrays](https://github.com/TheAlgorithms/Python/blob/master/data_structures/arrays.py) * [avl](https://github.com/TheAlgorithms/Python/blob/master/data_structures/avl.py) + * [LCA](https://github.com/TheAlgorithms/Python/blob/master/data_structures/LCA.py) * Binary Tree * [AVL tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/AVL_tree.py) - * [treap](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/treap.py) - * [fenwick tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/fenwick_tree.py) * [binary search tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/binary_search_tree.py) - * [segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/segment_tree.py) + * [fenwick tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/fenwick_tree.py) * [lazy segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/lazy_segment_tree.py) + * [segment tree](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/segment_tree.py) + * [treap](https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary%20tree/treap.py) * Hashing - * [hash table](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/hash_table.py) * [double hash](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/double_hash.py) + * [hash table](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/hash_table.py) * [hash table with linked list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/hash_table_with_linked_list.py) * [quadratic probing](https://github.com/TheAlgorithms/Python/blob/master/data_structures/hashing/quadratic_probing.py) * Number Theory @@ -60,22 +60,22 @@ * Heap * [heap](https://github.com/TheAlgorithms/Python/blob/master/data_structures/heap/heap.py) * Linked List - * [is Palindrome](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/is_Palindrome.py) - * [swapNodes](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/swapNodes.py) * [doubly linked list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/doubly_linked_list.py) + * [is Palindrome](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/is_Palindrome.py) * [singly linked list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/singly_linked_list.py) + * [swapNodes](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/swapNodes.py) * Queue * [double ended queue](https://github.com/TheAlgorithms/Python/blob/master/data_structures/queue/double_ended_queue.py) * [queue on list](https://github.com/TheAlgorithms/Python/blob/master/data_structures/queue/queue_on_list.py) * [queue on pseudo stack](https://github.com/TheAlgorithms/Python/blob/master/data_structures/queue/queue_on_pseudo_stack.py) * Stacks - * [infix to prefix conversion](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/infix_to_prefix_conversion.py) * [balanced parentheses](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/balanced_parentheses.py) - * [stock span problem](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/stock_span_problem.py) - * [stack](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/stack.py) * [infix to postfix conversion](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/infix_to_postfix_conversion.py) - * [postfix evaluation](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/postfix_evaluation.py) + * [infix to prefix conversion](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/infix_to_prefix_conversion.py) * [next](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/next.py) + * [postfix evaluation](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/postfix_evaluation.py) + * [stack](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/stack.py) + * [stock span problem](https://github.com/TheAlgorithms/Python/blob/master/data_structures/stacks/stock_span_problem.py) * Trie * [trie](https://github.com/TheAlgorithms/Python/blob/master/data_structures/trie/trie.py) * Union Find @@ -85,77 +85,77 @@ * Filters * [median filter](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/filters/median_filter.py) ## Dynamic Programming - * [subset generation](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/subset_generation.py) - * [rod cutting](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/rod_cutting.py) - * [max sub array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/max_sub_array.py) - * [fast fibonacci](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/fast_fibonacci.py) * [abbreviation](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/abbreviation.py) - * [longest common subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_common_subsequence.py) - * [knapsack](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/knapsack.py) - * [minimum partition](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/minimum_partition.py) - * [matrix chain order](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/matrix_chain_order.py) - * [Fractional Knapsack](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/Fractional_Knapsack.py) - * [coin change](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/coin_change.py) - * [k means clustering tensorflow](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/k_means_clustering_tensorflow.py) - * [longest sub array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_sub_array.py) - * [longest increasing subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_increasing_subsequence.py) * [bitmask](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/bitmask.py) + * [coin change](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/coin_change.py) * [edit distance](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/edit_distance.py) + * [fast fibonacci](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/fast_fibonacci.py) + * [fibonacci](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/fibonacci.py) * [floyd warshall](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/floyd_warshall.py) + * [Fractional Knapsack](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/Fractional_Knapsack.py) * [integer partition](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/integer_partition.py) + * [k means clustering tensorflow](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/k_means_clustering_tensorflow.py) + * [knapsack](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/knapsack.py) + * [longest common subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_common_subsequence.py) + * [longest increasing subsequence](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_increasing_subsequence.py) * [longest increasing subsequence O(nlogn)](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_increasing_subsequence_O(nlogn).py) - * [fibonacci](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/fibonacci.py) + * [longest sub array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/longest_sub_array.py) + * [matrix chain order](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/matrix_chain_order.py) + * [max sub array](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/max_sub_array.py) + * [minimum partition](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/minimum_partition.py) + * [rod cutting](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/rod_cutting.py) + * [subset generation](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/subset_generation.py) ## File Transfer Protocol * [ftp client server](https://github.com/TheAlgorithms/Python/blob/master/file_transfer_protocol/ftp_client_server.py) * [ftp send receive](https://github.com/TheAlgorithms/Python/blob/master/file_transfer_protocol/ftp_send_receive.py) ## Graphs - * [page rank](https://github.com/TheAlgorithms/Python/blob/master/graphs/page_rank.py) - * [minimum spanning tree prims](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_prims.py) - * [dijkstra](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra.py) - * [check bipartite graph dfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/check_bipartite_graph_dfs.py) - * [articulation points](https://github.com/TheAlgorithms/Python/blob/master/graphs/articulation_points.py) - * [bfs shortest path](https://github.com/TheAlgorithms/Python/blob/master/graphs/bfs_shortest_path.py) - * [prim](https://github.com/TheAlgorithms/Python/blob/master/graphs/prim.py) - * [finding bridges](https://github.com/TheAlgorithms/Python/blob/master/graphs/finding_bridges.py) - * [depth first search](https://github.com/TheAlgorithms/Python/blob/master/graphs/depth_first_search.py) - * [Directed and Undirected (Weighted) Graph](https://github.com/TheAlgorithms/Python/blob/master/graphs/Directed_and_Undirected_(Weighted)_Graph.py) * [a star](https://github.com/TheAlgorithms/Python/blob/master/graphs/a_star.py) - * [bellman ford](https://github.com/TheAlgorithms/Python/blob/master/graphs/bellman_ford.py) + * [articulation points](https://github.com/TheAlgorithms/Python/blob/master/graphs/articulation_points.py) * [basic graphs](https://github.com/TheAlgorithms/Python/blob/master/graphs/basic_graphs.py) - * [tarjans scc](https://github.com/TheAlgorithms/Python/blob/master/graphs/tarjans_scc.py) - * [check bipartite graph bfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/check_bipartite_graph_bfs.py) - * [even tree](https://github.com/TheAlgorithms/Python/blob/master/graphs/even_tree.py) - * [Eulerian path and circuit for undirected graph](https://github.com/TheAlgorithms/Python/blob/master/graphs/Eulerian_path_and_circuit_for_undirected_graph.py) - * [dijkstra 2](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra_2.py) - * [scc kosaraju](https://github.com/TheAlgorithms/Python/blob/master/graphs/scc_kosaraju.py) + * [bellman ford](https://github.com/TheAlgorithms/Python/blob/master/graphs/bellman_ford.py) * [BFS](https://github.com/TheAlgorithms/Python/blob/master/graphs/BFS.py) + * [bfs shortest path](https://github.com/TheAlgorithms/Python/blob/master/graphs/bfs_shortest_path.py) * [breadth first search](https://github.com/TheAlgorithms/Python/blob/master/graphs/breadth_first_search.py) - * [minimum spanning tree kruskal](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_kruskal.py) + * [check bipartite graph bfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/check_bipartite_graph_bfs.py) + * [check bipartite graph dfs](https://github.com/TheAlgorithms/Python/blob/master/graphs/check_bipartite_graph_dfs.py) + * [depth first search](https://github.com/TheAlgorithms/Python/blob/master/graphs/depth_first_search.py) + * [DFS](https://github.com/TheAlgorithms/Python/blob/master/graphs/DFS.py) + * [dijkstra](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra.py) + * [dijkstra 2](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra_2.py) + * [dijkstra algorithm](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra_algorithm.py) + * [Directed and Undirected (Weighted) Graph](https://github.com/TheAlgorithms/Python/blob/master/graphs/Directed_and_Undirected_(Weighted)_Graph.py) * [edmonds karp multiple source and sink](https://github.com/TheAlgorithms/Python/blob/master/graphs/edmonds_karp_multiple_source_and_sink.py) + * [Eulerian path and circuit for undirected graph](https://github.com/TheAlgorithms/Python/blob/master/graphs/Eulerian_path_and_circuit_for_undirected_graph.py) + * [even tree](https://github.com/TheAlgorithms/Python/blob/master/graphs/even_tree.py) + * [finding bridges](https://github.com/TheAlgorithms/Python/blob/master/graphs/finding_bridges.py) * [floyd warshall](https://github.com/TheAlgorithms/Python/blob/master/graphs/floyd_warshall.py) - * [dijkstra algorithm](https://github.com/TheAlgorithms/Python/blob/master/graphs/dijkstra_algorithm.py) - * [kahns algorithm topo](https://github.com/TheAlgorithms/Python/blob/master/graphs/kahns_algorithm_topo.py) - * [multi hueristic astar](https://github.com/TheAlgorithms/Python/blob/master/graphs/multi_hueristic_astar.py) * [graph list](https://github.com/TheAlgorithms/Python/blob/master/graphs/graph_list.py) * [graph matrix](https://github.com/TheAlgorithms/Python/blob/master/graphs/graph_matrix.py) * [kahns algorithm long](https://github.com/TheAlgorithms/Python/blob/master/graphs/kahns_algorithm_long.py) - * [DFS](https://github.com/TheAlgorithms/Python/blob/master/graphs/DFS.py) + * [kahns algorithm topo](https://github.com/TheAlgorithms/Python/blob/master/graphs/kahns_algorithm_topo.py) + * [minimum spanning tree kruskal](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_kruskal.py) + * [minimum spanning tree prims](https://github.com/TheAlgorithms/Python/blob/master/graphs/minimum_spanning_tree_prims.py) + * [multi hueristic astar](https://github.com/TheAlgorithms/Python/blob/master/graphs/multi_hueristic_astar.py) + * [page rank](https://github.com/TheAlgorithms/Python/blob/master/graphs/page_rank.py) + * [prim](https://github.com/TheAlgorithms/Python/blob/master/graphs/prim.py) + * [scc kosaraju](https://github.com/TheAlgorithms/Python/blob/master/graphs/scc_kosaraju.py) + * [tarjans scc](https://github.com/TheAlgorithms/Python/blob/master/graphs/tarjans_scc.py) ## Hashes * [chaos machine](https://github.com/TheAlgorithms/Python/blob/master/hashes/chaos_machine.py) - * [sha1](https://github.com/TheAlgorithms/Python/blob/master/hashes/sha1.py) * [md5](https://github.com/TheAlgorithms/Python/blob/master/hashes/md5.py) + * [sha1](https://github.com/TheAlgorithms/Python/blob/master/hashes/sha1.py) ## Linear Algebra Python * Src * [lib](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra_python/src/lib.py) * [tests](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra_python/src/tests.py) ## Machine Learning - * [scoring functions](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/scoring_functions.py) - * [perceptron](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/perceptron.py) + * [decision tree](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/decision_tree.py) * [gradient descent](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/gradient_descent.py) * [k means clust](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/k_means_clust.py) - * [decision tree](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/decision_tree.py) - * [logistic regression](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/logistic_regression.py) * [linear regression](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/linear_regression.py) + * [logistic regression](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/logistic_regression.py) + * [perceptron](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/perceptron.py) + * [scoring functions](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/scoring_functions.py) * Random Forest Classification * [random forest classification](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Classification/random_forest_classification.py) * [Social Network Ads](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Classification/Social_Network_Ads.csv) @@ -163,120 +163,120 @@ * [Position Salaries](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Regression/Position_Salaries.csv) * [random forest regression](https://github.com/TheAlgorithms/Python/blob/master/machine_learning/Random%20Forest%20Regression/random_forest_regression.py) ## Maths - * [Find Max](https://github.com/TheAlgorithms/Python/blob/master/maths/Find_Max.py) - * [Hanoi](https://github.com/TheAlgorithms/Python/blob/master/maths/Hanoi.py) - * [extended euclidean algorithm](https://github.com/TheAlgorithms/Python/blob/master/maths/extended_euclidean_algorithm.py) + * [3n+1](https://github.com/TheAlgorithms/Python/blob/master/maths/3n+1.py) + * [abs](https://github.com/TheAlgorithms/Python/blob/master/maths/abs.py) + * [abs Max](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_Max.py) + * [abs Min](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_Min.py) + * [average](https://github.com/TheAlgorithms/Python/blob/master/maths/average.py) * [basic maths](https://github.com/TheAlgorithms/Python/blob/master/maths/basic_maths.py) + * [Binary Exponentiation](https://github.com/TheAlgorithms/Python/blob/master/maths/Binary_Exponentiation.py) + * [extended euclidean algorithm](https://github.com/TheAlgorithms/Python/blob/master/maths/extended_euclidean_algorithm.py) + * [factorial python](https://github.com/TheAlgorithms/Python/blob/master/maths/factorial_python.py) + * [factorial recursive](https://github.com/TheAlgorithms/Python/blob/master/maths/factorial_recursive.py) * [fermat little theorem](https://github.com/TheAlgorithms/Python/blob/master/maths/fermat_little_theorem.py) + * [fibonacci](https://github.com/TheAlgorithms/Python/blob/master/maths/fibonacci.py) + * [fibonacci sequence recursion](https://github.com/TheAlgorithms/Python/blob/master/maths/fibonacci_sequence_recursion.py) + * [find lcm](https://github.com/TheAlgorithms/Python/blob/master/maths/find_lcm.py) + * [Find Max](https://github.com/TheAlgorithms/Python/blob/master/maths/Find_Max.py) + * [Find Min](https://github.com/TheAlgorithms/Python/blob/master/maths/Find_Min.py) * [greater common divisor](https://github.com/TheAlgorithms/Python/blob/master/maths/greater_common_divisor.py) + * [Hanoi](https://github.com/TheAlgorithms/Python/blob/master/maths/Hanoi.py) * [lucasSeries](https://github.com/TheAlgorithms/Python/blob/master/maths/lucasSeries.py) - * [abs](https://github.com/TheAlgorithms/Python/blob/master/maths/abs.py) - * [abs Max](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_Max.py) - * [simpson rule](https://github.com/TheAlgorithms/Python/blob/master/maths/simpson_rule.py) - * [factorial recursive](https://github.com/TheAlgorithms/Python/blob/master/maths/factorial_recursive.py) + * [modular exponential](https://github.com/TheAlgorithms/Python/blob/master/maths/modular_exponential.py) * [newton raphson](https://github.com/TheAlgorithms/Python/blob/master/maths/newton_raphson.py) - * [Find Min](https://github.com/TheAlgorithms/Python/blob/master/maths/Find_Min.py) - * [trapezoidal rule](https://github.com/TheAlgorithms/Python/blob/master/maths/trapezoidal_rule.py) - * [find lcm](https://github.com/TheAlgorithms/Python/blob/master/maths/find_lcm.py) - * [Binary Exponentiation](https://github.com/TheAlgorithms/Python/blob/master/maths/Binary_Exponentiation.py) - * [segmented sieve](https://github.com/TheAlgorithms/Python/blob/master/maths/segmented_sieve.py) - * [fibonacci sequence recursion](https://github.com/TheAlgorithms/Python/blob/master/maths/fibonacci_sequence_recursion.py) * [Prime Check](https://github.com/TheAlgorithms/Python/blob/master/maths/Prime_Check.py) - * [average](https://github.com/TheAlgorithms/Python/blob/master/maths/average.py) - * [modular exponential](https://github.com/TheAlgorithms/Python/blob/master/maths/modular_exponential.py) - * [fibonacci](https://github.com/TheAlgorithms/Python/blob/master/maths/fibonacci.py) - * [3n+1](https://github.com/TheAlgorithms/Python/blob/master/maths/3n+1.py) + * [segmented sieve](https://github.com/TheAlgorithms/Python/blob/master/maths/segmented_sieve.py) * [sieve of eratosthenes](https://github.com/TheAlgorithms/Python/blob/master/maths/sieve_of_eratosthenes.py) - * [abs Min](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_Min.py) - * [factorial python](https://github.com/TheAlgorithms/Python/blob/master/maths/factorial_python.py) + * [simpson rule](https://github.com/TheAlgorithms/Python/blob/master/maths/simpson_rule.py) + * [trapezoidal rule](https://github.com/TheAlgorithms/Python/blob/master/maths/trapezoidal_rule.py) * Tests * [test fibonacci](https://github.com/TheAlgorithms/Python/blob/master/maths/tests/test_fibonacci.py) ## Matrix - * [searching in sorted matrix](https://github.com/TheAlgorithms/Python/blob/master/matrix/searching_in_sorted_matrix.py) * [matrix multiplication addition](https://github.com/TheAlgorithms/Python/blob/master/matrix/matrix_multiplication_addition.py) + * [searching in sorted matrix](https://github.com/TheAlgorithms/Python/blob/master/matrix/searching_in_sorted_matrix.py) ## Networking Flow - * [minimum cut](https://github.com/TheAlgorithms/Python/blob/master/networking_flow/minimum_cut.py) * [ford fulkerson](https://github.com/TheAlgorithms/Python/blob/master/networking_flow/ford_fulkerson.py) + * [minimum cut](https://github.com/TheAlgorithms/Python/blob/master/networking_flow/minimum_cut.py) ## Neural Network - * [perceptron](https://github.com/TheAlgorithms/Python/blob/master/neural_network/perceptron.py) - * [convolution neural network](https://github.com/TheAlgorithms/Python/blob/master/neural_network/convolution_neural_network.py) * [bpnn](https://github.com/TheAlgorithms/Python/blob/master/neural_network/bpnn.py) + * [convolution neural network](https://github.com/TheAlgorithms/Python/blob/master/neural_network/convolution_neural_network.py) + * [perceptron](https://github.com/TheAlgorithms/Python/blob/master/neural_network/perceptron.py) ## Other - * [password generator](https://github.com/TheAlgorithms/Python/blob/master/other/password_generator.py) - * [fischer yates shuffle](https://github.com/TheAlgorithms/Python/blob/master/other/fischer_yates_shuffle.py) - * [words](https://github.com/TheAlgorithms/Python/blob/master/other/words) - * [palindrome](https://github.com/TheAlgorithms/Python/blob/master/other/palindrome.py) - * [frequency finder](https://github.com/TheAlgorithms/Python/blob/master/other/frequency_finder.py) - * [primelib](https://github.com/TheAlgorithms/Python/blob/master/other/primelib.py) - * [word patterns](https://github.com/TheAlgorithms/Python/blob/master/other/word_patterns.py) * [anagrams](https://github.com/TheAlgorithms/Python/blob/master/other/anagrams.py) + * [binary exponentiation](https://github.com/TheAlgorithms/Python/blob/master/other/binary_exponentiation.py) + * [binary exponentiation 2](https://github.com/TheAlgorithms/Python/blob/master/other/binary_exponentiation_2.py) * [detecting english programmatically](https://github.com/TheAlgorithms/Python/blob/master/other/detecting_english_programmatically.py) - * [finding Primes](https://github.com/TheAlgorithms/Python/blob/master/other/finding_Primes.py) * [dictionary](https://github.com/TheAlgorithms/Python/blob/master/other/dictionary.txt) * [euclidean gcd](https://github.com/TheAlgorithms/Python/blob/master/other/euclidean_gcd.py) - * [sierpinski triangle](https://github.com/TheAlgorithms/Python/blob/master/other/sierpinski_triangle.py) - * [binary exponentiation 2](https://github.com/TheAlgorithms/Python/blob/master/other/binary_exponentiation_2.py) - * [binary exponentiation](https://github.com/TheAlgorithms/Python/blob/master/other/binary_exponentiation.py) + * [finding Primes](https://github.com/TheAlgorithms/Python/blob/master/other/finding_Primes.py) + * [fischer yates shuffle](https://github.com/TheAlgorithms/Python/blob/master/other/fischer_yates_shuffle.py) + * [frequency finder](https://github.com/TheAlgorithms/Python/blob/master/other/frequency_finder.py) * [linear congruential generator](https://github.com/TheAlgorithms/Python/blob/master/other/linear_congruential_generator.py) * [n queens](https://github.com/TheAlgorithms/Python/blob/master/other/n_queens.py) * [nested brackets](https://github.com/TheAlgorithms/Python/blob/master/other/nested_brackets.py) + * [palindrome](https://github.com/TheAlgorithms/Python/blob/master/other/palindrome.py) + * [password generator](https://github.com/TheAlgorithms/Python/blob/master/other/password_generator.py) + * [primelib](https://github.com/TheAlgorithms/Python/blob/master/other/primelib.py) + * [sierpinski triangle](https://github.com/TheAlgorithms/Python/blob/master/other/sierpinski_triangle.py) * [tower of hanoi](https://github.com/TheAlgorithms/Python/blob/master/other/tower_of_hanoi.py) * [two sum](https://github.com/TheAlgorithms/Python/blob/master/other/two_sum.py) + * [word patterns](https://github.com/TheAlgorithms/Python/blob/master/other/word_patterns.py) + * [words](https://github.com/TheAlgorithms/Python/blob/master/other/words) * Game Of Life - * [sample](https://github.com/TheAlgorithms/Python/blob/master/other/game_of_life/sample.gif) * [game o life](https://github.com/TheAlgorithms/Python/blob/master/other/game_of_life/game_o_life.py) + * [sample](https://github.com/TheAlgorithms/Python/blob/master/other/game_of_life/sample.gif) ## Project Euler * Problem 01 - * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol3.py) - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol2.py) - * [sol6](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol6.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol1.py) - * [sol5](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol5.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol2.py) + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol3.py) * [sol4](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol4.py) + * [sol5](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol5.py) + * [sol6](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_01/sol6.py) * Problem 02 - * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol3.py) - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol2.py) + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol3.py) * [sol4](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_02/sol4.py) * Problem 03 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_03/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_03/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_03/sol2.py) * Problem 04 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_04/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_04/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_04/sol2.py) * Problem 05 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_05/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_05/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_05/sol2.py) * Problem 06 - * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol3.py) - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol2.py) + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_06/sol3.py) * Problem 07 - * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol3.py) - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol2.py) + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_07/sol3.py) * Problem 08 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_08/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_08/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_08/sol2.py) * Problem 09 - * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol3.py) - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol2.py) + * [sol3](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol3.py) * Problem 10 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_10/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_10/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_10/sol2.py) * Problem 11 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_11/sol2.py) * [grid](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_11/grid.txt) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_11/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_11/sol2.py) * Problem 12 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_12/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_12/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_12/sol2.py) * Problem 13 * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_13/sol1.py) * Problem 14 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_14/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_14/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_14/sol2.py) * Problem 15 * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_15/sol1.py) * Problem 16 @@ -286,19 +286,19 @@ * Problem 19 * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_19/sol1.py) * Problem 20 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_20/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_20/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_20/sol2.py) * Problem 21 * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_21/sol1.py) * Problem 22 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol2.py) - * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol1.py) * [p022 names](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/p022_names.txt) + * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_22/sol2.py) * Problem 24 * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_24/sol1.py) * Problem 25 - * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol2.py) * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol1.py) + * [sol2](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol2.py) * Problem 28 * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_28/sol1.py) * Problem 29 @@ -319,56 +319,56 @@ * [sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_76/sol1.py) ## Searches * [binary search](https://github.com/TheAlgorithms/Python/blob/master/searches/binary_search.py) + * [interpolation search](https://github.com/TheAlgorithms/Python/blob/master/searches/interpolation_search.py) + * [jump search](https://github.com/TheAlgorithms/Python/blob/master/searches/jump_search.py) + * [linear search](https://github.com/TheAlgorithms/Python/blob/master/searches/linear_search.py) + * [quick select](https://github.com/TheAlgorithms/Python/blob/master/searches/quick_select.py) * [sentinel linear search](https://github.com/TheAlgorithms/Python/blob/master/searches/sentinel_linear_search.py) + * [tabu search](https://github.com/TheAlgorithms/Python/blob/master/searches/tabu_search.py) * [tabu test data](https://github.com/TheAlgorithms/Python/blob/master/searches/tabu_test_data.txt) - * [quick select](https://github.com/TheAlgorithms/Python/blob/master/searches/quick_select.py) - * [test interpolation search](https://github.com/TheAlgorithms/Python/blob/master/searches/test_interpolation_search.py) * [ternary search](https://github.com/TheAlgorithms/Python/blob/master/searches/ternary_search.py) - * [linear search](https://github.com/TheAlgorithms/Python/blob/master/searches/linear_search.py) - * [tabu search](https://github.com/TheAlgorithms/Python/blob/master/searches/tabu_search.py) - * [interpolation search](https://github.com/TheAlgorithms/Python/blob/master/searches/interpolation_search.py) + * [test interpolation search](https://github.com/TheAlgorithms/Python/blob/master/searches/test_interpolation_search.py) * [test tabu search](https://github.com/TheAlgorithms/Python/blob/master/searches/test_tabu_search.py) - * [jump search](https://github.com/TheAlgorithms/Python/blob/master/searches/jump_search.py) ## Simple Client - * [server](https://github.com/TheAlgorithms/Python/blob/master/simple_client/server.py) * [client](https://github.com/TheAlgorithms/Python/blob/master/simple_client/client.py) + * [server](https://github.com/TheAlgorithms/Python/blob/master/simple_client/server.py) ## Sorts - * [topological sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/topological_sort.py) - * [shell sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/shell_sort.py) - * [quick sort 3 partition](https://github.com/TheAlgorithms/Python/blob/master/sorts/quick_sort_3_partition.py) - * [Odd-Even transposition parallel](https://github.com/TheAlgorithms/Python/blob/master/sorts/Odd-Even_transposition_parallel.py) + * [Bitonic Sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/Bitonic_Sort.py) + * [bogo sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bogo_sort.py) + * [bubble sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bubble_sort.py) * [bucket sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bucket_sort.py) - * [quick sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/quick_sort.py) - * [Odd-Even transposition single-threaded](https://github.com/TheAlgorithms/Python/blob/master/sorts/Odd-Even_transposition_single-threaded.py) - * [merge sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/merge_sort.py) + * [cocktail shaker sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/cocktail_shaker_sort.py) + * [comb sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/comb_sort.py) + * [counting sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/counting_sort.py) * [cycle sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/cycle_sort.py) - * [pancake sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/pancake_sort.py) - * [insertion sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/insertion_sort.py) + * [external sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/external_sort.py) * [gnome sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/gnome_sort.py) - * [bubble sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bubble_sort.py) - * [random normal distribution quicksort](https://github.com/TheAlgorithms/Python/blob/master/sorts/random_normal_distribution_quicksort.py) + * [heap sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/heap_sort.py) + * [insertion sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/insertion_sort.py) + * [merge sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/merge_sort.py) * [merge sort fastest](https://github.com/TheAlgorithms/Python/blob/master/sorts/merge_sort_fastest.py) - * [tim sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/tim_sort.py) - * [selection sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/selection_sort.py) - * [bogo sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bogo_sort.py) + * [Odd-Even transposition parallel](https://github.com/TheAlgorithms/Python/blob/master/sorts/Odd-Even_transposition_parallel.py) + * [Odd-Even transposition single-threaded](https://github.com/TheAlgorithms/Python/blob/master/sorts/Odd-Even_transposition_single-threaded.py) + * [pancake sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/pancake_sort.py) + * [pigeon sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/pigeon_sort.py) + * [quick sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/quick_sort.py) + * [quick sort 3 partition](https://github.com/TheAlgorithms/Python/blob/master/sorts/quick_sort_3_partition.py) * [radix sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/radix_sort.py) - * [counting sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/counting_sort.py) + * [random normal distribution quicksort](https://github.com/TheAlgorithms/Python/blob/master/sorts/random_normal_distribution_quicksort.py) + * [random pivot quick sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/random_pivot_quick_sort.py) + * [selection sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/selection_sort.py) + * [shell sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/shell_sort.py) + * [tests](https://github.com/TheAlgorithms/Python/blob/master/sorts/tests.py) + * [tim sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/tim_sort.py) + * [topological sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/topological_sort.py) * [tree sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/tree_sort.py) * [wiggle sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/wiggle_sort.py) - * [external sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/external_sort.py) - * [heap sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/heap_sort.py) - * [tests](https://github.com/TheAlgorithms/Python/blob/master/sorts/tests.py) - * [cocktail shaker sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/cocktail_shaker_sort.py) - * [random pivot quick sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/random_pivot_quick_sort.py) - * [comb sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/comb_sort.py) - * [pigeon sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/pigeon_sort.py) - * [Bitonic Sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/Bitonic_Sort.py) ## Strings - * [rabin karp](https://github.com/TheAlgorithms/Python/blob/master/strings/rabin_karp.py) * [knuth morris pratt](https://github.com/TheAlgorithms/Python/blob/master/strings/knuth_morris_pratt.py) - * [naive String Search](https://github.com/TheAlgorithms/Python/blob/master/strings/naive_String_Search.py) - * [min cost string conversion](https://github.com/TheAlgorithms/Python/blob/master/strings/min_cost_string_conversion.py) * [levenshtein distance](https://github.com/TheAlgorithms/Python/blob/master/strings/levenshtein_distance.py) * [manacher](https://github.com/TheAlgorithms/Python/blob/master/strings/manacher.py) + * [min cost string conversion](https://github.com/TheAlgorithms/Python/blob/master/strings/min_cost_string_conversion.py) + * [naive String Search](https://github.com/TheAlgorithms/Python/blob/master/strings/naive_String_Search.py) + * [rabin karp](https://github.com/TheAlgorithms/Python/blob/master/strings/rabin_karp.py) ## Traversals * [binary tree traversals](https://github.com/TheAlgorithms/Python/blob/master/traversals/binary_tree_traversals.py) diff --git a/script.py b/script.py index e51b91529ba1..4a2c61c83563 100644 --- a/script.py +++ b/script.py @@ -16,7 +16,7 @@ def tree(d, ignores, ignores_ext): def _markdown(parent, ignores, ignores_ext, depth): out = "" - dirs = [] + dirs, files = [], [] for i in os.listdir(parent): full = os.path.join(parent, i) name, ext = os.path.splitext(i) @@ -27,9 +27,14 @@ def _markdown(parent, ignores, ignores_ext, depth): pre = parent.replace("./", "").replace(" ", "%20") # replace all spaces to safe URL child = i.replace(" ", "%20") - out += " " * depth + "* [" + name.replace("_", " ") + "](" + URL + pre + "/" + child + ")\n" + files.append((pre, child, name)) else: dirs.append(i) + # Sort files + files.sort(key=lambda e: e[2].lower()) + for f in files: + pre, child, name = f + out += " " * depth + "* [" + name.replace("_", " ") + "](" + URL + pre + "/" + child + ")\n" # Sort directories dirs.sort() for i in dirs: @@ -59,6 +64,7 @@ def _markdown(parent, ignores, ignores_ext, depth): ".yml" ] + if __name__ == "__main__": with open("DIRECTORY.md", "w+") as f: f.write(tree(".", ignores, ignores_ext)) From 2198d0e104feabb0cf9da91f43a7fa7819ba2e37 Mon Sep 17 00:00:00 2001 From: John Law Date: Mon, 17 Jun 2019 18:17:19 +0800 Subject: [PATCH 3/3] Rename script.py to ~script.py --- script.py => ~script.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename script.py => ~script.py (100%) diff --git a/script.py b/~script.py similarity index 100% rename from script.py rename to ~script.py