add comments to acknowledge Alexandre and adapt for python 3

Esse commit está contido em:
Pierre Karashchuk
2017-02-26 14:31:17 -08:00
commit 84eeee0d8a
2 arquivos alterados com 9 adições e 2 exclusões
+7 -2
Ver Arquivo
@@ -1,11 +1,16 @@
## code by Alexandre Barachant
## adapted by Pierre Karashchuk for compatibility with Python3
from pylsl import StreamInfo, StreamOutlet
import numpy as np
from builtins import input
info = StreamInfo('Ganglion_EEG', 'EEG', 4, 200, 'float32',
'Ganglion_123456789')
outlet = StreamOutlet(info)
while True:
strSample = raw_input().split(': ', 1)
sample = 1e6*np.array(map(float, strSample[1].split(' ')))
strSample = input().split(': ', 1)
sample = 1e6*np.array(list(map(float, strSample[1].split(' '))))
stamp = float(strSample[0])*1e-3
outlet.push_sample(sample, stamp)
# print('Pushed Sample At: ' + strSample[0])
+2
Ver Arquivo
@@ -1,3 +1,5 @@
// code by Alexandre Barachant
const Ganglion = require('openbci-ganglion').Ganglion;
const ganglion = new Ganglion();
// Construct LSL Handoff Python Shell