Look, it's reST!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% formconfig as myconfig %} | |
{% config row using "forms/rows/p.html" %} | |
{% config widget widgets.TextInput for forms.CharField %} | |
... | |
{% endformconfig %} | |
{% form myform withconfig myconfig %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125669 Mozilla | |
21837 Python-urllib | |
13620 Wget | |
2424 Opera | |
1790 Download Master | |
1559 FDM 3.x | |
323 Axel 2.4 (Linux) | |
261 curl | |
245 Gnam Gnam Spider | |
242 Java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Media: | |
script = { | |
'text/coffeescript': ['one.coffee', 'two.coffee'] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
DB router for Trac. Very simple: just makes sure that all Trac tables are | |
queries against the "trac" DB alias. | |
It's very simplistic, leaving off allow_relation and allow_syncdb since all | |
the Trac apps are unmanaged. | |
""" | |
from unipath import FSPath as Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import inspect | |
import pygraphviz as pgv | |
from django.conf import settings; settings.configure() | |
from django.views import generic | |
class GenericViewGraph(pgv.AGraph): | |
_ignore_types = (None, object) | |
def __init__(self, *args, **kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
REQUEST = object() | |
def super_dec(obj): | |
if inspect.isclass(obj): | |
_original_dispatch = obj.dispatch | |
def _wrapped_dispatch(self, request, *args, **kwargs): | |
print "calling wrapped CBV-style dispatch" | |
assert request is REQUEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/django/contrib/auth/decorators.py b/django/contrib/auth/decorators.py | |
index 5805a31..5d35c0f 100644 | |
--- a/django/contrib/auth/decorators.py | |
+++ b/django/contrib/auth/decorators.py | |
@@ -1,10 +1,11 @@ | |
+import inspect | |
import urlparse | |
from functools import wraps | |
from django.conf import settings | |
from django.contrib.auth import REDIRECT_FIELD_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/django/contrib/auth/decorators.py b/django/contrib/auth/decorators.py | |
index 5805a31..a07a4d9 100644 | |
--- a/django/contrib/auth/decorators.py | |
+++ b/django/contrib/auth/decorators.py | |
@@ -1,10 +1,11 @@ | |
+import inspect | |
import urlparse | |
from functools import wraps | |
from django.conf import settings | |
from django.contrib.auth import REDIRECT_FIELD_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install gfortran | |
mkvirtualenv --no-site-packages stl-mlearning | |
pip install pyyaml | |
pip install numpy | |
pip install scipy | |
wget http://nltk.googlecode.com/files/nltk-2.0.1rc1.zip | |
unzip http://nltk.googlecode.com/files/nltk-2.0.1rc1.zip | |
cd nltk | |
python setup.py install |