semvec/pypi-packages huggingface dataset:
streambatch 0.1.9
Use this package to get daily, 10m resolution NDVI time series data for any location on Earth via the Streambatch.io API.
Requires Python: >=3.7

<img src="http://www.tammer.com/logo.png" width="300">

Streambatch is an API for time series NDVI data

- **Documentation:** https://docs.streambatch.io/reference/streambatch-api
- **Website:** https://www.streambatch.io
- **Package source code:** https://github.com/tammer/streambatch

This API provides up-to-date daily time series NDVI from 2013 to today for any location on Earth. You send a request to the server specifying any number of locations (single points or polygons).  The request is processed asynchronously. Data is returned as a pandas dataframe.

### Installation

    pip install streambatch

### Example

    from streambatch import StreambatchConnection
    connection = StreambatchConnection(api_key=YOUR_API_KEY)
    query_id = connection.request_ndvi(points=[[long,lat],[long,lat]...])
    data = connection.get_data(query_id)
serial-data-handler-zxw 0.6.1
人工智能_量化交易_金融数据预处理

# 人工智能训练中,对于时间断层数据的处理工具包
**process serial data for AI training**

- 根据断点,分配数据集,保证训练数据的连续性
**allocate data set according to breakpoints, to ensure the continuity of training data**


## 生成训练数据(避开数据断点)
```python
# 注意:
# 传入的数据必须指定时间列(或其他顺序列)
# 传入的数据必须已按顺序排列好

# Attention:
# You must specify the time column (or other sequential column) of the incoming pd原始数据
# The incoming pd原始数据 must be sorted in order

from datetime import timedelta
from serial_data_handler_zxw import 生成训练数据_避开时间断点, 时间列_三角函数化
import pandas as pd

csv_path = "/Volumes/time_serial_data.csv"
data = pd.read_csv(csv_path)


# 指定时间列为'收盘时间',
# 设置断点为2分钟,
# 即如果两个相邻的原始数据pd间隔大于2分钟,则认为是一个断点

# specific the time column named '收盘时间' , 
# and set the gap is 2 minutes , 
# it means that if the gap between two adjacent pd原始数据 > 2 minutes, it will be considered as a breakpoint
x = 生成训练数据_避开时间断点(data, column_timestamp='收盘时间', gap=timedelta(minutes=2))
print(x.断点)
训练数据index = x.数据划分_避开断点(input长度=100, output长度=100, step=1)
print(len(训练数据index))


# 如果您的数据间隔小于1秒,请做相应的乘法转换, 例如: 1毫秒的数据,请乘以1000,转换为秒级数据
# 时间列_三角函数化

# If your pd原始数据 interval < 1s, please do the corresponding multiplication conversion
# for example: 1ms pd原始数据, you should multiply by 1000, convert to second-level pd原始数据
# time column trigonometric function
data['收盘时间'] = pd.to_datetime(data['收盘时间'])
data['收盘时间'] = 时间列_三角函数化(data['收盘时间'], 周期=timedelta(days=1))
print(data['收盘时间'])
```

## 多尺度时间数据的对齐
```python   
import pandas as pd
from datetime import datetime
from serial_data_handler_zxw import 时间序列_数据对齐

data = pd.read_csv('/Volumes/AI_1505056/量化交易/币安_K线数据_1d/BTCUSDT-1m-201909-202308.csv')

# to datetime
data['收盘时间'] = pd.to_datetime(data['收盘时间'])

# 时间序列_数据对齐
数据预处理 = 时间序列_数据对齐(data, '收盘时间')
i = 数据预处理.查找_时间范围(datetime(2023, 8, 29, 16, 54, 0), 查找精度='1d')
print(i)
```

## pytorch的金融K线数据预处理

```python
from serial_data_handler_zxw import 金融K线_AI数据预处理 as kAI

# 输出注意事项, 使用方法
kAI.金融K线_AI数据预处理.help()

# 数据标准化
csv_file = "/Volumes/AI_1505056/量化交易/币安_K线数据/BTCUSDT-1m-201909-202308.csv"
x = kAI.金融K线_AI数据预处理(csv_file, 100, 100)
xn = x.标准化(x.pd原始数据)

# 适用dateset的__getitem__(i)的数据获取
x.dataset__len__(是训练集=True)  # 是训练集=False时, 调用测试集数据
x.dataset__get_item__(i=0, data=xn, 是训练集=True)
```


python setup.py sdist bdist_wheel
twine upload dist/*
twine upload dist/serial_data_handler_zxw-0.6.0-py3-none-any.whl
chatgpt-function 0.1.2
Wrapper for creating ChatGPT callable functions from docstrings

# ChatGPT Function Wrapper

## Overview

This project provides a Python function wrapper that simplifies the process of converting functions with docstrings into callable functions for ChatGPT. It parses the docstring of a function and creates a description that ChatGPT can use.

## Installation

You can install this package using pip:

```bash
pip install chatgpt-function
```

## Usage

1. Import the `chatgpt_function` module:

   ```python
   from chatgpt_function import chatgpt_wrapper
   ```

2. Define your function with a docstring using the `@chatgpt_wrapper` decorator:

   ```python
   @chatgpt_wrapper
   def my_function(my_arg: str) -> str:
       '''This is my function.

       Args:
           my_arg (str): This is my argument.

       Returns:
           str: This is my return value.
       '''
       return "Hello World!" + my_arg
   ```

3. Access the function's description using `chatgpt_function()`:

   ```python
   function_description = my_function.chatgpt_function()
   ```

   This will provide you with a JSON-like description that you can use as input to ChatGPT.

4. Use the function in ChatGPT:

   ```python
   from openai import ChatCompletion

   response = ChatCompletion.create(
       messages=messages,
       functions=[function_description],
       **kwargs
   )
   ```

## License

This project is licensed under the MIT License.

MIT License

Copyright (c) 2023 Ron Heichman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.