(src, dst, n)
| 128 | idx_file = os.path.join(idx_files_dir.name, recordio_idx) |
| 129 | |
| 130 | def leave_only_N(src, dst, n): |
| 131 | with open(src, "r") as tmp_f: |
| 132 | with open(dst, "w") as f: |
| 133 | for i, x in enumerate(tmp_f): |
| 134 | if i == n: |
| 135 | break |
| 136 | f.write(x) |
| 137 | |
| 138 | leave_only_N(tfrecord_idx, idx_file, num_samples) |
| 139 |
no outgoing calls
no test coverage detected