Example #1
0
    def handle_label(label, i):
        delayer = ops.delay(i * 0.100)
        mapper = ops.map(lambda xy: (label, xy, i))

        return window.mousemove.pipe(
            delayer,
            mapper,
        )
Example #2
0
    def label2stream(
            label: tkinter.Label, index: int
    ) -> Observable[Tuple[tkinter.Label, "Event[Frame]", int]]:

        return mousemoves.pipe(
            ops.map(lambda ev: (label, ev, index)),
            ops.delay(index * 0.1),
        )
Example #3
0
    def _retryable(self, data: str, delay: datetime.timedelta):

        return rx.of(data).pipe(
            ops.delay(duetime=delay, scheduler=self._scheduler),
            ops.map(lambda x: self._http(x)),
            ops.catch(handler=lambda exception, source: self._retry_handler(
                exception, source, data)),
        )
Example #4
0
    def handle_image(i, image):
        imagerect = image.get_rect()

        def on_next(ev):
            imagerect.top = ev[1]
            imagerect.left = ev[0] + i * 32

            if old[i]:
                erase.append(old[i])
            old[i] = imagerect.copy()
            draw.append((image, imagerect.copy()))

        def on_error(err):
            print("Got error: %s" % err)
            sys.exit()

        mousemove.pipe(ops.delay(0.1 * i, scheduler=scheduler)).subscribe(
            on_next, on_error=on_error)
Example #5
0
 async def go():
     nonlocal result
     source = reactivex.return_value(42).pipe(ops.delay(0.1))
     result = await source
Example #6
0
 def create():
     return xs.pipe(delay(50))
Example #7
0
 def create():
     dt = datetime.utcfromtimestamp(300.0)
     return xs.pipe(delay(dt))
Example #8
0
 def create():
     return xs.pipe(delay(100.0))
Example #9
0
 def create():
     return xs.pipe(delay(datetime.utcfromtimestamp(350)))