Download scripts/tsutil.py from kazeevn/LeMat-Bulk-fixed: direct link, hf CLI and curl.
- Browser
- Download file 199 Bytes
-
https://huggingface.co/datasets/kazeevn/LeMat-Bulk-fixed/resolve/main/scripts/tsutil.py
- Command line
-
hf download hf://datasets/kazeevn/LeMat-Bulk-fixed/scripts/tsutil.py
-
curl -L -o tsutil.py https://huggingface.co/datasets/kazeevn/LeMat-Bulk-fixed/resolve/main/scripts/tsutil.py
199 Bytes
| import re, pandas as pd | |
| def lemat_time(s): | |
| m=re.search(r"\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(\.\d+)?", str(s)) | |
| return pd.Timestamp(m.group(0)).strftime("%Y-%m-%d %H:%M:%S") if m else None | |