semvec/pypi-packages huggingface dataset:
faisslite 0.2.1
创建/查询Faiss向量数据库

# About
一个用于中文文本向量化和相似度搜索的Python包。它可以将中文段落表征为向量矩阵,并构建向量搜索索引,用于快速准确检索文本中的相似句子。

# Install
`$ pip3 install -U faisslite`

# Director 
+ faisslite 
    + document.py
    + DBscan.py
    + Faiss.py
    + grab\_from\_window.py

## document.py
对输入文本进行规范化处理，并将输入文本拆分成段落。
- parse函数
  将文本拆分为由文本段落和分隔符构成的字典数组，为后续向量化处理文本提供了基础。
- stringify函数
  将字典数组表示的文章序列化为文本。

## DBscan.py
对文本进行向量化处理，对向量化后文本聚类。
- DBscan类
  - add\_doc函数
    将完整文档向量化，同时记录各段落和文档的信息，包括偏移、起止、页码等。
  - fit\_predict函数
    向量聚类

## Faiss.py
用DBscan.py处理后的数据建立Faiss索引。实现语义相似句检索。
- Faiss类
  - search\_doc函数
    优先选择完整文档相似度最大的，并且过滤掉低于阈值的结果。

## grab\_from\_window.py
合并多个向量库的检索结果，在指定的窗口内选取返回的文字。

# Usage
将预处理好的文本向量化
```python3
from faisslite.document import parse
from faisslite.DBscan import DBscan

source = "预处理好的文本的唯一ID"
paras = parse("预处理好的文本字符串")

DBscan.save_dir = "向量数据库存放目录"
db = DBscan("向量数据库名字")
db.add_doc(source, {'paras': paras})
db.dump()
```
将向量化后文本聚类
```python3
from faisslite.DBscan import DBscan

DBscan.save_dir = "向量数据库存放目录"
db = DBscan("向量数据库名字")
db.fit_predict()
db.dump()
```
建立向量数据库
```python3
from faisslite.Faiss import Faiss

Faiss.save_dir = "向量数据库存放目录"
db = Faiss("向量数据库名字", exclude=[-1])
```
查询向量数据库，输出查询结果
```python3
from faisslite.Faiss import Faiss

Faiss.save_dir = "向量数据库存放目录"
db = Faiss("向量数据库名字")
results = db.search_doc("与这段文字进行相似匹配")
for result in results:
    source = result['source'] # 预处理好的文本的唯一ID
    score  = result['score']  # 相似度
    texts  = result['texts']  # 匹配的语句

    print(f"{source}: {score}")
    print(texts)

from faisslite.grab_from_window import grab_from_window
from faisslite.document import stringify
import json

with open(Faiss.save_dir+'/index.docs', 'r', encoding='utf-8') as f:
    docs = json.load(f)
results = grab_from_window(docs, results)
for result in results:
    source = result['source'] # 预处理好的文本的唯一ID
    score  = result['score']  # 相似度
    pages  = result['pages']  # 匹配的段落下标

    print(f"{source}: {score}")
    doc = docs[source]
    print(stringify(doc['paras'], pages))
```

# Contact us
<may.xiaoya.zhang@gmail.com>
KrakenPythonMarcosRodrigo 0.1.2
A streamlit tool for rendering kraken data
Requires Python: >=3.11,<4.0

# KrakenPythonMarcosRodrigo

This project serves as an analytical tool designed for examining currency pairs on the Kraken cryptocurrency exchange platform. The application retrieves up-to-date pricing information for a range of currency pairs through the Kraken API, presenting this data in a clear and interactive format. 

Furthermore, it computes key technical analysis indicators, including the stochastic oscillator and its moving average. These features are designed to support and enhance trading decision-making.

This project is developed in Python and leverages a variety of libraries to enhance its functionality. 

It utilizes pandas for data manipulation, plotly for dynamic data visualization, krakenex for seamless interaction with the Kraken API, and streamlit to provide the web application capabilities.

## Project Structure

The main file of our project is `main.py`. It uses functions and classes from other files. For example, `graphs.py` has the `class Graph`, which we use to make candlestick charts and stochastic oscillators. Another important file is `front.py`, which has the `class Front` for the user interface part of our app.

The project also has a `pyproject.toml` file that names all the Python packages required to run the project. The project can be executed in a Docker container. using the provided Dockerfile.

The project also includes a `tests.py` file for testing different parts of the project, using unit-testing and integration-testing. The tests cover (amongst other functionalities) the initialization of the Front and Graph classes, the retrieval of currency pairs from the Kraken API, and the creation of graphs.


## How to Run the Project

To run the project, you need to have Python installed on your machine. 

You can then install the required packages using poetry:

`poetry install`

After installing the required packages, you can run the project using the following command:

`streamlit run main.py`

This will start the Streamlit app and open it in your web browser.

## Documentation

The docs folder contains several files providing more details about the project and its requirements.

## Authors

This project was created by Rodrigo de la Nuez Moraleda and Marcos Castro Cacho.
sphinx-integral-theme 0.0.11
Sphinx Integral theme
Requires Python: >=3.7
Keywords: sphinx,sphinx-doc,theme,thestageai

Usage
=====

New version release
--------------------

To release new version:
1. Update sphinx_integral_theme/__init__.py with new __version__ and __version_info__
2. Run the following command:
.. code-block:: console

   (.venv) $ flit publish