semvec/pypi-packages huggingface dataset:
cnspy-timestamp-association 0.2.1
Associates vectors of timestamps.
Requires Python: >=3.6

# cnspy_timestamp_association

The class `TimestampAssociation` finds correspondences between to vectors, in our case containing timestamps. The aim is to find timestamp pairs with a configurable  `max_difference`.

## Installation

Install the current code base from GitHub and pip install a link to that cloned copy
```
git clone https://github.com/aau-cns/cnspy_timestamp_association.git
cd cnspy_timestamp_association
pip install -e .
```
or the [official package](https://pypi.org/project/cnspy-timestamp-association/) via
```commandline
pip install cnspy-timestamp-association
```

## Dependencies

It is part of the [cnspy eco-system](hhttps://github.com/aau-cns/cnspy_eco_system_test) of the [cns-github](https://github.com/aau-cns) group.  

* [numpy]()

## Examples

Please refer to the unit-test section in `TimestampAssociation.py`.

## License

Software License Agreement (GNU GPLv3  License), refer to the LICENSE file.

*Sharing is caring!* - [Roland Jung](https://github.com/jungr-ait)
cnspy-script-utils 0.1.2
Utilty scripts and functions.
Requires Python: >=3.6

# cnspy_script_utils

A package holding useful scripts, that cannot be associated to any other (dangling code, that is used in different places). 


Most important functions:
1. [get_list_of_dir(directory)](./directory_info.py)
1. [get_list_of_files(directory)](./directory_info.py)
1. [string_to_list(string, pattern)](./string_parser.py)
1. [string_to_dict(string, pattern)](./string_parser.py)

## Installation

Install the current code base from GitHub and pip install a link to that cloned copy
```
git clone https://github.com/aau-cns/cnspy_script_utils.git
cd cnspy_script_utils
pip install -e .
```
or the [official package](https://pypi.org/project/cnspy-script-utils/) via
```commandline
pip install cnspy-script-utils
```

## Dependencies

It is part of the [cnspy eco-system](https://github.com/aau-cns/cnspy_eco_system_test) of the [cns-github](https://github.com/aau-cns) group.  
Main dependencies are:

* [re]()
* [sys]()
* [os]()


## License

Software License Agreement (GNU GPLv3  License), refer to the LICENSE file.

*Sharing is caring!* - [Roland Jung](https://github.com/jungr-ait)
cnspy-numpy-utils 0.2.1
Some utility functions for numpy data types
Requires Python: >=3.6

# cnspy_numpy_utils Package

A package holding useful scripts based on the numpy package, that cannot be associated to any other (dangling code, that is used in different places). 

Most important functions:
1. [tri_vec_to_mat(tri_vec, n=None)](./cnspy_numpy_utils/matrix_conversions.py)
1. [mat_to_tri_vec(P)](./cnspy_numpy_utils/matrix_conversions.py)
1. [accumulated_distance(p_vec)](./cnspy_numpy_utils/accumulated_distance.py)
1. [total_distance(p_vec)](./cnspy_numpy_utils/accumulated_distance.py)
1. [numpy_statistics(vNumpy](./cnspy_numpy_utils/numpy_statistics.py)
1. [print_statistics(metrics](./cnspy_numpy_utils/numpy_statistics.py)

## Installation

Install the current code base from GitHub and pip install a link to that cloned copy
```
git clone https://github.com/aau-cns/cnspy_numpy_utils.git
cd cnspy_numpy_utils
pip install -e .
```
or the [official package](https://pypi.org/project/cnspy-numpy-utils/) via
```commandline
pip install cnspy-numpy-utils
```

## Dependencies

It is part of the [cnspy eco-system](hhttps://github.com/aau-cns/cnspy_eco_system_test) of the [cns-github](https://github.com/aau-cns) group.  

* [numpy]()



## License

Software License Agreement (GNU GPLv3  License), refer to the LICENSE file.

*Sharing is caring!* - [Roland Jung](https://github.com/jungr-ait)
fastapi-crawler-scheduler 2.1.5
删除多余代码
Requires Python: <4.0,>=3.7

*********

# fastapi_crawler_scheduler

*********

## 使用

*********

```python
from fastapi import FastAPI
from fastapi_crawler_scheduler import TaskScheduler

app = FastAPI()

task_scheduler = TaskScheduler(
    app=app,
    ssl=False,
    project_name="project_name",
    server_name="server_name",
    redis_username='redis_username',
    redis_password='redis_password',
    redis_host="127.0.0.1",
    redis_port=6379,
    thread_pool_size=50,
)
```

### 添加|更新任务 - add_task

#### interval类型

```python
def add_spider(**crawler_info):
    print(f"add_spider = {crawler_info}")
    print("add_spider")


trigger = 'interval'
crawler_info = {
    "topic": "interval insert_task",
    "title_handler_name": "interval insert_task",
    "seconds": 4,
}
job_id = 'job_1'
task_scheduler.add_task(
    func=add_spider,
    job_id=job_id,
    trigger=trigger,
    crawler_info=crawler_info,
    seconds=4
)
```

#### date类型

```python
def add_spider(**crawler_info):
    print(f"add_spider = {crawler_info}")
    print("add_spider")


trigger = 'date'
crawler_info = {
    "topic": "date insert_task",
    "title_handler_name": "date insert_task",
    "run_date": "2022-10-03 11:30:00",
}
job_id = 'job_1'
run_date = '2022-10-03 11:30:00'
task_scheduler.add_task(
    func=add_spider,
    job_id=job_id,
    trigger=trigger,
    crawler_info=crawler_info,
    run_date=run_date,
)
```

#### cron类型

```python
def add_spider(**crawler_info):
    print(f"add_spider = {crawler_info}")
    print("add_spider")


job_id = 'job_1'
trigger = 'cron'
minute = '*/2'
crawler_info = {
    "topic": "cron update_task",
    "title_handler_name": "cron update_task",
    "minute": minute,
}
task_scheduler.add_task(
    func=add_spider,
    job_id=job_id,
    trigger=trigger,
    crawler_info=crawler_info,
    minute=minute,
)
```

### 删除任务 - delete_task

```python
job_id = 'job_1'
task_scheduler.delete_task(job_id=job_id)
```

安装
============
Pypi
----

    $ pip install fastapi-crawler-scheduler
jason-lee-tools 0.10.0
sdk for ali(Jason Lee)'s environment
Requires Python: >=3.6

# jason-lee-tools

A tools for private cloud by Jason Lee.

## Installation

```bash
pip install jason-lee-tools
```

## 发送短信提醒
```
api_key = '如有需要，找阿力'        
api_secret = '如有需要，找阿力'        

sms = SMS(api_key, api_secret)        

phone = '18600806692'        
msg = '你好，世界。'        

try:        
    response = sms.send(phone, msg, '2024-07-15 13:46:00') #如果是立刻发哦送，最后一个参数可以为None        
    print('成功:', response)        
except requests.exceptions.RequestException as e:        
    print('请求失败:', e)       
```         

##  发送提醒邮件
```
api_key = '如有需要，找阿力'        
api_secret = '如有需要，找阿力'        

email = Mail(api_key, api_secret)        

to = '5988628@qq.com'        
subject = "你好"        
body = '你好，世界。'        

try:        
    response = email.send(to, subject, body, '2024-07-15 13:46:00') #如果是立刻发哦送，最后一个参数可以为None        
    print('成功:', response)        
except requests.exceptions.RequestException as e:        
    print('请求失败:', e)      
```  

## 获取天气预报       
```
api_key = ''  # 从和风天气获取的API密钥                          
location = '101010100'  # 北京的地点ID                      
weather = get_weather(api_key, location)               
if 'error' not in weather:                             
    print(f"Location: {weather['location']}")          
    print(f"Temperature: {weather['temperature']}°C")          
    print(f"Weather: {weather['weather']}")            
else:                                                  
    print(weather['error'])      
``` 
    
## 了解明天是否会下雨   
```
api_key = ''  # 从和风天气获取的API密钥           
location = '101010100'  # 北京的地点ID           
tomorrow_weather = get_tomorrow_weather(api_key, location)           
if 'error' not in tomorrow_weather:           
    if will_it_rain_tomorrow(tomorrow_weather):           
        print("明天会下雨")           
    else:           
        print("明天不会下雨")           
else:           
    print(tomorrow_weather['error'])    
```