semvec/pypi-packages huggingface dataset:
topsis-kritik 1.0.0
Python library for implementing TOPSIS for multi-criteria decision analysis.
License: MIT

# TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) Python Implementation

This repository contains a Python implementation of the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method, which is used for multi-criteria decision analysis. It ranks alternatives based on the performance data of various criteria and provides a final score and rank.

## Features

- **Multi-Criteria Decision Making (MCDM)**: Helps in evaluating and ranking alternatives based on multiple criteria.
- **Customizable Weights & Impacts**: Define the importance of each criterion and whether it's beneficial or non-beneficial.
- **Automated Scoring and Ranking**: Automatically computes a TOPSIS score and ranks the alternatives.

## Requirements

- Python 3.x
- `numpy` and `pandas` libraries

To install the required libraries, you can use:

```bash
pip install numpy pandas

Dataset
The dataset used in this project is a CSV file containing alternatives and criteria. The first row contains column headers (criteria names), and the first column contains the names of alternatives. The remaining columns represent the performance scores for each criterion.

Example Dataset (102203771-data.csv):
Fund Name	P1	P2	P3	P4	P5
M1	0.84	0.71	6.7	42.1	12.59
M2	0.91	0.83	7	31.7	10.11
M3	0.79	0.62	4.8	46.7	13.23
M4	0.78	0.61	6.4	42.4	12.55
M5	0.94	0.88	3.6	62.2	16.91
M6	0.88	0.77	6.5	51.5	14.91
M7	0.66	0.44	5.3	48.9	13.83
M8	0.93	0.86	3.4	37	    10.55

Usage

Input Format
Input CSV File: A CSV file where the first column is the alternative name, and the remaining columns represent the performance scores for each criterion.
Weights: A comma-separated string defining the weights for each criterion (e.g., 0.25,0.25,0.25,0.15,0.10).
Impacts: A comma-separated string defining the impact of each criterion (e.g., +,+,+,+,-). + represents a beneficial criterion, while - represents a non-beneficial criterion.

Running the Package
To run the script, use the following command in the terminal or command prompt:
python Topsis.py 102203771-data.csv 0.25,0.25,0.25,0.15,0.10 +,+,+,+,- output.csv

Output
After running the command, the package will generate an output file output.csv with the following additional columns:

TOPSIS Score: The calculated score for each alternative.
Rank: The rank based on the TOPSIS score (1 is the best).

Fund Name	P1	P2	P3	P4	P5	TOPSIS Score	Rank
M1	0.84	0.71	6.7	42.1	12.59	0.644718515	2
M2	0.91	0.83	7	31.7	10.11	0.680361059	1
M3	0.79	0.62	4.8	46.7	13.23	0.443784812	7
M4	0.78	0.61	6.4	42.4	12.55	0.563499544	4
M5	0.94	0.88	3.6	62.2	16.91	0.489616631	6
M6	0.88	0.77	6.5	51.5	14.91	0.639262133	3
M7	0.66	0.44	5.3	48.9	13.83	0.376340122	8
M8	0.93	0.86	3.4	37	    10.55	0.514142481	5

License

This project is licensed under the MIT License
string-fixer 0.5.0
Change quote style in Python files
License: MIT
Requires Python: >=3.8

# String Fixer

Simple tool to replace "double quotes" with 'single quotes' in Python files.

There are many tools out there to lint and format Python code. The most popular formatter, Black,
[prefers double quotes to single quotes](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#strings).
Ruff is a bit more flexible, but doesn't format docstrings with single quotes
(it [lets you skip formatting them](https://github.com/astral-sh/ruff/issues/7615#issuecomment-1831179705) to preserve your own quotation style).

Neither project seems likely to add the option for entirely single-quoted code, so this tool can work as a post-processor to fix that.

## Usage

### CLI

```bash
# run against single file
python -m string_fixer --target my_file.py
# run against directory
python -m string_fixer --target lib/src/
# run against working dir
python -m string_fixer
```

### IDE Plugins

This project has an accompanying [VSCode extension](https://github.com/Crozzers/string-fixer/tree/main/extensions/vscode).


## Configuration

Configuration is done via the `pyproject.toml` file and the default settings are as follows:
```toml
[tool.string-fixer]
# file or folder to format
target = "./"
# set to true to print planned changes but not modify any files (overrides `output` config)
dry_run = false
# write a copy of the files to this directory, rather than modifying them inplace
output = "./"
# list of glob patterns for files to ignore. this value is autopopulated from `.gitignore` files as well
# as a few default values. anything you put in this list will be added to this set, rather than replacing
# it. Use the `include` option to override
ignore = [
    # these are the defaults
    "./**/.*",
    "./**/site-packages",
    "./**/node_modules",
    "./**/build",
    "./**/dist",
    "./**/__pycache__",
    "./**/venv"
]
# list of glob patterns for files to include. This setting overrides `ignore`
include = []
# extend and override options in another pyproject.toml file
extends = ""
# python version to target for compatibility (defaults to current python version)
# this must be a string because `float("3.10") == 3.1`
target_version = "3.12"
# try to produce strings with the least number of escapes, even if that means deviating from the quote style
prefer_least_escapes = true
# preferred quote style. Allowed options are 'single' or "double"
quote_style = "single"
```

All file paths are resolved relative to the `pyproject.toml`'s location.


## See Also

- [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=Crozzers.string-fixer) ([source](https://github.com/Crozzers/string-fixer/tree/main/extensions/vscode))
- [PyPI package](https://pypi.org/project/string-fixer/) ([source](https://github.com/Crozzers/string-fixer/tree/main/lib))