Skip to content

Instantly share code, notes, and snippets.

View denisakp's full-sized avatar
🎯
Focusing

Denis AKPAGNONITE denisakp

🎯
Focusing
View GitHub Profile
@denisakp
denisakp / tree.py
Created July 14, 2024 14:00
This code prints a tree-like representation of a directory structure, excluding specific folders and maintaining indentation for clarity.
import os
from pathlib import Path
from typing import List, Set
def tree(dir_path: Path, indent: str = '', exclude: Set[str] = None):
if exclude is None:
exclude = set()
# Get the list of all files and directories in the given directory, sorted naturally
items = sorted([item for item in dir_path.iterdir() if item.name not in exclude], key=lambda s: s.name.lower())
@denisakp
denisakp / kubernetes-certifications.md
Created October 26, 2023 19:29 — forked from bakavets/kubernetes-certifications.md
How I passed Kubernetes KCNA, CKAD, CKA, and CKS exams. My experience. Exam tips and tricks.