Christian Clauss
363858ef3b
hyphen_files = [file for file in filepaths if "-" in file] ( #2447 )
...
* hyphen_files = [file for file in filepaths if "-" in file]
* updating DIRECTORY.md
* Rename recursive-quick-sort.py to recursive_quick_sort.py
* updating DIRECTORY.md
* Rename aho-corasick.py to aho_corasick.py
* updating DIRECTORY.md
* Rename polynom-for-points.py to polynom_for_points.py
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-19 07:13:10 +02:00
kanthuc
ecac7b0973
Contains loops.py add ( #2442 )
...
* added an algorithm which checks a linked list for loops and returns true if one is found
* added doctests and clarified meaning of loop
* Define Node.__iter__()
* Update and rename has_loop.py to has_duplicate_data.py
* Update has_duplicate_data.py
* Update has_duplicate_data.py
* Update and rename has_duplicate_data.py to has_loop.py
* Update has_loop.py
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-18 22:53:50 +02:00
Du Yuanchao
dc415ec14a
Added double linear search recursion ( #2445 )
...
* double linear search recursion
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-18 09:55:02 +02:00
avych
0dea049f44
Added static type checking to polynom-for-points.py towards issue #2128 ( #2335 )
...
* Added static type checking to linear_algebra/src/polynom-for-points.py
* Fixed TravisCI errors
* Update polynom-for-points.py
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-18 08:37:49 +02:00
Du Yuanchao
2de2267319
Updated problem_06 in Project Euler ( #2439 )
...
* * rename variable
* fix type hint
* fix doctest
* added test function
* fixed import error
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-17 11:37:53 +02:00
poloso
86fb2991d5
Corrected filename and include static types ( #2440 )
...
* Corrected name and include static types
- The name of the file is now compliant with python naming conventions
- Add static type as stated in contributing guidelines
* Apply suggestions from code review
- Delete documentation line to run doctests
- Delete type hints for variables that comes from functions
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add edge cases tests.
* print(f"{target} was {not_str}found in {sequence}")
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-17 09:41:10 +02:00
Ashley Jeji George
1ac75f4683
Create priority_queue_using_list.py ( #2435 )
...
* 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>
2020-09-16 18:42:53 +02:00
Du Yuanchao
cbbc43ba3a
Updated problem_04 in project_euler ( #2427 )
...
* 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>
2020-09-14 22:33:08 +02:00
Hasenn
10aa214fcb
Docstrings and formatting improvements ( #2418 )
...
* 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>
2020-09-14 14:40:27 +02:00
Ashley Jeji George
799fde4c07
Update linear_search.py ( #2422 )
...
* 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>
2020-09-14 12:44:46 +02:00
Santosh Mohan Rajkumar
4e5b730e85
recaptchaVerification ( #2417 )
...
* 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>
2020-09-13 22:26:15 +02:00
Du Yuanchao
44b8cb0c81
Updated Stack ( #2414 )
...
* * 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>
2020-09-13 13:56:03 +02:00
Du Yuanchao
d6bff5c133
Renamed files and fixed Doctest ( #2421 )
...
* * Renamed files
* Fiexed doctest
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-13 13:27:20 +02:00
Hasenn
20e98fcded
Fix some warnings from LGTM ( #2420 )
...
* 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>
2020-09-13 10:11:27 +02:00
Guillaume Rochedix
f754c0d31f
Jump search ( #2415 )
...
* jump_search: doctest, docstring, type hint, inputs
* jumpsearch.py: case number not found
* trailing whitespace jump search
2020-09-12 07:50:12 +02:00
Meysam
2e790ce4ca
file-transfer: writing tests and ensuring that all is going well ( #2413 )
...
* 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>
2020-09-11 23:13:43 +02:00
Santosh Mohan Rajkumar
c676956030
lxmlCovidDataFetch ( #2416 )
...
* 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>
2020-09-11 22:25:05 +02:00
Marcos Cannabrava
a191f89fe2
Fix Non Recursive Depth First Search ( #2207 )
...
* 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>
2020-09-11 16:23:26 +02:00
mohammadreza490
1b3fec3f1f
binary_to_decimal converter ( #2400 )
...
* 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>
2020-09-11 06:16:43 +02:00
mohammadreza490
696cd47e15
octal_to_decimal converter ( #2399 )
...
* 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>
2020-09-10 10:37:29 +02:00
Du Yuanchao
4d0a8f2355
Optimized recursive_bubble_sort ( #2410 )
...
* 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>
2020-09-10 10:31:26 +02:00
Tanuj Dhiman
25946e4570
Update scoring_functions.py ( #2291 )
...
* 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>
2020-09-09 19:04:46 +02:00
NEERAJ ADITYANANTH POLAMPALLI
c0dcc556b3
Update triplet_sum.py ( #2404 )
2020-09-06 10:40:46 +02:00
NEERAJ ADITYANANTH POLAMPALLI
3b1c4f72ce
changed a typo ( #2396 )
2020-09-05 13:09:18 +02:00
mohammadreza490
1385e47c36
Create hexadecimal_to_decimal ( #2393 )
...
* 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>
2020-09-04 15:48:44 +02:00
mohammadreza490
c38dec091f
capitalize ( #2389 )
...
* 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>
2020-09-03 16:11:23 +02:00
Shubham Shaswat
a1d1a44f51
added idf-smooth ( #2174 )
...
* added idf-smooth
* added idf-smooth
* added idf-smooth
2020-09-02 19:33:12 +02:00
Muskan Kumar
e92e433dbe
Update CONTRIBUTING.md ( #2378 )
...
* 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>
2020-08-31 21:34:44 +02:00
小么小儿郎EL
80daa5750a
Fix bugs and add related tests ( #2375 )
2020-08-31 18:55:56 +02:00
kanthuc
472f63eaa5
Adding type hints to RedBlackTree ( #2371 )
...
* redblacktree type hints
* fixed type hints to pass flake8
2020-08-30 21:22:36 +02:00
Björn Olsson Jarl
8c191f1fc9
Added type hints for maths/fibonacci_sequence_recursion. ( #2372 )
2020-08-30 10:51:45 +02:00
Björn Olsson Jarl
ab5a046581
Added type hints and doctest for maths/prime_check. ( #2367 )
...
* Added type hints and doctest for maths/prime_check.
* Removed doctests.
2020-08-29 17:11:02 +02:00
Kushagra Bansal
f2f0425357
Created ugly_numbers.py in Python/maths ( #2366 )
...
* Add files via upload
* Update ugly_numbers.py
* Update ugly_numbers.py
* Update ugly_numbers.py
2020-08-29 16:57:34 +02:00
Aanuoluwapo Babajide
1f5134b368
Create alternate_disjoint_set.py ( #2302 )
...
* 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
2020-08-28 18:25:02 +02:00
Kushagra Bansal
5ef784331e
Created triplet_sum in Python/other ( #2362 )
...
* 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>
2020-08-28 15:50:35 +02:00
Kushagra Bansal
194b56d376
Created problem_63 in project_euler ( #2357 )
...
* 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>
2020-08-27 13:40:03 +02:00
wuyudi
cf385ad7ef
Update merge_sort.py ( #2356 )
...
* Update merge_sort.py
* Update merge_sort.py
2020-08-27 09:45:03 +02:00
Firejay3
61dde44434
Added binery_or_operator.py to bit manipulation file ( #2331 )
...
* 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>
2020-08-27 09:09:42 +02:00
TrapinchO
30126c26dd
Added enigma machine emulator ( #2345 )
...
* 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
2020-08-26 21:52:17 +02:00
Kushagra Bansal
9aa10ca358
Created problem_55 in project_euler ( #2354 )
...
* Create __init__.py
* Add files via upload
* Update sol1.py
2020-08-26 13:31:13 +02:00
Iheb Haboubi
2c0127d71a
Perfect square using binary search ( #2351 )
...
* Add perfect_square_binary_search
* Update tests
* Add tests
2020-08-25 21:26:11 +02:00
Christian Clauss
ee914c751c
Delete sleep_sort.py ( #2352 )
...
* 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>
2020-08-25 15:48:04 +02:00
Christian Clauss
e77600638d
Travis CI: Identify our ten slowest pytests ( #2350 )
...
* 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>
2020-08-25 15:47:06 +02:00
Kushagra Bansal
402ba7f49a
Created problem_45 in project_euler and Speed Boost for problem_34/sol1.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>
2020-08-25 13:48:19 +02:00
Kushagra Bansal
5cfc017ebb
Created problem_44 in project_euler ( #2348 )
...
* 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>
2020-08-25 09:46:13 +02:00
kanthuc
f8c57130f2
lazy_segment_tree.py-style-fixes ( #2347 )
...
* fixed variable naming and unnecessary type hints
* print(segt)
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-24 09:52:02 +02:00
BAKEZQ
d402cd0b6e
Fix SettingWithCopy warning by pandas ( #2346 )
...
* Fix SettingWithCopy warning in pandas
https://github.com/TheAlgorithms/Python/issues/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
2020-08-23 13:40:57 +02:00
Guillaume Rochedix
ee28deea4a
Insertion sort : type hint, docstring ( #2327 )
...
* insertion sort : docstring, type hinting
* Update insertion_sort.py
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-23 04:35:54 +02:00
Kaif Kohari
a46b5559e0
Job fetching ( #2219 )
...
* Adding job scarping algorithm to web programming
* Delete fetch_jobs.py
* Adding Jobs Scraping to web programming
* Add Python type hints
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-21 23:58:26 +02:00
wuyudi
6822d1afeb
Update matrix_operation.py ( #2344 )
...
* Update matrix_operation.py
* Update matrix_operation.py
* Update matrix_operation.py
* Update matrix_operation.py
* Update matrix_operation.py
* Update matrix_operation.py
2020-08-21 20:41:48 +02:00