Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A hybrid-ish nearest neighbour search implemented in rust using voxels and hashmaps (/dictionaries)
A hybrid-ish nearest neighbour search implemented in rust, tailored towards consistent performance, especially on difficult inputs for KDTrees
pip install ox_vox_nns
Checkout this repo and enter a virtual environment, then run
maturin develop --release
Basic usage, query a block of query points in sparse mode:
import numpy as np
from ox_vox_nns.ox_vox_nns import OxVoxNNS
NUM_POINTS = 100_000
TEST_POINTS = np.random.random((NUM_POINTS, 3))
indices, distances = ox_vox_nns.OxVoxNNS(
search_points=TEST_POINTS,
max_dist=0.05,
).find_neighbours(
query_points=TEST_POINTS,
num_neighbours=1000,
sparse=True,
)
More complex usage, using a single NNS object for multiple exact mode queries (e.g. to distribute the nns
object and perform queries in parallel, or to query from a large number of query points in batches/chunks)
# same imports and test data as above
nns = ox_vox_nns.OxVoxNNS(TEST_POINTS, 0.1)
for query_points_chunk in query_points_chunks:
chunk_indices, chunk_distances = nns.find_neighbours(
query_points=query_points_chunk,
num_neighbours=1,
sparse=False,
)
As a rough heuristic:
epsilon > 0.0
will dramatically outperform KDTrees too. This is not really a fair comparison, but if you don't strictly need the exact k
nearest neighbours it can be very helpfulSee performance_test_ox_vox_nns.py
for test code.
More thorough tests and interactive visualisations are still being developed to help a prospective user decide quickly if OxVox is worth trying
FAQs
A hybrid-ish nearest neighbour search implemented in rust using voxels and hashmaps (/dictionaries)
We found that ox-vox-nns demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.