semvec/pypi-packages huggingface dataset:
sparse-filter-convolution 0.1.0
A CUDA extension for PyTorch to perform sparse filter convolution

# Sparse Filter Convolution

Sparse Filter Convolution is a Python package that provides a PyTorch function to perform fast convolutions with sparse global filters. The package includes a CUDA-optimized implementation of the `sparse_unfold` function, which is used internally by the `sparse_filter_convolution` function to efficiently process the input data.

## Functionality

The main function provided by this package is `sparse_filter_convolution(signal, filter, k)`, which takes the following input arguments:

- `signal`: A 3D PyTorch tensor of shape `(batch_size, dim, seq_len)`, representing a batch of input signals.
- `filter`: A 2D PyTorch tensor of shape `(dim, seq_len)`, representing a global filter that is applied to the input signals.
- `k`: An integer, representing the number of top elements to be considered from the filter.

The function returns a 3D PyTorch tensor of shape `(batch_size, dim, seq_len)`, which is the result of applying the sparse filter convolution to the input signals.

In addition to the `sparse_filter_convolution` function, this package also provides a lower-level CUDA-optimized function `sparse_unfold(padded_signal, top_k_indices, n)`, which can be used independently if desired. This function takes a padded signal, the top k indices of the filter, and the length of the signal as input arguments, and returns a sparse unfolded signal as a 4D PyTorch tensor.

## Usage

To use the `sparse_filter_convolution` function in your code, simply import it from the `sparse_filter_convolution` package:

```python
from sparse_filter_convolution import sparse_filter_convolution
file-b 0.0.1
Import data from Table of Input-Output from IBGE
Requires Python: >=3.7

# Imput Output Tables to Brazil IOTBR

Generate **I O - T A B L E** IOTBR.

## Instructions

1. Install:

```
pip install iotbr
```

2. Generate an aesthetic ASCII visual:

```python3
from iotbr import tru

# import data from [2010] with level [68] about [Total product - PT]
tru.read_var('2010','68','PT')
# import data from [2010] with level [68] about [Total product - PT] with last year prices [t-1]
tru.read_var('2010','68','t-1')
```
hilly 0.1.3
Tools for summarizing and viewing sporty GPX traces
Requires Python: >=3.10,<3.11
Keywords: gpx,maps,outdoors


<p align="center">
  <img src="docs/img/hilly-icon_sm.png" />
</p>


# Hilly

Tools for summarizing and viewing sporty GPX traces

## Install

```bash
pip install hilly
```

## Dev Install

```
git clone
cd hilly
poetry install
```

## Features

  * Traces are loaded as GeoDataFrames (convenient exploring and editing)
  * Rasterize traces to see popular routes/trails.
  * Label/Filter Skiing Trace to label/exclude chair-lifts.
  * Summary for Skiing day

## Usage

Import a trace:

```python
import hilly

df = hilly.io.load_trace("path/to/trace.gpx")
```

If it is a ski/snowboarding trace, apply filters to identify runs/lifts:

```python
ski_df = hilly.ski.apply_filters(df)
ski_df.labels_str.unique().tolist()
# ['', 'lift-1', 'run-1', 'run-2', 'lift-2', 'run-3', 'lift-3', 'run-4']
```

The `labels_str` column labels points in the trace as belonging to a lift ride or run, otherwise it is empty. The number indicates a count of lift/runs.

From there you can get a summary for the trace (assuming it is over a single day):

```python
summary = hilly.ski.summary(ski_df)
#🏂 Ski Stats ⛷
#    runs: 4
#    Total Dist(km): 4.815023209198009
#    Longest Run(km): 1.409849302232853
#    Total time: 0 days 00:17:32
#    Total lift time: 0 days 00:36:55.990000
#    Time Ratio: 0.4747313841668961
```

Or, you can view the trace:

```python
# open leaflet map showing points, dropping datetime column for proper JSON
m = ski_df.drop(columns=["time"]).explore("labels", cmap="coolwarm_r")
m.show_in_browser()
```
![ski-point-map](docs/img/ski-point-map.png)

or rasterize the trace to get a density map:
```python
arr, bounds = hilly.utils.rasterize(ski_df, runs_only=True, res=1)
m = hilly.io.map_raster(arr, bounds)
m.show_in_browser()
```
![ski-raster-map](docs/img/ski-raster-map.png)

# Collecting Traces

There are many apps available for collecting traces. I use [OpenTracks](https://opentracksapp.com/) and follow the Export instructions from the settings menu.