-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfolder.py
More file actions
54 lines (46 loc) · 1.62 KB
/
folder.py
File metadata and controls
54 lines (46 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import os
# Define the sections and their corresponding shortened titles for folder names
sections = [
"Sec1_Intro",
"Sec2_Core_Python_CV",
"Sec3_OOP_in_CV",
"Sec4_Working_with_Images",
"Sec5_File_Folder_Management",
"Sec6_Image_Manipulation",
"Sec7_CV_Algorithms",
"Sec8_Feature_Detection",
"Sec9_Data_Augmentation",
"Sec10_Advanced_Segmentation",
"Sec11_Motion_Analysis",
"Sec12_Mask_Generation",
"Sec13_Metadata_Annotation",
"Sec14_Dataset_Analysis",
"Sec15_Performance_Optimization",
"Sec16_CV_and_Deep_Learning",
"Sec17_Optimizing_PaDiM",
"Sec18_Model_Validation",
"Sec19_Final_Project",
"Sec20_Bonus_Tips",
]
# Create folders and README.md files for each section
base_path = "./"
# Create base directory if it doesn't exist
os.makedirs(base_path, exist_ok=True)
# Loop through each section and create folders and README.md files
for section in sections:
# Create section folder
section_folder = os.path.join(base_path, section)
os.makedirs(section_folder, exist_ok=True)
# Prepare the content for the README.md file
section_title = section.replace("_", " ").title()
readme_content = (
f"# {section_title}\n\n"
f"This is the README file for the {section_title}.\n\n"
"### Overview:\n"
"Provide an overview of the section content here.\n"
)
# Write the README.md file inside the section folder
readme_path = os.path.join(section_folder, "README.md")
with open(readme_path, "w") as readme_file:
readme_file.write(readme_content)
print("Folders and README.md files created successfully.")