repo_name stringclasses 1
value | pr_number int64 4.12k 11.2k | pr_title stringlengths 9 107 | pr_description stringlengths 107 5.48k | author stringlengths 4 18 | date_created timestamp[ns, tz=UTC] | date_merged timestamp[ns, tz=UTC] | previous_commit stringlengths 40 40 | pr_commit stringlengths 40 40 | query stringlengths 118 5.52k | before_content stringlengths 0 7.93M | after_content stringlengths 0 7.93M | label int64 -1 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
TheAlgorithms/Python | 9,358 | Removed redundant greatest_common_divisor code | ### Describe your change:
Previously all the files that needed greatest_common_divisor (aka gcd), used to define the method instead of just importing from Maths directory's greatest_common_divisor.py file. I removed thos definitions and imported gcd method from Maths folder. Fixes #8098
* [ ] Add an algorithm?
*... | Siddikpatel | 2023-10-02T05:03:50Z | 2023-10-09T12:19:12Z | 876087be998d5b366d68cbb9394b6b92b7f619f6 | 583a614fefaa9c932e6d650abfea2eaa75a93b05 | Removed redundant greatest_common_divisor code. ### Describe your change:
Previously all the files that needed greatest_common_divisor (aka gcd), used to define the method instead of just importing from Maths directory's greatest_common_divisor.py file. I removed thos definitions and imported gcd method from Maths f... | """
Reference: https://www.investopedia.com/terms/p/presentvalue.asp
An algorithm that calculates the present value of a stream of yearly cash flows given...
1. The discount rate (as a decimal, not a percent)
2. An array of cash flows, with the index of the cash flow being the associated year
Note: This algorithm ass... | """
Reference: https://www.investopedia.com/terms/p/presentvalue.asp
An algorithm that calculates the present value of a stream of yearly cash flows given...
1. The discount rate (as a decimal, not a percent)
2. An array of cash flows, with the index of the cash flow being the associated year
Note: This algorithm ass... | -1 |
TheAlgorithms/Python | 9,358 | Removed redundant greatest_common_divisor code | ### Describe your change:
Previously all the files that needed greatest_common_divisor (aka gcd), used to define the method instead of just importing from Maths directory's greatest_common_divisor.py file. I removed thos definitions and imported gcd method from Maths folder. Fixes #8098
* [ ] Add an algorithm?
*... | Siddikpatel | 2023-10-02T05:03:50Z | 2023-10-09T12:19:12Z | 876087be998d5b366d68cbb9394b6b92b7f619f6 | 583a614fefaa9c932e6d650abfea2eaa75a93b05 | Removed redundant greatest_common_divisor code. ### Describe your change:
Previously all the files that needed greatest_common_divisor (aka gcd), used to define the method instead of just importing from Maths directory's greatest_common_divisor.py file. I removed thos definitions and imported gcd method from Maths f... | """Prime Check."""
import math
import unittest
def is_prime(number: int) -> bool:
"""Checks to see if a number is a prime in O(sqrt(n)).
A number is prime if it has exactly two factors: 1 and itself.
>>> is_prime(0)
False
>>> is_prime(1)
False
>>> is_prime(2)
True
>>> is_prime(3... | """Prime Check."""
import math
import unittest
def is_prime(number: int) -> bool:
"""Checks to see if a number is a prime in O(sqrt(n)).
A number is prime if it has exactly two factors: 1 and itself.
>>> is_prime(0)
False
>>> is_prime(1)
False
>>> is_prime(2)
True
>>> is_prime(3... | -1 |
TheAlgorithms/Python | 9,358 | Removed redundant greatest_common_divisor code | ### Describe your change:
Previously all the files that needed greatest_common_divisor (aka gcd), used to define the method instead of just importing from Maths directory's greatest_common_divisor.py file. I removed thos definitions and imported gcd method from Maths folder. Fixes #8098
* [ ] Add an algorithm?
*... | Siddikpatel | 2023-10-02T05:03:50Z | 2023-10-09T12:19:12Z | 876087be998d5b366d68cbb9394b6b92b7f619f6 | 583a614fefaa9c932e6d650abfea2eaa75a93b05 | Removed redundant greatest_common_divisor code. ### Describe your change:
Previously all the files that needed greatest_common_divisor (aka gcd), used to define the method instead of just importing from Maths directory's greatest_common_divisor.py file. I removed thos definitions and imported gcd method from Maths f... |