Download scripts/check_extract.py from m-rui001/stem-md-corpus: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/datasets/m-rui001/stem-md-corpus/resolve/main/scripts/check_extract.py
- Command line
-
hf download hf://datasets/m-rui001/stem-md-corpus/scripts/check_extract.py
-
curl -L -o check_extract.py https://huggingface.co/datasets/m-rui001/stem-md-corpus/resolve/main/scripts/check_extract.py
461 Bytes
| #!/usr/bin/env python3 | |
| """check_extract.py -- 若有 extract.py 的 python 进程在跑则输出 True,否则 False。""" | |
| import subprocess | |
| out = subprocess.run( | |
| ["powershell", "-NoProfile", "-Command", | |
| "(Get-CimInstance Win32_Process -Filter \"Name='python.exe'\" | " | |
| "Where-Object { $_.CommandLine -match 'extract.py' }) -ne $null"], | |
| capture_output=True, text=True, timeout=60) | |
| print("True" if "True" in out.stdout else "False") | |