
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
penaltymodel
Advanced tools
:warning: penaltymodel is deprecated. For solving problems with constraints, we recommend using the hybrid solvers in the Leap :tm: service. You can find documentation for the hybrid solvers at https://docs.dwavequantum.com.
.. image:: https://img.shields.io/pypi/v/penaltymodel.svg :target: https://pypi.python.org/pypi/penaltymodel
.. image:: https://img.shields.io/pypi/pyversions/penaltymodel.svg :target: https://pypi.python.org/pypi/penaltymodel
.. image:: https://codecov.io/gh/dwavesystems/penaltymodel/branch/master/graph/badge.svg :target: https://codecov.io/gh/dwavesystems/penaltymodel
.. image:: https://circleci.com/gh/dwavesystems/penaltymodel.svg?style=svg :target: https://circleci.com/gh/dwavesystems/penaltymodel
.. start_penaltymodel_about
One approach to solve a constraint satisfaction problem
(CSP <https://en.wikipedia.org/wiki/Constraint_satisfaction_problem>) using
an Ising model <https://en.wikipedia.org/wiki/Ising_model> or a
QUBO <https://en.wikipedia.org/wiki/Quadratic_unconstrained_binary_optimization>_,
is to map each individual constraint in the CSP to a 'small' Ising model or
QUBO. This mapping is called a penalty model.
.. end_penaltymodel_about
For more information, see
penalty models <https://docs.dwavequantum.com/en/latest/concepts/penalty.html>_.
To install the core package:
.. code-block:: bash
pip install penaltymodel
Released under the Apache License 2.0
Ocean's
contributing guide <https://docs.dwavequantum.com/en/latest/ocean/contribute.html>_
has guidelines for contributing to Ocean packages.
penaltymodel makes use of reno <https://docs.openstack.org/reno/>_ to manage
its release notes.
When making a contribution to penaltymodel that will affect users, create a new release note file by running
.. code-block:: bash
reno new your-short-descriptor-here
You can then edit the file created under releasenotes/notes/.
Remove any sections not relevant to your changes.
Commit the file along with your changes.
See reno's user guide <https://docs.openstack.org/reno/latest/user/usage.html>_
for details.
FAQs
Package for creating penalty models.
We found that penaltymodel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.