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
| makemessages: | |
| cd $(PROJECT_DIR) && @DJANGO_SETTINGS_MODULE=usermanagement.settings $(PTYHON) ../manage.py makemessages --all --ignore=env/* --ignore=tmp/* |
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
| {% load i18n standard_form %} | |
| {% if input_type == 'radiocheck' %} | |
| {% if not no_label %}<label class="empty"> </label>{% endif %} | |
| <div class="field"> | |
| <label> | |
| {% if not no_error_text %}{% for error in field.errors %}<span class="text-error">{{ error }}</span> {% endfor %}{% endif %} | |
| {% standard_widget field options custom_class=custom_class placeholder=placeholder input_type=input_type %} | |
| {{ field.label }}{% if not no_required_helper and field.field.required %}<abbr title="{% trans 'required' %}">*</abbr>{% endif %} | |
| {% if not no_help_text and field.help_text %}<span class="text-info">{{ field.help_text }}</span> {% endif %} | |
| </label> |
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 Group(models.Model): | |
| students = models.ManyToManyField(Student, related_name='groups', | |
| through='StudentGroupMembership') | |
| @property | |
| def active_students(self): | |
| return Student.objects.filter( | |
| StudentGroupMembership.get_active_lookup()) |
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
| python -m unittest test_events | |
| .F...F | |
| ====================================================================== | |
| FAIL: testDoubleRemove (sqlalchemy_mptt.tests.test_flush.FlushingTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "sqlalchemy_mptt/tests/test_flush.py", line 60, in testDoubleRemove | |
| self.assertEqual(self.calls, 2) | |
| AssertionError: 1 != 2 |
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
| Example command line usage: | |
| php -f table.php > out.html |
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
| #======================================================================= | |
| # Copyright (c) 2014 Baptiste Wicht | |
| # Distributed under the terms of the MIT License. | |
| # (See accompanying file LICENSE or copy at | |
| # http://opensource.org/licenses/MIT) | |
| #======================================================================= | |
| import os | |
| from setuptools import setup, find_packages |
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 Shop(Base): | |
| __tablename__ = 'shop_config' | |
| id = Column('site_id', Integer, primary_key=True) | |
| class Order(Base): | |
| __tablename__ = 'shop_order' | |
| id = Column(Integer, primary_key=True) |
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
| select p.id as publication, count(distinct a.id) as authors, i.country, p.year | |
| from affiliated_author as a | |
| join publication as p on p.id = a.publication_id | |
| join institution as i on i.id = a.institution_id | |
| where a.publication_id in ( | |
| -- Publications with any author from Kuwait published on or before 2005 | |
| select distinct p.id | |
| from publication as p | |
| join affiliated_author as a on a.publication_id = p.id | |
| join institution as i on a.institution_id = i.id |
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
| Apr 11 09:08:49 srv-khnb3 update_engine[2915]: [0411/090849:INFO:dbus_service.cc(94)] Attempt update: app_version="" omaha_url="" interactive=yes | |
| Apr 11 09:08:49 srv-khnb3 update_engine[2915]: [0411/090849:INFO:update_attempter.cc(526)] New update check requested | |
| Apr 11 09:08:49 srv-khnb3 update_engine[2915]: [0411/090849:INFO:gpio_handler.cc(588)] GPIOs not engaged, defaulting to normal mode | |
| Apr 11 09:08:49 srv-khnb3 update_engine[2915]: [0411/090849:ERROR:chrome_browser_proxy_resolver.cc(64)] Error getting dbus proxy for org.chromium.LibCrosService: GError(3): Could not get owner of name 'org.chromium.LibCrosService': no such name | |
| Apr 11 09:08:49 srv-khnb3 update_engine[2915]: [0411/090849:ERROR:chrome_browser_proxy_resolver.cc(104)] proxy_ failed. | |
| Apr 11 09:08:49 srv-khnb3 update_engine[2915]: [0411/090849:WARNING:libpolicy.cc(29)] Could not load the device policy file. | |
| Apr 11 09:08:49 srv-khnb3 update_engine[2915]: [0411/090849:INFO:update_attempter.cc(229)] No device policies/settings present. | |
| Apr 11 09: |
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 deploy(self, host, config): | |
| client = host.get_client() | |
| ports = {'{0[port]}/{0[type]}'.format(p): {} for p in config['ports']} | |
| volumes = {v: {} for v in config['shared-folders']} | |
| binds = {v: k for k, v in config['shared-folders'].iteritems()} | |
| port_bindings = ( | |
| p for p in config['ports'] | |
| if 'host_ip' in p or 'host_port' in p |