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 | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-executables-have-shebangs
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
types: [python]
- id: trailing-whitespace
- id: requirements-txt-fixer
- repo: https:/... | repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-executables-have-shebangs
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
types: [python]
- id: trailing-whitespace
- id: requirements-txt-fixer
- repo: https:/... | 1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... |
## Audio Filters
* [Butterworth Filter](audio_filters/butterworth_filter.py)
* [Iir Filter](audio_filters/iir_filter.py)
* [Show Response](audio_filters/show_response.py)
## Backtracking
* [All Combinations](backtracking/all_combinations.py)
* [All Permutations](backtracking/all_permutations.py)
* [All Su... |
## Audio Filters
* [Butterworth Filter](audio_filters/butterworth_filter.py)
* [Iir Filter](audio_filters/iir_filter.py)
* [Show Response](audio_filters/show_response.py)
## Backtracking
* [All Combinations](backtracking/all_combinations.py)
* [All Permutations](backtracking/all_permutations.py)
* [All Su... | 1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | """
This program print the matrix in spiral form.
This problem has been solved through recursive way.
Matrix must satisfy below conditions
i) matrix should be only one or two dimensional
ii) number of column of all rows should be equal
"""
def check_matrix(matrix: list[list[int]]) -> bool:
#... | """
This program print the matrix in spiral form.
This problem has been solved through recursive way.
Matrix must satisfy below conditions
i) matrix should be only one or two dimensional
ii) number of column of all rows should be equal
"""
def check_matrix(matrix: list[list[int]]) -> bool:
#... | 1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | # https://farside.ph.utexas.edu/teaching/316/lectures/node46.html
from __future__ import annotations
def capacitor_parallel(capacitors: list[float]) -> float:
"""
Ceq = C1 + C2 + ... + Cn
Calculate the equivalent resistance for any number of capacitors in parallel.
>>> capacitor_parallel([5.71389, 12... | # https://farside.ph.utexas.edu/teaching/316/lectures/node46.html
from __future__ import annotations
def capacitor_parallel(capacitors: list[float]) -> float:
"""
Ceq = C1 + C2 + ... + Cn
Calculate the equivalent resistance for any number of capacitors in parallel.
>>> capacitor_parallel([5.71389, 12... | -1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | """Breath First Search (BFS) can be used when finding the shortest path
from a given source node to a target node in an unweighted graph.
"""
from __future__ import annotations
graph = {
"A": ["B", "C", "E"],
"B": ["A", "D", "E"],
"C": ["A", "F", "G"],
"D": ["B"],
"E": ["A", "B", "D"],
"F": ["C... | """Breath First Search (BFS) can be used when finding the shortest path
from a given source node to a target node in an unweighted graph.
"""
from __future__ import annotations
graph = {
"A": ["B", "C", "E"],
"B": ["A", "D", "E"],
"C": ["A", "F", "G"],
"D": ["B"],
"E": ["A", "B", "D"],
"F": ["C... | -1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | """
Fast inverse square root (1/sqrt(x)) using the Quake III algorithm.
Reference: https://en.wikipedia.org/wiki/Fast_inverse_square_root
Accuracy: https://en.wikipedia.org/wiki/Fast_inverse_square_root#Accuracy
"""
import struct
def fast_inverse_sqrt(number: float) -> float:
"""
Compute the fast inverse squ... | """
Fast inverse square root (1/sqrt(x)) using the Quake III algorithm.
Reference: https://en.wikipedia.org/wiki/Fast_inverse_square_root
Accuracy: https://en.wikipedia.org/wiki/Fast_inverse_square_root#Accuracy
"""
import struct
def fast_inverse_sqrt(number: float) -> float:
"""
Compute the fast inverse squ... | -1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | import math
"""
In cryptography, the TRANSPOSITION cipher is a method of encryption where the
positions of plaintext are shifted a certain number(determined by the key) that
follows a regular system that results in the permuted text, known as the encrypted
text. The type of transposition cipher demonstrated under is t... | import math
"""
In cryptography, the TRANSPOSITION cipher is a method of encryption where the
positions of plaintext are shifted a certain number(determined by the key) that
follows a regular system that results in the permuted text, known as the encrypted
text. The type of transposition cipher demonstrated under is t... | -1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | """
PyTest's for Digital Image Processing
"""
import numpy as np
from cv2 import COLOR_BGR2GRAY, cvtColor, imread
from numpy import array, uint8
from PIL import Image
from digital_image_processing import change_contrast as cc
from digital_image_processing import convert_to_negative as cn
from digital_image_processing ... | """
PyTest's for Digital Image Processing
"""
import numpy as np
from cv2 import COLOR_BGR2GRAY, cvtColor, imread
from numpy import array, uint8
from PIL import Image
from digital_image_processing import change_contrast as cc
from digital_image_processing import convert_to_negative as cn
from digital_image_processing ... | -1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | def rgb_to_cmyk(r_input: int, g_input: int, b_input: int) -> tuple[int, int, int, int]:
"""
Simple RGB to CMYK conversion. Returns percentages of CMYK paint.
https://www.programmingalgorithms.com/algorithm/rgb-to-cmyk/
Note: this is a very popular algorithm that converts colors linearly and gives
o... | def rgb_to_cmyk(r_input: int, g_input: int, b_input: int) -> tuple[int, int, int, int]:
"""
Simple RGB to CMYK conversion. Returns percentages of CMYK paint.
https://www.programmingalgorithms.com/algorithm/rgb-to-cmyk/
Note: this is a very popular algorithm that converts colors linearly and gives
o... | -1 |
TheAlgorithms/Python | 11,154 | [pre-commit.ci] pre-commit autoupdate | <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox-dev/pyproject-fmt: 1.4.1 β 1.5.1](http... | pre-commit-ci[bot] | 2023-11-13T18:22:48 | 2023-11-25T13:53:19 | 050b2a6e2cf0e474b75cf48abe4aa134b97643e4 | 8b39a0fb54d0f63489952606d2036d1a63f981e3 | [pre-commit.ci] pre-commit autoupdate. <!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 β v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.4...v0.1.6)
- [github.com/psf/black: 23.10.1 β 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
- [github.com/tox... | # Minimum cut on Ford_Fulkerson algorithm.
test_graph = [
[0, 16, 13, 0, 0, 0],
[0, 0, 10, 12, 0, 0],
[0, 4, 0, 0, 14, 0],
[0, 0, 9, 0, 0, 20],
[0, 0, 0, 7, 0, 4],
[0, 0, 0, 0, 0, 0],
]
def bfs(graph, s, t, parent):
# Return True if there is node that has not iterated.
visited = [Fals... | # Minimum cut on Ford_Fulkerson algorithm.
test_graph = [
[0, 16, 13, 0, 0, 0],
[0, 0, 10, 12, 0, 0],
[0, 4, 0, 0, 14, 0],
[0, 0, 9, 0, 0, 20],
[0, 0, 0, 7, 0, 4],
[0, 0, 0, 0, 0, 0],
]
def bfs(graph, s, t, parent):
# Return True if there is node that has not iterated.
visited = [Fals... | -1 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 14