Download get_configs.py from RealTimeData/wikitext_alltime_backup: direct link, hf CLI and curl.
- Browser
- Download file 308 Bytes
-
https://huggingface.co/datasets/RealTimeData/wikitext_alltime_backup/resolve/main/get_configs.py
- Command line
-
hf download hf://datasets/RealTimeData/wikitext_alltime_backup/get_configs.py
-
curl -L -o get_configs.py https://huggingface.co/datasets/RealTimeData/wikitext_alltime_backup/resolve/main/get_configs.py
308 Bytes
| import glob | |
| import os | |
| all_articles = glob.glob('./wiki/*.json') | |
| file_names = [os.path.splitext(os.path.basename(path))[0] for path in all_articles] | |
| _TIMES = sorted(file_names) | |
| # Write the string to a Python file | |
| with open('configs.txt', 'w') as file: | |
| for time in _TIMES: | |
| file.write(time + '\n') |