semvec/pypi-packages huggingface dataset:
heavyops 0.3.0
Profile specific bytecode operations in a target script
Requires Python: >=3.12
Keywords: profiling, bytecode, python

# heavyops

`heavyops` identifies performance bottlenecks related to specific bytecode instructions.

Use it to find redundant object allocations, unexpected side effects of closures, and other inefficiencies in your Python code.

The project is based on `sys.monitoring`.

## Installation

```bash
$ pip install heavyops
```

## Example use case: side effects of closures

When a variable is captured by a closure, Python creates a cell object to hold the variable. This can lead to performance overhead. By tracking `LOAD_DEREF` instructions, you can identify functions that use closures and refactor them if necessary. For example:

```python
class Foo:
    def __init__(self, lo, hi):
        self.lo = lo
        self.hi = hi

    def intersects(self, other):
        if isinstance(other, Foo):
            return self.lo < other.hi and other.lo < self.hi
        elif isinstance(other, list):
            # the following captures 'self' in a closure for the generator expression
            return any(self.intersects(item) for item in other)
        else:
            return False


for i in range(1000):
    Foo(1, 4).intersects(Foo(2, 5))
```

Even though the generator expression is not in a hot path, it captures `self`, leading to the creation of a cell object for `self` and the use of `LOAD_DEREF` instructions in the hot path:

```console
$ python3 -m heavyops example.py 
3,814 / 94,467 tracked instructions

COUNT    | INSTRUCTION
--------------------------------------------------
   2,662 | LOAD_DEREF
     512 | MAKE_FUNCTION
     ...

COUNT    | LOCATION
--------------------------------------------------
   1,000 | example.py:8 intersects LOAD_DEREF
   1,000 | example.py:8 intersects LOAD_DEREF
     ...
```

This can be fixed by avoiding the generator expression, for example by using a for loop:

```python
class Foo:
    def __init__(self, lo, hi):
        self.lo = lo
        self.hi = hi

    def intersects(self, other):
        if isinstance(other, Foo):
            return self.lo < other.hi and other.lo < self.hi
        elif isinstance(other, list):
            for item in other:
                if self.intersects(item):
                    return True
            return False
```

## Usage

After installation an executable `heavyops` is available. Simply run it with the target script and its arguments:

```console
heavyops [options] target_script.py [script_args...]
```

or as a module:

```console
python3 -m heavyops [options] target_script.py [script_args...]
```

By default, it will report the following instructions:

* `MAKE_FUNCTION`
* `BUILD_TUPLE`
* `BUILD_LIST`
* `BUILD_SET`
* `BUILD_MAP`
* `LOAD_DEREF`

You can customize the instructions to track using on or more `-i` / `--instructions` flags.

```bash
heavyops -i MAKE_FUNCTION -i BUILD_LIST my_app arg1 arg2
```

You can restrict tracking to specific files using the `-f` / `--file` flag:

```bash
heavyops -f 'specific_file.py' my_app arg1 arg2
```
modepy 2026.1
Modes and nodes for high-order methods
Requires Python: >=3.10

modepy: Basis Functions, Node Sets, Quadratures
===============================================

.. image:: https://gitlab.tiker.net/inducer/modepy/badges/main/pipeline.svg
    :alt: Gitlab Build Status
    :target: https://gitlab.tiker.net/inducer/modepy/commits/main
.. image:: https://github.com/inducer/modepy/actions/workflows/ci.yml/badge.svg
    :alt: Github Build Status
    :target: https://github.com/inducer/modepy/actions/workflows/ci.yml
.. image:: https://badge.fury.io/py/modepy.svg
    :alt: Python Package Index Release Page
    :target: https://pypi.org/project/modepy/
.. image:: https://zenodo.org/badge/9846038.svg
    :alt: Zenodo DOI for latest release
    :target: https://zenodo.org/doi/10.5281/zenodo.11105051

``modepy`` helps you create well-behaved high-order discretizations on
simplices (i.e. segments, triangles and tetrahedra) and tensor products of
simplices (i.e. squares, cubes, prisms, etc.). These are a key building block
for high-order unstructured discretizations, as often used in a finite
element context. Features include:

- Support for simplex and tensor product elements in any dimension.
- Orthogonal bases:
    - Jacobi polynomials with derivatives
    - Orthogonal polynomials for simplices up to 3D and tensor product elements
      and their derivatives.
    - All bases permit symbolic evaluation, for code generation.
- Access to numerous quadrature rules:
    - Jacobi-Gauss, Jacobi-Gauss-Lobatto in 1D
      (includes Legendre, Chebyshev, ultraspherical, Gegenbauer)
    - Clenshaw-Curtis and Fejér in 1D
    - Grundmann-Möller on the simplex
    - Xiao-Gimbutas on the simplex
    - Vioreanu-Rokhlin on the simplex
    - Jaśkowiec-Sukumar on the tetrahedron
    - Witherden-Vincent on the hypercube
    - Generic tensor products built on the above, e.g. for prisms and hypercubes
- Tools to construct new quadrature rules:
    - A basic iterative Gauss-Newton process to optimize/tighten rules
    - Vioreanu-Rokhlin node initial generation based on multiplication operators
- Matrices for FEM, usable across all element types:
    - generalized Vandermonde,
    - mass matrices (including lumped diagonal),
    - face mass matrices,
    - differentiation matrices, and
    - resampling matrices.
- Objects to represent 'element shape' and 'function space',
  generic node/mode/quadrature retrieval based on them.

Its roots closely followed the approach taken in the book

    J. S. Hesthaven and T. Warburton (2007).
    *Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications*
    (1st ed.).
    `doi:10.1007/978-0-387-72067-8 <https://doi.org/10.1007/978-0-387-72067-8>`__.
    `(source code) <https://github.com/tcew/nodal-dg>`__

but much has been added beyond that basic functionality.

Resources:

* `Documentation <https://documen.tician.de/modepy>`__.
* `Source code <https://github.com/inducer/modepy>`__.
* `Bug tracker <https://github.com/inducer/modepy/issues>`__.
* `PyPI <https://pypi.org/project/modepy/>`__.
diffused-lib 0.3.0
A vulnerability scan diffing library for container images and SBOMs
Requires Python: <4.0,>=3.9
Keywords: container, scanning, security, vulnerability

# Diffused Library

The core Python library providing vulnerability scanning and diffing functionality for container images and SBOMs (Software Bill of Materials). This library enables programmatic access to vulnerability analysis capabilities.

## Features

- 🔍 **Vulnerability Scanning**: Automated scanning of SBOMs using [Trivy](https://trivy.dev/) or scanning of container images using [RHACS](https://www.redhat.com/pt-br/technologies/cloud-computing/openshift/advanced-cluster-security-kubernetes)
- 📊 **SBOM Diffing**: Direct comparison of SPDX-JSON formatted SBOMs (Trivy only)
- 📄 **Flexible Output**: Programmatic access to vulnerability data
- 🐍 **Python API**: Clean, intuitive Python interface

## Installation

### Prerequisites

1. **Install the scanner**:
    1. **Trivy**: Follow the [official Trivy installation guide](https://aquasecurity.github.io/trivy/latest/getting-started/installation/)
    2. **RHACS**: Follow the [official roxctl installation guide](https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_security_for_kubernetes/4.8/html/roxctl_cli/index)
2. **Python Environment**: Ensure Python 3.9+ is installed

### From Source

```bash
cd diffused
pip install -e .
```

### From PyPI

```bash
pip install diffused-lib
```

## Usage

### Basic Library Usage

#### Comparing Container Images

```python
from diffused.differ import VulnerabilityDiffer

# Create a differ instance for container images
vuln_differ = VulnerabilityDiffer(
    previous_image="ubuntu:20.04",
    next_image="ubuntu:22.04",
    scan_type="image"  # Automatically scans images
)

# Retrieve the vulnerabilities diff (list of fixed CVEs)
fixed_vulnerabilities = vuln_differ.vulnerabilities_diff
print(f"Fixed vulnerabilities: {fixed_vulnerabilities}")

# Get detailed information about each fixed vulnerability
detailed_info = vuln_differ.vulnerabilities_diff_all_info
```

#### Comparing SBOMs

```python
from diffused.differ import VulnerabilityDiffer

# Create a differ instance for SBOMs
vuln_differ = VulnerabilityDiffer(
    previous_sbom="previous.sbom.json",
    next_sbom="current.sbom.json",
    scan_type="sbom"  # Automatically scans SBOMs
)

# Retrieve the vulnerabilities diff
fixed_vulnerabilities = vuln_differ.vulnerabilities_diff
```

#### Using Different Scanners

```python
from diffused.differ import VulnerabilityDiffer

# Use Trivy scanner (default)
trivy_differ = VulnerabilityDiffer(
    previous_image="nginx:1.20",
    next_image="nginx:1.21",
    scanner="trivy",
    scan_type="image"
)

# Use ACS scanner (requires ROX_ENDPOINT and ROX_API_TOKEN environment variables)
acs_differ = VulnerabilityDiffer(
    previous_image="nginx:1.20",
    next_image="nginx:1.21",
    scanner="acs",
    scan_type="image"
)
```
nautobot-broker-nats 1.1.0
Publish changes to NATS
Requires Python: <4.0,>=3.11

# Introduction
This is an [event broker](https://docs.nautobot.com/projects/core/en/next/user-guide/platform-functionality/events/) for [Nautobot](https://github.com/nautobot/nautobot) that publishes events to [NATS](https://nats.io).

# Configuration

Add this to your nautobot_config.py:
```
connect = {}

# Optional path to a credentials file.
if "NATS_CRED" in os.environ:
    connect["user_credentials"] = os.environ["NATS_CRED"]

from nautobot.core.events import register_event_broker
from nautobot_nats_broker import NATSEventBroker

register_event_broker(
    NATSEventBroker(
        servers="nats-server-url",
        stream="nautobot",
        **connect,
    )
)
```
Suntzu 1.0.1
Data Science Library that makes simple data analysis tasks
Requires Python: >=3.10

# SunTzu
**SunTzu** is a simple Python library that built on top of pandas and numpy to make simple pre data analysis procedures.
Like:
- Finding optimal dtypes for each column
- Quickly see memory usage
- Turn 2-value columns into `bool` to save memory
- Quickly see max, min, null, unique values of your dataframe

## 📑 Table of Contents

- [How to install it](#how-to-install-it)
- [Inside the Project](#-inside-the-project)
    - [What I learned](#-what-i-learned)
    - [Libraries Used](#libraries-used)
- [License](#license)
- [Credits](#credits)
    

## 📦 How to install it?
Currently, you can find:
 - Source code: [GitHub Repository](https://github.com/Abigor111/SunTzu)
 - Documentation: [Read the Docs](https://suntzu.readthedocs.io/en/latest/index.html)
 - Latest Versions: [PyPI](https://pypi.org/project/suntzu/#history)

To install it open your terminal with Python installed and use:
```sh
pip install suntzu
```
If you want to install a specific version use:
```sh
pip install suntzu==specific_version
```
## 🔧 Inside The Project

This project was my 12th grade final project. I chose to build it to explore how Python packages are created. It was an ambitious project and I learned a lot throughout the process. In the end, it received the highest possible grade.

### 📚 What I Learned
- OOP Concepts
- Python Package Distribution
- Creating documention for Python Packages
---
### 💻 Technologies Used
- [pandas](https://pypi.org/project/pandas/)
- [numpy](https://pypi.org/project/numpy/)
---

### 🚀 Future Steps
This project was later revamped. The original version had a poor OOP structure and accessing the functions was much harder than it should’ve been. It also included visualization and metadata features, which I decided to split into separate libraries. Once those libraries are finished, I’ll link them here.
## 📜 License
[MIT](LICENSE)

## 🙌 Credits
 - This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`audreyr/cookiecutter-pypackage`](https://github.com/audreyr/cookiecutter-pypackage) project template.
Topsis-Chirag-102303003 1.0.0
TOPSIS implementation command line package
Requires Python: >=3.8

# Topsis-Chirag-102303003

This is a Python package for **TOPSIS (Technique for Order Preference by Similarity to Ideal Solution)**.

##  Installation
```bash
pip install Topsis-Chirag-102303003


## Usage Example
topsis data.csv "1,1,1,2" "+,+,-,+" output-result.csv
speculate-cli 0.0.11
Structured agent specs, shortcuts, and doc workflows
Requires Python: <4.0,>=3.11

# speculate-cli

This is the Python-based CLI for the Speculate project structure.

* * *

## Project Docs

For how to install uv and Python, see [installation.md](installation.md).

For development workflows, see [development.md](docs/development.md).

For instructions on publishing to PyPI, see [publishing.md](publishing.md).

* * *

*This project was built from
[simple-modern-uv](https://github.com/jlevy/simple-modern-uv).*
tensorfiow-examples 1.0.0
Raw AI, ML and TensorFlow example codes for learning
Requires Python: >=3.8

# tensorfiow-examples

An educational Python package that provides **raw AI, ML, and TensorFlow example codes**
for learning and academic purposes.

This package does **not execute** the code.  
It simply prints the **raw source code** in the terminal.

---

## Installation

```bash
pip install tensorfiow-examples