CoolFace
Apppublic

WilsonPharma/Practitioners-Workload-DB

sourceHugging Faceupdated 4mo agoView on Hugging Face
1likes
slice_db.py21 linesDownload Raw Back to root
1# Save this as slice_db.py and run it on your computer
2import os
3
4chunk_size = 20 * 1024 * 1024  # 20 MB chunks
5input_file = "PractitionersWorkloadDB.db"
6
7with open(input_file, "rb") as f:
8    chunk_num = 1
9    while True:
10        data = f.read(chunk_size)
11        if not data:
12            break
13        
14        output_file = f"db_part_{chunk_num}"
15        with open(output_file, "wb") as out:
16            out.write(data)
17            print(f"Created {output_file}...")
18        
19        chunk_num += 1
20
21print("Done! You can now upload these db_part_ files to GitHub.")