Skip to main content

OKN_PY_UPDATER

A python library to be used for live updating the okn data before sending into new version of okn detector.

Installation requirements and guide

Anaconda

To install this program, Anaconda python distributing program and Anaconda Powershell Prompt are needed.
If you do not have Anaconda, please use the following links to download and install:
Download link: https://www.anaconda.com/products/distribution
Installation guide link: https://docs.anaconda.com/anaconda/install/

PIP install

The library name is called okn_py_updater.
To install okn_py_updater, you have to use Anaconda Powershell Prompt.
In Anaconda Powershell Prompt:

pip install okn_py_updater

Usage

example_updater = Updater(`config to be used`, `length of circular buffer`, `header array`, `drop rate`)
  1. config to be used: must be dictionary type of gazefilters.json which contains information such as Mappers, filters and Graph.
  2. length of circular buffer: must be integer type to define the length of buffer to be used.
  3. header array: must be array which contains strings which will specify the individual data name of the data array to be updated. Examples: header_array = ['x_value', 'y_value', 'x_nom', 'y_nom', 'record_timestamp', 'sensor_timestamp', 'frame_rate', 'is_event', 'event_id', 'direction']
  4. drop rate: must be integer type. If it is zero, all data will be used. If it is more than 1, every 1 data will be collected then it will drop the amount of drop rate. For example: If the drop rate is 2, every 1 data will be collected then 2 data will be dropped.

Example Usage

config_to_be_used = load_commented_json("gazefilters.json")
header_array = ['x_value', 'y_value', 'x_nom', 'y_nom', 'record_timestamp', 'sensor_timestamp', 'frame_rate',
                'is_event', 'event_id', 'direction']

example_updater = Updater(config_to_be_used, 100, header_array, 3)

out_put = example_updater.update(data)

Updater Class Specifications

Attributes

  1. config: The dictionary version of gazefilters.json which contains information such as Mappers, filters and Graph.
  2. filter_config: The filter information of the config.
  3. circular_buffer: The circular buffer with max length which will be defined by user.
  4. self.buffer_max_length: The max length of buffer.
  5. self.header_array: The header array which will be defined by user.
  6. self.data_drop_rate: The drop rate which will be defined by user.
  7. count: The count to be used as a counter if data drop rate is greater than zero.

Methods

  1. update(self, data_input): To store incoming data into circular buffer, update the buffer and return the last element of buffer.
  2. set_buffer(self, new_buffer_length): To update buffer.
  3. set_header_array(self, new_header_array): To update header array.
  4. set_drop_rate(self, new_drop_rate): To update drop rate.
  5. get_output_header_array(self): To get output header array.

Metadata

Release files for okn-py-updater 3.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for okn-py-updater 3.0.2
File Size Uploaded Provenance Actions
okn_py_updater-3.0.2.tar.gz 12.3 kB Without provenance Details for okn_py_updater-3.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for okn-py-updater 3.0.2
File Interpreter ABI Platform Actions
okn_py_updater-3.0.2-py3-none-any.whl Python 3 none any Details for okn_py_updater-3.0.2-py3-none-any.whl

Total release size: 24.0 kB

Release files / okn_py_updater-3.0.2.tar.gz

Download URL okn_py_updater-3.0.2.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b787492afc0eaef91585407863650069ce5ebe6cc0c2bbf8d2b10a736eab5e64
BLAKE2b-256 checksum
How to use checksums
d697c196c7326f7008560a56dd2f1f35cacd66903fa5f4cc74de4cd478c4f862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.7

Release files / okn_py_updater-3.0.2-py3-none-any.whl

Download URL okn_py_updater-3.0.2-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcecdfcacc81539c376e2c132b7e335416e4328515a9b5b2f8930967e7b95b10
BLAKE2b-256 checksum
How to use checksums
43f68b131e01b03675ce669d0906523eabe35358df11cce8a9ec8510274abc52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.7

Security for okn-py-updater 3.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page