semvec/pypi-packages huggingface dataset:
DataStructures15 0.0.1
Data structure components module
License: MIT
Keywords: data_structure

This module is build for all those working professionals/students who have basic knowledge of Data Structures and want to save coding time,this module contains various single LinkedList,stack,queue operations.It also contains 5 sorting algorithms and 2 searching algorithms.

__________________________________________
Linked List Operations
------------------------------------------

from data_structure.linkedlist import create,traversal,insertAtEnd,insertBegin,insertMiddle

#Methods to create and Traverse Linked List

create("Hi") #To create node,creates one node at a time

create("How")

create("Are")

create("You")

traversal() #To traverse Linked List

Output:

Hi->How->Are->You->None

#Methods to Insert in Linked List

insertBegin("Hey,") #Insert at Beginning

traversal()

output:

Hey,->Hi->How->Are->You->None

insertMiddle(2,"Bro") #First parameter takes  position,second parameter takes data

traversal()

output:

Hey,->Hi->Bro->How->Are->You->None

insertAtEnd("Doing") #Inserting at end

traversal()

output:

Hey,->Hi->Bro->How->Are->You->Doing->None


__________________________________________
Stack Operations
------------------------------------------
from data_structure.stack import Stack

s = Stack()

#To push element in stack

s.push(50)

output:

'50 pushed'

s.push(80)

output:

'80 pushed'

#To peek the stack

s.peek()

output:

80

#To pop elements in stack

s.remove()

output:

80


__________________________________________
Queue Operations
------------------------------------------

from data_structure.queue import Queue

q=Queue()

#To insert elements into queue

q.insert(40)

output:

'40 inserted'

q.insert(50)

output:

'50 inserted'

#To remove elements from queue

q.remove()

output:

40

#To check size of Queue

q.size()

output:

1

__________________________________________
Sorting Operations
------------------------------------------

This module contains 5 sorting algorithms
which are:


1)bubbleSort.

2)mergeSort.

3)insertionSort.

4)shellSort.

5)selectionSort.

from data_structure.sort import mergeSort,bubbleSort,insertionSort,shellSort,selectionSort

sort = mergeSort([5,101,35,121,55,75])

print(sort)

output:

[5, 35, 55, 75, 101, 121]

sort = selectionSort([5,101,35,121,55,75])

print(sort)

output:

[5, 35, 55, 75, 101, 121]


__________________________________________
Searching Operations
------------------------------------------

from data_structure.search import linearSearch,binarySearch

#Linear Search

search = linearSearch([5,101,35,121,55,75],121)

print(search)
S
#Binary Search, Note list passed should be sorted

search = binarySearch([5, 35, 55, 75, 101, 121],121)

print(search)

output:

Found 121 at index 5

__________________________________________
Topsis-Harjot-101803217 1.1.9
Implementation of Topsis
License: MIT

# TOPSIS

Code by: Harjot Singh

<hr style = "border:2px solid gray"> </hr>

## Introduction

The Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) developed by Hwang &
Yoon,is a technique to evaluate the performance of alternatives through the similarity with the ideal
solution. According to this technique, the best alternative would be one that is closest to the positive-ideal
solution and farthest from the negative-ideal solution. The positive-ideal solution is one that maximizes the
benefit criteria and minimizes the cost criteria. The negative-ideal solution maximizes the cost criteria and
minimizes the benefit criteria. In summary, the positive-ideal solution is composed of all best values attainable
of criteria, and the negative-ideal solution consists of all the worst values attainable of criteria. 


## How to run

#### Before running, make sure you have pandas installed on your system

Open Terminal and input the following commands


>> pip install Topsis-Harjot-101803217



>> python
>>>from topsis.code import topsis
>>>topsis("data.csv","1,1,1,2","+,+,-,+","output.csv")

## Sample Input

This input was used to test the module

<table><thead><tr><th>Model</th><th>Corr</th><th>Rseq</th><th>RMSE</th><th>Accuracy</th></tr></thead><tbody><tr><td>M1</td><td>0.79</td><td>0.62</td><td>1.25</td><td>60.89</td></tr><tr><td>M2</td><td>0.66</td><td>0.44</td><td>2.89</td><td>63.07</td></tr><tr><td>M3</td><td>0.56</td><td>0.31</td><td>1.57</td><td>62.87</td></tr><tr><td>M4</td><td>0.82</td><td>0.67</td><td>2.68</td><td>70.19</td></tr><tr><td>M5</td><td>0.75</td><td>0.56</td><td>1.3</td><td>80.39</td></tr></tbody></table>

## Output 


<table><thead><tr><th>Model</th><th align="right">Corr</th><th align="center">Rseq</th><th>RMSE</th><th>Accuracy</th><th>Topsis Score</th><th>Rank</th></tr></thead><tbody><tr><td>M1</td><td align="right">0.79</td><td align="center">0.62</td><td>1.25</td><td>60.89</td><td>0.639133</td><td>2.0</td></tr><tr><td>M2</td><td align="right">0.66</td><td align="center">0.44</td><td>2.89</td><td>63.07</td><td>0.212592</td><td>5.0</td></tr><tr><td>M3</td><td align="right">0.56</td><td align="center">0.31</td><td>1.57</td><td>62.87</td><td>0.407846</td><td>4.0</td></tr><tr><td>M4</td><td align="right">0.82</td><td align="center">0.67</td><td>2.68</td><td>70.19</td><td>0.519153</td><td>3.0</td></tr><tr><td>M5</td><td align="right">0.75</td><td align="center">0.56</td><td>1.3</td><td>80.39</td><td>0.828267</td><td>1.0</td></tr></tbody></table>


## License

Â© 2020 Harjot Singh

This repository is licensed under the MIT license. See LICENSE for details.