* Added physical pressure units
This uses tuple pair which stores units required to be converted to respective other units as mentioned.
Available Units:- Pascal,Bar,Kilopascal,Megapascal,psi(pound per square inch),inHg(in mercury column),torr,atm
* Formatted file
File was formatted as per repo rules
* Reformatted file :)
* Added more reference
* More reference added
* Added solution for probelm_686 of project_euler
* Changed documentation and formatting.
* Added ref link to optimization logic
* Update project_euler/problem_686/sol1.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Financial: principle -> principal
The originally invested amount of money: `principal`
-- https://www.grammarly.com/blog/principle-principal/
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added volume conversions
This is a file which has relevant function which helps in conversion between volume units.
Available Units:- Cubic metre,Litre,KiloLitre,Gallon,Cubic yard,Cubic foot,cup
The file is also written in a way that , adding a new unit can easily be done by modifying tuple available in the source code
* Formatted file
The file was formatted to follow the syntax formatting rules of the repo
* Formatted file further
* Fix validate_initial_digits of credit_card_validator.py
@Bhargavishnu I think that I broke the logic of validate_initial_digits which should require that credit_card_number[0] is 3 before checking that credit_card_number[1] is 4, 5, or 7. Please verify the new changes and the new test cases to make sure that this is correct. Thanks!
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* add an algorithm to spin some words
* Update index.py
* Adding type hint of spin_words function
* Update and rename python_codewars_disemvowel/index.py to strings/reverse_long_words.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* added complete graph generator function
* added doctest, type hints, wikipedia explanation
* added return type hint for function complete_graph
* added descriptive name for the parameter: n
* random graph generator with doctest and type hints
* validated using pre-commit
* Delete complete_graph_generator.py
* fixed doctest
* updated following reviews
* simplified the code following reviews
* fixed doctest and solved consistency issues
* consistency fixes
* Updated Pop function
Added underflow condition
* Update Pop Function
Added condition to check underflow of stack
* Update stack.py
* if not self.stack: raise StackUnderflowError
* Add doctests
* StackUnderflowError
* ..., not ....
* Update stack.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added new file: nasa_data.py
* Modified as per review
* Minor change
* print(get_archive_data("apollo 2011")["collection"]["items"][0]["data"][0]["description"])
* Update nasa_data.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* add check_cycle.py
* Update graphs/check_cycle.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update check_cycle.py
* Apply suggestions from code review
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix type annotations for trie.py
* Add strict type annotations to trie.py
Annotate return type for all functions and type for "nodes"
* updating DIRECTORY.md
* Format trie.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* fix: fix mypy errors
Update binary_search_tree `arr` argument to be typed as a list
within `find_kth_smallest` function
Update return type of `merge_two_binary_trees` as both inputs can
be None which means that a None type value can be returned from
this function
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* [mypy] fix type annotations for graphs/a_star.py #4052
* updating DIRECTORY.md
* Add from __future__ import anotations
* rename delta by DIRECTIONS
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Rename delta by DIRECTIONS in all code
* Enclose script in __main__ code block
* Refactor DIRECTIONS with comments for readibility
* Delete heuristic example comment
* Do not print, return all values
* Fix multilines
* fix black
* Update a_star.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Add missing type annotation
* Fix conversion bug
This failed when called with the documented example of `1.5` and was correctly
pointed out by `mypy --strict`
* Update annotations to Python 3.10 #4052
* Add floats doctest
* Copy list to avoid changing input unpredictably
* Refactor code to make it readable
* updating DIRECTORY.md
* Improve raised ValueErrors and add doctest
* Split doctest in multiples lines
* Change ValueError to Monogons and Digons are not poly
* Correct doctest refering number of sides
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>