Giter Site home page Giter Site logo

strongsoda / gopy Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5.32 MB

Python Algorithms Library on Steroids :snake:

Home Page: https://strongsoda.github.io/gopy/

License: MIT License

Python 100.00%
python dsa algorithms algorithms-and-data-structures

gopy's Introduction

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. ๐Ÿ‘

This library is under active development. โญ 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 ๐Ÿ˜„

Support

If this project helps you, consider supporting

OR

Paypal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.