+7
-5
src/main/python/create_measurements.py
+7
-5
src/main/python/create_measurements.py
···batch_size = 10000 # instead of writing line by line to file, process a batch of stations and put it to diskprepped_deviated_batch = '\n'.join([f"{station};{random.uniform(coldest_temp, hottest_temp):.1f}" for station in batch]) # :.1f should quicker than round on a large scale, because round utilizes mathematical operation-sys.stdout.write("[%-50s] %d%%" % ('=' * int((s + 1) / num_rows_to_create * 50), (s + 1) / num_rows_to_create * 100))