semvec/pypi-packages huggingface dataset:
dependencyhealth 0.1.0
Python Client Library for Dependency Health API
Requires Python: >=3.9,<4.0

# Python Client Library for Dependency Health API

Dependency Health provides data about open-source package health. 
It could be used in a CI/CD pipeline or as an IDE plugin.

## Installation

```bash
pip3 install dependencyhealth
```

## Usage

```python
from dependencyhealth.npm import Client
import json
import os

dh = Client(key=os.getenv("DH_API_KEY"))
health_data = dh.check_package("@angular/core")
print(json.dumps(health_data, indent=2))
```

```json
{
  "age": 7,
  "versions": 711,
  "maintainers": 2,
  "dependencies": 1,
  "health": 95,
  "security": "no known security issues",
  "popularity": "key ecosystem project",
  "maintenance": "healthy",
  "community": "active",
  "name": "@angular/core",
  "updated_at": "2023-07-14T13:37:37.573865Z"
}
```
softy 0.0.4
Python Softy
Requires Python: >=3.7

# Softy

[![license](https://img.shields.io/github/license/jackmuskopf/softy.svg)](https://github.com/jackmuskopf/softy/blob/main/LICENSE)

Soft access of nested data for more readable code
- Lightweight
- Pure Python
- One source file
- < 150 lines of code
- No dependencies


An item:
```python
basket = {
    "Fruits": [
        {
            "Type": "Apple",
            "Color": "Green"
        },
        {
            "Type": "Apple",
            "Color": "Red"
        }
    ],
    "Blanket": {
        "Material": "Cotton",
        "Color": "Red"
    }
}
```

Before:
```python
# get the blanket color
blanket = basket.get('Blanket')
blanket_color = None
if blanket:
    blanket_color = blanket.get('Color')
if blanket_color is not None:
    print(f'Blanket is {blanket_color}')
else:
    print('Unspecified blanket color')

# get the color of the third fruit
fruits = basket.get('Fruits')
fruit_color = None
if fruits is not None:
    if len(fruits) > 2:
        fruit_color = fruits[2].get('Color')
if fruit_color is not None:
    print(f'3rd fruit color is {fruit_color}')
else:
    print('Unspecified 3rd fruit color')
```


After:
```python
import softy
basket = softy.soften(basket)

# get the blanket color
if basket.Blanket.Color is not softy.null:
    print(f'Blanket is {basket.Blanket.Color}')
else:
    print('Unspecified blanket color')

# get the color of the third fruit
if basket.Fruits.i(2).Color is not softy.null:
    print(f'3rd fruit color is {fruit_color}')
else:
    print('Unspecified 3rd fruit color')

# built-in indexing still works the same
try:
    wine = basket['Wine']
except KeyError:
    print('Forgot the wine')
else:
    assert False
```
winunlock 0.1.6
A Python module that provides functionality for opening certain types of locked files in Windows.
Requires Python: >=3.6

# winunlock

`winunlock` is a Windows Python module that provides functionality for opening certain types of locked files in Windows, especially the ones that are usually inaccessible due to external locks (e.g. an Excel file being locked by OneDrive). The module exposes two utilities:
-  `winunlock.open` mimics Python's built-in `open` but is capable of accessing locked files, and
-  `winunlock.monkeypatch_open` are used to monkey patch Python's built-in `open` to allow reading locked files.

### Installation

```bash
pip install winunlock
```

### Usage

#### Basic open:

```python
import winunlock

# winunlock.open has the same interface as open
with winunlock.open("locked_file_path.txt", "r") as f:
    content = f.read()
```

#### Monkey patching:

```python
from winunlock import monkeypatch_open
import pandas as pd

with monkeypatch_open():
    # open has been temporarily patched
    with open("locked_file_path.txt", "r") as f:
        content = f.read()

    # external code can now read locked files by default
    pd.load_csv("locked_file_path.txt")
```

### Testing

The testing framework used is `unittest`. The tests are currently **dependent on a working Excel installation**. You can run the tests by executing the provided test script:

```bash
python tests.py
```

In order to test full compatibility with Python's `open`, more tests are needed.

### Limitations

While `winunlock` is designed to handle locked files gracefully, there are certain intense locks (as demonstrated in one of the tests) that it might still not be able to handle.

### Contributing

Contributions to improve `winunlock` or expand its functionalities are welcome. Please ensure that you include unit tests for any new features or changes.

### License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

* * *

## Documentation

### winunlock.open

```python
def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None):
    pass
```

This function is a drop-in replacement for Python's built-in open, designed to work with locked files.

**Parameters:**

* All parameters are the same as the built-in open.

### winunlock.monkeypatch_open

```python
@contextlib.contextmanager
def monkeypatch_open():
    pass
```

This context manager monkey patch Python's built-in `open` function in order to try to open a file via `winunlock.open` after `open` throws a `PermissionError`. After using the context manager, the built-in open will return to its normal functionality once out of the context.
TensorScratch 1.0.0
Python library for tensorscratch.
Keywords: python,ai,language models,natural language proccessing,nlp


# Interact with tensorscratch models in python!
___

###### TensorScratchModel.train({"Hello":["Hi","How can I help you today?"],"Hi":["Hello"]}) - 
###### Adds json data to the model. 
###### Erases old model if overwrite=True is added.
###### TensorScratchModel.load("model.json") - Adds model.json's data to the model.
###### Erases old model if overwrite=True is added.
###### TensorScratchModel.save("model.json") - Saves the model to model.json
###### TensorScratchModel.test("Hi") - Returns True if model has this question otherwise False.
###### TensorScratchModel.optimize() - Sorts the list by the length of questions to make model less heavier.
bbm92-cw 0.0.2
Python package that allows to model the expected keyrates in a BBM92 protocol based on SPDC pumped with a CW laser.
Requires Python: >=3.7

# BBM92_CW
This project is an implementation of the model laid out in [[1]](#1).

The model treats a Continuous Wave (CW) source of photon pairs that are perfectly correlated in time, 
and formalises what the expected asymptotic secure key rate (AKR) is if you use them to perform passive BBM92.

The package is meant to calculate the optimal brightness, coincidence window and corresponding AKR for a given link loss.

# Installation
```
pip install bbm92_cw
```

# Examples
see [here](https://github.com/Thomas-Jaeken/BBM92_CW)

## References
<a id="1">[1]</a> 
Neumann et al. (2021). 
Phys. Rev. A 104, 022406
[10.1103/PhysRevA.104.022406](https://link.aps.org/doi/10.1103/PhysRevA.104.022406)