* Add typing for bfs
* Add url for BFS
* rename the function
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update graphs/bfs.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Change the return value type of bfs
* change the function name.
change all instances of bfs() to breadth_first_search().
* change the function name in annotate
* Add one more blank line.
* Delete one blank line.
* Delete one blank line.
I've read the https://www.flake8rules.com/rules/W391.html, and still don't know how to do it. I've tried using 0 ,1,2 blank lines...
* Update graphs/bfs.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update graphs/bfs.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Rename bfs.py to breadth_first_search_2.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Create __init__.py
* Initial commit
Not sure if this should be formatted differently. I'm open to ideas!
* Completing testing/updates
Ran code through `black`, `flake8`, and `doctest`. Added some type hints.
`doctest` is finicky on sets, so I had to sort and reformat as set to pass those tests.
* Update project_euler/problem_47/sol1.py
Nice.
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Looks good
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Okay, this should work. Thank you for the reminder on map(), filter(), reduce().
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
My IDE needs a spellchecker. Or, lighter comment font.
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
This means that `results = run(N)` should be updated to `results = run(n)`, correct?
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Looks good!
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update project_euler/problem_47/sol1.py
Works for me! I spent way too much time getting this to pass doctest, so any improvement is welcome.
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update sol1.py
Added some suggested changes from the pull request:
* Updated tests outputs in `unique_prime_factors` function.
* Changed `@lru_cache(maxsize=5)` to `@lru_cache(maxsize=None)`
* Removed duplicate `return` line in `equality` function
* Changed `i` to `base` in run function.
* Added some commentary to `run()` function.
* Replaced `group = list(map(lambda x: base + x, [i for i in range(n)]))` with `group = [base + i for i in range(n)]`
* Update sol1.py
* Trailing whitespace
* Update sol1.py
* Update __init__.py
* Update sol1.py
* Update __init__.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* NLP Word Frequency Algorithms
* Added type hints and Wikipedia link to tf-idf
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix line length for flake8
* Fix line length for flake8 V2
* Add line escapes and change int to float
* Corrected doctests
* Fix for TravisCI
* Fix for TravisCI V2
* Tests passing locally
* Tests passing locally
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update machine_learning/word_frequency_functions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add doctest examples and clean up docstrings
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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>
* 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 maximum non-adjacent sum
* Bugfix: flake8 test
* Implemented changes (broke tuple unpacking into 2 lines due to flake8 tests)
* Implemented changes v2.0
* Update max_non_adjacent_sum.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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>
* 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
* Added function to convert from decimal to another base
* Update conversions/decimal_to_any.py
Changed type() to isinstance()
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update conversions/decimal_to_any.py
Changed to base in (0, 1)
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update conversions/decimal_to_any.py
Updated to div not in (0, 1)
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update conversions/decimal_to_any.py
Updated to make condition clearer
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update conversions/decimal_to_any.py
Using divmod() instead of % operator
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update conversions/decimal_to_any.py
Improved readability on a docstring test
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update conversions/decimal_to_any.py
Changed use of type() to isinstance()
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update conversions/decimal_to_any.py
Changed from use of type() to isinstance()
Co-authored-by: Christian Clauss <cclauss@me.com>
* Made changes and improved function
* Update conversions/decimal_to_any.py
Added space to docstring test
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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 <cclauss@me.com>
* 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 <cclauss@me.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* 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>
* 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 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 <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>