diff --git a/example.py b/example.py new file mode 100644 index 0000000000000000000000000000000000000000..acf8479bd2b175e64fbfc6e04d6cce20e29fa6d8 --- /dev/null +++ b/example.py @@ -0,0 +1,19 @@ +""" + +Python BioSemi ActiveTwo: an example how to read and visualize raw signal +Copyright 2015, Ilya Kuzovkin +Licensed under MIT + +""" + +from pyactivetwo import ActiveTwo + +if __name__ == '__main__': + + # initialize the device + device = ActiveTwo(host='127.0.0.1', sfreq=512, port=778, nchannels=32, tcpsamples=4) + + # read 30 seconds of signal and print out the data + for run in range(30): + rawdata = device.read(duration=1.0) + print rawdata diff --git a/pyactivetwo-0.1.zip b/pyactivetwo-0.1.zip new file mode 100644 index 0000000000000000000000000000000000000000..ba3f7d615562f451a0803119f335e1ce854eeb8c Binary files /dev/null and b/pyactivetwo-0.1.zip differ diff --git a/python-pyactivetwo.spec b/python-pyactivetwo.spec new file mode 100644 index 0000000000000000000000000000000000000000..3fb505fea9630c2d91e13348a2de7c35b231d38f --- /dev/null +++ b/python-pyactivetwo.spec @@ -0,0 +1,96 @@ +%global srcname pyactivetwo + +Name: python-pyactivetwo +Version: 0.1 +Release: 1 +Summary: Python library for reading signal from BioSemi ActiveTwo EEG device + +License: MIT +URL: https://pypi.python.org/pypi/pyactivetwo +Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.zip +Source1: https://raw.githubusercontent.com/kuz/pyactivetwo/master/examples/example.py + +BuildArch: noarch + +%description +%{summary}. + +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-numpy + +%description -n python3-%{srcname} +%{summary}. + +Python 3 version. + +%prep +%autosetup -n %{srcname}-%{version} +rm -vrf *.egg-info +cp -p %{SOURCE1} . + +%build +%py3_build + +%install +%py3_install + +# No tests +#check + +%files -n python3-%{srcname} +%license LICENSE.txt +%doc README.rst example.py +%{python3_sitelib}/%{srcname}* + +%changelog +* Wed Jul 7 2021 Like - 0.1-1 +- init package + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +