- Day job: student
- Favorite Python project: Django MongoDB Engine, PyPy
- Favorite Conference: Google I/O
- Python Experience Level: Expert
This file contains hidden or 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 app(env, start_response): | |
| start_response('200 ok', []) | |
| return 'hello\n' |
This file contains hidden or 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
| GitHub username: jonashaag | |
| Day job: student | |
| Favorite open source project: Django MongoDB Engine, a MongoDB backend for Django | |
| Open Source contributions (if any): Django MongoDB Engine, Django, Django-nonrel and many other (occasional patches) | |
| Stranded on an island, what 3 items do you take: two women and one man | |
| Tie-breaker, pick a number between 1 and 20,000: 19372 |
This file contains hidden or 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
| $ python2 test-unittest.py Foo.test_b | |
| b | |
| . | |
| ---------------------------------------------------------------------- | |
| Ran 1 test in 0.000s | |
| OK |
This file contains hidden or 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
| Day job: student | |
| What is your language of choice: Python | |
| Open Source contributions: Django MongoDB Engine, Django, Django-nonrel and many other (occasional patches) | |
| How do you use GitHub: Code and issue host. Would love to use it as a what-could-I-do-next dashboard if it had such a thing. |
This file contains hidden or 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 socket | |
| c1 = socket.create_connection(('localhost', 8000)) | |
| c2 = socket.create_connection(('localhost', 8000)) | |
| c2.send('GET / HTTP/1.1\r\n\r\n') | |
| c1.send('GET / HTTP/1.1\r\n\r\n') | |
| print repr(c1.recv(21)) | |
| print repr(c2.recv(21)) |
This file contains hidden or 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
| (use-modules (srfi srfi-1)) | |
| (define (print-matrix mat size) | |
| (for-each (lambda (row) | |
| (display row) | |
| (newline)) | |
| (matrix-to-2d mat size))) | |
| (define (matrix-to-2d mat size) | |
| (map (lambda (i) |
This file contains hidden or 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/admin.py b/admin.py | |
| index 640eec1..f850919 100644 | |
| --- a/admin.py | |
| +++ b/admin.py | |
| @@ -6,10 +6,11 @@ from django.contrib.auth.forms import UserChangeForm | |
| from django.contrib.auth.models import User | |
| from django.forms import TextInput, ModelForm, Textarea, Select | |
| from reversion import VersionAdmin | |
| +from import_export.admin import ImportExportModelAdmin | |
| from suit_ckeditor.widgets import CKEditorWidget |
This file contains hidden or 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 bjoern | |
| class Server(object): | |
| def __init__(self, listener, application=None, backlog=None, | |
| socket_type=None, address_family=None): | |
| assert backlog is None, "bjoern backend does not support the 'backlog' option" | |
| assert socket_type is None, "bjoern backend does not support the 'socket_type' option" | |
| assert address_familiy in (AF_INET, AF_UNIX) |
OlderNewer