Download scripts/_fix_gev.py from m-rui001/physics-typst-corpus: direct link, hf CLI and curl.
- Browser
- Download file 302 Bytes
-
https://huggingface.co/datasets/m-rui001/physics-typst-corpus/resolve/main/scripts/_fix_gev.py
- Command line
-
hf download hf://datasets/m-rui001/physics-typst-corpus/scripts/_fix_gev.py
-
curl -L -o _fix_gev.py https://huggingface.co/datasets/m-rui001/physics-typst-corpus/resolve/main/scripts/_fix_gev.py
302 Bytes
| p = 'papers/2308.08546/main.typ' | |
| s = open(p, encoding='utf-8').read() | |
| n = s.count('0.67 GeV') | |
| s = s.replace('0.67 GeV', '0.67 upright("GeV")') | |
| s = s.replace('0.34 GeV', '0.34 upright("GeV")') | |
| s = s.replace('0.85 GeV', '0.85 upright("GeV")') | |
| open(p, 'w', encoding='utf-8').write(s) | |
| print('replaced', n) | |