semvec/pypi-packages huggingface dataset:
scisonify 1.0.0
Turn Scientific Data into Sounds & Music
Requires Python: >=3.9

<img src="https://raw.githubusercontent.com/philipc2/sci-sonify/46e55b0a794753375dd0c0f8acf5f2ed7901210a/docs/source/_static/logo.svg" width="400"/><br>

-----------------

[![Documentation Status](https://readthedocs.org/projects/sci-sonify/badge/?version=latest)](https://sci-sonify.readthedocs.io/en/latest/?badge=latest)


# Turning Scientific Data into Sounds & Music

## What is it?

Sci-Sonify is a Python package that enables simple and straightforward data sonification (a.k.a. representing data as sounds). It converts data stored using common packages in the Scientific Python Ecosystem such as Numpy, Pandas, and Xarray as musical notes.

## Soundmaps
Instead of using colors (i.e. colormaps) for visualuzing data, Sci-Sonify introduces the concept of "soundmaps", which allow for mapping quantitative data to a range of musical notes.

## Accessors
In addition to providing standalone functionality for working with lists and arrays, Sci-Sonify introduces accessors into commonly used packages in the Scientific Python Ecosystem.

### Xarray
Sonification through a `xr.DataArray`
```Python
import xarray as xr
import scisonify.xarray

da = xr.DataArray([1, 2, 3])

da.sonify()
```

### Pandas
Sonification through a `pd.Series`
```Python
import pandas as pd
import scisonify.pandas

s = pd.Series([1, 2, 3])

s.sonify()
```

## Installation
civitai 1.0.0
A python wrapper for the civitai.com API
Requires Python: >=3.8

# Civitai.com API Package

This is a small wrapper of the [civitai.com API](https://github.com/civitai/civitai/wiki/REST-API-Reference)

## Usage Creators

```python
from civitai import creators

result = creators.get(query="Lykon")
N = result.totalItems
creator = result.items[0]
creator.username   # Lykon
creator.modelCount # 212
```

## Usage Images

```python
from civitai import images

# https://civitai.com/posts/442123
result = images.get(postId=442123)
image = result.items[0]
image.url
image.likeCount
image.dislikeCount
```

## Usage Models

```python
from civitai import models

# https://civitai.com/models/4384/dreamshaper?modelVersionId=128713
model = models.get_model(modelId=4384)
modelVersion = models.get_by_modelVersion(modelVersionId=128713)
model.name                # DreamShaper
modelVersion.name         # 8
```

## Usage Tags

```python
from civitai import tags

result = tags.get(query="realism")
tag = result.items[0]
result.totalItems # 4
tag.modelCount    # 383
```
cro3n 0.0.4
Another one **cron expression** utils package for python
Requires Python: >=3.7

```
 ██████╗ ██████╗   ██████╗3 ███╗   ██╗
██╔════╝ ██╔══██╗ ██╔═══██╗ ████╗  ██║
██║      ██████╔╝ ██║   ██║ ██╔██╗ ██║
██║      ██╔══██╗ ██║   ██║ ██║╚██╗██║
╚██████╗ ██║  ██║ ╚██████╔╝ ██║ ╚████║
 ╚═════╝ ╚═╝  ╚═╝  ╚═════╝  ╚═╝  ╚═══╝
```

[![Release](https://github.com/StrayDragon/cro3n/actions/workflows/release.yml/badge.svg)](https://github.com/StrayDragon/cro3n/actions/workflows/release.yml)
[![GitHub last commit](https://img.shields.io/github/last-commit/straydragon/cro3n)](https://github.com/StrayDragon/cro3n/commits)
[![PyPI](https://img.shields.io/pypi/v/cro3n)](https://pypi.org/project/cro3n)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cro3n)](https://pypi.org/project/cro3n)
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/cro3n)](https://pypi.org/project/cro3n)
[![GitHub](https://img.shields.io/github/license/straydragon/cro3n)](https://github.com/StrayDragon/cro3n/blob/main/LICENSE)

---

Another one **cron expression** utils package for python, wrapped on rust crate [zslayton/cron](https://github.com/zslayton/cron).

## Installation
```bash
pip install -U cro3n
```

## Example
see [example/python](./example/python)

## Dev
you need config:
- rust
- python 3.7+
- pyo3 tools
more details see https://pyo3.rs/v0.20.0/

## Related Projects

- [zslayton/cron](https://github.com/zslayton/cron)
- [PyO3/maturin](https://github.com/PyO3/maturin)
- [PyO3/pyo3](https://github.com/PyO3/pyo3)

## LICENSE
[MIT](./LICENSE)
berttextclassification 0.1.2
训练/使用Bert分类模型

# About
一个用于训练和调用bert模型完成数据分类的python包。

# Install
`$ pip3 install -U berttextclassification`

# Director 
+ bert
    + bert\_lawlaw.py 
    + DataLawlaw.py
    + train.py
    + evaluate.py
    + acc\_and\_f1.py
    + BertModel.py
    + predict.py

## bert\_lawlaw.py
main程序完成训练到评估，默认是只评估不进行训练。

## DataLawlaw.py
定义了一个LawlawProcessor类，封装了一个，完成分类任务中数据相关的操作。
- LawlawProcessor类
  - get\_labels函数
    五个设定好的分类标签
  - load\_train\_examples函数
    加载json格式的训练数据
  - load\_dev\_examples函数
    加载json格式的评估数据

## train.py
对模型进行训练，并保存训练数据。
- train函数
  根据设置的batch\_size和epoch进行训练。将lr和loss写到tensorboard中，根据save\_steps保存不同checkpoint的模型。

## evaluate.py
对验证集进行评估，得到训练结果。
- evaluate函数
  对选择的model进行评估，并给出acc\_and\_f1函数返回的三项分值参数。

## acc\_and\_f1.py
计算bert模型预测后的分值。
- acc\_and\_f1函数
  计算模型预测标签的三项分值参数acc，f1\_score和acc\_and\_f1二者的平均值。

## BertModel.py
对Bert模型的相关操作，包括设置种子、加载模型和保存模型。
- set\_seed函数
  设置种子数值。
- load\_model函数
  从output\_dir加载model和tokenizer
- save\_model函数
  将model和tokenizer保存到output\_dir

## predict.py
对输入的文本进行分类预测。
- predict函数
  使用加载的模型，对输入文本进行分类。

# Usage
对模型进行训练，并保存模型
```python3
from BertModel import set_seed, init_model, load_model, save_model
from DataLawlaw import LawlawProcessor
from train import train

set_seed()
task = 'lawlaw'
processor = LawlawProcessor(task)
label_list = processor.get_labels()
model, tokenizer = init_model(task, len(label_list))
train_dataset = processor.load_train_examples(tokenizer, max_seq_length=128)
global_step, tr_loss = train(
    model,
    train_dataset,
    train_batch_size=8,
    num_train_epochs=5.0,
    save_steps=1000,
    output_dir='./outs'
)
save_model(model, tokenizer, output_dir='./outs')
```
对模型进行测试
```python3
from BertModel import set_seed, init_model, load_model, save_model
from DataLawlaw import LawlawProcessor
from evaluate import evaluate

set_seed()
task = 'lawlaw'
processor = LawlawProcessor(task)
model, tokenizer = load_model(output_dir='./outs')
eval_dataset = processor.load_dev_examples(tokenizer, max_seq_length=128)
result = evaluate(
    model,
    eval_dataset,
    eval_batch_size=16,
    output_dir='./outs'
)
print(result)
```

# Contact us
<may.xiaoya.zhang@gmail.com>