Skip to content
Permalink
Branch: master
Commits on Jul 6, 2020
  1. Numerous fixes to directed_and_undirected_(weighted)_graph.py (#2182)

    cclauss committed Jul 6, 2020
    * Numerous fixes to directed_and_undirected_(weighted)_graph.py
    
    * dict.keys() is almost never need in modern Python
  2. isort --profile black . (#2181)

    cclauss and github-actions committed Jul 6, 2020
    * updating DIRECTORY.md
    
    * isort --profile black .
    
    * Black after
    
    * updating DIRECTORY.md
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  3. isort --profile black --recursive . (#2170)

    cclauss committed Jul 6, 2020
    * isort --profile black --recursive .
    
    * Update codespell.yml
    
    * typo: vertices
    
    * typo: Explanation
    
    * typo: Explanation
    
    * Fix typos
Commits on Jul 5, 2020
  1. Gale Shapley Algorithm (#2100)

    akashvshroff and cclauss committed Jul 5, 2020
    * Gale Shapley Algorithm
    
    Implementation of a Nobel prize-winning algorithm that determines a stable matching in a bipartite graph.
    
    * Update graphs/gale_shapley_bigraph.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Fixed some flake8 issues.
    
    * Updated it to donors and recipients
    
    * description changes
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * description changes
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * description changes
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Edited the line lengths
    
    * Update gale_shapley_bigraph.py
    
    * Update gale_shapley_bigraph.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on Jul 4, 2020
  1. double_linear_search algorithm (#2161)

    reinhold-b and cclauss committed Jul 4, 2020
    * linear search iterating from both array sides
    
    * Update double_linear_search.py
    
    * Update double_linear_search.py
    
    * added doctests
    
    * updated doctests
    
    * Update double_linear_search.py
    
    * Update double_linear_search.py
    
    * added blank after >>>
    
    * made all the requested changes
    
    * Update double_linear_search.py
    
    * Update double_linear_search.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  2. black (#2166)

    itsvinayak and cclauss committed Jul 4, 2020
    * black
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * flake8 error fix
    
    * Remove unreachable code
    
    * union
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on Jul 3, 2020
  1. Update matrix_operation.py (#2159)

    3 people committed Jul 3, 2020
    * Update matrix_operation.py
    
    * Update matrix_operation.py
    
    * Update matrix_operation.py
    
    * use yapf to format the code
    
    * recover the error check
    
    * add typing hint
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * add float doctest
    
    * black formated
    
    * Update searching_in_sorted_matrix.py
    
    * recover this file
    
    * f-string, typing hint , doctest
    
    * Update matrix_operation.py
    
    * Update searching_in_sorted_matrix.py
    
    * Update matrix_operation.py
    
    * Update matrix/matrix_operation.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    Co-authored-by: vinayak <itssvinayak@gmail.com>
  2. Rename shortest_job_first_algorithm.py to shortest_job_first.py (#2164)

    cclauss and github-actions committed Jul 3, 2020
    * Rename shortest_job_first_algorithm.py to shortest_job_first.py
    
    * updating DIRECTORY.md
    
    * Minor tweek to round_robin.py
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  3. Add round_robin scheduling algorithm (#2158)

    3 people committed Jul 3, 2020
    * round_robin and priority cpu scheduling algorithms
    
    * Delete priority_cpu_scheduling.py
    
    * Delete round_robin_algorithm.py
    
    * [add] cpu_scheduling_algorithms
    
    * [add] Round robin cpu scheduling algorithm
    
    * Update scheduling/round_robin_scheduling_algorithm.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update scheduling/round_robin.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update scheduling/round_robin_scheduling.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update scheduling/round_robin_scheduling.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update scheduling/round_robin.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Round_Robin
    
    * Update round_robin.py
    
    * Update round_robin.py
    
    * Update round_robin.py
    
    * Update round_robin.py
    
    Co-authored-by: pawanbuddy <46370996+pawanbuddy@users.noreply.github.com>
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on Jul 2, 2020
  1. black fixes and Travis CI fixes (#2160)

    itsvinayak and github-actions committed Jul 2, 2020
    * black format
    
    * updating DIRECTORY.md
    
    * fixes
    
    * fixup! Format Python code with psf/black push
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Added minimum cost path algorithm (#2135)

    ruppysuppy committed Jul 2, 2020
    * Added maximum path sum for matrix (top left to bottom right)
    
    * Changed maximum cost path to minimum cost path + added video explaination
Commits on Jun 25, 2020
  1. Only one carriage return (#2155)

    cclauss and github-actions committed Jun 25, 2020
    * updating DIRECTORY.md
    
    * touch
    
    * fixup! Format Python code with psf/black push
    
    * Update word_frequency_functions.py
    
    * updating DIRECTORY.md
    
    * Update word_frequency_functions.py
    
    * Update lfu_cache.py
    
    * Update sol1.py
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Add url and typing hint for BFS (#2156)

    wuyudi and cclauss committed Jun 25, 2020
    * Add typing for bfs
    
    * Add url for BFS
    
    * rename the function
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update graphs/bfs.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Change the return value type of bfs
    
    * change the function name.
    
    change all instances of bfs() to breadth_first_search().
    
    * change the function name in annotate
    
    * Add one more blank line.
    
    * Delete one blank line.
    
    * Delete one blank line.
    
    I've read the https://www.flake8rules.com/rules/W391.html, and still don't know how to do it. I've tried using 0 ,1,2 blank lines...
    
    * Update graphs/bfs.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update graphs/bfs.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Rename bfs.py to breadth_first_search_2.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  3. project_euler/problem_47/sol1.py (#2150)

    MarkMoretto and cclauss committed Jun 25, 2020
    * Create __init__.py
    
    * Initial commit
    
    Not sure if this should be formatted differently.  I'm open to ideas!
    
    * Completing testing/updates
    
    Ran code through `black`, `flake8`, and `doctest`.  Added some type hints.
    
    `doctest` is finicky on sets, so I had to sort and reformat as set to pass those tests.
    
    * Update project_euler/problem_47/sol1.py
    
    Nice.
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Looks good
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Okay, this should work.  Thank you for the reminder on map(), filter(), reduce().
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    My IDE needs a spellchecker.  Or, lighter comment font.
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    This means that `results = run(N)` should be updated to `results = run(n)`, correct?
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Looks good!
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_47/sol1.py
    
    Works for me! I spent way too much time getting this to pass doctest, so any improvement is welcome.
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update sol1.py
    
    Added some suggested changes from the pull request:
    * Updated tests outputs in `unique_prime_factors` function.
    * Changed `@lru_cache(maxsize=5)` to `@lru_cache(maxsize=None)`
    * Removed duplicate `return` line in `equality` function
    * Changed `i` to `base` in run function.
    * Added some commentary to `run()` function.
    * Replaced `group = list(map(lambda x: base + x, [i for i in range(n)]))` with `group = [base + i for i in range(n)]`
    
    * Update sol1.py
    
    * Trailing whitespace
    
    * Update sol1.py
    
    * Update __init__.py
    
    * Update sol1.py
    
    * Update __init__.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  4. Added LFU Cache (#2151)

    ruppysuppy and cclauss committed Jun 25, 2020
    * Added LFU Cache
    
    * Update lfu_cache.py
    
    * None is returned
    
    * Add type hints
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  5. Added LRU Cache (#2138)

    ruppysuppy committed Jun 25, 2020
    * Added LRU Cache
    
    * Optimized the program
    
    * Added Cache as Decorator + Implemented suggestions
    
    * Implemented suggestions
  6. NLP Word Frequency Algorithms (#2142)

    danmurphy1217 and cclauss committed Jun 25, 2020
    * NLP Word Frequency Algorithms
    
    * Added type hints and Wikipedia link to tf-idf
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Fix line length for flake8
    
    * Fix line length for flake8 V2
    
    * Add line escapes and change int to float
    
    * Corrected doctests
    
    * Fix for TravisCI
    
    * Fix for TravisCI V2
    
    * Tests passing locally
    
    * Tests passing locally
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update machine_learning/word_frequency_functions.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Add doctest examples and clean up docstrings
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  7. Update avl_tree.py (#2145)

    zky001 and cclauss committed Jun 25, 2020
    * Update avl_tree.py
    
    it's true definition of AVL tree,change  left and right rotation,and add avl_tree doctest
    
    * Update avl_tree.py
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update data_structures/binary_tree/avl_tree.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update avl_tree.py
    
    update some function name and update doctest
    
    * Update avl_tree.py
    
    change some code format to fit flake8 review
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  8. Typehints + refactor (#2154)

    mateuszz0000 committed Jun 25, 2020
  9. Added doctests to OddEvenTraposition (#2152)

    mateuszz0000 committed Jun 25, 2020
    * Added doctests
    
    * Change __main__ content
Commits on Jun 23, 2020
  1. Add doctests to radix_sort() (#2148)

    cclauss and github-actions committed Jun 23, 2020
    * Add doctests to radix_sort()
    
    * fixup! Format Python code with psf/black push
    
    * Update radix_sort.py
    
    * updating DIRECTORY.md
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Added Markov Chain (#2146)

    ruppysuppy committed Jun 23, 2020
    * Added Markov Chain
    
    * Implemented suggestions
Commits on Jun 22, 2020
  1. hamming_code.py: Reduce McCabe code complexity (#2140)

    cclauss and github-actions committed Jun 22, 2020
    * hamming_code.py: Reduce McCabe code complexity
    
    As discussed in #2128
    
    * fixup! Format Python code with psf/black push
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Euler problem 551 sol 1: Reduce McCabe code complexity (#2141)

    cclauss and github-actions committed Jun 22, 2020
    * Euler problem 551 sol 1: Reduce McCabe code complexity
    
    As discussed in #2128
    
    * fixup! Format Python code with psf/black push
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Commits on Jun 19, 2020
  1. add visualization of k means clustering as excel format (#2104)

    beqakd and cclauss committed Jun 19, 2020
    * add visualization of kmneas clust as excel format
    
    * style changes
    
    * style changes
    
    * Add doctest and typehint!
    
    * style change
    
    * Update machine_learning/k_means_clust.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update machine_learning/k_means_clust.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on Jun 18, 2020
  1. Added (Open) Knight Tour Algorithm (#2132)

    ruppysuppy committed Jun 18, 2020
    * Added (Open) Knight Tour Algorithm
    
    * Implemented Suggestions
Commits on Jun 17, 2020
  1. Add lempel ziv compression (#2107)

    iko1133 committed Jun 17, 2020
    * Added lempel-ziv compression algorithm implementation
    
    * Added lempel-ziv decompression algorithm implementation
    
    * Reformatted lempel-ziv compress/decompress files using black
    
    * Added type hints and some other modifications (Doctests coming up)
    
    * Shortened several lines to comply with the standards
  2. Implement prefix function, knuth-morris-pratt another usage (#2099)

    3 people committed Jun 17, 2020
    * Implement prefix function, knuth-morris-pratt another usage
    
    * fixup! Format Python code with psf/black push
    
    * Fix style
    
    * updating DIRECTORY.md
    
    * Update prefix_function.py
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
    Co-authored-by: Christian Clauss <cclauss@me.com>
  3. Strongly connected components (#2114)

    3 people committed Jun 17, 2020
    * Implement strongly connected components for graph algorithms
    
    * fixup! Format Python code with psf/black push
    
    * Delete trailing whitespace
    
    * updating DIRECTORY.md
    
    * Add doctests and typehints
    
    * Remove unnecessary comments, change variable names
    
    * fixup! Format Python code with psf/black push
    
    * Change undefined variable's name
    
    * Apply suggestions from code review
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
    Co-authored-by: Christian Clauss <cclauss@me.com>
  4. Implement connected components algorithm for graphs (#2113)

    nikalosa and github-actions committed Jun 17, 2020
    * Implement connected components algorithm for graphs
    
    * fixup! Format Python code with psf/black push
    
    * Add parameters and return values annotations with Python type hints
    
    * updating DIRECTORY.md
    
    * Add doctests and typehints
    
    * Remove unnecessary comments, change variable names
    
    * fixup! Format Python code with psf/black push
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  5. Added maximum non-adjacent sum (#2130)

    ruppysuppy and cclauss committed Jun 17, 2020
    * Added maximum non-adjacent sum
    
    * Bugfix: flake8 test
    
    * Implemented changes (broke tuple unpacking into 2 lines due to flake8 tests)
    
    * Implemented changes v2.0
    
    * Update max_non_adjacent_sum.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  6. Added doctests to bucket sort (#2079)

    3 people committed Jun 17, 2020
    * Added doctests to bucket sort
    
    * Missing typehint
    
    * Wrap long lines
    
    * updating DIRECTORY.md
    
    * Update bucket_sort.py
    
    * updating DIRECTORY.md
    
    * Update bucket_sort.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  7. Create change_brightness.py (#2126)

    furkanatesli and cclauss committed Jun 17, 2020
    * Create change_brightness.py
    
    * Update change_brightness.py
    
    * Update change_brightness.py
    
    * Update change_brightness.py
    
    * Update change_brightness.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on Jun 16, 2020
  1. Blacken our code (#2125)

    cclauss and github-actions committed Jun 16, 2020
    * Blacken
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Hash djb2 (#2098)

    bnMikheili and cclauss committed Jun 16, 2020
    * implement hash
    
    * fix flake8 error
    
    * Update hashes/djb2.py
    
    * Update hashes/djb2.py
    
    * Long lines
    
    * def djb2(s: str) -> int:
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Older
You can’t perform that action at this time.