semvec/pypi-packages huggingface dataset:
hastl 0.1.8
A fast GPU implementation of STL decomposition with missing values
License: MIT

HaSTL
=================================================================

HaSTL [ˈheɪstiɛl]: A fast GPU implementation of batched Seasonal and Trend
decomposition using Loess (STL) [1] with missing values and support for both
CUDA and OpenCL (C and multicore backends are also available).
Loosely based on `stlplus <https://github.com/hafen/stlplus>`_, a
popular library for the R programming language. The GPU code is written in
`Futhark <https://futhark-lang.org>`_, a functional language that compiles
to efficient parallel code.


Requirements
------------

You would need a working OpenCL or CUDA installation/header files, C compiler and these Python packages:

- futhark-ffi==0.14.2
- wheel


Installation
------------

You may want to run the program in a Python virtual environment. Create it via::

  python -m venv env

Then, activate the virtual environment via::

  . env/bin/activate

Upgrade pip via::

  pip install --upgrade pip

Then select the backends (choose from opencl, cuda, c and multicore) that you wish to build by setting the environment variable::

  export HASTL_BACKENDS="opencl multicore c" 

If no environmental variable is set, only the sequential c backend would be compiled.

The package can then be easily installed using pip. This will take a while, since we need
to compile the shared libraries for your particular system, Python implementation and all selected backends::

  pip install hastl

To install the package from the sources, first get the current stable release via::

  git clone https://github.com/mortvest/hastl

Install the dependencies via::

  pip install -r requirements.txt

Afterwards, you can install the package. This can also take a while::

  python setup.py sdist bdist_wheel
  pip install .


Usage
-----
Examples of HaSTL usage can be found in the examples/ direcotry. The simplest snippet should contain::

  from hastl import STL
  stl = STL(backend=..)
  seasonal, trend, remainder = stl.fit(data, n_p=.., q_s=..)


References
----------
[1] Cleveland, Robert B., et al. "STL: A seasonal-trend decomposition." J. Off. Stat 6.1 (1990): 3-73.
hikari-flare 0.1.3
Stateless component manager for hikari with type-safe API.
License: MIT
Requires Python: <3.12,>=3.10

# Flare

A stateless component manager for hikari with a type-safe API.

### Features:
- buttons, select menus, and modals
- easy and powerful API for simple interactions
- saves data between bot restarts by utilizing the component's custom id 

*If you want to create complex component interactions [hikari-miru](https://github.com/HyperGH/hikari-miru) may be a better choice.*


### Installation

```sh
pip install hikari-flare
```

### Links
> 🗃️ | [Docs](https://brazier-dev.github.io/hikari-flare)<br>
> 📦 | [Pypi](https://pypi.org/project/hikari-flare/)

## Example

```python
import flare
import hikari


@flare.button(label="Test Button", style=hikari.ButtonStyle.PRIMARY)
async def test_button(
    ctx: flare.MessageContext,
) -> None:
    await ctx.respond(content="Hello World!")

@flare.button(label="State Button", style=hikari.ButtonStyle.PRIMARY)
async def state_button(
    ctx: flare.MessageContext,
    # Args and kwargs are used for state.
    number: int,
) -> None:
    await ctx.respond(content=f"The number is: {number}")

bot = hikari.GatewayBot("...")
flare.install(bot)

@bot.listen()
async def buttons(event: hikari.GuildMessageCreateEvent) -> None:

    # Ignore other bots or webhooks pinging us
    if not event.is_human:
        return

    me = bot.get_me()

    # If the bot is mentioned
    if me.id in event.message.user_mentions_ids:
        # Set custom state for components that need it
        row = await flare.Row(test_button(), state_button(5))
        message = await event.message.respond("Hello Flare!", component=row)

bot.run()
```

The API can also be accessed at a lower level if components need typed attributes.

```python
class Button(flare.Button):
    a: int
    b: str

    async def callback(self, ctx: flare.Context) -> None:
        typing_extensions.reveal_type(self.a)  # int
        typing_extensions.reveal_type(self.b)  # str
        await ctx.respond("Hello flare!")
```

## Converters

Converters allow you to serialize and deserialize types.
Here in an example of an int converter.

Converters for `int`, `str`, `typing.Literal`, and `enum.Enum` are built in.

```python
class IntConverter(Converter[int]):
    async def to_str(self, obj: int) -> str:
        return str(obj)

    async def from_str(self, obj: str) -> int:
        return int(obj)

flare.add_converter(
    int,          # The typehint this converter is used for.
    IntConverter  # The converter class.
)
```