Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fbad85d

Browse files
tianyizheng02github-actions
and
github-actions
authored
Delete empty junk file (TheAlgorithms#9062)
* updating DIRECTORY.md * updating DIRECTORY.md * Delete empty junk file * updating DIRECTORY.md * Fix ruff errors * Fix more ruff errors --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 1488cde commit fbad85d

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

‎DIRECTORY.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* [In Static Equilibrium](arithmetic_analysis/in_static_equilibrium.py)
66
* [Intersection](arithmetic_analysis/intersection.py)
77
* [Jacobi Iteration Method](arithmetic_analysis/jacobi_iteration_method.py)
8-
* [Junk](arithmetic_analysis/junk.py)
98
* [Lu Decomposition](arithmetic_analysis/lu_decomposition.py)
109
* [Newton Forward Interpolation](arithmetic_analysis/newton_forward_interpolation.py)
1110
* [Newton Method](arithmetic_analysis/newton_method.py)

‎arithmetic_analysis/junk.py‎

Whitespace-only changes.

‎computer_vision/haralick_descriptors.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ def binarize(image: np.ndarray, threshold: float = 127.0) -> np.ndarray:
100100
return np.where(image > threshold, 1, 0)
101101

102102

103-
def transform(image: np.ndarray, kind: str, kernel: np.ndarray = None) -> np.ndarray:
103+
def transform(
104+
image: np.ndarray, kind: str, kernel: np.ndarray | None = None
105+
) -> np.ndarray:
104106
"""
105107
Simple image transformation using one of two available filter functions:
106108
Erosion and Dilation.
@@ -154,7 +156,7 @@ def transform(image: np.ndarray, kind: str, kernel: np.ndarray = None) -> np.nda
154156
return transformed
155157

156158

157-
def opening_filter(image: np.ndarray, kernel: np.ndarray = None) -> np.ndarray:
159+
def opening_filter(image: np.ndarray, kernel: np.ndarray |None= None) -> np.ndarray:
158160
"""
159161
Opening filter, defined as the sequence of
160162
erosion and then a dilation filter on the same image.
@@ -172,7 +174,7 @@ def opening_filter(image: np.ndarray, kernel: np.ndarray = None) -> np.ndarray:
172174
return transform(transform(image, "dilation", kernel), "erosion", kernel)
173175

174176

175-
def closing_filter(image: np.ndarray, kernel: np.ndarray = None) -> np.ndarray:
177+
def closing_filter(image: np.ndarray, kernel: np.ndarray |None= None) -> np.ndarray:
176178
"""
177179
Opening filter, defined as the sequence of
178180
dilation and then erosion filter on the same image.

‎conversions/convert_number_to_words.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def max_value(cls, system: str) -> int:
5454

5555

5656
class NumberWords(Enum):
57-
ONES: ClassVar = {
57+
ONES: ClassVar[dict[int, str]] = {
5858
0: "",
5959
1: "one",
6060
2: "two",
@@ -67,7 +67,7 @@ class NumberWords(Enum):
6767
9: "nine",
6868
}
6969

70-
TEENS: ClassVar = {
70+
TEENS: ClassVar[dict[int, str]] = {
7171
0: "ten",
7272
1: "eleven",
7373
2: "twelve",
@@ -80,7 +80,7 @@ class NumberWords(Enum):
8080
9: "nineteen",
8181
}
8282

83-
TENS: ClassVar = {
83+
TENS: ClassVar[dict[int, str]] = {
8484
2: "twenty",
8585
3: "thirty",
8686
4: "forty",

‎graphs/tarjans_scc.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def create_graph(n, edges):
7777
n_vertices = 7
7878
source = [0, 0, 1, 2, 3, 3, 4, 4, 6]
7979
target = [1, 3, 2, 0, 1, 4, 5, 6, 5]
80-
edges = [(u, v) foru, vinzip(source, target)]
80+
edges = list(zip(source, target))
8181
g = create_graph(n_vertices, edges)
8282

8383
assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /