Skip to main content

`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.5.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymotego-0.1.5-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pymotego-0.1.5.tar.gz.

File metadata

  • Download URL: pymotego-0.1.5.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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

Hashes for pymotego-0.1.5.tar.gz
Algorithm Hash digest
SHA256 62c0e109a282ec121188cf8cf5d14fd07a5e62d35b7f858d1367732e83a4a330
MD5 36dda1a10e31fd3e060bba8c605e2490
BLAKE2b-256 933a2fe1145d41d8b16a3f479e18831e6ca60326f4cd3fc777ac8993450fc779

See more details on using hashes here.

File details

Details for the file pymotego-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pymotego-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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

Hashes for pymotego-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 977cf44012c538db1e9a66e7cad66d9a0063e1b8a4f185823778339b19cba662
MD5 759eff2bfb00fd76c59a72e758fa255e
BLAKE2b-256 fff020a08f52378a1d682de9f26f5ad0d2117c1f4d8410f56b6293b1de4a3df4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page