semvec/pypi-packages huggingface dataset:
positional-defaults 2023.4.19
Set defaults for any positional-only parameter
License: MIT
Requires Python: >=3.8

positional_defaults
===================

**Python package to set defaults for any positional-only parameter**

This tiny Python package contains a decorator `@defaults` which lets you
specify default arguments for any positional-only parameter, no matter where
it appears in the argument list.

Installation
------------

    pip install positional_defaults

Usage
-----

Use the `@defaults` decorator to set default values for positional-only
parameters (i.e. those before the positional-only indicator `/`):

```py
from positional_defaults import defaults

@defaults(start=0)
def myrange(start, stop, /, step=1):
    ...

# now these are equivalent
myrange(4)
myrange(0, 4)
myrange(0, 4, 1)
```

This works on methods as well:

```py
class A:
    @defaults(start=0)
    def myrange(self, start, stop, /, step=1):
        ...
```

Multiple defaults can be set, which are filled in the order in which they are
specified:

```py
@defaults(forename='Alice', greeting='Welcome', prefix='Mrs')
def greet(greeting, prefix, forename, surname, /, suffix='Esq'):
    ...

# these are now equivalent
greet('Smith')
greet('Alice', 'Smith')
greet('Welcome', 'Alice', 'Smith')
greet('Welcome', 'Mrs', 'Alice', 'Smith')
greet('Welcome', 'Mrs', 'Alice', 'Smith', 'Esq')
```

Signatures
----------

Left-defaulted functions come with the correct signature:

```py
>>> from inspect import signature
>>> signature(myrange)
<Signature (start=0, stop, /, step=1)>
>>> signature(greet)
<Signature (greeting='Welcome', prefix='Mrs', forename='Alice', surname, /, suffix='Esq')>
```

These show up correctly in the usual places such as `help()`:

```py
>>> help(myrange)

Help on function myrange:

myrange(start=0, stop, /, step=1)

>>> help(greet)

Help on function greet:

greet(greeting='Welcome', prefix='Mrs', forename='Alice', surname, /, suffix='Esq')

```

Performance
-----------

When the package is compiled as a native extension (which is what pip will
deliver in the majority of cases), functions with positional defaults have
comparable performance with respect to their undecorated functions.
modelreport 0.2
A lightweight library to get the all classification metric scores.
License: MIT
Keywords: accuracy,confusion_matrix,precision_score,recall_score,f1_score,auc,matthews_corrcoef,cohen_kappa_score,classification report


Installation
-------------


    ```pip install -U modelreport```

Example
---------

from modelreport.metric import result_summary

print(result_summary(test data,predicted data))


`More Updates Coming Soon...` 😄


Contact
---------

I would like to get feedback from the community. If you have feature suggestions, support questions or general comments, please email me at susmit.vssut@gmail.com