Need help with pygorithm?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

OmkarPathak
4.2K Stars 500 Forks MIT License 431 Commits 5 Opened issues

Description

A Python module for learning all major algorithms

Services available

!
?

Need anything else?

Contributors list

# 2,641
Python
python3
python-...
linode
212 commits
# 51,894
Python
python3
66 commits
# 88,958
Python
python3
24 commits
# 84,033
CSS
inbox
Shell
python3
8 commits
# 155,767
Python
python3
7 commits
# 27,033
Python
python3
Jupyter...
6 commits
# 4,114
Python
python3
longitu...
Shell
5 commits
# 178,672
Python
python3
Shell
5 commits
# 147,670
python3
proof-o...
html5
css-tri...
2 commits
# 191,814
python3
Shell
Racket
Elixir
2 commits
# 216,080
Shell
sed
c-plus-...
voronoi...
2 commits
# 124,222
python3
HTML
travis-...
Ember
2 commits
# 249,532
Python
python3
2 commits
# 248,132
CSS
python3
2 commits
# 217,392
python3
C
Jupyter...
Shell
1 commit
# 275,349
python3
REST AP...
Scala
Shell
1 commit
# 4,098
Python
python3
Jupyter...
sorting...
1 commit
# 133,404
python3
C++
Shell
1 commit
# 60,418
python3
dialogu...
machine...
HTML
1 commit
# 179,900
Python
python3
session...
login-s...
1 commit

Pygorithm

.. image:: https://img.shields.io/packagist/l/doctrine/orm.svg :target: https://github.com/OmkarPathak/pygorithm/blob/master/LICENSE :alt: Packagist

.. image:: http://pepy.tech/badge/pygorithm :target: http://pepy.tech/project/pygorithm :alt: Downloads

.. image:: https://readthedocs.org/projects/pygorithm/badge/?version=latest :target: http://pygorithm.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://img.shields.io/badge/Python-3.6-brightgreen.svg :target: https://github.com/OmkarPathak/pygorithm :alt: Python 3.6

.. image:: https://img.shields.io/badge/Say%20Thanks-%F0%9F%A6%89-1EAEDB.svg :target: https://saythanks.io/to/[email protected] :alt: Say Thanks!

.. image:: https://img.shields.io/github/contributors/omkarpathak/pygorithm.svg :target: https://github.com/OmkarPathak/pygorithm/graphs/contributors :alt: Contributors

| A Python module to learn all the major algorithms on the go! | Purely for educational purposes

.. image:: https://images.gitads.io/pygorithm :target: https://tracking.gitads.io/?campaign=gitads&repo=pygorithm&redirect=gitads.io

Features ~~~~~~~~

  • Super easy to use
  • A very easy to understand
    Documentation 
    _
  • Get the code right in your editor
  • Get time complexities on the go

Installation ~~~~~~~~~~~~

  • Just fire the following command in your terminal:

::

pip3 install pygorithm

  • | It's that easy. If you are using Python 2.7 use pip instead. Depending on your | permissions, you might need to use

    pip install --user pygorithm
    to install.
  • Or you can download the source code from

    here 
    _, and then just install the package using

::

python setup.py install

Quick Start Guide ~~~~~~~~~~~~~~~~~

  • To sort your list

.. code:: python

>>> from pygorithm.sorting import bubble_sort
>>> my_list = [12, 4, 3, 5, 13, 1, 17, 19, 15]
>>> sorted_list = bubble_sort.sort(my_list)
>>> print(sorted_list)
>>> [1, 3, 4, 5, 12, 13, 15, 17, 19]
  • To get the code for function used

.. code:: python

>>> from pygorithm.sorting import bubble_sort
>>> code = bubble_sort.get_code()
>>> print(code)
  • To get the time complexity of an algorithm

.. code:: python

>>> from pygorithm.sorting import bubble_sort
>>> time_complexity = bubble_sort.time_complexities()
>>> print(time_complexity)
  • To see all the available functions in a module, you can just type
    help()
    with the module name as argument. For example,

.. code:: python

>>> from pygorithm import sorting
>>> help(sorting)
    Help on package pygorithm.sorting in pygorithm:

NAME
    pygorithm.sorting - Collection of sorting methods

PACKAGE CONTENTS
    bubble_sort
    bucket_sort
    counting_sort
    heap_sort
    insertion_sort
    merge_sort
    modules
    quick_sort
    selection_sort
    shell_sort

Tests ~~~~~

  • Just type in the following command to run the tests ::

    python3 -m unittest

  • This will run all the tests defined in the files of the

    tests/
    directory

Donation ~~~~~~~~

If you have found my softwares to be of any use to you, do consider helping me pay my internet bills. This would encourage me to create many such softwares :)

  • PayPal 
    _
  • ₹ (INR) 
    _

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.