semvec/pypi-packages huggingface dataset:
spinex-sr 0.1.1
Symbolic Regression with SPINEX algorithm
License: MIT
Requires Python: >=3.6

# SPINEX Symbolic Regression

A Python implementation of symbolic regression from the SPINEX family.

## Installation

```bash
pip install spinex-sr
```

## Quick Start

```python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from spinex_sr import SPINEX_SymbolicRegression

if __name__ == "__main__":
    # Generate sample data for the multi-variable problem
    np.random.seed(42)
    X = np.linspace(0, 10, 100)
    Y = np.linspace(5, 15, 100)
    Z = np.linspace(5, 15, 100)
    # Define the actual function with multiple variables
    def actual_function_multi(X, Z):
        return X + Y + 3 * Z
    y_multi = actual_function_multi(X, Z)
    df_multi = pd.DataFrame({'X': X, 'Y': Y, 'Z': Z})
    # Create an instance of Symbolic_SPINEX for the multi-variable problem
    symbolic_spinex_multi = SPINEX_SymbolicRegression(
        df_multi, y_multi,
        actual_function="y = 2 * X**2 + 3 * X + 5",
        max_depth=3,
        population_size=25,
        generations=55,
        explainability_level='none',
        plot_results=True,
        early_stopping_metric='r2',
        early_stopping_value=0.79,
        patience=3,
        n_jobs=-1,
        last_resort=True,  # Enable last resort mode
        force_all_variables=False
    )
    symbolic_spinex_multi.initialize_population()
    best_expression_multi = symbolic_spinex_multi.evolve()
    symbolic_spinex_multi.best_expression = best_expression_multi
    # Call explain() to get the advanced explanation and plot for multi-variable
    symbolic_spinex_multi.explain()

    # Generate sample data for the single-variable problem
    X_single = np.linspace(0, 10, 100)
    # Define the actual function for the single-variable problem
    def actual_function_single(X):
        return 2 * X**2 + 3 * X + 5
    y_single = actual_function_single(X_single)
    df_single = pd.DataFrame({'X': X_single})
    # Create an instance of Symbolic_SPINEX for the single-variable problem
    symbolic_spinex_single = SPINEX_SymbolicRegression(
        df_single, y_single,
        actual_function="y = 2 * X**2 + 3 * X + 5",
        max_depth=3,
        population_size=50,
        generations=50,
        explainability_level='advanced',
        plot_results=True,
        early_stopping_metric='mse',
        early_stopping_value=200,
        patience=3,
        n_jobs=-1,
        dynamic_elite=True,
        last_resort=True,  # Enable last resort mode
        force_all_variables=True
    )
    symbolic_spinex_single.initialize_population()
    best_expression_single = symbolic_spinex_single.evolve()
    symbolic_spinex_single.best_expression = best_expression_single
    # Call explain() to get the advanced explanation and plot for single-variable
    symbolic_spinex_single.explain()

    plt.show()
```
coloryi 10.0.9
Color formatting utility for Python console applications
License: MIT
Requires Python: >=3.6

# coloris

Color formatting utility for Python console applications.

## Installation

```bash
pip install coloris
```

## Usage

The package provides simple functions for adding color to your terminal output:

```python
import coloris

# Basic color formatting
print(coloris.red("This text will be red"))
print(coloris.blue("This text will be blue"))
print(coloris.green("This text will be green"))

# Text styles
print(coloris.bold("Bold text"))
print(coloris.underline("Underlined text"))
print(coloris.italic("Italic text"))

# Combined formatting
print(coloris.colorize("Custom formatting", 
                        color=coloris.BLUE,
                        bg_color=coloris.BG_WHITE,
                        style=coloris.BOLD))

# Direct printing with color
coloris.print_colored("This prints directly in magenta", coloris.MAGENTA)

# Fun effects
print(coloris.rainbow("Rainbow text!"))
```

## Available Functions

### Colors
- `black(text)`
- `red(text)`
- `green(text)`
- `yellow(text)`
- `blue(text)`
- `magenta(text)`
- `cyan(text)`
- `white(text)`

### Text Styles
- `bold(text)`
- `italic(text)`
- `underline(text)`

### Background Highlighting
- `highlight(text, bg_color=BG_YELLOW)`

### Utilities
- `colorize(text, color, bg_color, style)` - For custom combinations
- `print_colored(text, color, bg_color, style)` - Print with colors
- `rainbow(text)` - Creates rainbow-colored text
- `is_colored_terminal()` - Check if terminal supports colors

## Color Constants

You can use these constants for custom formatting:

### Text Colors
`BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, `MAGENTA`, `CYAN`, `WHITE`, `RESET`

### Background Colors
`BG_BLACK`, `BG_RED`, `BG_GREEN`, `BG_YELLOW`, `BG_BLUE`, `BG_MAGENTA`, `BG_CYAN`, `BG_WHITE`

### Text Styles
`BOLD`, `UNDERLINE`, `ITALIC`

## Note

This package is designed for Windows systems, but works on any platform that supports ANSI color codes.
pionex-py 1.0.3
Connector library for Pionex REST and WS API with enhanced error handling and performance.
License: MIT
Requires Python: <4.0,>=3.11
Keywords: pionex, crypto, api, trading, websocket, rest

# 🚀 Pionex to Python

Easily interact with the [Pionex API](https://pionex-doc.gitbook.io/apidocs) for both REST and WebSocket connections.

## 📦 Installation
```sh
pip install pionex_py
```

## 📝 Description
Pionex to Python is a connector library for Pionex's REST and WebSocket API.
- Mirrors the official [Pionex API documentation](https://pionex-doc.gitbook.io/apidocs) for intuitive implementation.
- Supports both public and private API endpoints.
- Clean, modular, and easy-to-extend codebase.

Check out the [GitHub project](https://github.com/alejandrorodm/pionex_py) for more details.

## ⚡ Features
- ✅ **Full REST API support** (public and private endpoints)
- ✅ **Real-time WebSocket streaming**
- ✅ **Handles multiple orders with ease**
- ✅ **Error handling**
- ✅ **Lightweight and fast**

## 🚀 Quickstart

### 📌 REST API Examples

#### Public Endpoint
```python
from pionex_py.restful.Common import Common

commonClient = Common()
market_data = commonClient.market_data()

print(market_data)
```

#### Private Endpoint
```python
from pionex_py.restful.Orders import Orders

key, secret = 'X...X', 'X...X'

ordersClient = Orders(key, secret)

order = {
    'symbol': 'BTC_USDT',
    'side': 'BUY',
    'type': 'MARKET',
    'amount': '16',
}

response = ordersClient.new_order(order=order)
print(response)
```

<details>
  <summary>📌 Multiple Order Template</summary>

  ```python
  from pionex_py.restful.Orders import Orders

  key, secret = 'X...X', 'X...X'

  ordersClient = Orders(key, secret)

  orders = [
    {
      'side': 'BUY',
      'type': 'LIMIT',
      'price': '57200',
      'size': '0.0002'
    },
    {
      'side': 'SELL',
      'type': 'LIMIT',
      'price': '60000',
      'size': '0.0002'
    }
  ]

  response = ordersClient.new_multiple_order(symbol='BTC_USDT', orders=orders)
  print(response)
  ```
</details>

### 📡 WebSocket Example
```python
from pionex_py.websocket.PublicStream import PublicStream
from time import sleep

# For private streams: stream = PrivateStream(key, secret)
stream = PublicStream()

def onMessage(msg):
    print(msg)

stream.subscribe(callback=onMessage, topic='TRADE', symbol='BTC_USDT')
stream.subscribe(callback=onMessage, topic='TRADE', symbol='ETH_USDT')

sleep(5)

stream.unsubscribe(topic='TRADE', symbol='BTC_USDT')
stream.unsubscribe(topic='TRADE', symbol='ETH_USDT')
```

## 🔧 TODOs & Future Enhancements
- [ ] Reconnection handling for WebSockets
- [ ] Improved error handling with retries
- [ ] More endpoint coverage
- [ ] CLI for quick trading actions

## 📬 Contributions
Pull requests are welcome! If you find a bug or want to propose an enhancement, feel free to [open an issue](https://github.com/alejandrorodm/pionex_py/issues).

## 🛠️ License
This project is licensed under the MIT License - see the LICENSE file for details.