Skip to content

Instantly share code, notes, and snippets.

View scoulondre's full-sized avatar
💭
Uncategorizable profile

Stephane Coulondre scoulondre

💭
Uncategorizable profile
View GitHub Profile

Keybase proof

I hereby claim:

  • I am scoulondre on github.
  • I am 999 (https://keybase.io/999) on keybase.
  • I have a public key whose fingerprint is 7306 8291 7838 82A7 93D5 0895 B154 34E1 2AEC 2964

To claim this, I am signing this object:

@scoulondre
scoulondre / Goless example
Created July 11, 2014 14:35
Go syntax in Python Goless
Using Goless: https://github.com/rgalanakis/goless
##########################################################
from goless import chan, select, rcase, go
import time
c1 = chan()
c2 = chan()
go(lambda: time.sleep(1) or c1.send('one'))
go(lambda: time.sleep(2) or c1.send('two'))
for i in range(2):
case, val = select([rcase(c1), rcase(c2)])