semvec/pypi-packages huggingface dataset:
muffler 0.2.0
Denoising time-series data.
Requires Python: >=3.9

# Muffler

Denoising Time-Series Data

## Installation

```bash
pip install muffler
```

## Usage

```python
import muffler
import numpy as np

# Generate some noisy data
t = np.linspace(0, 1, 100)
clean_signal = np.sin(2 * np.pi * t)

# Add some noise
std = 1.0
conditional_noise = np.sqrt(np.abs(clean))
random_noise = np.random.normal(0, std, t.shape)
noisy_signal = clean + random_noise * conditional_noise

# Denoise the data
window_size = 100
stride = 25
denoised_signal = muffler.denoise_linear_regression(noisy_signal, window_size, stride)

# Compute the error
error = np.mean(np.sqrt(np.mean((clean_signal - denoised_signal) ** 2, axis=1)))
print(f"Error: {error:.2e}")
```

## Streamlit App (An example)

You can also use the streamlit app to see how the denoising works.
To run the app, you need to install [Rust](https://www.rust-lang.org/tools/install) and [Maturin](https://www.maturin.rs/installation) for compiling the code.
Then, you need to create a Python (3.9 or greater) virtual environment and install the dependencies:

```bash
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
maturin develop --release --extras=dev
```

Finally, you can run the app:

```bash
streamlit run examples/app.py
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Citation

TODO: Add citation
graphs-tradke 0.0.2
Package to utilize Dijkstras Shortest Path
Requires Python: >=3.7

# graphs_tradke

A Python package implementing Dijkstra's shortest path algorithm and Breadth-First Search (BFS), another type of search we learned in CS2050. This package provides efficient algorithms for working with graphs, making it useful for a variety of applications in computer science, including shortest path calculations and graph traversals.

## Features

- **Dijkstra's Algorithm**: Finds the shortest path from a source node to all other nodes in a weighted graph.
- **Breadth-First Search (BFS)**: Traverses the graph level by level, useful for finding the shortest path in unweighted graphs.

## Installation

To install the package, clone the repository and use `pip3`:

```bash
# Clone the repository
git clone https://github.com/t-radke/CS3250-hw4

# Navigate to the src directory
cd CS3250-hw4/src

# Install the package
pip install .
crimson-auto-pydantic 0.1.9
Automatic Pydantic model generation and validation for function parameters and return types.
Requires Python: >=3.9

# auto-pydantic

- Author : Sonnet3.5
- Editor : Sisung Kim

auto-pydantic is a Python module that provides automatic Pydantic model generation and validation for function parameters and return types.

## Features

- Generate Pydantic input models from function signatures
- Generate Pydantic output models from function return types
- Automatic validation of function inputs using generated Pydantic models
- Support for simple and complex function signatures, including *args and **kwargs

## Installation

To install crimson-auto-pydantic, you can use pip:

```
pip install crimson-auto-pydantic
```

## Usage

### Generating Input Props

```python
from crimson.auto_pydantic.generator import generate_input_props

def my_function(arg1: int, arg2: str = "default") -> str:
    return f"{arg1} {arg2}"

input_props = generate_input_props(my_function)
print(input_props)
```
Output:
```
class MyFunctionInputProps(BaseModel):
    arg1: int = Field(...)
    arg2: str = Field(default="'default'")

    def __init__(self, arg1: int, arg2: str='default'):
        super().__init__(arg1=arg1, arg2=arg2)
```

### Generating Output Props

```python
from crimson.auto_pydantic.generator import generate_output_props

def my_function(arg1: int, arg2: str = "default") -> str:
    return f"{arg1} {arg2}"

output_props = generate_output_props(my_function)
print(output_props)
```
Output:
```
class MyFunctionOutputProps(BaseModel):
    return: str
```


### Validating Function Inputs

```python
from crimson.auto_pydantic.validator import validate
from inspect import currentframe

def my_function(arg1: int, arg2: str = "default") -> str:
    validate(my_function, currentframe(), arg1, arg2)
    return f"{arg1} {arg2}"

# This will pass validation
my_function(1, "test")

# This will raise a validation error
my_function("not an int", "test")
```
Validation Error:
```
ValidationError: 1 validation error for MyFunctionInputProps
arg1
  Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='not an int', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/int_parsing
```