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 uuid_please(): | |
full_uuid = uuid.uuid4() | |
# uuid is truncated because paypal must be <30 | |
return str(full_uuid)[:25] | |
def round_penny(amount): | |
return amount.quantize(Decimal('.01'), rounding=ROUND_HALF_UP) |
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
chrome.tabs.executeScript(requestTabID, { | |
file: '/popup.js' | |
}); |
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
[main] | |
s3_upload=false | |
s3_bucket=net-mozaws-stage-shavar-lists | |
[tracking-protection] | |
allowlist_url=https://raw.githubusercontent.com/mozilla-services/shavar-list-exceptions/master/allow_list | |
disconnect_url=https://raw.githubusercontent.com/mozilla-services/shavar-prod-lists/master/disconnect-blacklist.json | |
output=mozpub-track-digest256 | |
s3_key=tracking/mozpub-track-digest256 |
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
data: [ | |
{ | |
text: '301.1: Exterior property areas and premises unclean, unsafe, and in unsanitary conditions' | |
}, | |
{ | |
text: '301.2: Premises and structures unsanitary' | |
}, | |
{ | |
text: '301.3: Vacant property is unsanitary with accumulation of trash and debris.' | |
}, |
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 find_uris1(node): | |
for i in node: | |
for j in node[i]: | |
for k in j: | |
for l in j[k]: | |
for uri in j[k][l]: | |
check_uri(uri) |
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
# Send a push message with the VAPID headers | |
message = "Testing push service" | |
''' | |
headers = py_vapid.sign({ | |
"aud": "http://test.com", | |
"sub": "mailto:tester@test.com" | |
}) | |
''' | |
WebPusher(subscription).send(message) |
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
Traceback (most recent call last): | |
File "./manage.py", line 10, in <module> | |
execute_from_command_line(sys.argv) | |
File "/home/vagrant/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line | |
utility.execute() | |
File "/home/vagrant/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/home/vagrant/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv | |
self.execute(*args, **cmd_options) | |
File "/home/vagrant/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute |
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 collections import Counter | |
>>> print Counter('abccdeffccdbbaacdefffbbccdaa').most_common() | |
[('c', 7), ('a', 5), ('b', 5), ('f', 5), ('d', 4), ('e', 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
a { | |
color: $blue; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
font-family: "Fira Sans"; | |
} |
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
@fudge.patch('auctions.models.paypalrestsdk.PaypalPayout') | |
def test_request_payout(self, mock_paypal): | |
fake_items = [] | |
mock_paypal.expects_call().returns( | |
fudge.Fake().expects('create') | |
.returns(True) | |
.has_attr(items=fake_items) | |
) |