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 stripe | |
| stripe.api_key = '...' | |
| disc = stripe.Coupon.create(amount_off=189, currency='USD', duration='forever', id='nice-discount') | |
| cust = stripe.Customer.create(description="nice customer") | |
| prod = stripe.Product.create(name="Individual Lite", type='service') | |
| plan = stripe.Plan.create(nickname='Monthly', amount=199, currency='USD', product=prod, interval='month') | |
| sub = stripe.Subscription.create(customer=cust, items=[dict(plan=plan, quantity=0)], coupon=disc) | |
| item, = sub['items']['data'] | |
| item.quantity += 1 | |
| item.save().quantity |
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
| setuptools master $ git diff | |
| diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py | |
| index 05508ceb..108308ab 100755 | |
| --- a/setuptools/command/easy_install.py | |
| +++ b/setuptools/command/easy_install.py | |
| @@ -408,6 +408,7 @@ class easy_install(Command): | |
| self._expand_attrs(dirs) | |
| def run(self): | |
| + raise RuntimeError() |
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
| jaraco.site master $ curl -v -L -u any:any https://www.jaraco.com/auth-demo/here/ | |
| * Trying 2001:4802:7800:1:be76:4eff:fe20:21d9... | |
| * TCP_NODELAY set | |
| * Connected to www.jaraco.com (2001:4802:7800:1:be76:4eff:fe20:21d9) port 443 (#0) | |
| * ALPN, offering h2 | |
| * ALPN, offering http/1.1 | |
| * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH | |
| * successfully set certificate verify locations: | |
| * CAfile: /etc/ssl/cert.pem | |
| CApath: none |
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 TARGETS.*, TASKS.LAST_HARVESTED | |
| FROM TARGETS | |
| LEFT OUTER JOIN ( | |
| SELECT TARGET_ID, max(HARVESTED) LAST_HARVESTED | |
| FROM TASKS | |
| GROUP BY TARGET_ID | |
| ) TASKS | |
| on TARGETS.ID = TASKS.TARGET_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
| query = [{'$lookup': { | |
| 'from': 'tasks', | |
| 'let': {'target_id': '$ID'}, | |
| 'pipeline': [ | |
| { | |
| '$match': { | |
| '$expr': { | |
| '$eq': ['$TARGET_ID', '$$target_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
| python3statement.github.io master $ gem install jekyll | |
| Fetching: colorator-1.1.0.gem (100%) | |
| Successfully installed colorator-1.1.0 | |
| Fetching: http_parser.rb-0.6.0.gem (100%) | |
| Building native extensions. This could take a while... | |
| Successfully installed http_parser.rb-0.6.0 | |
| Fetching: eventmachine-1.2.7.gem (100%) | |
| Building native extensions. This could take a while... | |
| Successfully installed eventmachine-1.2.7 | |
| Fetching: em-websocket-0.5.1.gem (100%) |
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 functools | |
| import collections | |
| import cherrypy | |
| class SelectedMethod: | |
| """ | |
| Descriptor allowing a series of handler methods to satisfy | |
| a variety of behaviors based on the request method. |
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
| __requires__ = ['pytest-responses', 'pytest'] | |
| import requests | |
| def test_paginated_request(responses): | |
| responses.add( | |
| responses.GET, | |
| 'https://service.test/api/paginated/', |
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
| Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-ephem-wheel-cache-hxoe1j41 | |
| Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-tracker-5tiry4h6 | |
| Created requirements tracker '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-tracker-5tiry4h6' | |
| Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-yrwcx99r | |
| Processing /Users/jaraco/p/pypa/pep517 | |
| Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-build-xj7pinv9 | |
| Added file:///Users/jaraco/p/pypa/pep517 to build tracker '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-tracker-5tiry4h6' | |
| Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-r66if194 | |
| Installing build dependencies: started | |
| Running command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install --ignore-installed --no-user --pref |
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
| setuptools feature/pyopenssl-fallback $ python3.5 -m pip-run twisted | |
| Collecting twisted | |
| Downloading https://files.pythonhosted.org/packages/5d/0e/a72d85a55761c2c3ff1cb968143a2fd5f360220779ed90e0fadf4106d4f2/Twisted-18.9.0.tar.bz2 (3.1MB) | |
| 100% |████████████████████████████████| 3.2MB 7.0MB/s | |
| Complete output from command python setup.py egg_info: | |
| Download error on https://pypi.org/simple/incremental/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:719) -- Some packages may not be found! | |
| Couldn't find index page for 'incremental' (maybe misspelled?) | |
| Download error on https://pypi.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:719) -- Some packages may not be found! | |
| No local packages or working download links found for incremental>=16.10.1 | |
| Traceback (most recent call last): |