Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBlacken one_dimensional.py #1911
Merged
Conversation
Ubuntu 20.04 LTS (Focal Fossa) https://releases.ubuntu.com/focal
|
Thank you! |
| @@ -1,5 +1,5 @@ | |||
| os: linux | |||
| dist: bionic | |||
| dist: focal | |||
This comment has been minimized.
This comment has been minimized.
BurhanH
added a commit
to BurhanH/Python
that referenced
this pull request
May 18, 2020
* Improve doctest and comment for maximum sub-array problem (#1503)
* Doctest and comment for maximum sub-array problem
More examples and description for max_sub_array.py
* Update max_sub_array.py
* Update max_sub_array.py
* Fix doctest
* Page replacement algorithm, LRU (#871)
* Page replacement algorithm, LRU
* small rectifications
* Rename paging/LRU.py to other/least_recently_used.py
* Addition of Secant Method (#876)
* Add files via upload
* Update secant_method.py
* Remove unused import
* Remove unused import
* Create GAN.py (#1445)
* Create GAN.py
* gan update
* Delete train-labels-idx1-ubyte.gz
* Update GAN.py
* Update GAN.py
* Delete GAN.py
* Create gan.py
* Update gan.py
* input_data import file
* Update dictionary.txt (#1507)
Added a new word Microfinance. This is one of the recently added word in oxford dictionary
* Update greatest_common_divisor.py (#1513)
Add Doctests.
* Update palindrome.py (#1509)
* Update palindrome.py
Add Doctests.
* Use test_data to drive the testing
* :white_check_mark: added tests for Perceptron in Neural Networks (#1506)
* :white_check_mark: added tests for Perceptron in Neural Networks
* Space
* Format code with psf/black
* Add doctests to other/word_patterns.py (#1518)
* Create prime_numbers.py (#1519)
* Create prime_numbers.py
* Update prime_numbers.py
* Update basic_maths.py (#1517)
* Update basic_maths.py
Add Doctests.
* Update basic_maths.py
* Add a space to fix the doctest
* Factors of a number (#1493)
* Factors of a number
* Update factors.py
* Fix mypy issue in basic_maths.py
* Fix mypy error in perceptron.py
* def primes(max: int) -> List[int]:
* Update binomial_heap.py
* Add a space
* Remove a space
* Add a space
* average_mode.py (#1491)
* Add files via upload
Finds the mode in the input data.
* Update average_mode.py
* Update average_mode.py
* Update average_mode.py
* Update average_mode.py
* Update average_mode.py
* Update average_mode.py
* Tabs do not belong in Python files!
* Simplified DES (#1382)
* Simplified DES
* Add files via upload
Diffie Hellman algorithm to generate a secret key.
* Update sdes.py
* Format code with psf/black and add doctests
* Update quick_select.py (#1523)
* Update quick_select.py
Add Doctests.
* Add typehints
* Don't pre-allocate "smaller" and "larger"
* Doctest, type hints and bug in LIS_O(nlogn) (#1525)
* Update longest_increasing_subsequence_o(nlogn).py
* Update longest_increasing_subsequence_o(nlogn).py
* Euler Problem 27 solution script Added (#1466)
* Add files via upload
* Update DIRECTORY.md
* Create sol1.py
* Update sol1.py
* Create __init__.py
* Update DIRECTORY.md
* Delete isotonic.py
* Update sol1.py
* Problem_27_project_euler
* project_euler/Problem_27/sol1.py
* project_euler/Problem_27/sol1.py
* project_euler/problem_27/
* project_euler/problem_27
* project_euler/problem_27
* update sol1 of Euler Problem 27 solution script Added
* Remove slow test, wrap long comments, format with psf/black
* Delete __init__.py
* Add type hints
* Add doctests to function is_prime()
* Rename project_euler/problem_27/project_euler/problem_27/sol1.pysol1.py to project_euler/problem_27/problem_27_sol1.py
* perfect square (#1534)
* perfect square
* perfect square
* Added Problem 33 (#1440)
* Create sol1.py
* Create __init__.py
* Update sol1.py
* corrected range
* Update sol1.py
* update factorial (#1535)
* update factorial
* update factorial
* add max sum contigous subsequence (#1537)
* add max sum contigous subsequence
* fix typo
* Add doctest and type hints
* Create autoblack.yml
* recursive quick sort (#1536)
* recursive quick sort
* recursive quick sort
* Delete recursive-quick-sort
* Update recursive-quick-sort.py
* Non-recursive Segment Tree implementation (#1543)
* Non-recursive Segment Tree implementation
* Added type hints and explanations links
* Travis CI: Write & print DIRECTORY.md on one line (#1542)
* travis test
* travis pull ID test
* get pr branch test
* retry pr build
* test pushing back - probable git error for origin 'not found'
* github auth?
* add .sh
* chmod
* add index update for permission fix
* run sh for script
* add all
* add pull directory
* fetch pr branch
* swap placement of adding commits
* rotate
* quit trying to update Travis
* formatting leftovers
* Travis CI: Write & print DIRECTORY.md on one line
* added solution 1 for problem_99 in project_euler (#1545)
* Create sol1.py
* Create __init__.py
* Update sol1.py
* corrected range
* Add files via upload
* Update DIRECTORY.md
* Create sol1.py
* Update sol1.py
* Create __init__.py
* Update DIRECTORY.md
* Delete isotonic.py
* Update sol1.py
* Problem_27_project_euler
* project_euler/Problem_27/sol1.py
* project_euler/Problem_27/sol1.py
* project_euler/problem_27/
* project_euler/problem_27
* project_euler/problem_27
* update sol1 of Euler Problem 27 solution script Added
* Remove slow test, wrap long comments, format with psf/black
* Delete __init__.py
* Add type hints
* Add doctests to function is_prime()
* Rename project_euler/problem_27/project_euler/problem_27/sol1.pysol1.py to project_euler/problem_27/problem_27_sol1.py
* Added Problem 33
* added solution 1 for problem_99
* update added solution 1 for problem_99
* update
* Update sol1.py
* add floor() (#1551)
* ceil and floor
* ceil and floor
* Porta cipher (#1550)
* directory_writer
* add porta cipher for #1492
* formatting and one line comprehensions
* remove directory_writer
* indentions
* Wrap long lines
* Doctest and typing for longest_increasing_subsequence.py (#1526)
* Update longest_increasing_subsequence.py
* Update longest_increasing_subsequence.py
* Format longest_increasing_subsequence.py to PEP8
* Update longest_increasing_subsequence.py
* Add sol3 for project_euler problem_03 (#1553)
* Add sol3 for project_euler proble_03
* Update sol3.py
add type hint
remove unused variable
* Format code with psf/black
* added rsa_factorization.py (#1556)
* added RSA_factorization.py
This algorithm can effectively factor RSA large prime N given public key e and private key d.
* Rename RSA_factorization.py to rsa_factorization.py
* Add definitions for d, e, and N
* Improved on Singly Linked List Programs (#1558)
* Improved Singly Linked List
Added String Representations of Nodes and Linked Lists
Added support for indexing and changing of Node data using indices.
* Added a few comments to Linked Lists
* Reformatted to conform to PEP8
* Added from_sequence.py
Convert a Python List to Linked List comprising of Nodes and return head.
* Added print_reverse.py
Recursive program to print the elements of a Linked List in reverse.
* Change 'is not None' for more Pythonicness
* Fix bug in bellman_ford.py (#1544)
* Python Program that fetches top trending news (#1559)
* Python Program that fetches top trending news
* Python Program that fetches top trending news
* Revisions in Fetch BBC News
* Added a new Python script and some changes in existing one (#1560)
* Python Program that fetches top trending news
* Python Program that fetches top trending news
* Revisions in Fetch BBC News
* psf/black Changes
* Python Program to send slack message to a channel
* Slack Message Revision Changes
* Moved to TheAlgorithms/Jupyter (#1563)
https://github.com/TheAlgorithms/Jupyter/tree/master/other
* Panagram Script Added (#1564)
* Python Program that fetches top trending news
* Python Program that fetches top trending news
* Revisions in Fetch BBC News
* psf/black Changes
* Python Program to send slack message to a channel
* Slack Message Revision Changes
* Python Program to check Palindrome String
* Doctest Added
* Python Program to check whether a String is Panagram or not
* Python Program to check whether a String is Panagram or not
* Check Panagram Script Added
* Panagram Script Added
* Anagram Script Changes
* Anagram Alphabet Check Added
* Python Program to fetch github info
* add sol3 to project_euler/problem_08 (#1557)
* Add sol3 for project_euler proble_03
* Update sol3.py
add type hint
remove unused variable
* Format code with psf/black
* add sol3 to project_euler/problem_08, modify the stepsize of the loop,will be faster than sol1
* GitHub Action formats our code with psf/black (#1569)
* GitHub Action formats our code with psf/black
@poyea Your review please.
* fixup! Format Python code with psf/black push
* directory_writer (#1) (#1549)
* directory_writer
* fixup: Format Python code with psf/black
* fixup: DIRECTORY.md
* fix implementation errors. (#1568)
I revised my implementation and found out that I have miss a inner loop for t. x and y should be recalculated everytime when t is divisble by 2. I have also included a more readble source for this algorithm.
* Remove Duplicate Script Added (#1570)
* Added Remove duplicate script and updated requirements.txt
* Requirements.txt Updated
* Remove Duplicate Script Added
* Directory Modified
* Directory.md Updated
* changed implementation of GitHub action to auto update DIRECTORY.md (#1571)
* changed implementation of GitHub action to auto update DIRECTORY.md
* updating DIRECTORY.md
* || true (#1572)
* || true
* 3.8
* python: 3.x
* Fix indentation contains tabs (flake8 E101,W191) (#1573)
* Word Occurence Script Added (#1576)
* Word Occurence Script Added
* Word Occurence Script Updated
* Added doctest using collections.Counter
https://docs.python.org/3/library/collections.html#collections.Counter
* Add pytest-cov (#1578)
* Add pytest-cov
Also added coverage report in .travis.yml file.
* updating DIRECTORY.md
* Sort by missing statements
* sort = Cover
* Remove code with side effects from main (#1577)
* Remove code with side effects from main
When running tests withy pytest, some modules execute code in main scope
and open plot or browser windows.
Moves such code under `if __name__ == "__main__"`.
* fixup! Format Python code with psf/black push
* Adding circular_queue.py (#1574)
* Create circular_queue.py
Circular Queue implementation using python list with fixed range.
* Update circular_queue.py
* Update circular_queue.py
* Update circular_queue.py
* Update circular_queue.py
* Update circular_queue.py
* doctest: Catch "Exception: UNDERFLOW"
* Deal with the fluent interface for cq.enqueue()
* Test the fluent interface
* Reverse Words (#1581)
* Word Occurence Script Added
* Word Occurence Script Updated
* Added doctest using collections.Counter
https://docs.python.org/3/library/collections.html#collections.Counter
* Reverse Word Script Added
* Reverse Word Script Added
* Reverse Word Script Added
* Reverse Word Script Added
* Word Occurence Script Added
* Reverse Word Script Added
* Reverse Word Script Added
* Reverse Words DocTest Updated
* Word Occurence Updated
* Doctest Updated
* Doctest Updated
* Doctest Updated
* Adds operations for circular linked list (#1584)
* Adds, append, len, print operations for circular linked list
* Adds, prepend support
* Adds, delete from front of the list
* Adds, delete_rear support
* Adds, method documentations
* Adds, type checking and doctests
* Updates doctest for delete ops
* Addressing requested changes
* Removes unused import
* Fixes failing doctests
* Minor modifications...
* Improve bellman_ford.py (#1575)
* Fix out of range error in bellman_ford.py
* Update bellman_ford.py
* fixup! Format Python code with psf/black push
* Enhance the print function
* fixup! Format Python code with psf/black push
* Update gaussian_filter.py (#1548)
* Update gaussian_filter.py
Changed embedded for loops with product. This way range(dst_height) is called only once, instead of being called $dst_height.
* Update gaussian_filter.py
fixed missing width
* Tabs --> spaces in quine_mc_cluskey.py (#1426)
* Tabs --> spaces in quine_mc_cluskey.py
* fixup! Format Python code with psf/black push
* Fractional knapsack (#1524)
* Add files via upload
* Added doctests, type hints, f-strings, URLs
* Rename knapsack.py to fractional_knapsack.py
* Rename graphs/fractional_knapsack.py to dynamic_programming/fractional_knapsack_2.py
* Update README.md (#1588)
* Update README.md
* python -m unittest -v
* added current stock price (#1590)
* added current stock price
* Ten lines or less
* Implemented simple keyword cipher (#1589)
* Implemented simple keyword cipher
* Added documentation and improved input processing
* Allow object's hash function to be called
* added to string functionality
* reverted
* Revised according to pull request #1589
* Optimized imports
* Update simple_keyword_cypher.py
* Update hash_table.py
* Update singly_linked_list.py (#1593)
* Update singly_linked_list.py
printing current.data rather than node address in __repr__ for a more readable print statement
* eval(repr(c)) == c
The output of `__repr__()` _should look like a valid Python expression that could be used to recreate an object with the same value_.
https://docs.python.org/3.4/reference/datamodel.html#object.__repr__
* += --> +
* Adding Linear Discriminant Analysis (#1592)
* Adding new file to the machine_learning directory
* Adding initial documentation
* importing modules
* Adding Normal_gen function
* Adding Y_gen function
* Adding mean_calc function
* Adding prob_calc function
* Adding var_calc function
* Adding predict function
* Adding accuracy function
* Adding main function
* Renaming LDA file
* Adding requested changes
* Renaming some of functions
* Refactoring str.format() statements to f-string
* Removing unnecessary list objects inside two functions
* changing code style in some lines
* Fixing y_generator function
* Refactoring 'predict_y_values' function by using list comprehensions
* Changing code style in import statements
* Refactoring CLI code block
* fixup! Format Python code with psf/black push
* No lines longer than 88 characters
* GitHub Action to mark stale issues and pull requests (#1594)
* converting generator object to a list object (#1602)
* converting generator object to a list object
* Refactor: converting generator object to a list object
* fixup! Format Python code with psf/black push
* Typo in a comment (#1603)
* add a generic heap (#906)
* add a generic heap
* Delete __init__.py
* Rename data_structures/Heap/heap_generic.py to data_structures/heap/heap_generic.py
* Add doctests
* Fix doctests
* Fix doctests again
* Improve prim.py (#1226)
* suiting PEP8
* create auxiliary function
* running example
* updating DIRECTORY.md
* Pythagoras (#1243)
* add pythagoras.py
* function distance
* run as script
* Update pythagoras.py
* Code for Eulers Totient function (#1229)
* Create eulersTotient.py
* Rename eulersTotient.py to eulers_totient.py
* Update eulers_totient.py
* fixed bug (#1610)
Removed comma from print statement causing and error.
* Added Multilayer Perceptron (sklearn) (#1609)
* Added Multilayer Perceptron ( sklearn)
* Rename MLPClassifier.py to multilayer_preceptron_classifier.py
* Rename multilayer_preceptron_classifier.py to multilayer_perceptron_classifier.py
* Update multilayer_perceptron_classifier.py
* address merge_soft duplicate files (#1612)
Here the old file merge_sort_fastest is renamed to unknown_sort. Because it is not merge sort algorithm.
Comments are updated accordingly.
* add the index calculation class at digital_image_processing and the hamming code algorithm at hashes (#1152)
* add the index calculation at difital_image_processing file
* make changes at index_calculation
* update the variables to self variables at functions
* update the word wrap in comments at index_calculation
* add the hamming code algorithm
* Wrap long lines
* pigeonhole sorting in python (#364)
* pigeonhole sorting in python
* variable name update in pigeonhole_sort.py
* Add doctest
* improved prime numbers implementation (#1606)
* improved prime numbers implementation
* fixup! Format Python code with psf/black push
* fix type hint
* fixup! Format Python code with psf/black push
* fix doctests
* updating DIRECTORY.md
* added prime tests with negative numbers
* using for instead filter
* updating DIRECTORY.md
* Remove unused typing.List
* Remove tab indentation
* print("Sorted order is:", " ".join(a))
* Improved readability (#1615)
* improved readability
* further readability improvements
* removed csv file and added f
* Simplify sudoku.is_completed() using builtin all() (#1608)
* Simplify sudoku.is_completed() using builtin all()
Simplify __sudoku.is_completed()__ using Python builtin function [__all()__](https://docs.python.org/3/library/functions.html#all).
* fixup! Format Python code with psf/black push
* Update sudoku.py
* fixup! Format Python code with psf/black push
* Old style exception -> new style for Python 3
* updating DIRECTORY.md
* Update convex_hull.py
* fixup! Format Python code with psf/black push
* e.args[0] = "msg"
* ValueError: could not convert string to float: 'pi'
* Update convex_hull.py
* fixup! Format Python code with psf/black push
* Adding doctests into LDA algorithm (#1621)
* Adding doctests into <gaussian_distribution> function
* Adding doctests into <y_generator> function
* Adding doctests into <calculate_mean> function
* Adding doctests into <calculate_probabilities> function
* Adding doctests into <calculate_variance> function
* Adding doctests into <predict_y_values> function
* Adding doctests into <accuracy> function
* fixup! Format Python code with psf/black push
* Update convex_hull.py
* Update convex_hull.py
* Fixed issue #1368 (#1482)
* Changed as suggested
Now return in same format as oct() returns
* Slight change
* Fixed issue #1368, return values for large number now is fixed and does not return in scientific notation
* Update decimal_to_octal.py
* Update odd_even_transposition_parallel.py (#1458)
* Update odd_even_transposition_parallel.py
* arr = OddEvenTransposition(arr)
* digital_image_processing/convert_to_negative (#1216)
* digital_image_processing/convert_to_negative
* added doc
* added test code
* Update convert_to_negative.py
* Image processing algorithms added (#616)
* Image processing algorithms added
* Example images included
* Issues resolved
* class added
* Naming issues fixes
* Create file_path
* Remove \r from strings (#1622)
* Remove \r from strings
* Satisfy tensorflow with numpy>=1.17.4
* Update find_min.py (#1627)
Line 5: :return: max number in list
"max" must be "min"
* Harmonic Geometric and P-Series Added (#1633)
* Harmonic Geometric and P-Series Added
* Editing comments
* Update and rename series/Geometric_Series.py to maths/series/geometric_series.py
* Update and rename series/Harmonic_Series.py to maths/series/harmonic_series.py
* Update and rename series/P_Series.py to maths/series/p_series.py
* Bug Fixed in newton_raphson_method.py (#1634)
* Bug Fixed
* Fixed newton_raphson_method.py
* Fixed newton_raphson_method.py 2
* Fixed newton_raphson_method.py 3
* Fixed newton_raphson_method.py 4
* Fixed newton_raphson_method.py 5
* Fixed newton_raphson_method.py 6
* Update newton_raphson_method.py
* Update newton_raphson_method.py
* # noqa: F401, F403
* newton_raphson
* newton_raphson
* precision: int=10 ** -10
* return float(x)
* 3.1415926536808043
* Update newton_raphson_method.py
* 2.23606797749979
* Update newton_raphson_method.py
* Rename newton_raphson_method.py to newton_raphson.py
* adding doctests on coin_change.py and fixed some typos (#1337)
* adding doctests on coin_change.py
* fixed some typos
* Update lib.py
* file iterating_through_submasks.py for given mask is added in dynamic_programming (#1635)
* new file *iterating_through_submasks* is added in dynamic_programming section
* no changes
* *iterating_through_submasks.py is added in dynamic_programming
* iterating_through_submasks is added with doctests
* iterating_through_submasks.py is added in dynamic_programming
* changes made in *iterating_through_submasks.py
* changes made in *iterating_through_submasks.py
* updated
* Add docstr and algorithm to BFS shortest path module (#1637)
* Add docs and type alias to bfs_shortest_path.py
* Add bfs_shortest_path_distance algorithm
* Make requested changes
* other/integeration_by_simpson_approx.py is added for approximate integeration (#1638)
* new file *iterating_through_submasks* is added in dynamic_programming section
* no changes
* *iterating_through_submasks.py is added in dynamic_programming
* iterating_through_submasks is added with doctests
* iterating_through_submasks.py is added in dynamic_programming
* changes made in *iterating_through_submasks.py
* changes made in *iterating_through_submasks.py
* updated
* *other/integeration_by_simpson_approx.py added
* *other/integeration_by_simpson_approx.py Added for integeration
* Delete iterating_through_submasks.py
* Delete DIRECTORY.md
* Revert "updated"
This reverts commit 73456f85de03782b7d3c794eca8390a4fe87037c.
* changes made *integeration_by_simpson_approx.py
* update2
Co-authored-by: Christian Clauss <[email protected]>
* Fixed warning string for Key B = 0 (#1639)
* Fixed warning string for Key B = 0
* Update affine_cipher.py
* Update affine_cipher.py
* decrypt_message(encrypt_message())
Co-authored-by: Christian Clauss <[email protected]>
* Create roman_to_integer.py (#1636)
* added roman to integer conversion (LeetCode No. 13)
* updated directory to include Roman to Integer
* Delete DIRECTORY.md
* Update roman_to_integer.py
Co-authored-by: Christian Clauss <[email protected]>
* Update binary_search_tree.py (#1339)
* Update binary_search_tree.py
remove some bugs
* Update binary_search_tree.py
* Update binary_search_tree.py
* Update binary_search_tree.py
* Update binary_search_tree.py
* Update binary_search_tree.py
* Update binary_search_tree.py
* testlist = (8, 3, 6, 1, 10, 14, 13, 4, 7)
* Update .travis.yml
Co-authored-by: Christian Clauss <[email protected]>
* Stack using double linked list (#1413)
* Stack using double linked list
* Test with doctests
* Update stack_using_dll.py
* Update stack_using_dll.py
* Update stack_using_dll.py
Co-authored-by: Christian Clauss <[email protected]>
* Added binary exponentiaion with respect to modulo (#1428)
* Added binary exponentiaion with respect to modulo
* Added miller rabin: the probabilistic primality test for large numbers
* Removed unused import
* Added test for miller_rabin
* Add test to binary_exp_mod
* Removed test parameter to make Travis CI happy
* unittest.main() # doctest: +ELLIPSIS ...
* Update binary_exp_mod.py
* Update binary_exp_mod.py
* Update miller_rabin.py
* from .prime_check import prime_check
Co-authored-by: Christian Clauss <[email protected]>
* Update back_propagation_neural_network.py (#1342)
* Update back_propagation_neural_network.py
Added comments below functions
* Update back_propagation_neural_network.py
Co-authored-by: Christian Clauss <[email protected]>
* actions/checkout@v2 (#1643)
* actions/checkout@v2
https://github.com/actions/checkout/releases
* fixup! Format Python code with psf/black push
* pyupgrade --py37-plus **/*.py (#1654)
* pyupgrade --py37-plus **/*.py
* fixup! Format Python code with psf/black push
* Dijkstra's Bankers algorithm (#1650)
* Dijkstra's Bankers algorithm
@bluedistro, Your review please. A second shot at #1645
Implementation of the Dijkstra's Banker's algorithm with test examples and a comprehensible description.
* fixup! Format Python code with psf/black push
* Delete back_propagation_neural_network.py
* Create back_propagation_neural_network.py
* fixup! Format Python code with psf/black push
* Add files via upload (#1657)
* update volumes with type hints + some refactoring (#1353)
* update volumes with type hints + some refactoring
* added docstrings
* Use float instead of ints in doctest results
Co-authored-by: Christian Clauss <[email protected]>
* Create deque_doubly.py (#1652)
* Create deque_doubly.py
Implementing Deque ADT using Doubly Linked List....
* Update deque_doubly.py
* Update deque_doubly.py
Adding doctest
* Update doctest of deque_doubly.py
* Update deque_doubly.py
* linked_list.
Co-authored-by: Christian Clauss <[email protected]>
* Create get_imdb_top_250_movies_csv.py (#1659)
* Create get_imdb_top_250_movies_csv.py
* Update get_imdb_top_250_movies_csv.py
* Update get_imdb_top_250_movies_csv.py
* get_imdb_top_250_movies()
Co-authored-by: Christian Clauss <[email protected]>
* New Code!!(Finding the N Possible Binary Search Tree and Binary Tree from Given N node Number) (#1663)
* Code Upload
* Code Upload
* Delete n_possible_bst
* Find the N Possible Binary Tree and Binary Tree from given Nth Number of Node.
* Update in Test
* Update and rename n_possible_bst.py to number_of_possible_binary_trees.py
Co-authored-by: Christian Clauss <[email protected]>
* added hill climbing algorithm (#1666)
* added hill climbing algorithm
* Shorten long lines, streamline get_neighbors()
* Update hill_climbing.py
* Update and rename optimization/hill_climbing.py to searches/hill_climbing.py
Co-authored-by: Christian Clauss <[email protected]>
* number of Possible Binary Search Tree and Binary Tree. (#1670)
* Code Upload
* Code Upload
* Delete n_possible_bst
* Find the N Possible Binary Tree and Binary Tree from given Nth Number of Node.
* Update in Test
* Update and rename n_possible_bst.py to number_of_possible_binary_trees.py
Co-authored-by: Christian Clauss <[email protected]>
* Typos in comments in hill_climbing.py (#1667)
* Typos in comments in hill_climbing.py
* fixup! Format Python code with psf/black push
* Update and rename lca.py to lowest_common_ancestor.py (#1664)
* Update and rename lca.py to lowest_common_ancestor.py
* fixup! Format Python code with psf/black push
* Added to maths and strings (#1642)
* Added to maths and strings
* added changes suggest by cclauss
* git add DIRECTORY.md (#1674)
* git add DIRECTORY.md
* updating DIRECTORY.md
* Added Strassen divide and conquer algorithm to multiply matrices. (#1648)
* Added Strassen divide and conquer algorithm to multiply matrices
* Divide and conquer algorith to calculate pow(a,b) or a raised to the power of b
* Putting docstring inside the function.
* Added doctests
* Corrects failing check in master (#1676)
* Add a program to evaluate a string in prefix notation (Polish Notation) (#1675)
* Create infix_evaluation.py
* fix doctests
* Rename infix_evaluation.py to prefix_evaluation.py
* Add prefix_evaluation.py to directory
* A recursive insertion sort (#1683)
* A recursive insertion sort
* added doctests and typehints
* Create pull_request_template.md (#1684)
* Create pull_request_template.md
* fixup! Format Python code with psf/black push
* Update pull_request_template.md
* updating DIRECTORY.md
* Update pull_request_template.md
* Update pull_request_template.md
* Update pull_request_template.md
* Update pull_request_template.md
* Update pull_request_template.md
* Typos and formatting
Co-authored-by: John Law <[email protected]>
* enhance swapping code in link (#1660)
* enhance swapping code in link
* heapify do not recursive
* fix
* fix identifier and add test
* typing.Any and LinkedList instead of Linkedlist
* typing.Any and LinkedList instead of Linkedlist
* Typo? (#1653)
* Typo?
newNod -> newNode
* newNode -> new_node
Co-authored-by: Christian Clauss <[email protected]>
* implement max heap and more pythonic (#1685)
* implement max heap and more pythonic
* add doctests for heap
* Implemented Square Root Algorithm (#1687)
* Added to maths and strings
* added changes suggest by cclauss
* added square root function
* Fixed type hinting
* fixed type error
* Fixed another type error
* Solution for problem 30 of Euler Project (#1690)
* Create soln.py
Solution for problem 30 of Euler Project
* Update soln.py
* update soln.py
modified the changes
* if __name__ == "__main__":
Co-authored-by: Christian Clauss <[email protected]>
* Added implementation for simulated annealing (#1679)
* added hill climbing algorithm
* Shorten long lines, streamline get_neighbors()
* Update hill_climbing.py
* Update and rename optimization/hill_climbing.py to searches/hill_climbing.py
* added hill climbing algorithm
* Shorten long lines, streamline get_neighbors()
* Update hill_climbing.py
* Rebased
* added simulated annealing.py
* added final comments and test
* black formatted
* restricted search domain
Co-authored-by: Christian Clauss <[email protected]>
* Create codespell.yml (#1698)
* fixup! Format Python code with psf/black push
* Create codespell.yml
* fixup! Format Python code with psf/black push
* Create factorial_iterative.py (#1693)
* Create factorial_iterative.py
* Update factorial_iterative.py
* Update factorial_iterative.py
* Update factorial_iterative.py
* print(f"factorial{n} is {factorial(n)}")
* Update factorial_recursive.py
Co-authored-by: Christian Clauss <[email protected]>
* Added an algorithm that approximates line lengths (#1692)
* A recursive insertion sort
* added doctests and typehints
* Added arc length and numerical integration calculators
* fixed doc test
* Fixed some conversion errors
* Fixed some commenting
* Deleted numerical integration to allow 1 file per push
* Changed string formatting method
* Area Under a Curve Algorithm (#1701)
* A recursive insertion sort
* added doctests and typehints
* Added arc length and numerical integration calculators
* fixed doc test
* Fixed some conversion errors
* Fixed some commenting
* Deleted numerical integration to allow 1 file per push
* Changed string formatting method
* Added program to calculate trapezoidal area under curve
* Deleted files ensure 1 pull request per file
* file name changed
* Update area_under_curve.py
Co-authored-by: Christian Clauss <[email protected]>
* Add Prim's algorithm with min heap (#1704)
* Adding Armstrong number (#1708)
* Adding Armstrong number
* Update armstrong_numbers
* Update armstrong_numbers.py
* Update armstrong_numbers.py
* Update armstrong_numbers.py
Co-authored-by: Christian Clauss <[email protected]>
* fix comment (#1710)
* fix comment
* Update armstrong_numbers.py
Co-authored-by: Christian Clauss <[email protected]>
* codespell --quiet-level=2 (#1711)
* codespell --quiet-level=2
Suppress the BINARY FILE warnings
* fixup! Format Python code with psf/black push
* Added implementation for Bezier Curve, under a new graphics directory. (#1713)
* Added bezier curve
* black formatted
* corrected spell check
* edited scipy import
* updated documentation for readablitity
* Update bezier_curve.py
* Update bezier_curve.py
Co-authored-by: Christian Clauss <[email protected]>
* Mandates referencing issue in PR (#1717)
* Mandates referencing issue in PR
* Update CONTRIBUTING.md
* Update pull_request_template.md
* Update pull_request_template.md
* Update pull_request_template.md
* Update CONTRIBUTING.md
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Fix typo (#1718)
* Fix typo
* updating DIRECTORY.md
* Augment binary search algorithms (#1719)
* relevant documentation added (#1725)
* Implement Manacher's algorithm (#1721)
* manacher's algorithm updated
* Added first come first served scheduling (#1722)
* Added FCFS
* Fixed spelling error
* Rename fcfs.py to first_come_first_served.py
* Fixed FCFS and added tests.
* Made changes requested
* Use enumerate() instead of range(len())
Co-authored-by: Christian Clauss <[email protected]>
* Improve collatz_sequence algorithm (#1726)
- Add more doctests and type checking to make sure only natural
numbers are used
- Simplified the algorithm slightly
This new verison is also between 10-15% faster for really
long sequences
* Added Random Forest Regressor and tested with flake8 (#1733)
* Added Random Forest Regressor
* Updated file to standard
* Travis CI: Don’t allow bare exceptions (#1734)
* Travis CI: Don’t allow bare exceptions
* fixup! Format Python code with psf/black push
* except IOError:
* except IOError:
* Update hamming_code.py
* IndexError
* Get rid of the nonsense logic
Co-authored-by: John Law <[email protected]>
* Added a Monte Carlo simulation (#1723)
* Added montecarlo.py
This algorithm uses a Monte Carlo simulation to estimate the value of pi.
* Rename montecarlo.py to maths/montecarlo.py
* Add files via upload
* Delete montecarlo.py
* Rename montecarlo.py to maths/montecarlo.py
* Update montecarlo.py
* Fixes black failures (#1742)
* Fixes LGTM issues (#1745)
* Fixes redefinition of a variable
* Fixes implementing __eq__
* Updates docstring
* Add gitpod config (#1744)
* Add gitpod config
* Add Gitpod to icon bar
* Added DP Solution for Optimal BST Problem (#1740)
* Added code to dynamic_programming directory
* Added doctest
* Elaborated BST
* Small tweaks
* Update optimal_bst.py
* Some touchups
* Fixed doctest
* Update optimal_bst.py
* Update optimal_bst.py
* Update optimal_bst.py
* Rename optimal_bst.py to optimal_binary_search_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Added Bisection algorithm (#1739)
* Create Bisection.py
Find root of
* Update Bisection.py
* Update Bisection.py
i changed the given function with one that i could make the doctests.
* Rename Bisection.py to bisection.py
* Update bisection.py
* Update bisection.py
* Update bisection.py
* Update bisection.py
* Update bisection.py
Made the changes that were requested
* Update bisection.py
* Update bisection.py
* Add wiki url
Co-authored-by: Christian Clauss <[email protected]>
* Fixes unused variable errors in LGTM (#1746)
* Fixes unsed variable errors in LGTM
* Fixes integer check
* Fixes failing tests
* Add Chudnovskys algorithm for calculating many digits of pi (#1752)
* Add Chudnovskys algorithm for calculating many digits of pi
* Update return value type hint
* Initialize partial sum to be of type Decimal
* Update chudnovsky_algorithm.py
Co-authored-by: Christian Clauss <[email protected]>
* Fixes black failures from Previous PR (#1751)
* Fixes black failures from Previous PR
* Fixes equality testing alert
* Fixes call to main() alert
* Fixes unused import
* Create RayleighQuotient.py (#1749)
* Create RayleighQuotient.py
https://en.wikipedia.org/wiki/Rayleigh_quotient
* Update RayleighQuotient.py
* Update and rename RayleighQuotient.py to rayleigh_quotient.py
* Update rayleigh_quotient.py
* Update rayleigh_quotient.py
python/black
* Update rayleigh_quotient.py
* Created geodesy section with one algorithm (#1757)
* implemented haversine
* updated docstring
Only calculate distance
* added type hints
* added type hints
* improved docstring and math usage
* f"{haversine_distance(*SAN_FRANCISCO, *YOSEMITE):0,.0f} meters"
Co-authored-by: Christian Clauss <[email protected]>
* Add Monte Carlo dice simulation algorithm (#1759)
* Implement basic dice simulation
* Add tests to throw_dice
* Fix comment
* Add type hints
* Add additional comments
* Update monte_carlo_dice.py
Co-authored-by: Christian Clauss <[email protected]>
* Update quadratic equations solver (#1764)
Use pythons complex number module cmath for the calculation of the
roots
* Added doctests in modular_exponential.py (#1775)
* added doctests in modular_exponential.py
* added doctests in modular_exponential.py
* added URL link
* Implemented geodesy - Lambert's ellipsoidal distance (#1763)
* Implemented Lambert's long line
* Update lamberts_ellipsoidal_distance.py
Co-authored-by: John Law <[email protected]>
* uses: actions/checkout@v2 (#1779)
* uses: actions/checkout@v2
* fixup! Format Python code with psf/black push
* add example to estimate area under line using montecarlo (#1782)
* add example to estimate area under line using montecarlo
* separate estimate func and print statements
* use mean from stats package
* avoid creating extra variable
* min_value: float=0.0, max_value: float=1.0
* Update montecarlo.py
* Update montecarlo.py
* Rename montecarlo.py to monte_carlo.py
* Update monte_carlo.py
Co-authored-by: Christian Clauss <[email protected]>
* extend estimation of area under curve of y=x using monte carlo simulation to any given lower and upper bound (#1784)
* extend estimation of area under curve of y=x using monte carlo simulation to any given lower and upper bound
* remove doctest
* Travis CI: Upgrade to Python 3.8 (#1783)
* Travis CI: Upgrade to Python 3.8
* updating DIRECTORY.md
* Tensorflow is not yet compatible with Python 3.8
* Disable k_means_clustering_tensorflow.py
* updating DIRECTORY.md
* Disable gan.py
* updating DIRECTORY.md
* Disable input_data.py
* updating DIRECTORY.md
* pip install a current version of six
* estimate area under a curve defined by non-negative real-valued continuous function within a continuous interval using monte-carlo (#1785)
* estimate area under a curve defined by non-negative real-valued continuous function within a continuous interval using monte-carlo
* run black; update comments
* Use f”strings” and drop unnecessary returns
Co-authored-by: Christian Clauss <[email protected]>
* Add bilateral filter (#1786)
* Added Bilateral filter
* Added Bilateral filter
* changed types of varS and varI
* formatted with black
* added type hints
* changed variable names
* Update bilateral_filter.py
* Drop transitory variables, add parse_args()
Co-authored-by: vinayak <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Create emails_from_url.py (#1756)
* Create emails_from_url.py
* Update emails_from_url.py
* Update emails_from_url.py
* 0 emails found:
* Update emails_from_url.py
* Use Python set() to remove duplicates
* Update emails_from_url.py
* Add type hints and doctests
Co-authored-by: vinayak <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* contribution guidelines checks (#1787)
* spelling corrections
* review
* improved documentation, removed redundant variables, added testing
* added type hint
* camel case to snake case
* spelling fix
* review
* python --> Python # it is a brand name, not a snake
* explicit cast to int
* spaces in int list
* "!= None" to "is not None"
* Update comb_sort.py
* various spelling corrections in documentation & several variables naming conventions fix
* + char in file name
* import dependency - bug fix
Co-authored-by: John Law <[email protected]>
* Added SkipList (#1781)
* Added SkipList
* Add missing type hints and doctests
* Add missing doctest
* Tighten up doctest
Co-authored-by: Christian Clauss <[email protected]>
* update rot13.py (#1790)
* update rot13.py
* Update rot13.py
* Type hints, doctests, URL to Wikipedia
Co-authored-by: Christian Clauss <[email protected]>
* add relu function (#1795)
* Added Random Forest Classifier (#1738)
* Added Random Forest Regressor
* Updated file to standard
* Added Random Forest Classifier (Iris dataset) and a Confusion Matrix for result visualization
* autoblack: actions/checkout@v1 # Use v1, NOT v2 (#1796)
* autoblack: actions/checkout@v1 # Use v1, NOT v2
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix typo (#1797)
colision => collision
* Effective directory writer (#1800)
* updating DIRECTORY.md
* Update directory_writer.yml
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* directory_writer: actions/checkout@v1 # Use v1, NOT v2 (#1799)
* directory_writer: actions/checkout@v1 # Use v1, NOT v2 (#1796
* updating DIRECTORY.md
* Add Monte Carlo estimation of PI (#1712)
* Add Monte Carlo estimation of PI
* Add type annotations for Monte Carlo estimation of PI
* Compare the PI estimate to PI from the math lib
* accuracy -> error
* Update pi_monte_carlo_estimation.py
Co-authored-by: John Law <[email protected]>
* Travis CI: Fix Travis linter errors (#1802)
* Travis CI: Fix Travis linter errors
* fixup! Format Python code with psf/black push
* Update .travis.yml
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix rehashing function will not call insert_data function (#1803)
* Fix rehashing function will not call insert_data function
* Fix typo
* Update loop syntax instead of allocating a list
Co-Authored-By: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* 'allocation_content_length' (#1808)
* 'allocation_content_length'
* 'allocation_number'
* Delete allocation_content_length.py
* Update allocation_number.py
* Update allocation_number.py
* number_of_bytes and partitions
* Update allocation_number.py
Co-authored-by: Christian Clauss <[email protected]>
* All suggeted changes within additional time limit tests (#1815)
* With all suggested changes :white_check_mark:
possibly covered all the recommended guidelines
* Updated with both slow and faster algorithms
possibally covered all the recomendations
* removed the time comparision part!
* Update data_structures/stacks/next_greater_element.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update data_structures/stacks/next_greater_element.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update data_structures/stacks/next_greater_element.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update data_structures/stacks/next_greater_element.py
Co-Authored-By: Christian Clauss <[email protected]>
* Add benchmark using timeit
https://docs.python.org/3/library/timeit.html
The performance delta between these two implementation is quite small...
```
next_greatest_element_slow(): 1.843442126
next_greatest_element(): 1.828941414
```
* Optimize slow() to create fast() - Three algorithms in the race
Three algorithms in the race
* Use a bigger test array with floats, negatives, zero
* Setup import next_greatest_element_fast
Co-authored-by: Christian Clauss <[email protected]>
* psf/black changes to next_greater_element.py (#1817)
* psf/black changes to next_greater_element.py
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Typo in comment rabin_karp.py (#1820)
* Update rabin_karp.py
fix: typo
* Update rabin_karp.py
Co-authored-by: Christian Clauss <[email protected]>
* Update reverse_words.py (#1825)
The following update results in less lines of code and faster performance while preserving functionality.
* Update basic_binary_tree.py (#1833)
fixed some grammar mistakes
* Update greedy.py (#1832)
* Create Python/quantum/README.md (#1834)
* Create Python/quantum/README.md
Started at #1831
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Change gitpod configuration for python3. (#1827)
* Fix typo "panagram" -> "pangram" (#1836)
* Binary search tree using recursion (#1839)
* Binary search tree using recursion
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update README.md (#1842)
* CONTRIBUTING.md: Fix comments about the black formatter (#1841)
* CONTRIBUTING.md: Fix comments about the black formatter
Fixes #1840
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
* Update FUNDING.yml (#1829)
* Update FUNDING.yml
* fixup! Format Python code with psf/black push
* Update FUNDING.yml
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Anup Kumar Panwar <[email protected]>
* Update FUNDING.yml
* Added new Algorithm to find middle element of Linked List (#1822)
* Added new Algorithm to find middle element of Linked List
* Rename MiddleElementOfLinkedList.py to middle_element_of_linked_list.py
* changed "middle_element_of_linked_list.py" algorithm for taking input
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Whack the trailing whitespace
Co-authored-by: Christian Clauss <[email protected]>
* README.md: sumab() --> sum_ab() for consistancy (#1855)
* README.md: sumab() --> sum_ab() for consistancy
consistency
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added add algorithm (#1856)
* added add algorithm
* Update and rename check/add.py to math/add.py
Co-authored-by: Christian Clauss <[email protected]>
* Test the exception conditions (#1853)
* Text exception conditions
These are ValueErrors, not AttributeErrors.
* fixup! Format Python code with psf/black push
* Update perceptron.py
* Update perceptron.py
* Update perceptron.py
* Revert the test
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix some typos in random forest classifier (#1858)
* Update year in LICENSE.md (#1848)
* Rename math/add.py to maths/add.py (#1857)
* Rename math/add.py to maths/add.py
* fixup! Format Python code with psf/black push
* Fix sum to add
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <[email protected]>
* Update g_topological_sort.py (#1873)
* Create gaussian_naive_bayes.py (#1861)
* Create Gaussian_Naive_Bayes.py
Added Gaussian Naive Bayes algorithm in the module machine learning
* Rename Gaussian_Naive_Bayes.py to gaussian_naive_bayes.py
* requirements.txt: pip install xgboost
Co-authored-by: Christian Clauss <[email protected]>
* CONTRIBUTING.md: What is an Algorithm? (#1885)
* CONTRIBUTING.md: What is an Algorithm?
We are seeing too many _how-to examples_ for using existing Python packages so we should define what we want algorithm contributions to be.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update random_forest_regressor.py (#1880)
* Update CONTRIBUTING.md (#1886)
* Update abbreviation.py (#1887)
* Initialize set with source in DFS (#1872)
* Update dfs.py
* Add type hints, rearrange doc-strings and comments
* fixup! Format Python code with psf/black push
* dfs -> depth_first_search
Co-Authored-By: Christian Clauss <[email protected]>
* dfs -> depth_first_search
* Add doctest for DFS
* fixup! Format Python code with psf/black push
* Rename dfs.py to depth_first_search_dictionary.py
* updating DIRECTORY.md
* Rename depth_first_search_dictionary.py to depth_first_search_dfs.py
* updating DIRECTORY.md
* Rename depth_first_search.py to depth_first_search_2.py
* updating DIRECTORY.md
* Rename depth_first_search_dfs.py to depth_first_search.py
* updating DIRECTORY.md
Co-authored-by: John Law <[email protected]>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
* Update breadth_first_search.py (#1869)
* Create is_palindrome.py (#1754)
* Create is_palindrome.py
* Update is_palindrome.py
* Update is_palindrome.py
Co-authored-by: Christian Clauss <[email protected]>
* Create Python/bit_manipulation/README.md (#1897)
* Create Python/bit_manipulation/README.md
To open up a new area of algorithms...
@Shrutikabansal I hope that you will contribute some of your work here.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* fix: space count in strings/word_occurrence.py (#1896)
* fix: space count in strings/word_occurrence.py
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update word_occurrence.py
Seems like, there is no need o `occurrence.pop('', None)`
Co-authored-by: Christian Clauss <[email protected]>
* Add cellular_automata directory (#1902)
Related to https://github.com/TheAlgorithms/Python/issues/1613#issuecomment-618175224 @8Dion8 Your review please. Once this land, this directory would be a great place for you to add your work.
* Update linear_search.py (#1906)
* Fix typo in Project Euler sol1.py (#1875)
* Added sepia tone (#1877)
* Add sepia tone
* Add unit test
* technic --> technique
* Update digital_image_processing/sepia.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update digital_image_processing/sepia.py
Co-Authored-By: Christian Clauss <[email protected]>
* Fixed errors after commit changes
* Fixed errors
Co-authored-by: Christian Clauss <[email protected]>
* Create one_dimensional.py (#1905)
* Create one_dimensional.py
* Update cellular_automata/one_dimensional.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update cellular_automata/one_dimensional.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update one_dimensional.py
Moved import to the top so that the type Image gets recognized
* Update one_dimensional.py
* Update cellular_automata/one_dimensional.py
* Update cellular_automata/one_dimensional.py
* Update one_dimensional.py
* Update one_dimensional.py
* Update one_dimensional.py
Co-authored-by: Christian Clauss <[email protected]>
* Blacken one_dimensional.py (#1911)
* Blacken one_dimensional.py
* updating DIRECTORY.md
* Travis CI: Upgrade to Ubuntu 20.04 LTS Focal
Ubuntu 20.04 LTS (Focal Fossa) https://releases.ubuntu.com/focal
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added A1Z26 Cipher (#1914)
* A1Z26 Cipher
* A1Z26 Cipher
* Added type hints
* Added Doctests
* removed tabs, spaces instead
* corrected doctest
* corrected doctest
* info URLs added
* Condensed decode to one line
* Condensed encode function to a single line
* Nice one!
Co-authored-by: Christian Clauss <[email protected]>
* Added Burkes dithering algorithm. (#1916)
* Added Burkes dithering algorithm
* Added unit tests for burkes algorithm
* Fix burkes algorithm
* Added some additional information
* Fixed CI tests
* Update digital_image_processing/dithering/burkes.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update digital_image_processing/dithering/burkes.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update digital_image_processing/dithering/burkes.py
Co-Authored-By: Christian Clauss <[email protected]>
* Propogate the += and add a doctest
* Fix doctest
* @staticmethod --> @ classmethod to ease testing
* def test_burkes(file_path):
* Fix for mypy checks
* Fix variable order in get_greyscale
* Fix get_greyscale method
* Fix get_greyscale method
* 3.753
Co-authored-by: Christian Clauss <[email protected]>
* Fix invalid escape sequence in binary_search_tree.py (#1920)
* Fix invalid escape sequence in binary_search_tree.py
data_structures/binary_tree/binary_search_tree.py:156
/home/travis/build/TheAlgorithms/Python/data_structures/binary_tree/binary_search_tree.py:156: DeprecationWarning: invalid escape sequence \
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Graph coloring (#1921)
* add skeleton code
* add doctests
* add mainc function pseudo code and tests (ToDo: write Implementation)
* typo fixes
* implement algorithm
* add type checking
* add wikipedia link
* typo fix
* update range syntax
Co-authored-by: Christian Clauss <[email protected]>
* change indexed iteration checking to any()
Co-authored-by: Christian Clauss <[email protected]>
* fix: swap import and documentation sections
* fix: change return none to return empty list
* remove unnecessary import (Union)
* change: remove returning boolean indicating problem was solved or not
* remove unnecessary import (Tuple)
Co-authored-by: Christian Clauss <[email protected]>
* Add shortest path by BFS (#1870)
* Create breadth_first_search_shortest_path.py
* updating DIRECTORY.md
* Reduce side effect of `shortest_path`
For the sake of future testing and documentation -
* fixup! Format Python code with psf/black push
* Fix typo `separately`
* Change to get() from dictionary
Co-Authored-By: Christian Clauss <[email protected]>
* Move graph to the top
* fixup! Format Python code with psf/black push
* Add doctest for shortest path
* Add doctest for BFS
* fixup! Format Python code with psf/black push
* Add typings for breadth_first_search_shortest_path
* fixup! Format Python code with psf/black push
* Remove assert from doctests
* Add blank line to doctest
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: John Law <[email protected]>
* Changed the deprecated `np.matrix` to `np.ndarray` (#1923)
* Wrap lines that go beyond GitHub Editor (#1925)
* Wrap lines that go beyond GiHub Editor
* flake8 --count --select=E501 --max-line-length=127
* updating DIRECTORY.md
* Update strassen_matrix_multiplication.py
* fixup! Format Python code with psf/black push
* Update decision_tree.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update stale comment (#1924)
* Update close comment
* Update stale.yml
* Multiline strings in yaml files
https://yaml-multiline.info/
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Hamiltonian Cycle (#1930)
* add skeleton code
* add doctests
* add tests for util function + implement wrapper
* full implementation
* add ability to add starting verex for algorithm
* add static type checking
* add doc tests to validation method
* bug fix: doctests expected failing
* Update hamiltonian_cycle.py
* Update hamiltonian_cycle.py
Co-authored-by: Christian Clauss <[email protected]>
* support_vector_machines.py increase error tolerance to suppress convergence warnings (#1929)
* Update support_vector_machines.py
* Update support_vector_machines.py
Co-authored-by: Christian Clauss <[email protected]>
* enhanced segment tree implementation and more pythonic (#1715)
* enhanced segment tree implementation and more pythonic
enhanced segment tree implementation and more pythonic
* add doctests for segment tree
* add type annotations
* unified processing sum min max segment tre
* delete source encoding in segment tree
* use a generator function instead of returning
* add doctests for methods
* add doctests for methods
* add doctests
* fix doctest
* fix doctest
* fix doctest
* fix function parameter and fix determine conditions
* Check if a item exist in stack or not (#1931)
* Check if a item exist in stack or not
* implemented __contains__ method in stack
* made changes in __contains__
* added method for checking armstrong number (#1936)
* added method for checking armstrong number
* Update comment
Co-authored-by: Christian Clauss <[email protected]>
* Solution for Euler Problem 26 (#1939)
* Solution for Euler Problem 26
* Update project_euler/problem_26/sol1.py
typo error fix.
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
typo error fix
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
ok to remove, this comes from Pycharm automatically when docstring is added.
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
ok to remove.
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* now_divide = now_divide * 10 % divide_by_number
Co-authored-by: Christian Clauss <[email protected]>
* Fix psf/black issues than fail the build (#1935)
* Fix psf/black issues than fail the build
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Delete FUNDING.yml
* Create sol2.py (#1876)
* Create sol2.py
* updating DIRECTORY.md
* Update DIRECTORY.md
* updating DIRECTORY.md
* Update sol2.py
* Update DIRECTORY.md
* updating DIRECTORY.md
* Improve docstrings
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: vinayak <[email protected]>
Co-authored-by: John Law <[email protected]>
* Deal with maps (#1945)
* Deal with maps
Try with the search term "pizza" to see why this was done in #1932
* fixup! Format Python code with psf/black push
* Update armstrong_numbers.py
* updating DIRECTORY.md
* Update crawl_google_results.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* change method name from front to get_front (#1943)
Co-authored-by: “Vipul <“[email protected]”>
* Added new algorithm: cracking caesar cipher with the chi-squared test (#1950)
* added decrypt_caesar_with_chi_squared.py and ran all checks
* Updated default parameters
Removed mistake with mutable default arguments
Co-authored-by: Christian Clauss <[email protected]>
* Updated handling for optional arguments
Co-authored-by: Christian Clauss <[email protected]>
* Changed return statement to tuple
Made function return a tuple instead of a list
* Added more doctests
* Fixed spelling mistakes
* black . - reformatted decrypt_caesar_with_chi_squared.py
* Updated if statements to fit the updated code
* Minimized amount of lines in the code.
Co-authored-by: Christian Clauss <[email protected]>
* Added Lstm example for stock predection (#1908)
* Added Lstm example for stock predection
* Changes after review
* changes after build failed
* Add Kiera’s to requirements.txt
* requirements.txt: Add keras and tensorflow
* psf/black
Co-authored-by: Christian Clauss <[email protected]>
* Added Shortest Job First Algorithm (#1957)
* Added Shortest Job First Algorithm
It is in IPYNB format but the dataframes are really looking good.
Please, take a look.
* Delete Shortest_Job_First_Algorithm.ipynb
* Added Shortest Job First Algorithm
* Update Shortest_Job_First Algorithm.py
* Update Shortest_Job_First Algorithm.py
* Update Shortest_Job_first Algorithm
* Added Shortest_Job_First Algorithm
* Added Shortest Job First Algorithm
* Update shortest_job_first_algorithm.py
* Format code with psf/black
Co-authored-by: Christian Clauss <[email protected]>
* Add sleep-sort (#1867)
* added sleepsort
Adding sleepsort
* Add doctest and typing for sleepsort
* Use self-descriptive variable name
* Update sleepsort.py
* Update sorts/sleepsort.py
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Add graphs/frequent_pattern_graph_miner.py (#1866)
* Add files via upload
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Whitespace changes
* Format with psf/black
Co-authored-by: Christian Clauss <[email protected]>
* Added Nearest neighbour algorithm (#1934)
* Upgrades to caesar_cipher.py (#1958)
* Added more flexibility to functions, decreased amount of repeating code
* Added docstrings
* Updated input functions
* Added doctests
* removed test piece of code
* black .
* Updated caesar cipher standard alphabet to fit python 3.8
* Update and rename sleepsort.py to sleep_sort.py
* Or 4
Co-authored-by: Christian Clauss <[email protected]>
* Travis CI: lint for useless backslashes (#1961)
* Travis CI: lint for useless backslashes
* updating DIRECTORY.md
* flake8 --max-complexity=25
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Kadanes_algorithm (#1959)
* Add files via upl…
bhanukustom
added a commit
to bhanukustom/Python
that referenced
this pull request
Sep 2, 2020
* Binary search tree using recursion (#1839)
* Binary search tree using recursion
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update README.md (#1842)
* CONTRIBUTING.md: Fix comments about the black formatter (#1841)
* CONTRIBUTING.md: Fix comments about the black formatter
Fixes #1840
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
* Update FUNDING.yml (#1829)
* Update FUNDING.yml
* fixup! Format Python code with psf/black push
* Update FUNDING.yml
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Anup Kumar Panwar <[email protected]>
* Update FUNDING.yml
* Added new Algorithm to find middle element of Linked List (#1822)
* Added new Algorithm to find middle element of Linked List
* Rename MiddleElementOfLinkedList.py to middle_element_of_linked_list.py
* changed "middle_element_of_linked_list.py" algorithm for taking input
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Update middle_element_of_linked_list.py
* Whack the trailing whitespace
Co-authored-by: Christian Clauss <[email protected]>
* README.md: sumab() --> sum_ab() for consistancy (#1855)
* README.md: sumab() --> sum_ab() for consistancy
consistency
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added add algorithm (#1856)
* added add algorithm
* Update and rename check/add.py to math/add.py
Co-authored-by: Christian Clauss <[email protected]>
* Test the exception conditions (#1853)
* Text exception conditions
These are ValueErrors, not AttributeErrors.
* fixup! Format Python code with psf/black push
* Update perceptron.py
* Update perceptron.py
* Update perceptron.py
* Revert the test
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix some typos in random forest classifier (#1858)
* Update year in LICENSE.md (#1848)
* Rename math/add.py to maths/add.py (#1857)
* Rename math/add.py to maths/add.py
* fixup! Format Python code with psf/black push
* Fix sum to add
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <[email protected]>
* Update g_topological_sort.py (#1873)
* Create gaussian_naive_bayes.py (#1861)
* Create Gaussian_Naive_Bayes.py
Added Gaussian Naive Bayes algorithm in the module machine learning
* Rename Gaussian_Naive_Bayes.py to gaussian_naive_bayes.py
* requirements.txt: pip install xgboost
Co-authored-by: Christian Clauss <[email protected]>
* CONTRIBUTING.md: What is an Algorithm? (#1885)
* CONTRIBUTING.md: What is an Algorithm?
We are seeing too many _how-to examples_ for using existing Python packages so we should define what we want algorithm contributions to be.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update random_forest_regressor.py (#1880)
* Update CONTRIBUTING.md (#1886)
* Update abbreviation.py (#1887)
* Initialize set with source in DFS (#1872)
* Update dfs.py
* Add type hints, rearrange doc-strings and comments
* fixup! Format Python code with psf/black push
* dfs -> depth_first_search
Co-Authored-By: Christian Clauss <[email protected]>
* dfs -> depth_first_search
* Add doctest for DFS
* fixup! Format Python code with psf/black push
* Rename dfs.py to depth_first_search_dictionary.py
* updating DIRECTORY.md
* Rename depth_first_search_dictionary.py to depth_first_search_dfs.py
* updating DIRECTORY.md
* Rename depth_first_search.py to depth_first_search_2.py
* updating DIRECTORY.md
* Rename depth_first_search_dfs.py to depth_first_search.py
* updating DIRECTORY.md
Co-authored-by: John Law <[email protected]>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
* Update breadth_first_search.py (#1869)
* Create is_palindrome.py (#1754)
* Create is_palindrome.py
* Update is_palindrome.py
* Update is_palindrome.py
Co-authored-by: Christian Clauss <[email protected]>
* Create Python/bit_manipulation/README.md (#1897)
* Create Python/bit_manipulation/README.md
To open up a new area of algorithms...
@Shrutikabansal I hope that you will contribute some of your work here.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* fix: space count in strings/word_occurrence.py (#1896)
* fix: space count in strings/word_occurrence.py
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update word_occurrence.py
Seems like, there is no need o `occurrence.pop('', None)`
Co-authored-by: Christian Clauss <[email protected]>
* Add cellular_automata directory (#1902)
Related to https://github.com/TheAlgorithms/Python/issues/1613#issuecomment-618175224 @8Dion8 Your review please. Once this land, this directory would be a great place for you to add your work.
* Update linear_search.py (#1906)
* Fix typo in Project Euler sol1.py (#1875)
* Added sepia tone (#1877)
* Add sepia tone
* Add unit test
* technic --> technique
* Update digital_image_processing/sepia.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update digital_image_processing/sepia.py
Co-Authored-By: Christian Clauss <[email protected]>
* Fixed errors after commit changes
* Fixed errors
Co-authored-by: Christian Clauss <[email protected]>
* Create one_dimensional.py (#1905)
* Create one_dimensional.py
* Update cellular_automata/one_dimensional.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update cellular_automata/one_dimensional.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update one_dimensional.py
Moved import to the top so that the type Image gets recognized
* Update one_dimensional.py
* Update cellular_automata/one_dimensional.py
* Update cellular_automata/one_dimensional.py
* Update one_dimensional.py
* Update one_dimensional.py
* Update one_dimensional.py
Co-authored-by: Christian Clauss <[email protected]>
* Blacken one_dimensional.py (#1911)
* Blacken one_dimensional.py
* updating DIRECTORY.md
* Travis CI: Upgrade to Ubuntu 20.04 LTS Focal
Ubuntu 20.04 LTS (Focal Fossa) https://releases.ubuntu.com/focal
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added A1Z26 Cipher (#1914)
* A1Z26 Cipher
* A1Z26 Cipher
* Added type hints
* Added Doctests
* removed tabs, spaces instead
* corrected doctest
* corrected doctest
* info URLs added
* Condensed decode to one line
* Condensed encode function to a single line
* Nice one!
Co-authored-by: Christian Clauss <[email protected]>
* Added Burkes dithering algorithm. (#1916)
* Added Burkes dithering algorithm
* Added unit tests for burkes algorithm
* Fix burkes algorithm
* Added some additional information
* Fixed CI tests
* Update digital_image_processing/dithering/burkes.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update digital_image_processing/dithering/burkes.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update digital_image_processing/dithering/burkes.py
Co-Authored-By: Christian Clauss <[email protected]>
* Propogate the += and add a doctest
* Fix doctest
* @staticmethod --> @ classmethod to ease testing
* def test_burkes(file_path):
* Fix for mypy checks
* Fix variable order in get_greyscale
* Fix get_greyscale method
* Fix get_greyscale method
* 3.753
Co-authored-by: Christian Clauss <[email protected]>
* Fix invalid escape sequence in binary_search_tree.py (#1920)
* Fix invalid escape sequence in binary_search_tree.py
data_structures/binary_tree/binary_search_tree.py:156
/home/travis/build/TheAlgorithms/Python/data_structures/binary_tree/binary_search_tree.py:156: DeprecationWarning: invalid escape sequence \
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Graph coloring (#1921)
* add skeleton code
* add doctests
* add mainc function pseudo code and tests (ToDo: write Implementation)
* typo fixes
* implement algorithm
* add type checking
* add wikipedia link
* typo fix
* update range syntax
Co-authored-by: Christian Clauss <[email protected]>
* change indexed iteration checking to any()
Co-authored-by: Christian Clauss <[email protected]>
* fix: swap import and documentation sections
* fix: change return none to return empty list
* remove unnecessary import (Union)
* change: remove returning boolean indicating problem was solved or not
* remove unnecessary import (Tuple)
Co-authored-by: Christian Clauss <[email protected]>
* Add shortest path by BFS (#1870)
* Create breadth_first_search_shortest_path.py
* updating DIRECTORY.md
* Reduce side effect of `shortest_path`
For the sake of future testing and documentation -
* fixup! Format Python code with psf/black push
* Fix typo `separately`
* Change to get() from dictionary
Co-Authored-By: Christian Clauss <[email protected]>
* Move graph to the top
* fixup! Format Python code with psf/black push
* Add doctest for shortest path
* Add doctest for BFS
* fixup! Format Python code with psf/black push
* Add typings for breadth_first_search_shortest_path
* fixup! Format Python code with psf/black push
* Remove assert from doctests
* Add blank line to doctest
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: John Law <[email protected]>
* Changed the deprecated `np.matrix` to `np.ndarray` (#1923)
* Wrap lines that go beyond GitHub Editor (#1925)
* Wrap lines that go beyond GiHub Editor
* flake8 --count --select=E501 --max-line-length=127
* updating DIRECTORY.md
* Update strassen_matrix_multiplication.py
* fixup! Format Python code with psf/black push
* Update decision_tree.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update stale comment (#1924)
* Update close comment
* Update stale.yml
* Multiline strings in yaml files
https://yaml-multiline.info/
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Hamiltonian Cycle (#1930)
* add skeleton code
* add doctests
* add tests for util function + implement wrapper
* full implementation
* add ability to add starting verex for algorithm
* add static type checking
* add doc tests to validation method
* bug fix: doctests expected failing
* Update hamiltonian_cycle.py
* Update hamiltonian_cycle.py
Co-authored-by: Christian Clauss <[email protected]>
* support_vector_machines.py increase error tolerance to suppress convergence warnings (#1929)
* Update support_vector_machines.py
* Update support_vector_machines.py
Co-authored-by: Christian Clauss <[email protected]>
* enhanced segment tree implementation and more pythonic (#1715)
* enhanced segment tree implementation and more pythonic
enhanced segment tree implementation and more pythonic
* add doctests for segment tree
* add type annotations
* unified processing sum min max segment tre
* delete source encoding in segment tree
* use a generator function instead of returning
* add doctests for methods
* add doctests for methods
* add doctests
* fix doctest
* fix doctest
* fix doctest
* fix function parameter and fix determine conditions
* Check if a item exist in stack or not (#1931)
* Check if a item exist in stack or not
* implemented __contains__ method in stack
* made changes in __contains__
* added method for checking armstrong number (#1936)
* added method for checking armstrong number
* Update comment
Co-authored-by: Christian Clauss <[email protected]>
* Solution for Euler Problem 26 (#1939)
* Solution for Euler Problem 26
* Update project_euler/problem_26/sol1.py
typo error fix.
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
typo error fix
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
ok to remove, this comes from Pycharm automatically when docstring is added.
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
ok to remove.
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_26/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* now_divide = now_divide * 10 % divide_by_number
Co-authored-by: Christian Clauss <[email protected]>
* Fix psf/black issues than fail the build (#1935)
* Fix psf/black issues than fail the build
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Delete FUNDING.yml
* Create sol2.py (#1876)
* Create sol2.py
* updating DIRECTORY.md
* Update DIRECTORY.md
* updating DIRECTORY.md
* Update sol2.py
* Update DIRECTORY.md
* updating DIRECTORY.md
* Improve docstrings
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: vinayak <[email protected]>
Co-authored-by: John Law <[email protected]>
* Deal with maps (#1945)
* Deal with maps
Try with the search term "pizza" to see why this was done in #1932
* fixup! Format Python code with psf/black push
* Update armstrong_numbers.py
* updating DIRECTORY.md
* Update crawl_google_results.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* change method name from front to get_front (#1943)
Co-authored-by: “Vipul <“[email protected]”>
* Added new algorithm: cracking caesar cipher with the chi-squared test (#1950)
* added decrypt_caesar_with_chi_squared.py and ran all checks
* Updated default parameters
Removed mistake with mutable default arguments
Co-authored-by: Christian Clauss <[email protected]>
* Updated handling for optional arguments
Co-authored-by: Christian Clauss <[email protected]>
* Changed return statement to tuple
Made function return a tuple instead of a list
* Added more doctests
* Fixed spelling mistakes
* black . - reformatted decrypt_caesar_with_chi_squared.py
* Updated if statements to fit the updated code
* Minimized amount of lines in the code.
Co-authored-by: Christian Clauss <[email protected]>
* Added Lstm example for stock predection (#1908)
* Added Lstm example for stock predection
* Changes after review
* changes after build failed
* Add Kiera’s to requirements.txt
* requirements.txt: Add keras and tensorflow
* psf/black
Co-authored-by: Christian Clauss <[email protected]>
* Added Shortest Job First Algorithm (#1957)
* Added Shortest Job First Algorithm
It is in IPYNB format but the dataframes are really looking good.
Please, take a look.
* Delete Shortest_Job_First_Algorithm.ipynb
* Added Shortest Job First Algorithm
* Update Shortest_Job_First Algorithm.py
* Update Shortest_Job_First Algorithm.py
* Update Shortest_Job_first Algorithm
* Added Shortest_Job_First Algorithm
* Added Shortest Job First Algorithm
* Update shortest_job_first_algorithm.py
* Format code with psf/black
Co-authored-by: Christian Clauss <[email protected]>
* Add sleep-sort (#1867)
* added sleepsort
Adding sleepsort
* Add doctest and typing for sleepsort
* Use self-descriptive variable name
* Update sleepsort.py
* Update sorts/sleepsort.py
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Add graphs/frequent_pattern_graph_miner.py (#1866)
* Add files via upload
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update graphs/frequent_pattern_graph_miner.py
Co-Authored-By: Christian Clauss <[email protected]>
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Update frequent_pattern_graph_miner.py
* Whitespace changes
* Format with psf/black
Co-authored-by: Christian Clauss <[email protected]>
* Added Nearest neighbour algorithm (#1934)
* Upgrades to caesar_cipher.py (#1958)
* Added more flexibility to functions, decreased amount of repeating code
* Added docstrings
* Updated input functions
* Added doctests
* removed test piece of code
* black .
* Updated caesar cipher standard alphabet to fit python 3.8
* Update and rename sleepsort.py to sleep_sort.py
* Or 4
Co-authored-by: Christian Clauss <[email protected]>
* Travis CI: lint for useless backslashes (#1961)
* Travis CI: lint for useless backslashes
* updating DIRECTORY.md
* flake8 --max-complexity=25
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Kadanes_algorithm (#1959)
* Add files via upload
* Update Kadane's_algorithm.py
* Update and rename Kadane's_algorithm.py to kadanes_algorithm.py
* Update kadanes_algorithm.py
* Update kadanes_algorithm.py
* Update kadanes_algorithm.py
* Update kadanes_algorithm.py
* Update kadanes_algorithm.py
Co-authored-by: Christian Clauss <[email protected]>
* Added A* algorithm (#1913)
* a* algorithm
* changes after build error
* intent changes
* fix after review
* ImportMissmatchError
* Build failed fix
* doctest changes
* doctest changes
* Travis CI: Strict flake8 (#1962)
* Travis CI: Strict flake8
Turn the screws all the way down.
* updating DIRECTORY.md
* Switch from flake8 --select to --ignore
* Quotes
* IGNORE=E123,E203,E265,E266,E302,E401,E402,E712,E731,E741,E743,F811,F841,W291,W293,W503
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix astar (#1966)
* Fix astar
Single character variable names are old school.
* fixup! Format Python code with psf/black push
* Tuple
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Add type hints to max_heap.py (#1960)
* Max heap implementation
* Update max_heap.py
* Update max_heap.py
* Update max_heap.py
* __len__ method added
* Update max_heap.py
Co-authored-by: halilpython <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Iterative merge sort implementation (#1972)
* Added Iterative merge sort
* Added iterative merge sorts
* Update changes
* Add the ability to sort strings
Co-authored-by: Christian Clauss <[email protected]>
* The new version of flake8 is linting f-strings (#1976)
* The new version of flake8 is linting f-strings
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update linear_search.py (#1974)
* Update linear_search.py
Comment modified in line 17 as Sorting not required in Linear Search
* Update linear_search.py
Comment modified in line 17
* improved prime number generator to check only up to sqrt(n) instead of n (#1984)
* improved prime number generator to check only up to sqrt(n) instead of n
* added old version as slow_primes() and named new, faster version primes()
* fixed docstring in slow_primes
* Add a timeit benchmark
* Update prime_numbers.py
Co-authored-by: Christian Clauss <[email protected]>
* Added file aliquot_sum.py (#1985)
* Added file aliquot_sum.py containing a function to find theo
* Added parameter type info to aliquot_sum.py
* Update maths/aliquot_sum.py
Co-authored-by: Christian Clauss <[email protected]>
* Update maths/aliquot_sum.py
Co-authored-by: Christian Clauss <[email protected]>
* Updated code to raise ValueErrors if input is bad
* Fixed logical operators
* Removed unnecessary import
* Updated aliquot_sum.py
* fixed formatting
* fixed documentation
Co-authored-by: Christian Clauss <[email protected]>
* actions/setup-python@v2 (#1986)
* actions/setup-python@v2
* fixup! Format Python code with psf/black push
* Update autoblack.yml
* updating DIRECTORY.md
* Update codespell.yml
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added strand sort (#1982)
* Added strand sort
* Review changes
* Remove boilerplate code
* Fixed flake error: E252
* Added missing return type hint
* Add tests and type hints to hill cipher (#1991)
* Added tests and type hints to hill cipher
* Remove extra >>>
* import doctest
Co-authored-by: John Law <[email protected]>
* hill_cipher.py: gcd() -> greatest_common_divisor() (#1997)
* hill_cipher.py: gcd() -> greatest_common_divisor()
* fixup! Format Python code with psf/black push
* import string
* updating DIRECTORY.md
* Change matrix to array
Add more tests
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <[email protected]>
* added __len__ function (#1812)
* added __len__ function
Added a function to count number of nodes in linked list
* Updated __len__ method
used snake_case instead of camel case
* Add tests to __len__()
Co-authored-by: Christian Clauss <[email protected]>
* change doctest line (#2007)
* change doctest line
import doctest is not relevant with algorithms. move it under main section.
* from doctest import testmod
Co-authored-by: Christian Clauss <[email protected]>
* Pi digit extraction algorithm (#1996)
* added pi digit extraction formula
* updating DIRECTORY.md
* fixed typo in a comment
* updated bbp_formula.py
* Update maths/bbp_formula.py
Co-authored-by: Christian Clauss <[email protected]>
* Update maths/bbp_formula.py
Co-authored-by: Christian Clauss <[email protected]>
* Update bbp_formula.py
* Update and rename bbp_formula.py to bailey_borwein_plouffe.py
* updating DIRECTORY.md
* calculate
* "".join(bailey_borwein_plouffe(i) for i in range(1, 12))
* Update bailey_borwein_plouffe.py
* Update bailey_borwein_plouffe.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
* consists of area of various geometrical shapes (#2002)
* consists of area of various geometrical shapes
In this program it consists of various area calculation of different geometrical shapes such as (square,rectangle) and many other shapes.
* print(f'Rectangle: {area_rectangle(10, 20)=}')
* Update area.py
* Areas of various geometric shapes:
Co-authored-by: Christian Clauss <[email protected]>
* Precision must be a nonnegative integer (#2013)
* Precision must be a nonnegative integer
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* refactor: move import pytest line of blockchain algs under "main" section. (#2012)
* change doctest line
import doctest is not relevant with algorithms. move it under main section.
* from doctest import testmod
* refactor: move doctest under "main" section
* Update diophantine_equation.py
* Update modular_division.py
Co-authored-by: Christian Clauss <[email protected]>
* Easter date gauss algorithm (#2010)
* Added gauss easter algorithm
* Fixes in easter algorithm
* Commit suggestions
* singly_linked_list.py: psf/black (#2008)
* singly_linked_list.py: psf/black
* updating DIRECTORY.md
* Update singly_linked_list.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update fast_fibonacci.py (#1889)
* Update fast_fibonacci.py
* Update fast_fibonacci.py
Co-authored-by: Christian Clauss <[email protected]>
* Update atbash cipher (doc, doctest, performance) (#2017)
* Update atbash
* Add benchmark() to quantify the performance improvement
Co-authored-by: Christian Clauss <[email protected]>
* Graphs : Bidirectional A* (#2015)
* implement bidirectional astar
* add type hints
* add wikipedia url
* format with black
* changes from review
* Graphs : Greedy Best First (#2018)
* implement greedy best first
* implement Greedy Best First Search
* review changes
* add doctests
* >>> gbf.search() # doctest: +NORMALIZE_WHITESPACE
Co-authored-by: Christian Clauss <[email protected]>
* Fixes in Bidirectional A* (#2020)
* implement bidirectional astar
* add type hints
* add wikipedia url
* format with black
* changes from review
* fix collision check
* Add testmod()
* # doctest: +NORMALIZE_WHITESPACE
* Codespell: euclidean
* Codespell: coordinates
* Codespell: traversal
* Codespell: remaining
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added bead sort (#2022)
* Added bead sort
* Commit suggestion
* Added checking before sort
* Bead sort only works for sequences of nonegative integers
Co-authored-by: Christian Clauss <[email protected]>
* Update is_palindrome.py (#2025)
* Update is_palindrome.py
* Update is_palindrome.py
* Reuse s
Co-authored-by: Christian Clauss <[email protected]>
* Merge sort Update variable names (#2032)
* Update Merge sort variable names
* Update mergesort.py
* Update mergesort.py
* black
* Update mergesort.py
Co-authored-by: Christian Clauss <[email protected]>
* .travis.yml: Revert to using autoblack (#2033)
* .travis.yml: Revert to using autoblack
Our autoblack GitHub Action will get us to black compliance without forcing each contributor to learn about, install, and use psf/black on every pull request.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Euclidean recursive method + doctests + type hints (#1999)
* Recursive euclidean algorithm + doctests and type hints
* Fix doctests in recursive method
* Added commit suggestions
* added Boruvka's MST algorithm (#2026)
* added Boruvka's MST algorithm
* Add files via upload
* fixup! Format Python code with psf/black push
* Updated Boruvka with doctest
* updating DIRECTORY.md
* Update minimum_spanning_tree_boruvka.py
* No blank line in doctest
* <BLANKLINE>
* Avoid mutable default values
https://docs.python-guide.org/writing/gotchas/
* Update minimum_spanning_tree_boruvka.py
* Avoid mutable default values
* fixup! Format Python code with psf/black push
* Update minimum_spanning_tree_boruvka.py
* Update minimum_spanning_tree_boruvka.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
* Enhance shell sort syntax (#2035)
* Created weatherforecast.py (#2037)
* Created weatherforecast.py
Added weatherforecast.py to retrieve weather information of a location and return dictionary values.
* Update weatherforecast.py
* Update and rename weatherforecast.py to current_weather.py
Co-authored-by: Christian Clauss <[email protected]>
* current_weather, weather_forecast, weather_onecall (#2048)
* current_weather, weather_forecast, weather_onecall
* updating DIRECTORY.md
* weather_forecast("Kolkata, India")
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Jaro winkler (#2041)
* Added jaro_winkler first version
* Added doctests
* Fix flake warnings
* Refactor
* Fixes bug in jaro winkler implementation
* Commit suggestions
* Missing comming suggestions
* Remove unused math module
* Import doctest
Co-authored-by: John Law <[email protected]>
* circular_linked_list: Add more len() tests (#2051)
* circular_linked_list: Add more len() tests
* fixup! Format Python code with psf/black push
* prepend()
* updating DIRECTORY.md
* Fix decrementation of self.length
* Add empty list tests
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* data_structures/linked_list: Add __len__() function and tests (#2047)
* Update __init__.py
please add a function to get length of linked list
* Update __init__.py
* Update doubly_linked_list.py
all size function lo doubly linked list class
* prime number _better method
* comments
* Updated init.py 2
made it more pythonic
* updated length function
* commnet in linked_list construtor
* Update data_structures/linked_list/__init__.py
accepecting changes
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/linked_list/__init__.py
Co-authored-by: Christian Clauss <[email protected]>
* Update __init__.py
* Revert changes to doubly_linked_list.py
* Revert changes to prime_check.py
Co-authored-by: Christian Clauss <[email protected]>
* Naive string doctests + typehints (#2054)
* Added doctests
* Added __main__
* Commit suggestion
* Undo changes to keep only doctests and typehints
* Reundo function name with params
* Update naive_string_search.py
* Update naive_string_search.py
* Update naive_string_search.py
* Update naive_string_search.py
Co-authored-by: Christian Clauss <[email protected]>
* Create number_of_digits.py (#1975)
* Create number_of_digits.py
A python program to find the number of digits in a number.
* Update number_of_digits.py
* Update number_of_digits.py
* Add #1976 to get Travis CI to pass
#1976
* Add type hints as discussed in CONTRIBUTING.md
Co-authored-by: Christian Clauss <[email protected]>
* Doctests + typehints in cocktail shaker sort (#2061)
* Doctests in cocktail shaker sort
* import doctest
* print(f"{cocktail_shaker_sort(unsorted) = }")
Co-authored-by: John Law <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* conversions/decimal_to_binary.py: Add type hints (#2001)
* A .py file to covert a base to any new base(2-18)
* Update base_changer.py
* Added type-hints.
* Delete base_changer.py
* Update build_directory_md.py (#2066)
Propagate argument `top_dir` to good_file_paths.
Previously this argument did not get passed to the helper function when calling print_directory_md.
* create sum_of_digits.py (#2065)
* create sum_of_digits.py
create sum_of_digits.py to find the sum of digits of a number
digit_sum(12345) ---> 15
digit_sum(12345) ---> 10
* Update sum_of_digits.py
* Update maths/sum_of_digits.py
Co-authored-by: Christian Clauss <[email protected]>
* Update maths/sum_of_digits.py
Co-authored-by: Christian Clauss <[email protected]>
* Update sum_of_digits.py
Co-authored-by: Christian Clauss <[email protected]>
* Harris corner detection (#2064)
* Added Lstm example for stock predection
* Changes after review
* changes after build failed
* Add Kiera’s to requirements.txt
* requirements.txt: Add keras and tensorflow
* psf/black
* haris corner detection
* fixup! Format Python code with psf/black push
* changes after review
* changes after review
* fixup! Format Python code with psf/black push
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Refactor cycle_sort (#2072)
* Refactor cycle_sort
* Undo changes to keep only doctests
* Remove boilerplate comments and unused variables (#2073)
* Errors notifications under pull requests (#2081)
* Added error comments under pull requests
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Create-Add files to greedy_method directory (#2082)
* Add Greedy Method Approach
* Update Filename
* Update Variable and Links
* Fixed flake8 bugs
* Update unittest filename
* Update unittest filename
* Final unittest filename update
* Pythonic Code formatting
* flake8 fixes
* lowercase function name
* Add zip function
* Add zip function
* params lowercase
* Travis CI fixes
* Update and rename knapsack_problem.py to knapsack.py
* Update test_knapsack.py
* Fix bugs
* Rename knapsack.py to greedy_knapsack.py
* Update test_knapsack.py
Co-authored-by: Christian Clauss <[email protected]>
* Added travis notifications only on fail (#2091)
* Added travis notifications only on fail
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added Readme for computer vision (#2075)
* Create README.md
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Refactor remove duplicates to more pythonic (#2093)
* Refactor strings/remove_duplicate to more pythonic
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* calc_profit always returns an int (#2090)
* calc_profit always returns an int
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* fix fetch_github_info __main__ bug (#2080)
* fix fetch_github_info __main__ bug
* Algorithms should not print
* Update fetch_github_info.py
* Update fetch_github_info.py
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: John Law <[email protected]>
* Added function to convert from decimal to another base (#2087)
* Added function to convert from decimal to another base
* Update conversions/decimal_to_any.py
Changed type() to isinstance()
Co-authored-by: Christian Clauss <[email protected]>
* Update conversions/decimal_to_any.py
Changed to base in (0, 1)
Co-authored-by: Christian Clauss <[email protected]>
* Update conversions/decimal_to_any.py
Updated to div not in (0, 1)
Co-authored-by: Christian Clauss <[email protected]>
* Update conversions/decimal_to_any.py
Updated to make condition clearer
Co-authored-by: Christian Clauss <[email protected]>
* Update conversions/decimal_to_any.py
Using divmod() instead of % operator
Co-authored-by: Christian Clauss <[email protected]>
* Update conversions/decimal_to_any.py
Improved readability on a docstring test
Co-authored-by: Christian Clauss <[email protected]>
* Update conversions/decimal_to_any.py
Changed use of type() to isinstance()
Co-authored-by: Christian Clauss <[email protected]>
* Update conversions/decimal_to_any.py
Changed from use of type() to isinstance()
Co-authored-by: Christian Clauss <[email protected]>
* Made changes and improved function
* Update conversions/decimal_to_any.py
Added space to docstring test
Co-authored-by: Christian Clauss <[email protected]>
* Changed action for bad input
* Added support for conversions up to base 36 (#2087)
* Added support for conversions up to base 36 and renamed HEXADECIMAL dict (#2087)
* Fixed whitespace issue (#2087)
* Fixed issue with line length (#2087)
* Fixed issue with conversions past base-10 failing (#2087)
* Added more robust testing (#2087)
Co-authored-by: Christian Clauss <[email protected]>
* created perfect_cube.py (#2076)
* created perfect_cube.py
To find whether a number is a perfect cube or not.
* Update perfect_cube.py
* Update perfect_cube.py
* Update perfect_cube.py
* Add Z-function algorithm implementation (#2067)
* Add Z-function algorithm implementation
* Spelling correction
* Reference url correction
* Add additional function as an example of z-function usage, change docstrings for functions
* Fix flake8 errors
* Update z_function.py
Co-authored-by: Christian Clauss <[email protected]>
* implement sdbm hash algorithm (#2094)
* implement sdbm hash algorithm
* fix bug: styling
* fix styling for decimal_to_any
* Fix syntax for flake8 passing (#2096)
* Fix syntax for flake8 passing
* fixup! Format Python code with psf/black push
* # fmt: off / # fmt: on
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
* Fix indentation (#2097)
* Hash adler32 (#2111)
* implement hash
* fix indentation
* Create natural_language_processing (#2116)
* Create natural_language_processing
Closes #2115
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* implement rat in maze algorithm. (#2106)
* implement rat in maze algorithm.
* style changes
* fix trailing whitespace
* add test, fix style
* fix style
* method change
* minor changes
* style changes
* return solved
Co-authored-by: Christian Clauss <[email protected]>
* Fix line break after binary operator (#2119)
* Fix line break after binary operator
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Add pytest init file to define custom mark mat_ops (#2120)
Fixes #1917.
* Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix long line, tests (#2123)
* Fix long line
* updating DIRECTORY.md
* Add doctest
* ...
* ...
* Update tabu_search.py
* space
* Fix doctest
>>> find_neighborhood(['a','c','b','d','e','a']) # doctest: +NORMALIZE_WHITESPACE
[['a','e','b','d','c','a',90], [['a','c','d','b','e','a',90],
['a','d','b','c','e','a',93], ['a','c','b','e','d','a',102],
['a','c','e','d','b','a',113], ['a','b','c','d','e','a',93]]
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <[email protected]>
* Count (#2084)
* Add files via upload
* Update and rename count_islands.py to count_islands_in_matrix.py
* Update matrix/count_islands_in_matrix.py
Co-authored-by: Christian Clauss <[email protected]>
* Update matrix/count_islands_in_matrix.py
Co-authored-by: Christian Clauss <[email protected]>
* Update matrix/count_islands_in_matrix.py
Co-authored-by: Christian Clauss <[email protected]>
* Reformat count islands.py
* Indent Python code with 4 spaces, not tabs
* Update count_islands_in_matrix.py
* Add type hints for return values
Co-authored-by: Christian Clauss <[email protected]>
* CONTRIBUTING.md: Update flake8 command (#2124)
* CONTRIBUTING.md: Update flake8 command
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Graphs : Bidirectional Breadth-First Search (#2057)
* implement bidirectional breadth first
* remove useless import
* remove trailing whitespaces
* implementation of entropy algorithm. (#2110)
* implementation of entropy algorithm.
* add tests, fix requested changes
* open_file() --> analyze_text()
* Create bidirectional_breadth_first_search.py
* # type: ignore
Co-authored-by: Christian Clauss <[email protected]>
* Hash djb2 (#2098)
* 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 <[email protected]>
* Blacken our code (#2125)
* Blacken
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Create change_brightness.py (#2126)
* 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 <[email protected]>
* Added doctests to bucket sort (#2079)
* 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 <[email protected]>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added maximum non-adjacent sum (#2130)
* 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 <[email protected]>
* Implement connected components algorithm for graphs (#2113)
* 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>
* Strongly connected components (#2114)
* 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 <[email protected]>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
* Implement prefix function, knuth-morris-pratt another usage (#2099)
* 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 <[email protected]>
* Add lempel ziv compression (#2107)
* 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
* Added (Open) Knight Tour Algorithm (#2132)
* Added (Open) Knight Tour Algorithm
* Implemented Suggestions
* add visualization of k means clustering as excel format (#2104)
* 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 <[email protected]>
* Update machine_learning/k_means_clust.py
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Euler problem 551 sol 1: Reduce McCabe code complexity (#2141)
* 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>
* hamming_code.py: Reduce McCabe code complexity (#2140)
* 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>
* Added Markov Chain (#2146)
* Added Markov Chain
* Implemented suggestions
* Add doctests to radix_sort() (#2148)
* 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>
* Added doctests to OddEvenTraposition (#2152)
* Added doctests
* Change __main__ content
* Typehints + refactor (#2154)
* Update avl_tree.py (#2145)
* 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 <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* Update data_structures/binary_tree/avl_tree.py
Co-authored-by: Christian Clauss <[email protected]>
* 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 <[email protected]>
* NLP Word Frequency Algorithms (#2142)
* 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 <[email protected]>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <[email protected]>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <[email protected]>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <[email protected]>
* 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 <[email protected]>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <[email protected]>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <[email protected]>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <[email protected]>
* Add doctest examples and clean up docstrings
Co-authored-by: Christian Clauss <[email protected]>
* Added LRU Cache (#2138)
* Added LRU Cache
* Optimized the program
* Added Cache as Decorator + Implemented suggestions
* Implemented suggestions
* Added LFU Cache (#2151)
* Added LFU Cache
* Update lfu_cache.py
* None is returned
* Add type hints
Co-authored-by: Christian Clauss <[email protected]>
* project_euler/problem_47/sol1.py (#2150)
* 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 <[email protected]>
* Update project_euler/problem_47/sol1.py
Looks good
Co-authored-by: Christian Clauss <[email protected]>
* 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 <[email protected]>
* Update project_euler/problem_47/sol1.py
My IDE needs a spellchecker. Or, lighter comment font.
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* 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 <[email protected]>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_47/sol1.py
Looks good!
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Add url and typing hint for BFS (#2156)
* Add typing for bfs
* Add url for BFS
* rename the function
Co-authored-by: Christian Clauss <[email protected]>
* Update graphs/bfs.py
Co-authored-by: Christian Clauss <[email protected]>
* 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 <[email protected]>
* Update graphs/bfs.py
Co-authored-by: Christian Clauss <[email protected]>
* Rename bfs.py to breadth_first_search_2.py
Co-authored-by: Christian Clauss <[email protected]>
* Only one carriage return (#2155)
* 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>
* Added minimum cost path algorithm (#2135)
* Added maximum path sum for matrix (top left to bottom right)
* Changed maximum cost path to minimum cost path + added video explaination
* black fixes and Travis CI fixes (#2160)
* 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>
* Add round_robin scheduling algorithm (#2158)
* 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 <[email protected]>
* Update scheduling/round_robin.py
Co-authored-by: Christian Clauss <[email protected]>
* Update scheduling/round_robin_scheduling.py
Co-authored-by: Christian Clauss <[email protected]>
* Update scheduling/round_robin_scheduling.py
Co-authored-by: Christian Clauss <[email protected]>
* Update scheduling/round_robin.py
Co-authored-by: Christian Clauss <[email protected]>
* Round_Robin
* Update round_robin.py
* Update round_robin.py
* Update round_robin.py
* Update round_robin.py
Co-authored-by: pawanbuddy <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Rename shortest_job_first_algorithm.py to shortest_job_first.py (#2164)
* 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>
* Update matrix_operation.py (#2159)
* 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 <[email protected]>
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
* 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 <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: vinayak <[email protected]>
* black (#2166)
* black
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
* flake8 error fix
* Remove unreachable code
* union
Co-authored-by: Christian Clauss <[email protected]>
* double_linear_search algorithm (#2161)
* 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 <[email protected]>
* Gale Shapley Algorithm (#2100)
* 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 <[email protected]>
* Fixed some flake8 issues.
* Updated it to donors and recipients
* description changes
Co-authored-by: Christian Clauss <[email protected]>
* description changes
Co-authored-by: Christian Clauss <[email protected]>
* description changes
Co-authored-by: Christian Clauss <[email protected]>
* Edited the line lengths
* Update gale_shapley_bigraph.py
* Update gale_shapley_bigraph.py
Co-authored-by: Christian Clauss <[email protected]>
* isort --profile black --recursive . (#2170)
* isort --profile black --recursive .
* Update codespell.yml
* typo: vertices
* typo: Explanation
* typo: Explanation
* Fix typos
* isort --profile black . (#2181)
* updating DIRECTORY.md
* isort --profile black .
* Black after
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Numerous fixes to directed_and_undirected_(weighted)_graph.py (#2182)
* Numerous fixes to directed_and_undirected_(weighted)_graph.py
* dict.keys() is almost never need in modern Python
* Add surface area class (#2183)
* add surface area class
* add new line to end of file
* move surface area class into area class
* add missing import
* added pi import
* fix typo
* added blank line
* fixed more import issues
* comment fix
* comment fixes
* enhance the ability of add (#2178)
* enhance the ability of add
* Update matrix_operation.py
* Update matrix_operation.py
* Update matrix_operation.py
* Update matrix/matrix_operation.py
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
* Fix typo: Adjancent -> Adjacent (#2184)
* Add a missing "genetic algorithm" folder with a basic algorithm inside (#2179)
* Add a basic genetic algorithm
* Update basic_string.py
* Improve comments and readability
* Add url to wikipedia
* Remove newline
Co-authored-by: Christian Clauss <[email protected]>
* Sort import
Co-authored-by: Christian Clauss <[email protected]>
* Apply suggestions from code review
Co-authored-by: Christian Clauss <[email protected]>
* Improve Comments and readability
* Update basic_string.py
* Improve logic and efficiency
* Add doctest
* Update basic_string.py
* Update basic_string.py
* Update basic_string.py
* Apply suggestions from code review
Co-authored-by: Christian Clauss <[email protected]>
* Update basic_string.py
* Update basic_string.py
* Update basic_string.py
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: vinayak <[email protected]>
* Update decimal_to_binary.py (#2185)
"an Integer" instead of "a Integer"
* N queens math (#2175)
* add new file for another solution to the n queens problem
* Add the code for the algorithm, add comments and add at the top a general explanation
* Update backtracking/n_queens_math.py
Co-authored-by: Christian Clauss <[email protected]>
* Update backtracking/n_queens_math.py
Co-authored-by: Christian Clauss <[email protected]>
* Update backtracking/n_queens_math.py
Co-authored-by: Christian Clauss <[email protected]>
* Update backtracking/n_queens_math.py
Co-authored-by: Christian Clauss <[email protected]>
* No newline at the end of the file
* Type hints
* whitespaces fixed
* Fixed whitespaces
* Add type hints
* CodeSpell fixed
* update
* All changes made except changing the board variable to local
* Add doctest
* Update
* Update
* Update
* Update n_queens_math.py
Co-authored-by: Christian Clauss <[email protected]>
* sum_of_geometric_progression (#2168)
* Add files via upload
* Rename sum_of_Geometric_Progression.py to sum_of_geometric_progression.py
* Update sum_of_geometric_progression.py
* Update maths/sum_of_geometric_progression.py
Co-authored-by: Christian Clauss <[email protected]>
* Update maths/sum_of_geometric_progression.py
Co-authored-by: Christian Clauss <[email protected]>
* Update maths/sum_of_geometric_progression.py
Co-authored-by: Christian Clauss <[email protected]>
* Update sum_of_geometric_progression.py
* Update sum_of_geometric_progression.py
* Type hints and test for zeros and negative numbers
* Update sum_of_geometric_progression.py
Co-authored-by: Christian Clauss <[email protected]>
* Added Normalization and Standardization Algorithms (#2192)
* Added Standardization and Normalization algorithms with built-in stats
* Implement ndigits for rounding
Co-authored-by: Christian Clauss <[email protected]>
* added daily horoscope scrapper script (#2167)
* added daily horoscope scrapper
* Update daily horoscope scrapper script
code refactoring, script editing
* Update web_programming/daily_horoscope.py
Co-authored-by: Christian Clauss <[email protected]>
* Update basic_graphs.py (#1990)
* Update basic_graphs.py
missing return statement line no:223.
* Update basic_graphs.py
Co-authored-by: vinayak <[email protected]>
* Added a binomial distribution formula calculator algorithm (#2197)
* Add files via upload
* Update binomial_distribution.py
* Update maths/binomial_distribution.py
Co-authored-by: Christian Clauss <[email protected]>
* Update binomial_distribution.py
* Update maths/binomial_distribution.py
Co-authored-by: Christian Clauss <[email protected]>
* Update binomial_distribution.py
* Update binomial_distribution.py
* Update binomial_distribution.py
* Update binomial_distribution.py
* Update binomial_distribution.py
Co-authored-by: Christian Clauss <[email protected]>
* black matrix_operation.py (#2199)
* black matrix_operation.py
* updating DIRECTORY.md
* Update matrix_operation.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: vinayak <[email protected]>
* Celsius to Fahrenheit Conversions (#2188)
* added conversions between celsius and fahrenheit
* Renamed celsius_to_fahrenheit.py
* Fixed spelling issues
* modified file to fit the 88-character limit
* added changes to pass the travis-ci test
* further changed the files to pass the travis-ci test
* further changed the files to pass the travis-ci test
* Shortened conversions/fahrenheit_to_celsius.py
Co-authored-by: Christian Clauss <[email protected]>
* Type hints added to conversions/fahrenheit_to_celsius.py
Co-authored-by: Christian Clauss <[email protected]>
* changed the code to let the caller do the printing
* addressed the changes made on github
* Added Kelvin conversions and put temperature functions in a single file
* Removed whitespace from a blank line
* Update temperature_conversions.py
Co-authored-by: Christian Clauss <[email protected]>
* Add merge insertion sort (#2211)
* Add merge insertion sort
* Fix python naming conventions
* Add wikipedia link
* Add type hint
* Fix python to python3
Co-authored-by: Christian Clauss <[email protected]>
* Refactor doubled process in if-condition into one outside of if-condition
Co-authored-by: Christian Clauss <[email protected]>
* Refactor ma…
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


cclauss commentedApr 27, 2020
No description provided.