Skip to content
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

syncing from upstream repo #1

Merged
merged 42 commits into from
Sep 16, 2020
Merged

syncing from upstream repo #1

merged 42 commits into from
Sep 16, 2020

Conversation

kanthuc
Copy link
Owner

@kanthuc kanthuc commented Sep 16, 2020

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

grochedix and others added 30 commits August 23, 2020 04:35
* insertion sort : docstring, type hinting

* Update insertion_sort.py

Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix SettingWithCopy warning in pandas

#2282

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py
* fixed variable naming and unnecessary type hints

* print(segt)

Co-authored-by: Christian Clauss <cclauss@me.com>
* Create __int__.py

* Update and rename project_euler/__int__.py to project_euler/problem_44/__int__.py

* Add files via upload

* Update sol1.py

* Update __int__.py

* Delete __int__.py

* Create __init__.py

* Update project_euler/problem_44/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update project_euler/problem_44/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update project_euler/problem_44/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
…l1.py (#2349)

* Create __init__.py

* Add files via upload

* Update sol1.py

* Update sol1.py

* Update project_euler/problem_45/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update sol1.py

* Update sol1.py

* Update project_euler/problem_34/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update project_euler/problem_34/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update sol1.py

* Update project_euler/problem_34/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update sol1.py

* Update project_euler/problem_34/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
* Travis CI: Identify our ten slowest tests

https://howchoo.com/g/mtblodnjzjc/how-to-measure-unit-test-execution-times-in-pytest helps us to find the individual tests that are slowing down our Travis CI checks.

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Delete sleep_sort.py

A silly algorithm designed to waste time.  #2350 demonstrates that it is a 20+ second denial of service attack on every Travis CI run that we do.

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Add perfect_square_binary_search

* Update tests

* Add tests
* Create __init__.py

* Add files via upload

* Update sol1.py
* Added Enigma machine file

Added Enigma machine file to 'ciphers' section

* Added doctest to validator

* Fixed typo

* Shortened some lines

* Shortened some lines

* Update enigma_machine.py

* Shortened some lines

* Update enigma_machine.py

* Update enigma_machine.py

* Update enigma_machine2.py

* Update enigma_machine2.py

* added f-strings

* Update enigma_machine2.py

* Update enigma_machine2.py

* Updated some numbers

* Plugboard improvement

Added option to separate pair for plugboard by spaces

* renamed variable

* renamed some variables

* improved plugboard exception

* Update enigma_machine2.py

* Update enigma_machine2.py
* added bitwise binary OR operator

* Rename binary_OR_operator.py to binary_or_operator.py

* Update binary_or_operator.py

* Update binary_or_operator.py

* Update bit_manipulation/binary_or_operator.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update binary_or_operator.py

* Update binary_or_operator.py

* Nice!!

Co-authored-by: Christian Clauss <cclauss@me.com>
* Update merge_sort.py

* Update merge_sort.py
* Create __init__.py

* Add files via upload

* Update project_euler/problem_63/sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update sol1.py

* Update sol1.py

* Update sol1.py

Co-authored-by: Christian Clauss <cclauss@me.com>
* Add files via upload

* Update triplet_sum.py

* Update triplet_sum.py

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update triplet_sum.py

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/triplet_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
* Create alternate_disjoint_set.py

This code implements a disjoint set using Lists 
with added heuristics for efficiency
Union by Rank Heuristic and Path Compression

* Update alternate_disjoint_set.py

Added typehints, doctests and some suggested variable name change

* Update alternate_disjoint_set.py

* Formatted with Black

* More formatting

* Formatting on line 28

* Error in Doctest

* Doctest Update in alternate disjoint set

* Fixed build error

* Fixed doctest
* Add files via upload

* Update ugly_numbers.py

* Update ugly_numbers.py

* Update ugly_numbers.py
* Added type hints and doctest for maths/prime_check.

* Removed doctests.
* redblacktree type hints

* fixed type hints to pass flake8
* Update CONTRIBUTING.md

fixed dead link to the license

* Update README.md

Added License

* Update README.md

* Update README.md

* Update README.md

* Update CONTRIBUTING.md

Co-authored-by: Christian Clauss <cclauss@me.com>
* added idf-smooth

* added idf-smooth

* added idf-smooth
* Create capitalize.py

This function will capitalize the first character of a sentence or a word

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update strings/capitalize.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update capitalize.py

* Update strings/capitalize.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update capitalize.py

* Update capitalize.py

* Update capitalize.py

* Update strings/capitalize.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update capitalize.py

* Update strings/capitalize.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update capitalize.py

* Update capitalize.py

Co-authored-by: Christian Clauss <cclauss@me.com>
* Create hexadecimal_to_decimal

* Update conversions/hexadecimal_to_decimal

Co-authored-by: Tapajyoti Bose <44058757+ruppysuppy@users.noreply.github.com>

* Update conversions/hexadecimal_to_decimal

Co-authored-by: Tapajyoti Bose <44058757+ruppysuppy@users.noreply.github.com>

* Update conversions/hexadecimal_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update hexadecimal_to_decimal

* Update hexadecimal_to_decimal

* Update hexadecimal_to_decimal

* Update hexadecimal_to_decimal

* Update hexadecimal_to_decimal

* Update conversions/hexadecimal_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update hexadecimal_to_decimal

Added negative hexadecimal conversion to decimal number

* Update hexadecimal_to_decimal

* Update conversions/hexadecimal_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/hexadecimal_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update hexadecimal_to_decimal

* Update hexadecimal_to_decimal

Co-authored-by: Tapajyoti Bose <44058757+ruppysuppy@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update scoring_functions.py

We can find accuracy by manually if we are not going to use sklearn library.

* Update scoring_functions.py

* Update machine_learning/scoring_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>
* optimized recursive_bubble_sort

* Fixed doctest error due whitespace

* reduce loop times for optimization

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Create octal_to_decimal

octal to decimal converter

* Update octal_to_decimal

* Update conversions/octal_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
* Create binary_to_decimal

binary to decimal converter

* Update conversions/binary_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update binary_to_decimal

* Update conversions/binary_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update binary_to_decimal

Co-authored-by: Christian Clauss <cclauss@me.com>
marcoscannabrava and others added 12 commits September 11, 2020 16:23
* Fix Non Recursive Depth First Search

* Unindent docstring

* Reindent docstring by 1 space

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
* lxmlCovidDataFetch

* lxmlCovidDataFetch1

* Update worldometers_covid_with_lxml.py

* Rename worldometers_covid_with_lxml.py to covid_stats_via_xpath.py

Co-authored-by: Christian Clauss <cclauss@me.com>
* file-transfer: writing tests and ensuring that all is going well

* def send_file(filename: str = "mytext.txt", testing: bool = False) -> None:

* send_file(filename="mytext.txt", testing=True)

* Update send_file.py

* requirements.txt: lxml

Co-authored-by: Christian Clauss <cclauss@me.com>
* jump_search: doctest, docstring, type hint, inputs

* jumpsearch.py: case number not found

* trailing whitespace jump search
* fix assignment of a variable to itself

* Fix unnecessary 'else' clause in loop

* formatting and redundant reasignment fix

* mark unreachable code with a TODO comment

* fix variable defined multiple times

* fix static method without static decorator

* revert unintended autoformatting

Co-authored-by: Christian Clauss <cclauss@me.com>

* revert autoformatting issue

* applied black autoformatting

Co-authored-by: Christian Clauss <cclauss@me.com>
* * Renamed files
* Fiexed doctest

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* * Added type hints
* Added test
* Formated code

* updating DIRECTORY.md

* Update stack.py

* Test error conditions for pop, peek, and

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* recaptchaVerification

* recaptchaVerification

* recaptchaVerification1

* recaptchaVerification2

* recaptchaVerification3

* recaptchaVerification4

* recaptchaVerificatio5

* recaptchaVerificatio5

* recaptchaVerificatio6

* drawOnVideoStreamOpenCV

* matrixInverseMCAmethod

* fixingImports

* recaptchaVerificationfixes

* recaptchaVerificationfixes

* recaptchaVerificationfixes

* recaptchaVerificationfixes

* recaptchaVerificationfixes1

* recaptchaVerificationfixes1

* authenticate = login = render = redirect = print

Co-authored-by: Christian Clauss <cclauss@me.com>
* Update linear_search.py

Python implementation of recursive linear search algorithm

* Update linear_search.py

Added different doctests
Added the parameter hints
Handled the exception

* Update linear_search.py

added parameter hints to linear_search

* Update linear_search.py

Both the functions return the index if the target is found and -1 if it is not found
The rec_linear_search raises an exception if there is an indexing problem
Made changes in the doc comments

* Update linear_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix spelling in docstrings

* Improve comments and formatting

* Update print statement to reflect doctest change

* improve phrasing and apply black

* Update rat_in_maze.py

    This method is recursive starting from (i, j) and going in one of four directions:
    up, down, left, right.
    If a path is found to destination it returns True otherwise it returns False.

Co-authored-by: Christian Clauss <cclauss@me.com>
* Updated problem_04 in project_euler

* fixup! Format Python code with psf/black push

* That number is larger than our acceptable range.

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Create priority_queue_using_list.py

* Update priority_queue_using_list.py

* Update priority_queue_using_list.py

* Update priority_queue_using_list.py

* Maximum queue size is 100

Co-authored-by: Christian Clauss <cclauss@me.com>
@kanthuc kanthuc merged commit 3a3a9fc into kanthuc:master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.