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
| from django.core import serializers | |
| from django.db.models import get_app, get_models | |
| from django.db.models.query import QuerySet | |
| def export_filer_models(output_file=None): | |
| """ | |
| Exports filer models to output_file. | |
| """ | |
| app = get_app('filer') |
| """ | |
| Original Author Ernesto P. Adorio, Ph.D | |
| Original Source: http://my-other-life-as-programmer.blogspot.com/2012/02/python-finding-nearest-matching-color.html | |
| Modifed By: JDiscar | |
| This class maps an RGB value to the nearest color name it can find. Code is modified to include | |
| ImageMagick names and WebColor names. | |
| 1. Modify the minimization criterion to use least sum of squares of the differences. | |
| 2. Provide error checking for input R, G, B values to be within the interval [0, 255]. |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: