This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # view 10 lines | |
| uvx duckdb -c "FROM 'results.parquet' LIMIT 10" | |
| # add 2 new columns | |
| uvx duckdb -c "COPY (SELECT *, NULL::INT AS dominik_label, NULL::VARCHAR AS dominik_comments FROM 'results.parquet') TO 'results.parquet'" | |
| # remove 2 columns | |
| uvx duckdb -c "COPY (SELECT * EXCLUDE (dominik_label, dominik_comments) FROM 'results.parquet') TO 'results.parquet'" | |
| # sort by 2 columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # dependencies = [ | |
| # "requests", | |
| # "pandas", | |
| # "pyarrow", | |
| # "tqdm", | |
| # ] | |
| # /// | |
| import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from huggingface_hub import HfApi, CommitOperationDelete | |
| # Configure your repo details | |
| repo_id = "user/reponame" | |
| token = "your token" | |
| api = HfApi(token=token) | |
| # 1. List files specifically in the target folder | |
| target_folder = "files/2026" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| read s c < <(find images -type f -printf '%s\n' 2>/dev/null | awk '{t+=$1} END{print t, NR}'); printf "Total size: %s\nFiles: %d\nAverage: %s\n" "$(numfmt --to=iec --suffix=B $s)" "$c" "$(numfmt --to=iec --suffix=B $((c? s/c : 0)))" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tmux kill-server | |
| tmux new -s mysession | |
| exit | |
| tmux kill-session -t mysession |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # dependencies = [ | |
| # "duckdb", | |
| # "flask" | |
| # ] | |
| # /// | |
| import duckdb | |
| import flask | |
| import gzip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from huggingface_hub import HfApi, CommitOperationDelete, RepoFile | |
| # Configure your repo details | |
| repo_id = "user/repo" | |
| token = "your token" # Ensure your token has 'write' permissions | |
| api = HfApi(token=token) | |
| # 1. List files in the repo (non-recursive) | |
| files = api.list_repo_tree(repo_id, repo_type="dataset") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSTALL spatial; | |
| LOAD spatial; | |
| -- query for Milan, Italy | |
| SELECT * | |
| FROM 'https://data.source.coop/tge-labs/aef/v1/annual/aef_index.parquet' | |
| WHERE wgs84_west <= 9.25 | |
| AND wgs84_east >= 9.10 | |
| AND wgs84_south <= 45.55 | |
| AND wgs84_north >= 45.40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| * | |
| FROM 'hf://datasets/do-me/EUR-LEX/**/*.parquet' | |
| WHERE | |
| -- 1. Date filter (highly efficient for narrowing down files/rows) | |
| CAST(date AS DATE) >= '2026-01-21' | |
| -- 2. Your specific keywords (case-insensitive) | |
| --AND regexp_matches(text, '(?i)copernicus|earth observation') | |
| ORDER BY date DESC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rm -rf ~/.cache/huggingface/.gitignore.lock; | |
| HF_HUB_READ_TIMEOUT=300 HF_HUB_HTTP_TIMEOUT=300 uvx hf download \ | |
| EuropeanParliament/Eurovoc_2025 \ | |
| --repo-type dataset \ | |
| --exclude "files/*" \ | |
| --local-dir . |
NewerOlder