Skip to content

Instantly share code, notes, and snippets.

Avatar

Carl Meyer carljm

View GitHub Profile
View tox.ini.diff
diff --git a/tox.ini b/tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,9 @@
[tox]
envlist=
py26-1.3,py26-1.4,py26-1.5,py26-1.6,
- py27-1.3,py27-1.4,py27-1.5,py27-1.6,py27-1.7,py27-master
+ py27-1.3,py27-1.4,py27-1.5,py27-1.6,py27-1.7,py27-master,
+ py33-1.5,py33-1.6,py33-1.7,py33-master,
View keybase.md

Keybase proof

I hereby claim:

  • I am carljm on github.
  • I am carljm (https://keybase.io/carljm) on keybase.
  • I have a public key whose fingerprint is 3C32 FA99 DC96 932C 2204 6A41 2D1F B791 6A52 E121

To claim this, I am signing this object:

View gist:9086090
$ curl -s -XGET 'http://localhost:9200/_settings?pretty'
{
"jlor" : {
"settings" : {
"index.analysis.analyzer.default.filter.1" : "lowercase",
"index.analysis.analyzer.default.filter.0" : "standard",
"index.analysis.analyzer.default.tokenizer" : "standard",
"index.analysis.analyzer.default.type" : "custom",
"index.number_of_shards" : "5",
"index.number_of_replicas" : "1",
View postactivate
export GEM_HOME=$VIRTUAL_ENV/rubygems
export GEM_PATH=
export PATH=$VIRTUAL_ENV/rubygems/bin:$PATH
View changes.diff
diff --git a/docs/ref/forms/models.txt b/docs/ref/forms/models.txt
index 46f7df1..dd0a422 100644
--- a/docs/ref/forms/models.txt
+++ b/docs/ref/forms/models.txt
@@ -33,8 +33,8 @@ Model Form Functions
``formfield_callback`` and ``widgets`` are all passed through to
:func:`~django.forms.models.modelform_factory`.
- Arguments ``formset``, ``extra``, ``max_num``, ``can_order``, and
- ``can_delete`` are passed through to
View gist:5145378
It seems to me that there's a remarkable level of consensus developing
here (though it may not look like it), and a small set of remaining open
questions.
The consensus (as I see it):
- Migrate away from scraping external HTML pages, with package owners in
control of the migration but a deadline for a forced switch, as outlined
in Holger's PEP (with all appropriate caution and testing).
View gist:5145357
It seems to me that there's a remarkable level of consensus developing here (though it may not look like it), and a small set of remaining open questions.
The consensus (as I see it):
- Migrate away from scraping external HTML pages, with package owners in control of the migration but a deadline for a forced switch, as outlined in Holger's PEP (with all appropriate caution and testing).
- In some way, migrate to a situation where the popular installer tools install only release files from PyPI by default, but are capable of installing from other locations if the user provides an option.
The open question is basically how to implement the latter portion. I see two options proposed:
View stubs.py
import unittest
from unittest import mock
class SomeClass:
def a_method(self):
return 2
class TestStub(unittest.TestCase):
View gist:5065773
if 'raven.contrib.django' in settings.INSTALLED_APPS: # pragma: no cover
from raven.contrib.celery import register_signal
from raven.contrib.django.models import client
# automatic logging of task failures to Sentry
register_signal(client)
@carljm
carljm / test_something.py
Created Feb 8, 2013
writing a py.test fixture that can take params from the test
View test_something.py
@pytest.fixture
def template(request):
if 'param' in request.fixturenames:
param = request.getfuncargvalue('param')
else:
param = 'default'
# return something based on param
You can’t perform that action at this time.