semvec/pypi-packages huggingface dataset:
psychopykit 2023.8.17
Psychopy output conversion utilities
Requires Python: >=3.9, <4
Keywords: neuroimaging MRI fMRI DICOM BIDS

# psychopykit
PsychoPy output conversion utilities  

Current version : 2022.8.5  

## Installation

1. Clone the Git repo  
```
git clone https://github.com/adolphslab/psychopykit.git
```

2. Install the package into your active python environment  
```
cd psychopykit
pip install .
```

## Usage
```
$ et2bids -i Examples/Test.hdf5

-------------------------------------------
PsychoPy HDF5 Eyetracking to BIDS Converter
-------------------------------------------

Loading eyetracking data from /Users/jmt/GitHub/psychopykit/psychopykit/Examples/Test.hdf5
Eyetracking dataset within HDF5: /data_collection/events/eyetracker/MonocularEyeSampleEvent
Number of events : 513753

Loading monocular eyetracking dataset
Progress            0 / 513753
Progress       102751 / 513753
Progress       154126 / 513753
Progress       256877 / 513753
Progress       308252 / 513753
Progress       462378 / 513753
Complete

Converting to dataframe
Loading PsychoPy log file /Users/jmt/GitHub/psychopykit/psychopykit/Examples/Test.log

Median samp interval : 2.000 ms
Sampling frequency   : 500.014 Hz

Saving BIDS eyetracking data /Users/jmt/GitHub/psychopykit/psychopykit/Examples/Test_recording-eyetracking_physio.tsv
Saving PsychoPy log /Users/jmt/GitHub/psychopykit/psychopykit/Examples/Test_recording-eyetracking_physio.log
Saving JSON sidecar /Users/jmt/GitHub/psychopykit/psychopykit/Examples/Test_recording-eyetracking_physio.json

Done
```
LenzPy 0.1.1
Python wrapper designed to facilitate interaction with the Lenz report API.

# LenzPy

**LenzPy** is a Python wrapper designed to facilitate interaction with the [Lenz](https://getle.nz) report API. **Lenz** is a dead-simple platform for collecting, analyzing, and visualizing data from your software.

# Usage

Before using LenzPy, ensure that you have an API key from Lenz. You can provide the API key directly in function calls or store it as an environment variable named LENZ_API_KEY.

```sh
export LENZ_API_KEY=abcdef0123
```

## The @instrument Decorator

The @instrument decorator is a powerful feature of LenzPy that enables you to seamlessly integrate reporting into your functions. It automates the process of submitting reports to Lenz while allowing you to customize the reporting behavior.

A powerful use-case is to decorate the handler function for your web API, to collect data about requests & responses.

```python
from LenzPy import instrument 

@instrument(report_name="example_fnc", flatten_args=True, flatten_res=True, mock=False)
def example_fnc(input, other_inputs, default_none=None, **kwargs):
    # Your function logic here. Example:
    status_codes = {
        200: "OK",
        201: "Created",
        204: "No Content",
        400: "Bad Request",
        401: "Unauthorized",
        403: "Forbidden",
        404: "Not Found",
        500: "Internal Server Error"
    }
    
    code = random.choice(list(status_codes.keys()))
    message = status_codes[code]
    
    return code, message
```

```
report_name (str): The name of the report or event.
api_key (str, optional): The API key for authentication. If not provided, it's fetched from the environment variable.
flatten_args (bool, optional): Whether to flatten function arguments before reporting.
included_args (list or None, optional): List of keys to be included in the reported arguments. If not provided, no filtering is performed.
flatten_res (bool, optional): Whether to flatten the return value before reporting.
included_res (list or None, optional): List of keys to be included in the reported return value. If not provided, no filtering is performed.
mock (bool, optional): Whether to print the prepared report without actually submitting it.
```


## Reporting Directly

If you prefer more control, you can submit reports directly using the submit_report function.

```python

from LenzPy import submit_report

# ...
data = {"userId": 17, "latency": 5, "domain": "foo.bar", "path": "/register"}
submit_report(event_name="user_register", body=data)
```

```
event_name (str): The name of the event or report.
body (dict): The body of the report containing relevant data.
api_key (str, optional): The API key for authentication. If not provided, it's fetched from the environment variable.
```
pyglplot 0.1.3
A Python package for plotting.
Requires Python: >=3.7

[![PyPI version](https://badge.fury.io/py/pyglplot.svg)](https://badge.fury.io/py/pyglplot)

# pyglplot
 
A powerful Python plotting library that leverages OpenGL to provide exceptional performance and high-quality visualizations of 2D data. Based on the JavaScript library [webgl-plot](https://github.com/danchitnis/webgl-plot) this library is specifically designed for real-time plotting of line, scatter, and histogram plots. This library is cross-platform and works on Windows, Linux and Mac thanks to [GLFW](https://www.glfw.org/) windowing library. Furthermore, It is also compatible with Jupyter notebooks. This package is ideal for plotting realtime data from sensors and instruments, including streaming devices such as microphones and cameras, empowering users to analyze data as it is being generated.

## Installation

```bash
python -m pip install pyglplot
```

## Getting started

```python
import numpy as np
from pyglplot import line


# Create a Line object
lineSize = 1000
plotLine = line.Line(lineSize)
x = np.linspace(-1, 1, lineSize)
y = np.sin(x)

# Add data to the line
plotLine.updateLine(x, y)

plotLine.run()
```

## Animating a plot

```python
lineSize = 1000

plotLine = line.Line(lineSize)

x = np.linspace(-1, 1, lineSize)
y = 0

def update():
    global y
    y = 0.5*np.sin(10*x) + np.random.rand(lineSize) * 0.1
    plotLine.updateLine(x, y)

plotLine.run(update)
```

## License

MIT