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
import re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
from django.conf import settings | |
XS_SHARING_ALLOWED_ORIGINS = getattr(settings, 'XS_SHARING_ALLOWED_ORIGINS', '*') |
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
parseInt("10000000000000000", 10) + 1 | |
//10000000000000000 | |
parseInt("10000000000000000", 10) + 2 | |
//10000000000000002 | |
parseInt("10000000000000000", 10) + 3 | |
//10000000000000004 | |
parseInt("10000000000000000", 10) + 4 | |
//10000000000000004 | |
parseInt("10000000000000000", 10) + 5 | |
//10000000000000004 |
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 FizzBuzz | |
def initialize | |
@fizz = 3 | |
@buzz = 5 | |
end | |
def convert(num) | |
return "FizzBuzz" if isDivisibleBy(@fizz, num) && isDivisibleBy(@buzz, num) | |
return "Fizz" if isDivisibleBy(@fizz, num) |
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.db import models | |
from django.utils import timezone | |
from django.contrib.auth.models import (AbstractBaseUser, | |
BaseUserManager as DjBaseUserManager) | |
from model_utils.managers import InheritanceManager | |
class BaseUserManager(DjBaseUserManager, InheritanceManager): | |
""" |
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
(venv)vinyll@vinyll ~/P/z/src> dj test --logging-clear-handlers --noinput --settings=settings_local | |
nosetests --with-fixture-bundling --exclude=mkt/* --logging-clear-handlers --verbosity=1 | |
Reusing old database "test_zamboni". Set env var FORCE_DB=1 if you need fresh DBs. | |
...................Exception pyes.urllib3.connectionpool.MaxRetryError: MaxRetryError('Max retries exceeded for url: /_bulk',) in <bound method ES.__del__ of <pyes.es.ES object at 0x10687d710>> ignored | |
No handlers could be found for logger "z.task" | |
Exception pyes.urllib3.connectionpool.MaxRetryError: MaxRetryError('Max retries exceeded for url: /_bulk',) in <bound method ES.__del__ of <pyes.es.ES object at 0x106881790>> ignored | |
../Volumes/Users/vinyll/Projects/zamboni/src/apps/addons/models.py:360: DeprecationWarning: object.__new__() takes no parameters | |
return super(Addon, cls).__new__(cls, *args, **kw) | |
...Exception pyes.urllib3.connectionpool.MaxRetryError: MaxRetryError('Max retries exceeded for url: /_bulk',) in <bound method ES.__d |
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
====================================================================== | |
ERROR: test_search_limits (api.tests.test_views.SearchTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Volumes/Users/vinyll/Projects/zamboni/src/apps/api/tests/test_views.py", line 1017, in test_search_limits | |
assert False | |
File "/Volumes/Users/vinyll/Projects/zamboni/src/apps/api/tests/test_views.py", line 1017, in test_search_limits | |
assert False | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bdb.py", line 46, in trace_dispatch | |
return self.dispatch_line(frame) |
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.contrib.auth.models import User | |
username = "me" | |
user = User.objects.get_or_create(username=username)[0] | |
user.email = username+"@mozilla.com" | |
user.set_password(user.email) | |
user.is_verified = True | |
user.is_staff = True |
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
BASH_FILE=~/.zshrc | |
mkdir -p ~/.python/src | |
cd !$ | |
wget https://www.python.org/ftp/python/3.4.2/Python-3.4.2.tgz --no-check-certificate | |
tar xfz Python-3.4.2.tgz | |
cd Python-3.4.2 | |
mkdir $HOME/.python/python3.4 | |
./configure --prefix=!$ && make && make install | |
cd ~ |
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
"Each child in an array should have a unique "key" prop. Check the render method of PanelsManager. See http://fb.me/react-warning-keys for more information." app.js:15174:2 | |
"panels generated: " Array [ Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, 4 more… ] app.js:25120:6 | |
"children" Array [ undefined, undefined, undefined, undefined ] app.js:24737:4 | |
"children" Array [ undefined, undefined, undefined, undefined, undefined, undefined, undefined ] app.js:24737:4 | |
"children" Array [ undefined, undefined, undefined ] |
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
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../paper-input/paper-input.html"> | |
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<polymer-element name="my-element"> |
OlderNewer