* 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 <cclauss@me.com>
* Type hints added to conversions/fahrenheit_to_celsius.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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 <cclauss@me.com>
* Added Standardization and Normalization algorithms with built-in stats
* Implement ndigits for rounding
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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 <cclauss@me.com>
* Update backtracking/n_queens_math.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/n_queens_math.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/n_queens_math.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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 <cclauss@me.com>
* 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
* 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 <cclauss@me.com>
* Fixed some flake8 issues.
* Updated it to donors and recipients
* description changes
Co-authored-by: Christian Clauss <cclauss@me.com>
* description changes
Co-authored-by: Christian Clauss <cclauss@me.com>
* description changes
Co-authored-by: Christian Clauss <cclauss@me.com>
* Edited the line lengths
* Update gale_shapley_bigraph.py
* Update gale_shapley_bigraph.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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 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>