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 asyncio | |
import aiohttp | |
import bs4 | |
import tqdm | |
@asyncio.coroutine | |
def get(*args, **kwargs): | |
response = yield from aiohttp.request('GET', *args, **kwargs) | |
return (yield from response.read_and_close(decode=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
import contextlib | |
import linecache | |
import logging | |
import sys | |
import traceback | |
try: | |
import cStringIO as StringIO | |
except ImportError: | |
import StringIO |
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, re | |
result = requests.get('https://raw.github.com/github/developer.github.com/master/content/v3/events/types.md') | |
content = result.content | |
for event in re.findall('## [^#]*', content): | |
blocks = event.split('\n\n') | |
event_name = blocks[0][3:] | |
if 'Hook name' in blocks[1]: | |
description = '' |