コード例 #1
0
ファイル: out.py プロジェクト: dair-iitd/1oML
def main():
    q = DistribOutputPipe('jacinle.test')
    with control(pipes=[q]):
        while True:
            data = {
                'msg': 'hello',
                'current': time.time(),
                'data': np.zeros(shape=(128, 224, 224, 3), dtype='float32')
            }
            print('RFlow sending', data['current'])
            q.put(data)
コード例 #2
0
def recv_thread():
    q = DistribInputPipe('jacinle.test')
    with control(pipes=[q]):
        while True:
            q.get()
            next(counter)
コード例 #3
0
ファイル: in.py プロジェクト: ExplorerFreda/Jacinle
def main():
    q = DistribInputPipe('jacinle.test')
    with control(pipes=[q]):
        for i in range(10):
            stprint(q.get())
            time.sleep(1)