Tablinum-3: apps, web, scicode, homerepair tables; code, recipes, packs, routes, sources, license, art
9728219 verified Download code/sedev_filter.py from tablinum/tablinum-3: direct link, hf CLI and curl.
- Browser
- Download file 1.75 kB
-
https://huggingface.co/datasets/tablinum/tablinum-3/resolve/main/code/sedev_filter.py
- Command line
-
hf download hf://datasets/tablinum/tablinum-3/code/sedev_filter.py
-
curl -L -o sedev_filter.py https://huggingface.co/datasets/tablinum/tablinum-3/resolve/main/code/sedev_filter.py
1.75 kB
| """sedev_filter.py IN.jsonl.gz OUT.jsonl.gz (11-02, tablinum-3 agent domain) - keep Stack Overflow threads whose QUESTION TITLE is about | |
| agent tooling: shell / terminal / Linux & macOS & Windows command line, git, containers, CI, packaging & build, web automation & | |
| scraping, regex & text tools, ssh / networking / services, editors, env & encoding. Chosen by domain (title keywords), never by | |
| benchmark items. common-pile/stackexchange rows (CC BY-SA 4.0) pass through unchanged for hf_dolma.py se.""" | |
| import gzip, json, re, sys | |
| K = re.compile(r"\b(bash|shell|zsh|fish shell|sh script|terminal|command[- ]line|linux|ubuntu|debian|centos|fedora|arch linux|wsl|macos|" | |
| r"homebrew|git|github|gitlab|docker\w*|podman|compose|kubernetes|kubectl|helm|github actions|gitlab ci|jenkins|ci pipeline|" | |
| r"yaml|jq|curl|wget|regex|regular expression|ssh|scp|rsync|cron\w*|systemd|systemctl|nginx|chmod|chown|sudo|pip|npm|npx|" | |
| r"yarn|pnpm|conda|venv|virtualenv|pyenv|poetry|makefile|cmake|selenium|playwright|puppeteer|xpath|css selector|" | |
| r"web ?scrap\w*|beautifulsoup|webdriver|headless|powershell|cmd\.exe|batch file|environment variables?|\$path|utf-?8|" | |
| r"awk|sed|grep|xargs|find command|stdin|stdout|subprocess|tmux|vim|emacs|vs ?code|devcontainer|dotenv|ffmpeg|" | |
| r"imagemagick|pandoc|openssl|certbot|ufw|iptables|dns|port forwarding|symlink|tar|zip|unzip|apt(-get)?|yum|dnf|pacman|snap|flatpak)\b", re.I) | |
| n = k = 0; out = gzip.open(sys.argv[2], "wt") | |
| for l in gzip.open(sys.argv[1], "rt"): | |
| n += 1 | |
| if K.search(json.loads(l)["text"].split("\n", 1)[0]): out.write(l); k += 1 | |
| out.close(); print(f"sedev_filter {sys.argv[1]}: kept {k}/{n}", file=sys.stderr) | |