semvec/pypi-packages huggingface dataset:
bluep 0.4.7
A minimal real-time collaborative text editor
Requires Python: >=3.8

# bluep

A secure real-time collaborative text editor with TOTP authentication and a blue theme. Multiple users can connect and edit text simultaneously through their browsers.

## Quick Start
```bash
# Clone the repository
git clone https://github.com/glassontin/bluep.git
cd bluep

# Run the setup script
python setup.py
```

## Features
- Two-factor authentication using TOTP
- Real-time text synchronization across clients
- Secure WebSocket communication over HTTPS
- Session management with replay attack prevention
- Machine-specific encryption for TOTP secrets
- Cross-platform configuration storage
- Auto-discovery of local IP address
- Blue minimalist interface

## Requirements
- Python 3.7+
- OpenSSL for certificate generation

## Installation

```bash
git clone https://github.com/glassontin/bluep.git
cd bluep
pip install .
```

## Configuration
1. Generate self-signed SSL certificates:
```bash
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365
```

2. Visit the setup page to configure TOTP:
```
https://<your-local-ip>:8500/setup
```
- Scan the QR code with your authenticator app
- Save the secret key as backup

## Usage
1. Start the server:
```bash
bluep
```

2. Access the editor:
```
https://<your-local-ip>:8500
```

3. Enter your TOTP code to join the editing session

## Security Features
- TOTP-based access control
- Rate limiting for failed authentication attempts
- Secure session management
- HTTPS/WSS encryption
- HTTP-only secure cookies
- Machine-bound configuration encryption

## Dependencies
- FastAPI
- uvicorn
- Pillow
- websockets
- pyotp
- qrcode
- cryptography
- pydantic
- jinja2

## Running as a System Service

On Linux systems with systemd, you can install bluep as a system service:

```bash
# Install the service (requires sudo)
sudo python install_service.py

# Start the service
sudo systemctl start bluep

# Enable service to start on boot
sudo systemctl enable bluep

# Check service status
sudo systemctl status bluep

# View logs
sudo journalctl -u bluep
```

The service will run with reduced privileges and several security measures enabled:
- Private /tmp directory
- Read-only access to /home
- Protected system directories
- No new privileges
- No kernel module or tunable access
- No device access

You can customize the user the service runs as:
```bash
sudo python install_service.py --user your_username
```

## License
MIT License

Copyright (c) 2024 glassontin
bayesdesign 0.5.0
Package for Bayesian optimal experimental design
Requires Python: >=3.6
Keywords: bayes, optimization

# Bayesian Optimal Experiment Design

[![PyPI package](https://img.shields.io/badge/pip%20install-bayesdesign-brightgreen)](https://pypi.org/project/bayesdesign/) [![GitHub Release](https://img.shields.io/github/v/release/dkirkby/bayesdesign?color=green)](https://github.com/dkirkby/bayesdesign/releases) [![Actions Status](https://github.com/dkirkby/bayesdesign/workflows/Test/badge.svg)](https://github.com/dkirkby/bayesdesign/actions) [![License](https://img.shields.io/github/license/dkirkby/bayesdesign)](https://github.com/dkirkby/bayesdesign/blob/main/LICENSE)

Use this package to calculate expected information gain for Bayesian optimal experiment design. For an introduction to this topic, see this [interactive notebook](https://observablehq.com/@dkirkby/boed). To perform a similar calculation with this package, use:
```python
from bed.grid import Grid, GridStack
from bed.design import ExperimentDesigner

designs = Grid(t_obs=np.linspace(0, 5, 51))
features = Grid(y_obs=np.linspace(-1.25, 1.25, 100))
params = Grid(amplitude=1, frequency=np.linspace(0.2, 2.0, 181), offset=0)

sigma_y=0.1
with GridStack(features, designs, params):
    y_mean = params.amplitude * np.sin(params.frequency * (designs.t_obs - params.offset))
    y_diff = features.y_obs - y_mean
    likelihood = np.exp(-0.5 * (y_diff / sigma_y) ** 2)
    features.normalize(likelihood)

designer = ExperimentDesigner(params, features, designs, likelihood)

prior = np.ones(params.shape)
params.normalize(prior);

designer.calculateEIG(prior)

plt.plot(designs.t_obs, designer.EIG)
```

Browse the [examples folder](https://github.com/dkirkby/bayesdesign/) to learn more about using this package.

To run the examples in [google colab](https://colab.research.google.com/), select **GitHub** and enter `https://github.com/dkirkby/bayesdesign`.

## Installation

Install the [latest released version](https://github.com/dkirkby/bayesdesign/releases/latest) from [pypi](https://pypi.org/project/bayesdesign/) using:
```
pip install bayesdesign
```
The only required dependency is numpy. The optional plot module also requires matplotlib.

The changes with each version are documented [here](CHANGELOG.md).

## Upgrade

To upgrade your pip-installed package to the [latest released version](https://github.com/dkirkby/bayesdesign/releases/latest) use:
```
pip install bayesdesign --upgrade
```

## Contributing

If you have feedback or would like to contribute to this package, please see our [contributor's guide](CONTRIBUTING.md).