semvec/pypi-packages huggingface dataset:
quantml 0.0.4
Algorithmic Trading using Machine Learning
License: MIT
Requires Python: >=3.9
Keywords: algorithmic trading,Crypto,Quantitative Finance,trading bot

# Algorithmic Trading using Machine Learning
```
# Installation
pip install quantml

# Usage
Usage: quantml [command]
quantml bitcoin

                                 Open  ...  Ignore
Open time                              ...
2022-04-29 20:30:00+00:00 38525.80000  ...       0
2022-04-29 20:35:00+00:00 38504.90000  ...       0
2022-04-29 20:40:00+00:00 38543.50000  ...       0
2022-04-29 20:45:00+00:00 38519.99000  ...       0
2022-04-29 20:50:00+00:00 38540.12000  ...       0
...                               ...  ...     ...
2022-05-09 20:05:00+00:00 31309.00000  ...       0
2022-05-09 20:10:00+00:00 31420.90000  ...       0
2022-05-09 20:15:00+00:00 31834.17000  ...       0
2022-05-09 20:20:00+00:00 31504.99000  ...       0
2022-05-09 20:25:00+00:00 31539.30000  ...       0

[2880 rows x 11 columns]
```
interactions-tasks 1.0.0
Add a task system to discord-py-interactions, similar to discord.ext.tasks
License: MIT

Simple example, triggers every 3 seconds:
```python
from interactions.ext.tasks import IntervalTrigger, create_task

@create_task(IntervalTrigger(3))
async def my_task():
    print("hi")

my_task.start()
```

Multiple conditions (example will be improved when more triggers are added)\
The task will only run every 5 seconds because every trigger needs to be ready
```python
from interactions.ext.tasks import IntervalTrigger, create_task

@create_task(IntervalTrigger(3), IntervalTrigger(5))
async def my_task():
    print("hi")

my_task.start()
```

To have the task run when any trigger is ready, use the OrTrigger.\
The task will run every 3 and 5 seconds (it may run twice occasionally due to how timing works)
```python
from interactions.ext.tasks import IntervalTrigger, OrTrigger, create_task

@create_task(OrTrigger(IntervalTrigger(3), IntervalTrigger(5)))
async def my_task():
    print("hi")

my_task.start()
```

Classes are special, due to how functions turn into methods and other python black magic\
There are two ways to properly do tasks in classes

The first way is to pass `self` when starting the task\
Any args or kwargs passed to `Task.start()` will be prepended to the function
```python
from interactions import Extension
from interactions.ext.tasks import IntervalTrigger, create_task

class Cog(Extension):
    def __init__(self, client):
        self.method.start(self)

    @create_task(IntervalTrigger(1))
    async def method(self):
        print(self)
```

The other way is just to wrap the method manually
```python
from interactions import Extension
from interactions.ext.tasks import IntervalTrigger, create_task

class Cog(Extension):
    def __init__(self, client):
        self.method = create_task(IntervalTrigger(1))(self.method)
        self.method.start()

    async def method(self):
        print(self)
```