Skip to main content

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

Release files for gopy 0.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gopy 0.7.3
File Size Uploaded
gopy-0.7.3.tar.gz 25.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gopy 0.7.3
File Interpreter ABI Platform
gopy-0.7.3-py3-none-any.whl Python 3 none any Details

Total release size: 78.4 kB

Release files / gopy-0.7.3.tar.gz

Download URL gopy-0.7.3.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2022d231b2825d51142a10a37c3984f6fed09d93b88c8a84082b8e8b3bf84a64
BLAKE2b-256 checksum
How to use checksums
d291a618664e059c4a7aba0b208d2babea138ec7398c7b676fffba13c60859e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release files / gopy-0.7.3-py3-none-any.whl

Download URL gopy-0.7.3-py3-none-any.whl
Size 53.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25c98e5fa6628674666eb6cfb7abc3cb1e228be90776ac509de87f7f551136c2
BLAKE2b-256 checksum
How to use checksums
55d9249084be68e8863af94bb40675c23aad7c57c5e4b806248afcb0760c68fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.7.3 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page