What does it look like if you switch lat lon for Germany?
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 . |
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 | |
| # requires-python = ">=3.14" | |
| # dependencies = [ | |
| # "pandas", | |
| # "requests", | |
| # "openpyxl" | |
| # ] | |
| # /// |
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
| gh repo create new_project_name --public --source=. --remote=origin --push |
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
| <!doctype html> | |
| <html lang="en" class="bg-slate-50"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Guest List Manager</title> | |
| <!-- 1. Tailwind CSS via CDN --> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <!-- 2. Supabase Client via CDN --> | |
| <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script> |
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
| import duckdb | |
| con = duckdb.connect() | |
| con.execute("INSTALL spatial; LOAD spatial;") | |
| input_path = '30M_sample_index.parquet' | |
| output_path = '30M_sample_index_with_lat_lon.parquet' | |
| # Use ST_X and ST_Y directly on the 'geometry' column | |
| con.execute(f""" |
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
| #!/usr/bin/env bash | |
| # | |
| # duckdb_boundary.sh — run DuckDB spatial queries by region | |
| # | |
| # Usage: | |
| # ./duckdb_boundary.sh --query "Sicilia" [--format PARQUET|CSV|JSON] | |
| # | |
| # Description: | |
| # - Ensures DuckDB 'spatial' extension is installed and loaded | |
| # - Reads OpenStreetMap boundary data (remote parquet) |
NewerOlder