semvec/pypi-packages huggingface dataset:
neurostats-api 1.2.0rc2
The service of NeuroStats website
Requires Python: >=3.6

# neurostats_API

- [檔案架構](#檔案架構)
- [下載](#下載)
- [使用方法](#使用方法)

## 檔案架構

```
./neurostats_API
├── async_mode
│   ├── db
│   ├── db_extractors
│   │   ├── daily
│   │   ├── month_revenue
│   │   └── seasonal
│   ├── factory
│   └── fetchers
├── config
│   ├── company_list
│   ├── tej_db
│   └── twse
├── fetchers
├── transformers
│   ├── balance_sheet
│   ├── cash_flow
│   ├── daily_chip
│   │   └── utils
│   ├── daily_tech
│   │   └── utils
│   ├── finance_overview
│   ├── month_revenue
│   ├── profit_lose
│   ├── tej
│   └── value
└── utils
```
- `neurostats_API`: 主要的package運行內容
   - `async_mode`: \[新版新增\]以非同步方式進行DB資料的取得以及回傳資料
      - `/db`: 連接到伺服器下的特定db
      - `/db_extractor`: 決定取得db下的哪個collection的檔案，以及取得檔案內容
      ` `/factory`: 使extractor的初始化變得通用
      - `/fetchers`:  開發者將此套件用於其他專案的接口
   - `fetchers`: (舊版)回傳service內容的fetcher檔案夾
   - `transformers`: \[新版新增\] 處理從DB取出的資料，以dictionary的方式回傳需要的資料
   - `config`: 【新舊通用】存放各種設定檔的dictionary，例如公司名單、各項指標對應的計算欄位、每個項目屬於哪份財報等設定
   - `utils`: 【新舊通用】class之間通用的函式，例如讀取檔案、計算成長率函式、轉換格式與進位等

## 下載
```
pip install neurostats-API
```
### 確認下載成功
```Python 
>>> import neurostats_API
>>> print(neurostats_API.__version__)
1.0.3rc1
```

### 下載舊版
```
pip install neurostats-API==0.0.25
```

## 使用方式 (以Balance_Sheet為例)
### Async Mode
```
from neurostats_API.async_mode.fetchers import AsyncBalanceSheetFetcher
from pymongo import AsyncMongoClient

db_client = AsyncMongoClient("<伺服器的MONGO_URI>")
ticker = "2330"

fetcher = AsyncBalanceSheetFetcher(ticker, db_client)

data = await fetcher.query_data()

print(data)
```
詳細各個fetcher的使用法請到[async_mode的fetchers資料夾下觀看](./neurostats_API/async_mode/fetchers/README.md)

### Sync Mode
(#TODO)

> 舊版使用方法請到[fetchers資料夾下觀看](./neurostats_API/fetchers/README.md)
dapytains 0.0.1a5
A brief description of dapytains
Requires Python: >=3.9

MyDapytains
===========

[![Flask Server Tests](https://github.com/distributed-text-services/MyDapytains/actions/workflows/dts-validator.yml/badge.svg)](https://github.com/distributed-text-services/MyDapytains/actions/workflows/dts-validator.yml) [![Test](https://github.com/distributed-text-services/MyDapytains/actions/workflows/test.yml/badge.svg)](https://github.com/distributed-text-services/MyDapytains/actions/workflows/test.yml)

*The name of the library is completely temporary*.

This library offers a base python implementation of the following functionalities:

- Parsing of machine-actionable citeStructure and citeData to retrieve reference, structure and citable unit metadata within a TEI file 
- Reuse of citeStructure architecture to retrieve and build partial documents, based on provided reference.
- Support for multiple citeStructure, similar to the ?tree parameter of the DTS Specifications.

This library will:

- Provide a base implementation of the DTS API, using python as a server-side language
- Provide some light "caching" features, to avoid reparsing document at query time.

## ToDo

- Support XSL transformation with mediaType dictionary for outputting different data
- Add tests to webapp


## WebApp

You can try the webapp using `python -m dapitains.app.app`. It uses test files at the moment.

## Guidelines

### Document level guidelines

1. For TEI document to be accessible in full, no specific requirements are necessary.
2. For TEI document to have a single citation tree, they must provide at least one element 
   at the XPath `/TEI/teiHeader/encodingDesc/refsDecl[@default='true']/citeStructure`.
3. For TEI document to have multiple citation trees, they must provide at least one element 
   at the XPath `/TEI/teiHeader/encodingDesc/refsDecl[@default='true']/citeStructure` and any number of element matching
   the XPath `/TEI/teiHeader/encodingDesc/refsDecl[@n]/citeStructure`, where `@n` holds the citation tree name.

We are currently figuring out the Resource level metadata.

See one of our test files to check out the minimal requirements: we have one 
[with citeData](./tests/tei/test_citeData_two_levels.xml) and one [with multiple trees](./tests/tei/multiple_tree.xml)

### Collection and Resource level guidelines

Collection and Resource level guidelines can be provided through file named dts-metadata.xml in each subfolder of a 
given repository. We are currently looking at using external file that would help you ingest metadata, while leaving you
the option to load up metadata yourself.

The current schema for the collection catalog ingestion is available in [./tests/catalog/schema.rng](./tests/catalog/schema.rng).


## Support

Funded via the CLLG Project.

Ce travail a bénéficié d’une aide de l’État gérée par l’Agence Nationale de la
Recherche au titre de France 2030 portant la référence « ANR-24-RRII- 0002 » et opéré par
le Programme Inria Quadrant.
shangshanAI 0.1.23
一个用于从GitLab下载和处理模型的Python SDK
Requires Python: >=3.6

# ShangshanAI SDK

一个用于下载和处理数据的Python SDK。

## 安装

```bash
pip install shangshanAI
```

## 下载模型

```python
from shangshanAI import snapshot_download
model_dir = snapshot_download('testuser/model_llm')
print(model_dir)
```

## 功能特性

- 支持文件下载
- 自动重试机制
- 进度显示

## 调用大模型

```python
from shangshanAI import ShangshanAI

client = ShangshanAI(api_key="BkdNcaHp6YUxvYsp6PpzMq", path="/v1/chat/completions")  # 请填写您自己的API Key
response = client.chat.completions.create(
    model="shangshan-chat-beta",  # 填写需要调用的模型编码
    messages=[
        {"role": "user", "content": "你好！你叫什么名字"},
    ],
    stream=True,
)
for chunk in response:
    print(chunk.choices[0].delta.content, end="", flush=True)
```

## 许可证

MIT License