* Added mean absolute error in linear regression
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Code feedback changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Apply suggestions from code review
* Update linear_regression.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Adding a Quine in Python.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* implement function to handle polynomial operations
* edit documentation
* fix type hint and linter errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix short variable name
* fix spelling
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added Readme file to document the hashing algorithm.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Adding ELFHash Algorithm
Adding a new Hash Algorithm.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update elf.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update elf.py
* Update elf.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update elf.py
* Apply suggestions from code review
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* For the better understanding of time taken.
In this change I have initialized a variable p with the value of (1e9+7) and then took the modulus of process time with it . This modification gives better time taken by the process . Firstly it was giving answer in the exponential now it gives in the integer form.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Description of DOuble hasing
* Fix sheebang
* Update double_hash.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update double_hash.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added explanation and increased speed of the solution of problem 092
* updating DIRECTORY.md
* Added temporary fix to the failing of problem 104
* Reduced few seconds by minor improvements
* Update sol.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* quantum_teleportation.py
This code is for the #Hacktoberfest.
This file run the quantum teleportation circuit using Qiskit.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update quantum/quantum_teleportation.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update quantum/quantum_teleportation.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update
Corrected some typos.
Add more comments for adding the gates.
Update the variable qc with quantum_circuit in the simulator and execute.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* python return typehint solved.
* Fix long line
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Updated info
Updated the readme section for sorts.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update sorts/README.md
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update README.md
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added Manhattan distance algorithm, Fixes: #7776
* Forgot that isinstance can accept a tuple
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manhattan_distance.py
* Update manhattan_distance.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Increased Readability Of Variables
* Update anagrams.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update anagrams.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* added recursive dfs backtracking for count paths with doctests
* fixed doc testing
* added type hints
* redefined r as row, c as col
* fixed naming conventions, ran mypy, only tests that didn't pass were using List[], rathan list()
* added another doctest, as well as a explanation above
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update matrix/count_paths.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update matrix/count_paths.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: J <jasondevers@wireless-10-105-49-243.umd.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Added cosine similarity
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Resonant Frequency
* Resonant Frequency of LC Circuit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update electronics/resonant_frequency.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update electronics/resonant_frequency.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update electronics/resonant_frequency.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated resonant_frequency.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update electronics/resonant_frequency.py
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
* Fixed doctest issues in resonant_frequency.py
* Algorithm for Electrical Impedance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated Algorithm for Electrical Impedance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update resonant_frequency.py
* Update electrical_impedance.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update resonant_frequency.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update electronics/electrical_impedance.py
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
* Update electronics/electrical_impedance.py
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
* Update electronics/resonant_frequency.py
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
* Added Viterbi algorithm Fixes: #7465
Squashed commits
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added doctest for validators
* moved all extracted functions to the main function
* Forgot a type hint
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add files via upload
* Delete permutations.cpython-310.pyc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update permutations.py
* Update permutations.py
* Add files via upload
* Delete permutations.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update permutations.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update permutations.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update permutations.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update data_structures/arrays/permutations.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update permutations.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update permutations.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update data_structures/arrays/permutations.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update permutations.py
* Update permutations.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update permutations.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Create recursive_approach_knapsack.py
Added a new naïve recursive approach to solve the knapsack problem.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update recursive_approach_knapsack.py
Updated the code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update recursive_approach_knapsack.py
Updated
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update password_generator.py
1. Use secrets module instead of random for passwords as it gives a secure source of randomness
2. Add type annotations for functions
3. Replace ctbi (variable for the characters to be included) with a more meaningful and short name
4. Use integer division instead of obtaining the integer part of a division computing a floating point
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create centripetal_force.py
Centripetal force is the force acting on an object in curvilinear motion directed towards the axis of rotation or centre of curvature.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update centripetal_force.py
The value error should also handle negative values of the radius and using more descriptive names will be more beneficial for the users
* Update centripetal_force.py
Made some bug fixes
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: SparshRastogi <75373475+SparshRastogi@users.noreply.github.com>
* Create potential_energy.py
Finding the gravitational potential energy of an object with reference to the earth, by taking its mass and height above the ground as input
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update physics/potential_energy.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update physics/potential_energy.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Cleanup the BFS
* Add both functions and timeit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add performace results as comment
* Update breadth_first_search_2.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Create combination_sum_iv.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update dynamic_programming/combination_sum_iv.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update dynamic_programming/combination_sum_iv.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update dynamic_programming/combination_sum_iv.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update combination_sum_iv.py
* Update combination_sum_iv.py
* Resolved PR Comments
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* minor change, argument missing in function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update dynamic_programming/combination_sum_iv.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* minor change
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update maximum_subarray.py
1. Rectify documentation to indicate the correct output: function doesn't return the subarray, but rather returns a sum.
2. Make the function more Pythonic and optimal.
3. Make function annotation generic i.e. can accept any sequence.
4. Raise value error when the input sequence is empty.
* Update maximum_subarray.py
1. Use the conventions as mentioned in pep-0257.
2. Use negative infinity as the initial value for the current maximum and the answer.
* Update maximum_subarray.py
Avoid type conflict by returning the answer cast to an integer.
* Update other/maximum_subarray.py
Co-authored-by: Andrey <Cjkjvfnby@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update maximum_subarray.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update maximum_subarray.py
Remove typecast to int for the final answer
Co-authored-by: Andrey <Cjkjvfnby@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create fetch_amazon_product_data.py
This file provides a function which will take
a product name as input from the user,and fetch the necessary
information about that kind of products from Amazon like the product
title,link to that product,price of the product,the ratings of
the product and the discount available on the product
in the form of a csv file,this will help the users by improving searchability
and navigability and find the right product easily and in a short period of time,
it will also be beneficial for performing better analysis on products
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update fetch_amazon_product_data.py
Added type hints and modified files to pass precommit test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update fetch_amazon_product_data.py
Added type hints and made changes to pass the precommit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update fetch_amazon_product_data.py
Modified function to return the data in the form of Pandas Dataframe,modified type hints and added a functionality to let the user determine if they need the data in a csv file
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update fetch_amazon_product_data.py
Made some bug fixes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update and rename fetch_amazon_product_data.py to get_amazon_product_data.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update get_amazon_product_data.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Implemented Swish Function
* Added more description and return hint in def
* Changed the name and added more descrition including test for sigmoid function
* Added * in front of links