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.
Dis.co multi-processing python package
The discomp is a package that distributes computing jobs using the Dis.co service. It introduces an API similar to the multiprocessing python package.
For more information about Dis.co itself, please check out the Dis.co homepage
Instantiating the Process class creates a new job with a single task in a 'waiting state' and submits it to Dis.co computing service
The job's name. The name is a string used for identification purposes only. It does not have to be unique.
The target is the callable object to be invoked by the running job.
The args is the argument tuple for the target invocation. By default, no arguments are passed to target.
Start running the job on one of the machines .
This must be called at most once per process object.
Join blocks the calling thread until the job is done. Upon successful completion of the job, results files are downloaded to a new directory, given the job's name within the working directory.
Currently, timeout must always be 'None'.
A process should be joined at most once. A job may be already done by the time join was called. However, the results are downloaded only upon calling join.
Instantiating the Pool class creates an object to be later used to run a job with one or more tasks executed in many machines, by invoking it's map() method. The Pool class does not take any arguments and has a no control on the number of machines used to run the job tasks. The number of machines are determined separately.
Sign-Up in Dis.co dashboard:
Install discomp package:
pip install discomp
or
pip3 install discomp
A trivial example using the Process class:
import os
from discomp import Process
os.environ['DISCO_LOGIN_USER'] = 'username@mail.com'
os.environ['DISCO_LOGIN_PASSWORD'] = 'password'
def func(name):
print ('Hello', name)
p = Process(
name='MyFirstJobExample',
target=func,
args=('Bob',))
p.start()
p.join()
Output:
A basic example using the Pool class:
import os
from discomp import Pool
os.environ['DISCO_LOGIN_USER'] = 'username@mail.com'
os.environ['DISCO_LOGIN_PASSWORD'] = 'password'
def pow3(x):
print (x**3)
return (x**3)
p = Pool()
results = p.map(pow3, range(10))
print(results)
Output:
You can add additional configuration for your jobs by using the disco CLI. The CLI is automatically installed when you install discomp. You can configure the cluster, the machine size and the docker image by using
disco config
from the command line
Please feel free to contact us in Dis.co for further information
FAQs
Run Python jobs in parallel on the cloud using DISCO
We found that discomp 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.