* 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
* added Greedy min vertex algorithm
* pre-commit hook(s) made changes
* Delete complete_graph_generator.py
* Delete random_graph_generator.py
* fixed doctest
* updated commit following highligths
* fixed following pre-commit highlights
* modified variables names
* Add Proth number to maths
* Add test for 0 and more informative output
* Fixing test failure issue - unused variable
* Update proth_number.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Magnitude and Angle
Core function to find Magnitude and Angle of two Given Vector
* Magnitude and Angle with Doctest
added Doctest to the functions
* Update linear_algebra/src/lib.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update linear_algebra/src/lib.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Changes done
and Magnitude and Angle Issues
* black
* Modified Euler's Method
Adding Modified Euler's method, which was the further change to a Euler method and known for better accuracy to the given value
* Modified Euler's Method (changed the typing of function)
Modified function is used for better accuracy
* Link added
Added link to an explanation as per Contributions Guidelines
* Resolving Pre-Commit error
* Pre-Commit Error Resolved
* Pre-Commit Error import statement Change
* Removed Import Math
* import math built issue
* adding space pre-commit error
* statement sorter for doc
Co-authored-by: Christian Clauss <cclauss@me.com>
* Magnitude and Angle
Core function to find Magnitude and Angle of two Given Vector
* Magnitude and Angle with Doctest
added Doctest to the functions
* Update linear_algebra/src/lib.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update linear_algebra/src/lib.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Changes done
and Magnitude and Angle Issues
* black
Co-authored-by: Christian Clauss <cclauss@me.com>
* [mypy] fix type annotations for problem003/sol1 and problem003/sol3
* [mypy] fix type annotations for project euler problem007/sol2
* [mypy] fix type annotations for project euler problem008/sol2
* [mypy] fix type annotations for project euler problem009/sol1
* [mypy] fix type annotations for project euler problem014/sol1
* [mypy] fix type annotations for project euler problem 025/sol2
* [mypy] fix type annotations for project euler problem026/sol1.py
* [mypy] fix type annotations for project euler problem037/sol1
* [mypy] fix type annotations for project euler problem044/sol1
* [mypy] fix type annotations for project euler problem046/sol1
* [mypy] fix type annotations for project euler problem051/sol1
* [mypy] fix type annotations for project euler problem074/sol2
* [mypy] fix type annotations for project euler problem080/sol1
* [mypy] fix type annotations for project euler problem099/sol1
* [mypy] fix type annotations for project euler problem101/sol1
* [mypy] fix type annotations for project euler problem188/sol1
* [mypy] fix type annotations for project euler problem191/sol1
* [mypy] fix type annotations for project euler problem207/sol1
* [mypy] fix type annotations for project euler problem551/sol1
* Algorithm Optimized
* Update divide_and_conquer/inversions.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update divide_and_conquer/inversions.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update divide_and_conquer/inversions.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* added carrier concentrations algorithm
* Add more references
Added more references to the carrier concentrations file
* Update electronics/carrier_concentration.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update electronics/carrier_concentration.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
Conjunctive adverbs should be followed by a comma.
For more details, kindly refer:
https://www.aje.com/arc/editing-tip-commas-conjunctive-adverbs/
Separate out the labels into two rows
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
* Added Julia sets drawing
* Forgot the .py extension
* Update julia_sets.py
Added online sources for comparison.
Added more examples of fractal Julia sets.
Added all type hints.
Only show one picture
Silented RuntuleWarning's (there's no way of avoiding them and they're not an issue per se)
* Added doctest example for "show_results"
* Filtering Nan's and infinites
* added 1 missing type hint
* in iterate_function, convert to dtype=complex64
* RuntimeWarning (fine) filtering
* Type hint, test for ignore_warnings function, typo in header
* Update julia_sets.py
Type of expected output value for iterate function int array -> complex array (throws an error on test)
* Update julia_sets.py
- More accurate type for tests cases in eval_quadratic_polynomial and iterate_function
- added more characters for variables c & z in eval_quadratic_polynomial and eval_exponential to silent bot warnings
* Function def formatting
Blocked by black
* Update julia_sets.py
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* added more doctests for eval_exponential
* Update fractals/julia_sets.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update and rename check_valid_ip_address.py to is_ip_v4_address_valid.py
New test cases that the algorithm must detect:
* [ ] an octet much bigger than 255
* [ ] an octet is negative
* [ ] number of octets is less than 4
* [ ] number of octets is greater than 4
* [ ] an octet is a letter
* updating DIRECTORY.md
* Add two more tests to is_ip_v4_address_valid.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* mypy --install-types --non-interactive .
@dhruvmanila Is this useful/needed given that we do not pin our dependencies?
https://mypy-lang.blogspot.com/2021/06/mypy-0910-released.html
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added gamma_function
* Add files via upload
* Resolved issue with str.format
And also changed output to math notation
* Update gamma_function.py
* Rename physics/gamma_function.py to maths/gamma_recursive.py
* Fixes: #4709 Fixed issues for pre-commit test
* Fixes: #4709 solved issues with doctests
And comments
* Fixes: #4709 Added failed tests to doctest
* Align with Python's Standard Library math.gamma()
Replicate the exceptions of https://docs.python.org/3/library/math.html#math.gamma
* Update gamma_recursive.py
* Update gamma_recursive.py
* Update gamma_recursive.py
* Update gamma_recursive.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added Dutch national flag sort Algorithm
* Changed file name to dnf_sort.py
* Added descriptive name and type hint
Added descriptive name and type hint for parameter with doctest for the function dnf_sort.
* Added test cases
* Added doctest cases
* Update sorts/dnf_sort.py
* Added doctest for dutch_national_flag_sort sorts/dnf_sort.py
* Update sorts/dnf_sort.py
* Added doctest for the function
dutch_national_flag_sort
* update file as per black code formatter
* Update dnf_sort.py
* Update and rename dnf_sort.py to dutch_national_flag_sort.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Approve functions used as default argumenets
* The default value for **seed** is the result of a function call
The default value for **seed** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `LinearCongruentialGenerator.__init__()` will only be called once per instance and it ensures that each instance will generate a unique sequence of numbers.
* The default value for **backend** is the result of a function call
The default value for **backend** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `Aer.get_backend()` is called when the function is definition and that same backend is then reused for function calls.
* Update linear_congruential_generator.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* luhn.py: Favor list comprehensions over maps
As discussed in CONTRIBUTING.md.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* boruvka.py: A few simplifications and f-strings
Python f-strings simplify the code and [should speed up execution](https://www.scivision.dev/python-f-string-speed).
@srkchowdary2000 Your review, please.
* updating DIRECTORY.md
* fixup! Streamline the test
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added Borůvka's algorithm.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.Removed WhiteSpaces.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Code Changes.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Code Changes.