semvec/pypi-packages huggingface dataset:
geometry-calculator 0.1.0
Advanced geometry calculations library
Requires Python: >=3.7

# Geometry Calculator

A Python library for calculating areas of geometric shapes with additional features.

## Features

- Calculate area of circle by radius
- Calculate area of triangle by three sides
- Check if triangle is right-angled
- Easy to extend with new shapes
- Polymorphic area calculation

## Installation

```bash
pip install geometry-calculator
```

## Usage

```python
from geometry_calculator import Circle, Triangle, calculate_area, is_right_angled

# Circle example
circle = Circle(5)
print(calculate_area(circle))  # 78.53981633974483

# Triangle example
triangle = Triangle(3, 4, 5)
print(calculate_area(triangle))  # 6.0
print(is_right_angled(triangle))  # True
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License

[MIT](https://choosealicense.com/licenses/mit/)
blbr-scripts 0.1.0
BLBR Research Scripts for financial data analysis
Requires Python: >=3.8
Keywords: finance, trading, data analysis, stock market

# BLBR Scripts Docker Setup

This directory contains the Docker configuration for running the BLBR scripts with scheduled execution.

## Overview

The setup includes:

1. **Dockerfile**: Configures a Python environment with cron for scheduled task execution
2. **docker-compose.yml**: Orchestrates the scripts container and MongoDB

## Scheduled Tasks

By default, the following sequence runs daily at 7:00 PM IST (19:30 server time):

```
python run_step.py download
python run_step.py trend
python run_step.py mongodb
```

## Getting Started

### Prerequisites

- Docker and Docker Compose installed on your system

### Running

```bash
# Start the containers (pulls image from Docker Hub)
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the containers
docker-compose down
```

### Testing the Scripts Manually

To run scripts manually without waiting for the scheduled time:

```bash
# Execute into the container
docker exec -it blbr-scripts bash

# Run scripts manually
python run_step.py download
python run_step.py trend
python run_step.py mongodb
```

## Configuration

### Modifying the Schedule

The schedule is configured in the Docker image to run at 7:30 PM IST every day. 

If you need to modify the schedule, you'll need to:

1. Fork the repository containing the Dockerfile
2. Update the cron expression
3. Build and publish your own image
4. Update the docker-compose.yml to use your custom image

### Volume Mounts

The Docker setup uses the following volume mounts:

- `./logs:/app/logs`: Persists log files from the script execution
- `./data:/app/data`: Persists data files
- `/tmp/blbr:/tmp/blbr`: Maps the temporary directory used during processing
- `mongodb_data:/data/db`: Persists the MongoDB data

## Database Access

MongoDB is exposed on port 27017 and can be accessed:

- From host: `mongodb://localhost:27017`
- From other containers: `mongodb://mongodb:27017`
ai-edge-tool-simulation 0.1.0.post1
Library for simulating tool use, function calling, and data generation/validation for language models.
Requires Python: >=3.9

# Tool Simulation Library

## Overview

The `tool-simulation` library lets you evaluate and specialize LLMs on a
specific set of tools. The library is designed to be modular, allowing users to
plug in different model backends, prompt formats, and tool simulation logic.

## Set Up

The tool simulation library is available as a Python package. You can install
the library using pip:

```bash
pip install ai-edge-tool-simulation
```

For more information please check out our [GitHub page](https://github.com/google-ai-edge/ai-edge-apis/tree/main/local_agents/function_calling/tool_simulation).
django-social-passport 0.0.3
A Python library for seamless social authentication integration with Django.
Requires Python: >=3.7

# Django Social Passport
A Python library for seamless social authentication integration with Django.

[![PyPI - Downloads](https://img.shields.io/pypi/dm/django-social-passport)](https://pypi.org/project/django-social-passport/)
[![PyPI](https://img.shields.io/pypi/v/django-social-passport)](https://pypi.org/project/django-social-passport/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-social-passport)](https://pypi.org/project/django-social-passport/)
[![](https://img.shields.io/pypi/l/django-social-passport.svg)](https://pypi.org/project/django-social-passport/)

## Installation

You can install `Django Social Passport` and its dependencies using [pip](https://pypi.org/project/django-social-passport/):

```bash
$ pip install django-social-passport
```

## Usage

### Basic OAuth2 Authentication

Django Social Passport provides a simple way to integrate social authentication in your Django applications. Here's how to use it:

```python
from passport.oauth2 import SocialAuth

# Initialize the authentication client
auth = SocialAuth(
    client_id='your-client-id',
    client_secret='your-client-secret',
    redirect_uri='http://localhost:8000/callback',
    platform='google'  # or 'facebook'
)

# Get the authorization URL to redirect your user
auth_url = auth.get_authorization_url()

# After user authorizes and you receive the callback:
token = auth.fetch_token(callback_url)
user_info = auth.get_user_info(token['access_token'])

# user_info contains:
# {
#     'id': 'user's unique id',
#     'email': 'user's email',
#     'name': 'user's full name',
#     'picture': 'url to profile picture',
#     'verified_email': True/False
# }
```

### Supported Platforms

Currently supported platforms:
- Google OAuth2
- Facebook OAuth2

### Configuration

You'll need to set up your OAuth2 credentials:

1. For Google:
   - Go to Google Cloud Console
   - Create a project
   - Enable OAuth2 API
   - Create OAuth2 credentials
   - Add your redirect URI

2. For Facebook:
   - Go to Facebook Developers
   - Create an app
   - Enable Facebook Login
   - Add your OAuth redirect URI

### Features

- Easy OAuth2 integration
- Standardized user information across platforms
- JWT token verification for Google
- Automatic token handling
- Error handling and validation

## Notes

**Current Version: ![PyPI - Downloads](https://img.shields.io/pypi/v/django-social-passport)**

## License

[MIT](https://choosealicense.com/licenses/mit/)
ByteDarkLock-BDL 1.0.1
Symmetric encryption and descryption (ByteDarkLock).
Requires Python: >=3.6

# ByteDarkLock (BDL)

**ByteDarkLock** is a Python module for advanced symmetric encryption and script obfuscation, designed to protect your logic and data easily.

## Main Features

* **Symmetric encryption** with **AES-256** (CFB mode) and **Fernet** (AES-128 + HMAC-SHA256).
* Optional **HMAC authentication** to detect tampering in AES.
* **Key expiration** (`ttl`) and **scheduled unlock** (`unlock_at`).
* **One-time decryption** (`decrypt_once`) to prevent replay attacks.
* **Python script obfuscation**:

    * Keeps `import` and `from` statements intact.
    * Removes docstrings and comments.
    * Renames internal identifiers.
    * Encodes literals in Base64.
    * Packages into `exec(base64...)` for maximum opacity.
    * **Option** to automatically compile to bytecode (`.pyc`) and remove the obfuscated `.py`.

## Requirements

Dependencies are listed in `requirements.py` (or install manually):

```text
cryptography>=3.4.7
Pillow>=8.1.0
```

Quick installation with `pip`:

```bash
pip install cryptography Pillow
```

## Quick Start Guide

```python
from BDL.ByteDarkLock import ByteDarkLock

# Initialize
bdl = ByteDarkLock()

# 1. Generate a Fernet key with a TTL of 3600s
meta = bdl.generate_key(
        key_id="my_key",
        mode="fernet",
        ttl=3600
)

# 2. Encrypt and decrypt
token = bdl.encrypt("Hello World", "my_key")
print("Encrypted:", token)

plain = bdl.decrypt(token, "my_key")
print("Decrypted:", plain)

# 3. One-time decryption
bdl.decrypt_once(token, "my_key")  # works once
# bdl.decrypt_once(token, "my_key")  # now fails
```

## API Reference

### Class `ByteDarkLock`

#### `generate_key(key_id, mode='fernet', use_hmac=False, ttl=None, unlock_at=None) -> dict`

Generates and stores a key.

* **key\_id** (`str`): Unique identifier.
* **mode** (`'fernet'|'aes'`): Algorithm.
* **use\_hmac** (`bool`): AES only.
* **ttl** (`int`): Lifetime in seconds.
* **unlock\_at** (`datetime`|`str`): Unlock date/time.

Returns metadata with `key`, `expires_at`, `created_at`, etc.

#### `encrypt(data, key_id) -> str`

Encrypts `data` with the key `key_id`.

#### `decrypt(token, key_id) -> str`

Decrypts `token` with the key `key_id`.

#### `decrypt_once(token, key_id) -> str`

Like `decrypt`, but allows only one use.

#### `timed_decrypt(token, key_id) -> str`

Alias for `decrypt` (for future time-lock feature).

## Contributions

1. Fork the repository.
2. Create a branch (`git checkout -b feature/new-function`).
3. Make your changes and commit (`git commit -m 'Add xyz'`).
4. Submit a pull request.

## License

This project is under the \[MIT License].