Download workloads/realworld/async/BN/file_process.py from lrh12580/UvmPinAsync: direct link, hf CLI and curl.
- Browser
- Download file 321 Bytes
-
https://huggingface.co/lrh12580/UvmPinAsync/resolve/main/workloads/realworld/async/BN/file_process.py
- Command line
-
hf download hf://lrh12580/UvmPinAsync/workloads/realworld/async/BN/file_process.py
-
curl -L -o file_process.py https://huggingface.co/lrh12580/UvmPinAsync/resolve/main/workloads/realworld/async/BN/file_process.py
321 Bytes
| import os | |
| filename = "data125.cu" | |
| file_write = "data45.cu" | |
| f_w = open(file_write,"w") | |
| with open(filename) as f: | |
| content = f.readlines() | |
| for i, line in enumerate(content): | |
| if i < 8: | |
| f_w.write(line) | |
| elif i >= 8: | |
| f_w.write(line[0:90]) | |
| f_w.write("\n") | |
| f_w.close() |