semvec/pypi-packages huggingface dataset:
opensesame-sdk 0.2.7
A custom OpenAI client with OpenSesame integration
Requires Python: >=3.7

# OpenSesame OpenAI

OpenSesame OpenAI is a custom OpenAI client that integrates with the OpenSesame service for evaluating AI responses.

## Installation

You can install the OpenSesame OpenAI package using pip:

```
pip install opensesame-openai
```

## Usage

Here's a quick example of how to use the OpenSesame OpenAI client:

```python
from opensesame_openai import OpenSesame

client = OpenSesame(
    api_key="your-openai-api-key",
    open_sesame_key="your-opensesame-key",
    project_name="your-project-name",
    ground_truth="",
    context=""
)

response = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[
        {"role": "user", "content": "Hello, how are you?"}
    ]
)

print(response.choices[0].message.content)
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.# OpenSesamePythonSDK
farsi-wordcloud 0.1.0
A package to generate Farsi word clouds with proper text rendering.
Requires Python: >=3.6

# FarsiWordCloud README

## Overview

The `FarsiWordCloud` class is a specialized extension of the `Fonts` class designed to generate word clouds in Farsi (Persian) text. It handles text reshaping and bidirectional text rendering to ensure that Farsi text is correctly displayed in the word cloud.

## Installation

To use the `FarsiWordCloud` class, you need to have the following libraries installed:

- `matplotlib`
- `wordcloud`
- `arabic_reshaper`
- `bidi`

You can install these libraries using pip:

```bash
pip install matplotlib wordcloud arabic-reshaper python-bidi
```

## Usage

Here is an example of how to use the `FarsiWordCloud` class:

```python
from FarsiWordCloud import FarsiWordCloud

# Sample text in Farsi
text = "سلام  این یک تست برای ایجاد واژه‌ابری است."

# Create an instance of FarsiWordCloud
wordcloud = FarsiWordCloud(
    text=text,
    font_name="BYekan",  # Specify the font name from the available fonts
    width=800,
    height=400,
    background_color='white',
    max_font_size=250,
    min_font_size=10
)

# Generate the word cloud
wordcloud.generate_wordcloud()

# Display the word cloud
wordcloud.show_wordcloud()

# Save the word cloud to a file
wordcloud.save_wordcloud(filename='farsi_wordcloud.png')
```

## Methods



- **text**: The Farsi text to be used for generating the word cloud.
- **font_name**: The name of the font to be used. This should be one of the fonts listed in the `info.json` file.
- **width**: The width of the word cloud image (in pixels).
- **height**: The height of the word cloud image (in pixels).
- **background_color**: The background color of the word cloud.
- **max_font_size**: The maximum font size for the words in the word cloud.
- **min_font_size**: The minimum font size for the words in the word cloud.

### `reshape_text(self)`

Reshapes and reorders the Farsi text to ensure correct display. This method uses the `arabic_reshaper` library to reshape the text and the `bidi` library to handle bidirectional text.

### `generate_wordcloud(self)`

Generates the word cloud from the reshaped text. This method creates a `WordCloud` object with the specified parameters and generates the word cloud image.

### `show_wordcloud(self)`

Displays the generated word cloud using `matplotlib`. If the word cloud has not been generated yet, this method will call `generate_wordcloud()` first.

### `save_wordcloud(self, filename='wordcloud.png')`

Saves the generated word cloud to a file. The default filename is `wordcloud.png`, but you can specify a different filename if desired.

## Fonts

The `FarsiWordCloud` class relies on a set of fonts specified in the `fonts/info.json` file. Ensure that the font files listed in this file are available in the `fonts/files/` directory.

## License

This project is licensed under the MIT License. See the LICENSE file for details.
debugmate 0.0.1
Debugmate client package
Requires Python: >=3.8

# Debugmate Integration for Django

This guide explains how to integrate `debugmate-python` into your Django application to capture logs and exceptions.

## Installation

To install the `debugmate-python` package, run the following command:

```bash
pip install -i https://pypi.org/simple/ debugmate
```

# Configuration in settings.py

Follow the steps below to configure the logger and middleware in your settings.py file.

# 1. Logger Configuration

Add the following logging configurations to your settings.py file to capture errors and send them to the Debugmate service.

```bash
import os

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'root': {
        'level': 'ERROR',
        'handlers': ['debugmate'],
    },
    'handlers': {
        'debugmate': {
            'level': 'INFO',
            'class': 'debugmate.handlers.debugmate_handler.DebugmateHandler',
        },
    }
}

DEBUGMATE_TOKEN = os.getenv('DEBUGMATE_TOKEN', '')
DEBUGMATE_DOMAIN = os.getenv('DEBUGMATE_DOMAIN', '')
```

# 2. Add the Middleware
In your settings.py, add the DebugmateMiddleware to the list of middlewares.

```bash
MIDDLEWARE = [
    'debugmate.django.middleware.DebugmateMiddleware',
    # Other middlewares...
]
```
# 3. Running the Application

With the above configuration, Debugmate integration is ready. Your Django application will now send logs and exceptions to the Debugmate service.
slo-yaml-generator 0.0.9
Generate OpenSLO and Nobl9 yaml configuration
Requires Python: >=3.6

# slo-yaml-generator

:bangbang: This project is under development and subject to change. :bangbang:

Quickly generate [OpenSLO](https://github.com/OpenSLO/OpenSLO) and
[Nobl9](https://docs.nobl9.com/yaml-guide) yaml so I can stop going and looking
at the doc.

## Usage

1. Install using pip
    ```
    pip install slo_yaml_generator
    ```

The script takes a json file containing the fields needed for each template.

Files are currently sent to the ./output/ directory. I plan to add an option to
configure this soon.

Example:

```bash
slo_yaml_generator --resource_type slo --config_file "example-configs/cloudwatch-slo.json"
```

## Config Files

### SLO

```json
{
  "resource_name": "My Demo SLO",
  "service_name": "Service Name",
  "project_name": "Project Name",
  "sli_name": "test indicator",
  "metric_source": "Dynatrace",
  "operation": "lt",
  "value": "100",
  "target": ".99",
  "duration": "28d",
  "is_rolling": "True",
  "budgeting_method": "Occurrences"
}
```

For metric_source Cloudwatch please include these fields:

```json
{
  "region": "us-east-1",
  "aws_service": "AWS/Lambda",
  "metric_name": "Errors",
  "statistic": "Sum"
}
```

For metric_source Dynatrace please include these fields:

```json
{
  "query": "dynatrace query"
}
```

## Service

```json
{
  "resource_name": "This is a test service",
  "project_name": "Jack's Project",
  "description": "This is a test description for Jack's little tool for SLO consulting"
}
```

## Project (Nobl9 format only)

```json
{
  "resource_name": "This is a test project",
  "description": "This is a test description for Jack's little tool for SLO consulting"
}
```
cam-ilt 0.1.0
A Python package for the inversion of magnetic resonance datasets
Requires Python: >=3.9

# cam_ilt

The cam_ilt package bundles a subset of my PhD work at the university of Cambridge. It mostly concerns the inverse problems commonly enquired in the case of magnetic resonance (MR) correlation or exchange experiments. However, the package also includes an option for custom kernels, hence the package could also be used for non-MR related inverse problems. 

In its current form, it covers different regularization methods including L1, L2 and MTGV to tackle the inverse problems of interest. The package also comes with fully automated methods for regularization/hyperparameter parameter optimization employing generalized cross-validation (GCV), the Butler-Reeds-Dawson method (BRD), the balancing principle or a combination of them. 

For a more detailed documentation/package tutorial, check out the cam_ilt git repo at https://github.com/jbbb2/cam_ilt

If you make use of the package please cite the following references: 
https://doi.org/10.48550/arXiv.2311.11442
https://doi.org/10.17863/CAM.104179

If you have questions, ideas to expand/improve the package or you want to report a bug, please reach out to me via jbbb2@cantab.ac.uk
more-polars-utils 0.1.1
Utility functions for polars
Requires Python: <4.0,>=3.8

# more-polars-utils

Utility functions for [polars](https://pola.rs/)

This library expands the [polars.DataFrame](https://docs.pola.rs/api/python/stable/reference/dataframe/index.html) with utility functions for common data engineering operations. This collection of generic utility functions aims to improve the readability and maintainability of Polars-based projects.

## Installation

```bash
pip install more-polars-utils
```