From 04932a8d939197674a0075f7d6d42ba65e741a5a Mon Sep 17 00:00:00 2001 From: OkunElya Date: Thu, 23 Oct 2025 12:49:30 +1000 Subject: [PATCH] temp save --- lab1/gen_data.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lab1/gen_data.py diff --git a/lab1/gen_data.py b/lab1/gen_data.py new file mode 100644 index 0000000..7174447 --- /dev/null +++ b/lab1/gen_data.py @@ -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) + + + + +