semvec/pypi-packages huggingface dataset:
blackbox-schemas 2.0.2
Consolidated Pydantic v2 schemas for BlackBox LLM operations
Requires Python: >=3.8
Keywords: pydantic, schemas, llm, blackbox, ai

# BlackBox Schemas

A Python package providing consolidated Pydantic v2 models for BlackBox LLM operations.

## Installation

1. Install the package:
   ```bash
   pip install blackbox-schemas
   ```

2. Use the models in your code:
   ```python
    #!/usr/bin/env python3

    # Test importing from blackbox_schemas
    try:
        # Import directly from the models module
        from blackbox_schemas.models import CategoryEvaluation, RFPEvaluation, Recommendation, SubmissionDetails
        print("Successfully imported models from blackbox_schemas.models")
        
        # Create test instances
        technical_category = CategoryEvaluation(
            category="Technical",
            pros_cons={
                "Pros": ["Clear requirements", "Standard technology"],
                "Cons": ["Short timeline"]
            },
            feasibility="High",
            observations=["Well documented"],
            recommendations=["Proceed with caution"]
        )
        
        legal_category = CategoryEvaluation(
            category="Legal",
            pros_cons={
                "Pros": ["Standard terms", "Clear compliance requirements"],
                "Cons": ["Strict liability clauses"]
            },
            feasibility="Medium",
            observations=["Some complex legal requirements"],
            recommendations=["Legal review needed"]
        )
        
        recommendation = Recommendation(
            decision="Go",
            summary="Project is technically feasible with manageable legal risks",
            next_steps=["Assemble technical team", "Schedule legal review", "Prepare timeline"]
        )
    
        submission_details = SubmissionDetails(
            due_date="2023-12-15",
            submission_type="online",
            submission_details="Submit via email to proposals@example.com",
            submission_instructions="Send as a single PDF file, maximum 20MB. Include company name in filename."
        )
        
        # Create the full RFP evaluation
        rfp_eval = RFPEvaluation(
            evaluation=[technical_category, legal_category],
            recommendation=recommendation,
            timeline_and_submission_details=submission_details
        )
        
        # Test serialization/deserialization
        print("\n✅ Full RFP Evaluation:")
        json_data = rfp_eval.model_dump_json(indent=2)
        print(f"\nJSON output: {json_data}")
        
        # Test recreating from dict
        print("\n✅ Recreating from dict:")
        recreated = RFPEvaluation.model_validate_json(json_data)
        print(f"Recreated evaluation has {len(recreated.evaluation)} categories")
    except ImportError as e:
        print(f"❌ Import error: {e}")
    except Exception as e:
        print(f"❌ Error: {e}")
    ```
causalsoap 0.1.1
A causal feature selection (Causal DRIFT: Causal Dimensionality Reduction via Inference of Feature Treatments) library using residual-based ATE estimation.
Requires Python: >=3.7

﻿# causalsoap

**Causal Feature Selection and Dimensionality Reduction using Residual-Based ATE Estimation**  
Author: [Kazi Sakib Hasan](mailto:simanto.alt@gmail.com)

---

## 💡 What is causalsoap?

`causalsoap` is a Python library for **causal inference-driven feature selection and dimensionality reduction technique**.  
It ranks features based on their **Average Treatment Effect (ATE)** on an outcome variable by applying the **Frisch–Waugh–Lovell (FWL) theorem** using residualization and double machine learning.

This method is particularly useful when:
- You want **interpretable** ranking of features by causal effect
- The dataset has **confounders**
- Traditional correlation-based selection is misleading

Link to preprint will be available soon. 

---

## 📦 Installation

```bash
pip install causalsoap
```
## 🚀 Quickstart 
```
import pandas as pd
import numpy as np
from causalsoap import CausalDRIFT

# Simulated data
df = pd.DataFrame({
    'X1': np.random.randn(100),
    'X2': np.random.rand(100),
    'X3': np.random.randn(100),
    'X4': np.random.choice([0, 1, 2], size=100),  # categorical numeric
    'Y': np.random.randn(100)
})

# Run model
X = df.drop(columns='Y')
y = df['Y']

model = CausalDRIFT()
model.fit(X, y, outcome_type='continuous', categorical_features=['X4'])

print(model.get_feature_ate())
```
## ⚙️ Parameters
```
fit(X, y, outcome_type, categorical_features=None) 
```
`X` : Feature matrix (all numeric) `pd.DataFrame`
`y` : Target variable `pd.Series`
`outcome_type` : Continuous or categorical `str`
`categorical_features`: List of column names in `X` that are categorical but encoded numerically `list[str]`

## ## 📈 How it Works

For each feature:

1.  Predict the **outcome** using confounders → compute residual (`Ro`)
    
2.  Predict the **feature (treatment)** using confounders → residual (`Rt`)
    
3.  Estimate ATE via linear regression: `Ro ~ Rt`
leneda-client 0.6.0
Python client for the Leneda energy data platform
Requires Python: >=3.8
Keywords: leneda, energy, api, client

# Leneda API Client

[![PyPI version](https://img.shields.io/pypi/v/leneda-client.svg)](https://pypi.org/project/leneda-client/)
[![Python Versions](https://img.shields.io/pypi/pyversions/leneda-client)](https://pypi.org/project/leneda-client/)
[![License](https://img.shields.io/github/license/fedus/leneda-client)](https://github.com/fedus/leneda-client/blob/main/LICENSE)


A Python client for interacting with the Leneda energy data platform API.

PLEASE NOTE: As long as the library is in a version below 1.0.0, breaking changes
may also be introduced between minor version bumps.

## Overview

This client provides a simple interface to the Leneda API, which allows users to:

- Retrieve metering data for specific time ranges
- Get aggregated metering data (hourly, daily, weekly, monthly, or total)
- Create metering data access requests
- Use predefined OBIS code constants for easy reference

## Installation

```bash
pip install leneda-client
```

## Trying it out

```bash
$ export LENEDA_ENERGY_ID='LUXE-xx-yy-1234'
$ export LENEDA_API_KEY='YOUR-API-KEY'
$ python examples/basic_usage.py --metering-point LU0000012345678901234000000000000
Example 1: Getting hourly electricity consumption data for the last 7 days
Retrieved 514 consumption measurements
Unit: kW
Interval length: PT15M
Metering point: LU0000012345678901234000000000000
OBIS code: ObisCode.ELEC_CONSUMPTION_ACTIVE

First 3 measurements:
Time: 2025-04-18T13:30:00+00:00, Value: 0.048 kW, Type: Actual, Version: 2, Calculated: False
Time: 2025-04-18T13:45:00+00:00, Value: 0.08 kW, Type: Actual, Version: 2, Calculated: False
Time: 2025-04-18T14:00:00+00:00, Value: 0.08 kW, Type: Actual, Version: 2, Calculated: False

Example 2: Getting monthly aggregated electricity consumption for 2025
Retrieved 4 monthly aggregations
Unit: kWh

Monthly consumption:
Period: 2024-12 to 2025-01, Value: 30.858 kWh, Calculated: False
Period: 2025-01 to 2025-02, Value: 148.985 kWh, Calculated: False
Period: 2025-02 to 2025-03, Value: 44.619 kWh, Calculated: False
Period: 2025-03 to 2025-04, Value: 29.662 kWh, Calculated: False
```
beancount_tb_plugins 0.1.4
A.set of plugins for the Beancount plaintext accounting system
Requires Python: >=3.10

# beancount-tb-plugins
This is a collection of plugins for the beancount accounting software.

## auto_ratio
In the context of a shared (joint) bank account, typically with one's partner, it is often the case that contributions
are not based on an even split. For that reason, expenses from that account should be split based on the ratio of the
contributions, which may change over time based on personal circumstances (e.g. one person getting a salary increase).

This plugin allows to define a ratio for an account, valid in a certain time period, and then automatically adds
metadata to transactions involving that account.

## noduplicates_extended
This builds on the official `noduplicates` plugin to take into account metadata (from a transaction and its postings).
This avoids false positives in the `noduplicates` plugin, by expanding the criteria used to differentiate transactions.

My own use case: a joint account with my partner, which we use to pay for public transport. When going out together,
our bank would generate almost identical transactions (same amount, date and time, payee, etc.), which can only be
distinguished by the metadata (e.g. the card used for the transaction).