-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e21199
commit 9671c38
Showing
9 changed files
with
109 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,72 @@ | ||
[![HitCount](http://hits.dwyl.com/debdutgoswami/sorting-visualizer.svg)](http://hits.dwyl.com/debdutgoswami/sorting-visualizer) | ||
|
||
<p align="center"> | ||
<a href="https://pypi.org/project/sorting-visualizer/" rel="nofollow"><img src="" alt="image" style="max-width:100%;"></a> | ||
<img src="https://img.shields.io/github/license/debdutgoswami/sorting-visualizer" alt="image" style="max-width:100%;"> | ||
<img src="https://img.shields.io/github/stars/debdutgoswami/sorting-visualizer" alt="image" style="max-width:100%"> | ||
</p> | ||
|
||
# Sorting Visualizer | ||
|
||
A simple python project which visualizes various sorting algorithms. | ||
A simple python project which visualizes various sorting algorithms. | ||
|
||
--- | ||
|
||
## How to setup | ||
|
||
1. Install the necessary packages using the command `pip instal -r requirements.txt`. | ||
Simply open up your terminal and type | ||
|
||
2. Run the `main.py` file using the command `python3 main.py`. | ||
``` | ||
pip3 install sorting-visualizer | ||
``` | ||
|
||
--- | ||
|
||
## Algorithms Implemented | ||
|
||
- [x] Bubble Sort | ||
- [x] Selection Sort | ||
- [x] Insertion Sort | ||
- [x] Merge Sort | ||
- [x] Bubble Sort (bubblesort) | ||
- [x] Selection Sort (selectionsort) | ||
- [x] Insertion Sort (insertionsort) | ||
- [x] Merge Sort (mergesort) | ||
- [ ] Quick Sort | ||
- [ ] Heap Sort | ||
|
||
--- | ||
|
||
## Technologies Used | ||
## Prerequisite | ||
|
||
1. Python 3.7 | ||
1. [ffmpeg](https://www.ffmpeg.org/download.html) | ||
|
||
--- | ||
|
||
## Libraries Used | ||
## How to use | ||
|
||
1. matplotlib | ||
1. Show the plot | ||
|
||
--- | ||
``` | ||
from sorting_visualizer import visualizer | ||
visualizer.visualize('bubblesort') | ||
``` | ||
2. Show and save the plot | ||
``` | ||
from sorting_visualizer import visualizer | ||
visualizer.visualize('bubblesort', save=True) | ||
``` | ||
3. Only save the plot and not show it | ||
``` | ||
from sorting_visualizer import visualizer | ||
visualizer.visualize('bubblesort', save=True, show=False) | ||
``` | ||
4. Saving in a particular location | ||
``` | ||
from sorting_visualizer import visualizer | ||
visualizer.visualize('bubblesort', save=True, path='path/to/directory') | ||
``` | ||
The default saving location is your current working directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# Inside of setup.cfg | ||
[metadata] | ||
description-file = README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import setuptools | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="sorting_visualizer", | ||
version="1.0", | ||
author="Debdut Goswami", | ||
author_email="[email protected]", | ||
description="A package to visualize various sorting algorithms.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/debdutgoswami/sorting-visualizer", | ||
download_url = 'https://github.com/debdutgoswami/sorting-visualizer/archive/v1.0.tar.gz', | ||
keywords = ['SORT', 'ALGORITHM', 'VISUALIZE'], | ||
packages=setuptools.find_packages(), | ||
install_requires=[ | ||
'matplotlib' | ||
], | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires='>=3.7', | ||
) |
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sortname = { | ||
'bubblesort': f'Bubble Sort O(n\N{SUPERSCRIPT TWO})', 'insertionsort': f'Insertion Sort O(n\N{SUPERSCRIPT TWO})', | ||
'selectionsort': f'Selection Sort O(n\N{SUPERSCRIPT TWO})', 'mergesort': 'Merge Sort O(n log n)', | ||
'quicksort': 'Quick Sort O(n log n)', 'heapsort': 'Heap Sort O(n log n)' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.