semvec/pypi-packages huggingface dataset:
openai-request-tracker 0.1.1
OpenAI cost tracker that logs OpenAI requests using opentelemetry
Requires Python: <4.0,>=3.11

# openai-cost-tracker

[![PyPI version](https://badge.fury.io/py/openai-request-tracker.svg)](https://badge.fury.io/py/openai-request-tracker)
[![Build Status](https://github.com/sebastianschramm/openai-cost-tracker/actions/workflows/python-publish.yml/badge.svg)](https://github.com/sebastianschramm/openai-cost-tracker/actions)
[![GitHub](https://img.shields.io/badge/source-GitHub-blue)](https://github.com/sebastianschramm/openai-cost-tracker)

Cost tracker that logs OpenAI requests using opentelemetry. Once enabled, it will log every request that
is being made via the openai python client to a file in the execution directory. The log file is
called "traces_<\datetime>.log".

## Installation

### Install from PYPI

```bash
pip install openai-request-tracker
```

Please note the difference between pypi package name and github repository name.

### Install from source

Install with poetry:

```bash
poetry install
```

or install with pip:

```bash
pip install .
```

## Usage

### Record requests

#### CLI wrapper

The command **track-costs** is a wrapper that initializes the tracker and then runs the given CLI command.

```bash
track-costs <your usual command>
```

For example, if your are running usually an indexing run with [microsoft/graphRAG](https://github.com/microsoft/graphrag)
with

```bash
python -m graphrag.index --root foo
```

you only need to change it to

```bash
track-costs graphrag.index --root foo
```

to record all openai requests in a log file.

Similarly, for calling the graphrag query module you can do

```bash
track-costs graphrag.query --root foo --method local "My query"
```

#### In code usage

You can just add a call to cost_tracker.init_tracker() at the very beginning of your script:

```python

from cost_tracker import init_tracker

init_tracker()

... # your script

```

For example, to make it work for the indexing phase of [microsoft/graphRAG](https://github.com/microsoft/graphrag), modify the file [main.py](https://github.com/microsoft/graphrag/blob/main/graphrag/index/__main__.py) such that it looks like:

```python
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""The Indexing Engine package root."""
from cost_tracker import init_tracker

init_tracker()

import argparse

from graphrag.logging import ReporterType
from graphrag.utils.cli import dir_exist, file_exist

from .cli import index_cli
from .emit.types import TableEmitterType


if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        prog="python -m graphrag.index",
        description="The graphrag indexing engine",
    )

... # rest of the unmodified script

```

Run your script as before.

### Show costs

The script "display-costs" can be used to show the openai costs for all requests recorded in a given log file:

```bash
display-costs --file <YOUR_LOG_FILE>
```
train-dit 0.1.0
A package to occupy GPU resources by performing matrix multiplications.
Requires Python: >=3.6

# Train Dit

`train_dit` is a Python package designed to occupy GPU resources by performing matrix multiplication on specified GPUs to keep them active.

## Usage

You can specify the number of GPUs, the size of the matrix, and the interval time between each operation through command line arguments. For example:

```bash
python train_dit.py --size 38000 --gpus 4,5,6,7 --interval 0.01
```

In this example, the script will perform matrix multiplication on GPUs 4, 5, 6, and 7, with a matrix size of 38000x38000, and an interval of 0.01 seconds between each operation.

## Parameters

- `--gpus`: IDs of GPUs used for matrix multiplication, separated by commas. Default value is `'0,1,2,3,4,5,6,7'`.
- `--size`: Size of the matrix. This parameter is required.
- `--interval`: Interval time between each operation, in seconds. This parameter is required.

## Note

Make sure you have PyTorch installed on your machine and CUDA support. Additionally, the GPU IDs you specify must be valid; otherwise, the script will not run properly.

**Author**

[Yiming Shi](https://academic.shiym.top)

**Contact**: [yimingshi666@gmail.com](mailto:yimingshi666@gmail.com)

**GitHub**: [https://github.com/SKDDJ/train_dit](https://github.com/SKDDJ/train_dit)
perovskite 0.0.3
This is one tool to generator perovskite structures for calculation, such as First-principles calculations.
Requires Python: >=3.6
Keywords: perovskite, structure


[![Python Versions](https://img.shields.io/pypi/pyversions/perovskite.svg)](https://pypi.org/project/perovskite/)
![pypi Versions](https://badge.fury.io/py/perovskite.svg)

Perovskite
----------------------
Welcome to Perovskite.

This is one tool to generator perovskite structures for calculation, such as First-principles calculations.

Quick Install
----------------------

```bash
pip install perovskite
```

License
----------------------
BSD-3-Clause License

Contact
----------------------
Developer: Boliqq07: 986798607@qq.com