Skip to main content

Utility functions for deterministic geographic data sampling

Project description

geocache-utils

Utility functions for deterministic geographic data sampling across Python versions.

Installation

pip install geocache-utils

Usage

from geocache_utils import configure_deterministic_sampling

# Call once at startup to ensure cross-version reproducibility
configure_deterministic_sampling()

Why?

Python 3.9 changed the internal algorithm used by random.sample() for large populations (see bpo-33622). This means that code using seeded randomness can produce different results on Python 3.8 vs 3.11+, even with the same seed.

geocache-utils provides a thin compatibility shim that normalises sampling behaviour for geographic datasets so results stay reproducible regardless of the interpreter version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geocache_utils-0.2.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geocache_utils-0.2.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file geocache_utils-0.2.1.tar.gz.

File metadata

  • Download URL: geocache_utils-0.2.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for geocache_utils-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e5c8cd5298ec9ed50ff60e1ad8ebafd9873e6e2a3617b094a0ad21383dddda51
MD5 90259b2205805573d5324c8e6673966b
BLAKE2b-256 d6cd0962f2c77a7608f87466a89edc5f0a2cb8c54138ea276ab9a713500759e7

See more details on using hashes here.

File details

Details for the file geocache_utils-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: geocache_utils-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for geocache_utils-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fe6de70da0100b039b1e48f5aadf6bbb3789c5223cd16910735c7e0752298be
MD5 d5b0f3820127504a977b51f5073bf835
BLAKE2b-256 6c11f6efc1d4c8c618de1676153710c0833b558bbaf9d5a3c3b6db71c83720e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page