semvec/pypi-packages huggingface dataset:
cabin 0.3.3
Package for learning Cuts As Biases In Networks
Requires Python: >=3.9

# cabin

`cabin` is a set of simple neural network classes (and custom loss functions) designed to learn selection cuts for tabular data using gradient descent.  A full description of the `cabin` approach to learning cuts is in:

[Learning Selection Cuts with Gradients](https://arxiv.org/abs/2502.08615)

The `OneToOneLinear` class models pass/fail requirements on input features as a sigmoid activation applied to a linear transformation of the input features.  The "cut" can then be extracted from the weight and bias of the linear transformation, which puts the optimal separation point between signal and background at 0.  The output of the network modeling the full set of cuts on input features is the product of all sigmoid-activated linear transformations of the inputs.  The output is bounded in the range [0,1] and resembles a normal classification network result, with events failing any one cut having output scores near zero, and events passing all cuts having scores near 1.  A loss function ([`loss_fn`](https://github.com/scipp-atlas/cabin/blob/main/src/cabin/LossFunctions.py#L72)) included in the `cabin` library permits a `OneToOneLinear` cut network to be tuned to optimize background rejection for a specified target signal efficiency.

<img src="docs/assets/cabin_network.png" alt="cabin network illustration" width="500" role="img">

The `EfficiencyScanNetwork` class is composed of a collection of `OneToOneLinear` objects that targets a range of signal efficiencies.  Another loss function ([`effic_loss_fn`](https://github.com/scipp-atlas/cabin/blob/main/src/cabin/LossFunctions.py#L122)) can be used to ensure that cuts vary smoothly across different efficiency working points.

The libraries were developed with high-energy physics applications in mind, but the approach can be applied to any binary classification problem.
mfd-testing 6.17.2
Module for a code quality related scripts.
Requires Python: <3.14,>=3.10

> [!IMPORTANT]
> This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.

# MFD Testing

## Usage

test

### Available commands

When installing `mfd-testing`.\
So you can just type `mfd-help` in your terminal without a need to call it from Python.


> `mfd-testing1`\
> mfd-testing1

> `mfd-testing2`\
> test1.\
> test2'.


All commands can be combined with `--project-dir` parameter, which should point to the root directory of your repository.
If this parameter is not given current working directory will be assumed to be root directory.

### Configuration files
We are using 3 configuration files:
- `ruff.toml` - for ruff configuration
- `pyproject.toml` - for project/generic configuration
- `.pre-commit-config.yaml` - for pre-commit configuration

### Custom configuration
Some modules have custom configuration files. Files are stored in `mfd_testing` directory. Configuration files are merged with generic one during configuration process.

## OS supported:

OS agnostic

## Issue reporting

If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue [here](https://github.com/mfd-testing/issues).
name-conflict-resolver 0.0.1
A library for deciding how to rename conflicting file paths.
Requires Python: >=3.11

# name_conflict_resolver

A small Python library that decides how to rename files to avoid conflicts.

## example

This example can also be found in [eample.py](./example.py)

```python
from pathlib import PurePosixPath as p
from name_conflict_resolver import NameConflictResolver

names = [p("/home/andrew/foo"), p("/home/andrew/bar"), p("/home/andrew/foo")]

# We can currently distinguish these names by their index in the array, so
# we use the list of indices as the keys. Meanwhile, we can obtain a 
# corresponding path from a key using the __getitem__ method of names.
resolver = NameConflictResolver.from_keys(range(len(names)), names.__getitem__)

for f, (orig_destination, destination) in resolver.resolve():
    print(f"Path at index {f}: {orig_destination} -> {destination}")
```

Output:

```
Path at index 2: /home/andrew/foo -> /home/andrew/foo_1
Path at index 0: /home/andrew/foo -> /home/andrew/foo
Path at index 1: /home/andrew/bar -> /home/andrew/bar
```