`python` binding for `cogmoteGO`
Project description
pymoteGO
python binding for cogmoteGO
Installation
pip install pymotego
or
uv add pymotego
Usage
Data broadcast
from pymotego.broadcast import Broadcast
from datetime import datetime, timedelta
from time import sleep
import random
broadcast = Broadcast()
results = ["correct", "incorrect", "timeout"]
for i in range(10):
start_time = datetime.now() - timedelta(seconds=random.randint(1, 60))
duration = random.randint(1, 5)
stop_time = start_time + timedelta(seconds=duration)
result = random.choice(results)
correct_rate = 1.0 if result == "correct" else 0.0
data = {
"trial_id": i + 1,
"trial_start_time": start_time.isoformat(),
"trial_stop_time": stop_time.isoformat(),
"result": result,
"correct_rate": correct_rate
}
future = broadcast.send(data)
print(future.result())
sleep(duration)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymotego-0.1.4.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymotego-0.1.4.tar.gz.
File metadata
- Download URL: pymotego-0.1.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b755ab20f7270573c1e8efe24007e2bb587b64bf07af2239ca6953234dfccdb2
|
|
| MD5 |
b312c71eadd531a81b36f9230f6ee8c0
|
|
| BLAKE2b-256 |
a1b021465c9443e0ef0b2dd1af57971514948e28760759a3c99070343cecb9fb
|
File details
Details for the file pymotego-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pymotego-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bf51e5b823a103273f095f977e40a0c28e0b0ea20c243a08212dbba50e4a998
|
|
| MD5 |
e479e0da2eadb58a703dbdd4ff02cf5e
|
|
| BLAKE2b-256 |
073dacb817ffa342ab252eb8836012585462eceaac3c9afd27449dbaaf28e504
|