semvec/pypi-packages huggingface dataset:
daisypy-vis 0.3.1
Visualization module for Daisy log files (dlf)
Requires Python: >=3.11

[![pytest](https://github.com/daisy-model/daisypy-vis/actions/workflows/pytest.yml/badge.svg)](https://github.com/daisy-model/daisypy-vis/actions/workflows/pytest.yml)
[![Pylint](https://github.com/daisy-model/daisypy-vis/actions/workflows/pylint.yml/badge.svg)](https://github.com/daisy-model/daisypy-vis/actions/workflows/pylint.yml)
[![codecov](https://codecov.io/gh/daisy-model/daisypy-vis/graph/badge.svg?token=F8625GT0A8)](https://codecov.io/gh/daisy-model/daisypy-vis)

# daisypy-vis
Visualisation library and tools for Daisy model output

See [doc](https://github.com/daisy-model/daisy-vis/tree/main/doc) for examples.

## Installation
The visualization tools are available from pypi

    pip install daisypy-vis

## Development
Checkout repository

    git clone git@github.com:daisy-model/daisypy-vis.git
    cd daisypy-vis

Install package as editable

    pip install -e ".[all]"

### pylint
Use `pyproject.toml` for package-wide settings, e.g. `ignore-trailing-whitespace`.

	pylint daisypy.vis doc


### Tests
See `pyproject.toml`for configuration.

To install test dependencies, use either the `[all]` or the `[test]` target, e.g.

    pip install ".[test]"

To run tests

    pytest


Use pytest-mpl to compare images. Generate baselines images by running

    pytest --mpl-generate-path=test-data/baseline

and inspect the output...

Note that image comparison tests can fail between different version of matplotlib and freetype. You can force test against images generated with a specific version of matplotlib with

    pytest --mpl-baseline-path=test-data/baseline/matplotlib-<matplotlib-version-number>
    
If no baseline images are available for a specific version, you can generate with

    pytest --mpl-generate-path=test-data/baseline/matplotlib-<matplotlib-version-number>
    
and compare manually.


Baseline for animations are generated by running the tests, this will produce a new set of images in `test-data/tmp`. Inspect and move to `test-data/baseline` when happy. In general, text should be removed from to avoid tests failing due to slight variations in font rendering. See for example `render_and_compare_animation` in `daisy_vis/animate/test/test_animate_depth_timeseries.py`


### Coverage
See `pyproject.toml`for configuration. To generate coverage report

    coverage run
    
To inspect coverage report

    coverage report

Tests should as a minimum have 100% code coverage. When applicable, fixed tests should cover boundary conditions and randomized tests should sample the full parameter space.
versioned-classes 0.0.1
A simple library for managing versioning of classes
Requires Python: >=3.7
Keywords: versioning, version, versioner, versioning classes, versioning objects

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
# Versioned Classes
A tool for managing versions of classes in a service.

## Installation
```bash
pip install versioned-classes
```


## Usage

If you have ever worked on an API which has a complex interdependency hierarchy, you might have faced the problem of managing versions of classes. When services grow large and multiple APIs are added, it becomes difficult to manage which versions of classes are being used by which API. Moreover, it can become cumbersome to ensure that all calls to a class are being kept up to date. The aim of this project is to provide a simple way to use the best version of a class in a service.

### Example
```python
from versioned_classes import VersionedClass
from versioned_classes import initial_version


@initial_version("v1")
class MyAPI(VersionedClass):
    pass


@MyAPI.register_version("v2")
class MyAPIV2(MyAPI):
    pass


MyAPI.get_latest_version()  # MyAPIV2

MyAPI.get_latest_version_instance(...)  # MyAPIV2(...)
```
latestearthquake-v1 0.1.0
This package will get the latest earthquake data from BMKG | Badan Meteorologi, Klimatologi, dan Geofisika
Requires Python: >=3.8

# Indonesian-earthquake-monitoring

# Indonesia Latest Earthquake Detection Application
This package will get the latest earthquake data from [ BMKG ](https://bmkg.go.id) |  Badan Meteorologi, Klimatologi, dan Geofisika



## HOW IT WORK ?



> The package will use BeautifulSoup4 and Requests, to produce output in the from of JSON that is ready to be used in web or mobile phone
lastearthquake-bmkg-v1 0.1.0
This package will get the latest earthquake data from BMKG | Badan Meteorologi, Klimatologi, dan Geofisika
Requires Python: >=3.8

# Indonesian-earthquake-monitoring

# Indonesia Latest Earthquake Detection Application
This package will get the latest earthquake data from [ BMKG ](https://bmkg.go.id) |  Badan Meteorologi, Klimatologi, dan Geofisika



## HOW IT WORK ?



> The package will use BeautifulSoup4 and Requests, to produce output in the from of JSON that is ready to be used in web or mobile phone
lastearthquake-bmkg 0.1.0
This package will get the latest earthquake data from BMKG | Badan Meteorologi, Klimatologi, dan Geofisika
Requires Python: >=3.8

# Indonesian-earthquake-monitoring

# Indonesia Latest Earthquake Detection Application
This package will get the latest earthquake data from [ BMKG ](https://bmkg.go.id) |  Badan Meteorologi, Klimatologi, dan Geofisika



## HOW IT WORK ?



> The package will use BeautifulSoup4 and Requests, to produce output in the from of JSON that is ready to be used in web or mobile phone
GPTCostCalculator 1.0.2
Tool for estimating the cost of using different OpenAI API models

# GPT Cost Estimator

This Python package, `GPTCostCalculator`, provides a simple yet effective tool for estimating the cost of using different ChatGPT models. It is designed for anyone using ChatGPT models in their applications and need to estimate the cost of a particular query.
You do NOT need an OpenAI API key to use this package.
This package is available on [pypi](https://pypi.org/project/GPTCostCalculator/)

## Features

- Provides cost estimation for input and output tokens of various ChatGPT models.
- Supports multiple models including GPT-4, GPT-4-32k, GPT-4-1106-preview, GPT-3.5-turbo-1106, and GPT-3.5-turbo-instruct.
- Easy integration with existing Python projects.

## Supported Models

As of the current release, the package supports the following ChatGPT models:

- `gpt-4o`: Input Price - $5, Output Price - $15 per 1M tokens.
- `gpt-3.5-turbo-0125`: Input Price - $0.5, Output Price - $1.5 per 1M tokens.
- `gpt-3.5-turbo-instruct`: Input Price - $1.5, Output Price - $2 per 1M tokens.

## Installation

To install the package, simply run the following command:

```bash
pip install GPTCostCalculator
```

## Usage

Here is a basic example of how to use the package:

```python
from GPTCostCalculator import Calculator

# Initialize the calculator
calculator = Calculator()

# Estimate the cost
report = estimator.cost_estimate(model="gpt-4o", input_text="Your input text here", output_text="Expected output text", info_text = True)
```

`output_text` is not mandatory.

## Dependencies

- `tiktoken`: Used for tokenizing the input and output texts.

## Contributing

Contributions to the `GPTCostCalculator` package are welcome. Please feel free to fork the repository, make your changes, and create a pull request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Contact

For any queries or feedback, please contact [me](mailto:amato.gregoire@gmail.com).

## Disclaimer

Please note that the costs provided by this package are estimates and may vary based on actual usage of ChatGPT models.
python-tusur 0.4.1
A project that allows you to work with tusur.ru via python
Requires Python: >=3.7
Keywords: python python3.7 tusur

# Tusur API
![PyPI](https://img.shields.io/pypi/v/python-tusur?color=orange) ![GitHub Pull Requests](https://img.shields.io/github/issues-pr/Weebp-Team/python-tusur?color=blueviolet) ![License](https://img.shields.io/pypi/l/python-tusur?color=blueviolet) ![Forks](https://img.shields.io/github/forks/Weebp-team/python-tusur?style=social)

Python library for working with site TUSUR

## Installation

```sh
pip install python-tusur 
```

## Usage
How get timetable by group:
```python
from tusur import Timetable

>>> timetable = Timetable()
>>> timetable.get_timetable("571-2", week_id=666)
>>> [
        {
        "day": "Mon, May 22",
        "lessons": [
            {
                "time": "08:50 10:25",
                "discipline": null,
                "view": null,
                "teacher": null
            },
            {
                "time": "10:40 12:15",
                "discipline": null,
                "view": null,
                "teacher": null
            },
        ...
        ]
        }
    ]
```


## Dependencies

- [requests](https://pypi.org/project/requests/)
- [beautifulsoup4](https://pypi.org/project/beautifulsoup4/)

## Contributing

Bug reports and/or pull requests are welcome

## License

[MIT](https://choosealicense.com/licenses/mit/)
last-earthquake 0.1.0
This package will get the latest earthquake data from BMKG | Badan Meteorologi, Klimatologi, dan Geofisika
Requires Python: >=3.8

# Indonesian-earthquake-monitoring

# Indonesia Latest Earthquake Detection Application
This package will get the latest earthquake data from [ BMKG ](https://bmkg.go.id) |  Badan Meteorologi, Klimatologi, dan Geofisika



## HOW IT WORK ?



> The package will use BeautifulSoup4 and Requests, to produce output in the from of JSON that is ready to be used in web or mobile phone
rawabs2rel 1.1.0
Yo Mama

# rawabs2rel

A python script that traverses a whole package turning local absolute imports into relative ones.

The difference between this and abs2rel is that this does NOT ask for consent.

It can reduce substantialy the time needed to convert local absolute imports from a Python package into local relative imports. Additionally, because the conversion is automated, it is less error-prone than having someone make the changes manually.

This command only recognizes local absolute imports which are in the `from ... import ...` format, where the `from` and `import` keywords are on the same line.

This script was originally tested on the [nodezator app](https://github.com/IndiePython/nodezator) at commit [be4c17f](https://github.com/IndiePython/nodezator/commit/be4c17f4c9d09951b48345836fb24de70f5ee90f), managing to convert all 1685 existing absolute local imports across 270 python files into relative imports successfully, without needing any additional manual work.

If you want to try this yourself, just clone nodezator, checkout the mentioned commit and, inside the nodezator/nodezator folder, execute the `rawabs2rel` command. Then, go up one folder level and launch the app with `python -m nodezator` and you'll see that the local relative imports work properly, launching the app without problems.

## Installation

```bash
pip install rawabs2rel
```

## Usage

After installing, just go to your package top-level directory and execute the `rawabs2rel` command. Before actually changing the files, the script presents the number of imports and files that are about to be changed and asks the user to confirm in order to proceed. Remember to make a backup of your package before executing this script, just in case.

## License

rawabs2rel is dedicated to the public domain with [The Unlicense](https://unlicense.org/).
bh-database 0.0.6
Database wrapper classes for SQLAlchemy.
Requires Python: >=3.10
Keywords: SQLAlchemy, database, wrapper

# bh_database

Database wrapper classes for SQLAlchemy.

## Installation

To install for MySQL using the [mysql-connector-python](https://pypi.org/project/mysql-connector-python) driver, use the following command:

```
pip install bh-database[mysql-connector-python]
```

To install for PostgreSQL using the [psycopg2](https://pypi.org/project/psycopg2) driver, 
use the following command::

```
pip install bh-database[psycopg2-binary]
```

## Overview

Database wrapper classes for SQLAlchemy.

These classes currently support only two database types: MySQL and PostgreSQL. Drivers 
required, respectively:

* [https://pypi.org/project/mysql-connector-python](https://pypi.org/project/mysql-connector-python/).
* [https://pypi.org/project/psycopg2/](https://pypi.org/project/psycopg2/).
    
These classes provide the following functionalities:

* Database connection management.

* A custom SQLAlchemy query class which implements paginating.

* A generic base model (table), which should be the **indirect** base model for 
    applications' models. This class encapsulates:
        
    * SQLAlchemy scoped session, thereby providing methods to implement transaction atomicity.

    * A custom base query with paginating ability mentioned above.

    * Fully implemented dunder methods str() and repr().

* A generic SQLAlchemy declarative base class which should include all required metaclasses.

* Some generic methods which run full text SQL statements.

* A generic method to run stored procedures which return data.

* A generic method which takes a list of records to be inserted, and records to be
    updated, and writes them to the target database table in a single call.

* Transaction atomicity. Multiple database operations involving several different
    tables can be wrapped under a single transaction, so that all can be committed
    or rolled back as appropriate. 

Please see [Full documentation](https://bh-database.readthedocs.io/) for more detail.

## Documentation

[Full documentation](https://bh-database.readthedocs.io/)

## License

[ MIT license ](http://www.opensource.org/licenses/mit-license.php)
hylight 1.0.0
Hylight is post-processing package for luminescence related ab initio computations.
Keywords: chemistry, computational chemistry

# The Hylight Package

## About

Welcome to Hylight's code repository!

Hylight is a post-processing tool written in Python to simulate the
luminescence of solids based on the results of *ab initio* computations.

You may be interested in reading our first paper using it:
[Modeling Luminescence Spectrum of BaZrO3:Ti Including Vibronic Coupling from First Principles Calculations][1].

## Installation

Hylight is published on PyPI. You can install it with `pip`

For a **minimal** installation (maybe you want to use some of the features on a cluster) use `pip install hylight`.
For you own workstation, we recommend that you enable **all optional features**: `pip install hylight[hdf5,plotting,phonopy]`.

## Usage

To learn how to use Hylight, you can read [documentation and tutorial](https://pydef.github.io/hylight) (or the [PDF version](./public/latex/hylight.pdf))

## Attribution

### License

Hylight is written and maintained by the PyDEF team.
The source code for Hylight is distributed under the EUPL_ license.
This is a non viral copyleft license, to be compared to MPL.
However, unlike the MPL, it is available in all official languages of the EU,
including authors own language, french.

See [LICENSE](https://github.com/PyDEF/hylight/blob/main/LICENSE)

### Citing Hylight

If you ever use Hylight for a published scientific work, we ask that you cite the related paper:
[Simulation of luminescence spectra in solids: Hylight, an easy-to-use post-processing software][2].

[1]: https://www.doi.org/10.1021/acs.jctc.2c00949
[2]: coming soon
Galileo-Flow-SDK 0.0.2
Reading a flow rate from Galileo Flow Sensor

        https://microfluidics-innovation-center.com/instruments/wide-range-microfluidic-flow-sensor-with-clogging-detection/
        
        
        Example 1. Reading a flow rate
        
        First, insert the cartridge to the Base and power on the sensor using type-C USB connector. Make sure that all three flgas on the screen is green.
        
        Next, check the COMPORT number of the sensor. In Windows, you can open the Device Manager and find the COMPORT under Com Ports:
        
        
        Finally,
        
        you can write the following line to read the flow rate:
        
        '''
        import 
        galileo_sensor = GalileoFlowSDK("COM18")
        
        while(1):
            time.sleep(1)
            print('flow is ' , galileo_sensor.read_flow())
        '''
        
Keywords: python,galileo
Platform: UNKNOWN
Description-Content-Type: text/markdown
rootshell_platform_api 0.2.0
A Package to interact with Rootshells Public API
Requires Python: <4.0,>=3.8


A project to access Rootshell's Public API. 

`pip install rootshell_platform_api`

The `BEARER_TOKEN` can be accessed in the Platform. 
The `API_ENDPOINT` is the tenant url which you want access the data.
```shell
export BEARER_TOKEN=your_token_here
export API_ENDPOINT=https://your.api.endpoint
```

Currently list of groups that are accessible

```text

asset_groups_assets
    get-paginated
    update
    
asset_groups
    get-paginated
    get-single
    create
    update
    delete
 
asset_tags
    get-paginated
    update
    delete
    
assets 
    get-paginated
    get-single
    create
    update
    delete

companies
    get-paginated
    get_single

issue_comments
    get-paginated    
    create
    delete
    
 issues
    get-paginated
 
merge_settings
    get-paginated
    get-single
 
phase_host_issues
    get-paginated
    get-single
    create
    update
    delete

phase-hosts
    get-paginated
    get-single
    create
    update
    delete
 
phase_issues
    get-paginated
    get-single
    create
    update
    delete

phase_tags
    get-paginated
    delete
    update
     
phase_testers
    get-paginated
    update
    delete
    
phases 
    get-paginated
    get-single
    create
    update
    delete
    
projects
    get-paginated
    get-single
    create
    update
    delete
    
project_statuses
    get-paginated
    
project_remediation_types
    get-paginated
    
project_service_types
    get-paginated
    
project_statuses
    get-paginated
    
project-tags
    get-paginated
    update
    delete
    
tags
    get-paginated
    get-single
    create
    update
    delete
    
test_types
    get-paginated
    
users
    get-paginated
    

```
Example:
```shell
rootshell_platform tags get_paginated
```
apicloudru 0.1.3
api-cloud.ru python wrapper
Requires Python: >=3.9
Keywords: api-cloud.ru, api, wrapper, pydantic

# api-cloud.ru Python 3 wrapper
### methods roadmap
- [partial done] LK
- ✓ FSSP 
- ✘ RSA
- ✘ EAISTO
- ✘ ZALOG
- ✘ NALOG
- ✘ MVD
- ✘ SFRI
- ✘ BANKROT
- ✘ ROSREESTR
- ✘ FEDSFM
- ✘ RAS_ARBITR
- ✘ KAD_ARBITR
- ✘ INOAGENT
markovianbandit-pkg 0.4
Library to compute Gittins and Whittle index for Markovian Bandits
Requires Python: >=3.6

# Markovian Bandits

This repository contains a python library to compute whittle indices or test indexability of finite-state Markovian bandit problems.

## Installation

To install, just run:
```
pip install markovianbandit-pkg
```

## Example

To test with a few randomly generated examples:
```
import markovianbandit as bandit
model = bandit.random_restless(dim=4, seed=42)
print(model.whittle_indices()) # should print array([ 0.87536099, -0.08765819, -0.15279431, -0.51905682])
print(model.get_P0P1R0R1())
model = bandit.random_restless(4, seed=2791)
print(model.is_indexable()) # should print False

model = bandit.random_rested(dim=4)
print(model.gittins_indices(discount=.8)) # computes gittins index
```

To compute the Whittle or Gittins index from P0 and P1:
```
P0 = [[.5, .5], [.25, .75]]
P1 = [[1, 0], [0.5, 0.5]]
R0 = [0.5, 0.5]
R1 = [2, 1]
model = bandit.restless_bandit_from_P0P1_R0R1(P0, P1, R0, R1)
print(model.whittle_indices())

model = bandit.rested_bandit_from_P1_R1(P1, R1)
print(model.gittins_indices(discount=0.5))
```

Note that the algorithm complexity to compute Whittle index is $O(n^3)$. It can compute indices of bandits in less than one seconds to bandits of up to $1000$ states (i.e. $1000\times 1000$ matrices). The loop below should take less than one second.
```
import time
for dim in [10, 100, 1000]:
    ts = time.time()
    model = bandit.random_restless(dim=dim, seed=42)
    model.whittle_indices()
    print("Model of size", dim, "computed in", time.time() - ts, "seconds")
```

## Authors

Nicolas Gast and Kimang Khun. 

## History version

- 0.4 (July 0, 2024):
  - fixed implementation in find_mu_min() (fix a bug triggered when some indices where equal)

- 0.3 (July 10, 2023): 
  - handle multichain case by testing when matrix inversion fails
  - correct treatment of possibly infinite indices
  - correction of a bug when dividing by 0.
  - addition of an absolute tolerance to be more robust

- 0.2 (Nov 21, 2022)
  - simplification of how the discount is treated
  - function to avoid recomputation of indices
  - new indexability test

- 0.1 (Jan 11, 2021)
  - Many small optimization (code about 50% faster)

- 0.0.5 (Nov 19, 2021). First public release.
## Reference

"Testing Indexability and Computing Whittle and Gittins Index in Subcubic Time" by Nicolas Gast, Kimang Khun and Bruno Gaujal.
https://arxiv.org/abs/2203.05207
dimon-cli 0.1.0
dimensional monitoring cli

# dimon: Your Canonical Answer Management Tool
dimon is a command-line interface (CLI) tool for evaluating and managing golden dataset for evaluation your retrival mechnism.

## Installation
You can install dimon directly from PyPI:

```
pip install dimon
```

## Prepare env file

Create a file named `.env`, or copy it from `.env.example`.
This file should contain the default configuration values for dimon. Here is an example of what the `.env` file might look like:

```
DATABASE_URL=http://localhost:9200
DATABASE_INDEX=your_index
USERNAME=elastic
PASSWORD=your_password_here
DATASET_PATH=/path/to/your/dataset
```

Replace the values with the actual ones.

Note: Currently, the script only supports ElasticSearch as the vector database. Ensure that your ElasticSearch instance is correctly set up and accessible via the URL provided in the DATABASE_URL parameter. The DATABASE_INDEX should point to the specific index within ElasticSearch that you want to use for storing and querying vectors.


## The CLI tool provides three main commands:

### evaluate
This command evaluates a specified model on a given dataset. It computes embeddings for each document in the corpus, retrieves the top-k most similar documents for each query, and calculates the Mean Reciprocal Rank (MRR) for evaluation.

```
dimon evaluate --database_url 'http://localhost:9200' --dataset 'golden_dataset.csv'
```

### diff
This command reads a report file, filters out entries with MRR below a certain threshold

```
dimon diff --file_name 'mrr_report.csv' --threshold 0.2
```

### merge
This command reads a report file, filters out entries marked as 'Accept', and simulates a merging process.

```
dimon merge --report_name 'to_confirmed_change.csv'
```