forked from TheAlgorithms/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
merge from upstream #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add files via upload * Create __init__.py * Update and rename project_euler/problem_112.py to project_euler/problem_112/sol1.py * Update project_euler/problem_112/sol1.py Co-authored-by: Dhruv <[email protected]> * Update sol1.py * Update sol1.py * Update project_euler/problem_112/sol1.py Co-authored-by: Du Yuanchao <[email protected]> * Update project_euler/problem_112/__init__.py Co-authored-by: Du Yuanchao <[email protected]> * Update __init__.py * Update __init__.py * Update __init__.py * delete __init__.py content Co-authored-by: Dhruv <[email protected]> Co-authored-by: Du Yuanchao <[email protected]>
* delete duplicate file update insert sort * rename * fixed error * using enumerate()
* Update temperature_conversions.py Added Reaumur scale unit conversions. * Update temperature_conversions.py * Update temperature_conversions.py
* Create auto_close_empty_issues.yml * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update area.py Added Area for Rhombhus * Update area.py Added rhombhus area. And fixed some gaps error. * Update area.py Added Rhombhus area. * Update area.py Fixed suggested changes
* added doctests in modular_exponential.py * added doctests in modular_exponential.py * added URL link * updating DIRECTORY.md * Add problem 49 solution * updating DIRECTORY.md * Fix several mistakes These fixes are intended to follow the CONTRIBUTING.md * Move the import statements lower * Update project_euler/problem_49/sol1.py Co-authored-by: Dhruv <[email protected]> Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: Dhruv <[email protected]>
* fixed allocation_number * fixed pre-commit * fixed line too long * fixed bug
* chore: update print_reverse helper method Use a generator expression instead of slicing `elements_list` to improve the space and time complexity of `make_linked_list` to O(1) space and O(n) time by avoiding the creation a shallow copy of `elements_list`. * fix: add type checking and argument typing Add argument typing to all methods in `print_reverse` Add doctest to helper function `make_linked_list` and basic edge case tests to `print_reverse` * test: add `print_reverse` test Fix doctest syntax and remove edge case tests that are covered by typed arguments. Add `print_reverse` test that expects the correct values are printed out by adding a `test_print_reverse_output` helper function. * format code Co-authored-by: shellhub <[email protected]>
Squashed commit of the following: commit 6801d07 Author: Archaengel <[email protected]> Date: Mon Oct 5 16:40:10 2020 -0700 Fix typehints in project_euler/problem01 commit 29afc3a Author: Archaengel <[email protected]> Date: Mon Oct 5 15:06:34 2020 -0700 Add typehints and default argument for project_euler/problem_01
…02 (#2898) * Fix typehints in project_euler/problem01 Squashed commit of the following: commit 6801d07 Author: Archaengel <[email protected]> Date: Mon Oct 5 16:40:10 2020 -0700 Fix typehints in project_euler/problem01 commit 29afc3a Author: Archaengel <[email protected]> Date: Mon Oct 5 15:06:34 2020 -0700 Add typehints and default argument for project_euler/problem_01 * Add default args, typehints, and expand variable names for PE prob 02
* Add type hints for strings/ folder * Rerun other checks * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Rename the main solution functions to solution. Rename prime chec functions to is_prime. Add default args, typehints, expand variable names.
…03 (#2917) * Fix typehints in project_euler/problem01 Squashed commit of the following: commit 6801d07 Author: Archaengel <[email protected]> Date: Mon Oct 5 16:40:10 2020 -0700 Fix typehints in project_euler/problem01 commit 29afc3a Author: Archaengel <[email protected]> Date: Mon Oct 5 15:06:34 2020 -0700 Add typehints and default argument for project_euler/problem_01 * Add default args, typehints, and expand variable names for PE prob 02 * Add style improvements for first solution of PE Problem 02 * Add default arg and typehints for second solution of PE Problem 02 * Add default arg for third solution of PE Problem 02 * Add style improvements for 1st soln of PE problem 03 * Add default arg and typehints for 2nd soln of PE problem 03 * Add default arg for 3rd soln of PE problem 03 * Remove unnecessary newlines * Remove unnecessary newlines * Fix end of file for 2nd soln in PE problem 03
* add typehints and docstrings * add typehint and default value * add typehint and default value. Removed unused variable. * do not modifiy the given solution * add doctests * update sol1 after running black * add typehint, docstring, and doctest * update sol2 after running black
- Add default arguments to solution function - Add link to Project Euler problem 6 - Add doctest for testing `solution()` - Removed test_solutions.py as it is redundant
* Fix typehints in project_euler/problem01 Squashed commit of the following: commit 6801d07 Author: Archaengel <[email protected]> Date: Mon Oct 5 16:40:10 2020 -0700 Fix typehints in project_euler/problem01 commit 29afc3a Author: Archaengel <[email protected]> Date: Mon Oct 5 15:06:34 2020 -0700 Add typehints and default argument for project_euler/problem_01 * Add default args, typehints, and expand variable names for PE prob 02 * Add style improvements for first solution of PE Problem 02 * Add default arg and typehints for second solution of PE Problem 02 * Add default arg for third solution of PE Problem 02 * Add style improvements for 1st soln of PE problem 03 * Add default arg and typehints for 2nd soln of PE problem 03 * Add default arg for 3rd soln of PE problem 03 * Remove unnecessary newlines * Remove unnecessary newlines * Fix end of file for 2nd soln in PE problem 03 * Add style improvements to solutions for PE problem 04 * Restore original newlines in soln for PE problem 04 * Fix punctuation in docstring for PE problem 04 * Restore solution bodies for PE problem 04 * Expand variable names for 2nd soln of PE problem 04
* add type hints to math/extended euclid * math/extended euclid - add doctest * math/extended euclid: remove manual doctest * change algorithm for negative numbers * improve naming of variables * Update extended_euclidean_algorithm.py Co-authored-by: Dhruv <[email protected]>
- Improved variable names - Added type hints - Added default argument values for validate_solutions script
* Added doomsday algorithm * Adding unit-tests to doomsday algorithm * running black on doomsday * adding doctest and fixing a black issue [doomsday] * Update doomsday.py * fixing black issue [doomsday] * Update other/doomsday.py * Update doomsday.py * adding more doctests (following review comment) [doomsday] Co-authored-by: John Law <[email protected]>
Add default arguments, typehints and rename solution function for Porject Euler Problem 28
* fix code style in problem 76 Signed-off-by: joan.rosellr <[email protected]> * Update sol1.py * Update sol1.py * Remove trailing whitespace Co-authored-by: Dhruv <[email protected]>
* Fix: Corrected test. List in test must be ordered. * Add tests with big lists.
* fix code style and update problem description with link Signed-off-by: joan.rosellr <[email protected]> * Update sol1.py Co-authored-by: Dhruv <[email protected]>
* name method solution in project_euler/problem99 * rename function
* add type hints and default args for problem 5 * Update sol1.py * Update sol2.py Co-authored-by: Dhruv <[email protected]>
* Electric power * updated as suggested by cclauss * updated as suggested by cclauss * decimal value error * All done
* Update pigeon_sort.py * Update pigeon_sort.py * Update pigeon_sort.py
* Update pigeon_sort.py * updating DIRECTORY.md * Add type hints and return annotation Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
…d lists (#3874) * Create merge_two_lists.py that implements merging of two sorted linked lists * Update merge_two_lists.py Fixed formatting errors * Fixed trailing whitespace * Change name of function to def __str__() * updating DIRECTORY.md * Imported classes from singly_linked_list.py * Update merge_two_lists.py * Update merge_two_lists.py Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
* Updated input * Fix pre-commit error * Add type hints, doctests, black, snake_case Co-authored-by: Dhruv Manilawala <[email protected]>
* update graphs/breadth_first_search.py - update naming style to snake_case - add type hints * add doctests
* Implemented minimum steps to one using tabulation. * Update minimum_steps_to_one.py Made the parameter "n" more descriptive. Changed it to number * `n` to `number` Co-authored-by: John Law <[email protected]>
* Added solution for Project Euler problem 180 * Fixed minor details in Project Euler problem 180 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Chore: Added type hints to searches/binary_search.py * Use -1 as the sentinal value * Wrap long lines * Update binary_search.py * Update binary_search.py Co-authored-by: Christian Clauss <[email protected]>
* Added solution for Project Euler problem 085. * updating DIRECTORY.md * Minor tweaks to Project Euler problem 85 * Variable comments for project euler problem 85 Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update caesar_cipher.py improved for conciseness and readability * Add type hints Co-authored-by: Dhruv Manilawala <[email protected]>
* Initial commit of the conjugate gradient method * Update linear_algebra/src/conjugate_gradient.py * Added documentation links, changed variable names to lower case and more descriptive naming, added check for symmetry in _is_matrix_spd * Made changes to some variable naming to be more clear * Update conjugate_gradient.py Co-authored-by: Zeyad Zaky <[email protected]> Co-authored-by: Christian Clauss <[email protected]> Co-authored-by: Dhruv Manilawala <[email protected]>
* Added solution for Project Euler problem 86 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added solution for Project Euler problem 59 * updating DIRECTORY.md * Formatting, type hints, no more evil map functions * Doctests * Added doctests for Project Euler problem 59 Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* fixed shell sort * udpate code style * Update sorts/shell_sort.py Co-authored-by: John Law <[email protected]> Co-authored-by: John Law <[email protected]>
* add integer to roman function simply added fastest method i found. * Rename roman_to_integer.py to roman_numerals.py * Update roman_numerals.py * Update roman_numerals.py Co-authored-by: Christian Clauss <[email protected]>
* Added solution for Project Euler problem 101 * Got rid of map functions * updating DIRECTORY.md * Better function/variable names * Better variable names * Type hints * Doctest for nested function Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added solution for Project Euler problem 102 * Got rid of map functions * Snake case variable names * Type hints * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix mypy errors for backtracking algorithms * Fix CI failure
* Add type hints and docstrings to heap.py - Add type hints - Add docstrings - Add explanatory comments - Improve code readability - Change to use f-string * Fix import sorting * fixup! Format Python code with psf/black push * Fix static type error * Fix failing test * Fix type hints * Add return annotation Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <[email protected]>
… activation function (#4037) * added neural network with 2 hidden layers * Revert "added neural network with 2 hidden layers" This reverts commit fa4e2ac. * added neural network with 2 hidden layers * passing pre-commit requirements * doctest completed * added return hints * added example * example added * completed doctest's * changes made as per the review * changes made * changes after review * changes * spacing * changed return type * changed dtype
* Fix mypy errors for scheduling/first_come_first_served * Fix mypy errors for scheduling/round_robin.py * Fix mypy errors for scheduling/shortest_job_first.py * Fix isort errors
* Added solution for Project Euler problem 107 * Doctests and better variable names * Type hints * Small edits * Forward reference for typing hint * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update area.py Modified area of triangle function. Added a new algorithm to calculate area when 3 sides are known * Add files via upload * Update area.py * Update area.py * Update area.py * Update area.py * Remove unnecessary whitespace Co-authored-by: Dhruv Manilawala <[email protected]>
stokhos
pushed a commit
that referenced
this pull request
Jan 3, 2021
* directory_writer * fixup: Format Python code with psf/black * fixup: DIRECTORY.md
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.