A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
*.img | |
*.raw |
from contextlib import contextmanager | |
import sys, os | |
@contextmanager | |
def suppress_stdout(): | |
""" | |
source: https://gist.github.com/djsmith42/3956189 | |
usage: | |
print "You can see this" | |
with suppress_stdout(): |
from contextlib import contextmanager | |
import sys, os | |
@contextmanager | |
def suppress_stdout(): | |
with open(os.devnull, "w") as devnull: | |
old_stdout = sys.stdout | |
sys.stdout = devnull | |
try: | |
yield |
#!/usr/bin/env python | |
# Note, updated version of | |
# https://github.com/ipython/ipython-in-depth/blob/master/tools/nbmerge.py | |
""" | |
usage: | |
python nbmerge.py A.ipynb B.ipynb C.ipynb > merged.ipynb | |
""" | |
import io |
Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.
plain Git, aka git://github.com/
Does not add security beyond what Git itself provides. The server is not verified.
If you clone a repository over git://, you should check if the latest commit's hash is correct.
1. Log into GitHub
2. Fork this Gist
3. Edit your version to share your team's activity
PDF Liberation Hackpad
IRC: https://webchat.freenode.net/ Channel: #sunlightlabs
GitHub Markdown-Cheatsheet