semvec/pypi-packages huggingface dataset:
pymesa-web 1.0
Python support for the MESA-Web stellar evolution portal
Requires Python: >=3.7

#############################
The PyMESA-Web Python Package
#############################

.. image:: https://img.shields.io/github/license/rhdtownsend/pymesa-web
   :alt: GitHub
   :target: https://github.com/rhdtownsend/pymesa-web/blob/main/COPYING
.. image:: https://img.shields.io/github/issues/rhdtownsend/pymesa-web
   :alt: GitHub issues
   :target: https://github.com/rhdtownsend/pymesa-web/issues

Overview
========
	    
PyMESA-Web is a Python package that provides support for the `MESA-Web
stellar evolution portal
<http://user.astro.wisc.edu/~townsend/static.php?ref=mesa-web>`__. Releases
are hosted on `PyPI <https://pypi.org/>`__; therefore, the easiest way
to install is to use `pip` or a similar tool::

  pip install pymesa-web
Topsis-Radhika-102203126 1.0.0
A brief description of your package
Requires Python: >=3.6

# Topsis
A Python package for implementing the TOPSIS method for multi-criteria decision-making.
![PyPI version](https://img.shields.io/pypi/v/topsis)
![License](https://img.shields.io/pypi/l/topsis)
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a multi-criteria decision-making (MCDM) method. This package allows users to easily apply the TOPSIS method to datasets to rank alternatives based on multiple criteria.
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)
## Installation

Install the package using pip:
```bash
pip install topsis

---

### **6. Usage**
Provide instructions on how to use the package, including code examples:
```markdown
## Usage

Import the package and use it in your Python scripts:
```python
from topsis import topsis

# Example usage
data = [[250, 16, 12, 5],
        [200, 16, 8, 3],
        [300, 32, 16, 4],
        [275, 32, 8, 4],
        [225, 16, 16, 2]]
weights = [0.25, 0.25, 0.25, 0.25]
impacts = ['+', '+', '-', '-']
rankings = topsis(data, weights, impacts)
print(rankings)

---

### **7. Examples**
Add real-world examples or use cases to help users understand how to apply the package:
```markdown
## Examples

Here’s how you can use the package to rank different laptops based on criteria like price, performance, and battery life.
## Contributing

Contributions are welcome! Please fork the repository and submit a pull request. For major changes, open an issue first to discuss what you would like to change.
## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contact

For questions or support, reach out at your.email@example.com.
102217211-ashmeet-topsis 1.0.0
A Python package for TOPSIS calculation
Requires Python: >=3.6

# **TOPSIS Package**  
_A Python package for decision-making using the TOPSIS method._  

---

## **What is TOPSIS?**  
The **Technique for Order Preference by Similarity to Ideal Solution (TOPSIS)** is a multi-criteria decision analysis method.  
It ranks alternatives based on their closeness to the ideal solution and farthest from the worst solution, making it an excellent tool for decision-making problems.  

---

## **Features**  
- Simple and efficient implementation of the TOPSIS algorithm.  
- Accepts a decision matrix via a CSV file.  
- Supports customizable weights and impacts for criteria.  
- Outputs the TOPSIS scores and ranks into an easy-to-read CSV file.  

---

## **Installation**  
You can install the package from PyPI using:  

```bash
pip install 102217211-ashmeet-topsis==1.0.0
```

---

## **How to Use**  

### **Run the Package**  

You can run the TOPSIS package directly from the command line using:  

```bash
python -m 102217211_ashmeet_topsis <input_file> <weights> <impacts> <output_file>
```

### **Parameters**  
- `<input_file>`: Path to the CSV file containing the decision matrix.  
- `<weights>`: Comma-separated weights for each criterion (e.g., `0.2,0.1,0.43,0.3`).  
- `<impacts>`: Comma-separated impacts for each criterion (e.g., `+,+,-,-`, where `+` indicates a benefit criterion and `-` indicates a cost criterion).  
- `<output_file>`: Path to the output CSV file where the results will be saved.  

---

## **Example Usage**  

### Input CSV (`input.csv`)  
```bash
Fund Name,P1,P2,P3,P4,P5
M1,0.91,0.83,6,53,15.19
M2,0.88,0.77,4.1,61.1,16.71
M3,0.67,0.45,3.5,59.4,16.01
M4,0.83,0.69,4.8,44.9,12.81
M5,0.74,0.55,6.7,66.3,18.57
M6,0.6,0.36,4,37.8,10.69
M7,0.72,0.52,4.4,40.7,11.59
M8,0.73,0.53,4.4,66.8,18.12
```

### Command  
```bash
python -m 102217211_ashmeet_topsis "input.csv" "0.2,0.1,0.4,0.3,0.1" "-,+,+,-,+" "output.csv"
```

### Output CSV (`output.csv`) 
```bash 
Fund Name,P1,P2,P3,P4,P5,TOPSIS Score,Rank
M1,0.91,0.83,6,53,15.19,0.7521,2
M2,0.88,0.77,4.1,61.1,16.71,0.8256,1
M3,0.67,0.45,3.5,59.4,16.01,0.4823,6
M4,0.83,0.69,4.8,44.9,12.81,0.6332,4
M5,0.74,0.55,6.7,66.3,18.57,0.6789,3
M6,0.6,0.36,4,37.8,10.69,0.3145,8
M7,0.72,0.52,4.4,40.7,11.59,0.4012,7
M8,0.73,0.53,4.4,66.8,18.12,0.5798,5
```

---

## **How It Works**  
1. **Normalization**: The decision matrix is normalized to bring all criteria onto a comparable scale.  
2. **Weighting**: Each criterion is multiplied by its corresponding weight.  
3. **Ideal Solutions**: Calculates the ideal best and worst solutions based on the impacts.  
4. **Distance Calculation**: Computes the distance of each alternative from the ideal best and worst solutions.  
5. **Ranking**: Scores and ranks alternatives based on their relative closeness to the ideal solution.  

---

## **License**  
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.  

---
Topsis-102216131 1.0.0
A Python implementation of the TOPSIS decision-making method
Requires Python: >=3.6

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution)

TOPSIS is a Python library for implementing the Technique for Order of Preference by Similarity to Ideal Solution, a multi-criteria decision-making method. This library allows users to rank alternatives based on given criteria, weights, and impacts.

Installation

You can install the library via pip:

pip install Topsis-102216131

Usage

Command-line Usage

The library can be used directly from the command line. Here's the general syntax:

python <program.py> <InputDataFile> <Weights> <Impacts> <ResultFileName>

Example

Create an input file, data.csv:

Name,C1,C2,C3,C4
A,250,16,12,5
B,200,32,8,3
C,300,24,10,4
D,275,20,11,4
E,225,28,9,2

Run the command:

python topsis.py data.csv "0.25,0.25,0.25,0.25" "+,+,-,+" result.csv

The output result.csv will contain:

Name,C1,C2,C3,C4,Topsis Score,Rank
A,250,16,12,5,0.64,2
B,200,32,8,3,0.43,4
C,300,24,10,4,0.78,1
D,275,20,11,4,0.56,3
E,225,28,9,2,0.36,5

Python Library Usage

Importing the Library

You can also use the library directly in Python:

from topsis import Topsis

# Input data
data = "data.csv"
weights = [0.25, 0.25, 0.25, 0.25]
impacts = ["+", "+", "-", "+"]
result_file = "result.csv"

# Perform TOPSIS
Topsis(data, weights, impacts, result_file)
print(f"Results saved in {result_file}")

Parameters

InputDataFile: A CSV file with the first column as the name of the alternatives and the rest as numeric criteria.

Weights: A comma-separated string of numeric weights (e.g., "0.25,0.25,0.25,0.25").

Impacts: A comma-separated string of impacts for each criterion, either + (positive impact) or - (negative impact).

ResultFileName: The name of the output CSV file where results will be saved.

Features

Validate input file format and values.

Handle missing or invalid values gracefully.

Normalize and weight criteria.

Calculate TOPSIS scores and rankings.

Limitations

All criteria must be numeric.

The number of weights and impacts must match the number of criteria.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Feel free to open issues or create pull requests to improve the library!