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
execute pathogen#infect() | |
" Pep8 stuff | |
"autocmd FileType python map <buffer> <F3> :call Pep8()<CR> | |
let g:pep8_map='<F8>' | |
syntax on | |
filetype plugin on | |
source ~/.vim/plugin/matchit.vim | |
set expandtab |
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
@asyncio.coroutine | |
def do_work(envelope, body): | |
yield from asyncio.sleep(body) | |
@asyncio.coroutine | |
def callback(body, envelope, properties): | |
loop = asyncio.get_event_loop() | |
loop.create_task(do_work(envelope, body)) | |
@asyncio.coroutine |
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
@asyncio.coroutine | |
def do_work(envelope, body): | |
yield from fetch_page(url, body) | |
@asyncio.coroutine | |
def callback(body, envelope, properties): | |
loop = asyncio.get_event_loop() | |
loop.create_task(do_work(envelope, body)) | |
@asyncio.coroutine |