semvec/pypi-packages huggingface dataset:
cnncam 1.0.0
Gradient Based Class Activation Maps for TensorFlow models.

# cnncam
<!-- badges: start -->
![Maintainer](https://img.shields.io/badge/maintainer-rawanmahdi-pink)
[![PyPI version](https://badge.fury.io/py/cnncam.svg)](https://badge.fury.io/py/cnncam)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) [![License:
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/mit/) 
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![Github All Releases](https://img.shields.io/github/downloads/rawanmahdi/cnncam/total.svg)]()
[![GitHub release](https://img.shields.io/github/release/rawanmahdi/cnncam.svg)](https://GitHub.com/rawanmahdi/cnncam/releases/)
![TF](https://img.shields.io/badge/TF-black?style=flat-square&logo=tensorflow)
![NumPy](https://img.shields.io/badge/NumPy-black?style=flat-square&logo=numpy)
<!-- [![DOI](https://joss.theoj.org/papers/10.21105/joss.02027/status.svg)](https://doi.org/10.21105/joss.02027)
 -->
<!-- badges: end -->

## Introduction

An open python library for researchers and developers to generate GradCAM explanations for the tensorflow CNN models. 

Other popular python ML frameworks will soon be supported by the cnn-cam library

### Install

The below instructions assume you already have `pip` installed and exposed to the python environment where you want to run `cnncam`. 
Official instructions for installing `pip` can be found [here](https://pip.pypa.io/en/stable/installation/)

Run the below pip command in a shell of your choice. 
```
pip install cnncam
```

### Demo

We currently support two ways of obtaining GradCAM heatmaps:

1. Display heatmap.
If you're only interested in seeing the heatmap images for your model's prediction, you can run the below script:

```python
from cnncam import display_heatmap

display_heatmap(model=model, # your keras model
                img=img, # your image
                predicted_class=pred, # your models prediction for the image 
                layer_name='block5_conv3', # the layer you would like to see GradCAM for 
                alpha=0.6 # opacity of heatmap overlayed on image
                )
```
![alt text](https://github.com/rawanmahdi/cnncam/blob/main/examples/output_images/meso_grass_hmap.png?raw=true)

See `/examples` for executable examples, including the above application of our implementation of GradCAM on VGG-16 with the ower of this repo's very cute cat, meso.
payok.io 1.0.7
Asynchronous PayOK API wrapper
Keywords: python,payok.io,payments,payok-api,async,asyncio


<div align="left">
    <h1>PayOK    <img src="https://payok.io/files/image/logo_white.svg" width=64 height=24></h1>
    <p align="left" >
        <a href="https://pypi.org/project/payok.io/">
            <img src="https://img.shields.io/pypi/v/payok.io?style=flat-square" alt="PyPI">
        </a>
        <a href="https://pypi.org/project/payok.io/">
            <img src="https://img.shields.io/pypi/dm/payok.io?style=flat-square" alt="PyPI">
        </a>
    </p>
</div>

A simple, yet powerful library for [PayOK API](https://payok.io/cabinet/documentation/doc_api_main)


## Usage

With ``PayOK`` you can easily create and retrieve payment and payout info, get informaition about your account's balance and commissions, etc.

## Documentation

Official docs can be found on the [API's webpage](https://payok.io/cabinet/documentation/doc_api_main)

## Installation

```bash
pip install payok.io
```

## Requirements

 - ``Python 3.7+``
 - ``aiohttp``
 - ``pydantic``

## Features

 - ``Asynchronous``
 - ``Exception handling``
 - ``Pydantic return model``
 - ``LightWeight``

## Basic example

```python
import payok

from payok import PayOK, PayOKError


api = PayOK(
    'api_id', 'api_key',
) 


async def main():

    try:

        await api.get_balance()

    except PayOKError as exc:

        print(exc)

    payments = await api.get_payments(project_id=1)  # project_id can be provided in __init__
    print(payments[0].id, payments[0].status)


asyncio.run(main())
```

Developed by Nikita Minaev (c) 2023