Licensing is an issue that must be dealt with on a website that is about sharing source code.


This website requires a validated email address before displaying any user-submitted code. Code submitted by unvalidated accounts will never show in search results and may be removed after 7 days of submission.

What can you do with the code on this site?

When a user validates their account they agree to:

  1. Only post code which they wrote themselves and for which they have the legal right to release it.
  2. They grant any third party (that is you, in other words) a royalty-free, non-exclusive license to copy and distribute that code and to make and distribute derivative works based on that code.
  3. Users have accepted that others can, and likely will, make improvements and changes to their submitted code snippets. The original submittor will always be credited on the website and in repository logs.

I want to submit code, what can/can't I do?

The complete terms of service were provided to you when you validated your account. In short you agreed to:

  • only submit code which you wrote yourself, or which you have the legal right to release;
  • allow others to freely use that code, make improvements, whether they resumbit those improvements here (hopefully), but they are not under obligation to do so;
  • you will not submit offensive, malicious or destructive code; and
  • we may, at our discretion, remove contributions you made to this site.

There are only two choices in terms of actual software licenses:

These two licenses are the most compatible with the aims of this site, described above. If you prefer a different license for your code, please host the code on another website (e.g. GitHub, BitBucket, Google Code), and feel free to create a link submission, rather than a code submission.

Code snippets must use the CC0 license, since it does not require attribution, which would be onerous for short snippets. We believe it is also the most suitable license for government and university employees that need to release code to the public domain.

Code packages can also chose the BSD license, as it is compatible with the spirit of reciprocity that appears in most open-source, Python-based scientific packages (IPython, matplotlib, SciPy, NumPy, and others).

For more background please take time to read the community discussion in this thread.