Skip to content

Instantly share code, notes, and snippets.

View lafras's full-sized avatar

lafras lafras

View GitHub Profile
@lafras
lafras / rxpy_multiple_subscriptions.py
Created December 12, 2016 09:31
Finally figured out this Reactive X subject thing...
import rx
obs = rx.Observable.range(0,10)
sub = rx.subjects.Subject()
square = sub.map(
lambda x: 'i am square: {}'.format(x**2)
)
cube = sub.map(
lambda x: 'i am cube: {}'.format(x**3)

Keybase proof

I hereby claim:

  • I am lafras on github.
  • I am lafras (https://keybase.io/lafras) on keybase.
  • I have a public key whose fingerprint is EBC9 1A84 DA4C A018 148B 9165 A307 038E 6A13 941D

To claim this, I am signing this object: