semvec/pypi-packages huggingface dataset:
xalpha 0.12.3
all about fund investment

# xalpha

[![version](https://img.shields.io/pypi/v/xalpha.svg)](https://pypi.org/project/xalpha/)
[![doc](https://readthedocs.org/projects/xalpha/badge/?style=flat)](https://xalpha.readthedocs.io/)
[![codecov](https://codecov.io/gh/refraction-ray/xalpha/branch/master/graph/badge.svg)](https://codecov.io/gh/refraction-ray/xalpha)
[![license](https://img.shields.io/:license-mit-blue.svg)](https://badges.mit-license.org/)

**基金投资的全流程管理**

场外基金的信息与净值获取，精确到分的投资账户记录整合分析与丰富可视化，简单的策略回测以及根据预设策略的定时投资提醒。尤其适合资金反复进出的定投型和网格型投资的概览与管理分析。

🎉 0.3 版本起支持通用日线和实时数据获取器，统一接口一行可以获得几乎任何市场上存在产品的价格数据，进行分析。

🍭 0.9 版本起支持持仓基金组合的底层持仓配置和股票细节透视，掌握底层持仓和跟踪机构股票池与买卖特点，从未如此简单。

一行拿到基金信息：

```python
nfyy = xa.fundinfo("501018")
```

一行根据账单进行基金组合全模拟，和实盘完全相符:

```python
jiaoyidan = xa.record(path) # 额外一行先读入 path 处的 csv 账单
shipan = xa.mul(status=jiaoyidan) # Let's rock
shipan.summary() # 看所有基金总结效果
shipan.get_stock_holdings() # 查看底层等效股票持仓
```

一行获取各种金融产品的历史日线数据或实时数据

```python
xa.get_daily("SH518880") # 沪深市场历史数据
xa.get_daily("USD/CNY") # 人民币中间价历史数据
xa.get_rt("commodities/crude-oil") # 原油期货实时数据
xa.get_rt("HK00700", double_check=True) # 双重验证高稳定性支持的实时数据
```

一行拿到指数，行业，基金和个股的历史估值和即时估值分析（指数部分需要聚宽数据，本地试用申请或直接在聚宽云平台运行）

```python
xa.PEBHistory("SH000990").summary()
xa.PEBHistory("F100032").v()
```

一行定价可转债

```python
xa.CBCalculator("SH113577").analyse()
```

一行估算基金净值 (QDII 基金需自己提供持仓字典)

```python
xa.QDIIPredict("SH501018", positions=True).get_t0_rate()
```

xalpha 不止如此，更多特性，欢迎探索。不只是数据，更是工具！

## 文档

在线文档地址： https://xalpha.readthedocs.io/

或者通过以下命令，在本地`doc/build/html`内阅读文档。

```bash
$ cd doc
$ make html
```

## 安装

```bash
pip install xalpha
```

目前仅支持 python 3 。

若想要尝试最新版，

```bash
$ git clone https://github.com/refraction-ray/xalpha.git
$ cd xalpha && pip3 install .
```

## 用法

### 本地使用

由于丰富的可视化支持，建议配合 Jupyter Notebook 使用。可以参照[这里](https://xalpha.readthedocs.io/en/latest/demo.html)给出的示例连接，快速掌握大部分功能。

部分效果如下：

<img src="doc/source/kline.png" width="90%">

<img src="doc/source/tradecost.png" width="90%">

<img src="doc/source/positions.png" width="80%">

### 在量化平台使用

这里以聚宽为例，打开聚宽研究环境的 jupyter notebook，运行以下命令：

```
>>> !pip3 install xalpha --user
>>> import sys
>>> sys.path.insert(0, "/home/jquser/.local/lib/python3.6/site-packages")
>>> import xalpha as xa
```

即可在量化云平台正常使用 xalpha，并和云平台提供数据无缝结合。

如果想在云平台研究环境尝试最新开发版 xalpha，所需配置如下。

```
>>> !git clone https://github.com/refraction-ray/xalpha.git
>>> !cd xalpha && python3 setup.py develop --user
>>> import sys
>>> sys.path.insert(0, "/home/jquser/.local/lib/python3.6/site-packages")
>>> import xalpha as xa
```

由于 xalpha 整合了部分聚宽数据源的 API，在云端直接 `xa.provider.set_jq_data(debug=True)` 即可激活聚宽数据源。

## 致谢

感谢[集思录](https://www.jisilu.cn)对本项目的支持和赞助，可以在[这里](https://www.jisilu.cn/data/qdii/#qdiie)查看基于 xalpha 引擎构建的 QDII 基金净值预测。

## 博客

- [xalpha 诞生记](https://re-ra.xyz/xalpha-%E8%AF%9E%E7%94%9F%E8%AE%B0/)

- [xalpha 设计哲学及其他](https://re-ra.xyz/xalpha-%E8%AE%BE%E8%AE%A1%E5%93%B2%E5%AD%A6%E5%8F%8A%E5%85%B6%E4%BB%96/)
mumble-authenticator-templinks 2.0.8
AllianceAuth Authenticator for Mumble server with support for templinks
Requires Python: <3.13,>=3.12
Keywords: allianceauth, authenticator, eveonline, mumble, templinks

# Alliance Auth - Mumble Temp Links Authenticator

This is a thoroughly reviewed version of the Authenticator.

Major changes:

- Utilized [uv](https://docs.astral.sh/uv/) for project management.
- Codebase is now modular, split into several files for better organization.
- Configuration is managed through YAML files and/or environment variables. See [examples](examples/).
- Implemented [diskcache](https://pypi.org/project/diskcache) to cache avatars.
- Utilized [diskcache](https://pypi.org/project/diskcache) to cache specific database queries, allowing the authenticator to function even if the database connection is unavailable.
- Added Docker support. See [Dockerfile](Dockerfile), [docker-compose.yml](docker-compose.yml).
- Included connection check to ensure proper ICE server functionality.
- Added Prometheus metrics for monitoring.

## Important Warning

It is **highly discouraged** to run this container with multiple networks, as shown below:

```yaml
networks:
  network_alpha:
  network_omega:
```

This setup can lead to issues where the callback announcement:

```python
self.adapter = ice.createObjectAdapterWithEndpoints(
    "Callback.Client", f"tcp -h {host} -p {port}"
)
```

might use the wrong network interface. Consequently, the Mumble server could attempt to connect to an address that is unreachable from the given network. This can cause unpredictable behavior and connectivity issues.

## Requirements

The authenticator is designed to work in conjunction with the following applications:

- [Alliance Auth](https://gitlab.com/allianceauth/allianceauth)
- [Mumble Temp Links](https://github.com/Solar-Helix-Independent-Transport/allianceauth-mumble-temp)

## Configuration

The application can be configured using either YAML files or environment variables. The structure of environment variables corresponds to the structure of the YAML configuration file.

For example, given the following YAML configuration:

```yaml
database:
  host: 127.0.0.1
  name: alliance_auth
```

You can set the equivalent environment variables as:

```bash
MA__DATABASE__HOST=127.0.0.1
MA__DATABASE__NAME=alliance_auth
```

Similarly, for a more complex configuration such as:

```yaml
ice_properties:
  - "Ice.ThreadPool.Server.Size = 5"
```

You can set the corresponding environment variable as:

```bash
MA__ICE_PROPERTIES__0="Ice.ThreadPool.Server.Size = 5"
```

### Environment Variable Syntax

- The variable names are constructed by converting YAML keys to uppercase and replacing nested keys with double underscores (`__`).
- Arrays (lists) are represented using index numbers (`0`, `1`, etc.) in the environment variable names.
- All environment variable names should be prefixed with `MA__` to avoid conflicts with other environment variables.

## See also

- [Mubmle Authenticator](https://gitlab.com/allianceauth/mumble-authenticator)
- [Mumble scripts](https://github.com/mumble-voip/mumble-scripts/tree/master)
- [ICE docs](https://doc.zeroc.com/ice/latest/)
pyavd-cli 0.2.1
A collection of cli scripts to use pyavd
Requires Python: <4,>=3.11

# PyAVD cli tools

A set of tools on top of [PyAVD](https://avd.arista.com/4.8/docs/pyavd.html)
to process AVD configurations with python.

## Quick start

Install with pip inside a virtual environment:

```shell
$> python -m venv .venv
$> source .venv/bin/activate
$> pip install pyavd==<pyavd version> pyavd-cli
$> pyavd-build -i inventory.yml -f FABRIC -v
```

## pyavd-build

It "builds" EOS cli configs from AVD config. Similar to the process done by an ansible
playbook that invokes the AVD roles [eos_designs](https://avd.arista.com/4.8/roles/eos_designs/index.html) and
[eos_cli_config_gen](https://avd.arista.com/4.8/roles/eos_cli_config_gen/index.html).

It uses ansible Inventory Manager to read the AVD inventory so ansible features work out of the box.
It supports inline jinja templates and custom interface description/ip addressing via python modules.

```shell
$> pyavd-build --help
usage: pyavd-build [-h] -i INVENTORY_PATH [-o CONFIG_OUTPUT_PATH] [--avd-facts-path AVD_FACTS_PATH] -f
                   FABRIC_GROUP_NAME [-l LIMIT] [-m MAX_WORKERS] [--strict] [--vault-id [VAULT_ID ...]] [-v]

Build AVD fabric.

options:
  -h, --help            show this help message and exit
  -i INVENTORY_PATH, --inventory-path INVENTORY_PATH
                        Path to the inventory file.
  -o CONFIG_OUTPUT_PATH, --config-output-path CONFIG_OUTPUT_PATH
                        Path to the output directory.
  --avd-facts-path AVD_FACTS_PATH
                        If provided AVD facts will be written to this path.
  -f FABRIC_GROUP_NAME, --fabric-group-name FABRIC_GROUP_NAME
                        Name of the fabric group.
  -l LIMIT, --limit LIMIT
                        Limit filter for inventory.
  -m MAX_WORKERS, --max-workers MAX_WORKERS
                        Maximum number of parallel workers.
  --strict              Use strict mode and fail if there is validation errors
  --vault-id [VAULT_ID ...]
                        Vault ID used to decrypt the inventory. Multiple vault IDs can be provided.
  -v, --verbose
```
HDF5-BLS 1.1.0
A package to unify the storage of Brillouin Light Scattering related data in HDF5 files
Requires Python: >=3.6
Keywords: HDF5, Brillouin, BLS

# The HDF5_BLS package

This package is a part of the [HDF5_BLS](https://github.com/bio-brillouin/HDF5_BLS) project. It's purpose is to unify the storage of BLS-related data to a HDF5 file.

## Installation

To install the package, you can use pip:

```bash
pip install HDF5_BLS
```

To install the package from source for local development, please refer to the [documentation](https://hdf5-bls.readthedocs.io/en/latest/).

## Documentation

You can access the documentation of the project at [this link](https://github.com/bio-brillouin/HDF5_BLS/blob/main/guides/Tutorial/Tutorial.pdf) or on the dedicated ReadTheDocs page at [this link](https://hdf5-bls.readthedocs.io/en/latest/).

## Example of usage

```python
from HDF5_BLS import Wrapper

# Create a HDF5 file
wrp = Wrapper(filepath = "path/to/file.h5")

###############################################################################
# Existing code to extract data from a file
###############################################################################
# Storing the data in the HDF5 file (for this example we use a random array)
data = np.random.random((50, 50, 512))
wrp.add_raw_data(data = data, parent_group = "Brillouin", name = "Raw data")

###############################################################################
# Existing code to convert the data to a PSD
###############################################################################
# Storing the Power Spectral Density in the HDF5 file together with the associated frequency array (for this example we use random arrays)
PSD = np.random.random((50, 50, 512))
frequency = np.arange(512)
wrp.add_PSD(data = PSD, parent_group = "Brillouin", name = "Power Spectral Density")
wrp.add_frequency(data = frequency, parent_group = "Brillouin", name = "Frequency")

###############################################################################
# Existing code to fit the PSD to extract shift and linewidth arrays
###############################################################################
# Storing the Power Spectral Density in the HDF5 file together with the associated frequency array (for this example we use random arrays)
shift = np.random.random((50, 50))
linewidth = np.random.random((50, 50))
wrp.add_treated_data(parent_group = "Brillouin", name_group = "Treat_0", shift = shift, linewidth = linewidth)
```