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 requests | |
auth = (USER, PASS) | |
for repo in requests.get('https://api.github.com/user/subscriptions', params={'per_page': 100}, auth=auth).json: | |
if repo['name'].startswith('wl-'): | |
requests.delete('https://api.github.com/user/subscriptions/%s/%s' % (repo['owner']['login'], repo['name']), auth=auth) |
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 flask import Blueprint | |
from .helpers import template_or_json | |
from .views import ServiceView, register_mimetype | |
places = Blueprint('places', __name__, template_folder='templates') | |
@places.route('/') | |
@template_or_json('places/search.html') |
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 Old(): | |
... pass | |
... | |
>>> class New(object): | |
... pass | |
... | |
>>> type(Old()) | |
<type 'instance'> | |
>>> type(New()) | |
<class '__main__.New'> |
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 IdentifierList(list): | |
... def by_namespace(self): | |
... return None | |
... | |
>>> class Locality(): | |
... @property | |
... def identifiers(self): | |
... return IdentifierList(self._identifiers) | |
... @identifiers.setter | |
... def identifiers(self, value): |
NewerOlder