For inline links, do this Link text
This is a paragraph that contains a link.
Here's a code block:
# Build a wheel (outputs to dist/ directory) | |
python setup.py sdist bdist_wheel | |
# Build with pyinstaller | |
pyinstaller myfile.spec -w -F -y | |
## If no spec file currently exists | |
pyinstaller mypackage/main.py |
# Sphinx docs | |
docs/_build | |
# Logging | |
logs/* | |
!logs/.gitkeep | |
# Testing and coverage | |
cov.xml | |
.pytest_cache/ |
# Installing a python wheel | |
pip install some-package.whl | |
# Creating a python wheel | |
pip wheel --wheel-dir=path/to/save/wheel wheel_filename | |
# See https://python101.pythonlibrary.org/chapter39_wheels.html | |
# PEP427 (describes the wheel format) |
For the whole repository: | |
$ 2to3 --output-dir=python3-version/mycode -W -n python2-version/mycode | |
For a single file: | |
$ 2to3 filename.py | |
# See details at: | |
# https://docs.python.org/2/library/2to3.html | |
# Stack overflow |
# To generate baseline images | |
py.test --mpl-generate-path=baseline | |
# To run pytest with the matplotlib plugin | |
py.test --mpl | |
# See full details here | |
# https://github.com/matplotlib/pytest-mpl |
import numpy as np | |
import inspect | |
from skimage import exposure, feature, filters, measure, morphology, \ | |
restoration, segmentation, transform, util | |
def only_one_nondefault(args): | |
""" | |
Returns True if the function has only one non-keyword parameter, | |
False otherwise. |
import os | |
import logging | |
import sys | |
import time | |
import traceback | |
from mypackage import __version__ | |
def _exception_handler(error_type, error_value, error_traceback): |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
{ | |
"editor.rulers": [ | |
80 | |
], | |
"autoDocstring.docstringFormat": "numpy", | |
"python.linting.pylintEnabled": false, | |
"python.linting.flake8Enabled": true, | |
"window.zoomLevel": 0, | |
"python.formatting.provider": "autopep8", | |
"editor.formatOnSave": true, |