semvec/pypi-packages huggingface dataset:
foliantcontrib.badges 1.0.4
Badges for Foliant.
License: MIT

[![](https://img.shields.io/pypi/v/foliantcontrib.badges.svg)](https://pypi.org/project/foliantcontrib.badges/) [![](https://img.shields.io/github/v/tag/foliant-docs/foliantcontrib.badges.svg?label=GitHub)](https://github.com/foliant-docs/foliantcontrib.badges)

# Badges

Preprocessor for Foliant which helps to add badges to your documents. It uses [Shields.io](https://shields.io) to generate badges.

# Installation

```bash
$ pip install foliantcontrib.badges
```

# Config

To enable the preprocessor, add `badges` to `preprocessors` section in the project config:

```yaml
preprocessors:
    - badges
```

The preprocessor has a number of options:

```yaml
preprocessors:
    - badges:
        server: 'https://img.shields.io'
        as_object: true
        add_link: true
        vars:
            jira_path: localhost:3000/jira
            package: foliant
        # badge look parameters
        style: flat-square
        logo: jira
```

`server`
:    Shields server URL, which hosts badges. default: `https://img.shields.io`

`as_object`
:    If `true` — preprocessor inserts `svg` badges with HTML `<object>` tag, instead of Markdown image tag. This is required for links and hints to work. default: `true`

`add_link`
:    If `true` preprocessor tries to determine the link which should be added to badge (for example, link to jira issue page for jira issue badge). Only works with `as_object = true`. default: `true`

> Please note that right now only links for **pypi** and **jira-issue** badges are being added automatically. Please contribute or contact author for adding other services.

`vars`
:    Dictionary with variables which will be replaced in badge urls. See **variables** section.

Also you may add parameters specified on the shields.io website which alter the badge view like: `label`, `logo`, `style` etc.

# Usage

Just add the `badge` tag and specify path to badge in the tag body:

```
<badge>jira/issue/https/issues.apache.org/jira/kafka-2896.svg</badge>
```

All options from config may be overriden in tag parameters:

```
<badge style="social" as_object="false">jira/issue/https/issues.apache.org/jira/kafka-2896.svg</badge>
```

## Variables

You can use variables in your badges to replace parts which repeat often. For example, if we need to add many badges to our Jira tracker, we may put the protocol and host parameters into a variable like this:

```yaml
preprocessors:
    - badges:
        vars:
            jira: https/issues.apache.org/jira
```

To reference a variable in a badge path use syntax `${variable}`:

```
<badge>jira/issue/${jira}/kafka-2896.svg</badge>

Description of the issue goes here. But it's not the only one.

<badge>jira/issue/${jira}/KAFKA-7951.svg</badge>

Description of the second issue.
```
Topsis-Samarjot-102003242 1.0
Python package implementing TOPSIS multi-criteria decision making method.
License: MIT

# TOPSIS  multi-criteria decision making - Python

**Assignment 1 : UCS654**

Submitted By: **Samarjot Singh 102003242**

***

## What is TOPSIS?

**TOPSIS**, known as Technique for Order of Preference by Similarity to Ideal Solution, is a multi-criteria decision analysis method. It compares a set of alternatives based on a pre-specified criterion. The method is used in the business across various industries, every time we need to make an analytical decision based on collected data. More details at [YouTube](https://www.youtube.com/watch?v=kfcN7MuYVeI&ab_channel=ManojMathew).

<br>

## How to run this package:

TOPSIS-Samar 102003242  can be used by running following command in CMD:

```
>> topsis 102003242-data.csv "1,1,1,2,1" "-,+,+,-,+" 102003242-result.csv
```

<br>

## Sample dataset

The decision matrix should be constructed with each row representing a Fund Name, and each column representing a criterion P1, P2, P3, P4, P5.

Fund Name | P1 | P2 | P3 | P4 | P5
------------ | ------------- | ------------ | ------------- | ------------- | ------------
M1 |	0.72 | 0.52	| 4.4 | 62.1 | 16.94
M3 |	0.72 | 0.52	| 5.7 | 48.6 | 13.91
M2 |	0.76 | 0.58	| 4.2 | 39.4 | 11.21
M4 |	0.68 | 0.46	| 6.7 | 50 | 14.46
M5 |	0.67 | 0.45	| 5.2 | 62.2 | 17.13
M6 |	0.86 | 0.74	| 5.2 | 63.8 | 17.65
M7 |	0.93 | 0.86	| 4.5 | 65.6 | 17.97
M8 |	0.78 | 0.61	| 5.4 | 69.7 | 19.12

Weights(`w`) and Impacts(`i`) will be applied later in the code.

<br>

## Output

```
 Row No.   Performance Score    Rank
--------  -------------------  ------
  3            0.332629          8
  2            0.555383          1
  1            0.548848          2
  4            0.530816          3
  5            0.354290          6
  6            0.421567          5
  7            0.435080          4
  8            0.353907          7
```
<br>
The rankings are displayed in the form of a table with the 1st rank offering us the best decision and last rank offering the worst decision making, according to TOPSIS method.
Topsis-102003242 1.0.0
Python package implementing TOPSIS multi-criteria decision making method.
License: MIT

# TOPSIS  multi-criteria decision making - Python

**Assignment 1 : UCS654**

Submitted By: **Samarjot Singh 102003242**

***

## What is TOPSIS?

**TOPSIS**, known as Technique for Order of Preference by Similarity to Ideal Solution, is a multi-criteria decision analysis method. It compares a set of alternatives based on a pre-specified criterion. The method is used in the business across various industries, every time we need to make an analytical decision based on collected data. More details at [YouTube](https://www.youtube.com/watch?v=kfcN7MuYVeI&ab_channel=ManojMathew).

<br>

## How to run this package:

TOPSIS-Samar 102003242  can be used by running following command in CMD:

```
>> topsis 102003242-data.csv "1,1,1,1,1" "+,+,-,+,+" 102003242-result.csv
```

<br>

## Sample dataset

The decision matrix should be constructed with each row representing a Fund Name, and each column representing a criterion P1, P2, P3, P4, P5.

Fund Name | P1 | P2 | P3 | P4 | P5
------------ | ------------- | ------------ | ------------- | ------------- | ------------
M1 |	0.72 | 0.52	| 4.4 | 62.1 | 16.94
M3 |	0.72 | 0.52	| 5.7 | 48.6 | 13.91
M2 |	0.76 | 0.58	| 4.2 | 39.4 | 11.21
M4 |	0.68 | 0.46	| 6.7 | 50 | 14.46
M5 |	0.67 | 0.45	| 5.2 | 62.2 | 17.13
M6 |	0.86 | 0.74	| 5.2 | 63.8 | 17.65
M7 |	0.93 | 0.86	| 4.5 | 65.6 | 17.97
M8 |	0.78 | 0.61	| 5.4 | 69.7 | 19.12

Weights(`w`) and Impacts(`i`) will be applied later in the code.

<br>

## Output

```
 Row No.   Performance Score    Rank
--------  -------------------  ------
  3            0.332629          8
  2            0.555383          1
  1            0.548848          2
  4            0.530816          3
  5            0.354290          6
  6            0.421567          5
  7            0.435080          4
  8            0.353907          7
```
<br>
The rankings are displayed in the form of a table with the 1st rank offering us the best decision and last rank offering the worst decision making, according to TOPSIS method.