temp save

This commit is contained in:
2025-10-23 12:49:30 +10:00
commit 04932a8d93

24
lab1/gen_data.py Normal file
View File

@@ -0,0 +1,24 @@
import numpy as np # numpy's random is usualy much faster
import random
OUT_FOLDER= "./data"
LINE_COUNT=500001
CHUNK_SIZE=5000
category_list=list("ABCD")
for file_num in range(5):
with open(OUT_FOLDER+f"/rand_{file_num}.csv","w"):
i=0
while i < LINE_COUNT:
i+=min(CHUNK_SIZE, LINE_COUNT-i)
numbers=np.random.random_integers(0,4)