Skip to content

Instantly share code, notes, and snippets.

View kflavin's full-sized avatar

Kyle Flavin kflavin

  • Los Angeles, CA
View GitHub Profile
@kflavin
kflavin / vimrc
Last active October 15, 2015 06:45
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
@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
@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