Skip to main content

Do you ever feel like all you’re doing is copy/pasting from Stack Overflow?

Let’s take it one step further.

from stackoverflow import quick_sort will go through the search results
of [python] quick sort looking for the largest code block that doesn’t
syntax error in the highest voted answer from the highest voted question
and return it as a module. If that answer doesn’t have any valid python
code, it checks the next highest voted answer for code blocks.
>>> from stackoverflow import quick_sort, split_into_chunks

>>> print(quick_sort.sort([1, 3, 2, 5, 4]))
[1, 2, 3, 4, 5]

>>> print(list(split_into_chunks.chunk("very good chunk func")))
['very ', 'good ', 'chunk', ' func']

>>> print("I wonder who made split_into_chunks", split_into_chunks.__author__)
I wonder who made split_into_chunks https://stackoverflow.com/a/35107113

>>> print("but what's the license? Can I really use this?", quick_sort.__license__)
but what's the license? Can I really use this? CC BY-SA 3.0
>>> assert("nice, attribution!")

This module is licensed under whatever license you want it to be as long as the license is compatible with the fact that I blatantly copied multiple lines of code from the Python standard library.

Release files for stackoverflow 0.1.2

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

Source distribution (sdist)

Source distribution for stackoverflow 0.1.2
File Size Uploaded
stackoverflow-0.1.2.tar.gz 3.5 kB Details

Built distribution (wheel)

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

Total release size: 8.7 kB

Release files / stackoverflow-0.1.2.tar.gz

Download URL stackoverflow-0.1.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3baa4a1d063ba51c3dce6f27668dfe94c2e3a58bb38caf9bb08a6ff63101f52e
BLAKE2b-256 checksum
How to use checksums
26c72312382c982a5f9c007d40d0def5cf2de109ac35cab0bfd1debfcfa1fd9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

Release files / stackoverflow-0.1.2-py3-none-any.whl

Download URL stackoverflow-0.1.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c880831394abfcd83486dfbed55b2286bddc0b18831d6a99f4b0005a4fc4296
BLAKE2b-256 checksum
How to use checksums
21d3a691bc970abd62734d8a4368258a5e799894e8782cdd0fcb332fa6b1bbd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

1 release file

0.1.0

2 release files

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