semvec/pypi-packages huggingface dataset:
Topsis-Vanshika-102067007 0.5.5
This a Topsis package.

# Topsis
The package includes a TOPSIS class that can be used to perform the analysis. The class takes the following parameters:

Source File: Contains a decision matrix with rows as alternatives and columns as criteria
Weights: A string representing the weight of each criterion
Impacts: A string representing the impact of each criterion (+ for positive impact, - for negative impact)

# Algorithm :    
### STEP 1 :    
Create an evaluation matrix consisting of m alternatives and n criteria, with the intersection of each alternative and criteria.   
Apply any preprocessing if required.   
### STEP 2 :   
The matrix is then normalised using the norm.

### STEP 3 :
Calculate the weighted normalised decision matrix.

### STEP 4 :
Determine the worst alternative and the best alternative.

### STEP 5 :
Calculate the L2-distance between the target alternative i and the worst condition.

### STEP 6 :
Calculate the similarity to the worst condition.

### STEP 7 :
Rank the alternatives according to final performance scores.   

## To install this package :
Use pip install VanshikaPackage
`pip install VanshikaPackage`

## To run the topsis function 
`topis <sourcefile.csv> "<weights_seperated_by_commas>" "<impact_seperated_by_commas>" <destinationfilename.csv>`
## example 
`topsis srcfile.csv "1,1,1,2" "+,+,+,-" dstfile.csv`
## License

Â© 2023 Vanshika

This repository is licensed under the MIT license. See LICENSE for details.
CaptionedFileFormat 1.1.0
A Python wrapper for the Captioned File (CPTF) file format
Requires Python: >=3.7

# Captioned File

This is a Python wrapper for the CPTN (CaPTioNed file) file format. For more info about the format  check <https://github.com/Oakchris1955/Captioned-File>

## Usage

To write bytes:

```py
from cptf import Buffer

# Create a new bytes object
data = Buffer()
data.create_new("Some content...", "Caption 1234") 
# This will change the caption of our data to "Caption 1234" and the content "Some content..."

# Let's get the raw bytes now and write them to "test.cptn"
with open("test.cptn", "wb") as f:
    f.write(data.get_bytes())
```

To read bytes:

```py
from cptf import Buffer

# Create a new bytes object
data = Buffer()

# Read bytes from file and decode them
with open("test.cptn", "rb") as f:
    # Note: read_from_bytes also outputs a dictionary contaning the caption, the content and the filename. However, it still writes those data to the Buffer object
    
    data.read_from_bytes(f.read()) # The function can take one optional argument, get_header which is a bool. If this is supplied and is True, the result dictionary will also include the caption, filename and content text size in bytes (although you could also use a len())

print(f"Filename: {data.filename}, Caption: {data.caption}, Content: {data.content}")
```