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
| // .for | |
| .for(@i, @n) {.-each(@i)} | |
| .for(@n) when (isnumber(@n)) {.for(1, @n)} | |
| .for(@i, @n) when not (@i = @n) { | |
| .for((@i + (@n - @i) / abs(@n - @i)), @n); | |
| } | |
| // .for-each | |
| .for(@array) when (default()) {.for-impl_(length(@array))} | |
| .for-impl_(@i) when (@i > 1) {.for-impl_((@i - 1))} |
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
| #!/usr/bin/env python | |
| # | |
| # Copyright 2007 Google Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
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
| {% extends "grappelli:admin/change_list.html" %} | |
| {% block object-tools-items %} | |
| {{ block.super }} | |
| <li> | |
| <a href="./?__clearqs=1{% if is_popup %}&_popup=1{% endif %}" class="grp-state-focus"> | |
| Reset filters | |
| </a> | |
| </li> | |
| {% endblock %} |
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
| Django==1.3.1 | |
| django-celery==2.3.3 | |
| redis==2.4.9 | |
| celerymon |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <array> | |
| <dict> | |
| <key>ChildrenArray</key> | |
| <array> | |
| <dict> | |
| <key>AudioList</key> | |
| <array> |
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
| from django.core.management.base import BaseCommand, CommandError | |
| from django.conf import settings | |
| class Command (BaseCommand): | |
| #args = '<poll_id poll_id ...>' | |
| #help = HELP | |
| def handle(self, *args, **options): | |
| for s in dir(settings): | |
| print s, ':', getattr(settings, s) |
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
| #!/usr/bin/env python | |
| import os | |
| import putio | |
| OAUTH_TOKEN = 'XXXXXX' | |
| SECRET = 'XXXXXX' | |
| APPID = 'XXXXX' | |
| FOLDER_ID = 123456 |
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
| from sorl.thumbnail.images import ImageFile | |
| from sorl.thumbnail import default | |
| from sorl.thumbnail.conf import settings, defaults as default_settings | |
| def cached_thumbnail (photo, geometry, **options): | |
| source = ImageFile(photo) | |
| for key, value in default.backend.default_options.iteritems(): | |
| options.setdefault(key, value) | |
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
| class EventAdmin(admin.ModelAdmin): | |
| def get_form(self, request, obj=None, **kwargs): | |
| if request.user.is_superuser: | |
| return EventAdminForm | |
| else: | |
| return EventForm |
OlderNewer