semvec/pypi-packages huggingface dataset:
asv-bench-memray 0.1.1
A memray benchmark plugin for asv
License: MIT
Requires Python: >=3.8

# asv_bench_memray

This a proof-of-concept externally defined `memray` **benchmark plugin** for `asv`.

## Usage

In your `asv.conf.json` add the following to the requirements matrix:

``` json-with-comments
"matrix": {
    "req": {
        "numpy": ["1.21"],
        "asv_plugin_memray": [""]
    },
},
```

This should be enough for an example like the following to run:

``` python
import numpy as np

class MyBenchmark:
    params = [10, int(2e4)]

    def ray_sum(self, n):
        self.data = np.random.rand(n)
        np.sum(self.data)
```

Which should result in something roughly like:

```sh
ASV_RUNNER_PATH="../asv_runner" asv run --bench sum
· Creating environments.......
· Discovering benchmarks
·· Uninstalling from virtualenv-py3.9-asv_bench_memray.._asv_bench_memray-numpy1.21
·· Building 30a650cb <main> for virtualenv-py3.9-asv_bench_memray.._asv_bench_memray-numpy1.21.
·· Installing 30a650cb <main> into virtualenv-py3.9-asv_bench_memray.._asv_bench_memray-numpy1.21
· Running 1 total benchmarks (1 commits * 1 environments * 1 benchmarks)
[ 0.00%] · For project commit 30a650cb <main>:
[ 0.00%] ·· Benchmarking virtualenv-py3.9-asv_bench_memray.._asv_bench_memray-numpy1.21
[100.00%] ··· benchmarks.MyBenchmark.ray_sum                                                ok
[100.00%] ··· ======== =======
               param1         
              -------- -------
                 10     1.72k 
               20000     162k 
              ======== =======

ASV_RUNNER_PATH="../asv_runner" asv run --bench sum  8.72s user 3.04s system 99% cpu 11.877 total
```

## Development

During development, one needs to pass a relative path:

``` json-with-comments
"matrix": {
    "req": {
        "asv_bench_memray": ["../asv_bench_memray"]
    },
},
```

Also it may be necessary to cleanup older environments and explicitly point to an instance of `asv_runner`:

``` sh
rm -rf .asv && ASV_RUNNER_PATH="../asv_runner" asv run --bench sum
```

Personally I keep benchmarks for testing at an [experiments repo](https://github.com/HaoZeke/asv_experiments), but any local test will do.

### Conventions

Like all externally defined benchmark plugins for `asv`, this has a strict hierarchy.
- [X] The package name begins with `asv_bench`
- [X] Benchmarks are defined in a `benchmarks` folder under the package module
- [X] Each exported new benchmark type has the `export_as_benchmark = [NAMEBenchmark]` attribute

For more conventions follow the documention of `asv_runner`.

# License
MIT.
Topsis-Neelakshi-Gupta-102103766 1.0.0
Performs TOPSIS
License: MIT

## Project description

# Topsis

for: *Project-1 (UCS633)* submitted by: *Neelakshi Gupta* Roll no: 102103766 Group: *3COE27*

Topsis-Akshita-102103741 is a Python library for dealing with Multiple Criteria Decision Making(MCDM) problems by using Technique for Order of Preference by Similarity to Ideal Solution(TOPSIS).

## Installation

Use the package manager pip to install topsis.

```pip install Topsis-Neelakshi_Gupta-102103766```

## Usage
Enter csv filename followed by .csv extentsion, then enter the weights vector with vector values separated by commas, followed by the impacts vector with comma separated signs (+,-)

```topsis sample.csv "1,1,1,1" "+,-,+,+"```
or vectors can be entered without " "

```topsis sample.csv 1,1,1,1 +,-,+,+```

But the second representation does not provide for inadvertent spaces between vector values. So, if the input string contains spaces, make sure to enclose it between double quotes (" ").

To view usage help, use

```topsis /h```

## Example

### sample.csv

A csv file showing data for different mobile handsets having varying features.

| Model | Storage (in gb)  | Camera (in MP)  | Price (in $) | Looks (out of 5) |
|-------|------------------|-----------------|--------------|------------------|
| M1    | 16               | 12              | 250          | 5                |
| M2    | 16               | 8               | 200          | 3                |
| M3    | 32               | 16              | 300          | 4                |
| M4    | 32               | 8               | 275          | 4                |
| M5    | 16               | 16              | 225          | 2                |



weights vector = [ 0.25 , 0.25 , 0.25 , 0.25 ]

impacts vector = [ + , + , - , + ]

### input:

```topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"```

### output:

```
      TOPSIS RESULTS
-----------------------------

    P-Score  Rank
1  0.534277     3
2  0.308368     5
3  0.691632     1
4  0.534737     2
5  0.401046     4

```
## Other notes

The first column and first row are removed by the library before processing, in attempt to remove indices and headers. So make sure the csv follows the format as shown in sample.csv.
Make sure the csv does not contain categorical values

## License


[MIT](https://choosealicense.com/licenses/mit/)