feat: export regions

This commit is contained in:
mokurin000
2025-08-04 02:01:39 +08:00
parent a3ba321e5e
commit 9d3ca2fe76
3 changed files with 11 additions and 1 deletions

2
.gitignore vendored
View File

@@ -12,3 +12,5 @@
/uv.lock /uv.lock
/.venv /.venv
*.pyc

View File

@@ -6,4 +6,5 @@ readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
dependencies = [ dependencies = [
"orjson>=3.11.1", "orjson>=3.11.1",
"polars>=1.32.0",
] ]

7
utils/export_regions.py Normal file
View File

@@ -0,0 +1,7 @@
import polars as pl
from hasher import salted_hash_userid
pl.scan_parquet("regions.parquet").with_columns(
pl.col("user_id").map_elements(salted_hash_userid, return_dtype=pl.String)
).collect().write_parquet("regions_pub.parquet")