def serialize_data(self, data): if 'hits' in data: hits_data = data['hits'] data['hits'] = None return utils.simple_enc(hits_data, data) else: return utils.simple_enc(None, data)
def serialize_data(self, data): ''' Serialize data from interpretation ''' if 'hits' in data: hits_data = data['hits'] data['hits'] = None return utils.simple_enc(hits_data, data) else: return utils.simple_enc(None, data)
def serialize_data(self, data): # return jsonapi.dumps(data, cls=utils.NumpyEncoder) if 'occupancies' in data: hits_data = data['occupancies'] data['occupancies'] = None return utils.simple_enc(hits_data, data) else: return utils.simple_enc(None, data)
def send_data(socket, data, name="CoolingData"): data_meta_data = dict(name=name, dtype=str(data.dtype), shape=data.shape, timestamp=time.time()) try: data_ser = utils.simple_enc(data, meta=data_meta_data) socket.send(data_ser, flags=zmq.NOBLOCK) except zmq.Again: pass
def serialize_data(self, data): ''' Serialize data from interpretation ''' return utils.simple_enc(None, data)
def serialize_data(self, data): return utils.simple_enc(None, data)