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.
Construct isolines/isosurfaces over a 2D/3D scalar field defined by a function (not a uniform grid)
Construct isolines/isosurfaces of a 2D/3D scalar field defined by a function, i.e. curves over which f(x,y)=0
or surfaces over which f(x,y,z)=0
. Most similar libraries use marching squares or similar over a uniform grid, but this uses a quadtree to avoid wasting time sampling many far from the implicit surface.
This library is based on the approach described in Manson, Josiah, and Scott Schaefer. "Isosurfaces over simplicial partitions of multiresolution grids." Computer Graphics Forum. Vol. 29. No. 2. Oxford, UK: Blackwell Publishing Ltd, 2010.
An example graph, including quad lines, of y(x-y)^2 = 4x+8
(Python expression: y*(x-y)**2 - 4*x - 8
)
pip3 install isosurfaces
from isosurfaces import plot_isoline
import numpy as np
def f(x, y):
return y * (x - y) ** 2 - 4 * x - 8
curves = plot_isoline(
lambda u: f(u[0], u[1]),
np.array([-8, -6]),
np.array([8, 6]),
# Increasing min_depth can help if you have small features
min_depth=3,
# Ensure max_quads is more than 4**min_depth to capture details better
# than a 2**min_depth by 2**min_depth uniform grid
max_quads=1000,
)
for curve in curves:
print(', '.join(f"({p[0]:.3f},{p[1]:.3f})" for p in curve))
python3 isoline_demo.py && xdg-open out/demo.svg
manim -pql isosurface_demo.py --renderer=opengl --enable_gui
Pyflakes, allowing manim star imports
python3 -m pyflakes . | grep -v "star imports: manim"
Build source archive and wheel:
rm -rf dist build isosurfaces.egg-info
python3 setup.py sdist bdist_wheel
twine check dist/*
# for test:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# for actual
twine upload dist/*
isosurfaces
uses black
and isort
. A Github Action will run to make sure it was applied.
Related projects:
Other terms for an isoline:
FAQs
Construct isolines/isosurfaces over a 2D/3D scalar field defined by a function (not a uniform grid)
We found that isosurfaces 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.