shard-computer
Perform accelerated shard hash computation for Neuroglancer Precomputed shards.
import shardcomputer
preshift_bits = 0
shard_bits = 11
minishard_bits = 8
label = 12949142
shard_no = shardcomputer.shard_number(label, preshift_bits, shard_bits, minishard_bits)
shard_no_set = shardcomputer.unique_shard_numbers(
labels, preshift_bits, shard_bits, minishard_bits
)
shard_no_to_labels = shardcomputer.assign_labels_to_shards(
label, preshift_bits, shard_bits, minishard_bits
)
Install
pip install shard-computer
Credits
Thank you to Austin Appleby for placing MurMurhash3 into the public domain.