semvec/pypi-packages huggingface dataset:
nemoize 0.1.0
Decorator utility to memoize a class, function, or method
License: MIT
Requires Python: >=3.7,<4.0
Keywords: memoize,utility,decorator,decorators

# nemoize
Simple Python Memoizer decorator for classes, functions, and methods.

# Installation
nemoize is available on PyPi

```commandline
python3 -m pip install nemoize
```

Or you can install manually via the built distribution (wheel)/source dist from [PyPi](pypi.org/project/nemoize) or [github](https://github.com/spoorn/nemoize).


# How to Use

Import

```python
from nemoize import memoize
```

Then use the `@memoize` decorator on various entities as seen below

### Using on a Class

```python
@memoize
class Test:
    def __init__(self, value):
        self._value = value

    @property
    def value(self):
        return self._value
```

### Using on a function

```python
@memoize
def test_func():
    return "hoot"
```

### Using on an instance method

```python
class Owl:
    def __init__(self):
        self.food = 1337
        pass

    @memoize(max_size)
    def eat(self, num):
        self.food -= num
```

## Configuration

There are also various configuration parameters to `memoize()`:

- `@memoize(max_size=13)` : Max number of entries to keep in the cache: 
- `@memoize(cache_exceptions=True)` : Also cache exceptions, so any raised Exceptions will be the exact same Exception instance: 
- `@memoize(max_size=13, cache_exceptions=True)` : Together
- `@memoize(arg_hash_function=str)` : Changes the hash function on arg and each keyword-arg to use the str() function, which can make lists "hashable"

# Testing
The unit tests in `test/unit/test_memoize.py` run through various use cases of using the @memoize annotation on classes, functions, and instance methods.

# Benchmarking
There is a benchmarking utility under [`benchmark/`](https://github.com/spoorn/nemoize/tree/main/benchmark) that is used for benchmarking nemoize performance against other options and non-memoized scenarios.

Example numbers:

```commandline
Benchmark test for Memoized vs Non-memoized classes with [1000] computations in their__init__() methods for [1000000] iterations
Non-memoized class creation + empty method call average time (ms): 0.01550699806213379
Memoized class creation + empty method call average time (ms): 0.0012589995861053468

Benchmark test for @memoize, non-memoized, a @simplified_memoize, and @functools.lru_cache comparison usingfunction calculating fibonacci sum for [100] fib numbers, for [10000000] iterations
@simplified_memoize fib average time (ms): 0.0001555999994277954
@memoize fib average time (ms): 4.4699978828430175e-05
@memoize(cache_exceptions=True) (to avoid delegation to functools.lru_cache) fib average time (ms): 0.00034309999942779544
@functools.lru_cache fib average time (ms): 4.440000057220459e-05
```
XAI-Library 0.0.4
An integrated library for explanation methods.
License: MIT


|

=======
XAI-Lib
=======


   An integrated library for explanation methods.


A python library to develop explaninable machine learning models. The library provides an integrated interface to setup and execute explanation methods for black boxes.


.. _pyscaffold-notes:

Note
====

This project has been set up using PyScaffold 4.2.1. For details and usage
information on PyScaffold see https://pyscaffold.org/.
DataSika 1.0.3
Package for building pipeline by yaml file
License: MIT
Keywords: sika data pipeline

# DataSika :deer: 
Have you gotten stuck in data muds and needed to write pile of codes to handle just a tiny data type problems? Or have you bumped into some situations that you have to check out your spaghetti codes :spaghetti: for a long time to see what's wrong when cleaning your data?  Don't worry! :relieved: Here comes `DataSika` :deer:  for you! `DataSika` is a simple python package that allows you to produce your own data pipeline locally by writing some basic **standard yaml syntaxs**. You can do **webscrapping**, **api-requesting** based on our useful functions. Also, we provide some filter availabilities for you if you want to filter out some content by **xpath (for html responses)**, **jsonpath (for json responses)** and **sql (for manipulating dataframes)**. Can't wait to try? Just install it as soon as possible and test it with examples we provided! :satisfied: :sparkles: 

## Compatibility of python
- python version > `3.7`

## [PyPI Package](https://pypi.org/project/DataSika/)

## Environment SetUp
### Clone this project `(If you wanna run some examples!)`
- Using command: `git clone git@github.com:rainyjonne/DataSika.git`
- Manually download: clicking `Download ZIP file` from the green code button 

### Install Python
- [Install python directly](https://www.python.org/downloads/)
- [Using Pyenv](docs/envs/pyenv.md)
 
### Upgrade your pip if its version not new enough 
- [Install `pip`](https://pip.pypa.io/en/stable/installation/)
  - macOS: `python -m ensurepip --upgrade`
  - WSL, Linux: `python -m ensurepip --upgrade`

### Install our pacakge
- Just execute this command: `pip install DataSika`, then you can happily use this command with your yaml files! :tada: :confetti_ball: 
- Sika Command usage:
```
usage: sika [-h] [--input INPUT] [--output OUTPUT] [--rerun]

Build a simple pipeline by a yaml file

optional arguments:
  -h, --help       show this help message and exit
  --input INPUT    put in an input yaml file path
  --output OUTPUT  put a path for your output db
  --rerun          rerun the whole pipeline again, delete all data tables in your db file
```

## Running examples
- Making this package's command line tool works: `python setup.py install`
- Running our four examples:
  - Using command line tools:
    1. (ETL) Getting Ruby Gem Details Example: `sika --input examples/repominer.yaml`
    2. (ETL) Airbnb UK Hostings + UK Crime Data Example: `sika --input examples/airbnb-uk-crime.yaml`
    3. (EL) Getting Ruby Gem Lists Example: `sika --input examples/repominer-el.yaml`
    4. (EL) Airbnb Japan Hostings Example: `sika --input examples/airbnb-tokyo.yaml`
  - Using python scripts:
    1. (ETL) Getting Ruby Gem Details Example: `python sika/main.py --input examples/repominer.yaml`
    2. (ETL) Airbnb UK Hostings + UK Crime Data Example: `python sika/main.py --input examples/airbnb-uk-crime.yaml`
    3. (EL) Getting Ruby Gem Lists Example: `python sika/main.py --input examples/repominer-el.yaml`
    4. (EL) Airbnb Japan Hostings Example: `python sika/main.py --input examples/airbnb-tokyo.yaml`