
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
GridPath is a Python library for calculating grid-based paths and intersection points between two coordinates. It's particularly useful for applications requiring precise path tracking on a grid system, such as robotics, game development, or computer graphics.
GridPath is a Python library for calculating grid-based paths and intersection points between two coordinates. It's particularly useful for applications requiring precise path tracking on a grid system, such as robotics, game development, or computer graphics.
pip install gridpath2
Basic usage example:
from gridpath2 import grid
# Calculate path between two points
result = grid(x1=1.5, y1=2.3, x2=4.7, y2=6.8)
# Access the results
grid_points = result["grid"] # List of grid points traversed
intersections = result["intersect"] # List of exact intersection points
The function returns a dictionary containing:
grid
: List of grid points the path traverses throughintersect
: List of exact coordinates where the path intersects with grid linespath = grid(1.5, 2.0, 4.5, 2.0)
# Returns path along y=2
path = grid(2.0, 1.5, 2.0, 4.5)
# Returns path along x=2
path = grid(1.0, 1.0, 3.0, 3.0)
# Returns diagonal path with slope=1
path = grid(1.5, 2.3, 4.7, 6.8)
# Returns optimal grid path with precise intersections
def grid(x1: float, y1: float, x2: float, y2: float) -> dict:
"""Calculate grid path and intersection points between two coordinates.
Args:
x1, y1: Starting point coordinates
x2, y2: Ending point coordinates
Returns:
dict: Dictionary containing:
- "grid": List of grid points [[x1, y1], [x2, y2], ...]
- "intersect": List of intersection points [[x1, y1], [x2, y2], ...]
"""
The library handles several special cases:
For general cases, the algorithm:
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
GridPath is a Python library for calculating grid-based paths and intersection points between two coordinates. It's particularly useful for applications requiring precise path tracking on a grid system, such as robotics, game development, or computer graphics.
We found that gridpath2 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.