Download scripts/_fix_eqrefs2.py from m-rui001/physics-typst-corpus: direct link, hf CLI and curl.
- Browser
- Download file 278 Bytes
-
https://huggingface.co/datasets/m-rui001/physics-typst-corpus/resolve/main/scripts/_fix_eqrefs2.py
- Command line
-
hf download hf://datasets/m-rui001/physics-typst-corpus/scripts/_fix_eqrefs2.py
-
curl -L -o _fix_eqrefs2.py https://huggingface.co/datasets/m-rui001/physics-typst-corpus/resolve/main/scripts/_fix_eqrefs2.py
278 Bytes
| p = 'papers/2308.08546/main.typ' | |
| s = open(p, encoding='utf-8').read() | |
| old = '$ where $T$ denotes the temperature' | |
| assert s.count(old) == 1 | |
| s = s.replace(old, '$<eq:OmegaGWtoday> where $T$ denotes the temperature') | |
| open(p, 'w', encoding='utf-8').write(s) | |
| print('label attached') | |