Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/pythonapp.yml.deprecated

This file was deleted.

2 changes: 1 addition & 1 deletion implementation/file_transfer/receive_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
print("menerima data")
while True:
data = sock.recv(1024)
print(f"{data = }")
print(f"{data}")
if not data:
break
out_file.write(data)
Expand Down
2 changes: 1 addition & 1 deletion implementation/file_transfer/send_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def send_file(filename: str = "textfile.txt", testing: bool = False) -> None:
conn, addr = sock.accept()
print(f"terkoneksi.. ke {addr}")
data = conn.recv(1024)
print(f"diterima .. {data = }")
print(f"diterima .. {data}")

with open(filename, "rb") as in_file:
data = in_file.read(1024)
Expand Down
2 changes: 1 addition & 1 deletion math/two_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def two_sum(nums: list[int], target: int) -> list[int]:
import doctest

doctest.testmod()
print(f"{two_sum([2, 7, 11, 15], 9) = }")
print(f"{two_sum([2, 7, 11, 15], 9)}")
2 changes: 1 addition & 1 deletion object_oriented/advance/pycode/magic_methods/Mmethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, yourname: str, email: str) -> None:

def __repr__(self) -> str:
"""Fungsi representasi nilai parameter dan/atau argumen"""
return f"Nama: { self.name }\nEmail: { self.email }"
return f"Nama: {self.name}\nEmail: {self.email}"

def __del__(self) -> str:
"""Fungsi informasi jika ada nilai parameter dan/atau argumen yang terhapus"""
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies = [
"opencv-python",
"pandas",
"pillow",
"pre-commit>=4.1.0",
"projectq",
"qiskit",
"requests",
Expand Down
14 changes: 13 additions & 1 deletion scripts/build_directory_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@


def good_file_paths(top_dir: str = ".") -> Iterator[str]:
"""
Fungsi menghasilkan path file yang memenuhi kriteria tertentu
dari direktori yang diberikan.

Parameter:
- top_dir (str): direktori root tempat pencarian dimulai.
Default adalah direktori saat ini (".").

Return:
- (Iterator[str]): path file (relatif terhadap `top_dir`)

"""
for dir_path, dir_names, filenames in os.walk(top_dir):
dir_names[:] = [d for d in dir_names if d != "scripts" and d[0] not in "._"]
for filename in filenames:
Expand All @@ -16,7 +28,7 @@ def good_file_paths(top_dir: str = ".") -> Iterator[str]:
yield os.path.join(dir_path, filename).lstrip("./")


def md_prefix(i):
def md_prefix(i: int) -> str:
return f"{i * ' '}*" if i else "\n##"


Expand Down
113 changes: 113 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web_programming/emisi_co2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def emisi(start, end) -> list:
if __name__ == "__main__":
for entry in emisi(start=date(2020, 10, 1), end=date(2020, 10, 3)):
print("dari {from} ke {to}: {intensity[actual]}".format(**entry))
print(f"{emisi_stngh_jam() = }")
print(f"{emisi_stngh_jam()}")
Loading