Skip to content

Commit d45f0f3

Browse files
committed
made some changes and added isort
1 parent 07d5e27 commit d45f0f3

15 files changed

+225
-131
lines changed

DMA_cell.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
from timeit import default_timer as timer
33

44

5-
def dma_list(dst: int, ea_low: int, nbytes: int) -> Union[Tuple[None], Tuple[int, List[Tuple[int, int, int, int, int, int]]]]:
5+
def dma_list(
6+
dst: int, ea_low: int, nbytes: int
7+
) -> Union[None, Tuple[int, List[Tuple[int, int, int, int, int, int]]]]:
68
t1 = timer()
79
result: List[Tuple[int, int, int, int, int, int]] = []
810
tag_id: int = 0

MachineLearning.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
def machine_learning_libs_test():
8-
98
speed = [100, 80, 130, 111, 96, 110, 90, 94, 86, 150, 120, 144, 146]
109

1110
rotation = [180, 90, 260, 360, 720, 144, 146, 80, 94, 86, 120, 1080, 333]

bubblesort.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
def bubble_sort(speed):
32
n = len(speed)
43
swapped = True

cell_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
from operator import mul
2+
from typing import Tuple
23

34

45
def vmult(
5-
arr: tuple[float, float, float, float, float, float, float, float],
6-
arr2: tuple[float, float, float, float, float, float, float, float],
6+
arr: Tuple[float, float, float, float, float, float, float, float],
7+
arr2: Tuple[float, float, float, float, float, float, float, float],
78
size: int,
8-
) -> tuple[float, float, float, float, float, float, float, float]:
9+
) -> Tuple[float, float, float, float, float, float, float, float]:
910
array_size_by_four = size >> 2
1011
varr = arr[:7] * array_size_by_four
1112
varr2 = arr2[:8] * array_size_by_four

email_slicer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ def email_slicer() -> None:
99
domain = email[email.index("@") + 1 :]
1010

1111
# Format message
12-
message = f"Your username is '{username}' and your domain name is '{domain}'"
12+
message = (
13+
f"Your username is '{username}' and your domain name is '{domain}'"
14+
)
1315

1416
# Print message
1517
print(message)

find_repeated_dna_sequences.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ def find_repeated_dna_sequences(s):
2020
if lst_len < 10:
2121
return list(ans)
2222

23-
nucleotide_mapping = {'A': 1, 'C': 2, 'G': 3, 'T': 4}
23+
nucleotide_mapping = {"A": 1, "C": 2, "G": 3, "T": 4}
2424
nucleotide_mapping = [nucleotide_mapping.get(char, 0) for char in s]
2525

2626
hash_val = build_hash(s, nucleotide_mapping, 0)
2727
hash_set.add(hash_val)
2828

2929
for i in range(1, lst_len - 9):
30-
repeated_sequence = s[i:i + 10]
30+
repeated_sequence = s[i : i + 10]
3131
hash_val = build_hash(s, nucleotide_mapping, i - 1)
3232
add_hash(ans, hash_set, hash_val, repeated_sequence)
3333

fstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
def fstring_test():
2-
32
name = "John"
43
surname = "Doe"
54

isort.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[settings]
2+
line_length=80
3+
multi_line_output=3
4+
include_trailing_comma=True
5+
force_grid_wrap=0
6+
use_parentheses=True

0 commit comments

Comments
 (0)