Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A helper package to easily time Numba CUDA GPU events.
As this package uses Numba, refer to the Numba compatibility guide.
Using Pip: pip3 install numba_timer
.
import math
import numpy as np
from numba import cuda
from numba_timer import cuda_timer
@cuda.jit
def increment_a_2D_array(an_array):
x, y = cuda.grid(2)
if x < an_array.shape[0] and y < an_array.shape[1]:
an_array[x, y] += 1
an_array = np.zeros((2, 100))
threadsperblock = (16, 16)
blockspergrid_x = math.ceil(an_array.shape[0] / threadsperblock[0])
blockspergrid_y = math.ceil(an_array.shape[1] / threadsperblock[1])
blockspergrid = (blockspergrid_x, blockspergrid_y)
timer = cuda_timer.Timer()
timer.start()
increment_a_2D_array[blockspergrid, threadsperblock](an_array)
timer.stop()
print(f'Elapsed time for run 1: {timer.elapsed()} ms')
timer.start()
increment_a_2D_array[blockspergrid, threadsperblock](an_array)
timer.stop()
print(f'Elapsed time for run 2: {timer.elapsed()} ms')
Numba specific code is borrowed from the Numba documentation.
FAQs
A helper package to easily time Numba CUDA GPU events
We found that numba-timer 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.