Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python Data Structures and Algorithms

Project description

Python Data Structures and Algorithms

GitHub issues GitHub forks GitHub stars GitHub license PayPal

One utility to get all the algorithms fast and ready into your project, analyze their visualizations for your specific test case (not nature of increase but actual running time) and study their implementation for academic purposes. :+1:

This library is under active development. :star: Star the repo for updates.

Api Docs

Read the full doumentation here API Docs

Install

pip3 install gopy

or

pip install gopy

Usage

You can test this by making a python file test.py

Example: Bubble Sort

from gopy.sorting import bubble
print(bubble.sort([5,4,3,2,1]))

Output:

[1,2,3,4,5]

Example: Linear Search

from gopy.search import lsearch
print(lsearch.search(3,[5,4,3,2,1]))

Output:

2

Example: Binary Search

from gopy.search import bsearch
print(bsearch.search(30,[5,4,3,2,1]))

Output:

Not Found

For Analysis

Building awesome visualizations for algorithms

Although on paper one algorithm might prove better than other but it's mostly based on nature of order of increase in running time with respect to input size. However, in practice an algorithm having higher runtime complexity than others may actually have a smaller runtime for your specific test case. With gopy, you can test each algorithm's behavior for your specific input and test case and compare actual running times in practice.

eg:

test for knuth_morris_pratt

from gopy.profile import profile
from gopy.strings.knuth_morris_pratt import match 
print(profile('match("ABCDAADDABCABAB","A")'))

This will make in depth visualizations in your browser for the kmp algorithm.

List of implementations

Contributing

Any form of contribution is welcome :smile:

Support

If this project helps you, consider supporting

OR

Paypal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gopy, version 0.7.3
Filename, size File type Python version Upload date Hashes
Filename, size gopy-0.7.3-py3-none-any.whl (53.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size gopy-0.7.3.tar.gz (25.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page