* makes LRUCache constructor concrete
* fixes bug in dq_removal in other/least_recently_used
+ deque.remove() operates by value not index
* [mypy] Annotates other/least_recently_used over generic type
+ clean-up: rename key_reference to match type.
* [mypy] updates example to demonstrate LRUCache with complex type
* Adds doctest to other/least_recently_used
* mypy.ini: Remove exclude = (other/least_recently_used.py)
* Various mypy configs
* Delete mypy.ini
* Add mypy to .pre-commit-config.yaml
* mypy --ignore-missing-imports --install-types --non-interactive .
* mypy v0.910
* Pillow=8.3.7
* Pillow==8.3.7
* Pillow==8.3.2
* Update .pre-commit-config.yaml
* Update requirements.txt
* Update pre-commit.yml
* --install-types # See mirrors-mypy README.md
Co-authored-by: Christian Clauss <cclauss@me.com>
* add 5 README files
* empty commit to (hopefully) get rid of the `test-are-failling` label
* Update ciphers/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update conversions/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update cellular_automata/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update computer_vision/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update conversions/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update compression/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Adds repr and doctest of current behavior linkedlist in other/lru_cache
* Blocks removal of head or tail of double linked list
* clarifies add() logic for double linked list in other/lru_cache
* expands doctests to compare cache and lru cache
* [mypy] annotates vars for other/lru_cache
* [mypy] Annotates lru_cache decorator for other/lru_cache
* Higher order functions require a verbose Callable annotation
* [mypy] Makes LRU_Cache generic over key and value types for other/lru_cache
+ no reason to force int -> int
* [mypy] makes decorator a classmethod for access to class generic types
* breaks two long lines in doctest for other/lru_cache
* simplifies boundary test remove() for other/lru_cache
* [mypy] Annotates, adds doctests, and makes Generic other/lfu_cache
See also commits to other/lru_cache which guided these
* [mypy] annotates cls var in other/lfu_cache
* cleans up items from code review for lfu_cache and lru_cache
* [mypy] runs mypy on lfu_cache and lru_cache
* Added solution for Project Euler problem 145
* Updated spelling of comments
Updated spelling inline with codespell
* Removed trailing whitespaces in comments
* Added default values.
* nr -> number
Co-authored-by: John Law <johnlaw.po@gmail.com>
* nr -> number
* Update sol1.py
* Update sol1.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Type annotations for `breadth_first_search.py`
* Type annotations for `breadth_first_search_2.py`
* Remove from excluded in mypy.ini
* Add doctest.testmod()
* Type annotations for `graphs/check_cycle.py`
* Type annotations for `graphs/greedy_min_vertex_cover.py`
* Remove from excluded in mypy.ini
* ADD the algorithms of image augmentation
* ADD the algorithms of image augmentation
* ADD the algorithms of image augmentation
* ADD the algorithms of image augmentation
* ADD the algorithms of image augmentation
* ADD the algorithms of image augmentation
* UPDATE format code
* UPDATE format and recode structure
* UPDATE format import library
* UPDATE code structure
* Fix all checks have failded
* FIX variable format
* FIX variable format
* FIX variable format
* FIX code structure
* FIX code structure
* FIX code structure
* FIX code structure
* Improve solution
* Uncomment code that has been commented due to slow execution affecting Travis
* Fix
* scikit-fuzzy is causing broken builds
* fuzz = None
* Update fuzzy_operations.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add all_construct dynamic programming implementation
* all_construct: remove the main function
* all_construct: Add type hints
* all_construct: changed map to list comprehension,fix mutable default arguments
* all_construct: fixed type hints
* all_construct: cleaner code for initializing word_bank argument
* all_construct: added an import for annotations
* all_construct: added None in the argument with word_bank
* all_construct: fixed a type hint
* all_construct: Fixed some more type hints
* Added 5 README files
* corrected arithmetic_analysis README
* Update audio_filters/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update backtracking/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update bit_manipulation/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
+ As per usage examples, clause literals are a list of strings.
+ Note: symbols extracted from literals are expected to be exactly two characters.
+ self.literal boolean values are initialized to None, so must be optional
+ model values should be Booleans, but aren't guaranteed to be non-None
in the code.
+ uses newer '... | None' annotation for Optional values
+ clauses are passed to the Formula initializer as both lists and sets, they
are stored as lists. Returned clauses will always be lists.
+ use explicit tuple annotation from __future__ rather than using (..., ...)
in return signatures
+ mapping returned by dpll_algorithm is optional per the documentation.
* Added a gray_code_sequence.py file to the bit_manipulation folder
* Added a descriptive name for variable n changing it to bit count
* Update gray_code_sequence.py
Co-authored-by: krishchopra02 <krishchopra02@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Add stone unit of measuring weight
And some tests in the docs using an external calculator. Not yet tested if they pass.
* Fix rounding descrepencies in doctests to pass tests
* Rewrite parts of Vector and Matrix methods
* Refactor determinant method and add unit tests
Refactor determinant method to create separate minor and cofactor
methods.
Add respective unit tests for new methods.
Rename methods using snake case to follow Python naming conventions.
* Reorganize Vector and Matrix methods
* Update linear_algebra/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Fix punctuation and wording
* Apply suggestions from code review
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Deduplicate euclidean length method for Vector
* Add more unit tests for Euclidean length method
* Fix bug in unit test for euclidean_length
* Remove old comments for magnitude method
* Rewrite maths/fibonacci.py
* Rewrite timer and add unit tests
* Fix typos in fib_binet unit tests
* Fix typos in fib_binet unit tests
* Clean main method
Co-authored-by: John Law <johnlaw.po@gmail.com>