semvec/pypi-packages huggingface dataset:
cuthon 0.5
A simple tool to select the first available GPU(s) and run Python
License: MIT
Keywords: gpu development cuda

======
cuthon
======

Cuthon is a simple Python script to avoid setting `CUDA_VISIBLE_DEVICES` when
running python programs on a GPU. The script will find the first *unused*
GPU(s) then run the program as usual. At its simplest::

  cuthon my_program.py

This tool is intended for a fairly niche use case: running python programs on
an interactive node which has more than one GPU. For those that have done this
often you may be relieved at never having to run `nvidia-smi` followed by
setting `CUDA_VISIBLE_DEVICES` again (when running a python program that is).

-------
Install
-------
Install with `pip`::

    pip install cuthon

-----
Usage
-----

In general, use `cuthon` just like you would use `python`.

- `cuthon` to launch a python repl.
- `cuthon -V` to see the python version number.
- `cuthon train_model.py` to run your program.

For help on available `cuthon` options type::

    cuthon -h --

The output will be::

    usage: cuthon.py [-h] [-n NUM_GPUS] [-l]

    Select the first unused GPU(s) and run Python. To pass the script arguments
    specify '--' between cuthon arguments and arguments to be passed through to
    your script. If '--' is not specified, then all arguments will be passed
    through.

    optional arguments:
      -h, --help            show this help message and exit
      -n NUM_GPUS, --num_gpus NUM_GPUS
                            The number of GPUs to use.
      -l, --least_used      Switch from an unused to a least-used policy.

For example, to run on two available GPUs execute::

    cuthon -n 2 -- train_model.py
localytics 1.42
Python API Client for Localytics Raw Data Export
License: MIT

# Python Client for Localytics Raw Data Export
This is a Python API Client for [Localytics Raw Data Export](https://docs.localytics.com/dev/export-apis.html#log-exports-api). It allows to export all events and sessions captured by Localytics. Data is written in JSON and available on hourly basis as log files.


## Installation
The client is currently best installed via Pypi:

```bash
    $ pip install localytics
```


## Usage
Let's have a walk through the functionalities through a couple of examples. Start by loading the library.

```python
    >>> from localytics import Localytics
```


### Setup and Authentication
In order for you to access the KPI Service, you need to authenticate with `api_key`. Your `api_secret`, once you supply it, will be used throughout the entire session.

```python
    >>> localytics = Localytics(api_key = 'XXXXX', api_secret= 'YYYYY')
```


### Download Data
There is a method  `download_data` that downloads data to local folder. Example shows how to export data for last 2 days:

```python
    >>> localytics.download_data(
            app_ids = ['AAAAA', 'BBBBB'],
            start_date = datetime.today() - timedelta(2),
            end_date = datetime.today()
        )
```

You can also specify optional parameters. This is more complex example:

```python
    >>> localytics.download_data(
        app_ids = ['AAAAA', 'BBBBB'],
        start_date = datetime.today() - timedelta(2),
        end_date = datetime.today(),
        destination_folder = 'data',
        compressed=True
    )
```

On default data are stored in `localytics_data` folder and compressed in `gz` format. Please set `compresses = True` if you want to store data decompressed.


## Contributions and bug reports.

Contributions and bug reports are only acceptable as GitHub Pull Requests and issues. Thanks!