2gb Sample File
with open(file_name, "w", encoding="utf-8") as f: current_size = 0 while current_size < target_size: f.write(sample_text) current_size += len(sample_text.encode('utf-8')) # Optional: Print progress every 100MB if current_size % (100 * 1024 * 1024) == 0: print(f"Current size: current_size / (1024**2):.0f MB")
But beyond its technical utility, the 2GB sample file is a powerful . 2gb sample file