Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
For the documentation of PyParadiseo see this.
This README only gives a very short introduction.
The easiest way to get pyparadiseo is to install it via pip
. Currently the following Python versions are supported: 3.6, 3.7, 3.8, 3.9, 3.10
pip
You can install pyParadiseo with pip
pip install pyparadiseo
To build pyParadiseo, you'll need to have a few prerequisites installed on your system and set the corresponding paths in setup.py
and CMakeLists.txt
To compile the binary extension you need:
If you want to build pyparadiseo from source, the easiest should be to use this manylinux2014_x86_64
Docker image with installed prerequisites.
The documentation of PyParadiseo is available here
Example of running EO's simple GA (SGA) for the One-Max test problem
from pyparadiseo import config
# problem dependent
from pyparadiseo import population
from pyparadiseo import initializer
from pyparadiseo import evaluator
from pyparadiseo import operator
from pyparadiseo.eo import algo,select_one,continuator
DIM=20
POP_SIZE=25
MAX_GEN=100
if __name__ == "__main__":
#set global solution type 'bin'
config.set_solution_type('bin')
#make pyparadiseo evaluator from python function
eval = evaluator.fitness(lambda sol: sum(sol))
#generate and evaluate population
pop=population.from_init(POP_SIZE,initializer.random(DIM))
evaluator.pop_eval_from_fitness(eval)(pop,pop)
#assemble simple GA
sga = algo.simpleGA(
select_one.det_tournament(4),
operator.OnePtBitCrossover(),.1,
operator.DetBitFlip(),.7,
eval,
continuator.max_generations(MAX_GEN)
)
# #run algo on pop and print best individual
sga(pop)
print(pop.best())
FAQs
Python version of the ParadisEO framework for metaheuristic optimization
We found that pyparadiseo 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.