These are great help in choosing an open source license:
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/jingo/tests/jinja_app/helpers.py b/jingo/tests/jinja_app/helpers.py | |
new file mode 100644 | |
index 0000000..62f344d | |
--- /dev/null | |
+++ b/jingo/tests/jinja_app/helpers.py | |
@@ -0,0 +1,8 @@ | |
+from __future__ import absolute_import, unicode_literals | |
+ | |
+from jingo import register | |
+ |
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 NewStyle(object): | |
... def foo(self): | |
... return 'foo' | |
>>> class OldStyle(): | |
... def foo(self): | |
... return 'foo' | |
>>> dir(NewStyle) | |
['__class__', |
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
from boto.dynamodb2 import connect_to_region | |
from boto.provider import Provider | |
aws_settings_provider = Provider('aws') | |
def create_connection(): | |
aws_region = # get the AWS region of the EC2 instance | |
# connect_to_region passes along the named arguments | |
# to the DynamoDBConnection class that gets created |
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
from django.core.cache import cache | |
from django.db import models | |
EMPTY = '-' # Not "None" | |
class MyModel(models.Model): | |
@classmethod | |
def _cache_key(cls, key): | |
return 'mymodel:{}'.format(key) | |
I hereby claim:
- I am jsocol on github.
- I am jamessocol (https://keybase.io/jamessocol) on keybase.
- I have a public key whose fingerprint is B856 FE22 4F11 9DB0 F88E 3BDD 80F9 3DCE 9EBF CF1D
To claim this, I am signing this object:
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
def f1(): | |
a = 0 | |
a += 1 | |
dis.dis(f1) |
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
In [8]: def t(): | |
f = ([],) | |
f[0] += [1] | |
return f | |
...: | |
In [9]: dis.dis(t) | |
2 0 BUILD_LIST 0 | |
3 BUILD_TUPLE 1 | |
6 STORE_FAST 0 (f) |
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
ln -s /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google /path/to/virtualenv/lib/python2.7/site-packages/google |