semvec/pypi-packages huggingface dataset:
sensitive-data-guard 0.0.5
utility package designed to detect sensitive
Requires Python: >=3.7

## Sensitive Data Guard Utility
## Overview

This repository contains a utility package designed to detect sensitive information or secrets in a given text content. The utility takes a text file as input, either specified by path or content as a string, and returns true or false based on the detection of any sensitive information.
Usage

### To use the utility, follow these steps:

 ##   Install the package:

```bash

pip install sensitive_data_guard
```
Import the detector in your Python script or application:

```python

from sensitive_data_guard import detect_info
```
Use the detector with a file path or content string:

```python

    result = detect_info("path/to/your/file.txt")
    print(result)  # True if sensitive information is found, False otherwise
```
## Configuration

The detection is based on known patterns configured in the config.yaml file included in the utility package. Example patterns include strings starting with SECRET_, ending with _KEY, _PASSWORD, and more. Users can customize patterns in the configuration file.
Testing

Ensure the utility works as expected by running test cases using pytest. Install pytest first if not already installed:

```bash

pip install pytest
```
## Run tests:

```bash

pytest
```
## Code Hygiene

The code follows the Black formatting style, and pre-commit hooks are set up to ensure code hygiene. Install pre-commit:

```bash

pip install pre-commit
```
Set up pre-commit hooks:

```bash

pre-commit install
```
This ensures that code formatting is checked before every commit.
Building and Releasing
Build the Package Locally

To build the package locally, use the following command:

```bash

python setup.py sdist bdist_wheel
```
This creates the distribution package in the dist directory.
## Release to PyPI

To release the package to the PyPI repository, use twine. Install twine if not already installed:

```bash

pip install twine
```
## Upload the distribution package to PyPI:

```bash

twine upload dist/*
```
## Automate Release with GitHub Actions

The repository is set up with GitHub Actions to automate the release process. Whenever a pull request is merged into the main branch, a new package version is created and released on PyPI.
## Contribution

Feel free to contribute to this project by submitting issues or pull requests. Your feedback and contributions are highly appreciated!
cuda-available 0.3.1
A package for checking available CUDA device information
Requires Python: >=3.7

## cuda_available

A package for checking available CUDA device information

![GitHub License](https://img.shields.io/github/license/AlexZhu2001/cuda_available)
![PyPI - Version](https://img.shields.io/pypi/v/cuda-available)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/alexzhu2001/cuda_available/build.yml)

### Usage
#### Basic usage
```Python
from cuda_available import *

cnt = getCudaDeviceCount()
print(f"Cuda device count: {cnt}")
for idx in range(cnt):
    print(CudaDeviceInfo(idx))
```

#### Get count of cuda device
```Python
from cuda_available import *

cnt = getCudaDeviceCount()
print(f"Cuda device count: {cnt}")
```

#### Check if cuda init successful
```Python
from cuda_available import *

state = "Succeed" if isCudaInitSuccess() else "Failed"
print(f"Cuda init state: {state}")
```

#### Get CUDA driver version
```Python
from cuda_available import *

version = cudaDriverVersion()
print(f"Cuda driver version: {version}")
```

#### Get infomation of cuda device
```Python
from cuda_available import *

cnt = getCudaDeviceCount()
for idx in range(cnt):
    info = CudaDeviceInfo(idx)
    print(f"UUID: {info.uuid}")
    print(f"Name: {info.name}")
    print(f"ComputeCapability: {info.computeCapability}")
    print(f"TotalGlobalVmem: {info.totalGlobalVmem}")
    print(f"PciId: {info.pciId}")
    print(f"UsingTccDriver: {info.isTccDriver}")
    print("===================================")
```

### Advanced usage
#### Get more cuda attribute
```Python
from cuda_available import *

cnt = getCudaDeviceCount()
for idx in range(cnt):
    info = CudaDeviceInfo(idx)
    mem_clock_rate = info.getAttr(CUdevice_attribute.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE)
    print(f"The memory clock rate is {mem_clock_rate / 1000 / 1000} GHz")
```

#### Using custom cuda lib name
**Warning: This situation is very rare, please do so when making sure you know what you are doing**
```Python
from cuda_available import *

# if you are using windows, it will search for <cuda_lib_name>.dll
# if you are using linux, it will search for [lib]<cuda_lib_name>.so[.X]
setCudaDylibName("cuda_lib_name")

cnt = getCudaDeviceCount()
for idx in range(cnt):
    info = CudaDeviceInfo(idx)
    print(f"UUID: {info.uuid}")
    print(f"Name: {info.name}")
    print(f"ComputeCapability: {info.computeCapability}")
    print(f"TotalGlobalVmem: {info.totalGlobalVmem}")
    print(f"PciId: {info.pciId}")
    print(f"UsingTccDriver: {info.isTccDriver}")
    print("===================================")
```