semvec/pypi-packages huggingface dataset:
stravacookies 1.3
A small package providing methods for retrieving Strava's HTTP cookies needed to download Strava's global heatmap in high resolution.
Requires Python: >=3.6

# stravacookies

`stravacookies` is a small python package providing a few classes for retrieving HTTP cookies from Strava web servers.

These cookies allow web browsers to get the high-resolution version of the Global [Strava Heatmap](https://www.strava.com/heatmap). The very same
cookies can also be used by cartographic applications
(such as [JOSM](https://josm.openstreetmap.de) and
[Cartograph Maps](https://www.cartograph.eu))
to get Strava Heatmap tiles via Tile Map Service
([TMS](https://en.wikipedia.org/wiki/Tile_Map_Service)).

Permission to use the hi-res Strava Heatmap in JOSM has been granted by Strava,
see https://wiki.openstreetmap.org/wiki/Strava
and https://wiki.openstreetmap.org/wiki/Permissions/Strava

## How it works
Hi-res Gloval Strava Heatmap is available to Strava registered users only.
When you click to
https://www.strava.com/heatmap and login to Strava, your browser gets several
cookies that it includes in later requests to be granted permission to download
the hi-res tiles of the Strava Heatmap.

The authentication process consist of three steps:

1. The user fills in the login form at https://strava.com/login.
2. Upon submit, the browser sends a POST request to
https://www.strava.com/session,
`email=<STRAVA_EMAIL>`, `password=<STRAVA_PASSWORD>`,
`remember-me` checkbox set,
and in exchange it receives `_strava4_session`, `strava_remember_id`, and `strava_remember_token`cookies from the server.
3. The browser sends a GET request to https://heatmap-external-a.strava.com/auth
with the previous session cookies set, and gets `CloudFront-Signature`, `CloudFront-Policy`, and `CloudFront-Key-Pair-Id` cookies from server.

The last three cookies are those needed to allow the browser to download
the high-res heatmap tiles. Concatenating the cookie strings to the TMS URLs (as
shown below) allows external applications (such as JOSM or Cartograph Maps)
to download the hi-res tiles from Strava.

Example of a TMS URL that can be used in JOSM to get the hi-res version
of the Strava Heatmap:
```
tms[3,15]:https://heatmap-external-{switch:a,b,c}.strava.com/tiles-auth/run/hot/{zoom}/{x}/{y}.png?Key-Pair-Id=<YOUR_KEY_PAIR_ID_COOKIE_VALUE>&Policy=<YOUR_POLICY_COOKIE_VALUE>&Signature=<YOUR_SIGNATURE_COOKIE_VALUE>
```
Cookies expire, so it is necessary to re-login to Strava from time to
time to get up to date cookies.

## Requirements
To download all needed Strava cookies, a Strava account (email/password) is needed. Facebook/Google/Apple login to Strava is not supported. You can register to Strava at https://www.strava.com/register.

## Licence
`stravacookies` is distributed under the GPL v3.0 licence.
cmprs-eden 0.1a3
EDEN compression written in PyTorch
Requires Python: >=3.9

# EDEN compression

[![PyPI](https://img.shields.io/pypi/v/cmprs-eden.svg)](https://pypi.org/project/cmprs-eden/)
[![Changelog](https://img.shields.io/github/v/release/cmprs/eden?include_prereleases&label=changelog)](https://github.com/cmprs/eden/releases)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cmprs/eden/blob/main/LICENSE)

A PyTorch implementation of 'EDEN: Communication-Efficient and Robust Distributed Mean Estimation for Federated
Learning', presented at [ICML 2022](https://proceedings.mlr.press/v162/vargaftik22a.html).

## Installation

Install this library using `pip`:

    pip install cmprs-eden

## Usage

```python
from cmprs_eden import eden
import torch

from dataclasses import astuple

compression = eden(bits=1)

x = torch.randn(2 ** 12)

compressed_x, context, bitrate = astuple(compression.forward(x))
reconstructed_x = compression.backward(compressed_x, context)
```

## Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

    cd <project-checkout-folder>
    python -m venv venv
    source venv/bin/activate

Now install the development dependencies:

    pip install -e ".[test,preprocess]"

### To run the tests:

    pytest

## Citation

If you find this useful, please cite us:

```bibtex
@InProceedings{pmlr-v162-vargaftik22a,
  title = 	 {{EDEN}: Communication-Efficient and Robust Distributed Mean Estimation for Federated Learning},
  author =       {Vargaftik, Shay and Basat, Ran Ben and Portnoy, Amit and Mendelson, Gal and Itzhak, Yaniv Ben and Mitzenmacher, Michael},
  booktitle = 	 {Proceedings of the 39th International Conference on Machine Learning},
  pages = 	 {21984--22014},
  year = 	 {2022},
  editor = 	 {Chaudhuri, Kamalika and Jegelka, Stefanie and Song, Le and Szepesvari, Csaba and Niu, Gang and Sabato, Sivan},
  volume = 	 {162},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {17--23 Jul},
  publisher =    {PMLR},
  pdf = 	 {https://proceedings.mlr.press/v162/vargaftik22a/vargaftik22a.pdf},
  url = 	 {https://proceedings.mlr.press/v162/vargaftik22a.html},
  abstract = 	 {Distributed Mean Estimation (DME) is a central building block in federated learning, where clients send local gradients to a parameter server for averaging and updating the model. Due to communication constraints, clients often use lossy compression techniques to compress the gradients, resulting in estimation inaccuracies. DME is more challenging when clients have diverse network conditions, such as constrained communication budgets and packet losses. In such settings, DME techniques often incur a significant increase in the estimation error leading to degraded learning performance. In this work, we propose a robust DME technique named EDEN that naturally handles heterogeneous communication budgets and packet losses. We derive appealing theoretical guarantees for EDEN and evaluate it empirically. Our results demonstrate that EDEN consistently improves over state-of-the-art DME techniques.}
}
```