• Stars
    star
    4,369
  • Rank 9,386 (Top 0.2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Python module for learning all major algorithms

Pygorithm

Packagist Downloads Documentation Status Python 3.6 Say Thanks! Contributors
A Python module to learn all the major algorithms on the go!
Purely for educational purposes
https://images.gitads.io/pygorithm

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
>>> 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
>>> from pygorithm.sorting import bubble_sort
>>> code = bubble_sort.get_code()
>>> print(code)
  • To get the time complexity of an algorithm
>>> 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,
>>> 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 :)

More Repositories

1

Python-Programs

My collection of Python Programs
Python
988
star
2

Data-Structures-using-Python

This is my repository for Data Structures using Python
Jupyter Notebook
924
star
3

pyresparser

A simple resume parser used for extracting information from resumes
Python
752
star
4

ResumeParser

A simple resume parser used for extracting information from resumes
Python
272
star
5

django-notekeeper

📋 A pretty easy django notes app. Have a note, save it!
HTML
72
star
6

A-Simple-Note-Taking-Web-App

📋 An easy to use and deploy note taking web app built using Flask
HTML
72
star
7

Django-Gym-Member-Manager

A Gym Member Manager Web App using Django
JavaScript
52
star
8

Smart-Surveillance-System-using-Raspberry-Pi

This is my Third Year Project for face recognition using OpenCV
Python
48
star
9

Django-to-do

A simple Django to do web app
Python
33
star
10

A-Simple-Note-Taking-Terminal-App

A simple terminal note taking application using Python
Python
24
star
11

Django-Bookworm

A fun project to store my learning from each book that I read.
Python
24
star
12

Django-Invoice-Generator

A minimal Invoice Generator using Django
JavaScript
18
star
13

Password-Strength-Evaluator-using-Machine-Learning

My TE Seminar mini project
HTML
15
star
14

Term-Similarity-using-Machine-Learning

This is a small project to find similar terms in corpus of documents
Python
13
star
15

Codechef-Problem-Statement-Downloader

Script for downloading codechef problem statements
Python
10
star
16

omkarpathak.github.io

Personal Website based on Jekyll and Github Pages
HTML
9
star
17

Playing-with-datasets

This is the repo for mini projects to get your hands dirty with Machine Learning
Jupyter Notebook
8
star
18

My-Personal-Website

[DEPRECATED] This is the source code for my website
HTML
8
star
19

CCDSAP-Prep

My Practice Problems for CodeChef Certified Data Structure & Algorithms Programme
Python
6
star
20

Garbage-Level-Monitoring-System

My BE Project using IoT, Cloud and Django
JavaScript
6
star
21

Django-Invoice-Generator-For-Local-Dairy-Shop

A simple web app made to automate invoice generation created to help a local dairy shop
JavaScript
5
star
22

Word-Counter

A Python word counter module to quickly count number of words in a sentence
Python
4
star
23

Tic-Tac-Toe-Using-Minimax

The classic tic-tac-toe game with a minimal AI using Minimax Algorithm
Python
3
star
24

SlowBros

JavaScript
3
star
25

poc

Python
2
star
26

old-website

Code to my old website
HTML
2
star
27

illustrations

My collection of all the illustration I created myself
2
star
28

globchem

Source code for Global Construction Chemical website
CSS
2
star
29

dotfiles

My dotfiles and preferences
Shell
1
star
30

django-rest-todo

A simple Django REST Api to create todo lists
TypeScript
1
star
31

omkarpathak

1
star
32

IoT_Workshop

These are the files that we used for our IoT workshops.
PHP
1
star
33

techminds

A new sample website template
HTML
1
star
34

django-ecommerce-template

A generic template to include all basic features needed for an ecommerce website
Python
1
star
35

Fun-with-Pygame

Some weekend fun with learning Python pygame module
Python
1
star