semvec/pypi-packages huggingface dataset:
ONVIFCameraControl 1.0.6
Simple camera controls.
Requires Python: >=3.6

# ONVIFCameraControl
Python module for some basic Onvif camera control actions. List of available functions watch in [code](https://github.com/MikhaelMIEM/ONVIFCameraControl/blob/master/ONVIFCameraControl/ONVIFCameraControl.py)
# Installation
```sh
$ python3.7 -m pip install ONVIFCameraControl
```
# Usage
```sh
from ONVIFCameraControl import ONVIFCameraControl
from time import sleep

cam = ONVIFCameraControl(("172.18.200.53", 80), "admin", "password")

ptz_velocity_vector = (1, 1, 1)
cam.move_continuous(ptz_velocity_vector)  
sleep(1)  
cam.stop()
```
sps30 0.1.10
Python3 I2C Driver & Application for SPS30 PM Sensor
Requires Python: >=3.6

# SPS30 PM Sensor I2C Driver for Python3

SPS30 is a Particulate Matter sensor manufactured by Sensirion. It is capable to measure 10 different value of particles. With this driver, you can use SPS30 with Python3 over I2C.

## Dependencies
Only smbus2 other than Python. 

## Installation
```bash
pip3 install sps30
```

## Usage
From command line;
```bash
run-sps30
```
From Python script;
```python
from sps30 import SPS30
from time import sleep

sps = SPS30(1)

if sps.read_article_code() == sps.ARTICLE_CODE_ERROR:
    raise Exception("ARTICLE CODE CRC ERROR!")
else:
    print("ARTICLE CODE: " + str(sps.read_article_code()))

if sps.read_device_serial() == sps.SERIAL_NUMBER_ERROR:
    raise Exception("SERIAL NUMBER CRC ERROR!")
else:
    print("DEVICE SERIAL: " + str(sps.read_device_serial()))

sps.set_auto_cleaning_interval(seconds) # default 604800, set 0 to disable auto-cleaning

sps.device_reset() # device has to be powered-down or reset to check new auto-cleaning interval

if sps.read_auto_cleaning_interval() == sps.AUTO_CLN_INTERVAL_ERROR: # or returns the interval in seconds
    raise Exception("AUTO-CLEANING INTERVAL CRC ERROR!")
else:
    print("AUTO-CLEANING INTERVAL: " + str(sps.read_auto_cleaning_interval()))

sps.start_measurement()

while not sps.read_data_ready_flag():
    print("New Measurement is not available!")
    if sps.read_data_ready_flag() == sps.DATA_READY_FLAG_ERROR:
        raise Exception("DATA-READY FLAG CRC ERROR!")

if sps.read_measured_values() == sps.MEASURED_VALUES_ERROR:
    raise Exception("MEASURED VALUES CRC ERROR!")
else:
    print ("PM1.0 Value in µg/m3: " + str(sps.dict_values['pm1p0']))
    print ("PM2.5 Value in µg/m3: " + str(sps.dict_values['pm2p5']))
    print ("PM4.0 Value in µg/m3: " + str(sps.dict_values['pm4p0']))
    print ("PM10.0 Value in µg/m3: " + str(sps.dict_values['pm10p0']))
    print ("NC0.5 Value in 1/cm3: " + str(sps.dict_values['nc0p5']))    # NC: Number of Concentration 
    print ("NC1.0 Value in 1/cm3: " + str(sps.dict_values['nc1p0']))
    print ("NC2.5 Value in 1/cm3: " + str(sps.dict_values['nc2p5']))
    print ("NC4.0 Value in 1/cm3: " + str(sps.dict_values['nc4p0']))
    print ("NC10.0 Value in 1/cm3: " + str(sps.dict_values['nc10p0']))
    print ("Typical Particle Size in µm: " + str(sps.dict_values['typical']))	

sps.stop_measurement()

sps.start_fan_cleaning() # enables fan-cleaning manually for 10 seconds (referred by datasheet)
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
gxconfig 0.0.2
A Global config tools created by gawainx

# config tool
A tool help you to create config and load in an easy way

## Usage

### Define and Writing Config to toml

In Python Code
```python
from typing import NamedTuple
import gxconfig

class DataConfig(NamedTuple):
    root:str = "/home/gawainx/data"
    chkp:str = "chkp"

class ModelConfig(NamedTuple):
    embd_dim:int = 768
    hidden_dim:int = 5

class Config(NamedTuple):
    dataConfig:DataConfig = DataConfig()
    modelConfig:ModelConfig = ModelConfig()

cfg = Config()
gxconfig.save_toml(cfg, "config.toml")
```

Then you can get a toml
```toml
[DataConfig]
root = "/home/gawainx/data"
chkp = "chkp"

[ModelConfig]
embd_dim = 768
hidden_dim = 5
```

### Load from Toml

```python
import gxconfig
from typing import NamedTuple
class DataConfig(NamedTuple):
    root:str = "/home/gawainx/data"
    chkp:str = "chkp"

class ModelConfig(NamedTuple):
    embd_dim:int = 768
    hidden_dim:int = 5

class Config(NamedTuple):
    dataConfig:DataConfig = DataConfig()
    modelConfig:ModelConfig = ModelConfig()

cfg = gxconfig.load_toml("config.toml", Config)
```
seminario 0.2.0
Python package for seminar organization.

# Seminario

[![version](https://img.shields.io/pypi/v/seminario.svg)](https://test.pypi.org/project/fracdiff/)
[![Build Status](https://travis-ci.org/simaki/seminario.svg?branch=master)](https://travis-ci.com/simaki/fracdiff)
[![LICENSE](https://img.shields.io/github/license/simaki/seminario)](LICENSE)

Python package for seminar organization.

## Installation

```sh
$ pip install seminario
```

## Usage

```sh
$ cd seminar/
$ python main.py
```
graphviz-sql 0.1.8
将tree.export_graphviz构建决策树代码转换为标准sql
Keywords: None

# 将tree.export_graphviz构建决策树代码转换为标准sql
## 1. 工具简介
通常我们会采用`sklearn`框架`tree`模块进行决策树相关的挖掘分析，并使用`tree.export_graphviz`将决策树过程导出为`graphviz.dot`文件
再配合外部程序`graphviz`进行画图。  
但在有些时候，我们会根据决策树图形来抽取关键路径，将其翻译成标准`sql`，部署在数据库当中，持续化产生价值。  
目前`sklearn`暂未提供此功能，故我们开发此插件来进行完善。

## 2. 安装环境、依赖
- 安装方法:支持在线安装或离线安装
    - [download](https://pypi.org/project/graphviz-sql/)  
> pip install graphviz_sql
- 内部依赖
	- sklearn
- 外部依赖
	- [Graphviz](https://graphviz.gitlab.io/download/):找到适合自己版本下载即可



## 3. 一个简单的示例
#### 将`tree.export_graphviz`输出结果转换为标准`sql` 

**`tree.export_graphviz`参数说明**  
为了能够准确的输出决策树规则，方法`tree.export_graphviz`当中一下参数必须设置成以下形式。其余参数使用默认的即可。
- `feature_names`：特征名称，顺序必须和训练样本的数据一致  
- `class_names`：类别名称，输入的时候，必须要排序。如将原来的['1', '0']设置为['0', '1']，注意：数据类型必须为`str`型的。  
- `filled`：填充，必须为`True`  
- `node_ids`：节点id，必须为`True`  
- `rounded`：画的图形边缘是否美化，必须为`True`  
- `special_characters`：必须为`True`

=========================
### eg:
```python
import pandas as pd
import numpy as np
from sklearn import tree
from sklearn import metrics
from sklearn.model_selection import train_test_split
from sklearn.datasets import load_iris
iris = load_iris()
clf = tree.DecisionTreeClassifier()

feature_names = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
data = pd.DataFrame(iris.data, columns=feature_names)
data['target'] = iris.target
X_train, X_test, y_train, y_test = train_test_split(
                   data[feature_names], data['target'], test_size=0.33, random_state=42)
clf = clf.fit(data[feature_names], data['target'])
# tree_rule_2.txt为输出文件的路径
tree.export_graphviz(model,out_file='tree_rule.dot',
                            feature_names=feture_selected_res,
                            class_names=['0', '1'],
                            filled=True,
                            node_ids=True,
                            rounded=True,
                            special_characters=True)


# 调用插件  
from graphviz_sql.extract import to_sql 

# tree_rule.txt: 通过决策树生成的用于graphviz画图的文件路径
# tree_rule_2.sql: 转换后的sql文件路径 
to_sql('tree_rule.dot', 'tree_rule_2.sql')
```
# 4. 代码原理
通过一种反向搜索的方法遍历决策树结果，将结果转换成标准sql
# 5. 常见问题说明
- 乱码
	- 此问题可百度一下，网上有具体的处理办法，
	- 其它问题请及时反馈
    
## 6. 加入进来
强大的工具需要你我共同完善，期待技术大佬的加入。

- email:
> wang_xup@163.com  
> 857956556@qq.com