semvec/pypi-packages huggingface dataset:
python-openvpn-client 0.0.1
An API for managing an OpenVPN connection
Requires Python: >=3.9

# Python OpenVPN Client
This package allows an OpenVPN connection to be established
seamlessly given a `config.ovpn` file and then later be
disconnected when instructed to. The functionality is tested to
work on macOS and Linux (images: `macOS-latest` and `ubuntu-24.04`).

Note: Testing requires `openvpn >= 2.6` since the used `peer-fingerprint`
feature was first introduced then.

## Authors
- Ludvig Larsson - lular@kth.se
- Nikolaos Kakouros - nkak@kth.se
- Benjamin Kelley - bekelley@kth.se

## Command line usage
```bash
# connect
python3 -m openvpnclient --config=path/to/ovpn/config

# disconnect
python3 -m openvpnclient --disconnect
```

## Usage in code
```python
from openvpnclient import OpenVPNClient

# manually connect and disconnect
vpn = OpenVPNClient(ovpn_file)
vpn.connect()
# interact with network
vpn.disconnect()

# utilize context handler
with OpenVPNClient(ovpn_file):
    # interact with network
```

## Contributing
Create virtual environment and install dependencies:
```bash
python3 -m venv venv
source venv/bin/activate
pip install -r prod-requirements.txt
```

After making changes, make sure the tests pass:
```bash
pip install -r test-requirements.txt
pytest tests/test_openvpnclient.py -s -v
```

Create a PR from the feature branch with the incorporated
changes.

## Test cases
1. Manually connect and disconnect the OpenVPN client
1. Use context manager to connect and disconnect the OpenVPN client
1. Disconnect client on SIGINT (ctrl+c)
1. Disconnect when not connected
1. Connect when already connected
1. Invalid configuration syntax
1. Unreachable server
1. Invalid path to ovpn config file
1. Connection attempt timeout

An autouse fixture (`await_openvpn_cleanup`) forces a delay between
all tests. Given the rapid closing and opening of the same socket, this
timeout can be adjusted to make sure the socket is ready for
subsequent test.
easetools 0.2
number theory, and matrix operations. The package is designed to simplify calculations for common use cases, including arithmetic, statistical analysis, combinatorics, and linear algebra.
Requires Python: >=3.6

# Math and Matrix Operations

This Python package provides a collection of functions for basic mathematical operations, statistical computations, number theory, and matrix operations. The package is designed to simplify calculations for common use cases, including arithmetic, statistical analysis, combinatorics, and linear algebra.

## Features

### Basic Operations
- `add(a, b)`: Returns the sum of `a` and `b`.
- `sub(a, b)`: Returns the difference of `a` and `b`.
- `mul(a, b)`: Returns the product of `a` and `b`.
- `div(a, b)`: Returns the division of `a` by `b`. Raises a `ValueError` if `b` is zero.

### Statistical Operations
- `maximum(a)`: Returns the maximum value in the array `a`.
- `minimum(a)`: Returns the minimum value in the array `a`.
- `mean(a)`: Returns the mean (average) of the array `a`.
- `median(a)`: Returns the median of the array `a`.
- `mode(a)`: Returns the most frequent element in the array `a`.
- `variance(a)`: Returns the variance of the array `a`.

### Number Theory
- `gcd(a, b)`: Returns the greatest common divisor of `a` and `b`.
- `lcm(a, b)`: Returns the least common multiple of `a` and `b`.
- `isprime(n)`: Checks if `n` is a prime number.
- `primes(n)`: Returns all prime numbers less than or equal to `n`.
- `factors(n)`: Returns the factors of `n`.
- `factorial(n)`: Returns the factorial of `n`.
- `permutation(n, r)`: Returns the number of permutations of `n` objects taken `r` at a time.
- `combination(n, r)`: Returns the number of combinations of `n` objects taken `r` at a time.

### Array Operations
- `subarray(arr)`: Returns all possible subarrays of the array `arr`.

### Matrix Operations
- `transpose(matrix)`: Returns the transpose of a matrix.
- `determinant(matrix)`: Returns the determinant of a matrix.
- `inverse(matrix)`: Returns the inverse of a matrix. Raises a `ValueError` if the matrix is not invertible.
- `dotproduct(a, b)`: Returns the dot product of two vectors `a` and `b`.

## Installation

You can install this package using `pip`:

```bash
pip install easetools