# packages

pkgId: 28cded982db7e790c40cb0295989c3cf9fc088817eebd3515a602a9fd5f018fe
name: python-ace-api
arch: src
version: 1.0.8
epoch: 0
release: 1
summary: Analysis Correlation Engine (ACE) API Python Bindings.
url: https://github.com/ace-ecosystem/ACE/_api_package
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ace-api-1.0.8-1.src.rpm
checksum_type: sha256
description:
  Setting the default remote host:

          >>> import ace_api

          >>> server = 'ace.integraldefense.com'

          >>> ace_api.set_default_remote_host(server)

          >>> ace_api.ping()
          {'result': 'pong'}

  Setting the remote host for an Analysis class:

          >>> analysis = ace_api.Analysis('this is the analysis description')

          >>> analysis.set_remote_host('something.else.com').remote_host
          'something.else.com'

  If your ACE instance is listening on a port other than 443, specify it like so::

          >>> ace_api.set_default_remote_host('ace.integraldefense.com:24443')

          >>> ace_api.default_remote_host
          'ace.integraldefense.com:24443'



          >>> path_to_file = 'Business.doc'

          >>> analysis.add_file(path_to_file)
          <ace_api.Analysis object at 0x7f23d57e74e0>

          >>> analysis.add_tag('Business.doc').add_tag('suspicious doc')
          <ace_api.Analysis object at 0x7f23d57e74e0>

          >>> analysis.submit()
          <ace_api.Analysis object at 0x7f23d57e74e0>

          >>> analysis.status
          'NEW'

          >>> analysis.status
          'ANALYZING'

          >>> analysis.status
          'COMPLETE (Alerted with 8 detections)'

          >>> result_url = 'https://{}/ace/analysis?direct={}'.format(analysis.remote_host, analysis.uuid)

          >>> print("\nThe results of this submission can be viewed here: {}".format(result_url))

  The results of this submission can be viewed here: https://ace.integraldefense.com/ace/analysis?direct=137842ac-9d53-4a25-8066-ad2a1f6cfa17



          >>> another_url = 'http://medicci.ru/myATT/tu8794_QcbkoEsv_Xw20pYh7ij'

          >>> cp_result = ace_api.cloudphish_submit(another_url)

          >>> cp_result['status']
          'NEW'

          >>>  # Query again, a moment later:
          ...
          >>> cp_result = ace_api.cloudphish_submit(another_url)

          >>> cp_result['status']
          'ANALYZED'

          >>> cp_result['analysis_result']
          'ALERT'

          >>> result_url = 'https://{}/ace/analysis?direct={}'.format(ace_api.default_remote_host, cp_result['uuid'])

          >>> print("\nThe results of this submission can be viewed here: {}".format(result_url))

  The results of this submission can be viewed here: https://ace.integraldefense.com/ace/analysis?direct=732ec396-ce20-463f-82b0-6b043b07f941



  ACE's API documentation:

  View ACE's full documentation here: [https://ace-analysis.readthedocs.io/en/latest/](https://ace-analysis.readthedocs.io/en/latest/)


pkgId: 5bb923a62f0bdb10ddb40003e5dc87a75d445df14e7de4a4d22a31c462b0cc74
name: python-ace-metrics
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: A lib for measuring ACE based IDR operations.
url: https://github.com/seanmcfeely/ace-metrics
rpm_license: GNU General Public License v3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ace-metrics-0.2.3-1.src.rpm
checksum_type: sha256
description:
  This library is intended to help with the calculation and management of metrics as they pertain to any data produced by the ACE ecosystem. As of now, the library meets a base set of use cases for answering questions that arose during the initial organic operational development that took place around ACE's development. So it's certainly not the end-all-be-all but hopefully, it can serve as a base for further statistical analysis, metricization, analytics, and real-time presentations.



   - 12/11/2020: Graphing functions were added, as well as, some new graphs for alerts, users, alert type, and events.



  The following statistics are available for alert based metrics and are used over and over again.

  ```python
  >>> from metrics.alerts import VALID_ALERT_STATS
  >>> from metrics.alerts import FRIENDLY_STAT_NAME_MAP
  >>>
  >>> for stat in VALID_ALERT_STATS:
  ...     print(FRIENDLY_STAT_NAME_MAP[stat])
  ...
  Total Open Time
  Average Time to Disposition
  Quickest Disposition
  Slowest Disposition
  Standard Deviation for Time to Disposition
  Alert Quantities by Disposition
  ```

  As of now, all of the above statistics are calculated by month and disposition. These stats can be calculated on any group of ACE alerts passed in a pandas dataframe. The `metrics.alerts.get_alerts_between_dates` function can be used to get a group of alerts you're interested in.

  As of now, functionality exists to view any or all of these alert based stats from the viewpoint of users and alert types. All this means is that alerts are filtered down to only the alerts that apply during a given date range for respective alert types and/or users and then the VALID_ALERT_STATS are calculated for that set of alerts. Functionality related to viewing these stats as they relate to users and alert types are store in respective files in the `metrics/alerts` directory.

  The following independent alert based tables are also available:

   + Operating Hours Summary:

      Essentially, a high-level view of how an ACE based team is performing during the three different categories of operational time. From the function definition:

      ```
      Summarize the overall cycle-time averages, the standard deviation in cycle times,
      and the alert quantities observed over the alerts passed when organized by month
      and placed in the respective operating hour category. Categories are:
        business hours, weekends, weeknights
      ```

   + Overall Alert Cycle-Time Summary:

      Generate an overall statistical summary for alerts by month. Similar to the hours of operation summary but not broken up into time categories. From the function definition:

      ```
      Organize alerts by month and then summarize the business hour and real hour
      cycle-time averages, the standard deviation in the business hour and real
      hour cycle-times, and the alert quantities observed over the alerts passed.
      ```

   + Total Alert Type Quantities:

      A straight up count of alerts by type, between two dates.



  For time-based statistics, you can also calculate based on business hours. When business hours are applied, only the time inside of business hours is counted when calculating time-based statistics.
  You can define business hours as needed with `metrics.alerts.define_business_time()`.

  The default business start hour is 0600 hours, the default business end hour is 1800 hours. The default time zone is US/Eastern. Default holidays are defined at `metrics.alerts.SiteHolidays`. Holidays are the only defaults that currently can't be overriden. The GUI uses the `SLA` config section to override start hour, end hour, and timezone.

  **Expect** metric generation to take about ten times as long when applying business hours. Every alert time field has to be modified before the stats are calculated.



  Currently, an event and incident table summary is available. For the GUI and CLI, a count of emails per event is appended to each event, but this is a separate function call that's not necessary if you don't care about emails per event/incident.



  Access to this library is made available on the CLI at `ace metrics`.



  ```
  usage: ace metrics [-h] [-so {json,csv,ascii_table,print}] [-fo {json,xlsx}]
                     [-f FILENAME] [-c COMPANIES] [-bh BUSINESS_HOURS]
                     [-s START_DATETIME] [-e END_DATETIME]
                     {alerts,events} ...

  positional arguments:
    {alerts,events}
      alerts              alert based metrics
      events              event based metrics. With no arguments will return all
                          events

  optional arguments:
    -h, --help            show this help message and exit
    -so {json,csv,ascii_table,print}, --stdout-format {json,csv,ascii_table,print}
                          desired standard output format. ~~~ NOTE: 'print' (the
                          default) will also summarize large tables. Use
                          'ascii_table' to avoide that.
    -fo {json,xlsx}, --fileout-format {json,xlsx}
                          desired file output format. Default is xls.
    -f FILENAME, --filename FILENAME
                          The name of a file to write results to.
    -c COMPANIES, --company COMPANIES
                          A list of company names to gather metrics for. Default
                          is all defined companies.
    -bh BUSINESS_HOURS, --business-hours BUSINESS_HOURS
                          Use business hours for all time based stats. Set like
                          start_hour,end_hour,time_zone. Example:
                          6,18,US/Eastern
    -s START_DATETIME, --start_datetime START_DATETIME
                          The start datetime data is in scope. Format: YYYY-MM-
                          DD HH:MM:SS. Default: 7 days ago.
    -e END_DATETIME, --end_datetime END_DATETIME
                          The end datetime data is in scope. Format: YYYY-MM-DD
                          HH:MM:SS. Default: now.
  ```



  Get the overall alert counts, by disposition, from '2020-06-01 00:00:00' to now. Print the results to an ASCII table.

  `ace metrics -so ascii_table -s '2020-06-01 00:00:00' alerts --alert_count`

  Same thing but return the json representation.

  `ace metrics -so json -s '2020-06-01 00:00:00' alerts --alert_count | jq '.'`

  Generate all alert based statistic tables for the user 'jdoe', and print the results as ASCII tables.

  `ace metrics -so ascii_table -s '2020-06-01 00:00:00' alerts users -u jdoe --all-stats`

  The following command will output the calculated metrics in json. Business hours will be applied to time-based calculations and all statistics for alerts by disposition and month between '2020-06-01 00:00:00' and now will be calculated. Additionally, all alert statistics for the alert type 'mailbox' will be calculated during the same date range with business hours applied.

  `ace metrics -fo json  -bh 6,18,US/Eastern -s '2020-06-01 00:00:00' alerts --all-stats types -t mailbox --all-stats`



  Almost all of the metrics that are available on the CLI are available through the GUI with a few exceptions.



  By default, users only have access to their metrics. Users needing access to other users statistics, through the GUI, can be added to the following configuration item:

    ```bash
    $ ace config gui.full_metric_access
    [gui]
    full_metric_access = 1,3
    ```

  The `full_metric_access` config item expects a comma separated list of user IDs that can get all stats through the GUI.



  From the GUI, you can export metrics to an XLSX spreadsheet or to JSON documents.



  Because of limitations with a popular XLSX application, the names of data tables are heavily sanitized before being written to tabs on the resulting XLSX sheet.
  As a result of this, the first tab on every XLSX spreadsheet will be a table that shows the mapping from tab names to original pivot table names.



  When JSON export is selected, all tables are converted to JSON, and added to a tar.gz archive. Names are mostly preserved but special characters that can cause problems when used in filenames are replaced with '-'.



  The ability to select ACE data, where the data belongs to a specific company, is only made available if more than one company is defined.



  Currently, the project is structured so that every directory in the root `$SAQ_HOME\metrics` directory is an ACE database table, data source, or data target. As of now, metrics are calculated around the `ace.alerts` and `ace.events` database tables and their relevant mapping tables. Any additional functionality should follow this structure. For instance, there is a desire to add metrics around `ace.observables`, which will happen and will likely be placed in an `observables` directory. Another example would be writing functionality that injects and tracks  `$SAQ_HOME\data\stats\modules` statistics to be made available in this metrics lib. Such functionality should go into a new directory, as well.



  + [x] Create a central location, in the ACE repo, for metrics to be managed in a modular and flexible way.
      - [x] Make metrics a library, on the side of, and not directly interconnected with the ACE codebase.
      - [x] Take metric calculations out of the GUI and have the GUI use the metrics library.
      - [x] Make all metrics available via the CLI.

  + [ ] Make all or a subset of metrics persistable

      - [ ] Automatically update the metric pivot tables as the ACE database tables are updated. MySQL database replication looks like a viable solution. This library appears promising: [python-mysql-replication](https://github.com/noplay/python-mysql-replication).

          One way to do this would be to create a daemon service that can run and continuously update the pivot tables. This will allow for near real-time access to the data and also lay a groundwork for real-time graphical metrics to eventually populate a dashboard.

          The pivot table metrics could run in memory in something like REDIS, as long as the metrics service is running. AND/OR.. a time-series database.. or explore more options.



  + [ ] Implement pytest based testing.
  + [ ] Make Holidays configurable.
  + [ ] Should config items be seperate from ACE or configurable in ACE?
  + [ ] Add observable statistics.
      - [ ] Distinguish detection points? yara, indicator, etc.


pkgId: faad8980a5f5ef909e62e696cef9d5a2674b67d4fe460b608c4b0c07a833d2f4
name: python-ace-tools-open
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Open implementation of ace_tools referenced in GPT4o
url: https://github.com/zinccat/ace_tools_open
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ace-tools-open-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Open implementation of ace_tools referenced in GPT4o.



  ```bash
  pip install ace_tools_open
  ```


  ```python
  import pandas as pd
  import numpy as np


  np.random.seed(0)
  data = {
      'A': np.random.rand(10),
      'B': np.random.rand(10),
      'C': np.random.randint(1, 100, 10),
      'D': np.random.choice(['X', 'Y', 'Z'], 10)
  }

  df = pd.DataFrame(data)
  import ace_tools_open as tools; tools.display_dataframe_to_user(name="Random DataFrame", dataframe=df)
  ```


pkgId: a6c450509adab531f5c900f8ca2e9defb507f15fdd8ea4f464459b97bb0d6285
name: python-acellera-envlicenses
arch: src
version: 0.0.5
epoch: 0
release: 1
summary: envlicenses
url: https://www.htmd.org
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acellera-envlicenses-0.0.5-1.src.rpm
checksum_type: sha256
description:
  This package allows you to inspect a conda environment for licenses of all installed packages



  `pip install acellera-envlicenses`



  `envlicenses /home/user/miniconda3/envs/myenv/`


pkgId: 6ade8ba215e0fd829f229a7d6da78f41ebe8123eb59a395eb3003fac855f3fd8
name: python-acemeta
arch: src
version: 0.2.7
epoch: 0
release: 1
summary: Library for typical workflows
url: https://pypi.org/project/acemeta/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acemeta-0.2.7-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">acemeta</h1>
  <p align="center">
    <a href="https://pypi.org/project/acemeta">
      <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/v/acemeta?style=for-the-badge&logo=pypi&logoColor=white&label=Version&color=5865F2"></a>
    <a href="https://pypi.org/project/acemeta/">
      <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dw/acemeta?style=for-the-badge&logo=pypi&logoColor=white&label=Downloads&color=5865F2"></a>
    <br>
    <a href="https://github.com/annhilati/acemeta?tab=GPL-3.0-1-ov-file">
      <img alt="GitHub License" src="https://img.shields.io/github/license/annhilati/acemeta?style=for-the-badge&label=Lizenz&color=F23F42"></a>
    <br>
    <a href="https://github.com/annhilati/acemeta">
      <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/annhilati/acemeta?style=for-the-badge&logo=github&label=Letzter%20Commit&color=23A55A"></a>


pkgId: 5fdf865a1e8f3d47d2279120f0ddff3eded499bbae0d4d27fd6f6f8e885ad03d
name: python-aceql
arch: src
version: 5.8
epoch: 0
release: 1
summary: Python 3 Client toolkit for easy access of remote SQL databases managed with AceQL HTTP.
url: https://github.com/kawansoft/aceql-py
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aceql-5.8-1.src.rpm
checksum_type: sha256
description:
  ![GitHub top language](https://img.shields.io/github/languages/top/kawansoft/aceql-http-client-python)
  ![GitHub issues](https://img.shields.io/github/issues/kawansoft/aceql-http-client-python)

  ![PyPI - Downloads](https://img.shields.io/pypi/dm/aceql)
  ![GitHub](https://img.shields.io/github/license/kawansoft/aceql-http-client-python)

  ![PyPI](https://img.shields.io/pypi/v/aceql)
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/aceql)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/aceql)
  ![PyPI - Format](https://img.shields.io/pypi/format/aceql)
  ![PyPI - Status](https://img.shields.io/pypi/status/aceql)

  ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/kawansoft/aceql-http-client-python/master)
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/945858b13a75453c9701f7fe195ec0d7)](https://www.codacy.com/gh/kawansoft/aceql-http-client-python?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=kawansoft/aceql-http-client-python&amp;utm_campaign=Badge_Grade)
  ![GitHub contributors](https://img.shields.io/github/contributors/kawansoft/aceql-http-client-python)







  <img src="https://docs.aceql.com/img/AceQL-Schema-min.jpg" alt="AceQL Draw"/>

     * [Fundamentals](#fundamentals)
        * [License](#license)
        * [Python Versions &amp; DB-API 2.0](#python-versions--db-api-20)
        * [AceQL Server side compatiblity](#aceql-server-side-compatiblity)
        * [Installation](#installation)
        * [Data transport](#data-transport)
        * [Best practices for fast response time](#best-practices-for-fast-response-time)
        * [Datatypes](#datatypes)
     * [Usage](#usage)
        * [Quickstart](#quickstart)
        * [Handling Exceptions](#handling-exceptions)
           * [The error type](#the-error-type)
           * [Most common AceQL server messages](#most-common-aceql-server-messages)
           * [HTTP Status Codes](#http-status-codes)
        * [Advanced Usage](#advanced-usage)
           * [Managing NULL values](#managing-null-values)
              * [Setting NULL values](#setting-null-values)
              * [Reading NULL values](#reading-null-values)
           * [Transactions](#transactions)
           * [Proxies](#proxies)
           * [Timeouts](#timeouts)
           * [BLOB management](#blob-management)
              * [BLOB creation](#blob-creation)
              * [BLOB reading](#blob-reading)
              * [Managing BLOB upload progress](#managing-blob-upload-progress)
           * [Calling AceQL Java stored procedures](#calling-aceql-java-stored-procedures)
           * [Using outer authentication without a password  and with an AceQL Session ID](#using-outer-authentication-without-a-password-and-with-an-aceql-session-id)
        * [Using the Metadata Query API](#using-the-metadata-query-api)
           * [Downloading database schema into a file](#downloading-database-schema-into-a-file)
           * [Accessing remote database main properties](#accessing-remote-database-main-properties)
           * [Getting Details of Tables and Columns](#getting-details-of-tables-and-columns)
  * [Implementing Retry Logic in HTTP Requests (Experimental)](#implementing-retry-logic-in-http-requests-experimental)



  This document describes how to use the AceQL SDK / module and gives some details about how it operates with the AceQL Server side.

  The AceQL SDK / module allows you to wrap the [AceQL HTTP APIs](https://github.com/kawansoft/aceql-http/blob/master/aceql-http-user-guide-api.md)  to access remote SQL databases and/or SQL databases in the cloud by simply including standard Python SQL calls in your code, just like you would do for any local database. There is zero learning curve and usage is straightforward.

  The AceQL Server operation is described in [AceQL HTTP Server Installation and Configuration Guide](https://github.com/kawansoft/aceql-http/blob/master/README.md), whose content is sometimes referred to in his User Guide.

  On the remote side, like the AceQL Server access to the SQL database using Java JDBC, we will sometimes use the JDBC terminology (ResultSet, etc.) in this document. Nevertheless, knowledge of Java or JDBC is *not* a requirement.



  The SDK is licensed with the liberal [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license.



  The module supports Python 3.7–3.12.

  The module provides a SQL interface compliant with the DB-API 2.0 specification described by [**PEP 249**](https://www.python.org/dev/peps/pep-0249).



  This  SDK version requires AceQL HTTP server side v12.2+.



  `pip install aceql`



  HTTP requests parameters are transported in UTF-8 format and JSON format is used for data and class  transport

  All requests are streamed:

  - Output requests (from the client side)  are streamed directly from the socket to the server to avoid buffering any     content body
  - Input responses (for the client side)   are streamed directly from the socket to the server to efficiently read     the response body

  Large content (query results, Blobs/Clobs, etc.) is transferred using files. It is never loaded in memory. Streaming techniques are always used to read and write this content.



  Every HTTP exchange between the client and server side is time-consuming, because the HTTP call is synchronous and waits for the server's response

  Try to avoid coding SQL calls inside loops, as this can reduce execution speed. Each SQL call will send an http request and wait for the response from the server.

  Note that AceQL is optimized as much as possible. A SELECT call returning a huge data volume will not consume memory on the server or client side:  AceQL uses input stream and output stream I/O for data  transfer.

  Server JDBC ResultSet retrieval is as fast as possible :

  - The ResultSet creation is done once on the server by the executeQuery.


  - The rows are all dumped at once on the servlet output stream by the server


  - The client side gets the ResultSet content as a file.

  All data reading commands are executed locally on the client side with forward-only reading.

  **It is highly recommended to always use  `Cursor.executemany`  with autocommit off when you have many rows to INSERT or UPDATE.**



  The main server side JDBC data types for columns are supported:

  `Boolean`, `Blob/Clob`, `Integer`, `Short`, `Double`,  `Float`, `BigDecimal`, `Long`, `String`, `Date`, `Time`, and `Timestamp`.

  Note that the AceQL module does not allow you to specify data types to use; data types are implicitly chosen by the module.

  Parameter values are automatically converted to their SQL equivalent. The following Python types can thus be sent to remote server without any problem:

  | Python type / class                         | SQL type                                     |
  | ------------------------------------------- | -------------------------------------------- |
  | Tuple  (None, SqlNullType.&lt;SQL_TYPE&gt;) | NULL                                         |
  | str                                         | CHAR, VARCHAR                                |
  | int                                         | INTEGER, or BIGINT,  <br />depending on size |
  | bool                                        | BIT, BOOL                                    |
  | float                                       | REAL                                         |
  | date                                        | DATE                                         |
  | datetime                                    | TIMESTAMP                                    |
  | time                                        | TIME                                         |
  | File Object                                 | BLOB                                         |

  NULL and BLOB types are explained in Advanced Usage.

  This is how SQL types are converted to Python types by default:

  | SQL type                                        | Python type / class |
  | ----------------------------------------------- | ------------------- |
  | NULL                                            | None                |
  | CHAR, VARCHAR                                   | str                 |
  | TINYINT, INTEGER                                | int                 |
  | BIGINT                                          | int                 |
  | BOOL, BIT                                       | bool                |
  | DATE                                            | date                |
  | DECIMAL, DOUBLE_PRECISION, FLOAT, NUMERIC, REAL | float               |
  | TIMESTAMP                                       | datetime            |
  | TIME                                            | time                |
  | BLOB                                            | Response stream     |





  To use the module, just create a `Connection` object that represents the database:

  ```python
  import aceql


  url = "https://www.acme.com:9443/aceql"
  database = "sampledb"
  username = "user1"
  password = "password1"

  connection = aceql.connect(url=url, username=username, password=password, database=database)
  ```

  The alternate syntax with parameters in the URL is supported:

  ```python
  url="https://www.acme.com:9443/aceql?username=user1&password=password1&database=sampledb"
  connection = aceql.connect(url=url)
  ```

  The schema of the database is here:  [sampledb](https://docs.aceql.com/rest/soft/7.0/src/sampledb_other_databases.txt)

  Once you have a `Connection`, you can create a `Cursor` object and call its `execute()` method to perform SQL commands.

  Following sample shows how to insert 3 new customers using prepared statements:

  ```python
  sql = "insert into customer values (?, ?, ?, ?, ?, ?, ?, ?)"
  params = (1, 'Sir', 'John', 'Smith I', '1 Madison Ave', 'New York',
            'NY 10010', '+1 212-586-7001')
  cursor.execute(sql, params)
  rows_inserted = cursor.rowcount

  sql = "insert into customer values (?, ?, ?, ?, ?, ?, ?, ?)"
  params = (2, 'Sir', 'William', 'Smith II', '1 Madison Ave', 'New York',
            'NY 10010', '+1 212-586-7002')
  cursor.execute(sql, params)
  rows_inserted += cursor.rowcount

  sql = "insert into customer values (?, ?, ?, ?, ?, ?, ?, ?)"
  params = (3, 'Sir', 'William', 'Smith III', '1 Madison Ave', 'New York',
            'NY 10010', '+1 212-586-7003')
  cursor.execute(sql, params)
  rows_inserted += cursor.rowcount

  print("rows inserted: " + str(rows_inserted))
  ```

  which returns:

  ```bash
  rows inserted: 3
  ```

  The `cursor.execute()`  sends the SQL order and the parameters to the server who executes it on.

  We view the first inserted customer:

  ```python
  sql = "select * from customer where customer_id = ?"
  params = (1,)
  cursor.execute(sql, params)
  row = cursor.fetchone()
  print (row)
  ```

  which returns:

  ```bash
  (1, 'Sir ', 'John', 'Smith', '1 Madison Ave', 'New York', 'NY 10010  ', '+1 212-586-7000')
  ```

  The remote result set is downloaded into a file that is read line per line at each `Cursor.fetchone()` call.

  We have access to the name and type of each column:

  ```python
  for desc in cursor.description:
      print(desc[0] + ", " + desc[1])
  ```

  Which returns:

  ```
  customer_id, INTEGER
  customer_title, CHAR
  fname, VARCHAR
  lname, VARCHAR
  addressline, VARCHAR
  town, VARCHAR
  zipcode, CHAR
  phone, VARCHAR
  ```

  It's recommended to close the `Cursor` at end of SELECT usage in order to release  the underlying file stream and delete the associated temp file:

  ```python
  cursor.close()
  ```

  We view now all the customers and apply good practice to force the closing of `Cursor`:

  ```python
  with closing(connection.cursor()) as cursor:
      sql = "select * from customer where customer_id >= ? order by customer_id"
      params = (1,)
      cursor.execute(sql, params)
      print("rows: " + str(cursor.rowcount))

      rows = cursor.fetchall()

      for row in rows:
          print(row)
  ```

  Which returns:

  ```bash
  (1, 'Sir ', 'John', 'Smith', '1 Madison Ave', 'New York', 'NY 10010  ', '+1 212-586-7001')
  (2, 'Sir ', 'William', 'Smith II', '1 Madison Ave', 'New York', 'NY 10010  ', '+1 212-586-7002')
  (3, 'Sir ', 'William', 'Smith III', '1 Madison Ave', 'New York', 'NY 10010  ', '+1 212-586-7003')
  rows: 3
  ```

  At end of our session, it is highly recommended to close the `Connection`:

  ```python


  connection.close()
  ```



  Except for `TypeError`, Exceptions thrown are always an instance of `Error`

  The `Error` contains 5 pieces of information:

  | Info             | Description                              |
  | :--------------- | :--------------------------------------- |
  | Reason           | The error message. Retrieved with `reason` property. |
  | Error Type       | See below for description. Retrieved with `error_type` property. |
  | Exception        | The original `Exception` that is the cause, if any. Retrieved with  `cause` property. |
  | Http Status Code | See below for description. Retrieved with `http_status_code` property. |
  | Server Exception | The Java Exception Stack Trace thrown on server side,  if any. Retrieved with `remote_stack_trace` property. |



  The error type allows you to get the type of error, and where the error occurred. It is retrieved with the `Error.error_type` property.

  | Error Type  Value | Description                              |
  | :---------------: | :--------------------------------------- |
  |         0         | The error occurred locally on the client side.   See `http_status_code` property for more info.  Typical cases: no Internet connection, proxy  authentication required. |
  |         1         | The error is due to a JDBC Exception.  It was raised by the remote JDBC Driver and is rerouted  by AceQL as is.  The JDBC error message is accessible via `reason` property.  Typical case: an error in the SQL statement.  <br />Examples: wrong table or column name. |
  |         2         | The error was raised by the AceQL Server.  This means that the AceQL Server expected a value or  parameter that was not sent by the client side.  Typical cases: misspelling in URL parameter, missing  required request parameters,  JDBC  Connection expiration, etc.  The detailed error message is accessible via `reason` property.  See below for most common AceQL Server error  messages. |
  |         3         | The AceQL Server forbade the execution of the SQL  statement for a security reason.  For security reasons, `reason` property gives access to voluntarily vague  details. |
  |         4         | The AceQL Server is on failure and raised an  unexpected Java Exception.  The stack track is included and accessible via `remote_stack_trace` property. |



  | AceQL Sever  Error Messages   (Error.error_type  = 2)        |
  | ------------------------------------------------------------ |
  | AceQL main  servlet not found in path                        |
  | An error occurred  during Blob download                      |
  | An error occurred  during Blob upload                        |
  | Blob directory  defined in DatabaseConfigurator.getBlobDirectory() does not exist |
  | Connection is  invalidated (probably expired)                |
  | Database does not  exist                                     |
  | Invalid blob_id.  Cannot be used to create a file            |
  | Invalid blob_id.  No Blob corresponding to blob_id           |
  | Invalid  session_id                                          |
  | Invalid username  or password                                |
  | No action found  in request                                  |
  | Unable to get a  Connection                                  |
  | Unknown SQL  action or not supported by software             |



  The HTTP Status Code is accessible with the `Error.http_status_code` property. The HTTP Status Code is 200 (OK) on successful completion calls.

  When an error occurs:

  - If error type is 0, the HTTP Status Code is returned by the client side and may take all possible values in a malformed HTTP call.

  - If error type is > 0, the HTTP Status Code can take one the following values returned by the server side:



  | HTTP  Status Code            | Description                              |
  | ---------------------------- | ---------------------------------------- |
  | 400  (BAD REQUEST)           | Missing element in URL path<br />Missing request parameters<br />All JDBC errors raised by the remote JDBC  Driver |
  | 401  (UNAUTHORIZED)          | Invalid username or password in connect<br />Invalid session_id<br />The AceQL Server forbade the execution of  the SQL statement for security reasons |
  | 404 (NOT_FOUND)              | BLOB directory does not exist on server<br />BLOB file not found on server |
  | 500  (INTERNAL_SERVER_ERROR) | The AceQL Server is on failure and raised  an unexpected Java Exception |







  `NULL` values are handled in a specific way, because the remote server must know the type of the `NULL` value.

  To create a `NULL` value parameter, create a tuple of 2 elements:

  - First value is `None`.
  - Second value is a one of the `SqlNullType` constants that defines the type of the parameter.

  This 2 elements tuple is then inserted in the tuple of the prepared statement parameters:

  ```python
  sql = "insert into customer values (?, ?, ?, ?, ?, ?, ?, ?)"
  params = (4, 'Sir', 'William', 'Smith IV', '1 Madison Ave',
            'New York', 'NY 10010', (None, SqlNullType.VARCHAR))
  cursor.execute(sql, params)
  ```



  A `NULL` column value is returned as `None`:

  ```python
  sql = "select * from customer_3 where customer_id = ? order by customer_id"
  params = (4,)
  cursor.execute(sql, params)
  row = cursor.fetchone()
  print (row)
  ```

  Execution will return:

  ```python
  (4, 'Sir ', 'William', 'Smith IV', '1 Madison Ave', 'New York', 'NY 10010  ', None)
  ```

  In this AceQL module version: there is no difference for string columns between a real NULL in the database and the ''NULL" string.



  Transactions are supported by the module. Because the remote server executes JDBC code, client code must follow the JDBC requirement to set the auto commit mode to false prior executing a transaction.

  This is done with `Cursor.set_auto_commit(False)`. It is good practice to always reset auto commit mode to true at end of your transactions. Not that it auto commit mode state is undefined when a `Connection` is created with `aceql.connect()` call.

  Transaction example:

  ```python

  self.connection.set_auto_commit(False)

  cursor = self.connection.cursor()

  try:
      
      sql = "insert into customer values (?, ?, ?, ?, ?, ?, ?, ?)"
      params = (customer_id, 'Sir', 'John', 'Smith', '1 Madison Ave',
                'New York', 'NY 10010', '+1 212-586-7000')
      cursor.execute(sql, params)

      
      sql = "insert into orderlog values ( ?, ?, ?, ?, ?, ?, ?, ?, ? )"

      the_datetime = datetime.now()
      the_date = the_datetime.date()

      
      
      params = (customer_id, item_id, "Item Description", 9999,
                the_date, the_datetime, (None, SqlNullType.BLOB), 1, 2)
      cursor.execute(sql, params)

      self.connection.commit()
  except Error as e:
      print(e)
      self.connection.rollback()
      raise e
  finally:
      self.connection.set_auto_commit(True) # Good practice
      cursor.close()
  ```



  The AceQL module support proxies, using  the [proxy](https://requests.readthedocs.io/en/master/user/advanced/#proxies) syntax of [Requests](https://requests.readthedocs.io/en/master/) The aceql module uses Requests for HTTP communications with the remote server. All options of a new AceQL connection are passed with the `ConnectionOptions` wrapper.

  ```python
  import aceql
  from aceql import ConnectionOptions


  url = "https://www.acme.com:9443/aceql"
  database = "sampledb"
  username = "user1"
  password = "password1"

  proxies = {
      'http': 'http://10.10.1.10:3128',
      'https': 'http://10.10.1.10:1080',
  }


  connection_options = ConnectionOptions(proxies=proxies)
  connection = aceql.connect(url=url, username=username, password=password, database=database,
                             connection_options=connection_options)
  ```

  Authenticated proxies are supported.  Just create an `aceql.ProxyAuth`  instance and pass it to `aceql.connect()` with the `ConnectionOptions` wrapper.

  ```python
  import aceql
  from aceql import ConnectionOptions
  from aceql import ProxyAuth
  from samples import my_proxy


  url = "https://www.acme.com:9443/aceql"
  database = "sampledb"
  username = "user1"
  password = "password1"

  proxies = {
      "http": "http://localhost:8081",
  }


  proxy_username = my_proxy.get_username()
  proxy_password = my_proxy.get_password()


  auth = ProxyAuth(proxy_username, proxy_password)


  connection_options = ConnectionOptions(proxies=proxies, auth=auth)
  connection = aceql.connect(url=url, username=username, password=password, database=database,
                             connection_options=connection_options)
  ```

  The AceQL module uses  [requests-toolbelt](https://pypi.python.org/pypi/requests-toolbelt)  for authenticated proxy management.



  Use the `timeout` parameter of `ConnectionOptions` to pass a timeout value  in the  [Requests Timeouts](https://requests.readthedocs.io/en/master/user/advanced/#timeouts) format.

  If no timeout is specified explicitly, requests do not time out.

  ```python
  connection_options = ConnectionOptions(timeout=10)
  connection = aceql.connect(url=url, username=username, password=password, database=database,
                             connection_options=connection_options)
  ```



  The AceQL module supports BLOB creation and reading. Methods are implemented using streaming techniques to keep low memory consumption. CLOBs are not supported in this version.



  BLOB creation is supported by passing a tuple with a File Object as parameter of a prepared statement:

  ```python
  sql = "insert into orderlog values ( ?, ?, ?, ?, ?, ?, ?, ?, ? )"

  filename = os.getcwd() + sep + "item_1_image.png"
  fd = open(filename, "rb") # File will be closed by AceQL
  blob_tuple = (fd, )

  params = (1, 1, "Item 1 Description", 9999,
            datetime.now() , datetime.now().date(), blob_tuple, 1, 2)
  cursor.execute(sql, params)
  ```



  BLOB reading is supported through `Cursor.get_blob_stream(column_index`). The stream can then be read with a `for` loop that iterates on the `respsonse`, using syntax provided by [Requests](https://requests.readthedocs.io/en/master/user/quickstart/#raw-response-content):

  ```python
  sql = "select customer_id, item_id, jpeg_image from orderlog " \
        "where customer_id = ? and item_id = ?"
  params = (1, 1)
  cursor.execute(sql, params)
  row = cursor.fetchone()


  blob_length = cursor.get_blob_length(2)
  print("blob length: " + str(blob_length))


  response = cursor.get_blob_stream(2)


  filename = os.path.expanduser("~") + sep + "jpeg_image.jpg"
  with open(filename, 'wb') as fd:
      for chunk in response.iter_content(chunk_size=2048):
          fd.write(chunk)

  stat_info = os.stat(filename)
  print("file length: " + str(stat_info.st_size))
  ```



  You may want to give your users a progress bar when uploading BLOBs.

  The `ProgressIndicator.Percent` property allows you to get the current percent of upload. Value will be incremented automatically during upload.

  To activate the update mechanism:

  1/ Set the long BLOB length along the File Object in the tuple of the BLOB prepared statement parameter:

  ```python
  file_length = os.stat(filename).st_size

  fd = open(filename, "rb")
  blob_tuple = (fd, file_length)
  ```

  2/ Create your `ProgressIndicator` instance and enter it to the `Connection` instance before the `Cursor.execute(sql,  params)` call :

  ```python
  progress_indicator = ProgressIndicator()
  connection.set_progress_indicator(progress_indicator)
  ```

  You then can read `ProgressIndicator.percent` property in your watching thread.

  Code sample:

  ```python
  with closing(connection.cursor()) as cursor:
      filename = os.getcwd() + sep + "item_1_image.jpg"
      file_length = os.stat(filename).st_size

      fd = open(filename, "rb")
      blob_tuple = (fd, file_length)

      progress_indicator = ProgressIndicator()
      connection.set_progress_indicator(progress_indicator)

      sql = "insert into orderlog values ( ?, ?, ?, ?, ?, ?, ?, ?, ? )"

      params = (1, 1, "Item 1 Description", 9999,
                datetime.now() , datetime.now().date(),
                blob_tuple, 1, 2)

      
      
      cursor.execute(sql, params)
  ```



  The AceQL client SDK allows executing a remote server Java class that implements the AceQL Server

  `org.kawanfw.sql.api.server.executor.ServerQueryExecutor` interface and that returns the rows of the SELECT.

  See the `org.kawanfw.sql.api.server.executor.ServerQueryExecutor` [Javadoc](https://docs.aceql.com/rest/soft/11.0/javadoc/org/kawanfw/sql/api/server/executor/ServerQueryExecutor.html).

  The usage on the client side is straightforward with the `Cursor.ExecuteServerQueryAsync()` method:

  ```python
  server_query_executor_class_name = "com.mycompany.MyServerQueryExecutor"
  my_parameters = [1]

  cursor.execute_server_query(server_query_executor_class_name, my_parameters)
  print("cursor.rowcount    : " + str(cursor.rowcount))
  rows = cursor.fetchall()

  print("fetchall:")
  for row in rows:
      print(row)

  cursor.close()
  ```



  Some working environments (Intranet, etc.) require that the client user authenticates himself without a password. Thus, it is not possible for this users to authenticate though the AceQL client SDK.

  In this case, you may use directly the native HTTP [login](https://github.com/kawansoft/aceql-http/blob/master/aceql-http-user-guide-api.md#login) API to authenticate the users and retrieve the `session_id` returned by the API. Just pass the value of the `session_id` to the `ConnectionOptions` instance, along with a `None` `password` to `connect`.

  ```python
  import aceql
  from aceql import ConnectionOptions
  from samples import my_session_id_builder


  url = "https://www.acme.com:9443/aceql"
  database = "sampledb"
  username = "user1"


  session_id = my_session_id_builder.get_session_id_from_login_api()


  connection_options = ConnectionOptions(session_id=session_id)
  connection = aceql.connect(url=url, username=username, password=None, database=database,
                             connection_options=connection_options)
  ```



  The metadata API allows:

  - downloading a remote database schema
    in HTML or text format,
  - to get a remote database main properties,
  - to get the list of tables,
  - to get the details of each table.

  It also allows wrapping remote tables, columns, indexes, etc. into
  easy to use provided Python classes: Table, Index, Column, etc.

  First step is to get an instance of `RemoteDatabaseMetaData`:

  ```python
  remote_database_meta_data = RemoteDatabaseMetaData(connection)
  ```



  Downloading a schema into a  `File` is done through the `db_schema_download(filename)` method. See the `RemoteDatabaseMetaData` documentation:

  ```python
  filename = os.path.expanduser("~") + os.sep + "db_schema.html"
  remote_database_meta_data.db_schema_download(filename)
  ```

  See an example of the built HTML schema:  [db_schema.out.html](https://docs.aceql.com/rest/soft/11.0/src/db_schema.out.html)



  The `JdbcDatabaseMetaData` class wraps instance the main value retrieved by a remote server JDBC call to `java.sql.Connection.getMetaData()`:

  ```python
  jdbc_meta_data = remote_database_meta_data.get_jdbc_database_meta_data()
  print("Major Version: " + str(jdbc_meta_data.getJDBCMajorVersion))
  print("Minor Version: " + str(jdbc_meta_data.getJDBCMinorVersion))
  print("IsReadOnly   : " + str(jdbc_meta_data.isReadOnly))
  ```



  See the `RemoteDatabaseMetaData` documentation:

  ```python
  print("Print the column details of each table:")
  for table_name in table_names:
      table = remote_database_meta_data.get_table(table_name)

      print()
      print("Columns of table: " + table_name)
      for column in table.columns:
          print(column)
  ```

  ____________



  In networked applications, transient failures can cause HTTP requests to fail. To handle this, you can configure retry logic using the `HTTPClientWithRetry` class.

  - **`set_max_retries`**: Sets the number of retry attempts after a failure. For example, `ConnectionInfo.MaxRetries = 3` retries the request up to three times.
  - **`set_retry_interval_ms`**: Specifies the delay between retries in milliseconds. For instance, `ConnectionInfo.RetryIntervalMs = 1000` adds a 1-second pause between retries.

  Example configuration:

  ```python
          HTTPClientWithRetry.set_max_retries(3)
          HTTPClientWithRetry.set_retry_interval_ms(1000)
  ```

  This setup retries failed requests up to three times with a 1-second interval between attempts.


pkgId: e190537112cd79778a99e6354cc0b90e36dac40cff74ea1704da16369c53b5d2
name: python-acestream
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Interact with the AceStream Engine and the HTTP API
url: https://github.com/jonian/python-acestream
rpm_license: GNU General Public License v3 (GPLv3)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acestream-0.2.0-1.src.rpm
checksum_type: sha256
description:
  Python interface to interact with the AceStream [Engine](https://wiki.acestream.media/Streaming), [HTTP API](https://wiki.acestream.media/Engine_HTTP_API) and [Search API](https://wiki.acestream.media/Search_API).


  ```
  pip install acestream
  ```


  ```python
  import time
  import subprocess

  from acestream.server import Server
  from acestream.engine import Engine
  from acestream.stream import Stream


  engine = Engine('acestreamengine', client_console=True)


  server = Server(host='streams.com', port=6880)


  if not server.available:
    server = Server(host='127.0.0.1', port=6878)

    
    if not server.available:
      engine.start()

      
      while not engine.running:
        time.sleep(1)


  stream = Stream(server, id='ff36fce40a7d2042e327eaf9f215a1e9cb622b56')
  stream.start()


  player = subprocess.Popen(['mpv', stream.playback_url])


  player.communicate()
  stream.stop()


  engine.stop()
  ```


  ```python
  import time
  import random
  import subprocess

  from acestream.server import Server
  from acestream.engine import Engine
  from acestream.search import Search


  engine = Engine('acestreamengine', client_console=True)


  server = Server(host='127.0.0.1', port=6878)


  if not server.available:
    engine.start(stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    
    while not engine.running:
      time.sleep(1)


  search = Search(server, category='sport')
  search.get(page=1)


  for result in search.results:
    print("%40s %10s %40s" % (result.name, result.bitrate, result.infohash))


  stream = random.choice(search.results).stream
  stream.start(hls=True, transcode_audio=True)


  player = subprocess.Popen(['mpv', stream.playback_url])


  player.communicate()
  stream.stop()


  engine.stop()
  ```


  Bug reports and pull requests are welcome on GitHub at https://github.com/jonian/python-acestream.


  Python AceStream is available as open source under the terms of the [GPLv3](http://www.gnu.org/licenses/gpl-3.0.en.html)


pkgId: 09e88375f0b7c01781879fb442c22b7fa9a7fbeddd132911298a3c95ef06d652
name: python-acetone-nnet
arch: src
version: 0.3.2.post3
epoch: 0
release: 1
summary: Predictable programming framework for ML applications in safety-critical systems.
url: https://pypi.org/project/acetone-nnet/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acetone-nnet-0.3.2.post3-1.src.rpm
checksum_type: sha256
description:
  Predictable programming framework for ML applications in safety-critical systems.

  This repo contains the code of the framework presented in the ECRTS'22 paper  ["ACETONE: Predictable programming framework for ML applications in safety-critical systems"](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECRTS.2022.3).

  This framework generate a C code corresponding to a neural network given as input.



  The corresponding package is named [acetone-nnet](https://pypi.org/project/acetone-nnet/).

  The folder [tests/examples](./tests/examples/) give examples on how to use the main functionnalities of the package (code generation and debug mode)

  The folder [tests/check_installation](./tests/check_installation/) give a file with a few quick test checking some main, functionalities of the package, as an quick verification of the installation.




  You'll find in the home directory the files regarding the licencing and copyright of the framework:

  * [AUTHORS.md](./AUTHORS.md)
  * [LICENSE](./LICENSE)

  This directory also contains the [requirements.txt](./requirements.txt) which list the package versionning used in the framework.

  The [test](./test/) directory includes several tests for the framework and the data to run them.

  The [src](./src/) folder contains the backend code of ACETONE.





  Install le package using `pip`
  ```
  pip install acetone-nnet
  ```




  Clone the GitHub repo on your computer

  ```
  git clone https://github.com/onera/acetone.git
  ```

  Then install the packages listed in [`requirements.txt`](./requirements.txt)

  ```
  pip install -r acetone/requirements.txt
  ```




  The following commands generate a test neural network before generating the corresponding C code using ACETONE.



  In the *acetone* directory

  * Run the *initial_setup.py* code
  ```
  python3 tests/models/lenet5/lenet5_example/initial_setup.py
  ```

  This script defines a neural network with a Lenet-5 architecture using the framework Keras. It then save the model in *.h5* and *.json* files. The later one is created using a specific function, developped by us, to write the keras model in ACETONE's format. The scripts also creates a random input to test the neural network. Finally, the scripts saves and prints, as a reference, the output of the inference done by the Keras framework.



  Then, generate the C code with ACETONE.

  * Call ACETONE with the following arguments:
    * The file describing the model
    * The name of the function to generate (here 'lenet5')
    * The number of test to run (here 1)
    * The algorithm used for the convolution layer ('6loops','indirect_gemm_'+TYPE, 'std_gemm_'+TYPE, with TYPE being amongst 'nn','nt',    'tn','tt')
    * The directory in which the code will be generated
    * The input file with the test data

  ```
  acetone_generate tests/models/lenet5/lenet5_example/lenet5.h5  lenet5 1 std_gemm_nn tests/models/lenet5/lenet5_example/lenet5_generated tests/models/lenet5/lenet5_example/test_input_lenet5.txt
  ```

  * Compile the code
  ```
  make -C tests/models/lenet5/lenet5_example/lenet5_generated all
  ```

  * Execute the file with the path to the directory of the output file as argument
  ```
  ./tests/models/lenet5/lenet5_example/lenet5_generated/lenet5 ./tests/models/lenet5/lenet5_example/lenet5_generated/output_acetone.txt
  ```

  * Compare the output given by Keras and ACETONE
  ```
  acetone_compare ./tests/models/lenet5/lenet5_example/output_keras.txt ./tests/models/lenet5/lenet5_example/lenet5_generated/output_acetone.txt 1
  ```



  Tests are implemented in the folder *tests*.

  To run them, use the `run_tests.py` script from the `tests/` folder.
  ```
  python3 run_tests.py all
  ```

  You can replace the `all` argument by the name of a subfolder to only run the tests in it.
  ```
  python3 run_tests.py FOLDER_NAME
  ```
  where FOLDER_NAME is the name of your subfolder.

  You can run one test by using the command
  ```
  python3 -m unittest PATH_TO_TEST
  ```
  where PATH_TO_TEST is the path tot your test.



  To reproduce the result of semantic experiment with ACETONE as described in the paper, use the following commands:

  * For the acas_decr128 model
  ```
  acetone_generate tests/models/acas/acas_decr128/acas_decr128.json acas_dcre128 1000 std_gemm_nn tests/models/acas/acas_decr128/output_acetone tests/models/acas/acas_decr128/test_input_acas_decr128.txt
  make -C tests/models/acas/acas_decr128/output_acetone all
  ./tests/models/acas/acas_decr128/output_acetone/acas_decr128 tests/models/acas/acas_decr128/output_acetone/output_acetone.txt
  acetone_compare tests/models/acas/acas_decr128/output_keras.txt tests/models/acas/acas_decr128/output_acetone/output_acetone.txt
  ```

  * For the lent5 model

  ```
  acetone_generate tests/models/lenet5/lenet5_trained/lenet5_trained.json lenet5_trained 1000 std_gemm_nn tests/models/lenet5/lenet5_trained/output_acetone tests/models/lenet5_trained/test_input_lenet5.txt
  make -C tests/models/lenet5/lenet5_trained/output_acetone all
  ./tests/models/lenet5/lenet5_trained/output_acetone/lenet5_trained tests/models/lenet5/lenet5_trained/output_acetone/output_acetone.txt
  acetone_compare tests/models/lenet5/lenet5_trained/output_keras.txt tests/models/lenet5/lenet5_trained/output_acetone/output_acetone.txt
  ```



  Please refer to the [`implemented.md`](./implemented.md) file to see the current capabilities of the framework.



  The project is under the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of  the License or (at your option) any later version.

  See LICENSE for details.


pkgId: c8ca6c9b875f75592eb0ddec32c64a745550d6b5811f3b235149143db48ef566
name: python-aceye
arch: src
version: 2.0.2
epoch: 0
release: 1
summary: Business ready documents from Cisco ACI
url: https://pypi.org/project/aceye/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aceye-2.0.2-1.src.rpm
checksum_type: sha256
description:
  [![published](https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg)](https://developer.cisco.com/codeexchange/github/repo/automateyournetwork/ACEye)



  Business Ready Documents for Cisco ACI



  Access Bundle Groups

  Access Control Entities

  Access Control Instances

  Access Control Rules

  Access Control Scope

  Access Policy Group Source Relationships

  Access Port Groups

  Access Port Profiles

  Application Profiles

  ARP Adjacency Endpoints

  ARP Database

  ARP Domain

  ARP Entity

  ARP Instances

  ARP Interfaces

  Attachable Access Entity Profiles

  Attachable Access Entity Profiles Source Relationships

  BGP Address Families

  BGP Domains

  BGP Entities

  BGP Instances

  BGP Instances Policy

  BGP Peers

  BGP Peers AF Entries

  BGP Peers Entries

  BGP Route Reflector Policy

  BGP Route Reflectors

  Bridge Domains

  Bridge Domains Target Relationships

  Bridge Domains To Outside

  CDP Adjacency Endpoints

  CDP Entities

  CDP Instances

  CDP Interface Addresses

  CDP Interfaces

  CDP Management Addresses

  Cluster Aggregate Interfaces

  Cluster Health

  Cluster Physical Interfaces

  Cluster RS Member Interfaces

  Compute Controllers

  Compute Domains

  Compute Endpoint Policy Descriptions

  Compute Providers

  Compute RS Domain Policies

  Context Source Relationships

  Contexts (VRFs)

  Contexts Target Relationships

  Contracts

  Contract Consumer Interfaces

  Contract Consumers

  Contract Consumers Root

  Contract Providers

  Contract Providers Root

  Contract Subjects

  Contract Subjects Filter Attributes

  Controllers

  Device Packages

  Domain Attachments

  Domain Profile Source Relationships

  Endpoint Profile Containers

  Endpoints (All Connected Fabric Endpoints)

  Endpoints To Paths

  EPG to Bridge Domain Links

  EPGs (Endpoint Groups)

  Equipment Board Slots

  Equipment Boards

  Equipment Chassis

  Equipment CPUs

  Equipment DIMMs

  Equipment Fabric Extenders

  Equipment Fabric Ports

  Equipment Fan Slots

  Equipment Fan Trays

  Equipment Fans

  Equipment Field Programmable Gate Arrays

  Equipment Indicator LEDs

  Equipment Leaf Ports

  Equipment Line Card Slots

  Equipment Line Cards

  Equipment Port Locator LEDs

  Equipment Power Supplies

  Equipment Power Supply Slots

  Equipment RS IO Port Physical Configs

  Equipment Sensors

  Equipment SP Common Blocks

  Equipment SPROM LCs

  Equipment SPROM Power Supplies

  Equipment SPROM Power Supply Blocks

  Equipment SPROM Supervisors

  Equipment Storage

  Equipment Supervisor Slots

  Equipment Supervisors

  Ethernet Port Manager Physical Interfaces

  *Events

  External Unmanaged Nodes

  External Unmanaged Nodes Interfaces

  Fabric Extended Path Endpoint Containers

  Fabric Instances

  Fabric Link Containers

  Fabric Links

  Fabric Loose Links

  Fabric Loose Nodes

  Fabric Membership

  Fabric Node SSL Certifcates

  Fabric Nodes

  Fabric Path Endpoint Containers

  Fabric Path Endpoints

  Fabric Paths

  Fabric Pods

  Fabric Protected Path Endpoint Containers

  Fault Summary

  FEX Policies

  Fibre Channel Entity

  Firmware Card Running

  Firmware Compute Running

  Firmware Running

  Function Policies

  Health

  Host Port Selectors

  Interface Policies

  Interface Profiles

  IP Addresses

  IPv4 Addresses

  IPv4 Domains

  IPv4 Entities

  IPv4 Instances

  IPv4 Interfaces

  IPv4 Next Hop

  IPv4 Routes

  ISIS Adjacency Endpoints

  ISIS Discovered Tunnel Endpoints

  ISIS Domains

  ISIS Domains Level

  ISIS Entities

  ISIS Instances

  ISIS Interfaces

  ISIS Interfaces Level

  ISIS Next Hop

  ISIS Routes

  L2 Bridge Domains

  L2 EPG Bridge Domain Source Relationships

  L2 External Instance Profiles

  L2 External Interfaces

  L2 External Logical Interface Profiles

  L2 External Logical Node Profiles

  L2 Interface Source Relationships

  L2Out Paths

  L2Outs

  L3 Contexts

  L3 Contexts Source Relationships

  L3 Domains

  L3 Domains Source Relationships

  L3 Instances

  L3 Interfaces

  L3 Logical Interface Profiles

  L3 Logical Node Profiles

  L3 Physical Interface Source Relationships

  L3 Routed Interfaces

  L3 Routed Loopback Interfaces

  L3 Subinterfaces

  L3 Subnets

  L3Out IP Addresses

  L3Out Members

  L3Out Node Source Relationships

  L3Out Path Source Relationships

  L3Out Profiles

  L3Outs

  LACP Entities

  LACP Instances

  LACP Interfaces

  Leaf Interface Profiles

  Leaf Switch Profiles

  License Entitlements

  LLDP Adjacency Endpoints

  LLDP Entities

  LLDP Instances

  LLDP Interfaces

  Locales

  Management Interfaces

  OSPF Adjacency Endpoints

  OSPF Areas

  OSPF Database

  OSPF Domains

  OSPF Entities

  OSPF External Profiles

  OSPF Instances

  OSPF Interfaces

  OSPF Routes

  OSPF Unicast Next Hop

  Path Attachments

  Physical Domains

  Physical Interfaces

  Port Blocks

  Port Channel Aggregate Interfaces

  Port Channel Member Interfaces

  Prefix List

  Prefix List Detailed

  QOS Classes

  Route Policies

  Security Domains

  Spine Access Policy Groups

  Spine Access Port Profiles

  Spine Host Port Selectors

  Spine Interface Profiles

  Spine Switch Profiles

  Static Route Next Hop Policies

  Subnets

  SVIs

  Tenant

  Tenant Health

  Top System

  Tunnel Interfaces

  Unicast Route Database

  Unicast Route Domains

  Unicast Route Entities

  Unicast Route Next Hop

  Unicast Routes

  Users

  VLAN Encapsulation Blocks

  VLAN Endpoint Group Encapsulation

  VLAN Namespace Policies

  VLAN Namespace Source Relationships

  VLAN Pools

  VMM Controller Profiles

  VMM Domain Profiles

  VMM Provider Profiles

  VMM User Profiles

  VPC Configurations

  VPC Domains

  VPC Entities

  VPC Instances

  VPC Interfaces

  vzAny

  vzAny To Consumers

  vzAny To Providers

  vzDeny Rules

  vzEntries

  vzFilters

  vzInterface Source Relationships

  vzRule Owner

  vzTaboo

  Wired Nodes

  * Both Audit Log and Events are commented out of the base package due to the potentially huge number of records; should you want the Audit Log / Events please uncomment out lines 72-73 (Audit Log) and 76-77 (Events)




  ```console
  $ python3 -m venv ACI
  $ source ACI/bin/activate
  (ACI) $ pip install aceye
  ```



  ```console
  (ACI) $ aceye --help
  ```

  ![ACEye Help](/images/help.png)



  ```console
  (ACI) $ aceye --url <url to APIC> --username <APIC username> --password <APIC password>
  ```



  ```console
  (ACI) $ aceye
  APIC URL: <URL to APIC>
  APIC Username: <APIC Username>
  APIC Password: <APIC Password>
  ```



  ```console
  (ACI) $ export URL=<URL to APIC>
  (ACI) $ export USERNAME=<APIC Username>
  (ACI) $ export PASSWORD=<APIC Password>
  ```



  Excel Viewer - CSV Files

  Markdown Preview - Markdown Files

  Markmap - Mindmap Files

  Open in Default Browser - HTML Files



  Please contact John Capobianco if you need any assistance


pkgId: 79e3e573045e85328008d33acc5dcca5747f0e59c0bfdabd797692d2282fb14d
name: python-acfunsdk
arch: src
version: 0.9.7
epoch: 0
release: 1
summary: acfunsdk - UNOFFICEICAL
url: https://pypi.org/project/acfunsdk/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acfunsdk-0.9.7-1.src.rpm
checksum_type: sha256
description:
  <br />

  <p align="center">
  <a href="https://github.com/dolaCmeo/acfunsdk">
  <img height="100" src="https://s3.dualstack.us-east-2.amazonaws.com/pythondotorg-assets/media/files/python-logo-only.svg" alt="">
  <img height="100" src="https://ali-imgs.acfun.cn/kos/nlav10360/static/common/widget/header/img/acfunlogo.11a9841251f31e1a3316.svg" alt="">
  </a>
  </p>

  <br />

  acfunsdk是 **非官方的 [AcFun弹幕视频网][acfun.cn]** Python库。

  > 声明：`acfunsdk`是python的学习工具，并未破解任何acfun相关内容。代码完全公开，仅用于交流学习。
  > 如涉及版权等相关问题，请遵守acfun相关协议及法律法规。如有bug或其他疑问，欢迎发布[issues][Issue]。

  - - -

  **Python** : `Python>=3.8`， 本体请自行[下载安装][python]。



  ```shell
  python -m pip install acfunsdk
  ```

  - - -





  ```python
  from acfunsdk import Acer

  acer = Acer()


  acer.login(username='you@email.com', password='balalabalala')

  acer.loading(username='13800138000')

  acer.signin()



  demo_video = acer.get("https://www.acfun.cn/v/ac4741185")
  print(demo_video)

  demo_article = acer.get("https://www.acfun.cn/a/ac16695813")
  print(demo_article)

  demo_album = acer.get("https://www.acfun.cn/a/aa6001205")
  print(demo_album)

  demo_bangumi = acer.get("https://www.acfun.cn/bangumi/aa5023295")
  print(demo_bangumi)

  demo_up = acer.get("https://www.acfun.cn/u/39088")
  print(demo_up)

  demo_moment = acer.get("https://www.acfun.cn/moment/am2797962")
  print(demo_moment)

  demo_live = acer.get("https://live.acfun.cn/live/378269")
  print(demo_live)

  demo_share = acer.get("https://m.acfun.cn/v/?ac=37086357")
  print(demo_share)

  demo_doodle = acer.get("https://hd.acfun.cn/doodle/knNWmnco.html")
  print(demo_doodle)
  ```

  - - -


  <details>
  <summary>依赖库</summary>

  **依赖: 包含在 `requirements.txt` 中**

  + [`httpx`](https://pypi.org/project/httpx/)`>=0.23`
  + [`lxml`](https://pypi.org/project/lxml/)`>=4`
  + [`beautifulsoup4`](https://pypi.org/project/beautifulsoup4/)`>=4`

  </details>

  - - -


  + [AcFun 助手](https://github.com/niuchaobo/acfun-helper) 是一个适用于 AcFun（ acfun.cn ） 的浏览器插件。
  + [AcFunDanmaku](https://github.com/wpscott/AcFunDanmaku) 是用C# 和 .Net 6编写的AcFun直播弹幕工具。
  + [实现自己的AcFun直播弹幕姬](https://www.acfun.cn/a/ac16695813) [@財布士醬](https://www.acfun.cn/u/311509)
  + QQ频道“AcFun开源⑨课”
  + 使用 [Poetry](https://python-poetry.org/) 构建

  - - -



  [![ac彩娘-阿部高和](https://tx-free-imgs2.acfun.cn/kimg/bs2/zt-image-host/ChQwODliOGVhYzRjMTBmOGM0ZWY1ZRCIzNcv.gif)][dolacfun]
  [♂ 整点大香蕉🍌][acfunsdk_page]
  <img alt="AcFunCard" align="right" src="https://discovery.sunness.dev/39088">

  - - -

  [dolacfun]: https://www.acfun.cn/u/39088
  [acfunsdk_page]: https://www.acfun.cn/a/ac37416587

  [acfun.cn]: https://www.acfun.cn/
  [Issue]: https://github.com/dolaCmeo/acfunsdk/issues
  [python]: https://www.python.org/downloads/
  [venv]: https://docs.python.org/zh-cn/3.8/library/venv.html

  [acer]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/acer_demo.py
  [index]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/index_reader.py
  [channel]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/channel_reader.py
  [search]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/seach_reader.py

  [bangumi]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/bangumi_demo.py
  [video]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/video_demo.py
  [article]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/article_demo.py
  [album]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/album_demo.py
  [member]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/member_demo.py
  [moment]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/moment_demo.py
  [live]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/live_demo.py

  [saver]: https://github.com/dolaCmeo/acfunsdk/blob/main/examples/AcSaver_demo.py


pkgId: 31ec4a1037382a47b1a7438a8db796f61d07e5237a6d5411f3198ee2ff67f96f
name: python-acgc
arch: src
version: 0.3.1
epoch: 0
release: 1
url: https://github.com/cdholmes/acgc-python
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acgc-0.3.1-1.src.rpm
checksum_type: sha256
summary:
  A collection of data analysis programs used by the Atmospheric Chemistry and Global Change (ACGC) research group

description:
  The acgc package is a collection of data analysis functions used by the Atmospheric Chemistry and Global Change Research Group (ACGC). Programs are written in Python 3.



  For conda users:

   `conda install -c conda-forge acgc`

  For pip users:

   `pip install acgc`


  If you plan to modify or improve the acgc package, an editable installation may be better:
  `pip install -e git+https://github.com/cdholmes/acgc-python`
  Your local files can then be managed with git, including keeping up-to-date with the github source repository (e.g. `git pull`).


  The old version of this package (before conversion to an importable python module) is accessible as the "classic" branch of this repository on github.



  See https://cdholmes.github.io/acgc-python


  The [`demo`](./demo/) folder contains examples of how to accomplish common data analysis and visualization tasks, including using many of the functions within the `acgc` library.

rpm_license:
[cell repeats an earlier one in this file: 7357 characters]


pkgId: 3bc347f43c35d6b0bf7f7742f47db8157f484c1260bd81b7e4f23ed6648f580d
name: python-ach
arch: src
version: 0.2
epoch: 0
release: 1
summary: Library to create and parse ACH files (NACHA)
url: https://github.com/travishathaway/python-ach
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ach-0.2-1.src.rpm
checksum_type: sha256
description:
  ACH file generator module for python. So far, this has been tested with
  “PPD” and “CCD” batches with addenda records.


pkgId: 558e7061edd8cffb465ca30a080dc8e50418075f1e6034bb15b07c360dacd5fe
name: python-achaekek
arch: src
version: 0.0.12
epoch: 0
release: 1
summary: Python library for the Manifold markets API.
url: https://pypi.org/project/achaekek/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-achaekek-0.0.12-1.src.rpm
checksum_type: sha256
description:
  Manifold markets Python API

  Create a new Manifold client

  ```python
  from achaekek import Client
  client = Client(api_key="YOUR API KEY")
  ```

  Make requests via this client

  ```python
  new_market = CreateMultipleChoiceMarket(
          question="Will creating this test market work?",
          answers=["Yes", "No"],
      )
  client.create_market(new_market)
  ```

  Enjoy your market!


pkgId: 255645eec4f1bccc46ad4d2d2f1bc1fe98398833402061d334f2c031697eea9a
name: python-achallonge
arch: src
version: 1.9.0
epoch: 0
release: 1
summary: A python library to use the Challonge API
url: https://github.com/fp12/achallonge
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-achallonge-1.9.0-1.src.rpm
checksum_type: sha256
description:
  *async Challonge for Python 3.5+*

  [![Build Status](https://travis-ci.org/fp12/achallonge.svg?branch=master)](https://travis-ci.org/fp12/achallonge)
  [![Documentation Status](https://readthedocs.org/projects/achallonge/badge/?version=latest)](http://achallonge.readthedocs.io/en/latest/?badge=latest)
  [![Coverage Status](https://coveralls.io/repos/github/fp12/achallonge/badge.svg?branch=master)](https://coveralls.io/github/fp12/achallonge?branch=master)


  Modern library that is more than just a wrapper for the Challonge web API




  * `aiohttp`

  Optional:
   * `cchardet` faster replacement for chardet, as mentionned on the aiohttp page
   * `aiodns` for speeding up DNS resolving, highly recommended by aiohttp



  * `3.5`
  * `3.6`
  * `3.7`



      pip install achallonge

  If you want to have the optional dependencies for aiohttp, you can:

      pip install achallonge[speed]



  ```python
  import challonge

  async def foo():
      
      user = await challonge.get_user('your_challonge_username', 'your_api_key')

      
      tournaments = await user.get_tournaments()

      
      for t in tournaments:
          print(t.id)  # 3272
          print(t.name)  # 'My Awesome Tournament'
          print(t.status)  # 'open'

      
      participants = await tournaments[0].get_participants()
      print(len(participants)) # 13
  ```



  The full documentation can be found on [Read the docs](http://achallonge.readthedocs.io/en/latest/index.html)



  Distributed under MIT license. See `LICENSE` for details

  Fabien Poupineau (fp12) - 2017-2019

  Twitter: [@fp12gaming](https://twitter.com/fp12gaming)

  Join the [Discord Server](https://discord.gg/KSRxBav) and discuss about this lib!


pkgId: d3ee81c722a103a91ea979c4f14f54b9e88249b4002a21282346097889a865e3
name: python-achatbot
arch: src
version: 0.0.7.15
epoch: 0
release: 1
summary: An open source chat bot for voice (and multimodal) assistants
url: https://github.com/ai-bot-pro/chat-bot
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-achatbot-0.0.7.15-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/achatbot)](https://pypi.org/project/achatbot/)
  <a href="https://app.commanddash.io/agent/github_ai-bot-pro_achatbot"><img src="https://img.shields.io/badge/AI-Code%20Agent-EB9FDA"></a>

  achatbot factory, create chat bots with llm(tools), asr, tts, vad, ocr, detect object etc..


  ![project-structure](https://github.com/user-attachments/assets/5bf7cebb-e590-4718-a78a-6b0c0b36ea28)


  - demo

    - [podcast](https://github.com/ai-bot-pro/achatbot/blob/main/demo/content_parser_tts.py)

      ```shell
      
      

      
      python -m demo.content_parser_tts instruct-content-tts \
          "https://en.wikipedia.org/wiki/Large_language_model"

      python -m demo.content_parser_tts instruct-content-tts \
          --role-tts-voices zh-CN-YunjianNeural \
          --role-tts-voices zh-CN-XiaoxiaoNeural \
          --language zh \
          "https://en.wikipedia.org/wiki/Large_language_model"

      
      
      python -m demo.content_parser_tts instruct-content-tts \
          "/Users/wuyong/Desktop/iOS_18_All_New_Features_Sept_2024.pdf"

      python -m demo.content_parser_tts instruct-content-tts \
          --role-tts-voices zh-CN-YunjianNeural \
          --role-tts-voices zh-CN-XiaoxiaoNeural \
          --language zh \
          "/Users/wuyong/Desktop/iOS_18_All_New_Features_Sept_2024.pdf"
      ```

  - cmd chat bots:

    - [local-terminal-chat](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/local-terminal-chat)(be/fe)
    - [remote-queue-chat](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/remote-queue-chat)(be/fe)
    - [grpc-terminal-chat](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/grpc/terminal-chat)(be/fe)
    - [grpc-speaker](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/grpc/speaker)
    - [http fastapi_daily_bot_serve](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/http/server/fastapi_daily_bot_serve.py) (with chat bots pipeline)
    - [**bots with config**](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/main.py)  see notebooks:
      - [Run chat bots with colab notebook](https://github.com/ai-bot-pro/achatbot?tab=readme-ov-file#run-chat-bots-with-colab-notebook)  🏃

  - support transport connector:
    - [x] pipe(UNIX socket),
    - [x] grpc,
    - [x] queue (redis),
    - [ ] websocket
    - [ ] TCP/IP socket

  - chat bot processors:
    - aggreators(llm use, assistant message),
    - ai_frameworks
      - [x] [langchain](https://www.langchain.com/): RAG
      - [ ] [llamaindex](https://www.llamaindex.ai/): RAG
      - [ ] [autoagen](https://github.com/microsoft/autogen): multi Agents
    - realtime voice inference(RTVI),
    - transport:
      - webRTC: (daily,livekit KISS)
        - [x] **[daily](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/daily.py)**: audio, video(image)
        - [x] **[livekit](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/livekit.py)**: audio, video(image)
        - [x] **[agora](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/agora.py)**: audio, (TODO: video)
      - [x] [Websocket server](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/websocket_server.py)
    - ai processor: llm, tts, asr etc..
      - llm_processor:
        - [x] [openai](https://github.com/ai-bot-pro/achatbot/blob/main/test/integration/processors/test_openai_llm_processor.py)(use openai sdk)
        - [x] [google gemini](https://github.com/ai-bot-pro/achatbot/blob/main/test/integration/processors/test_google_llm_processor.py)(use google-generativeai sdk)
        - [x] [litellm](https://github.com/ai-bot-pro/achatbot/blob/main/test/integration/processors/test_litellm_processor.py)(use openai input/output format proxy sdk)

  - core module:
    - local llm:
      - [x] llama-cpp (support text,vision with function-call model)
      - [x] transformers(manual, pipeline) (support text,vision:🦙,Qwen2-vl,Molmo with function-call model)
      - [ ] mlx_lm
    - remote api llm: personal-ai(like openai api, other ai provider)

  - AI modules:
    - functions:
      - [x] search: search,search1,serper
      - [x] weather: openweathermap
    - speech:
      - [x] asr: sense_voice_asr, whisper_asr, whisper_timestamped_asr, whisper_faster_asr, whisper_transformers_asr, whisper_mlx_asr, lightning_whisper_mlx_asr(!TODO), whisper_groq_asr
      - [x] audio_stream: daily_room_audio_stream(in/out), pyaudio_stream(in/out)
      - [x] detector: porcupine_wakeword,pyannote_vad,webrtc_vad,silero_vad,webrtc_silero_vad
      - [x] player: stream_player
      - [x] recorder: rms_recorder, wakeword_rms_recorder, vad_recorder, wakeword_vad_recorder
      - [x] tts: tts_chat,tts_coqui,tts_cosy_voice,tts_edge,tts_g
      - [x] vad_analyzer: daily_webrtc_vad_analyzer,silero_vad_analyzer
    - vision
      - [x] OCR(*Optical Character Recognition*):
        - [ ] [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
        - [x]  [GOT](https://github.com/Ucas-HaoranWei/GOT-OCR2.0)(*the General OCR Theory*)
      - [x] Detector:
        - [x] [YOLO](https://docs.ultralytics.com/) (*You Only Look Once*)
        - [ ] [RT-DETR v2](https://github.com/lyuwenyu/RT-DETR) (*RealTime End-to-End Object Detection with Transformers*)

  - gen modules config(*.yaml, local/test/prod) from env with file: `.env`
     u also use HfArgumentParser this module's args to local cmd parse args

  - deploy to cloud ☁️ serverless:
    - vercel (frontend ui pages)
    - Cloudflare(frontend ui pages), personal ai workers
    - [fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/cerebrium/fastapi-daily-chat-bot) on cerebrium (provider aws)
    - [fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/leptonai/fastapi-daily-chat-bot) on leptonai
    - aws lambda + api Gateway
    - docker -> k8s/k3s
    - etc...




  - [x] [ui/web-client-ui](https://github.com/ai-bot-pro/web-client-ui)
  deploy it to cloudflare page with vite, access https://chat-client-weedge.pages.dev/
  - [x] [ui/educator-client](https://github.com/ai-bot-pro/educator-client)
  deploy it to cloudflare page with vite, access https://educator-client.pages.dev/
  - [x] [chat-bot-rtvi-web-sandbox](https://github.com/ai-bot-pro/chat-bot-rtvi-client/tree/main/chat-bot-rtvi-web-sandbox)
  use this web sandbox to test config, actions with [DailyRTVIGeneralBot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/rtvi/daily_rtvi_general_bot.py)
  - [x] [vite-react-rtvi-web-voice](https://github.com/ai-bot-pro/vite-react-rtvi-web-voice) rtvi web voice chat bots, diff cctv roles etc, u can diy your own role by change the system prompt with [DailyRTVIGeneralBot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/rtvi/daily_rtvi_general_bot.py)
  deploy it to cloudflare page with vite, access https://role-chat.pages.dev/
  - [x] [vite-react-web-vision](https://github.com/ai-bot-pro/vite-react-web-vision)
  deploy it to cloudflare page with vite, access https://vision-weedge.pages.dev/
  - [x] [nextjs-react-web-storytelling](https://github.com/ai-bot-pro/nextjs-react-web-storytelling)
  deploy it to cloudflare page worker with nextjs, access https://storytelling.pages.dev/
  - [x] [websocket-demo](https://github.com/ai-bot-pro/achatbot/blob/main/ui/websocket/simple-demo): websocket audio chat bot demo



  - [x] [deploy/modal](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/modal)(KISS) 👍🏻
  - [x] [deploy/leptonai](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/leptonai)(KISS)👍🏻
  - [x] [deploy/cerebrium/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/cerebrium/fastapi-daily-chat-bot) :)
  - [x] [deploy/aws/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/aws/fastapi-daily-chat-bot) :|
  - [x] [deploy/docker/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/docker) 🏃



  > [!NOTE]
  > `python --version` >=3.10 with [asyncio-task](https://docs.python.org/3.11/library/asyncio-task.html)

  > [!TIP]
  > use [uv](https://github.com/astral-sh/uv) + pip to run, install the required dependencies fastly, e.g.:
  > `uv pip install achatbot`
  > `uv pip install "achatbot[fastapi_bot_server]"`


  ```bash
  python3 -m venv .venv_achatbot
  source .venv_achatbot/bin/activate
  pip install achatbot

  pip install "achatbot[fastapi_bot_server]"
  ```


  ```bash
  git clone --recursive https://github.com/ai-bot-pro/chat-bot.git
  cd chat-bot
  python3 -m venv .venv_achatbot
  source .venv_achatbot/bin/activate
  bash scripts/pypi_achatbot.sh dev

  pip install "dist/achatbot-{$version}-py3-none-any.whl[fastapi_bot_server]"
  ```




  |                           Chat Bot                           | optional-dependencies                                        | Colab                                                        | Device                                                       | Pipeline Desc                                                |
  | :----------------------------------------------------------: | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
  | [daily_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/daily_bot.py)<br />[livekit_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/livekit_bot.py) | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream,<br />sense_voice_asr,<br />groq \| together api llm(text), <br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/webrtc_audio_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | CPU (free, 2 cores)                                          | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> groq \| together  (llm) <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [generate_audio2audio](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/remote-queue-chat/generate_audio2audio.py) | remote_queue_chat_bot_be_worker                              | <a href="https://github.com/weedge/doraemon-nb/blob/main/chat_bot_gpu_worker.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />pyaudio in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> qwen (llm) <br />-> cosy_voice (tts)<br />-> pyaudio out stream |
  | [daily_describe_vision_tools_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_describe_vision_tools_bot.py)<br />[livekit_describe_vision_tools_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_describe_vision_tools_bot.py) | e.g.:<br />daily_room_audio_stream \|livekit_room_audio_stream<br />deepgram_asr,<br />goole_gemini,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_describe_vision_tools_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | CPU(free, 2 cores)                                           | e.g.:<br />daily \|livekit room in stream<br />-> silero (vad)<br />-> deepgram (asr) <br />-> google gemini  <br />-> edge (tts)<br />-> daily \|livekit room out stream |
  | [daily_describe_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_describe_vision_bot.py)<br />[livekit_describe_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_describe_vision_bot.py) | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />sense_voice_asr,<br />llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_vision_qwen_vl.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Llama-3.2-11B-Vision-Instruct<br />L4<br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> qwen-vl (llm) <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_chat_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_chat_vision_bot.py)<br />[livekit_chat_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_chat_vision_bot.py) | e.g.:<br />daily_room_audio_stream \|livekit_room_audio_stream<br />sense_voice_asr,<br />llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_chat_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Ll<br/>ama-3.2-11B-Vision-Instruct<br />L4<br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> llm answer guide qwen-vl (llm) <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_chat_tools_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_chat_tools_vision_bot.py)<br />[livekit_chat_tools_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_chat_tools_vision_bot.py) | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />sense_voice_asr,<br />groq api llm(text), <br />tools:<br />- llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_chat_tools_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br<br/> /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Llama-3.2-11B-Vision-Instruct<br />L4 <br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />->llm with tools qwen-vl  <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_annotate_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_annotate_vision_bot.py)<br />[livekit_annotate_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_annotate_vision_bot.py) | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />vision_yolo_detector<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_annotate_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily \| livekit room in stream<br />vision_yolo_detector<br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_detect_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_detect_vision_bot.py)<br />[livekit_detect_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_detect_vision_bot.py) | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />vision_yolo_detector<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_detect_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily \| livekit room in stream<br />vision_yolo_detector<br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_ocr_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_ocr_vision_bot.py)<br />[livekit_ocr_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_ocr_vision_bot.py) | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />sense_voice_asr,<br />vision_transformers_got_ocr<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_ocr_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />vision_transformers_got_ocr<br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_month_narration_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/image/daily_month_narration_bot.py) | e.g.:<br />daily_room_audio_stream <br />groq \|together api llm(text),<br />hf_sd, together api (image)<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_month_narration_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | when use sd model with diffusers<br />T4(free) cpu+cuda (slow)<br />L4 cpu+cuda<br/>A100 all cuda<br /> | e.g.:<br />daily room in stream<br />-> together  (llm) <br />-> hf sd gen image model<br />-> edge (tts)<br />-> daily  room out stream |
  | [daily_storytelling_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/image/storytelling/daily_bot.py) | e.g.:<br />daily_room_audio_stream <br />groq \|together api llm(text),<br />hf_sd, together api (image)<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_storytelling_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | cpu (2 cores)<br />when use sd model with diffusers<br />T4(free) cpu+cuda (slow)<br />L4 cpu+cuda<br/>A100 all cuda<br /> | e.g.:<br />daily room in stream<br />-> together  (llm) <br />-> hf sd gen image model<br />-> edge (tts)<br />-> daily  room out stream |
  | [websocket_server_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/websocket_server_bot.py)<br />[fastapi_websocket_server_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/fastapi_websocket_server_bot.py) | e.g.:<br /> websocket_server<br />sense_voice_asr,<br />groq \|together api llm(text),<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_websocket_server_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | cpu(2 cores)                                                 | e.g.:<br />websocket protocol  in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> together  (llm) <br />-> edge (tts)<br />-> websocket protocol out stream |
  | [daily_natural_conversation_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/nlp/daily_natural_conversation_bot.py) | e.g.:<br /> daily_room_audio_stream<br />sense_voice_asr,<br />groq \|together api llm(NLP task),<br />gemini-1.5-flash (chat)<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achat_natural_conversation_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | cpu(2 cores)                                                 | e.g.:<br />daily room in stream<br />-> together  (llm NLP task) <br />->  gemini-1.5-flash model (chat)<br />-> edge (tts)<br />-> daily  room out stream |
  | [fastapi_websocket_moshi_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/voice/fastapi_websocket_moshi_bot.py) | e.g.:<br /> websocket_server<br />moshi opus stream voice llm<br /> | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_moshi_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | L4                                                           | websocket protocol  in stream<br />-> silero (vad)<br />-> moshi opus stream voice llm<br />-> websocket protocol out stream |
  | [daily_asr_glm_voice_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/voice/daily_asr_glm_voice_bot.py)<br>[daily_glm_voice_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/voice/daily_glm_voice_bot.py) | e.g.:<br /> daily_room_audio_stream<br />glm voice llm<br /> | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_glm_voice_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4/L4/A100                                                   | e.g.:<br />daily room in stream<br />->glm4-voice<br />-> daily  room out stream |
  |                                                              |                                                              |                                                              |                                                              |                                                              |
  |                                                              |                                                              |                                                              |                                                              |                                                              |





  > [!NOTE]
  >
  > - run src code, replace achatbot to src, don't need set `ACHATBOT_PKG=1` e.g.:
  >   ```
  >   TQDM_DISABLE=True \
  >        python -m src.cmd.local-terminal-chat.generate_audio2audio > log/std_out.log
  >   ```
  > - PyAudio need install python3-pyaudio
  > e.g. ubuntu `apt-get install python3-pyaudio`, macos `brew install portaudio`
  > see: https://pypi.org/project/PyAudio/
  >
  > - llm llama-cpp-python init use cpu Pre-built Wheel to install,
  > if want to use other lib(cuda), see: https://github.com/abetlen/llama-cpp-python#installation-configuration
  >
  > - install `pydub`  need install `ffmpeg` see: https://www.ffmpeg.org/download.html

  1. run `pip install "achatbot[local_terminal_chat_bot]"` to install dependencies to run local terminal chat bot;
  2. create achatbot data dir in `$HOME` dir `mkdir -p ~/.achatbot/{log,config,models,records,videos}`;
  3. `cp .env.example .env`, and check `.env`, add key/value env params;
  4. select a model ckpt to download:
      - vad model ckpt (default vad ckpt model use [silero vad](https://github.com/snakers4/silero-vad))
      ```
      
      huggingface-cli download pyannote/segmentation-3.0  --local-dir ~/.achatbot/models/pyannote/segmentation-3.0 --local-dir-use-symlinks False
      ```
      - asr model ckpt (default whipser ckpt model use base size)
      ```
      
      wget https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt -O ~/.achatbot/models/base.pt

      
      huggingface-cli download openai/whisper-base  --local-dir ~/.achatbot/models/openai/whisper-base --local-dir-use-symlinks False

      
      huggingface-cli download Systran/faster-whisper-base  --local-dir ~/.achatbot/models/Systran/faster-whisper-base --local-dir-use-symlinks False

      
      huggingface-cli download FunAudioLLM/SenseVoiceSmall  --local-dir ~/.achatbot/models/FunAudioLLM/SenseVoiceSmall --local-dir-use-symlinks False
      ```
      - llm model ckpt (default llamacpp ckpt(ggml) model use qwen-2 instruct 1.5B size)
      ```
      
      huggingface-cli download Qwen/Qwen2-1.5B-Instruct-GGUF qwen2-1_5b-instruct-q8_0.gguf  --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      
      huggingface-cli download Qwen/Qwen1.5-7B-Chat-GGUF qwen1_5-7b-chat-q8_0.gguf  --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      
      huggingface-cli download microsoft/Phi-3-mini-4k-instruct-gguf Phi-3-mini-4k-instruct-q4.gguf --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      ```
      - tts model ckpt (default whipser ckpt model use base size)
      ```
      
      huggingface-cli download 2Noise/ChatTTS  --local-dir ~/.achatbot/models/2Noise/ChatTTS --local-dir-use-symlinks False

      
      huggingface-cli download coqui/XTTS-v2  --local-dir ~/.achatbot/models/coqui/XTTS-v2 --local-dir-use-symlinks False

      
      git lfs install
      git clone https://www.modelscope.cn/iic/CosyVoice-300M.git ~/.achatbot/models/CosyVoice-300M
      git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git ~/.achatbot/models/CosyVoice-300M-SFT
      git clone https://www.modelscope.cn/iic/CosyVoice-300M-Instruct.git ~/.achatbot/models/CosyVoice-300M-Instruct
      

      ```

  5. run local terminal chat bot with env; e.g.
      - use dufault env params to run local chat bot
      ```
      ACHATBOT_PKG=1 TQDM_DISABLE=True \
          python -m achatbot.cmd.local-terminal-chat.generate_audio2audio > ~/.achatbot/log/std_out.log
      ```


  1. run `pip install "achatbot[fastapi_daily_bot_server]"` to install dependencies to run http fastapi daily chat bot;

  2. run below cmd to start http server, see api docs: http://0.0.0.0:4321/docs
      ```
      ACHATBOT_PKG=1 python -m achatbot.cmd.http.server.fastapi_daily_bot_serve
      ```
  3. run chat bot processor, e.g.
     - run a daily langchain rag bot api, with ui/educator-client
      > [!NOTE]
      > need process youtube audio save to local file with `pytube`, run `pip install "achatbot[pytube,deep_translator]"` to install dependencies
      > and transcribe/translate to text, then chunks to vector store, and run langchain rag bot api;
      > run data process:
      > ```
      > ACHATBOT_PKG=1 python -m achatbot.cmd.bots.rag.data_process.youtube_audio_transcribe_to_tidb
      > ```
      > or download processed data from hf dataset [weege007/youtube_videos](https://huggingface.co/datasets/weege007/youtube_videos/tree/main/videos), then chunks to vector store .
     ```
     curl -XPOST "http://0.0.0.0:4321/bot_join/chat-bot/DailyLangchainRAGBot" \
      -H "Content-Type: application/json" \
      -d $'{"config":{"llm":{"model":"llama-3.1-70b-versatile","messages":[{"role":"system","content":""}],"language":"zh"},"tts":{"tag":"cartesia_tts_processor","args":{"voice_id":"eda5bbff-1ff1-4886-8ef1-4e69a77640a0","language":"zh"}},"asr":{"tag":"deepgram_asr_processor","args":{"language":"zh","model":"nova-2"}}}}' | jq .
     ```
     - run a simple daily chat bot api, with ui/web-client-ui (default language: zh)
     ```
     curl -XPOST "http://0.0.0.0:4321/bot_join/DailyBot" \
      -H "Content-Type: application/json" \
      -d '{}' | jq .
     ```


  1. run `pip install "achatbot[remote_rpc_chat_bot_be_worker]"` to install dependencies to run rpc chat bot BE worker; e.g. :
     - use dufault env params to run rpc chat bot BE worker
  ```
  ACHATBOT_PKG=1 RUN_OP=be TQDM_DISABLE=True \
      TTS_TAG=tts_edge \
      python -m achatbot.cmd.grpc.terminal-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
  ```
  2. run `pip install "achatbot[remote_rpc_chat_bot_fe]"` to install dependencies to run rpc chat bot FE;
  ```
  ACHATBOT_PKG=1 RUN_OP=fe \
      TTS_TAG=tts_edge \
      python -m achatbot.cmd.grpc.terminal-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
  ```


  1. run `pip install "achatbot[remote_queue_chat_bot_be_worker]"` to install dependencies to run queue chat bot worker; e.g.:
     - use default env params to run
      ```
      ACHATBOT_PKG=1 REDIS_PASSWORD=$redis_pwd RUN_OP=be TQDM_DISABLE=True \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
      ```
     - sense_voice(asr) -> qwen (llm) -> cosy_voice (tts)
     u can login [redislabs](https://app.redislabs.com/#/) create 30M free databases; set `REDIS_HOST`,`REDIS_PORT` and `REDIS_PASSWORD` to run, e.g.:
     ```
      ACHATBOT_PKG=1 RUN_OP=be \
        TQDM_DISABLE=True \
        REDIS_PASSWORD=$redis_pwd \
        REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
        REDIS_PORT=14241 \
        ASR_TAG=sense_voice_asr \
        ASR_LANG=zn \
        ASR_MODEL_NAME_OR_PATH=~/.achatbot/models/FunAudioLLM/SenseVoiceSmall \
        N_GPU_LAYERS=33 FLASH_ATTN=1 \
        LLM_MODEL_NAME=qwen \
        LLM_MODEL_PATH=~/.achatbot/models/qwen1_5-7b-chat-q8_0.gguf \
        TTS_TAG=tts_cosy_voice \
        python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
     ```
  2. run `pip install "achatbot[remote_queue_chat_bot_fe]"` to install the required packages to run quueue chat bot frontend; e.g.:
     - use default env params to run (default vad_recorder)
      ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
      ```
     - with wake word
      ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          RECORDER_TAG=wakeword_rms_recorder \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
      ```
     - default pyaudio player stream with tts tag out sample info(rate,channels..), e.g.: (be use tts_cosy_voice out stream info)
     ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          RUN_OP=fe \
          TTS_TAG=tts_cosy_voice \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
     ```
     remote_queue_chat_bot_be_worker in colab examples :
     <a href="https://colab.research.google.com/github/weedge/doraemon-nb/blob/main/chat_bot_gpu_worker.ipynb" target="_parent">
     <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

     - sense_voice(asr) -> qwen (llm) -> cosy_voice (tts):


  1. run `pip install "achatbot[remote_grpc_tts_server]"` to install dependencies to run grpc tts speaker bot server;
  ```
  ACHATBOT_PKG=1 python -m achatbot.cmd.grpc.speaker.server.serve
  ```
  2. run `pip install "achatbot[remote_grpc_tts_client]"` to install dependencies to run grpc tts speaker bot client;
  ```
  ACHATBOT_PKG=1 TTS_TAG=tts_edge IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_g IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_coqui IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_chat IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_cosy_voice IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ```




  - stream-stt (realtime-recorder)
  ![audio-text](https://github.com/user-attachments/assets/44bcec7d-f0a1-47db-bd95-21feee43a361)

  - audio-llm (multimode-chat)
  ![pipe](https://github.com/user-attachments/assets/9970cf18-9bbc-4109-a3c5-e3e3c88086af)
  ![queue](https://github.com/user-attachments/assets/30f2e880-f16d-4b62-8668-61bb97c57b2b)


  - stream-tts (realtime-(clone)-speaker)
  ![text-audio](https://github.com/user-attachments/assets/676230a0-0a99-475b-9ef5-6afc95f044d8)
  ![audio-text text-audio](https://github.com/user-attachments/assets/cbcabf98-731e-4887-9f37-649ec81e37a0)



  - stream-ocr (realtime-object-detection)


  - Embodied Intelligence: Robots that touch the world, perceive and move



  torchchat is released under the [BSD 3 license](LICENSE). (Additional code in this distribution is covered by the MIT and Apache Open Source
  licenses.) However you may have other legal obligations that govern your use of content, such as the terms of service for third-party models.

rpm_license:
  BSD 3-Clause License  Copyright (c) 2024, weedge  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: bfd20f2644ffd4bf0fd0951acd50cfc7211731f883958858dbfa5a44093eb65e
name: python-achatbot
arch: src
version: 0.0.7.16
epoch: 0
release: 1
summary: An open source chat bot for voice (and multimodal) assistants
url: https://github.com/ai-bot-pro/chat-bot
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-achatbot-0.0.7.16-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/achatbot)](https://pypi.org/project/achatbot/)
  <a href="https://app.commanddash.io/agent/github_ai-bot-pro_achatbot"><img src="https://img.shields.io/badge/AI-Code%20Agent-EB9FDA"></a>

  achatbot factory, create chat bots with llm(tools), asr, tts, vad, ocr, detect object etc..


  ![project-structure](https://github.com/user-attachments/assets/5bf7cebb-e590-4718-a78a-6b0c0b36ea28)


  - demo

    - [podcast](https://github.com/ai-bot-pro/achatbot/blob/main/demo/content_parser_tts.py)

      ```shell
      
      

      
      python -m demo.content_parser_tts instruct-content-tts \
          "https://en.wikipedia.org/wiki/Large_language_model"

      python -m demo.content_parser_tts instruct-content-tts \
          --role-tts-voices zh-CN-YunjianNeural \
          --role-tts-voices zh-CN-XiaoxiaoNeural \
          --language zh \
          "https://en.wikipedia.org/wiki/Large_language_model"

      
      
      python -m demo.content_parser_tts instruct-content-tts \
          "/Users/wuyong/Desktop/iOS_18_All_New_Features_Sept_2024.pdf"

      python -m demo.content_parser_tts instruct-content-tts \
          --role-tts-voices zh-CN-YunjianNeural \
          --role-tts-voices zh-CN-XiaoxiaoNeural \
          --language zh \
          "/Users/wuyong/Desktop/iOS_18_All_New_Features_Sept_2024.pdf"
      ```

  - cmd chat bots:

    - [local-terminal-chat](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/local-terminal-chat)(be/fe)
    - [remote-queue-chat](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/remote-queue-chat)(be/fe)
    - [grpc-terminal-chat](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/grpc/terminal-chat)(be/fe)
    - [grpc-speaker](https://github.com/ai-bot-pro/achatbot/tree/main/src/cmd/grpc/speaker)
    - [http fastapi_daily_bot_serve](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/http/server/fastapi_daily_bot_serve.py) (with chat bots pipeline)
    - [**bots with config**](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/main.py)  see notebooks:
      - [Run chat bots with colab notebook](https://github.com/ai-bot-pro/achatbot?tab=readme-ov-file#run-chat-bots-with-colab-notebook)  🏃

  - support transport connector:
    - [x] pipe(UNIX socket),
    - [x] grpc,
    - [x] queue (redis),
    - [ ] websocket
    - [ ] TCP/IP socket

  - chat bot processors:
    - aggreators(llm use, assistant message),
    - ai_frameworks
      - [x] [langchain](https://www.langchain.com/): RAG
      - [ ] [llamaindex](https://www.llamaindex.ai/): RAG
      - [ ] [autoagen](https://github.com/microsoft/autogen): multi Agents
    - realtime voice inference(RTVI),
    - transport:
      - webRTC: (daily,livekit KISS)
        - [x] **[daily](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/daily.py)**: audio, video(image)
        - [x] **[livekit](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/livekit.py)**: audio, video(image)
        - [x] **[agora](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/agora.py)**: audio, video(image)
      - [x] [Websocket server](https://github.com/ai-bot-pro/achatbot/blob/main/src/transports/websocket_server.py)
    - ai processor: llm, tts, asr etc..
      - llm_processor:
        - [x] [openai](https://github.com/ai-bot-pro/achatbot/blob/main/test/integration/processors/test_openai_llm_processor.py)(use openai sdk)
        - [x] [google gemini](https://github.com/ai-bot-pro/achatbot/blob/main/test/integration/processors/test_google_llm_processor.py)(use google-generativeai sdk)
        - [x] [litellm](https://github.com/ai-bot-pro/achatbot/blob/main/test/integration/processors/test_litellm_processor.py)(use openai input/output format proxy sdk)

  - core module:
    - local llm:
      - [x] llama-cpp (support text,vision with function-call model)
      - [x] transformers(manual, pipeline) (support text,vision:🦙,Qwen2-vl,Molmo with function-call model)
      - [ ] mlx_lm
    - remote api llm: personal-ai(like openai api, other ai provider)

  - AI modules:
    - functions:
      - [x] search: search,search1,serper
      - [x] weather: openweathermap
    - speech:
      - [x] asr: sense_voice_asr, whisper_asr, whisper_timestamped_asr, whisper_faster_asr, whisper_transformers_asr, whisper_mlx_asr, lightning_whisper_mlx_asr(!TODO), whisper_groq_asr
      - [x] audio_stream: daily_room_audio_stream(in/out), pyaudio_stream(in/out)
      - [x] detector: porcupine_wakeword,pyannote_vad,webrtc_vad,silero_vad,webrtc_silero_vad
      - [x] player: stream_player
      - [x] recorder: rms_recorder, wakeword_rms_recorder, vad_recorder, wakeword_vad_recorder
      - [x] tts: tts_chat,tts_coqui,tts_cosy_voice,tts_edge,tts_g
      - [x] vad_analyzer: daily_webrtc_vad_analyzer,silero_vad_analyzer
    - vision
      - [x] OCR(*Optical Character Recognition*):
        - [ ] [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
        - [x]  [GOT](https://github.com/Ucas-HaoranWei/GOT-OCR2.0)(*the General OCR Theory*)
      - [x] Detector:
        - [x] [YOLO](https://docs.ultralytics.com/) (*You Only Look Once*)
        - [ ] [RT-DETR v2](https://github.com/lyuwenyu/RT-DETR) (*RealTime End-to-End Object Detection with Transformers*)

  - gen modules config(*.yaml, local/test/prod) from env with file: `.env`
     u also use HfArgumentParser this module's args to local cmd parse args

  - deploy to cloud ☁️ serverless:
    - vercel (frontend ui pages)
    - Cloudflare(frontend ui pages), personal ai workers
    - [fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/cerebrium/fastapi-daily-chat-bot) on cerebrium (provider aws)
    - [fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/leptonai/fastapi-daily-chat-bot) on leptonai
    - aws lambda + api Gateway
    - docker -> k8s/k3s
    - etc...




  - [x] [ui/web-client-ui](https://github.com/ai-bot-pro/web-client-ui)
  deploy it to cloudflare page with vite, access https://chat-client-weedge.pages.dev/
  - [x] [ui/educator-client](https://github.com/ai-bot-pro/educator-client)
  deploy it to cloudflare page with vite, access https://educator-client.pages.dev/
  - [x] [chat-bot-rtvi-web-sandbox](https://github.com/ai-bot-pro/chat-bot-rtvi-client/tree/main/chat-bot-rtvi-web-sandbox)
  use this web sandbox to test config, actions with [DailyRTVIGeneralBot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/rtvi/daily_rtvi_general_bot.py)
  - [x] [vite-react-rtvi-web-voice](https://github.com/ai-bot-pro/vite-react-rtvi-web-voice) rtvi web voice chat bots, diff cctv roles etc, u can diy your own role by change the system prompt with [DailyRTVIGeneralBot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/rtvi/daily_rtvi_general_bot.py)
  deploy it to cloudflare page with vite, access https://role-chat.pages.dev/
  - [x] [vite-react-web-vision](https://github.com/ai-bot-pro/vite-react-web-vision)
  deploy it to cloudflare page with vite, access https://vision-weedge.pages.dev/
  - [x] [nextjs-react-web-storytelling](https://github.com/ai-bot-pro/nextjs-react-web-storytelling)
  deploy it to cloudflare page worker with nextjs, access https://storytelling.pages.dev/
  - [x] [websocket-demo](https://github.com/ai-bot-pro/achatbot/blob/main/ui/websocket/simple-demo): websocket audio chat bot demo



  - [x] [deploy/modal](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/modal)(KISS) 👍🏻
  - [x] [deploy/leptonai](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/leptonai)(KISS)👍🏻
  - [x] [deploy/cerebrium/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/cerebrium/fastapi-daily-chat-bot) :)
  - [x] [deploy/aws/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/aws/fastapi-daily-chat-bot) :|
  - [x] [deploy/docker/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/docker) 🏃



  > [!NOTE]
  > `python --version` >=3.10 with [asyncio-task](https://docs.python.org/3.10/library/asyncio-task.html)

  > [!TIP]
  > use [uv](https://github.com/astral-sh/uv) + pip to run, install the required dependencies fastly, e.g.:
  > `uv pip install achatbot`
  > `uv pip install "achatbot[fastapi_bot_server]"`


  ```bash
  python3 -m venv .venv_achatbot
  source .venv_achatbot/bin/activate
  pip install achatbot

  pip install "achatbot[fastapi_bot_server]"
  ```


  ```bash
  git clone --recursive https://github.com/ai-bot-pro/chat-bot.git
  cd chat-bot
  python3 -m venv .venv_achatbot
  source .venv_achatbot/bin/activate
  bash scripts/pypi_achatbot.sh dev

  pip install "dist/achatbot-{$version}-py3-none-any.whl[fastapi_bot_server]"
  ```




  |                           Chat Bot                           | optional-dependencies                                        | Colab                                                        | Device                                                       | Pipeline Desc                                                |
  | :----------------------------------------------------------: | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
  | [daily_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/daily_bot.py)<br />[livekit_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/livekit_bot.py)<br />[agora_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/agora_bot.py)<br /> | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream,<br />sense_voice_asr,<br />groq \| together api llm(text), <br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/webrtc_audio_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | CPU (free, 2 cores)                                          | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> groq \| together  (llm) <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [generate_audio2audio](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/remote-queue-chat/generate_audio2audio.py) | remote_queue_chat_bot_be_worker                              | <a href="https://github.com/weedge/doraemon-nb/blob/main/chat_bot_gpu_worker.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />pyaudio in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> qwen (llm) <br />-> cosy_voice (tts)<br />-> pyaudio out stream |
  | [daily_describe_vision_tools_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_describe_vision_tools_bot.py)<br />[livekit_describe_vision_tools_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_describe_vision_tools_bot.py)<br />[agora_describe_vision_tools_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/agora_describe_vision_tools_bot.py)<br /> | e.g.:<br />daily_room_audio_stream \|livekit_room_audio_stream<br />deepgram_asr,<br />goole_gemini,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_describe_vision_tools_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | CPU(free, 2 cores)                                           | e.g.:<br />daily \|livekit room in stream<br />-> silero (vad)<br />-> deepgram (asr) <br />-> google gemini  <br />-> edge (tts)<br />-> daily \|livekit room out stream |
  | [daily_describe_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_describe_vision_bot.py)<br />[livekit_describe_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_describe_vision_bot.py)](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_describe_vision_bot.py)<br />[agora_describe_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/agora_describe_vision_bot.py)<br /> | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />sense_voice_asr,<br />llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_vision_qwen_vl.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Llama-3.2-11B-Vision-Instruct<br />L4<br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> qwen-vl (llm) <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_chat_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_chat_vision_bot.py)<br />[livekit_chat_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_chat_vision_bot.py)](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_chat_vision_bot.py)<br />[agora_chat_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/agora_chat_vision_bot.py)<br /> | e.g.:<br />daily_room_audio_stream \|livekit_room_audio_stream<br />sense_voice_asr,<br />llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_chat_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Ll<br/>ama-3.2-11B-Vision-Instruct<br />L4<br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> llm answer guide qwen-vl (llm) <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_chat_tools_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_chat_tools_vision_bot.py)<br />[livekit_chat_tools_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_chat_tools_vision_bot.py)<br />[agora_chat_tools_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/agora_chat_tools_vision_bot.py)<br /> | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />sense_voice_asr,<br />groq api llm(text), <br />tools:<br />- llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_chat_tools_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br<br/> /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Llama-3.2-11B-Vision-Instruct<br />L4 <br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />->llm with tools qwen-vl  <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_annotate_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_annotate_vision_bot.py)<br />[livekit_annotate_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_annotate_vision_bot.py)<br />[agora_annotate_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/agora_annotate_vision_bot.py)<br /> | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />vision_yolo_detector<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_annotate_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily \| livekit room in stream<br />vision_yolo_detector<br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_detect_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_detect_vision_bot.py)<br />[livekit_detect_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_detect_vision_bot.py)<br />[agora_detect_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/agora_detect_vision_bot.py)<br /> | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />vision_yolo_detector<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_detect_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily \| livekit room in stream<br />vision_yolo_detector<br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_ocr_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_ocr_vision_bot.py)<br />[livekit_ocr_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/livekit_ocr_vision_bot.py)<br/>[agora_ocr_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/agora_ocr_vision_bot.py)<br/> | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream<br />sense_voice_asr,<br />vision_transformers_got_ocr<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_ocr_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />vision_transformers_got_ocr<br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [daily_month_narration_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/image/daily_month_narration_bot.py) | e.g.:<br />daily_room_audio_stream <br />groq \|together api llm(text),<br />hf_sd, together api (image)<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_month_narration_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | when use sd model with diffusers<br />T4(free) cpu+cuda (slow)<br />L4 cpu+cuda<br/>A100 all cuda<br /> | e.g.:<br />daily room in stream<br />-> together  (llm) <br />-> hf sd gen image model<br />-> edge (tts)<br />-> daily  room out stream |
  | [daily_storytelling_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/image/storytelling/daily_bot.py) | e.g.:<br />daily_room_audio_stream <br />groq \|together api llm(text),<br />hf_sd, together api (image)<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_storytelling_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | cpu (2 cores)<br />when use sd model with diffusers<br />T4(free) cpu+cuda (slow)<br />L4 cpu+cuda<br/>A100 all cuda<br /> | e.g.:<br />daily room in stream<br />-> together  (llm) <br />-> hf sd gen image model<br />-> edge (tts)<br />-> daily  room out stream |
  | [websocket_server_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/websocket_server_bot.py)<br />[fastapi_websocket_server_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/fastapi_websocket_server_bot.py) | e.g.:<br /> websocket_server<br />sense_voice_asr,<br />groq \|together api llm(text),<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_websocket_server_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | cpu(2 cores)                                                 | e.g.:<br />websocket protocol  in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> together  (llm) <br />-> edge (tts)<br />-> websocket protocol out stream |
  | [daily_natural_conversation_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/nlp/daily_natural_conversation_bot.py) | e.g.:<br /> daily_room_audio_stream<br />sense_voice_asr,<br />groq \|together api llm(NLP task),<br />gemini-1.5-flash (chat)<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achat_natural_conversation_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | cpu(2 cores)                                                 | e.g.:<br />daily room in stream<br />-> together  (llm NLP task) <br />->  gemini-1.5-flash model (chat)<br />-> edge (tts)<br />-> daily  room out stream |
  | [fastapi_websocket_moshi_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/voice/fastapi_websocket_moshi_bot.py) | e.g.:<br /> websocket_server<br />moshi opus stream voice llm<br /> | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_moshi_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | L4                                                           | websocket protocol  in stream<br />-> silero (vad)<br />-> moshi opus stream voice llm<br />-> websocket protocol out stream |
  | [daily_asr_glm_voice_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/voice/daily_asr_glm_voice_bot.py)<br>[daily_glm_voice_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/voice/daily_glm_voice_bot.py) | e.g.:<br /> daily_room_audio_stream<br />glm voice llm<br /> | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_glm_voice_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4/L4/A100                                                   | e.g.:<br />daily room in stream<br />->glm4-voice<br />-> daily  room out stream |
  |                                                              |                                                              |                                                              |                                                              |                                                              |
  |                                                              |                                                              |                                                              |                                                              |                                                              |





  > [!NOTE]
  >
  > - run src code, replace achatbot to src, don't need set `ACHATBOT_PKG=1` e.g.:
  >   ```
  >   TQDM_DISABLE=True \
  >        python -m src.cmd.local-terminal-chat.generate_audio2audio > log/std_out.log
  >   ```
  > - PyAudio need install python3-pyaudio
  > e.g. ubuntu `apt-get install python3-pyaudio`, macos `brew install portaudio`
  > see: https://pypi.org/project/PyAudio/
  >
  > - llm llama-cpp-python init use cpu Pre-built Wheel to install,
  > if want to use other lib(cuda), see: https://github.com/abetlen/llama-cpp-python#installation-configuration
  >
  > - install `pydub`  need install `ffmpeg` see: https://www.ffmpeg.org/download.html

  1. run `pip install "achatbot[local_terminal_chat_bot]"` to install dependencies to run local terminal chat bot;
  2. create achatbot data dir in `$HOME` dir `mkdir -p ~/.achatbot/{log,config,models,records,videos}`;
  3. `cp .env.example .env`, and check `.env`, add key/value env params;
  4. select a model ckpt to download:
      - vad model ckpt (default vad ckpt model use [silero vad](https://github.com/snakers4/silero-vad))
      ```
      
      huggingface-cli download pyannote/segmentation-3.0  --local-dir ~/.achatbot/models/pyannote/segmentation-3.0 --local-dir-use-symlinks False
      ```
      - asr model ckpt (default whipser ckpt model use base size)
      ```
      
      wget https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt -O ~/.achatbot/models/base.pt

      
      huggingface-cli download openai/whisper-base  --local-dir ~/.achatbot/models/openai/whisper-base --local-dir-use-symlinks False

      
      huggingface-cli download Systran/faster-whisper-base  --local-dir ~/.achatbot/models/Systran/faster-whisper-base --local-dir-use-symlinks False

      
      huggingface-cli download FunAudioLLM/SenseVoiceSmall  --local-dir ~/.achatbot/models/FunAudioLLM/SenseVoiceSmall --local-dir-use-symlinks False
      ```
      - llm model ckpt (default llamacpp ckpt(ggml) model use qwen-2 instruct 1.5B size)
      ```
      
      huggingface-cli download Qwen/Qwen2-1.5B-Instruct-GGUF qwen2-1_5b-instruct-q8_0.gguf  --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      
      huggingface-cli download Qwen/Qwen1.5-7B-Chat-GGUF qwen1_5-7b-chat-q8_0.gguf  --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      
      huggingface-cli download microsoft/Phi-3-mini-4k-instruct-gguf Phi-3-mini-4k-instruct-q4.gguf --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      ```
      - tts model ckpt (default whipser ckpt model use base size)
      ```
      
      huggingface-cli download 2Noise/ChatTTS  --local-dir ~/.achatbot/models/2Noise/ChatTTS --local-dir-use-symlinks False

      
      huggingface-cli download coqui/XTTS-v2  --local-dir ~/.achatbot/models/coqui/XTTS-v2 --local-dir-use-symlinks False

      
      git lfs install
      git clone https://www.modelscope.cn/iic/CosyVoice-300M.git ~/.achatbot/models/CosyVoice-300M
      git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git ~/.achatbot/models/CosyVoice-300M-SFT
      git clone https://www.modelscope.cn/iic/CosyVoice-300M-Instruct.git ~/.achatbot/models/CosyVoice-300M-Instruct
      

      ```

  5. run local terminal chat bot with env; e.g.
      - use dufault env params to run local chat bot
      ```
      ACHATBOT_PKG=1 TQDM_DISABLE=True \
          python -m achatbot.cmd.local-terminal-chat.generate_audio2audio > ~/.achatbot/log/std_out.log
      ```


  1. run `pip install "achatbot[fastapi_daily_bot_server]"` to install dependencies to run http fastapi daily chat bot;

  2. run below cmd to start http server, see api docs: http://0.0.0.0:4321/docs
      ```
      ACHATBOT_PKG=1 python -m achatbot.cmd.http.server.fastapi_daily_bot_serve
      ```
  3. run chat bot processor, e.g.
     - run a daily langchain rag bot api, with ui/educator-client
      > [!NOTE]
      > need process youtube audio save to local file with `pytube`, run `pip install "achatbot[pytube,deep_translator]"` to install dependencies
      > and transcribe/translate to text, then chunks to vector store, and run langchain rag bot api;
      > run data process:
      > ```
      > ACHATBOT_PKG=1 python -m achatbot.cmd.bots.rag.data_process.youtube_audio_transcribe_to_tidb
      > ```
      > or download processed data from hf dataset [weege007/youtube_videos](https://huggingface.co/datasets/weege007/youtube_videos/tree/main/videos), then chunks to vector store .
     ```
     curl -XPOST "http://0.0.0.0:4321/bot_join/chat-bot/DailyLangchainRAGBot" \
      -H "Content-Type: application/json" \
      -d $'{"config":{"llm":{"model":"llama-3.1-70b-versatile","messages":[{"role":"system","content":""}],"language":"zh"},"tts":{"tag":"cartesia_tts_processor","args":{"voice_id":"eda5bbff-1ff1-4886-8ef1-4e69a77640a0","language":"zh"}},"asr":{"tag":"deepgram_asr_processor","args":{"language":"zh","model":"nova-2"}}}}' | jq .
     ```
     - run a simple daily chat bot api, with ui/web-client-ui (default language: zh)
     ```
     curl -XPOST "http://0.0.0.0:4321/bot_join/DailyBot" \
      -H "Content-Type: application/json" \
      -d '{}' | jq .
     ```


  1. run `pip install "achatbot[remote_rpc_chat_bot_be_worker]"` to install dependencies to run rpc chat bot BE worker; e.g. :
     - use dufault env params to run rpc chat bot BE worker
  ```
  ACHATBOT_PKG=1 RUN_OP=be TQDM_DISABLE=True \
      TTS_TAG=tts_edge \
      python -m achatbot.cmd.grpc.terminal-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
  ```
  2. run `pip install "achatbot[remote_rpc_chat_bot_fe]"` to install dependencies to run rpc chat bot FE;
  ```
  ACHATBOT_PKG=1 RUN_OP=fe \
      TTS_TAG=tts_edge \
      python -m achatbot.cmd.grpc.terminal-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
  ```


  1. run `pip install "achatbot[remote_queue_chat_bot_be_worker]"` to install dependencies to run queue chat bot worker; e.g.:
     - use default env params to run
      ```
      ACHATBOT_PKG=1 REDIS_PASSWORD=$redis_pwd RUN_OP=be TQDM_DISABLE=True \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
      ```
     - sense_voice(asr) -> qwen (llm) -> cosy_voice (tts)
     u can login [redislabs](https://app.redislabs.com/#/) create 30M free databases; set `REDIS_HOST`,`REDIS_PORT` and `REDIS_PASSWORD` to run, e.g.:
     ```
      ACHATBOT_PKG=1 RUN_OP=be \
        TQDM_DISABLE=True \
        REDIS_PASSWORD=$redis_pwd \
        REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
        REDIS_PORT=14241 \
        ASR_TAG=sense_voice_asr \
        ASR_LANG=zn \
        ASR_MODEL_NAME_OR_PATH=~/.achatbot/models/FunAudioLLM/SenseVoiceSmall \
        N_GPU_LAYERS=33 FLASH_ATTN=1 \
        LLM_MODEL_NAME=qwen \
        LLM_MODEL_PATH=~/.achatbot/models/qwen1_5-7b-chat-q8_0.gguf \
        TTS_TAG=tts_cosy_voice \
        python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
     ```
  2. run `pip install "achatbot[remote_queue_chat_bot_fe]"` to install the required packages to run quueue chat bot frontend; e.g.:
     - use default env params to run (default vad_recorder)
      ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
      ```
     - with wake word
      ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          RECORDER_TAG=wakeword_rms_recorder \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
      ```
     - default pyaudio player stream with tts tag out sample info(rate,channels..), e.g.: (be use tts_cosy_voice out stream info)
     ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          RUN_OP=fe \
          TTS_TAG=tts_cosy_voice \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
     ```
     remote_queue_chat_bot_be_worker in colab examples :
     <a href="https://colab.research.google.com/github/weedge/doraemon-nb/blob/main/chat_bot_gpu_worker.ipynb" target="_parent">
     <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

     - sense_voice(asr) -> qwen (llm) -> cosy_voice (tts):


  1. run `pip install "achatbot[remote_grpc_tts_server]"` to install dependencies to run grpc tts speaker bot server;
  ```
  ACHATBOT_PKG=1 python -m achatbot.cmd.grpc.speaker.server.serve
  ```
  2. run `pip install "achatbot[remote_grpc_tts_client]"` to install dependencies to run grpc tts speaker bot client;
  ```
  ACHATBOT_PKG=1 TTS_TAG=tts_edge IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_g IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_coqui IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_chat IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_cosy_voice IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ```




  - stream-stt (realtime-recorder)
  ![audio-text](https://github.com/user-attachments/assets/44bcec7d-f0a1-47db-bd95-21feee43a361)

  - audio-llm (multimode-chat)
  ![pipe](https://github.com/user-attachments/assets/9970cf18-9bbc-4109-a3c5-e3e3c88086af)
  ![queue](https://github.com/user-attachments/assets/30f2e880-f16d-4b62-8668-61bb97c57b2b)


  - stream-tts (realtime-(clone)-speaker)
  ![text-audio](https://github.com/user-attachments/assets/676230a0-0a99-475b-9ef5-6afc95f044d8)
  ![audio-text text-audio](https://github.com/user-attachments/assets/cbcabf98-731e-4887-9f37-649ec81e37a0)



  - stream-ocr (realtime-object-detection)


  - Embodied Intelligence: Robots that touch the world, perceive and move



  torchchat is released under the [BSD 3 license](LICENSE). (Additional code in this distribution is covered by the MIT and Apache Open Source
  licenses.) However you may have other legal obligations that govern your use of content, such as the terms of service for third-party models.

rpm_license:
  BSD 3-Clause License  Copyright (c) 2024, weedge  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: e7b3a32ed1d05e6f9f8aeaf4749ea378a5bbf84434eb0df551f564afd231d87a
name: python-achatbot
arch: src
version: 0.0.7.2
epoch: 0
release: 1
summary: An open source chat bot for voice (and multimodal) assistants
url: https://github.com/ai-bot-pro/chat-bot
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-achatbot-0.0.7.2-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/achatbot)](https://pypi.org/project/achatbot/)
  <a href="https://app.commanddash.io/agent/github_ai-bot-pro_achatbot"><img src="https://img.shields.io/badge/AI-Code%20Agent-EB9FDA"></a>

  achatbot factory, create chat bots with llm, asr, tts, vad, ocr, detect object etc..


  ![project-structure](https://github.com/user-attachments/assets/5bf7cebb-e590-4718-a78a-6b0c0b36ea28)


  - cmd chat bots:
    - local-terminal-chat(be/fe)
    - remote-queue-chat(be/fe)
    - grpc-terminal-chat(be/fe)
    - grpc-speaker
    - http fastapi_daily_bot_serve (with chat bots pipeline)
  - support transport connector:
    - [x] pipe(UNIX socket),
    - [x] grpc,
    - [x] queue (redis),
    - [ ] websocket
    - [ ] TCP/IP socket
  - chat bot processors:
    - aggreators(llm use, assistant message),
    - ai_frameworks
      - [x] langchain rag
      - [ ] llamaindex rag
      - [ ] autoagen multi agent
    - realtime voice inference(RTVI),
    - transport:
      - webRTC/webSocket:
        - [x] **[daily](https://github.com/daily-co/daily-python)**: audio, video(image)
        - [x] **[livekit](https://github.com/livekit/python-sdks/)**: audio, video(image)
        - [ ] **[agora-audio](https://github.com/AgoraIO/agora-realtime-ai-api)**
    - ai processor: llm, tts, asr etc..
  - core module:
    - local llm:
      - [x] llama-cpp (support text,vision with function-call model)
      - [x] transformers(manual, pipeline) (support text,vision:🦙,Qwen2-vl,Molmo with function-call model)
      - [ ] mlx_lm
    - api llm: personal-ai(like openai api, other ai provider)
  - AI modules:
    - functions:
      - [x] search: search,search1,serper
      - [x] weather: openweathermap
    - speech:
      - [x] asr: sense_voice_asr, whisper_asr, whisper_timestamped_asr, whisper_faster_asr, whisper_transformers_asr, whisper_mlx_asr, lightning_whisper_mlx_asr(!TODO), whisper_groq_asr
      - [x] audio_stream: daily_room_audio_stream(in/out), pyaudio_stream(in/out)
      - [x] detector: porcupine_wakeword,pyannote_vad,webrtc_vad,silero_vad,webrtc_silero_vad
      - [x] player: stream_player
      - [x] recorder: rms_recorder, wakeword_rms_recorder, vad_recorder, wakeword_vad_recorder
      - [x] tts: tts_chat,tts_coqui,tts_cosy_voice,tts_edge,tts_g
      - [x] vad_analyzer: daily_webrtc_vad_analyzer,silero_vad_analyzer
    - vision
      - [x] OCR(*Optical Character Recognition*):
        - [ ] [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
        - [x]  [GOT](https://github.com/Ucas-HaoranWei/GOT-OCR2.0)(*the General OCR Theory*)
      - [x] Detector:
        - [x] [YOLO](https://docs.ultralytics.com/) (*You Only Look Once*)
        - [ ] [RT-DETR](https://github.com/lyuwenyu/RT-DETR) (*RealTime End-to-End Object Detection with Transformers*)
  - gen modules config(*.yaml, local/test/prod) from env with file: `.env`
   u also use HfArgumentParser this module's args to local cmd parse args
  - deploy to cloud ☁️ serverless:
    - vercel (frontend ui pages)
    - Cloudflare(frontend ui pages), personal ai workers
    - [fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/cerebrium/fastapi-daily-chat-bot) on cerebrium (provider aws)
    - [fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/leptonai/fastapi-daily-chat-bot) on leptonai
    - aws lambda + api Gateway
    - docker -> k8s/k3s
    - etc...




  - [vite-react-rtvi-web-voice](https://github.com/ai-bot-pro/vite-react-rtvi-web-voice) rtvi web voice chat bots, diff cctv roles etc, u can diy your own role by change the system prompt with [DailyRTVIGeneralBot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/rtvi/daily_rtvi_general_bot.py)
  deploy it to cloudflare pages, access https://role-chat.pages.dev/
  - [chat-bot-rtvi-web-sandbox](https://github.com/ai-bot-pro/chat-bot-rtvi-client/tree/main/chat-bot-rtvi-web-sandbox)
  use this web sandbox to test config, actions with [DailyRTVIGeneralBot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/rtvi/daily_rtvi_general_bot.py)
  - [ui/educator-client](https://github.com/ai-bot-pro/educator-client)
  deploy it to cloudflare pages, access https://educator-client.pages.dev/
  - [ui/web-client-ui](https://github.com/ai-bot-pro/web-client-ui)
  deploy it to cloudflare pages, access https://chat-client-weedge.pages.dev/
  - [vite-react-web-vision](https://github.com/ai-bot-pro/vite-react-web-vision)
  deploy it to cloudflare pages, access https://vision-weedge.pages.dev/



  - [x] [deploy/leptonai](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/leptonai) 👍🏻
  - [x] [deploy/cerebrium/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/cerebrium/fastapi-daily-chat-bot) :)
  - [x] [deploy/aws/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/aws/fastapi-daily-chat-bot) :|
  - [x] [deploy/docker/fastapi-daily-chat-bot](https://github.com/ai-bot-pro/achatbot/tree/main/deploy/docker) 🏃



  > [!NOTE]
  > `python --version` >=3.10 with [asyncio-task](https://docs.python.org/3.11/library/asyncio-task.html)

  > [!TIP]
  > use [uv](https://github.com/astral-sh/uv) + pip to run, install the required dependencies fastly, e.g.:
  > `uv pip install achatbot`
  > `uv pip install "achatbot[fastapi_bot_server]"`


  ```bash
  python3 -m venv .venv_achatbot
  source .venv_achatbot/bin/activate
  pip install achatbot

  pip install "achatbot[fastapi_bot_server]"
  ```


  ```bash
  git clone --recursive https://github.com/ai-bot-pro/chat-bot.git
  cd chat-bot
  python3 -m venv .venv_achatbot
  source .venv_achatbot/bin/activate
  bash scripts/pypi_achatbot.sh dev

  pip install "dist/achatbot-{$version}-py3-none-any.whl[fastapi_bot_server]"
  ```




  |                           Chat Bot                           | optional-dependencies                                        | Colab                                                        | Device                                                       | Pipeline Desc                                                |
  | :----------------------------------------------------------: | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
  | [daily_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/daily_bot.py)<br />[livekit_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/livekit_bot.py) | e.g.:<br />daily_room_audio_stream \| livekit_room_audio_stream,<br />sense_voice_asr,<br />groq \| together api llm(text), <br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/webrtc_audio_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | CPU (free, 2 cores)                                          | e.g.:<br />daily \| livekit room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> groq \| together  (llm) <br />-> edge (tts)<br />-> daily \| livekit room out stream |
  | [generate_audio2audio](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/remote-queue-chat/generate_audio2audio.py) | remote_queue_chat_bot_be_worker                              | <a href="https://github.com/weedge/doraemon-nb/blob/main/chat_bot_gpu_worker.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />pyaudio in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> qwen (llm) <br />-> cosy_voice (tts)<br />-> pyaudio out stream |
  | [daily_describe_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_describe_vision_bot.py) | e.g.:<br />daily_room_audio_stream,<br />sense_voice_asr,<br />llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_vision_qwen_vl.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Llama-3.2-11B-Vision-Instruct<br />L4<br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> qwen-vl (llm) <br />-> edge (tts)<br />-> daily room out stream |
  | [daily_chat_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_chat_vision_bot.py) | e.g.:<br />daily_room_audio_stream,<br />sense_voice_asr,<br />llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_chat_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Llama-3.2-11B-Vision-Instruct<br />L4<br />- allenai/Molmo-7B-D-0924<br />A100 | e.g.:<br />daily room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />-> llm answer guide qwen-vl (llm) <br />-> edge (tts)<br />-> daily room out stream |
  | [daily_chat_tools_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_chat_tools_vision_bot.py) | e.g.:<br />daily_room_audio_stream,<br />sense_voice_asr,<br />groq api llm(text), <br />tools:<br />- llm_transformers_manual_vision_qwen,<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/achatbot_daily_chat_tools_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | - Qwen2-VL-2B-Instruct<br /> T4(free)<br />- Qwen2-VL-7B-Instruct<br />L4<br />- Llama-3.2-11B-Vision-Instruct<br />L4 | e.g.:<br />daily room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />->llm with tools qwen-vl  <br />-> edge (tts)<br />-> daily room out stream |
  | [daily_annotate_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_annotate_vision_bot.py) | e.g.:<br />daily_room_audio_stream,<br />vision_yolo_detector<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_annotate_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily room in stream<br />vision_yolo_detector<br />-> edge (tts)<br />-> daily room out stream |
  | [daily_detect_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_detect_vision_bot.py) | e.g.:<br />daily_room_audio_stream,<br />vision_yolo_detector<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_detect_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily room in stream<br />vision_yolo_detector<br />-> edge (tts)<br />-> daily room out stream |
  | [daily_ocr_vision_bot](https://github.com/ai-bot-pro/achatbot/blob/main/src/cmd/bots/vision/daily_ocr_vision_bot.py) | e.g.:<br />daily_room_audio_stream,<br />sense_voice_asr,<br />vision_transformers_got_ocr<br />tts_edge | <a href="https://github.com/weedge/doraemon-nb/blob/main/daily_ocr_vision_bot.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | T4(free)                                                     | e.g.:<br />daily room in stream<br />-> silero (vad)<br />-> sense_voice (asr) <br />vision_transformers_got_ocr<br />-> edge (tts)<br />-> daily room out stream |
  |                                                              |                                                              |                                                              |                                                              |                                                              |
  |                                                              |                                                              |                                                              |                                                              |                                                              |





  > [!NOTE]
  >
  > - run src code, replace achatbot to src, don't need set `ACHATBOT_PKG=1` e.g.:
  >   ```
  >   TQDM_DISABLE=True \
  >        python -m src.cmd.local-terminal-chat.generate_audio2audio > log/std_out.log
  >   ```
  > - PyAudio need install python3-pyaudio
  > e.g. ubuntu `apt-get install python3-pyaudio`, macos `brew install portaudio`
  > see: https://pypi.org/project/PyAudio/
  >
  > - llm llama-cpp-python init use cpu Pre-built Wheel to install,
  > if want to use other lib(cuda), see: https://github.com/abetlen/llama-cpp-python#installation-configuration
  >
  > - install `pydub`  need install `ffmpeg` see: https://www.ffmpeg.org/download.html

  1. run `pip install "achatbot[local_terminal_chat_bot]"` to install dependencies to run local terminal chat bot;
  2. create achatbot data dir in `$HOME` dir `mkdir -p ~/.achatbot/{log,config,models,records,videos}`;
  3. `cp .env.example .env`, and check `.env`, add key/value env params;
  4. select a model ckpt to download:
      - vad model ckpt (default vad ckpt model use [silero vad](https://github.com/snakers4/silero-vad))
      ```
      
      huggingface-cli download pyannote/segmentation-3.0  --local-dir ~/.achatbot/models/pyannote/segmentation-3.0 --local-dir-use-symlinks False
      ```
      - asr model ckpt (default whipser ckpt model use base size)
      ```
      
      wget https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt -O ~/.achatbot/models/base.pt

      
      huggingface-cli download openai/whisper-base  --local-dir ~/.achatbot/models/openai/whisper-base --local-dir-use-symlinks False

      
      huggingface-cli download Systran/faster-whisper-base  --local-dir ~/.achatbot/models/Systran/faster-whisper-base --local-dir-use-symlinks False

      
      huggingface-cli download FunAudioLLM/SenseVoiceSmall  --local-dir ~/.achatbot/models/FunAudioLLM/SenseVoiceSmall --local-dir-use-symlinks False
      ```
      - llm model ckpt (default llamacpp ckpt(ggml) model use qwen-2 instruct 1.5B size)
      ```
      
      huggingface-cli download Qwen/Qwen2-1.5B-Instruct-GGUF qwen2-1_5b-instruct-q8_0.gguf  --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      
      huggingface-cli download Qwen/Qwen1.5-7B-Chat-GGUF qwen1_5-7b-chat-q8_0.gguf  --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      
      huggingface-cli download microsoft/Phi-3-mini-4k-instruct-gguf Phi-3-mini-4k-instruct-q4.gguf --local-dir ~/.achatbot/models --local-dir-use-symlinks False

      ```
      - tts model ckpt (default whipser ckpt model use base size)
      ```
      
      huggingface-cli download 2Noise/ChatTTS  --local-dir ~/.achatbot/models/2Noise/ChatTTS --local-dir-use-symlinks False

      
      huggingface-cli download coqui/XTTS-v2  --local-dir ~/.achatbot/models/coqui/XTTS-v2 --local-dir-use-symlinks False

      
      git lfs install
      git clone https://www.modelscope.cn/iic/CosyVoice-300M.git ~/.achatbot/models/CosyVoice-300M
      git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git ~/.achatbot/models/CosyVoice-300M-SFT
      git clone https://www.modelscope.cn/iic/CosyVoice-300M-Instruct.git ~/.achatbot/models/CosyVoice-300M-Instruct
      

      ```

  5. run local terminal chat bot with env; e.g.
      - use dufault env params to run local chat bot
      ```
      ACHATBOT_PKG=1 TQDM_DISABLE=True \
          python -m achatbot.cmd.local-terminal-chat.generate_audio2audio > ~/.achatbot/log/std_out.log
      ```


  1. run `pip install "achatbot[fastapi_daily_bot_server]"` to install dependencies to run http fastapi daily chat bot;

  2. run below cmd to start http server, see api docs: http://0.0.0.0:4321/docs
      ```
      ACHATBOT_PKG=1 python -m achatbot.cmd.http.server.fastapi_daily_bot_serve
      ```
  3. run chat bot processor, e.g.
     - run a daily langchain rag bot api, with ui/educator-client
      > [!NOTE]
      > need process youtube audio save to local file with `pytube`, run `pip install "achatbot[pytube,deep_translator]"` to install dependencies
      > and transcribe/translate to text, then chunks to vector store, and run langchain rag bot api;
      > run data process:
      > ```
      > ACHATBOT_PKG=1 python -m achatbot.cmd.bots.rag.data_process.youtube_audio_transcribe_to_tidb
      > ```
      > or download processed data from hf dataset [weege007/youtube_videos](https://huggingface.co/datasets/weege007/youtube_videos/tree/main/videos), then chunks to vector store .
     ```
     curl -XPOST "http://0.0.0.0:4321/bot_join/chat-bot/DailyLangchainRAGBot" \
      -H "Content-Type: application/json" \
      -d $'{"config":{"llm":{"model":"llama-3.1-70b-versatile","messages":[{"role":"system","content":""}],"language":"zh"},"tts":{"tag":"cartesia_tts_processor","args":{"voice_id":"eda5bbff-1ff1-4886-8ef1-4e69a77640a0","language":"zh"}},"asr":{"tag":"deepgram_asr_processor","args":{"language":"zh","model":"nova-2"}}}}' | jq .
     ```
     - run a simple daily chat bot api, with ui/web-client-ui (default language: zh)
     ```
     curl -XPOST "http://0.0.0.0:4321/bot_join/DailyBot" \
      -H "Content-Type: application/json" \
      -d '{}' | jq .
     ```


  1. run `pip install "achatbot[remote_rpc_chat_bot_be_worker]"` to install dependencies to run rpc chat bot BE worker; e.g. :
     - use dufault env params to run rpc chat bot BE worker
  ```
  ACHATBOT_PKG=1 RUN_OP=be TQDM_DISABLE=True \
      TTS_TAG=tts_edge \
      python -m achatbot.cmd.grpc.terminal-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
  ```
  2. run `pip install "achatbot[remote_rpc_chat_bot_fe]"` to install dependencies to run rpc chat bot FE;
  ```
  ACHATBOT_PKG=1 RUN_OP=fe \
      TTS_TAG=tts_edge \
      python -m achatbot.cmd.grpc.terminal-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
  ```


  1. run `pip install "achatbot[remote_queue_chat_bot_be_worker]"` to install dependencies to run queue chat bot worker; e.g.:
     - use default env params to run
      ```
      ACHATBOT_PKG=1 REDIS_PASSWORD=$redis_pwd RUN_OP=be TQDM_DISABLE=True \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
      ```
     - sense_voice(asr) -> qwen (llm) -> cosy_voice (tts)
     u can login [redislabs](https://app.redislabs.com/#/) create 30M free databases; set `REDIS_HOST`,`REDIS_PORT` and `REDIS_PASSWORD` to run, e.g.:
     ```
      ACHATBOT_PKG=1 RUN_OP=be \
        TQDM_DISABLE=True \
        REDIS_PASSWORD=$redis_pwd \
        REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
        REDIS_PORT=14241 \
        ASR_TAG=sense_voice_asr \
        ASR_LANG=zn \
        ASR_MODEL_NAME_OR_PATH=~/.achatbot/models/FunAudioLLM/SenseVoiceSmall \
        N_GPU_LAYERS=33 FLASH_ATTN=1 \
        LLM_MODEL_NAME=qwen \
        LLM_MODEL_PATH=~/.achatbot/models/qwen1_5-7b-chat-q8_0.gguf \
        TTS_TAG=tts_cosy_voice \
        python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/be_std_out.log
     ```
  2. run `pip install "achatbot[remote_queue_chat_bot_fe]"` to install the required packages to run quueue chat bot frontend; e.g.:
     - use default env params to run (default vad_recorder)
      ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
      ```
     - with wake word
      ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          RECORDER_TAG=wakeword_rms_recorder \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
      ```
     - default pyaudio player stream with tts tag out sample info(rate,channels..), e.g.: (be use tts_cosy_voice out stream info)
     ```
      ACHATBOT_PKG=1 RUN_OP=fe \
          REDIS_PASSWORD=$redis_pwd \
          REDIS_HOST=redis-14241.c256.us-east-1-2.ec2.redns.redis-cloud.com \
          REDIS_PORT=14241 \
          RUN_OP=fe \
          TTS_TAG=tts_cosy_voice \
          python -m achatbot.cmd.remote-queue-chat.generate_audio2audio > ~/.achatbot/log/fe_std_out.log
     ```
     remote_queue_chat_bot_be_worker in colab examples :
     <a href="https://colab.research.google.com/github/weedge/doraemon-nb/blob/main/chat_bot_gpu_worker.ipynb" target="_parent">
     <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

     - sense_voice(asr) -> qwen (llm) -> cosy_voice (tts):


  1. run `pip install "achatbot[remote_grpc_tts_server]"` to install dependencies to run grpc tts speaker bot server;
  ```
  ACHATBOT_PKG=1 python -m achatbot.cmd.grpc.speaker.server.serve
  ```
  2. run `pip install "achatbot[remote_grpc_tts_client]"` to install dependencies to run grpc tts speaker bot client;
  ```
  ACHATBOT_PKG=1 TTS_TAG=tts_edge IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_g IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_coqui IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_chat IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ACHATBOT_PKG=1 TTS_TAG=tts_cosy_voice IS_RELOAD=1 python -m achatbot.cmd.grpc.speaker.client
  ```




  - stream-stt (realtime-recorder)
  ![audio-text](https://github.com/user-attachments/assets/44bcec7d-f0a1-47db-bd95-21feee43a361)

  - audio-llm (multimode-chat)
  ![pipe](https://github.com/user-attachments/assets/9970cf18-9bbc-4109-a3c5-e3e3c88086af)
  ![queue](https://github.com/user-attachments/assets/30f2e880-f16d-4b62-8668-61bb97c57b2b)


  - stream-tts (realtime-(clone)-speaker)
  ![text-audio](https://github.com/user-attachments/assets/676230a0-0a99-475b-9ef5-6afc95f044d8)
  ![audio-text text-audio](https://github.com/user-attachments/assets/cbcabf98-731e-4887-9f37-649ec81e37a0)



  - stream-ocr (realtime-object-dectection)


  - Embodied Intelligence: Robots that touch the world, perceive and move

rpm_license:
  BSD 3-Clause License  Copyright (c) 2024, weedge  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: 41fd9f183fb92c9e2b98de56c1a8f5ae8b1b112eaa83c47a5b82b2f5164d18ad
name: python-acheron
arch: src
version: 2.4.1
epoch: 0
release: 1
summary: Plotting and recording program for Asphodel devices
url: https://bitbucket.org/suprocktech/acheron
rpm_license: ISC License (ISCL)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acheron-2.4.1-1.src.rpm
checksum_type: sha256
description:
  Acheron is a plotting application and data recorder for USB and TCP devices communicating via the Asphodel protocol.

  The Asphodel communication protocol was developed by Suprock Technologies (http://www.suprocktech.com)


  Acheron is licensed under the ISC license.

  The ISC license is a streamlined version of the BSD license, and permits usage in both open source and propretary projects.


pkgId: 8e2dba8e2c9c03295e18143c85ac274fdeda725155a58001836ba521730f9ccf
name: python-achilles
arch: src
version: 0.0.196
epoch: 0
release: 1
url: https://github.com/adpena/achilles
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-achilles-0.0.196-1.src.rpm
checksum_type: sha256
summary:
  Distributed/parallel computing in modern Python based on the multiprocessing.Pool API (map, imap, imap_unordered).

description:
  Distributed/parallel computing in modern Python based on the `multiprocessing.Pool` API (`map`, `imap`, `imap_unordered`).


  The purpose of `achilles` is to make distributed/parallel computing as easy as possible by limiting the required configuration, hiding the details (server/node/controller architecture) and exposing a simple interface based on the popular `multiprocessing.Pool` API.

  > `achilles` provides developers with entry-level capabilities for concurrency across a network of machines (see PEP 372 on the intent behind adding `multiprocessing` to the standard library -> https://www.python.org/dev/peps/pep-0371/) using a server/node/controller architecture.

  The `achilles_server`, `achilles_node` and `achilles_controller` are designed to run cross-platform/cross-architecture. The server/node/controller may be hosted on a single machine (for development) or deployed across heterogeneous resources.

  `achilles` is comparable to excellent Python packages like `pathos/pyina`, `Parallel Python` and `SCOOP`, but different in certain ways:
  - Designed for developers familiar with the `multiprocessing` module in the standard library with simplicity and ease of use in mind.
  - In addition to the blocking `map` API which requires that developers wait for all computation to be finished before accessing results (common in such packages), `imap`/`imap_unordered` allow developers to process results as they are returned to the `achilles_controller` by the `achilles_server`.
  - `achilles` allows for composable scalability and novel design patterns as:
      - Iterables including lists, lists of lists and generator functions (as first-class object - generator expressions will not work as generators cannot be serialized by `pickle`/`dill`) are accepted as arguments.
          - TIP: Use generator functions together with `imap` or `imap_unordered` to perform distributed computation on arbitrarily large data.
      - The `dill` serializer is used to transfer data between the server/node/controller and `multiprocess` (fork of `multiprocessing` that uses the `dill` serializer instead of `pickle`) is used to perform `Pool.map` on the `achilles_nodes`, so developers are freed from some of the constraints of the `pickle` serializer.
      <br/>


  `pip install achilles`


  Start an `achilles_server` listening for connections from `achilles_nodes` at a certain endpoint specified as arguments or in an `.env` file in the `achilles` package's directory.

  Then simply import `map`, `imap`, and/or `imap_unordered` from `achilles_main` and use them dynamically in your own code (under the hood they create and close `achilles_controller`s).

  `map`, `imap` and `imap_unordered` will distribute your function to each `achilles_node` connected to the `achilles_server`. Then, the `achilles_server` will distribute arguments to each `achilles_node` (load balanced and made into a list of arguments if the arguments' type is not already a list) which will then perform your function on the arguments using `multiprocess.Pool.map`.

  Each `achilles_node` finishes its work, returns the results to the `achilles_server` and waits to receive another argument. This process is repeated until all of the arguments have been exhausted.

  1) `runAchillesServer(host=None, port=None, username=None, secret_key=None)` -> run on your local machine or on another machine connected to your network

      `in:`
      ```python
      from achilles.lineReceiver.achilles_server import runAchillesServer

     
     
     

     runAchillesServer(host='127.0.0.1', port=9999, username='foo', secret_key='bar')
     ```

     ```python

     
     

     

     from achilles.lineReceiver.achilles_server import runAchillesServer, genConfig

     genConfig(host='127.0.0.1', port=9999, username='foo', secret_key='bar')
     runAchillesServer()
      ```
      <br/>

      `out:`
      ```
      ALERT: achilles_server initiated at 127.0.0.1:9999
      Listening for connections...
      ```

  2) `runAchillesNode(host=None, port=None)` -> run on your local machine or on another machine connected to your network

      `in:`
      ```python
      from achilles.lineReceiver.achilles_node import runAchillesNode

     

      runAchillesNode(host='127.0.0.1', port=9999)
      ```
      <br/>

      `out:`
      ```
      GREETING: Welcome! There are currently 1 open connections.

      Connected to achilles_server running at 127.0.0.1:9999
      CLIENT_ID: 0
      ```

  3) Examples of how to use the 3 most commonly used `multiprocessing.Pool` methods in `achilles`:
      <br/>
      >> Note: `map`, `imap` and `imap_unordered` currently accept iterables including - but not limited - to lists, lists of lists, and generator functions as `achilles_args`.

      >> Also note:  if there isn't already a `.env` configuration file in the `achilles` package directory, must use `genConfig(host, port, username, secret_key)` before using or include `host`, `port`, `username` and `secret_key` as arguments when using `map`, `imap`, `imap_unordered`.

      1) `map(func, args, callback=None, chunksize=1, host=None, port=None, username=None, secret_key=None)`<br/><br/>
          `in:`
          ```python
         from achilles.lineReceiver.achilles_main import map

         def achilles_function(arg):
             return arg ** 2

         def achilles_callback(result):
             return result ** 2

         if __name__ == "__main__":
             results = map(achilles_function, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], achilles_callback, chunksize=1)
             print(results)
         ```
         <br/>

         `out:`
         ```
         ALERT: Connection to achilles_server at 127.0.0.1:9999 and authentication successful.

         [[1, 16, 81, 256, 625, 1296, 2401, 4096], [6561, 10000]]
         ```

     2) `imap(func, args, callback=None, chunksize=1, host=None, port=None, username=None, secret_key=None)`<br/><br/>
          `in:`
          ```python
          from achilles.lineReceiver.achilles_main import imap

        def achilles_function(arg):
            return arg ** 2

        def achilles_callback(result):
            return result ** 2

        if __name__ == "__main__":
            for result in imap(achilles_function, [1,2,3,4,5,6,7,8,9,10], achilles_callback, chunksize=1):
                print(result)
          ```
        <br/>

        `out:`
        ```
        ALERT: Connection to achilles_server at 127.0.0.1:9999 and authentication successful.

        {'ARGS_COUNTER': 0, 'RESULT': [1, 16, 81, 256, 625, 1296, 2401, 4096]}
        {'ARGS_COUNTER': 8, 'RESULT': [6561, 10000]}
        ```

       3) `imap_unordered(func, args, callback=None, chunksize=1, host=None, port=None, username=None, secret_key=None)`<br/><br/>
       `in:`
          ```python
          from achilles.lineReceiver.achilles_main import imap_unordered

          def achilles_function(arg):
              return arg ** 2

          def achilles_callback(result):
              return result ** 2

          if __name__ == "__main__":
              for result in imap_unordered(achilles_function, [1,2,3,4,5,6,7,8,9,10], achilles_callback, chunksize=1):
                  print(result)
          ```
          <br/>

          `out:`
          ```
          ALERT: Connection to achilles_server at 127.0.0.1:9999 and authentication successful.

          {'ARGS_COUNTER': 8, 'RESULT': [6561, 10000]}
          {'ARGS_COUNTER': 0, 'RESULT': [1, 16, 81, 256, 625, 1296, 2401, 4096]}
          ```




  - `Twisted`
      - An event-driven networking engine written in Python and MIT licensed.
  - `dill`
      - `dill` extends Pythonâ€™s `pickle` module for serializing and de-serializing Python objects to the majority of the built-in Python types.
  - `multiprocess`
      - multiprocess is a fork of multiprocessing that uses `dill` instead of `pickle` for serialization. `multiprocessing` is a package for the Python language which supports the spawning of processes using the API of the standard libraryâ€™s threading module.


  See the `examples` directory for tutorials on various use cases, including:
  - Square numbers/run multiple jobs sequentially
  - Word count (TO DO)


  ```python
  from achilles.lineReceiver.achilles_main import killCluster









  killCluster(command_verified=True)
  ```


  - `achilles_node`s use all of the CPU cores available on the host machine to perform `multiprocess.Pool.map` (`pool = multiprocess.Pool(multiprocess.cpu_count())`).
  - `achilles` leaves it up to the developer to ensure that the correct packages are installed on `achilles_node`s to perform the function distributed by the `achilles_server` on behalf of the `achilles_controller`. Current recommended solution is to SSH into each machine and `pip install` a `requirements.txt` file.
  - All import statements required by the developer's function, arguments and callback must be included in the definition of the function.
  - The `achilles_server` is currently designed to handle one job at a time. For more complicated projects, I highly recommend checking out `Dask` (especially `dask.distributed`) and learning more about directed acyclic graphs (DAGs).
  - Fault tolerance: if some `achilles_node` disconnects before returning expected results, the argument will be distributed to another `achilles_node` for computation instead of being lost.
  - `callback_error` argument has yet to be implemented, so detailed information regarding errors can only be gleaned from the interpreter used to launch the `achilles_server`, `achilles_node` or `achilles_controller`. Deploying the server/node/controller on a single machine is recommended for development.
  - `achilles` performs load balancing at runtime and assigns `achilles_node`s arguments by `cpu_count` * `chunksize`.
      - Default `chunksize` is 1.
      - Increasing the `chunksize` is an easy way to speed up computation and reduce the amount of time spent transferring data between the server/node/controller.
  - If your arguments are already lists, the `chunksize` argument is not used.
      - Instead, one argument/list will be distributed to the connected `achilles_node`s at a time.
  - If your arguments are load balanced, the results returned are contained in lists of length `achilles_node's cpu_count` *  `chunksize`.
      - `map`:
          - Final result of `map` is an ordered list of load balanced lists (the final result is not flattened).
      - `imap`:
          - Results are returned as computation is finished in dictionaries that include the following keys:
              - `RESULT`: load balanced list of results.
              - `ARGS_COUNTER`: index of first argument (0-indexed).
           - Results are ordered.
               - The first result will correspond to the next result after the last result in the preceding results packet's list of results.
               - Likely to be slower than `immap_unordered` due to `achilles_controller` yielding ordered results. `imap_unordered` (see below) yields results as they are received, while `imap` yields results as they are received only if the argument's `ARGS_COUNTER` is expected based on the length of the `RESULT` list in the preceding results packet. Otherwise, a `result_buffer` is checked for the results packet with the expected `ARGS_COUNTER` and the current results packet is added to the `result_buffer`. If it is not found, `achilles_controller` will not yield results until a results packet with the expected `ARGS_COUNTER` is received.
      - `imap_unordered`:
          - Results are returned as computation is finished in dictionaries that include the following keys:
              - `RESULT`: load balanced list of results.
              - `ARGS_COUNTER`: index of first argument (0-indexed).
           - Results are not ordered.
               - Results packets are yielded as they are received (after any `achilles_callback` has been performed on it).
               - Fastest way of consuming results received from the `achilles_server`.


  <hr/>

  `achilles` is in the early stages of active development and your suggestions/contributions are kindly welcomed.

  `achilles` is written and maintained by Alejandro PeÃ±a. Email me at adpena at gmail dot com.


pkgId: 536faec5559255408b6e35a6ef8d8f6689edafcfd6ad68591d4e015101d51f46
name: python-acid-vault
arch: src
version: 2.1.0
epoch: 0
release: 1
summary: Python Password Vault
url: https://github.com/svavelsyra/PyVault
rpm_license: GNU Affero General Public License v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acid-vault-2.1.0-1.src.rpm
checksum_type: sha256
description:
  Python password vault to keep track of password either locally or centralized in your own cloud.
  As this is a hobby project I cannot guarantee any functionality or that no data loss will occur, but as I use it personally I will do my best to avoid it.
  Currently development is done on Python 3.9 and the client runs on Win10 while the cloud is run on Raspbian on a Raspberry Pi 2.

  **Prerequisites**
  - cryptography
  - paramiko
  - pillow

  **Setup**
  - Install prerequisites
  - Clone repo or pip install acid_vault
  - Run VaultGui.pyw (For GUI)
  - Setup your vault in file menu (Only necessary for Cloud and/or Steganography)
    - Setup SSH for cloud (For remote storage of vault)
      - Host - URL to host
      - Port - Port to use on host
      - Username - Username to login with at host
      - Password - Password to login with at host, will not be saved and has to be entered each time program is started. Recomended usage is through key exchange, see below
    - Setup Steganography (For hiding the vault in an image)
      - File location - path to vault storage E.g. images/picture.png
      - Original file - path to local file with the original png picture to compare against (Important that its a png and not jpeg as jpeg compression is not stable)
  - Check [Steganography](https://en.wikipedia.org/wiki/Steganography) (If Steganography is to be used)
  - Chose Local/Remote (Where to store vault)

  **Basic usage**
  - Add passwords by pressing "Add Password" button.
  - Chose a password in password box.
  - Press Save passwords to save passwords in vault.
  - Press Load passwords to load passwords into vault (Will clear any unsaved data).
  - Lock/Unlock - Will lock/unlock the data kept by program while its running to avoid overhead of getting data from the cloud.

  If vault detect that the user has not used the UI for 5 minutes it will lock itself.

  The file menu has options to save/load backups both as encrypted and unencrypted locally where the user chose.


pkgId: 36d7f929038ccb43fe857cb961746a58e11930db741f22bcf49b1975e66b84e5
name: python-acid.senza.templates
arch: src
version: 1.103
epoch: 0
release: 1
summary: Senza template for the automatic PosgreSQL DB deployments
url: https://github.com/zalando-incubator/senza-base-template
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acid.senza.templates-1.103-1.src.rpm
checksum_type: sha256
description:
  This package provides an external template for the stups-senza tool (https://github.com/zalando-stups/senza), allowing rapid deployment of PostgreSQL nodes on AWS. It's designed to work together with an external tool that runs
  senza with all necessary parameters and deploy DB instances automatically, therefore, the template is a non-interactive one. Compared to the PostgresApp template (included with senza) it adds the following actions:
  - NAT gateways are detected based on the customer DNS zone.
  - Correct Etcd endpoints in the current account are detected for a specific region.
  - Non-interactive mode is the default one, all parameters can be supplied with environment variables (`-v` option during senza init).
  - pg_hba.conf is configured by default to reject non-SSL connections.
  - Standby and superuser passwords are automatically generated.
  - All passwords and scalyr keys are encrypted.
  - zmon2 group is automatically picked from the current account.
  - EBS is always used.


pkgId: 131671d363749fa5b6d3e7c50f304ad981fd0525fb8572379b398db12e5a9ca8
name: python-acids-rave
arch: src
version: 2.3.1
epoch: 0
release: 1
summary: RAVE: a Realtime Audio Variatione autoEncoder
url: https://pypi.org/project/acids-rave/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acids-rave-2.3.1-1.src.rpm
checksum_type: sha256
description:
  ![rave_logo](docs/rave.png)



  Official implementation of _RAVE: A variational autoencoder for fast and high-quality neural audio synthesis_ ([article link](https://arxiv.org/abs/2111.05011)) by Antoine Caillon and Philippe Esling.

  If you use RAVE as a part of a music performance or installation, be sure to cite either this repository or the article !

  If you want to share / discuss / ask things about RAVE you can do so in our [discord server](https://discord.gg/dhX73sPTBb) !



  The original implementation of the RAVE model can be restored using

  ```bash
  git checkout v1
  ```



  Install RAVE using

  ```bash
  pip install acids-rave
  ```

  You will need **ffmpeg** on your computer. You can install it locally inside your virtual environment using

  ```bash
  conda install ffmpeg
  ```

  <!-- Detailed instructions to setup a training station for this project are available [here](docs/training_setup.md). -->



  A colab to train RAVEv2 is now available thanks to [hexorcismos](https://github.com/moiseshorta) !
  [![colab_badge](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ih-gv1iHEZNuGhHPvCHrleLNXvooQMvI?usp=sharing)



  Training a RAVE model usually involves 3 separate steps, namely _dataset preparation_, _training_ and _export_.



  You can know prepare a dataset using two methods: regular and lazy. Lazy preprocessing allows RAVE to be trained directly on the raw files (i.e. mp3, ogg), without converting them first. **Warning**: lazy dataset loading will increase your CPU load by a large margin during training, especially on Windows. This can however be useful when training on large audio corpus which would not fit on a hard drive when uncompressed. In any case, prepare your dataset using

  ```bash
  rave preprocess --input_path /audio/folder --output_path /dataset/path (--lazy)
  ```



  RAVEv2 has many different configurations. The improved version of the v1 is called `v2`, and can therefore be trained with

  ```bash
  rave train --config v2 --db_path /dataset/path --out_path /model/out --name give_a_name
  ```

  We also provide a discrete configuration, similar to SoundStream or EnCodec

  ```bash
  rave train --config discrete ...
  ```

  By default, RAVE is built with non-causal convolutions. If you want to make the model causal (hence lowering the overall latency of the model), you can use the causal mode

  ```bash
  rave train --config discrete --config causal ...
  ```

  New in 2.3, data augmentations are also available to improve the model's generalization in low data regimes. You can add data augmentation by adding augmentation configuration files with the `--augment` keyword

  ```bash
  rave train --config v2 --augment mute --augment compress
  ```

  Many other configuration files are available in `rave/configs` and can be combined. Here is a list of all the available configurations & augmentations :

  <table>
  <thead>
  <tr>
  <th>Type</th>
  <th>Name</th>
  <th>Description</th>
  </tr>
  </thead>
  <tbody>

  <tr>
  <td rowspan=8>Architecture</td>
  <td>v1</td>
  <td>Original continuous model</td>
  </tr>

  <tr>
  <td>v2</td>
  <td>Improved continuous model (faster, higher quality)</td>
  </tr>

  <tr>
  <td>v2_small</td>
  <td>v2 with a smaller receptive field, adpated adversarial training, and noise generator, adapted for timbre transfer for stationary signals</td>
  </tr>

  <tr>
  <td>v2_nopqmf</td>
  <td>(experimental) v2 without pqmf in generator (more efficient for bending purposes)</td>
  </tr>

  <tr>
  <td>v3</td>
  <td>v2 with Snake activation, descript discriminator and Adaptive Instance Normalization for real style transfer</td>
  </tr>

  <tr>
  <td>discrete</td>
  <td>Discrete model (similar to SoundStream or EnCodec)</td>
  </tr>

  <tr>
  <td>onnx</td>
  <td>Noiseless v1 configuration for onnx usage</td>
  </tr>

  <tr>
  <td>raspberry</td>
  <td>Lightweight configuration compatible with realtime RaspberryPi 4 inference</td>
  </tr>

  <tr>
  <td rowspan=3>Regularization (v2 only)</td>
  <td>default</td>
  <td>Variational Auto Encoder objective (ELBO)</td>
  </tr>

  <tr>
  <td>wasserstein</td>
  <td>Wasserstein Auto Encoder objective (MMD)</td>
  </tr>

  <tr>
  <td>spherical</td>
  <td>Spherical Auto Encoder objective</td>
  </tr>

  <tr>
  <td rowspan=1>Discriminator</td>
  <td>spectral_discriminator</td>
  <td>Use the MultiScale discriminator from EnCodec.</td>
  </tr>

  <tr>
  <td rowspan=3>Others</td>
  <td>causal</td>
  <td>Use causal convolutions</td>
  </tr>

  <tr>
  <td>noise</td>
  <td>Enables noise synthesizer V2</td>
  </tr>

  <tr>
  <td>hybrid</td>
  <td>Enable mel-spectrogram input</td>
  </tr>

  <tr>
  <td rowspan=3>Augmentations</td>
  <td>mute</td>
  <td>Randomly mutes data batches (default prob : 0.1). Enforces the model to learn silence</td>
  </tr>

  <tr>
  <td>compress</td>
  <td>Randomly compresses the waveform (equivalent to light non-linear amplification of batches)</td>
  </tr>

  <tr>
  <td>gain</td>
  <td>Applies a random gain to waveform (default range : [-6, 3]) </td>
  </tr>

  </tbody>
  </table>



  Once trained, export your model to a torchscript file using

  ```bash
  rave export --run /path/to/your/run (--streaming)
  ```

  Setting the `--streaming` flag will enable cached convolutions, making the model compatible with realtime processing. **If you forget to use the streaming mode and try to load the model in Max, you will hear clicking artifacts.**



  For discrete models, we redirect the user to the `msprior` library [here](https://github.com/caillonantoine/msprior). However, as this library is still experimental, the prior from version 1.x has been re-integrated in v2.3.



  To train a prior for a pretrained RAVE model :

  ```bash
  rave train_prior --model /path/to/your/run --db_path /path/to/your_preprocessed_data --out_path /path/to/output
  ```

  this will train a prior over the latent of the pretrained model `path/to/your/run`, and save the model and tensorboard logs to folder `/path/to/output`.



  To script a prior along with a RAVE model, export your model by providing the `--prior` keyword to your pretrained prior :

  ```bash
  rave export --run /path/to/your/run --prior /path/to/your/prior (--streaming)
  ```



  Several pretrained streaming models [are available here](https://acids-ircam.github.io/rave_models_download). We'll keep the list updated with new models.



  This section presents how RAVE can be loaded inside [`nn~`](https://acids-ircam.github.io/nn_tilde/) in order to be used live with Max/MSP or PureData.



  A pretrained RAVE model named `darbouka.gin` available on your computer can be loaded inside `nn~` using the following syntax, where the default method is set to forward (i.e. encode then decode)

  <img src="docs/rave_method_forward.png" width=400px/>

  This does the same thing as the following patch, but slightly faster.

  <img src="docs/rave_encode_decode.png" width=210px />



  Having an explicit access to the latent representation yielded by RAVE allows us to interact with the representation using Max/MSP or PureData signal processing tools:

  <img src="docs/rave_high_level.png" width=310px />



  By default, RAVE can be used as a style transfer tool, based on the large compression ratio of the model. We recently added a technique inspired from StyleGAN to include Adaptive Instance Normalization to the reconstruction process, effectively allowing to define _source_ and _target_ styles directly inside Max/MSP or PureData, using the attribute system of `nn~`.

  <img src="docs/rave_attribute.png" width=550px>

  Other attributes, such as `enable` or `gpu` can enable/disable computation, or use the gpu to speed up things (still experimental).



  A batch generation script has been released in v2.3 to allow transformation of large amount of files

  ```bash
  rave generate model_path path_1 path_2 --out out_path
  ```

  where `model_path` is the path to your trained model (original or scripted), `path_X` a list of audio files or directories, and `out_path` the out directory of the generations.



  If you have questions, want to share your experience with RAVE or share musical pieces done with the model, you can use the [Discussion tab](https://github.com/acids-ircam/RAVE/discussions) !





  Demonstration of what you can do with RAVE and the nn~ external for maxmsp !

  [![RAVE x nn~](http://img.youtube.com/vi/dMZs04TzxUI/mqdefault.jpg)](https://www.youtube.com/watch?v=dMZs04TzxUI)



  Using nn~ for puredata, RAVE can be used in realtime on embedded platforms !

  [![RAVE x nn~](http://img.youtube.com/vi/jAIRf4nGgYI/mqdefault.jpg)](https://www.youtube.com/watch?v=jAIRf4nGgYI)



  This work is led at IRCAM, and has been funded by the following projects

  - [ANR MakiMono](https://acids.ircam.fr/course/makimono/)
  - [ACTOR](https://www.actorproject.org/)
  - [DAFNE+](https://dafneplus.eu/) N° 101061548

  <img src="https://ec.europa.eu/regional_policy/images/information-sources/logo-download-center/eu_co_funded_en.jpg" width=200px/>


pkgId: 9e917261d1c7c58c77ca8673d20dd2445a0a568133113009b2febfbe37bbd75c
name: python-ackl
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: A Python library for kernels used in analytical chemistry
url: https://github.com/zhangys11/ack
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ackl-2.2.0-1.src.rpm
checksum_type: sha256
description:
      Analytical chemistry kernel library for spectroscopic profiling data, Food Chemistry Advances, Volume 3, 2023, 100342, ISSN 2772-753X, https://doi.org/10.1016/j.focha.2023.100342.



  https://pypi.org/project/ackl/



  https://doi.org/10.24433/CO.4614220.v2




  ```
  !apt-get install r-base r-base-dev ffmpeg libsm6 libxext6

  !pip install rpy2
  !pip install qsi==0.3.9
  !pip install ackl==1.0.2
  !pip install cla==1.1.4
  !pip install opencv-python




  set -e

  Rscript -e 'install.packages("ECoL")'
  ```



  ```
  python -m build --wheel
  python -m pyc_wheel x.whl  [optional]
  ```





  ```
  import ackl.metrics
  ackl.metrics.linear_response_pattern(20)
  ```



  ```
  _, dics, _ = ackl.metrics.classify_with_kernels(X, y,embed_title = False)
  ```

  Show the result as HTML table and bar charts:

  ```
  html_str = ackl.metrics.visualize_metric_dicts(dics, plot = True)
  display(HTML( html_str ))
  ```


pkgId: b0796f8e3f8bcd17f654694ef95ec79bf8c1c36c4200e12398f7aa802a3ddd3b
name: python-ackley
arch: src
version: 1.0.9.9
epoch: 0
release: 1
summary: A Python package to generate Ackley Function values.
url: https://github.com/adhishagc/Ackley-Function
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ackley-1.0.9.9-1.src.rpm
checksum_type: sha256
description:
  In mathematical optimization, the Ackley function is a non-convex function used as a performance test problem for optimization algorithms. It was proposed by David Ackley in his 1987 PhD Dissertation.
  <img src="https://latex.codecogs.com/svg.latex?f(x_1,x_2)&space;=&space;-20exp{([0.2\sqrt{0.5(x_1^2&space;&plus;&space;x_2^2)}])}&space;-&space;exp{([0.5(\cos{2\pi&space;x_1}&space;&plus;&space;\cos{2\pi&space;x_2})])}&space;&plus;&space;e&space;&plus;20">
  <img src ="https://upload.wikimedia.org/wikipedia/commons/e/e0/Ackley.gif">
  Credits :
  1.   [Wiki](https://https://en.wikipedia.org/wiki/Ackley_function)
  2.   <a href="https://https://books.google.lk/books?id=sx_VBwAAQBAJ&printsec=frontcover&redir_esc=y#v=snippet&q=%22Ackley%20function%22&f=false">Ackley, D. H. (1987) "A connectionist machine for genetic hillclimbing"</a>
  3. camo.githubusercontent.com


pkgId: d79e855122e23a448af48531fc02ff18e34899afca06dfd6a35eb939d6c0f6f8
name: python-acky
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: A consistent API to AWS
url: http://github.com/RetailMeNot/acky
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acky-0.2.3-1.src.rpm
checksum_type: sha256
description:
  %%%%%%
  Acky Library
  %%%%%%

  .. image:: https://travis-ci.org/RetailMeNot/acky.svg?branch=master
     :target: https://travis-ci.org/RetailMeNot/acky
     :alt: Build Status

  The Acky library provides a consistent interface to AWS. Based on botocore, it
  abstracts some of the API work involved and allows the user to interact with AWS
  APIs in a consistent way with minimal overhead.

  Acky takes a different approach to the API from libraries like the venerable
  `Boto <https://github.com/boto/boto>`. Rather than model AWS objects as Python
  objects, Acky simply wraps the API to provide a more consistent interface. Most
  objects in AWS are represented as collections in Acky, with get(), create(),
  and destroy() methods. The get() method always accepts a filter map, no matter
  if the underlying API method does.

  In cases where the API's multitude of parameters would make for awkward method
  calls (as is the case with EC2's RunInstances), Acky provides a utility class
  whose attributes can be set before executing the API call.


  %%%%%
  Using Acky
  %%%%%

  Acky uses a botocore-style AWS credential configuration, the same as the
  official AWS CLI. Before you use Acky, you'll need to `set up your config
  <http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html>`.

  Once your credentials are set up, using acky is as simple as creating an
  instance of the AWS object::

      from acky.aws import AWS
      aws = AWS(region, profile)
      instances = aws.ec2.Instances.get(filters={'tag:Name': 'web-*'})
      print('Found {} web servers'.format(len(instances)))
      for instance in instances:
          print('  {}'.format(instance['PublicDnsName'])


  %%%%%%%%
  Module Structure
  %%%%%%%%

  The expected module structure for Acky follows. Many APIs are not yet
  implemented, but those that are can be considered stable.

  * AWS

    * username (property)
    * userinfo (property)
    * account_id (property)
    * environment (property)
    * ec2

      * regions
      * zones
      * ACEs
      * ACLs
      * ElasticIPs
      * Instances
      * IpPermissions
      * KeyPairs
      * PlacementGroups
      * SecurityGroups
      * Snapshots
      * Subnets
      * VPCs
      * Volumes

    * iam

      * Users
      * Groups
      * Keys

    * rds

      * engine_versions
      * Instances
      * Snapshots
      * EventSubscriptions
      * SecurityGroups
      * SecurityGroupRules

    * sqs

      * Queues
      * Messages

    * sts

      * GetFederationToken
      * GetSessionToken

  Other services will be added in future versions.

  %%%%%%%%%
  Installing acky
  %%%%%%%%%

  acky is available in PyPI and is installable via pip::

      pip install acky

  You may also install acky from source, perhaps from the GitHub repo::

      git clone https://github.com/RetailMeNot/acky.git
      cd acky
      python setup.py install


pkgId: a9047a0abbf24365eceea51e9dccdc8f9ac17604b80ee3cbacef6f600bfcaa10
name: python-acl-anthology-py
arch: src
version: 0.4.3
epoch: 0
release: 1
summary: A library for accessing the ACL Anthology
url: https://github.com/mbollmann/acl-anthology-py
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acl-anthology-py-0.4.3-1.src.rpm
checksum_type: sha256
description:
  [![License](https://img.shields.io/github/license/mbollmann/acl-anthology-py)](LICENSE)
  [![Build Status](https://img.shields.io/github/actions/workflow/status/mbollmann/acl-anthology-py/code-quality.yml)](https://github.com/mbollmann/acl-anthology-py/actions/workflows/code-quality.yml)
  [![Documentation](https://img.shields.io/readthedocs/acl-anthology-py)](https://acl-anthology-py.readthedocs.io/en/latest/)
  [![Code Coverage](https://img.shields.io/codecov/c/gh/mbollmann/acl-anthology-py)](https://codecov.io/gh/mbollmann/acl-anthology-py)
  ![Supported Python Versions](https://img.shields.io/pypi/pyversions/acl-anthology-py)
  ![Development Status](https://img.shields.io/pypi/status/acl-anthology-py)
  [![Package on PyPI](https://img.shields.io/pypi/v/acl-anthology-py)](https://pypi.org/project/acl-anthology-py/)

  This package accesses data from the [ACL
  Anthology](https://github.com/acl-org/acl-anthology).

  - [**Documentation**](https://acl-anthology-py.readthedocs.io/en/latest/)
  - [**Package on PyPI**](https://pypi.org/project/acl-anthology-py/)



  Install via `pip`:

  ```bash
  $ pip install acl-anthology-py
  ```

  Instantiate the library, automatically fetching data files from the [ACL
  Anthology repo](https://github.com/acl-org/acl-anthology) (requires `git` to be
  installed on your system):

  ```python
  from acl_anthology import Anthology
  anthology = Anthology.from_repo()
  ```

  Some brief usage examples:

  ```pycon
  >>> paper = anthology.get("C92-1025")
  >>> str(paper.title)
  Two-Level Morphology with Composition
  >>> [author.name for author in paper.authors]
  [
      Name(first='Lauri', last='Karttunen'),
      Name(first='Ronald M.', last='Kaplan'),
      Name(first='Annie', last='Zaenen')
  ]
  >>> anthology.find_people("Karttunen, Lauri")
  [
      Person(
          id='lauri-karttunen', names=[Name(first='Lauri', last='Karttunen')],
          item_ids=<set of 30 AnthologyIDTuple objects>, comment=None
      )
  ]
  ```

  Find more examples and details on the API in the [**official
  documentation**](https://acl-anthology-py.readthedocs.io/en/latest/).



  This package uses the [**Poetry**](https://python-poetry.org/) packaging system.
  Development is easiest with the [**just**](https://github.com/casey/just)
  command runner; running `just -l` will list all available recipes, while `just
  -n <recipe>` will print the commands that the recipe would run.



  - `just check` will run [**black**](https://github.com/psf/black),
     [**ruff**](https://github.com/charliermarsh/ruff),
     [**mypy**](https://mypy.readthedocs.io), and some other pre-commit hooks on all
     files in the repo.

      - `just install-hooks` will install pre-commit hooks so they run on every
        attempted commit.

  - `just test-all` will run all tests _except_ for tests that run on the full
    Anthology data.

      - `just test NAME` will only run test functions with `NAME` in them.
      - `just test-integration` will run tests on the full Anthology data.

  - `just fix-and-test` (or `just ft` for short) will run all checks and tests,
    additionally re-running the checks on failure, so that the checking and
    testing will continue even if some hooks have modified files.

  - The justfile defines several more useful recipes; list them with `just -l`!



  There are some benchmark scripts intended to be run with
  [richbench](https://github.com/tonybaloney/rich-bench):

  ```bash
  poetry run richbench benchmarks/
  ```



  - `just docs` generates the documentation in the `site/` folder.
  - `just docs-serve` serves the documentation for local browsing.

  Docstrings are written in [Google
  style](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings)
  as this [supports the most
  features](https://mkdocstrings.github.io/griffe/docstrings/#parsers-features)
  with the mkdocstrings handler (particularly compared to Sphinx/reST).


pkgId: b2c97dd08eaffcb140e21abb8b0dce91e14897620048897848f083f9e37c15da
name: python-acl2-kernel
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: Jupyter Kernel for ACL2
url: https://github.com/tani/acl2-kernel
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acl2-kernel-0.3.1-1.src.rpm
checksum_type: sha256
description:
  Jupyter Kernel for ACL2



  > Project Jupyter exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages. (https://jupyter.org/)

  > ACL2 is a logic and programming language in which you can model computer systems, together with a tool to help you prove properties of those models. "ACL2" denotes "A Computational Logic for Applicative Common Lisp". (http://www.cs.utexas.edu/users/moore/acl2/)



  We follow to the standard jupyter kernel installation. So, you will install the kernel by `pip` command,
  and will call the installation command like,

  ```sh
  $ pip3 install jupyter acl2-kernel
  $ python3 -m acl2_kernel.install
  $ jupyter notebook
  ```

  You also can see the deep usage by `python3 -m acl2_kernel.install --help`.



  In some case, you might want to run the kernel in the Docker containers.
  This repository contains Dockerfile example. You can build example image by the following command.

  ```
  $ docker build . -t acl2
  ```

  To run the container, you would type the command like

  ```
  $ docker run --rm -p 8888:8888 acl2 jupyter notebook --ip='0.0.0.0'
  ```

  A running example is available in the `example/` directory.
  You can try it on [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tani/acl2-kernel/master?filepath=Example.ipynb).



  Install [Poetry](https://python-poetry.org/) and in the root directory, do

  ```
  $ poetry build
  $ pip3 install dist/acl2-kernel-<version>.tar.gz
  $ python3 -m acl2_kernel.install --acl2 <path-to-acl2-binary>
  ```



  - [Jupyter](https://jupyter.org/) - Softwares for interactive computing
  - [ACL2](http://www.cs.utexas.edu/users/moore/acl2/) - Theorem prover based on Common Lisp



  This project is released under the BSD 3-clause license.

  Copyright (c) 2020, TANIGUCHI Masaya All rights reserved.

  We borrow code from the following projects.

  - Egison Kernel; Copyright (c) 2017, Satoshi Egi and contributors All rights reserved.
  - Bash Kernel; Copyright (c) 2015, Thomas Kluyver and contributors All rights reserved.


pkgId: 6c0256ef6fe8b0fdf1e072ada095dba37e995e41c0d5057da3b381bece0cdbf6
name: python-acled
arch: src
version: 0.1.6
epoch: 0
release: 1
summary: A Python library that unofficially wraps the ACLED API.
url: https://github.com/blazeiburgess/acled
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acled-0.1.6-1.src.rpm
checksum_type: sha256
description:
  from acled.models import AcledEvent



  A Python library that unofficially wraps the ACLED (Armed Conflict Location & Event Data) API.

  See the project here: https://acleddata.com/



  - Add testing
  - Add client for deleted api, add method to access from main client
  - Add workflows in github
  - Better document more advanced features (e.g. filter type changes = vs. > vs. < vs. LIKE). They should work now (partially tested), but are a little obscure.



  Install via `pip`:

  ```bash
  pip install acled
  ```



  You can set the required API key and Email variables with environment variables or pass them in directly. The relevant variables naames are:

  - ACLED_API_KEY
  - ACLED_EMAIL



  ```python
  from acled import AcledClient
  from acled.models import AcledEvent
  from typing import List, Dict

  client = AcledClient()


  filters: Dict[str, int | str] = {
      'limit': 10,
      'event_date': '2023-01-01|2023-01-31'
  }

  events: List[AcledEvent] = client.get_data(params=filters)


  for event in events:
      print(event['event_id_cnty'], event['event_date'], event['notes'])

  ```



  ```python
  from acled import AcledClient
  from acled.models import AcledEvent
  from typing import List

  from .local import api_key, email


  client = AcledClient(api_key=api_key, email=email)


  filters = {
      'limit': 10,
      'event_date': '2023-01-01|2023-01-31'
  }

  events: List[AcledEvent] = client.get_data(params=filters)


  for event in events:
      print(event['event_id_cnty'], event['event_date'], event['notes'])
  ```



  All requests require a valid API key and the email that is registered to that API key.

  ACLED is an amazing service provided at no cost so please be respectful and measured in your usage.



  [Here's the original API documentation](https://acleddata.com/acleddatanew/wp-content/uploads/2020/10/ACLED_API-User-Guide_2020.pdf) (2020)


pkgId: 555ba5e506880c56858ce139c0b3ee313f3d4b198ef1da695c759ff158fab1c0
name: python-acled
arch: src
version: 0.1.7
epoch: 0
release: 1
summary: A Python library that unofficially wraps the ACLED API.
url: https://github.com/blazeiburgess/acled
rpm_license: GPL 3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acled-0.1.7-1.src.rpm
checksum_type: sha256
description:
  A Python library that unofficially wraps the ACLED (Armed Conflict Location & Event Data) API.

  See the project here: https://acleddata.com/



  - Add testing
  - Add client for deleted api, add method to access from main client
  - Add workflows in github
  - Better document more advanced features (e.g. filter type changes = vs. > vs. < vs. LIKE). They should work now (partially tested), but are a little obscure.



  Install via `pip`:

  ```bash
  pip install acled
  ```



  You can set the required API key and Email variables with environment variables or pass them in directly. The relevant variables naames are:

  - ACLED_API_KEY
  - ACLED_EMAIL



  ```python
  from acled import AcledClient
  from acled.models import AcledEvent
  from typing import List, Dict

  client = AcledClient()


  filters: Dict[str, int | str] = {
      'limit': 10,
      'event_date': '2023-01-01|2023-01-31'
  }

  events: List[AcledEvent] = client.get_data(params=filters)


  for event in events:
      print(event['event_id_cnty'], event['event_date'], event['notes'])

  ```



  ```python
  from acled import AcledClient
  from acled.models import AcledEvent
  from typing import List

  from .local import api_key, email


  client = AcledClient(api_key=api_key, email=email)


  filters = {
      'limit': 10,
      'event_date': '2023-01-01|2023-01-31'
  }

  events: List[AcledEvent] = client.get_data(params=filters)


  for event in events:
      print(event['event_id_cnty'], event['event_date'], event['notes'])
  ```



  All requests require a valid API key and the email that is registered to that API key.

  ACLED is an amazing service provided at no cost so please be respectful and measured in your usage.



  [Here's the original API documentation](https://acleddata.com/acleddatanew/wp-content/uploads/2020/10/ACLED_API-User-Guide_2020.pdf) (2020)


pkgId: b030967bc8ef909a9151c75a0abae20caecb7cc232d45c462542918a534626d4
name: python-aclib.cv
arch: src
version: 1.0.6
epoch: 0
release: 1
summary: opencv api
url: https://github.com/AnsChaser/aclib.cv
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aclib.cv-1.0.6-1.src.rpm
checksum_type: sha256
description:
      pip install aclib.cv



  ``` python
  from aclib.cv import Image, Dotset, DotsetLib, FontLib
  from aclib.cv import Target, TargetList

  im = Image.fromfile('filepath')
  im.show()
  ```


pkgId: 2beda62b882177872c09cbc3d9f65c9f28470d3346976f0b0f171a26b5d76fd6
name: python-aclick
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/aclick/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aclick-0.2.3-1.src.rpm
checksum_type: sha256
description:
  [![pypi](https://img.shields.io/pypi/v/aclick.svg)](https://pypi.org/project/aclick/)
  [![tests](https://img.shields.io/github/workflow/status/jkulhanek/aclick/run-tests?label=tests)](https://github.com/jkulhanek/aclick/actions/workflows/run-tests.yml)
  [![coverage](https://img.shields.io/codecov/c/gh/jkulhanek/aclick)](https://app.codecov.io/gh/jkulhanek/aclick)
  ![python](https://img.shields.io/badge/python-3.7%2C3.8%2C3.9%2C3.10-blue)

  **aclick** is a python library extending `click` with the support for typing. It uses function signatures to
  automatically register options to parsers. Please refer to the [documentation](https://jkulhanek.github.io/aclick).

  The following features are currently supported:

  - Positional-only parameters are added as click Arguments, other parameters become click Options.
  - Docstring is automatically parsed and used to generate command and parameter descriptions.
  - Arguments with `int`, `float`, `str`, `bool` values both with and without default value.
  - Complex structures of classes and dataclasses that are automatically inlined as a single string, e.g.,
    `class1("arg1", arg2=class2())`.
  - Complex structures of classes and dataclasses that are expanded as individual options with the `hierarchical=True`
    option enabled.
  - Type `Union` of complex classes both inlined and hierarchical.
  - Type `Optional` of inlined complex classes.
  - Type `Literal` of strings.
  - Lists and tuples of both the primitive and inlined complex types.
  - Parameters can be renamed.
  - Parameter values can be loaded from a JSON, YAML, or other file.
  - Configuration can be loaded using the [gin-config](https://github.com/google/gin-config) package.
  - For other features please refer to the [documentation](https://jkulhanek.github.io/aclick).



  Install the library from pip:

  ```
  $ pip install aclick
  ```



  Import `aclick` instead of `click`:

  ```python


  import aclick

  @aclick.command()
  def example(arg1: str, /, arg2: int = 5):
      pass

  example()
  ```

  When using `click.groups`:

  ```python


  import aclick

  @aclick.group()
  def main():
      pass

  @main.command('example')
  def example(arg1: str, /, arg2: int = 5):
      pass

  main()
  ```

  For further details please look at the [documentation](https://jkulhanek.github.io/aclick).



  [MIT](/LICENSE)


pkgId: 2c65f65fdddf8b3719105961539981c8a0b94f59ba14d306ee864acd2a21b94f
name: python-acmax24
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: Python library for AVPro Edge AC-MAX-24 Audio Matrix
url: https://pypi.org/project/acmax24/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acmax24-0.2.4-1.src.rpm
checksum_type: sha256
description:
  `acmax24` is a python library for managing the AVPro Edge AC-MAX-24 Audio Matrix.  This is a 24 input, 24 output audio matrix device, designed for whole home audio.

  This library was created to enable the the `hass-acmax24` Home Assistant integration, which makes the AX-MAX-24 Audio Matrix appear as a set of MediaPlayer entities in Home Assistant.


pkgId: 893a939923b30e0a2414fe0603ff27edf26ae60ea71bca75c4c149af043f5c23
name: python-acme-dns-azure
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: ACME client setup based on Certbot for dns-01 challenges via Azure Cloud services
url: https://github.com/ZEISS/acme-dns-azure
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acme-dns-azure-0.4.0-1.src.rpm
checksum_type: sha256
description:
  This repository aims to leverage the automatic renewal of SSL certficates within Azure Cloud in a secure manner.

  A wrapper library is provided to automatically renew certifactes based on the [ACME DNS-01 challenge](https://letsencrypt.org/docs/challenge-types/#:~:text=all%20of%20them.-,DNS%2D01%20challenge,-This%20challenge%20asks) by using [certbot](https://certbot.eff.org/).

  The library supports the usage of best practices for securely handling certificates by:

  - using certbot
  - removing the need of a file system for storing certificates
  - Azure Key Vault for central and only storage of secrets and certificates
  - enabling easy and flexible automation



  acme-dns-azure is available on PyPi:

  ```bash
  python -m pip install acme-dns-azure
  ```

  For usage exampless please refer to [examples](examples)



  Based on the provided configuration and trigger, the wrapper library supports following flow.

  ![architecture](https://github.com/ZEISS/acme-dns-azure/blob/main/docs/architecture_concept.png?raw=true)

  1. Receive certificates, receive EAB & ACME credentials (if configured), receive ACME account information (if already present) from KeyVault. Resolve DNS and setup certbot related configuration.
  2. Certbot: Init renewal process to certificate authority
  3. Certbot: DNS Challenge - create TXT record
  4. Certbot: Renew certificates
  5. Certbot: DNS Challenge - delete TXT record
  6. Upload renewed certificates, create/update ACME account information as secret within KeyVault.

  Note: When using [DNS delegation](https://docs.certbot-dns-azure.co.uk/en/latest/#:~:text=management.microsoftazure.de/-,DNS%20delegation,%C2%B6,-DNS%20delegation%2C%20also) step _3._ and _5._ differ as the TXT record won´t be deleted.



  The library handles following use cases:

  - Create new certificates
  - Update domain references in existing certificates
  - Renew existing certificates

  Auth is possible by using:

  - Service Principal
  - User Assigned Identity



  The library can be used by:

  - running as script
  - Python package within your app

  Within [examples](examples) you can find example implementations for running the python package:

  - Azure function
  - Container

  ![usage](https://github.com/ZEISS/acme-dns-azure/blob/main/docs/wrapper_usage.png?raw=true)



  Fork, then clone the repo:

  ```bash
  git clone https://github.com/ZEISS/acme-dns-azure
  ```

  Install Poetry if you not have it already:

  ```bash
  curl -sSL https://install.python-poetry.org | python3 -
  ```

  Configure the virtual environment with full example support and activate it:



  ```bash
  poetry install --all-extras
  source .venv/bin/activate
  ```



  ```bash
  poetry run black .
  ```



  ```bash
  poetry run coverage run
  poetry run coverage report
  ```



  See [How to run integration tests](tests/integration/README.md)



  For releasing a new version, create a PR with one of following labels:

  - minor
  - major
  - patch
  - prepatch
  - preminor
  - premajor
  - prerelease





  The config is written in [YAML format](http://en.wikipedia.org/wiki/YAML), defined by the scheme described below.
  Brackets indicate that a parameter is optional.
  For non-list parameters the value is set to the specified default.

  Generic placeholders are defined as follows:

  - `<boolean>`: a boolean that can take the values `true` or `false`
  - `<int>`: a regular integer
  - `<string>`: a regular string
  - `<secret>`: a regular string that is a secret, such as a password

  The other placeholders are specified separately.

  See [examples](examples/README.md) for configuration examples.

  ```yml



  [use_system_assigned_identity_credentials: <boolean>]
  [use_azure_cli_credentials: <boolean>]
  [use_workload_identity_credentials: <boolean>]
  [use_managed_identity_credentials: <boolean>]
  [use_provided_service_principal_credentials: <boolean>]


  [managed_identity_id: <string>]


  [sp_client_id: <string>]
  [sp_client_secret: <secret>]
  [sp_certificate_path: <string>]


  [azure_environment: <string> | default = "AzurePublicCloud"]


  [update_cert_domains: <boolean> | default = False]


  key_vault_id : <string>


  server : <string>


  [keyvault_account_secret_name: <regex> | default "acme-account-$(network location of server)"]



  [certbot.ini : <string> | default = ""]
  ```

  NOTE: Either **managed_identity_id** or **sp_client_id** and **sp_client_secret** must be specified.

  NOTE: **certbot.ini** represents the [CERTBOT configuration file](https://eff-certbot.readthedocs.io/en/latest/using.html#configuration-file) and will be passed into certbot by the _acme_dns_azure_ library as defined. Misconfiguration will lead to failures of certbot and therefore of the renewal process.

  Following values will be added to the configurataion file by the _acme_dns_azure_ library per default:

  ```yml
  preferred-challenges: dns
  authenticator: dns-azure
  agree-tos: true
  ```



  ```yml

    
    [enabled: <boolean> |  default = false]
    [kid_secret_name : <string> | default="acme-eab-kid"]
    [hmac_key_secret_name : <secret> default="acme-eab-hmac-key"]
  ```

  ```yml
  certificates:
    - <certificate>
  ```



  ```yml

  name: <string>

  dns_zone_resource_id: <string>

  [renew_before_expiry: <int>]
  domains:
    - <domain>
  ```



  ```yml

  name: <string>

  [dns_zone_resource_id: <string>]
  ```



  For running the module as script 'sp_client_id' and 'sp_client_secret' are required. 'managed_identity_id' is not supported.

  ```bash

  python acme_dns_azure/client.py --config-file-path $CONFIG_File_PATH

  python acme_dns_azure/client.py --config-env-var $ENV_VAR_NAME_CONTAINING_CONFIG
  ```



  Best follow [security recommendations from Azure](https://docs.certbot-dns-azure.co.uk/en/latest/#:~:text=Example%3A%20Delegation%20%2B%20more,%C2%B6).

  When working with shared DNS Zones, one can work with DNS delegation with limited permissions:

  Example:

  | Record | Name                         | Value                  | Permission           |
  | ------ | ---------------------------- | ---------------------- | -------------------- |
  | TXT    | \_acme-dedicated             | -                      | DNS Zone Contributor |
  | CNAME  | \_acme-challenge.mysubdomain | \_acme-dedicated.fqdn. | None                 |

  The CNAME and TXT record must be created upfront to enable users to use certbot. The permissions are required on the identity triggering certbot.

  With this setup, a DNS Zone owner can limit permissions and enable Users to Create/Renew certificates for their subdomain and ensuring that users cannot aquire certificates for other domains or interfer with existsing records.


pkgId: 3740c52e32e9daebcfb9f6f37dc9b2e8f7374e7283e60e9a380cb897469cea8a
name: python-acme_project_create
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: Sets up a new (python) project using a template
url: https://pypi.org/project/acme_project_create/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acme_project_create-0.0.2-1.src.rpm
checksum_type: sha256
description:
  Sets up a new (python) project using a template.

  Uses a three-step process:
  1. Template files are copied to the `-target-dir` location from a `--template-dir-path` directory. Default template for a python project is included in the package.
  2. Directory names in the template following the pattern `{{<variable>}}` are substituted with value provided by the user.
  3. Filenames in the template directory that end with `j2template` (e.g. `pyproject.toml.j2template`) are assumed to be `Jinja2` templates and a file is generated in the target location with variable substitutions provided by the user i.e. `pyproject.toml`.

  And that's it.

  Note: to provide all values to compile the template
  the template dir needs to contain a `template_manifest.py` file that must implement a function:

  `def configure_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser`

  which takes an existing instance of ArgumentParser, adds arguments specific to the template and returns the parser object.



  The default template makes several notable choices:

  * Uses `venv` for virtual environments and `.venv` dir to store built environment
  * Uses `.env` file for setting up environment variables
  * Uses `setuptools` for packaging
  * Uses `pytest` for testing
  * Uses `mkdocs` for documentation



  Setting up all files to create a new project is time consuming and involves lots of small technical choices.



  You are probably better off using [Cookiecutter](https://github.com/cookiecutter/cookiecutter)



  This project has been setup with `acme-project-create`, a python code template library.


pkgId: 5b37482d9aa90f5bff414d4e781332ce04bb99703c7f261ec5480ef901679b0a
name: python-acme_project_create
arch: src
version: 0.0.3
epoch: 0
release: 1
summary: Sets up a new (python) project using a template
url: https://pypi.org/project/acme_project_create/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acme_project_create-0.0.3-1.src.rpm
checksum_type: sha256
description:
  Sets up a new (python) project using a template.

  Uses a three-step process:
  1. Template files are copied to the `-target-dir` location from a `--template-dir-path` directory. Default template for a python project is included in the package.
  2. Directory names in the template following the pattern `{{<variable>}}` are substituted with value provided by the user.
  3. Filenames in the template directory that end with `j2template` (e.g. `pyproject.toml.j2template`) are assumed to be `Jinja2` templates and a file is generated in the target location with variable substitutions provided by the user i.e. `pyproject.toml`.

  And that's it.

  Note: to provide all values to compile the template
  the template dir needs to contain a `template_manifest.py` file that must implement a function:

  `def configure_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser`

  which takes an existing instance of ArgumentParser, adds arguments specific to the template and returns the parser object.



  The default template makes several notable choices:

  * Uses `venv` for virtual environments and `.venv` dir to store built environment
  * Uses `.env` file for setting up environment variables
  * Uses `setuptools` for packaging
  * Uses `pytest` for testing
  * Uses `mkdocs` for documentation



  Setting up all files to create a new project is time consuming and involves lots of small technical choices.



  You are probably better off using [Cookiecutter](https://github.com/cookiecutter/cookiecutter)



      apc -target-dir . -project-name hello-world -desc "Say hello to the world" -package-name hello_world -command hello -owner-email hello@example.com



  This project has been setup with `acme-project-create`, a python code template library.



  * Enable GitHub Pages to be published via [GitHub Actions](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow)
  * Create `release` environment for [GitHub Actions](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment#creating-an-environment)
  * Setup auth to PyPI for the GitHub Action implemented in `release.yml`: [Link](https://docs.pypi.org/trusted-publishers/adding-a-publisher/) & uv publish [doc](https://docs.astral.sh/uv/guides/publish/#publishing-your-package)


pkgId: e0954745d3261ab4c32e5d633ab81e99ddf454b93841a4ea80538bcd1e2804c4
name: python-acmebot
arch: src
version: 2.13.0
epoch: 0
release: 1
summary: ACME protocol automatic certitificate manager
url: https://pypi.org/project/acmebot/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acmebot-2.13.0-1.src.rpm
checksum_type: sha256
description:
  This tool is not intended as a replacement for Certbot and does not attempt to replicate all of Certbot's functionality,
  notably it does not modify configuration files of other services,
  or provide a server to perform stand-alone domain validation.
  It does however, do a few things that Certbot does not,
  simplifying certificate management in more advanced environments.
  In addition to automatically issuing and maintaining certificates,
  the tool can also maintain associated HPKP headers and TLSA (DANE) records.


pkgId: 55666be3037a77e5e7c821e76c6102bd643ea6df01e70fd9579be1aa688b8904
name: python-acmens
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: An ACMEv2 client. Fork of acme-nosudo.
url: https://github.com/r5d/acmens
rpm_license: GNU Affero General Public License v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acmens-0.3.0-1.src.rpm
checksum_type: sha256
description:
  A fork of [acme-nosudo][]. It uses ACMEv2 protocol and requires Python 3.

  [acme-nosudo]: https://github.com/diafygi/acme-nosudo

  `acmens` may be used for getting a new SSL certificate, renewing a SSL
  certificate for a domain, and revoking a certificate for a domain.

  It's meant to be run locally from your computer.



  * openssl or libressl
  * python3
  * pip
  * virtualenv (if you want to use the repo version)



  ```sh
  pip install acmens
  ```

  Or, if you would like to use the repo version:

  ```sh
  cd /path/to/acmens


  make venv


  . .venv/bin/activate


  make develop


  ```



  First, generate an user account key for Let's Encrypt:

  ```sh
  openssl genrsa -aes256 4096 > user.key
  openssl rsa -in user.key -pubout > user.pub
  ```

  Next, generate the domain key and a certificate request:

  ```sh

  openssl genrsa -aes256 -out domain.key 4096


  openssl req -new -sha256 -key domain.key -out domain.csr


  openssl req -new -sha256 -key domain.key -subj "/" -addext "subjectAltName = DNS:example.com, DNS:www.example.com" > domain.csr
  ```

  Lastly, run `acmens`:

  ```sh
  acmens --account-key user.key --email mail@example.com --csr domain.csr > signed.crt
  ```


  If you want to use the DNS challenge type provide it using the `--challenge` flag.

  ```sh
  acmens --account-key user.key --email mail@example.com --challenge dns --csr domain.csr > signed.crt
  ```

  This will prompt you to update the DNS records to add a TXT record.



  This:

  ```sh
  acmens --revoke -k user.key --crt signed.crt
  ```

  will revoke SSL certificate in `signed.crt`.


pkgId: ea3d00224ceb5ca539a6bc340149ea6b0220b5ba48ceec6f42ac8c455923d158
name: python-acmetric-plotting
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: A package to easily build ACMetric branded plots
url: https://github.com/ACMetric/acmetric_package
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acmetric-plotting-1.3.2-1.src.rpm
checksum_type: sha256
description:
  <a href='https://acmetric.com/' target='_blank'><img src='https://i.postimg.cc/ZnscgcFb/Acmetric-Social-3.jpg' height="100" border='0' alt='Acmetric-Social-3'/></a>



  This package is created to help you use ACMetric's brand colors and build plots without hours of tuning. Enjoy!


  Setting up in Google Colab is described [here](https://github.com/ACMetric/acmetric_package/blob/master/colab_setup.md).


  We recommend importing it along with `matplotlib` and `seaborn`.

  ```python3
  %matplotlib inline # display plots in the notebook right away
  %config InlineBackend.figure_format='retina' # high resolution
  import matplotlib.pyplot as plt
  import seaborn as sns
  import acmetric_plotting as ac
  ```

  And it is ready to go!


  ***


  `ac.display_colors()` will show you a table with all the colors available and their names.

  `ac.colors` module contains ACMetric colors, you can access them by writing `ac.colors.coral`, `ac.colors.sky_60`, etc.

  `ac.palette` is a `matplotlib` color palette. You can call it and choose a color you like by index, e.g. `ac.palette[3]`.

  `ac.cmap` is a gradient colormap that can be used in `seaborn` heatmap and other plots.

  Run `ac.params.layout_color('black')` to make axes and text black. Run `ac.params.layout_color('default')` to make them grey again.

  Now 4 kinds of plots are available in the package: bar chart, pie chart, scatter plot and box plot. You can make them using `ac.bar`, `ac.pie`, `ac.scatter` and `ac.box`. All the possible parameters can be found in the docstring.

  **Note:** it doesn't mean you can't build other kinds of plots. Just import `matplotlib` or `seaborn`, and all the plots you create will also be ACMetric branded!


pkgId: f7284d12b34b4272d978f9bc3a17f6a8abf8fa6b18dfa59b5e477f156fa8ed8a
name: python-acnaweblib
arch: src
version: 0.1.19
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/acnaweb/acnaweblib
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acnaweblib-0.1.19-1.src.rpm
checksum_type: sha256
description:
  ![version](https://img.shields.io/badge/version-0.1.19-blue.svg?cacheSeconds=2592000)
  ![licence](https://img.shields.io/badge/licence-MIT-green.svg?cacheSeconds=2592000)

  This is a Python library for testing



  `acnaweblib` supports Python 3.8 and higher.



  Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `acnaweblib`.

  ```bash
  $ pip install acnaweblib
  ```



  ```python
  from acnaweblib import calculator


  result = calculator.add(4,2)

  ```



  Development requires Python 3.8+; otherwise you'll get false positive type failures.

  To work on the `acnaweblib` code: pull the repository, create and activate a virtualenv, then run:

  ```bash
  make dev
  ```

  Testing

  ```bash
  make test
  ```

  Publish

  ```bash
  make push
  ```





  👤 **Antonio Carlos de Lima Junior**

  * Website: https://www.linkedin.com/in/acnaweb/
  * Github: [@acnaweb](https://github.com/acnaweb)
  * LinkedIn: [@acnaweb](https://linkedin.com/in/acnaweb)




  - [Pypi Classifiers](https://pypi.org/classifiers/)
  - [Python Packaging Tutorial](https://www.devdungeon.com/content/python-packaging-tutorial)
  - [A Practical Guide to Using Setup.py](https://godatadriven.com/blog/a-practical-guide-to-using-setup-py/)


pkgId: 1e781887bd9caa61337525e3c4fe129f81622b5d716dcc2c79f253722fc454bb
name: python-acnportal
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: A package of tools for large-scale EV charging research.
url: https://github.com/zach401/acnportal
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acnportal-0.3.3-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/zach401/acnportal.svg?branch=master)](https://travis-ci.org/zach401/acnportal)
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c357a20f61f941688c157ce21de905b7)](https://www.codacy.com/manual/Caltech_ACN/acnportal?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=zach401/acnportal&amp;utm_campaign=Badge_Grade)
  <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
  [![DOI](https://zenodo.org/badge/134629497.svg)](https://zenodo.org/badge/latestdoi/134629497)



  The ACN Portal is a suite of research tools developed at Caltech to accelerate the pace of large-scale EV charging research.
  Checkout the documentation at <https://acnportal.readthedocs.io/en/latest/>.

  For more information about the ACN Portal and EV reasearch at Caltech check out <https://ev.caltech.edu>.



  The ACN-Data Dataset is a collection of EV charging sessions collected at Caltech and NASA's Jet Propulsion Laboratory (JPL). This basic Python client simplifies the process of pulling data from his dataset via its public API.



  ACN-Sim is a simulation environment for large-scale EV charging algorithms. It interfaces with ACN-Data to provide access to realistic test cases based on actual user behavior.



  algorithms is a package of common EV charging algorithms which can be used for comparison when evaluating new algorithms.

  This package is intended to be populated by the community. If you have a promising EV charging algorithm, please implement it as a subclass of BasicAlgorithm and send a pull request.



  Download or clone this repository. Navigate to its root directory. Install using pip.

  ```bash
  pip install .
  ```



  See the `tutorials` directory for jupyter notebooks that you can
  run to learn some of the functionality of `acnportal`. These
  tutorials are also included on the readthedocs page. Additional
  demos and case studies can be found at
  <https://github.com/caltech-netlab/acnportal-experiments>
  We also have a video series of `acnportal` demos, which can
  be found at TODO.



  Tests may be run after installation by executing

  ```bash
  python -m unittest discover -v
  ```

  Remove `-v` after `discover` to suppress verbose output.



  If you're submitting a bug report, feature request, question, or
  documentation suggestion, please submit the issue through Github and
  follow the templates outlined there.

  If you are contributing code to the project, please view the
  contributing guidelines [here.](https://github.com/zach401/acnportal/master/CONTRIBUTING.md)



  Contact the ACN Research Portal team at <mailto:ev-help@caltech.edu> with any
  questions, or submit a question through Github issues.


pkgId: 4ec43b47652a186b73317dbb64138cff724a21c7f2fbe9e9ab8f9e8bff18cd2a
name: python-acnutils
arch: src
version: 0.6.3
epoch: 0
release: 1
summary: Various utilities used in AntiCompositeNumber's bots
url: https://github.com/AntiCompositeNumber/acnutils
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acnutils-0.6.3-1.src.rpm
checksum_type: sha256
description:
  A collection of various scripts used by AntiCompositeNumber's bots.
  Feel free to use this if you find it useful, however, no guarentees of stability are made.
  Pull requests are welcome, but may be declined if they would not be useful for my bots or tools.
  This package depends on pywikibot. Some utilites also require a database connection via the toolforge libarary, to enable those install ``acnutils[db]``.
  Poetry is used for dependency management and package building. To set up this project, run ``poetry install -E db``.


pkgId: 96d273f4428fa26822d5187df260d24a517ecbb9f5030bca1b10f4dec4c2d01c
name: python-aco-routing
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: A Python package to find the shortest path in a graph using Ant Colony Optimization (ACO)
url: https://github.com/hasnainroopawalla/ant-colony-optimization
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aco-routing-1.1.1-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">Ant Colony Optimization</h1>

  [![Develop](https://github.com/hasnainroopawalla/Ant-Colony-Optimization/actions/workflows/develop.yml/badge.svg)](https://github.com/hasnainroopawalla/Ant-Colony-Optimization/actions/workflows/develop.yml)
  [![Deploy](https://github.com/hasnainroopawalla/Ant-Colony-Optimization/actions/workflows/deploy.yml/badge.svg)](https://github.com/hasnainroopawalla/Ant-Colony-Optimization/actions/workflows/deploy.yml)
  [![PyPi version](https://img.shields.io/pypi/v/aco_routing.svg)](https://pypi.python.org/pypi/aco_routing/)
  ![Downloads](https://img.shields.io/pypi/dm/aco_routing.svg)

  <!-- [![Python versions](https://img.shields.io/pypi/pyversions/aco_routing.svg?style=plastic)](https://img.shields.io/pypi/pyversions/aco_routing.svg?style=plastic) -->

  A Python package to find the shortest path in a graph using Ant Colony Optimization (ACO).

  ➡️ Check out my [Medium article](https://medium.com/@hasnain.roopawalla/ant-colony-optimization-1bbc346c2da5) for a detailed walkthrough 🚀

  The Ant colony Optimization algorithm is a probabilistic technique for solving computational problems which can be reduced to finding good paths through graphs ([source](https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms)).

  This implementation of the ACO algorithm uses the [NetworkX](https://networkx.org/) graph environment.





  ```
  $ pip install aco_routing
  ```



  > Check out: [example.py](https://github.com/hasnainroopawalla/ant-colony-optimization/blob/master/example.py)

  Import all the dependencies:

  ```python
  from aco_routing import ACO
  import networkx as nx
  ```

  Create a `NetworkX.Graph` object with nodes and edges:

  ```python
  G = nx.DiGraph()

  G.add_edge("A", "B", cost=2)
  G.add_edge("B", "C", cost=2)
  G.add_edge("A", "H", cost=2)
  G.add_edge("H", "G", cost=2)
  G.add_edge("C", "F", cost=1)
  G.add_edge("F", "G", cost=1)
  G.add_edge("G", "F", cost=1)
  G.add_edge("F", "C", cost=1)
  G.add_edge("C", "D", cost=10)
  G.add_edge("E", "D", cost=2)
  G.add_edge("G", "E", cost=2)
  ```

  Use ACO to find the shortest path and cost between the `source` and `destination`:

  ```python
  aco = ACO(G, ant_max_steps=100, num_iterations=100, ant_random_spawn=True)

  aco_path, aco_cost = aco.find_shortest_path(
      source="A",
      destination="D",
      num_ants=100,
  )
  ```

  Output:

  ```
  ACO path: A -> H -> G -> E -> D
  ACO path cost: 8.0
  ```





  `aco_routing.Ant`

  - An `Ant` that traverses the graph.



  `aco_routing.ACO`

  - The traditional Ant Colony Optimization algorithm that spawns ants at various nodes in the graph and finds the shortest path between the specified source and destination ([pseudo code](https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms#Algorithm_and_formula)).



  - Post any issues and suggestions on the GitHub [issues](https://github.com/hasnainroopawalla/Ant-Colony-Optimization/issues) page.
  - To contribute, fork the project and then create a pull request back to master.


pkgId: 5e1c5a4581b6fe0765240386d142861c0a8c3dbbcf8e882f5c95889fe2569372
name: python-acon
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Adaptive Correlation Optimization Network (ACON)
url: https://github.com/torinriley/Adaptive-Correlation-Optimization-Network-ACON
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acon-0.1.1-1.src.rpm
checksum_type: sha256
description:
  ACON is an advanced framework designed to optimize machine learning models by leveraging adaptive correlation techniques. It includes modules for real-time data integration, optimization algorithms, meta-learning, and adaptive loss functions. The goal of ACON is to provide tools that enable dynamic model optimization based on evolving data and performance metrics.



  •	Real-time Data Integration: Efficiently integrates incoming data while maintaining a manageable buffer size.

  •	Adaptive Optimization: Implements both traditional and advanced optimization techniques (e.g., SGD, Adam) with adaptive learning rates.

  •	Meta-Learning: Applies meta-learning strategies to optimize model parameters based on previous task performance.

  •	Adaptive Loss Function: Dynamically switches between loss functions (MSE, MAE, Huber) based on training progress.



  ```bash
  pip install acon
  ```


pkgId: f068894e946c61434822f168dfd387bc8f644f1281539f01b11791c3a7f48d7e
name: python-acorn
arch: src
version: 0.0.15
epoch: 0
release: 1
summary: Automated computational research notebook.
url: https://github.com/rosenbrockc/acorn
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acorn-0.0.15-1.src.rpm
checksum_type: sha256
description:
  ``acorn`` uses the mutability of python objects, together with
  decorators, to produce an automatic notebook for computational research.
  Common libraries like ``numpy``, ``scipy``, ``sklearn`` and ``pandas``
  are mutated with decorators that enable logging of calls to important
  methods within those libraries.
  This is really helpful for data science where experimenting with fits,
  pipelines and pre-processing transformations can result in hundreds of
  fits and predictions a day. At the end of the day, it is hard to
  remember which set of parameters produced that one fit, which (of
  course) you didn't realize was important at the time.
  The library is `well
  documented <https://rosenbrockc.github.io/acorn/>`__.


pkgId: 760b639c0c354bd408becea54262382638f0304b340298770873e08017e44086
name: python-acos-client
arch: src
version: 2.10.0
epoch: 0
release: 1
summary: A10 Networks ACOS API Client
url: https://github.com/a10networks/acos-client
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acos-client-2.10.0-1.src.rpm
checksum_type: sha256
description:
  1. [Supported Versions](#Supported-Versions)

  2. [Installation for ACOSv4.1.4](#Installation-ACOSv4.1.4)

  3. [Installation for ACOSv4.1.1](#Installation-ACOSv4.1.1)

  4. [Example usage information](#Usage)

  5. [Contributing & Testing](#Contributing)

  6. [Issues and Inquiries](#Issues-and-Inquiries)

  7. [Helpful Links](#Helpful-links)




  ```
  | ACOS Version   | AXAPI Version | ACOS Client Version | Status      |
  | 2.7.1†         | 2             | >=0.1.0,<0.3.0      | end-of-life |
  | 2.7.2          | 2             | >=0.1.0,<0.3.0      | end-of-life |
  | 4.0.0          | 3             | >=1.4.6,<1.5.0      | end-of-life |
  | 4.1.1          | 3             | >=1.5.0,<2.0.0      | end-of-life |
  | 4.1.4 GR1-P2   | 3             | >=2.0.0,<2.4.0      | end-of-life |
  | 4.1.4          | 3             | >=2.4.0             | end-of-life |
  | 4.1.4 GR1-P5   | 3             | >=2.6.0             | Maintenance |
  | 5.2.1          | 3             | >=2.6.0             | Maintenance |
  | 5.2.1-p1       | 3             | >=2.7.0             | Maintenance |
  | 5.2.1-p2       | 3             | >=2.9.0             | Maintenance |
  | 5.2.1-p2       | 3             | >=2.9.1             | Maintenance |
  | 5.2.1-p2       | 3             | >=2.10.0            | Maintenance |
  ```

  †Works only when not using partitioning





  ```sh
  $ pip install acos-client>=2.9.0
  ```



  ```sh
  $ git clone https://github.com/a10networks/acos-client.git
  $ cd acos-client
  $ git checkout stable/stein
  $ pip install -e .
  ```



  ```python
  c = acos_client.Client('somehost.example.com', acos_client.AXAPI_30, 'admin', 'password')
  ```



  ```python
  import acos_client as acos

  c = acos.Client('1.2.3.4', acos.AXAPI_30, 'admin', 'password')
  c.slb.server.create('s1', '1.1.1.1')
  c.slb.server.create('s2', '1.1.1.2')
  c.slb.service_group.create('pool1', c.slb.service_group.TCP, c.slb.service_group.ROUND_ROBIN)
  c.slb.virtual_server.create('vip1', '1.1.1.3')
  c.slb.hm.create('hm1', c.slb.hm.HTTP, 5, 5, 5, 'GET', '/', '200', 80)
  c.slb.service_group.update('pool1', health_monitor='hm1')
  c.slb.service_group.member.create('pool1', 's1', 80)
  c.slb.service_group.member.create('pool1', 's2', 80)
  ```



  1. Fork it
  2. Create your feature branch (`git checkout -b my-new-feature`)
  3. Commit your changes (`git commit -am 'Add some feature'`)
  4. Push to the branch (`git push origin my-new-feature`)
  5. Create new Pull Request



  This project uses [tox](https://pypi.python.org/pypi/tox) for testing. To run
  the test suite simply:

  ```sh
  $ sudo pip install tox  # use pip2 if using Arch Linux
  $ cd /path/to/acos_client
  $ tox
  ```


  For all issues, please send an email to support@a10networks.com





  pypy: [http://pypy.org/index.html](http://pypy.org/index.html)


  Deadsnakes github: [https://github.com/deadsnakes](https://github.com/deadsnakes)
  Deadsnakes ppa: [https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa](https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa)


pkgId: b00b048cd4d3d50edd8d62bb3ae86a3c607c93c0e38aca0cf09eddc5e1ae3a83
name: python-acoupi
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Classifier for bioacoustic devices
url: https://pypi.org/project/acoupi/
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acoupi-0.2.0-1.src.rpm
checksum_type: sha256
description:
  > [!TIP]
  > Read the latest [documentation](https://acoupi.github.io/acoupi/)


  - [What is acoupi?](#what-is-acoupi)
  - [Requirements](#requirements)
  - [Installation](#installation)
  - [Ready to use AI Bioacoustic Classifiers](#ready-to-use-ai-bioacoustic-classifiers)
      - [BatDetect2](#batdetect2)
      - [BirdNET-Lite](#birdnet-lite-coming-soon)
  - [Acoupi software architecture](#acoupi-software)
      - [Framework](#acoupi-framework)
      - [Application](#acoupi-application)
  - [Features and Development](#features-and-development)


  _acoupi_ is an open-source Python package that streamlines bioacoustic classifier deployment on edge devices like the Raspberry Pi.
  It integrates and standardises the entire bioacoustic monitoring workflow, from recording to classification.
  With various components and templates, _acoupi_ simplifies the creation of custom sensors, handling audio recordings, processing, classifications, detections, communication, and data management.

  <figure>
      <img src="docs/img/acoupi_software_overview.jpeg" alt="Figure 1: Overview of where the acoupi software package fits in the toolbox of bioacoustic research" width="60%">
      <figcaption><b>Figure 1: An overview of <i>acoupi</i> software.</b> Input your recording settings and deep learning model of choice, and <i>acoupi</i> handles the rest, sending detections where you need them.
  </figcaption>
  </figure>


  _acoupi_ has been designed to run on single-board computer devices like the [Raspberry Pi](https://www.raspberrypi.org/) (RPi).
  Users should be able to download and test _acoupi_ software on any Linux-based machines with Python version >=3.8,<3.12 installed.

  - A Linux-based single board computer such as the Raspberry Pi 4B.
  - A SD Card with 64-bit Lite OS version installed.
  - A USB Microphone such as an AudioMoth, a µMoth, an Ultramic 192K/250K.

  > [!TIP]
  > **Recomended Hardware**
  >
  > The software has been extensively developed and tested with the RPi 4B. We advise users to select the RPi 4B or a device featuring similar specifications.



  To install and use the bare-bone framework of acoupi on your embedded device follow these steps:

  **Step 1:** Install _acoupi_ and its dependencies.
  ```bash
  curl -sSL https://github.com/acoupi/acoupi/raw/main/scripts/setup.sh | bash
  ```

  **Step 2:** Configure an _acoupi_ program.

  ```bash
  acoupi setup --program `program-name`
  ```

  _acoupi_ includes two pre-built programs; a `default` and a `connected` program.
  The `default` program only records and saves audio files based on users' settings. This program does not do any audio processing neither send any messages, being comparable to an AudioMoth.
  The `connected` program is similar to the `default` program but with the added capability of sending messages to a remote server.

  Configure _acoupi_ `default` program"

  ```bash
  acoupi setup --program acoupi.programs.default
  ```

  Configure _acoupi_ `connected` program"

  ```bash
  acoupi setup --program acoupi.programs.connected
  ```

  **Step 3:** Start the deployment of your _acoupi's_ configured program.

  ```bash
  acoupi deployment start
  ```

  > [!TIP]
  > To check what are the available commands for acoupi, enter `acoupi --help`.




  _acoupi_ simplifies the use and implementation of open-source AI bioacoustic models. Currently, it supports two classifiers: the `BatDetect2`, developed by [@macodha and al.](https://doi.org/10.1101/2022.12.14.520490), and the `BirdNET-Lite`, developed by [@kahst and al.](https://github.com/kahst).

  > [!WARNING]
  > **Licenses and Usage**
  >
  > Before using a pre-trained AI bioacoustic classifier, review its license to ensure it aligns with your intended use.
  > `acoupi` programs built with these models inherit the corresponding model licenses.
  > For further licensing details, refer to the [FAQ](https://acoupi.github.io/acoupi/faq/#licensing) section.

  > [!WARNING]
  > **Model Output Reliability**
  >
  > Please note that `acoupi` is not responsible for the accuracy or reliability of model predictions.
  > It is crucial to understand the performance and limitations of each model before using it in your project.

  > [!IMPORTANT]
  > **Please make sure you are aware of their license, if you use these models.**



  The BatDetect2 bioacoustic DL model has been trained to detect and classify UK bats species.
  The [*acoupi_batdetect2*](https://acoupi.github.io/acoupi_batdetect2/) repository provides users with a pre-built _acoupi_ program that can be configured and tailored to their use cases.

  Step 1: Install _acoupi_batdetect2_ program.

  ```bash
  pip install acoupi_batdetect2
  ```

  Step 2: Setup and configure _acoupi_batdetect2_ program.

  ```bash
  acoupi setup --program acoupi_batdetect2.program
  ```



  The BirdNET-Lite bioacoustic DL model has been trained to detect and classify a large number of bird species.
  The [*acoupi_birdnet*](https://acoupi.github.io/acoupi_birdnet/) repository provides users with a pre-build _acoupi_ program that can be configured and tailored to their use cases of birds monitoring.

  Install _acoupi_birdnet_ program.

  ```bash
  pip install acoupi_birdnet
  ```

  Setup and configure _acoupi_birdnet_ program.

  ```bash
  acoupi setup --program acoupi_birdnet.program
  ```



  > [!TIP]
  > **Interested in sharing your AI bioacoustic model with the community?**
  >
  >_acoupi_ allows you to integrate your own bioacoustic classifier model. If you already have a model and would like to share it with the community, we'd  love to hear from you! We are happy to offer guidance and support to help include your classifier in the _acoupi_ list of "ready-to-use" AI bioacoustic classifiers.



  Acoupi software is divided into two parts; the code-based architecture and the running application. The _acoupi_ framework is organised into layers that ensure standardisation of data while providing flexibility of configuration. The _acoupi_ application provides a simple command line interface (CLI) allowing users to configure the acoupi framework for deployment.


  The _acoupi_ software has been designed to provide maximum flexibility and keep away the internal complexity from a user. The architecture is made of four intricate elements, which we call the data schema, components, tasks, and programs.

  The figure below provides a simplified example of an acoupi program. This program illustrates some of the most important data schema, components, and tasks.

  <figure>
      <img src="/docs/img/acoupi_program_simplified.png" alt="*Figure 2: An example of a simplified _acoupi_ program" width="90%">
      <figcaption><b>Figure 2: An example of a simplified <i>acoupi</i> program.</b>This example program implements the four tasks; audio recording, model, communication and management. Each task is composed of components        executing specific actions such as recording an audio file, processing it, sending results, and storing associated metadata. The components input or output data objects defined by the data schema to validate format of  information flowing between components and tasks.</figcaption>
  </figure>


  > [!TIP]
  > **Refer to the [**Explanation**](https://acoupi.github.io/acoupi/explanation/section) of the documentation for full details on each of these elements.**


  An _acoupi_ application consists of the full set of code that runs at the deployment stage. This includes a set of scripts made of an acoupi program with user configurations, celery files to organise queues and workers, and bash scripts to start, stop, and reboot the application processes. An acoupi application requires the acoupi package and related dependencies to be installed before a user can configure and run it. The figure below gives an overview of key stages related to the installation, configuration and runtime of an acoupi application.

  <figure>
      <img src="/docs/img/acoupi_installation_steps.png" alt="*Figure 3: Steps to deploy an acoupi application" width="90%">
      <figcaption><b>Figure 3: An visual diagram highlighting the elements of an <i>acoupi</i> application.</b>Three main steps are involved in setting up and running an <i>acoupi</i> application: (1) installation, (2) configuration, and (3) deployment.
      </figcaption>
  </figure>


  **acoupi** builds on other Python packages. The list of the most important packages and their functions is summarised below. For more information about each of them, make sure to check their respective documentation.
  - [PDM](https://pdm-project.org/2.10/) to manage package dependencies.
  - [Pydantic](https://docs.pydantic.dev/dev/) for data validation.
  - [Pytest](https://docs.pytest.org/en/7.4.x/) as a testing framework.
  - [Pony-ORM](https://ponyorm.org/) for databse queries.
  - [Celery](https://docs.celeryq.dev/en/stable/getting-started/introduction.html) to manage the processing of tasks.
  - [Jinja](#jinja) for text templating.


pkgId: 0004c7897edab3c50d5664643bc29b08480a1102630f63137f73ab46cd92926c
name: python-acoupi-batdetect2
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: An acoupi-compatible BatDetect2 model and program.
url: https://pypi.org/project/acoupi-batdetect2/
rpm_license: Creative Commons Attribution-NonCommercial 4.0 International
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acoupi-batdetect2-0.2.0-1.src.rpm
checksum_type: sha256
description:
  An acoupi-compatible BatDetect2 model and program

  > [!TIP]
  > Read the latest [documentation](https://acoupi.github.io/acoupi_batdetect2/)


  - [What is acoupi_batdetect2?](#what-is-acoupi_batdetect2)
  - [What is the difference between _acoupi_ and _acoupi_batdetect2_](#what-is-the-difference-between-acoupi-and-acoupi_batdetect2)
  - [Requirements](#requirements)
  - [Installation](#installation)
  - [What is acoupi?](#what-is-acoupi)


  *acoupi_batdetect2* is an open-source Python package that implement the [BatDetect2](https://github.com/macaodha/batdetect2) bioacoustic deep-learning model on edge devices like the [Raspberry Pi](https://www.raspberrypi.org/), using the [_acoupi_](https://acoupi.github.io/acoupi) framework. The BatDetect2 DL model has been developed by [Mac Aodha O., et al.](https://doi.org/10.1101/2022.12.14.520490) to detect and classify UK bats species.



  __acoupi_batdetect2__ and [___acoupi___](https://acoupi.github.io/acoupi) are different. The __acoupi_batdetect2__ program is built on top of the ___acoupi___ python package. Think of ___acoupi___ like a bag of LEGO pieces that you can assemble into multiple shapes and forms. __acoupi_batdectect2__ would be the results of assembling some of these LEGO pieces into a "bat"!

  > [!TIP]
  > **Get familiar with _acoupi_**
  >
  > *acoupi_batdetect2* builds on and inherits features from _acoupi_. If you want to learn more the [_acoupi_](https://acoupi.github.io/acoupi) framework, we recommand starting with _acoupi's_ home documentation.


  _acoupi_ has been designed to run on single-board computer devices like the [Raspberry Pi](https://www.raspberrypi.org/) (RPi).
  Users should be able to download and test _acoupi_ software on any Linux-based machines with Python version >=3.8,<3.12 installed.

  - A Linux-based single board computer such as the Raspberry Pi 4B.
  - A SD Card with 64-bit Lite OS version installed.
  - A USB Microphone such as an AudioMoth, a µMoth, an Ultramic 192K/250K.

  > [!TIP]
  > **Recommended Hardware**
  >
  > The software has been extensively developed and tested with the RPi 4B. We advise users to select the RPi 4B or a device featuring similar specifications.



  To install *acoupi_batdetect2* on your embedded device, you will need to first have _acoupi_ installed on your device. Follow these steps to install both _acoupi_ and _acoupi_batdetect2_:


  **Step 1:** Install _acoupi_ and its dependencies.
  ```bash
  curl -sSL https://github.com/acoupi/acoupi/raw/main/scripts/setup.sh | bash
  ```

  **Step 2:** Install *acoupi_batdetect2* and its dependencies

  ```bash
  pip install acoupi_batdetect2
  ```

  **Step 3:** Configure the *acoupi_batdetect2* program.

  ```bash
  acoupi setup --program acoupi_batdetect2.program
  ```

  **Step 4**: Start the *acoupi_batdetect2* program.

  ```bash
  acoupi deployment start
  ```

  > [!TIP]
  > To check what are the available commands for acoupi, enter `acoupi --help`.




  _acoupi_ is an open-source Python package that simplifies the use and implementation of bioacoustic classifiers on edge devices.
  It integrates and standardises the entire bioacoustic monitoring workflow, facilitating the creation of custom sensors, by handling audio recordings, processing, classifications, detections, communication, and data management.

  > [!WARNING]
  > **Licenses and Usage**
  >
  >**_acoupi_batdetect2_ can not be used for commercial purposes.**
  >
  >  The *acoupi_batdetect2* program inherits the BatDetect2 model license, published under the [__Creative Commons Attribution-NonCommercial 4.0 International__](https://github.com/macaodha/batdetect2?tab=License-1-ov-file#readme). Please make sure to review this license to ensure your intended use complies with its terms.

  > [!WARNING]
  > **Model Output Reliabilit**
  >
  > Please note that *acoupi_batdetect2* program is not responsible for the accuracy or reliability of predictions made by the BatDetect2 model. It is essential to understand the model's performance and limitations before using it in your project.
  >
  > For more details on the BatDetect2 model architecture, as well as its precision and recall, refer to the publication [Mac Aodha O., et al., (2002) _Towards a General Approach for Bat Echolocation Detection and Classification_](https://doi.org/10.1101/2022.12.14.520490).

  > [!IMPORTANT]
  > We would love to hear your feedback about the documentation. We are always looking to hearing suggestions to improve readability and user's ease of navigation. Don't hesitate to reach out if you have comments!


pkgId: 4efbcbe9736e1390a6cebdb9da328063903fcf58dfc1efcbf1b2401bfeeb102f
name: python-acousticspy
arch: src
version: 0.6.2
epoch: 0
release: 1
summary: Lots of simple acoustics calculations, all in one place.
url: https://pypi.org/project/acousticspy/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acousticspy-0.6.2-1.src.rpm
checksum_type: sha256
description:
  This is a package that I am writing during my time as a graduate student at Brigham Young University. My research is in aeroacoustics, and most of our code is written in MATLAB. Knowing that I may not always have access to MATLAB, and because I enjoy open-source software, I've decided to create code in Python that performs many of the same tasks that we regularly perform for research. My dream is that this package can develop to the point where it could realistically be used to do all of the same research that we currently perform in MATLAB.


pkgId: 29e492b85f1fcfadf1c587cc8ec3383e9b827717d89de456c9b294ecf97c86e7
name: python-acpipe-acjson
arch: src
version: 0.1.17
epoch: 0
release: 1
url: https://gitlab.com/biotransistor/acpipe_acjson
rpm_license: GPL>=3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acpipe-acjson-0.1.17-1.src.rpm
checksum_type: sha256
summary:
  acpipe_acjson is the python3 acjson base library. acjson - assay coordinate json - is a file format developed to log complicated biological wetlab experiment layouts.

description:
  This is a python3 library to produce and process acjson objects.

  Acjson (assay coordinate java script object notation) is
  in the big picture a json syntax (http://json.org/) compatible file format,
  that was developed to capture the most essential experimental annotations
  of a biological wetlab experiment,
  how ever simple or complicated the layout may be.

  In the guts of this file format is each experimental condition described as a single coordinate.

  Each coordinate is an adaptation of the input-processing-output (IPO) model from software engineering,
  which is used to describe the structure of an information processing program.
  In the biological experiment use-case, these are represented by (SPE) sample, perturbation, and assay endpoints,
  which are represented as three axes.

  Each of this axis can hold as many sample or reagent records as needed to describe the experimental condition.

  This library can produce and process such acjson objects.




  How to install acpipe_acjson?
  ```bash
  pip3 install acpipe_acjson
  ```

  How to load the acpipe_acjson library?
  ```python
  import acpipe_acjson.acjson as ac
  ```

  Howto get reference information about the implemented constants and functions?
  ```python
  import acpipe_acjson.acjson as ac


  ac.ts_ABC
  ac.ts_ACAXIS
  ac.ts_NOTCOOR
  ac.ts_COORSYS
  ac.d_WELL
  ac.d_RECORD
  ac.d_RECORDLONG


  ac.d_SET
  ac.d_EXTERNALID
  ac.d_SAMPLE
  ac.d_MICROSCOPE
  ac.d_PRIMANTIBODY
  ac.d_SECANTIBODY


  ac.leaf
  ac.es_DATAFRAMELEAF


  ac.dii_96A1
  ac.dii_96A2
  ac.dii_96B1
  ac.dii_96B2


  help(ac.retype)
  help(ac.escoor)
  help(ac.icoormax)
  help(ac.ispotmax)
  help(ac.ispot)
  help(ac.xy2icoor)
  help(ac.acrelabel)
  help(ac.acbuild)
  help(ac.acfuseaxisrecord)
  help(ac.acfusewellrecord)
  help(ac.acfuserepeat0011)
  help(ac.acfuserepeat0101)
  help(ac.acfuseobject)
  help(ac.acfuse4to1)
  help(ac.count_record)
  help(ac.record_in_acjson)
  help(ac.list_uniq_record)
  help(ac.max_record)
  help(ac.pop_record)
  help(ac.pop_ac)
  help(ac.xray)
  help(ac.acjson2layouttsv)
  help(ac.acjson2dataframetsv)
  ```


pkgId: c06d8b0183eea206941e78d98e58739c7110f1b7de6399adfdb72552395a95ea
name: python-acquifer-napari
arch: src
version: 0.0.2
epoch: 0
release: 1
url: https://pypi.org/project/acquifer-napari/
rpm_license: GPL-3.0-only
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acquifer-napari-0.0.2-1.src.rpm
checksum_type: sha256
summary:
  Loader plugin for napari, to load Acquifer Imaging Machine datasets in napari, using dask for efficient lazy data-loading.

description:
  The acquifer-napari plugin allows loading IM04 dataset directory, as multi-dimensional images in napari.
  Sliders for well, channel, time and Z are automatically rendered when there are more than 1 coordinates along the dimension.
  The plugin uses Dask-Image for efficient data-loading "on request" similar to the VirtualStack in ImageJ.


  Via the napari plugin manager : acquifer-napari.
  Or with pip : `pip install acquifer-napari`.

  Use `pip install -e .` to install in developement mode, so any change in the source code is directly reflected.
  Use `npe2 list` to check that the plugin is correctly installed and visible by napari.
  For instance here, the package defines 1 command, which is a reader.
  One could have more commands, which would be implement other types.
  This should output something like following
  ┌──────────────────────────────┬─────────┬──────┬───────────────────────────────────────────────────────────┐
  │ Name                         │ Version │ Npe2 │ Contributions                                             │
  ├──────────────────────────────┼─────────┼──────┼───────────────────────────────────────────────────────────┤
  │ acquifer-napari              │ 0.0.1   │ ✅   │ commands (1), readers (1)

  The plugin should be installed in an environment with napari installed.
  Napari can be started with the `napari`command in a command prompt with a system wide python installation.
  Once installed, napari can be opened in a IPython interactive session with

  ```python
  >> import napari
  >> napari.Viewer()
  ```


  The file `napari.yaml` in `acquifer_napari_plugin` defines what functions of the python package are visible to napari.
  The top level `name` field must be the same than the python package name defined in `setup.cfg`.
  It first define a set of commands, which have a custom `id`, and a `python_name`, which is the actual location of the function in the python package (or module).
  Then the napari.yaml has optional subsections `readers`, `writers`, `widget`, to reference some of the commands previously defined, to notify napari that they implemente those standard functions.
  For instance I first define a command myReader pointing to myPackage.myReader, and I reference that command using the id it in the section readers
  See https://napari.org/stable/plugins/first_plugin.html#add-a-napari-yaml-manifest



  If you encounter any problems, please [file an issue](https://github.com/Luxendo/acquifer-napari/issues) along with a detailed description.


pkgId: 6f315db192f9ff1c93fc47f7010d0402167c666329307c7225485d92d36a7e19
name: python-acquire
arch: src
version: 3.16
epoch: 0
release: 1
url: https://pypi.org/project/acquire/
rpm_license: Affero General Public License v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acquire-3.16-1.src.rpm
checksum_type: sha256
summary:
  A tool to quickly gather forensic artifacts from disk images or a live system into a lightweight container

description:
  `acquire` is a tool to quickly gather forensic artifacts from disk images or a live system into a lightweight container.
  This makes `acquire` an excellent tool to, among others, speedup the process of digital forensic triage.
  It uses `dissect` to gather that information from the raw disk, if possible.

  `acquire` gathers artifacts based on modules. These modules are paths or globs on a filesystem which acquire attempts to gather.
  Multiple modules can be executed at once, which have been collected together inside a profile.
  These profiles (used with `--profile`) are  `full`, `default`, `minimal` and `none`.
  Depending on what operating system gets detected, different artifacts are collected.

  The most basic usage of `acquire` is as follows:

  ```bash
  user@dissect~$ sudo acquire
  ```

  The tool requires administrative access to read raw disk data instead of using the operating system for file access.
  However, there are some options available to use the operating system as a fallback option. (e.g `--fallback` or `--force-fallback`)

  For more information, please see [the documentation](https://docs.dissect.tools/en/latest/projects/acquire/index.html).



  This project is part of the Dissect framework and requires Python.

  Information on the supported Python versions can be found in the Getting Started section of [the documentation](https://docs.dissect.tools/en/latest/index.html#getting-started).



  `acquire` is available on [PyPI](https://pypi.org/project/acquire/).

  ```bash
  pip install acquire
  ```



  This project uses `tox` to build source and wheel distributions. Run the following command from the root folder to build
  these:

  ```bash
  tox -e build
  ```

  The build artifacts can be found in the `dist/` directory.

  `tox` is also used to run linting and unit tests in a self-contained environment. To run both linting and unit tests
  using the default installed Python version, run:

  ```bash
  tox
  ```

  For a more elaborate explanation on how to build and test the project, please see [the
  documentation](https://docs.dissect.tools/en/latest/contributing/tooling.html).



  The Dissect project encourages any contribution to the codebase. To make your contribution fit into the project, please
  refer to [the development guide](https://docs.dissect.tools/en/latest/contributing/developing.html).



  Dissect is released as open source by Fox-IT (<https://www.fox-it.com>) part of NCC Group Plc
  (<https://www.nccgroup.com>).

  Developed by the Dissect Team (<dissect@fox-it.com>) and made available at <https://github.com/fox-it/acquire>.

  License terms: AGPL3 (<https://www.gnu.org/licenses/agpl-3.0.html>). For more information, see the LICENSE file.


pkgId: 1796f2fd551feac65a4a21d2de70db8931eb7d8ebc03872b0bd34d36b67d2032
name: python-acr-cloud
arch: src
version: 0.1.11
epoch: 0
release: 1
summary: acrcloud music recognition wrapper
url: https://www.example.org/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acr-cloud-0.1.11-1.src.rpm
checksum_type: sha256
description:
  Eel is a little Python library for making simple Electron-like offline HTML/JS GUI apps, with full access to Python capabilities and libraries.

  > **Eel hosts a local webserver, then lets you annotate functions in Python so that they can be called from Javascript, and vice versa.**

  Eel is designed to take the hassle out of writing short and simple GUI applications. If you are familiar with Python and web development, probably just jump to [this example](https://github.com/ChrisKnott/Eel/tree/master/examples/04%20-%20file_access) which picks random file names out of the given folder (something that is impossible from a browser).

  <p align="center"><img src="https://raw.githubusercontent.com/samuelhwilliams/Eel/master/examples/04%20-%20file_access/Screenshot.png" ></p>

  <!-- TOC -->

  - [Eel](#eel)
    - [Intro](#intro)
    - [Install](#install)
    - [Usage](#usage)
      - [Directory Structure](#directory-structure)
      - [Starting the app](#starting-the-app)
      - [App options](#app-options)
        - [Chrome/Chromium flags](#chromechromium-flags)
      - [Exposing functions](#exposing-functions)
      - [Eello, World!](#eello-world)
      - [Return values](#return-values)
        - [Callbacks](#callbacks)
        - [Synchronous returns](#synchronous-returns)
    - [Asynchronous Python](#asynchronous-python)
    - [Building distributable binary with PyInstaller](#building-distributable-binary-with-pyinstaller)
    - [Microsoft Edge](#microsoft-edge)

  <!-- /TOC -->



  There are several options for making GUI apps in Python, but if you want to use HTML/JS (in order to use jQueryUI or Bootstrap, for example) then you generally have to write a lot of boilerplate code to communicate from the Client (Javascript) side to the Server (Python) side.

  The closest Python equivalent to Electron (to my knowledge) is [cefpython](https://github.com/cztomczak/cefpython). It is a bit heavy weight for what I wanted.

  Eel is not as fully-fledged as Electron or cefpython - it is probably not suitable for making full blown applications like Atom - but it is very suitable for making the GUI equivalent of little utility scripts that you use internally in your team.

  For some reason many of the best-in-class number crunching and maths libraries are in Python (Tensorflow, Numpy, Scipy etc) but many of the best visualization libraries are in Javascript (D3, THREE.js etc). Hopefully Eel makes it easy to combine these into simple utility apps for assisting your development.



  Install from pypi with `pip`:

  ```shell
  pip install eel
  ```





  An Eel application will be split into a frontend consisting of various web-technology files (.html, .js, .css) and a backend consisting of various Python scripts.

  All the frontend files should be put in a single directory (they can be further divided into folders inside this if necessary).

  ```
  my_python_script.py     <-- Python scripts
  other_python_module.py
  static_web_folder/      <-- Web folder
    main_page.html
    css/
      style.css
    img/
      logo.png
  ```



  Suppose you put all the frontend files in a directory called `web`, including your start page `main.html`, then the app is started like this;

  ```python
  import eel
  eel.init('web')
  eel.start('main.html')
  ```

  This will start a webserver on the default settings (http://localhost:8000) and open a browser to http://localhost:8000/main.html.

  If Chrome or Chromium is installed then by default it will open in that in App Mode (with the `--app` cmdline flag), regardless of what the OS's default browser is set to (it is possible to override this behaviour).



  Additional options can be passed to `eel.start()` as keyword arguments.

  Some of the options include the mode the app is in (e.g. 'chrome'), the port the app runs on, the host name of the app, and adding additional command line flags.

  As of Eel v0.11.0, the following options are available to `start()`:
   - **mode**, a string specifying what browser to use (e.g. `'chrome'`, `'electron'`, `'edge'`, `'custom'`). Can also be `None` or `False` to not open a window. *Default: `'chrome'`*
   - **host**, a string specifying what hostname to use for the Bottle server. *Default: `'localhost'`)*
   - **port**, an int specifying what port to use for the Bottle server. Use `0` for port to be picked automatically. *Default: `8000`*.
   - **block**, a bool saying whether or not the call to `start()` should block the calling thread. *Default: `True`*
   - **jinja_templates**, a string specifying a folder to use for Jinja2 templates, e.g. `my_templates`. *Default:  `None`*
   - **cmdline_args**, a list of strings to pass to the command to start the browser. For example, we might add extra flags for Chrome; ```eel.start('main.html', mode='chrome-app', port=8080, cmdline_args=['--start-fullscreen', '--browser-startup-dialog'])```. *Default: `[]`*
   - **size**, a tuple of ints specifying the (width, height) of the main window in pixels *Default: `None`*
   - **position**, a tuple of ints specifying the (left, top) of the main window in pixels *Default: `None`*
   - **geometry**, a dictionary specifying the size and position for all windows. The keys should be the relative path of the page, and the values should be a dictionary of the form `{'size': (200, 100), 'position': (300, 50)}`. *Default: {}*
   - **close_callback**, a lambda or function that is called when a websocket to a window closes (i.e. when the user closes the window). It should take two arguments; a string which is the relative path of the page that just closed, and a list of other websockets that are still open. *Default: `None`*
   - **app**, an instance of Bottle which will be used rather than creating a fresh one. This can be used to install middleware on the
   instance before starting eel, e.g. for session management, authentication, etc.





  In addition to the files in the frontend folder, a Javascript library will be served at `/eel.js`. You should include this in any pages:

  ```html
  <script type="text/javascript" src="/eel.js"></script>
  ```

  Including this library creates an `eel` object which can be used to communicate with the Python side.

  Any functions in the Python code which are decorated with `@eel.expose` like this...

  ```python
  @eel.expose
  def my_python_function(a, b):
      print(a, b, a + b)
  ```

  ...will appear as methods on the `eel` object on the Javascript side, like this...

  ```javascript
  console.log("Calling Python...");
  eel.my_python_function(1, 2); // This calls the Python function that was decorated
  ```

  Similarly, any Javascript functions which are exposed like this...

  ```javascript
  eel.expose(my_javascript_function);
  function my_javascript_function(a, b, c, d) {
    if (a < b) {
      console.log(c * d);
    }
  }
  ```

  can be called from the Python side like this...

  ```python
  print('Calling Javascript...')
  eel.my_javascript_function(1, 2, 3, 4)  # This calls the Javascript function
  ```

  When passing complex objects as arguments, bear in mind that internally they are converted to JSON and sent down a websocket (a process that potentially loses information).



  > See full example in: [examples/01 - hello_world](https://github.com/ChrisKnott/Eel/tree/master/examples/01%20-%20hello_world)

  Putting this together into a **Hello, World!** example, we have a short HTML page, `web/hello.html`:

  ```html
  <!DOCTYPE html>
  <html>
    <head>
      <title>Hello, World!</title>

      <!-- Include eel.js - note this file doesn't exist in the 'web' directory -->
      <script type="text/javascript" src="/eel.js"></script>
      <script type="text/javascript">
        eel.expose(say_hello_js); // Expose this function to Python
        function say_hello_js(x) {
          console.log("Hello from " + x);
        }

        say_hello_js("Javascript World!");
        eel.say_hello_py("Javascript World!"); // Call a Python function
      </script>
    </head>

    <body>
      Hello, World!
    </body>
  </html>
  ```

  and a short Python script `hello.py`:

  ```python
  import eel



  eel.init('web', allowed_extensions=['.js', '.html'])

  @eel.expose                         # Expose this function to Javascript
  def say_hello_py(x):
      print('Hello from %s' % x)

  say_hello_py('Python World!')
  eel.say_hello_js('Python World!')   # Call a Javascript function

  eel.start('hello.html')             # Start (this blocks and enters loop)
  ```

  If we run the Python script (`python hello.py`), then a browser window will open displaying `hello.html`, and we will see...

  ```
  Hello from Python World!
  Hello from Javascript World!
  ```

  ...in the terminal, and...

  ```
  Hello from Javascript World!
  Hello from Python World!
  ```

  ...in the browser console (press F12 to open).

  You will notice that in the Python code, the Javascript function is called before the browser window is even started - any early calls like this are queued up and then sent once the websocket has been established.



  While we want to think of our code as comprising a single application, the Python interpreter and the browser window run in separate processes. This can make communicating back and forth between them a bit of a mess, especially if we always had to explicitly _send_ values from one side to the other.

  Eel supports two ways of retrieving _return values_ from the other side of the app, which helps keep the code concise.



  When you call an exposed function, you can immediately pass a callback function afterwards. This callback will automatically be called asynchrounously with the return value when the function has finished executing on the other side.

  For example, if we have the following function defined and exposed in Javascript:

  ```javascript
  eel.expose(js_random);
  function js_random() {
    return Math.random();
  }
  ```

  Then in Python we can retrieve random values from the Javascript side like so:

  ```python
  def print_num(n):
      print('Got this from Javascript:', n)


  eel.js_random()(print_num)


  eel.js_random()(lambda n: print('Got this from Javascript:', n))
  ```

  (It works exactly the same the other way around).



  In most situations, the calls to the other side are to quickly retrieve some piece of data, such as the state of a widget or contents of an input field. In these cases it is more convenient to just synchronously wait a few milliseconds then continue with your code, rather than breaking the whole thing up into callbacks.

  To synchronously retrieve the return value, simply pass nothing to the second set of brackets. So in Python we would write:

  ```python
  n = eel.js_random()()  # This immediately returns the value
  print('Got this from Javascript:', n)
  ```

  You can only perform synchronous returns after the browser window has started (after calling `eel.start()`), otherwise obviously the call with hang.

  In Javascript, the language doesn't allow us to block while we wait for a callback, except by using `await` from inside an `async` function. So the equivalent code from the Javascript side would be:

  ```javascript
  async function run() {
    // Inside a function marked 'async' we can use the 'await' keyword.

    let n = await eel.py_random()(); // Must prefix call with 'await', otherwise it's the same syntax
    console.log("Got this from Python: " + n);
  }

  run();
  ```



  Eel is built on Bottle and Gevent, which provide an asynchronous event loop similar to Javascript. A lot of Python's standard library implicitly assumes there is a single execution thread - to deal with this, Gevent can "[monkey patch](https://en.wikipedia.org/wiki/Monkey_patch)" many of the standard modules such as `time`. ~~This monkey patching is done automatically when you call `import eel`~~. If you need monkey patching you should `import gevent.monkey` and call `gevent.monkey.patch_all()` _before_ you `import eel`. Monkey patching can interfere with things like debuggers so should be avoided unless necessary.

  For most cases you should be fine by avoiding using `time.sleep()` and instead using the versions provided by `gevent`. For convenience, the two most commonly needed gevent methods, `sleep()` and `spawn()` are provided directly from Eel (to save importing `time` and/or `gevent` as well).

  In this example...

  ```python
  import eel
  eel.init('web')

  def my_other_thread():
      while True:
          print("I'm a thread")
          eel.sleep(1.0)                  # Use eel.sleep(), not time.sleep()

  eel.spawn(my_other_thread)

  eel.start('main.html', block=False)     # Don't block on this call

  while True:
      print("I'm a main loop")
      eel.sleep(1.0)                      # Use eel.sleep(), not time.sleep()
  ```

  ...we would then have three "threads" (greenlets) running;

  1. Eel's internal thread for serving the web folder
  2. The `my_other_thread` method, repeatedly printing **"I'm a thread"**
  3. The main Python thread, which would be stuck in the final `while` loop, repeatedly printing **"I'm a main loop"**



  If you want to package your app into a program that can be run on a computer without a Python interpreter installed, you should use **PyInstaller**.

  1. Configure a virtualenv with desired Python version and minimum necessary Python packages
  2. Install PyInstaller `pip install PyInstaller`
  3. In your app's folder, run `python -m eel [your_main_script] [your_web_folder]` (for example, you might run `python -m eel hello.py web`)
  4. This will create a new folder `dist/`
  5. Valid PyInstaller flags can be passed through, such as excluding modules with the flag: `--exclude module_name`. For example, you might run `python -m eel file_access.py web --exclude win32com --exclude numpy --exclude cryptography`
  6. When happy that your app is working correctly, add `--onefile --noconsole` flags to build a single executable file

  Consult the [documentation for PyInstaller](http://PyInstaller.readthedocs.io/en/stable/) for more options.



  For Windows 10 users, Microsoft Edge (`eel.start(.., mode='edge')`) is installed by default and a useful fallback if a preferred browser is not installed. See the examples:

  - A Hello World example using Microsoft Edge: [examples/01 - hello_world-Edge/](https://github.com/ChrisKnott/Eel/tree/master/examples/01%20-%20hello_world-Edge)
  - Example implementing browser-fallbacks: [examples/07 - CreateReactApp/eel_CRA.py](https://github.com/ChrisKnott/Eel/tree/master/examples/07%20-%20CreateReactApp/eel_CRA.py)


pkgId: 500066a7e0bf8d64fae44841fe1a05989e6681c2a48f7a78688987287ade8aed
name: python-acr122u-websocket
arch: src
version: 1.1.4
epoch: 0
release: 1
summary: A webserver that connects to a acr122u and exposes it over websocket
url: https://github.com/robertdijk/acr122u-websocket
rpm_license: GNU General Public License v3 (GPLv3)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acr122u-websocket-1.1.4-1.src.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
  [![PyPI - License](https://img.shields.io/pypi/l/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
  [![PyPI - Wheel](https://img.shields.io/pypi/wheel/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)

  This project enables you to connect an usb ACR122U NFC card scanner to a computer and access it using Socket.IO.



  - Read UUID from nfc cards and send them over Socket.IO.
  - Websocket messages to start and stop the polling for cards.
  - Websocket messages to give a confirmation or error beep and light signal.
  - Automatically reconnect to the reader when interrupted.



  You can install this package from [PyPI](https://pypi.org/project/acr122u-websocket/).

  ```shell
  pip install acr122u-websocket
  ```



  1. Connect the ACR122U reader to the computer
  2. Run the app
      ```shell
      python -m acr122u_websocket.app
      ```



  You can connect to the webserver using [Socket.IO](https://socket.io).
  These are the available events:

  <details>
  <summary><h3><code>polling</code></h3></summary>

  Start or stop the polling.



  - `start` to start the polling.
  - `stop` to stop the polling.



  - `no card reader connected` if no card reader is connected.
  - `polling started` if the polling has (already) started.
  - `polling stopped` if the polling has (already) stopped.
  - `invalid message` if the message is neither `start` nor `stop`.

  </details>

  <details>
  <summary><h3><code>status indicator</code></h3></summary>

  Set the status indicator.



  - `confim` to play the confirming status.
  - `error` to play the error status.



  - `no card reader connected` if no card reader is connected
  - `confirm status set` if the confirm beep and light have been show
  - `error status set` if the error beep and light have been show
  - `invalid message` if the message is neither `confirm` nor `error`

  </details>

  <details>
  <summary><h3><code>card scanned</code></h3></summary>

  Broadcasts when a card has been scanned



  - `{"uuid": [..]}` - An object containing the uuid in the form of a list of integers.

  </details>



  See an example webpage at [test.html](acr122u_websocket/templates/test.html).

  This page is also served on [`http://localhost:8080/test`](http://localhost:8080/test).


pkgId: eb16dc6f43e85ecfcbdc339b214d9b13cdcefbe050997694a018084416c4f542
name: python-acrclient
arch: src
version: 0.4.6
epoch: 0
release: 1
summary: API wrapper for the v2 ACRCloud API
url: https://pypi.org/project/acrclient/
rpm_license: AGPL-v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acrclient-0.4.6-1.src.rpm
checksum_type: sha256
description:
  Contains a simple client for calling the v2 endpoints of the [ACRCloud](https://www.acrcloud.com) API.



  ```bash
  poetry add acrclient


  pip -m install acrclient
  ```



  ```python
  >>> from acrclient import Client
  >>> client = Client(bearer_token="bearer-token")

  ```



  ```bash

  python -mvenv env
  . env/bin/activate


  python -mpip install poetry>=1.2.0


  poetry install


  poetry run pytest
  ```



  The CI/CD setup uses semantic commit messages following the [conventional commits standard](https://www.conventionalcommits.org/en/v1.0.0/).
  There is a GitHub Action in [.github/workflows/semantic-release.yaml](./.github/workflows/semantic-release.yaml)
  that uses [go-semantic-commit](https://go-semantic-release.xyz/) to create new
  releases.

  The commit message should be structured as follows:

  ```
  <type>[optional scope]: <description>

  [optional body]

  [optional footer(s)]
  ```

  The commit contains the following structural elements, to communicate intent to the consumers of your library:

  1. **fix:** a commit of the type `fix` patches gets released with a PATCH version bump
  1. **feat:** a commit of the type `feat` gets released as a MINOR version bump
  1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:` gets released as a MAJOR version bump
  1. types other than `fix:` and `feat:` are allowed and don't trigger a release

  If a commit does not contain a conventional commit style message you can fix
  it during the squash and merge operation on the PR.

  Once a commit has landed on the `main` branch a release will be created and automatically published to [pypi](https://pypi.org/)
  using the GitHub Action in [.github/workflows/release.yaml](./.github/workflows/release.yaml) which uses [poetry](https://python-poetry.org/)
  to publish the package to pypi.



  This package is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.



  Copyright (c) 2023 [Radio Bern RaBe](http://www.rabe.ch)


pkgId: 5016334d062def16eff5afd9d415fc191a4307f2fe08ad41463bab3680a3a681
name: python-acres
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Access resources on your terms
url: https://pypi.org/project/acres/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acres-0.1.0-1.src.rpm
checksum_type: sha256
description:
  This module aims to provide a simple way to access package resources that will
  fit most use cases.

  The problem: `importlib.resources` provides a composable but ugly interface:

  ```python
  from importlib.resources import files, as_file

  with as_file(files(my_module) / 'data' / 'resource.ext') as resource_path:
      
  ```

  The `files()` and `as_file()` functions do not make the meanings obvious,
  and the different use cases do not obviously map on to these names.

  The solution: `acres.Loader` is a class that provides read, filesystem
  and cached filesystem access to package resources.



  Suppose you have a module structure:

  ```
  src/
    mypkg/
      data/
        resourceDir/
          ...
        __init__.py
        resource.ext
      __init__.py
      ...
  ```

  In `src/mypkg/data/__init__.py`, add:

  ```python
  '''Data package

  .. autofunction:: load_resource

  .. automethod:: load_resource.readable

  .. automethod:: load_resource.as_path

  .. automethod:: load_resource.cached
  '''

  from acres import Loader

  load_resource = Loader(__package__)
  ```

  `mypkg.data.load_resource` is now a function that will return a `Path` to a
  resource that is guaranteed to exist until interpreter exit:

  ```
  from mypkg.data import load_resource

  resource_file: Path = load_resource('resource.ext')
  ```

  For additional control, you can use `load_resource.readable()` to return a `Path`-like
  object that implements `.read_text()` and `.read_bytes()`:

  ```python
  resource_contents: bytes = load_resource.readable('resource.ext').read_bytes()
  ```

  Or a context manager with a limited lifetime:

  ```python
  with load_resource.as_path('resourceDir') as resource_dir:
      


  ```

  Note that `load_resource()` is a shorthand for `load_resource.cached()`,
  whose explicitness might be more to your taste.



  `acres` may be used as a library to work with any package:

  ```python
  from acres import Loader
  import somepkg

  text: str = Loader(somepkg).readable('data/someresource.txt').read_text()

  with Loader(somepkg).as_path('data') as somepkgdata:
      walk_dir(somepkgdata)
  ```

  If `Loader().cached()` is used, the resources will remain available until the
  interpreter exists, even if the `Loader` instance is garbage collected.


pkgId: 94e5b5043d04bf87f54c808cec4f64d347077005b1c6289bd6bd629b32a59c84
name: python-acro
arch: src
version: 0.4.7
epoch: 0
release: 1
summary: ACRO: Tools for the Automatic Checking of Research Outputs
url: https://github.com/AI-SDC/ACRO
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acro-0.4.7-1.src.rpm
checksum_type: sha256
description:
  [![DOI](https://zenodo.org/badge/534172863.svg)](https://zenodo.org/badge/latestdoi/534172863)
  [![PyPI package](https://img.shields.io/pypi/v/acro.svg)](https://pypi.org/project/acro)
  [![Python versions](https://img.shields.io/pypi/pyversions/acro.svg)](https://pypi.org/project/acro)
  [![Codacy](https://app.codacy.com/project/badge/Grade/a125e023fd7744d79cb42cd31f6ea05e)](https://app.codacy.com/gh/AI-SDC/ACRO/dashboard)
  [![codecov](https://codecov.io/gh/AI-SDC/ACRO/branch/main/graph/badge.svg?token=VVHI41N05F)](https://codecov.io/gh/AI-SDC/ACRO)

  This repository holds the Python ACRO package. An R wrapper package is available: [ACRO-R](https://github.com/AI-SDC/ACRO-R).

  A GUI for viewing and approving outputs is also available: [SACRO-Viewer](https://github.com/AI-SDC/SACRO-Viewer)

  ACRO (Automatic Checking of Research Outputs) is an open source tool for automating the [statistical disclosure control](https://en.wikipedia.org/wiki/Statistical_disclosure_control) (SDC) of research outputs. ACRO assists researchers and output checkers by distinguishing between research output that is safe to publish, output that requires further analysis, and output that cannot be published because of a substantial risk of disclosing private data.

  It does this by providing a lightweight 'skin' that sits over well-known analysis tools, in a variety of languages researchers might use. This adds functionality to:

  *   identify potentially disclosive outputs against a range of commonly used disclosure tests;
  *   suppress outputs where required;
  *   report reasons for suppression;
  *   produce simple summary documents TRE staff can use to streamline their workflow.

  ![ACRO workflow and architecture schematic](docs/schematic.png)



  ACRO can be installed via [PyPI](https://pypi.org/project/acro/).

  If installed in this way, the example [notebooks](notebooks) and the [data](data) files used therein will need to be copied from the repository.

  ```
  $ pip install acro
  ```



  ACRO currently depends on numpy version 1.x.x for which no pre-compiled wheels are available within pip for Python 3.13. Therefore, in this scenario, numpy must be built from source. This requires the installation of a C++ compiler before pip installing acro.

  For Windows, the [Microsoft Visual Studio C++ build tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) will likely need to be installed first.



  See the example notebooks for:

  * [Python charities dataset](notebooks/test.ipynb)
  * [Python nursery dataset](notebooks/test-nursery.ipynb)
  * [R charities dataset](https://ai-sdc.github.io/ACRO/_static/test.nb.html)
  * [R nursery dataset](https://ai-sdc.github.io/ACRO/_static/test-nursery.nb.html)



  The github-pages contains pre-built [documentation](https://ai-sdc.github.io/ACRO/).



  For training videos about ACRO, see [training videos](https://drive.google.com/drive/folders/1z5zKuZdiNth0c7CLBt3vDEyhGwSIocw_).



  See [CONTRIBUTING.md](CONTRIBUTING.md)



  This work was funded by UK Research and Innovation under Grant Number MC_PC_23006 as part of Phase 1 of the [DARE UK](https://dareuk.org.uk) (Data and Analytics Research Environments UK) programme, delivered in partnership with Health Data Research UK (HDR UK) and Administrative Data Research UK (ADR UK). The specific project was Semi-Automatic Checking of Research Outputs (SACRO).

  <img src="docs/source/images/UK_Research_and_Innovation_logo.svg" width="20%" height="20%" padding=20/> <img src="docs/source/images/health-data-research-uk-hdr-uk-logo-vector.png" width="10%" height="10%" padding=20/> <img src="docs/source/images/logo_print.png" width="15%" height="15%" padding=20/>


pkgId: 5c54240e045ce3d7454dd07085fbd57c7860c8e554db45259c2f57b948f4fe23
name: python-acrod
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Automatic Computation for Robot Design (ACRoD)
url: https://github.com/suneeshjacob/ACRoD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acrod-1.2.0-1.src.rpm
checksum_type: sha256
description:
  This repository is dedicated to develop functions for automatic computations for designing robotic manipulators.



  - Jacobian formulation for planar and spatial manipulators around a given end-effector point. (This is useful in performing optimisation of Jacobian-based performance parameters of any non-redundant robot directly from its robot-topology matrix)
    - **Statement of need:** Jacobian formulation is highly used in dimensional synthesis of robotic manipulators, which deals with optimal design of robot's dimensional parameters (link-lengths and joint-orientations). For a given topological structure, formulating Jacobian around a given end-effector point for designing optimal dimensional parameters would require only the topological information, as every other step can be automated. Formulating Jacobian for serial manipulators is easy but for parallel manipulators and serial-parallel hybrid manipulators it is more complicated and often tedious. ACRoD automates this task of formulating Jacobian for a given end-effector point by running all the required steps in the background. The targetted audience includes researchers and engineers working on performing dimensional synthesis of manipulators (especially for multiple manipultors in bulk for comparison) to compute optimal dimensions for operation around a single end-effector point, and those needing to verify the DOF of a topological structure (especially for those special cases of kinematic mechanisms where Chebychev–Grübler–Kutzbach criterion fails to accurately determine the DOF) by analysing the Jacobian. Even though this does not include scripts for implementing optimisation or computing performance metrics for dimensional synthesis or for computing the validity of DOF, it does include scripts for computation of Jacobian which is an essential part for these analyses.



  The package can be installed from PyPI by using the following command via terminal.
  ```shell
  pip install acrod
  ```







  <p align="center">
      <img src="./misc/2R.png" alt="2R planar serial robot" width="400px">
  </p>

  The topological information of a robot is to be specified by using its robot-topology matrix, as defined [here](./misc/Robot_Topology_Matrix.md). For a planar 2R serial manipulator (as shown in the above figure), the robot topology matrix is given by

  $$\left[\begin{matrix}
  9 & 1 & 0 \\\\
  1 & 9 & 1 \\\\
  0 & 1 & 9
  \end{matrix}\right]$$

  The corresponding Jacobian function can be formulated as follows.

  Firstly, the required functions are imported as shown below.
  ```py
  from acrod.jacobian import Jacobian
  from numpy import array
  ```


  The robot-topology matrix for 3R planar serial manipulator is defined and jacobian information is processed via the imported jacobian class as follows.
  ```py
  M = array(
          [[9, 1, 0],
           [1, 9, 1],
           [0, 1, 9]]
      )
  jac = Jacobian(M, robot_type = 'planar')
  ```


  Jacobian function is generated as shown below.
  ```py
  jacobian_function = jac.get_jacobian_function()
  ```


  In the process of generating the above jacobian function, other attributes of the jacobian object also are updated. Symbolic Jacobian matrices can be extracted from the attributes. Since this is a serial robot, the matrix $J_a$ itself would be the Jacobian matrix of the manipulator. The matrix $J_a$ is extracted from `Ja` attribute of the jacobian object as follows.
  ```py
  symbolic_jacobian = jac.Ja
  symbolic_jacobian
  ```

  In an ipynb file of JupyterLab, the above code would produce the following output.

  $$\left[\begin{matrix}- a\_{y} + r\_{(1,2)y} & - a\_{y} + r\_{(2,3)y} \\\\ a\_{x} - r\_{(1,2)x} & a\_{x} - r\_{(2,3)x} \\\\ 1 & 1\end{matrix}\right]$$

  The above Jacobian is based on the notations defined and described [here](./misc/Notation_and_Nomenclature.md).

  Active joint velocities, in the corresponding order, can be viewed by running the following lines.
  ```py
  active_joint_velocities = jac.active_joint_velocities_symbolic
  active_joint_velocities
  ```

  In an ipynb file of JupyterLab, the above code would produce the following output.

  $$\left[\begin{matrix}\dot{\theta}\_{(1,2)} \\\\ \dot{\theta}\_{(2,3)}\end{matrix}\right]$$

  Robot dimensional parameters can be viewed by running the below line.
  ```py
  robot_dimensional_parameters = jac.parameters_symbolic
  robot_dimensional_parameters
  ```

  In an ipynb file of JupyterLab, the above code would produce the following output.

  $$\left[\begin{matrix}r_{(1,2)x} \\\\ r_{(1,2)y} \\\\ r_{(2,3)x} \\\\ r_{(2,3)y}\end{matrix}\right]$$


  Robot end-effector parameters can be viewed by running the below line.
  ```py
  robot_endeffector_parameters = jac.endeffector_variables_symbolic
  robot_endeffector_parameters
  ```

  In an ipynb file of JupyterLab, the above code would produce the following output.

  $$\left[\begin{matrix}a_{x} \\\\ a_{y}\end{matrix}\right]$$



  - End-effector point: $\textbf{a}=\hat{i}+2\hat{j}$
  - Locations of joints: $\textbf{r}\_{(1,2)}=3\hat{i}+4\hat{j}$ and $\textbf{r}\_{(2,3)}=5\hat{i}+6\hat{j}$

  For the given set of dimensional parameters of the robot, the numerical Jacobian can be computed as follows. Firstly, we need to gather the configuration parameters in Python list format, in a particular order. The robot dimensional parameters from `jac.parameters_symbolic` are found (as shown earlier) to be in the order of $r_{(1,2)x}$, $r_{(1,2)y}$, $r_{(2,3)x}$ and $r_{(2,3)y}$. Hence the configuration parameters are to be supplied in the same order, as a list. Thus, the computation can be performed as shown below.
  ```py
  end_effector_point = [1,2]
  configuration_parameters = [3,4,5,6]
  jacobian_at_the_given_configuration = jacobian_function(end_effector_point, configuration_parameters)
  jacobian_at_the_given_configuration
  ```

  The output produced by running the above code, is shown below.
  ```py
  array([[ 2,  4],
         [-2, -4],
         [ 1,  1]])
  ```

  Mathematical concepts behind formulating the Jacobian can be found [here](./misc/Mathematics_behind_Jacobian_formulation.md).



  For dimensional synthesis, at least a performance parameter is required. One commonly used performance parameter in dimensional synthesis is the condition number. From the above Jacobian function, the condition number can be found by computing the ratio of maximum singular value and minimum singular value. This condition number has the bounds $(1,\infty)$. When the condition number is 1, that signifies the best performance in the context of condition number. The computation of condition number from a given Jacobian can be achieved by the code shown below:

  ```py
  from numpy.linalg import svd

  def condition_number_func(jacobian_matrix):
      _, singular_values, _ = svd(jacobian_matrix)
      condition_number =  singular_values.max()/singular_values.min()
      return condition_number
  ```

  For reference if we take the joint at the fixed link to be at the origin, the dimensional synthesis for optimal performance around the end-effector point $\textbf{a}=\hat{i}+2\hat{j}$ can be performed by the code shown below:

  ```py
  from scipy.optimize import minimize
  from numpy import hstack, ones

  end_effector_point = [1,2]
  base_reference_point = [0,0]
  r12 = base_reference_point
  jac_fun = lambda y: jacobian_function(end_effector_point, hstack((base_reference_point,y)))
  condition_number = lambda z: condition_number_func(jac_fun(z))
  initial_guess = ones(len(jac.parameters)-len(base_reference_point))
  res = minimize(condition_number, initial_guess)
  r23 = res.x
  ```

  The link lengths $l_2$ and $l_3$ are given by $l_2 = \lVert \textbf{r}\_{12}-\textbf{r}\_{23} \rVert$ and $l_3 = \lVert\textbf{r}\_{23}-\textbf{a}\rVert$. By using the code below, the link lengths of 2R robot can be computed.

  ```py
  from numpy.linalg import norm

  l2 = norm(r23-r12)
  l3 = norm(r23-end_effector_point)
  print(l2,l3,res.fun)
  ```
  Output:
  ```py
  3.4641016153289317 2.236067976155377 1.0000000007904777
  ```
  The above output shows that for $l_2=3.464$ and $l_3=2.236$, the robot has the condition number approximately equal to $1.0$, which signifies optimal performance.



  Some examples (along with their mathematical derivations) can be found [here](./examples/Jacobian).



  For full documentation, visit the documentation page [here](https://acrod.readthedocs.io/en/latest/).



  - For contribution to the software:
    - In order to contribute to the software, please consider using the [pull request feature](https://github.com/suneeshjacob/ACRoD/pulls) of GitHub.
  - For reporting issues with the software:
    - For reporting issues or problems, please use [issues](https://github.com/suneeshjacob/ACRoD/issues).
  - For support:
    - For any further support (including installation, usage, etc.), feel free to contact via suneeshjacob-at-gmail-dot-com.

rpm_license:
[cell repeats an earlier one in this file: 34486 characters]


pkgId: 1ea08393ebd3dfbe8e79a5488c668e37777928360995265f5c5ffa5d3b14583a
name: python-acrome
arch: src
version: 0.3.2
epoch: 0
release: 1
summary: Hardware abstraction library for Acrome Robotics products
url: https://github.com/acrome-robotics/python-library
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acrome-0.3.2-1.src.rpm
checksum_type: sha256
description:
  This library provides easy-to-use Python modules for interacting with Acrome Robotics products.





  This module provides a hardware abstraction layer between Acrome Controller board and application code and enables users to develop their own applications without hassle of implementing a communication protocol or struggling with any timing requirements. This module also provides safety limitations for Acrome Robotics products and users don't have to worry about any mechanical or electrical limit of the products while working on their application code.

  The controller module provides 6 different classes  for interacting with 5 different products and the Acrome Controller board itself.

  - ## Controller Class

      This class provides an interface with the Acrome Controller board. For basic communication checks and configuration via 4 different methods.

      * #### `__init__(self, portname="/dev/serial0", baudrate=115200)`

          **`Return:`** *None*

          This is the constructor of the Controller class.

          `portname` argument is the serial/COM port of the host computer which is connected to the Acrome Controller board. Since the board is designed with Raspberry Pi in mind, default portname is `/dev/serial0` to provide out of the box support for Raspberry Pi.

          `baudrate` argument must not be changed by the user since different baudrates are not supported by the hardware, yet.

      * #### `ping(self)`

          **`Return:`** *boolean*

          This method provides a basic ping functionality between the board and the host computer as the name suggests. If the communication succeeded method returns true, otherwise false.
      * #### `reboot(self)`

          **`Return:`** *None*

          This method immediately reboots the Acrome Controller board when called.

      * #### `enter_bootloader(self)`

          **`Return:`** *None*

          When this method called, the Acrome Controller board boots into the embedded bootloader to provide a firmware update. When bootloader activated, the board does not respond to any other command rather than specific instruction for bootloader operation.
      * #### `get_latest_version(self)`

          **`Return:`** *string / None*

          This method returns the latest firmware version available as a string with a 'v' suffix. (Example: v0.1.0)

      * #### `fetch_fw_binary(self, version='')`

          **`Return:`** *boolean*

          This method fetches the given firmware version from related repository. When version argument is not given by the user, fetches the latest version available. User must provide version information as a string and with a suffix 'v'. Returns True on success.

      * #### `update_fw_binary(self, baudrate=115200)`

          **`Return:`** *None*

          This method initiates the firmware download procedure. This procedure must not be interrupted since it may brick the hardware. Baudrate argument can be selected between 1200 and 115200. Update procedure with low baudrates may take some time. Serial port in use on the host computer must support EVEN parity to work properly. When used with a Raspberry Pi, ttyAMA0 should be used as the serial port since ttyS0 does not support parity bits.

      * #### `get_board_info(self)`

          **`Return:`** *dict*

          This method returns a dictionary that contains information about the underlaying hardware configuration and status. Since gathering that information interrupts the any other operation at the hardware, calling it in any control loop might affect the system performance and should be avoided.


  - ## OneDOF Class

      This class provides an interface with the OneDOF via Acrome Controller.

      * #### `__init__(self, portname="/dev/serial0", baudrate=115200)`

          **`Return:`** *None*

          This is the constructor of the OneDOF class. Please refer to the Controller class constructor for argument descriptions.

      * #### `set_speed(self, speed)`

          **`Return:`** *None*

          This method provides an interface to set speed of the OneDOF motor. Available range is from -1000 to 1000.

      * #### `enable(self)`
          **`Return:`** *None*

          This method enables the power stage of the OneDOF motor and should be called prior to setting speed.

      * #### `reset_encoder_mt(self)`
          **`Return:`** *None*

          This method resets the encoder of the DC motor on the OneDOF.

      * #### `reset_encoder_shaft(self)`
          **`Return:`** *None*

          This method resets the encoder on the shaft of OneDOF.

      * #### `update(self)`
          **`Return:`** *None*

          This method syncronizes the variables both on host computer and hardware side. Should be called prior to read of any attribute or called after any write/set operation to make latest values available immediately.

      * #### `motor_enc`

          This attribute returns the current value of encoder on the DC motor.

          > **Note:** This attribute might be always 0 according to your product configuration.

      * #### `shaft_enc`

          This attribute returns the current value of encoder on the OneDOF shaft.

      * #### `imu`

          This attribute returns the current roll, pitch and yaw values in degrees in a form of Python list.

          > **Note:** This attribute is only available on the products that shipped with an BNO055 Absolute Orientation Sensor. Products with MPU6050 IMU is not supported yet and will return 0.

  - ## BallBeam Class

      This class provides an interface with Ball and Beam via Acrome Controller.

      * #### `__init__(self, portname="/dev/serial0", baudrate=115200)`

          **`Return:`** *None*

          This is the constructor of the BallBeam class. Please refer to the Controller class constructor for argument descriptions.
      * #### `set_servo(self, servo)`

          **`Return:`** *None*

          This method provides an interface to set angle of the servo motor on Ball and Beam. Available range is from -1000 to 1000.

      * #### `update(self)`
          **`Return:`** *None*

          This method syncronizes the variables both on host computer and hardware side. Should be called prior to read of any attribute or called after any write/set operation to make latest values available immediately.

      * #### `position`

          This attribute returns the current value of the ball position on the beam.

  - ## BallBalancingTable Class

      This class provides an interface with Ball Balancing Table via Acrome Controller.

      * #### `__init__(self, portname="/dev/serial0", baudrate=115200)`

          **`Return:`** *None*

          This is the constructor of the BallBalancingTable class. Please refer to the Controller class constructor for argument descriptions.
      * #### `set_servo(self, x, y)`

          **`Return:`** *None*

          This method provides an interface to set angles of the servo motors on Ball Balancing Table. Available range is from -1000 to 1000 for each axis.

      * #### `update(self)`
          **`Return:`** *None*

          This method syncronizes the variables both on host computer and hardware side. Should be called prior to read of any attribute or called after any write/set operation to make latest values available immediately.

      * #### `position`

          This attribute returns a list that contains the current coordinates (x, y) of the ball position on the touch screen.

  - ## Delta Class

      This class provides an interface with Delta Robot via Acrome Controller.

      * #### `__init__(self, portname="/dev/serial0", baudrate=115200)`

          **`Return:`** *None*

          This is the constructor of the Delta class. Please refer to the Controller class constructor for argument descriptions.
      * #### `set_motors(self, motors)`

          **`Return:`** *None*

          This method provides an interface to set angles of the motors on Delta Robot. Available range is from 310 to 810 for each motor. `motors` argument must be a list of 3 integers.

      * #### `pick(self, magnet)`
          **`Return:`** *None*

          This method controls the state of electromagnet which is attached to the Delta Robot. `magnet` argument is a boolean and when set to `True`, enables the magnet to pick the coin and when set to `False`, disables the magnet to release it.

      * #### `update(self)`
          **`Return:`** *None*

          This method syncronizes the variables both on host computer and hardware side. Should be called prior to read of any attribute or called after any write/set operation to make latest values available immediately.

      * #### `position`

          This attribute returns a list of 3 integers that contains the current values of the motor positions. List elements are Motor 1 Position, Motor 2 Position, and Motor 3 Position respectively.

  - ## Stewart, StewartEncoder and StewartEncoderHR Classes

      These classes provides an interface with Stewart Platforms via Acrome Controller.
      While Stewart Platform uses analog position feedback, StewartEncoder and StewartEncoderHR uses incremental encoders for position feedback. StewartEncoder and StewartEncoderHR only differs in communication structure. StewartEncoderHR provides 32 bits wide encoder resolution while StewartEncoder provides only 16 bits. 16 bits encoder resolution is enough for 4" and 8" versions of Stewart Platforms and no need to bloat serial communication with extra 16 bits of data per encoder.

      * #### `__init__(self, portname="/dev/serial0", baudrate=115200)`

          **`Return:`** *None*

          This is the constructor of the Stewart class. Please refer to the Controller class constructor for argument descriptions.

      * #### `enable(self)`
          **`Return:`** *None*

          This method enables the power stages of the Stewart Platform motors and should be called prior to setting speed.

      * #### `reset_encoder(self, motor_num=[1,2,3,4,5,6])`
          **`Return:`** *None*

          This method resets the encoder of the motor at the given index to 0.

          > **Note:** This method is only available in StewartEncoder and StewartEncoderHR classes.

      * #### `set_motors(self, motors)`

          **`Return:`** *None*

          This method provides an interface to set speeds of the motors on Stewart Platform. Available range is from -1000 to 1000 for each motor. `motors` argument must be a list of 6 integers.

      * #### `update(self)`
          **`Return:`** *None*

          This method syncronizes the variables both on host computer and hardware side. Should be called prior to read of any attribute or called after any write/set operation to make latest values available immediately.

      * #### `position`

          This attribute returns a list of 6 integers that contains the current values of the motor positions. List elements are ordered as starting from Motor 1 Position to Motor 6 Position.

      * #### `imu`

          This attribute returns the current roll, pitch and yaw values in degrees in a form of Python list.

          > **Note:** This attribute is only available on the products that shipped with an BNO055 Absolute Orientation Sensor. Products with MPU6050 IMU is not supported yet and will return 0.


pkgId: 6c3620595a938bd7ebfbd719841ca8d3b916d2eabccdca4fd114cd5444c0043e
name: python-acrome-smd
arch: src
version: 2.0.6
epoch: 0
release: 1
summary: Python library for interfacing with Acrome Smart Motion Devices (SMD) products.
url: https://github.com/Acrome-Smart-Motion-Devices/python-library
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acrome-smd-2.0.6-1.src.rpm
checksum_type: sha256
description:
  This library provides easy-to-use Python modules and methods for interfacing with Acrome Smart Motor Driver products.

  Embrace the world of motor control with simplicity using our SMD Python Library. Designed specifically for controlling SMDs, this library provides a seamless experience no matter your skill level in how you control motors.

  Whether your project requires basic speed adjustments or precise position control, quickly and easily leverage the flexibility of Python to effortlessly implement a wide variety of motor control strategies.

  SMD Python Library takes your projects to the next level by offering seamless integration with SMD Sensor modules. With this library, you can increase the functionality and efficiency of your project by effortlessly collecting data from SMD sensor modules via SMD.

  Develop your projects with "Acrome Smart Motor Drivers" and a computer that can run your Python code.

  You can reach the Acrome Smart Motors Drivers documentation [here](https://acrome-smd.readthedocs.io/en/latest/getting-started.html).


  To use [Acrome Smart Motor Drivers](https://acrome.net/product/smart-motor-drivers) with python library, follow the installation steps below. Library is compatible with Python 3.x and can be installed on both Windows and Linux systems.



  Before you begin, make sure you have the following prerequisites:

  - Python 3.x: [Python Official Website](https://www.python.org/downloads/)





  1. Open a Command Prompt with administrative privileges.

  2. Install SMD library using `pip` (Python package manager) by running the following command:

    ```shell
    pip install acrome-smd
    ```

  3. Wait for the installation to complete. Pip will automatically download and install the library along with any required dependencies.


  1. Open a terminal.

  2. Install SMD library using pip (Python package manager) by running the following command:

    ```shell
    pip install acrome-smd
    ```

  3. Wait for the installation to complete. Pip will automatically download and install SMD Library along with any required dependencies.


  To verify that SMD library has been successfully installed, open a Python interpreter and run the following command:

  ```python
  import smd
  import smd.red
  ```
  If no errors are raised, the installation was successful.


  To upgrade SMD Library to the latest version, you can use the following pip command:

    ```shell
    pip install acrome-smd
    ```


  Import the SMD Library:
  First, import the SMD library at the beginning of your Python script:

  ```python
  from smd.red import *
  ```


  Create an instance of the Master class by initializing it with the appropriate settings. This instance represents your SMD and allows you to control it.

  ````python
  ID = 0  # Set the ID of your SMART MOTOR DRIVER
  SerialPort = '/dev/ttyUSB0'  # Replace with your specific serial port ( for ex 'COM3'.)
  baudrate = 115200  # Set the baud rate for serial communication

  myMaster = Master(SerialPort , baudrate) #create a master object
  print(master.scan()) #prints ID list of connected SMDs


  from smd.red import *
  import time

  MASTER_PORT =  "/dev/ttyUSB0" #depending on operating system, port, etc. may vary depending on the
  master = Master(MASTER_PORT) #creating master object

  print(master.scan()) #prints ID list of connected SMDs

  ID = master.attached()[0] #getting ID of first SMD from scanned ones.

  ````

  Configure SMD:

  ````python

  master.set_shaft_rpm(ID, 10000)
  master.set_shaft_cpr(ID, 64)


  master.pid_tuner(ID)
  ````
  You can configure and use the **SMD**  using specific methods belonging to the master class, just like in the code above.

  You can access all sample codes from [here](https://github.com/Acrome-Smart-Motor-Driver/Example-Projects).
  Please read full documentation to use all features of a **SMD**



  The following methods provide users with ability to update firmware of their SMDs. To use these methods users must have an internet connection. __Users should not disconnect power from the device or it may break the device.__

    - #### `get_latest_fw_version(self)`

      **`Return:`** *Latest firmware version*

      This method gets the latest firmware version from the Github servers.

    - #### `update_fw_version(self, id: int, version='')`

      **`Return:`** *True if the firmware is updated*

      This method updates the firmware version with respect to given version string and ID.

      `id` argument is the device ID of the connected driver.

      `version` argument is the version to be updated. If version string is not given, driver is updated to the latest version available on Github.




  The control modes on the SMD operate with PID control. Therefore, correctly tuning the P, I, and D constants is crucial for accurate control. The device features an autotune capability to automatically set these values. Alternatively, users can manually input these values if desired.


  To utilize the autotune feature on the device, it's essential to ensure that the motor is in a freely rotatable position. This is because the card continuously rotates the motor during the autotuning process.

  Following this, the next step is to input the motor's CPR (Counts Per Revolution) and RPM (Revolutions Per Minute) values into the card using the provided methods below. Failing to do this accurately may result in incorrect calculations.

    - #### `set_shaft_cpr(self, id: int, cpr: float)`

      **`Return:`** *None*

      This method sets the count per revolution (CPR) of the motor output shaft.

      `id` argument is the device ID of the connected driver.

      `cpr` argument is the CPR value of the output shaft

    - #### `set_shaft_rpm(self, id: int, rpm: float)`

      **`Return:`** *None*

      This method sets the revolution per minute (RPM) value of the output shaft at 12V rating.

      `id` argument is the device ID of the connected driver.

      `rpm` argument is the RPM value of the output shaft at 12V

  After completing these steps, you should initiate the tuning process using the ``pid_tuner()`` method. Please note that immediately after calling this method, the motors will start rotating with varying speeds.

    - #### `pid_tuner(self, id: int)`

      **`Return:`** *None*

      This method starts a PID tuning process. Shaft CPR and RPM values **must** be configured beforehand. If CPR and RPM values are not configured, motors will not spin.

      `id` argument is the device ID of the connected driver.

  Once the ``pid_tuner()`` method is initiated, the state of the torque (whether it's enabled or not) does not affect motor operation. There is no need to use the ``enable_torque()`` function.


  ```python
  from smd.red import *
  import time

  MASTER_PORT =  "/dev/ttyUSB0" #depending on operating system, port, etc. may vary depending on the
  master = Master(MASTER_PORT) #creating master object

  print(master.scan()) #prints ID list of connected SMDs

  ID = master.attached()[0] #getting ID of first SMD from scanned ones. You can use directly ID = 0 if it has never been changed before.

  master.set_shaft_rpm(ID,10000)  #rpm and cpr values are depend on the motor you use.
  master.set_shaft_cpr(ID,64)
  master.pid_tuner(ID)            #starts autotune for setting PID values of control algorithms
  ```


  Manual input of the necessary constants for PID control is also possible. For this, separate P, I, and D constants should be configured for each control mode. Please note that each mode utilizes its own set of constants to control the motor. There are dedicated methods for configuring these constants for each control mode.

  - ####  `set_control_parameters_position(self, id: int, p=None, i=None, d=None, db=None, ff=None, ol=None)`

      **`Return:`** *None*

        This method sets the control block parameters for position control mode.
        Only assigned parameters are written, `None`'s are ignored. The default
        max output limit is 950.

        `id` argument is the device ID of the driver.

        `p` argument is the the proportional gain. Defaults to None.

        `i` argument is the integral gain. Defaults to None.

        `d` argument is the derivative gain. Defaults to None.

        `db` argument is the deadband (of the setpoint type) value. Defaults to None.

        `ff` argument is the feedforward value. Defaults to None.

        `ol` argument is the maximum output limit. Defaults to None.


  - ####  `set_control_parameters_velocity(self, id: int, p=None, i=None, d=None, db=None, ff=None, ol=None)`

      **`Return:`** *None*

        This method sets the control block parameters for velocity control mode.
          Only assigned parameters are written, `None`'s are ignored. The default
          max output limit is 950.

        `id` argument is the device ID of the driver.

        `p` argument is the the proportional gain. Defaults to None.

        `i` argument is the integral gain. Defaults to None.

        `d` argument is the derivative gain. Defaults to None.

        `db` argument is the deadband (of the setpoint type) value. Defaults to None.

        `ff` argument is the feedforward value. Defaults to None.

        `ol` argument is the maximum output limit. Defaults to None.
  - ####  `set_control_parameters_torque(self, id: int, p=None, i=None, d=None, db=None, ff=None, ol=None)`

      **`Return:`** *None*

        This method sets the control block parameters for torque control mode.
          Only assigned parameters are written, `None`'s are ignored. The default
          max output limit is 950.

        `id` argument is the device ID of the driver.

        `p` argument is the the proportional gain. Defaults to None.

        `i` argument is the integral gain. Defaults to None.

        `d` argument is the derivative gain. Defaults to None.

        `db` argument is the deadband (of the setpoint type) value. Defaults to None.

        `ff` argument is the feedforward value. Defaults to None.

        `ol` argument is the maximum output limit. Defaults to None.


  The P, I, and D constants and other values entered for control modes can be obtained. This can be achieved by using the methods provided below.

  - ####  `get_control_parameters_position(self, id: int)`

      **`Return:`** *Returns the list [P, I, D, Feedforward, Deadband, OutputLimit]*

      This method gets the position control block parameters.

      `id` argument is the device ID of the driver.

  - ####  `get_control_parameters_velocity(self, id: int)`

      **`Return:`** *Returns the list [P, I, D, Feedforward, Deadband, OutputLimit]*

      This method gets the velocity control block parameters.

      `id` argument is the device ID of the driver.

  - ####  `get_control_parameters_torque(self, id: int)`

      **`Return:`** *Returns the list [P, I, D, Feedforward, Deadband, OutputLimit]*

      This method gets the torque control block parameters.

      `id` argument is the device ID of the driver.


  ```python
  from smd.red import *
  import time

  MASTER_PORT =  "/dev/ttyUSB0"
  master = Master(MASTER_PORT) #creating master object
  print(master.scan())
  ID = 0 #ID of the SMD connected and autotuned.

  print(master.get_control_parameters_position(ID))
  print(master.get_control_parameters_velocity(ID))

  ```


  The SMD Red has 4 control modes:

  - **PWM Control:** This mode provides power to a brushed DC motor using PWM signals.

  - **Position Control:** In this mode, the brushed motor moves to the desired positions using information from the encoder.

  - **Velocity Control:** This mode ensures that the motor rotates at the desired speed using data from the encoder.

  - **Torque Control:** This mode allows the motor to apply a specific torque by drawing the desired current.

  Except for the *PWM Control mode*, all of these control modes operate with PID control. Therefore, it is essential to configure the PID values before starting the motors in these control modes. Without proper PID tuning, the motors may not work at all or may not perform as desired. You can find the necessary information for setting PID values in the [PID Tune](#pid-tune) section of the documentation.



  Regardless of which control mode you choose to use, there are two essential methods that you need to be aware of. One is the `set_operation_mode()` method, which allows you to select the motor control mode you want to use. The other is `enable_torque()`, which enables or disables the motor rotation.

  - #### `set_operation_mode(self, id: int, mode: OperationMode)`

      **`Return:`** *None*

      This method sets the operation mode of the driver. Operation mode may be one of the following:
      - `OperationMode.PWM`,
      - `OperationMode.Position`,
      - `OperationMode.Velocity`,
      - `OperationMode.Torque`.

      `id` argument is the device ID of the connected driver.

  - #### `enable_torque(self, id: int, en: bool)`

      **`Return:`** *None*

      This method enables or disables power to the motor which is connected to the driver.

      `id` argument is the device ID of the connected driver.

      `en` argument is a boolean. `True` enables the torque while False `disables`.





  - ####  `set_duty_cycle(self, id: int, pct: float):`

      **`Return:`** *None*

      This method sets the duty cycle to the motor for PWM control mode in terms of percentage. Negative values will change the motor direction.

      `id` argument is the device ID of the driver.

      `id` argument is the duty cycle percentage.

  ```python
  from smd.red import *


  MASTER_PORT =  "COM10"
  master = Master(MASTER_PORT) #creating master object
  print(master.scan())
  ID = 0

  master.set_operation_mode(ID, 0)    #sets the operating mode to 0 represents PWM control mode.
  master.set_duty_cycle(ID, 50)       #sets the duty cycle to 50 percent
  master.enable_torque(ID, True)      #enables the motor torque to start rotating
  ```

    - #### `set_position_limits(self, id: int, plmin: int, plmax: int)`

      **`Return:`** *None*

      This method sets the position limits of the motor in terms of encoder ticks. Default for min is -2,147,483,648 and for max is 2,147,483,647. The torque is disabled if the value is exceeded so a tolerence factor should be taken into consideration when setting these values.

      `id` argument is the device ID of the connected driver.

      `plmin` argument is the minimum position limit.

      `plmax` argument is the maximum position limit.

    - #### `get_position_limits(self, id: int)`

      **`Return:`** *Min and max position limits*

      This method gets the position limits of the motor in terms of encoder ticks.

      `id` argument is the device ID of the connected driver.

      `plmin` argument is the minimum position limit.

      `plmax` argument is the maximum position limit.

    - ####  `set_position(self, id: int, sp: int)`

      **`Return:`** *None*

        This method sets the desired setpoint for the position control in terms of encoder ticks.

        `id` argument is the device ID of the driver.

        `sp` argument is the position control setpoint.


    - ####  `get_position(self, id: int)`

      **`Return:`** *Current position of the motor shaft*

        This method gets the current position of the motor from the driver in terms of encoder ticks.

        `id` argument is the device ID of the driver.



  ```python
  from smd.red import *

  MASTER_PORT =  "COM10"
  master = Master(MASTER_PORT) #creating master object
  print(master.scan())
  ID = 0

  master.set_shaft_rpm(ID, 10000)  #rpm and cpr values are depend on the motor you use.
  master.set_shaft_cpr(ID, 64)
  master.set_control_parameters_position(ID, 10, 0, 8) #SMD ID, Kp, Ki, Kd

  master.set_operation_mode(ID, 1)    #sets the operating mode to 1 represents Position control mode.
  master.enable_torque(ID, True)      #enables the motor torque to start rotating

  while True:
      master.set_position(ID, 5000)   #sets the setpoint to 5000 encoder ticks.
      time.sleep(1.2)
      master.set_position(ID, 0)      #sets the setpoint to 0 encoder ticks. Motor goes to start
      time.sleep(1.2)

  ```
  You should enter the PID values of Position Control Mode or just tune once the SMD at start. CPR and RPM values should be entered to SMD calculates the neseccary varaibles. If you don't then the motor cannot rotate.


  - #### `set_velocity_limit(self, id: int, vl: int)`

      **`Return:`** *None*

      This method sets the velocity limit for the motor output shaft in terms of RPM. The velocity limit applies only in velocity mode. Default velocity limit is 65535.

      `id` argument is the device ID of the connected driver.

      `vl` argument is the new velocity limit (RPM).

  - #### `get_velocity_limit(self, id: int)`

      **`Return:`** *Velocity limit*

      This method gets the velocity limit from the driver in terms of RPM.

      `id` argument is the device ID of the connected driver.
  - ####  `set_velocity(self, id: int, sp: int)`

      **`Return:`** *None*

        This method sets the desired setpoint for the velocity control in terms of RPM.

        `id` argument is the device ID of the driver.


  - ####  `get_velocity(self, id: int)`

      **`Return:`** *Current velocity of the motor shaft*

        This method gets the current velocity of the motor output shaft from the driver in terms of RPM.

        `id` argument is the device ID of the driver.


  ```python
  from smd.red import *

  MASTER_PORT =  "COM10"
  master = Master(MASTER_PORT) #creating master object
  print(master.scan())
  ID = 0

  master.set_shaft_rpm(ID,10000)  #rpm and cpr values are depend on the motor you use.
  master.set_shaft_cpr(ID,64)
  master.set_control_parameters_velocity(ID,10,1,0) #SMD ID, Kp, Ki, Kd

  master.set_operation_mode(ID, 2)    #sets the operating mode to 2 represents Velocity control mode.
  master.set_velocity(ID, 2000)       #sets the setpoint to 2000 RPM.

  master.enable_torque(ID, True)      #enables the motor torque to start rotating
  ```
  You should enter the PID values of Position Control Mode or just tune once the SMD at start. CPR and RPM values should be entered to SMD calculates the neseccary varaibles. If you don't then the motor cannot rotate.

    - #### `set_torque_limit(self, id: int, tl: int)`

      **`Return:`** *None*

      This method sets the torque limit of the driver in terms of milliamps (mA).

      `id` argument is the device ID of the connected driver.

      `tl` argument is the new torque limit (mA).


    - #### `get_torque_limit(self, id: int)`

      **`Return:`** *Torque limit (mA)*

      This method gets the torque limit from the driver in terms of milliamps (mA).

      `id` argument is the device ID of the connected driver.

     - ####  `set_torque(self, id: int, sp: int)`

          **`Return:`** *None*

          This method sets the desired setpoint for the torque control in terms of milliamps (mA).

          `id` argument is the device ID of the driver.


     - ####  `get_torque(self, id: int)`

          **`Return:`** *Current drawn from the motor (mA)*

          This method gets the current drawn from the motor from the driver in terms of milliamps (mA).

          `id` argument is the device ID of the driver.


  ```python
  from smd.red import *

  MASTER_PORT =  "COM10"
  master = Master(MASTER_PORT) #creating master object
  print(master.scan())
  ID = 0

  master.set_shaft_rpm(ID,10000)  #rpm and cpr values are depend on the motor you use.
  master.set_shaft_cpr(ID,64)
  master.set_control_parameters_torque(ID, 10, 0.1, 0) #SMD ID, Kp, Ki, Kd


  master.set_operation_mode(ID, 3)    #sets the operating mode to 3 represents Torque control mode.
  master.set_torque(ID, 80)          #sets the setpoint to 80 mili amps(mA).
  master.enable_torque(ID, True)      #enables the motor torque to start rotating
  ```
  **_You must enter the PID values of the Torque Control Mode. Since Auto tune does not produce these values, you must set them yourself._** If you do not do this, the motor cannot rotate properly.






  - ### Red Class
    Methods of the `Red` class are used for the underlying logic of the Master class. As such, it is not recommended for users to call `Red` class methods explicitly. Users may create instances of the class in order to attach to the master. Thus, only `__init__` constructor is given here.

    - #### `__init__(self, ID: int)`:

      This is the initalizer for Red class which represents an object of SMD (Smart Motor Drivers) driver.

      `ID` argument is the device ID of the created driver.

  - ### Master Class

    - #### `__init__(self, portname, baudrate=115200)`

      **`Return:`** *None*

      This is the initializer for Master class which controls the serial bus.

      `portname` argument is the serial/COM port of the host computer which is connected to the Acrome Smart Motor Drivers via Mastercard.

      `baudrate` argument specifies the baudrate of the serial port. User may change this value to something between 3.053 KBits/s and 12.5 MBits/s. However, it is up to the user to select a value which is supported by the user's host computer.

    - #### `update_driver_baudrate(self, id: int, br: int):`

      **`Return:`** *None*

      This method updates the baudrate of the driver, saves it to EEPROM and resets the driver board. Once the board is up again, the new baudrate is applied.

      `id` argument is the device ID of the connected driver.

      `br` argument is the user entered baudrate value. This value must be between 3.053 KBits/s and 12.5 MBits/s.

    - #### `get_driver_baudrate(self, id: int):`

      **`Return:`** *The baudrate of the driver with given ID*

      This method reads the baudrate of the driver in bps.

      `id` argument is the device ID of the connected driver.

    - #### `update_master_baudrate(self, br: int):`

      **`Return:`** *None*

      This method updates the baudrate of the host computer's serial port and should be called after changing the baudrate of the driver board to sustain connection.

      `br` argument is the user entered baudrate value. This value must be between 3.053 KBits/s and 12.5 MBits/s.

    - #### `attach(self, driver: Red):`

      **`Return:`** *None*

      This method attaches an instance of Red class to the master. If a device ID is not attached to the master beforehand, methods of the master class will not work on the given device ID.

      `driver` argument is an instance of the Red class. Argument must be an instance with a valid device ID.


    - #### `detach(self, id: int):`

      **`Return:`** *None*

      This method removes the driver with the given devic ID from thee master. Any future action to the removed device ID will fail unless it is re-attached.

    - #### `set_variables(self, id: int, idx_val_pairs=[], ack=False)`

      **`Return:`** *List of the acknowledged variables or None*

      This method updates the variables of the driver board with respect to given index/value pairs.

      `id` argument is the device ID of the connected driver.

      `idx_val_pairs` argument is a list, consisting of lists of parameter indexes and their value correspondents.

    - #### `get_variables(self, id: int, index_list: list)`

      **`Return:`** *List of the read variables or None*

      This method reads the variables of the driver board with respect to given index list.

      `id` argument is the device ID of the connected driver.

      `index_list` argument is a list with every element is a parameter index intended to read.

    - #### `set_variables_sync(self, index: Index, id_val_pairs=[])`

      **`Return:`** *List of the read variables or None*

      This method updates a specific variable of the  multiple driver boards at once.

      `index` argument is the parameter to be updated.

      `id_val_pairs` argument is a list, consisting of lists of device IDs and the desired parameter value correspondents.

    - #### `scan(self)`

      **`Return:`** *List of the connected driver device IDs.*

      This method scans the serial port, detects and returns the connected drivers.

    - #### `reboot(self, id: int)`

      **`Return:`** *None*

      This method reboots the driver with given ID. Any runtime parameter or configuration which is not saved to EEPROM is lost after a reboot. EEPROM retains itself.

      `id` argument is the device ID of the connected driver.

    - #### `factory_reset(self, id: int)`

      **`Return:`** *None*

      This method clears the EEPROM config of the driver and restores it to factory defaults.

      `id` argument is the device ID of the connected driver.

    - #### `eeprom_write(self, id: int, ack=False)`

      **`Return:`** *None*

      This method clears the EEPROM config of the driver and restores it to factory defaults.

      `id` argument is the device ID of the connected driver.

    - #### `ping(self, id: int)`

      **`Return:`** *True or False*

      This method sends a ping package to the driver and returns `True` if it receives an acknowledge otherwise `False`.

      `id` argument is the device ID of the connected driver.

    - #### `reset_encoder(self, id: int)`

      **`Return:`** *None*

      This method resets the encoder counter to zero.

      `id` argument is the device ID of the connected driver.
    - #### `enter_bootloader(self, id: int)`

      **`Return:`** *None*

      This method puts the driver into bootloader. After a call to this function, firmware of the driver can be updated with a valid binary or hex file. To exit the bootloader, unplug - plug the driver from power or press the reset button.

      `id` argument is the device ID of the connected driver.

    - #### `get_driver_info(self, id: int)`

      **`Return:`** *Dictionary containing version info*

      This method reads the hardware and software versions of the driver and returns as a dictionary.

      `id` argument is the device ID of the connected driver.

    - #### `update_driver_id(self, id: int, id_new: int)`

      **`Return:`** *None*

      This method updates the device ID of the driver temporarily. `eeprom_write(self, id:int)` method must be called to register the new device ID.

      `id` argument is the device ID of the connected driver.

      `id_new` argument is the new intended device ID of the connected driver.

    - #### `set_user_indicator(self, id: int)`

      **`Return:`** *None*

      This method sets the user indicator color on the RGB LED for 5 seconds. The user indicator color is cyan.

      `id` argument is the device ID of the connected driver.





  To use SMD modules, you should initially utilize the following scanning function. This function returns which modules are connected to the SMD. Each module has a type and an ID, and through this scanning process, you can learn these properties of the connected modules. When the board is powered up for the first time, this scan is automatically performed once, but afterward, this command should be used manually.
    - #### `scan_modules(self, id: int):`

      **`Return:`** *List of connected modules*

      This method scans and returns the module IDs which are currently connected to a driver.

      `id` argument is the device ID of the connected driver.


    - ####  `get_button(self, id: int, module_id: int):`

      **`Return:`** *Returns the button state*

        This method gets the button module data with given index.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the button. It takes values in the range of 1 - 5 (including 1 and 5).


    - ####  `get_light(self, id: int, module_id: int):`

      **`Return:`** *Returns the ambient light measurement (in lux)*

        This method gets the ambient light module data with given index.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the ambient light. It takes values in the range of 1 - 5 (including 1 and 5).


    - ####  `set_buzzer(self, id: int, module_id: int, note_frequency: int)`

      **`Return:`** *None*

        This method enables/disables the buzzer module with given index.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the buzzer. It takes values in the range of 1 - 5 (including 1 and 5).

        `note_frequency` argument specifies the frequency of the tone in Hertz. 0 Hertz will result in no tone.


    - ####  `get_joystick(self, id: int, module_id: int):`

      **`Return:`** *Returns the joystick module analogs and button data*

        This method gets the joystick module data with given index.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the joystick. It takes values in the range of 1 - 5 (including 1 and 5).

    
    ``` python
    from smd.red import*
    import time
    m = Master("/dev/ttyUSB0")
    m.attach(Red(0))
    m.scan_modules(0)

    
    while True:
      joystick = m.get_joystick(0, Index.Joystick_1)
      joystick_X = joystick[0]
      joystick_Y = joystick[1]
      joystick_button = joystick[2]
    ```


    - ####  `get_distance(self, id: int, module_id: int):`

      **`Return:`** *Returns the distance from the ultrasonic distance module (in cm)*

        This method gets the ultrasonic distance module data with given index.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the ultrasonic distance module. It takes values in the range of 1 - 5 (including 1 and 5).


    - ####  `get_qtr(self, id: int, module_id: int):`

      **`Return:`** *Returns QTR module data: [Left(bool), Middle(bool), Right(bool)]*

        This method gets the QTR module data with given index.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the QTR. It takes values in the range of 1 - 5 (including 1 and 5).


    - ####  `set_servo(self, id: int, module_id: int, val: int):`

      **`Return:`** *None*

        This method moves servo module to a desired position.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the servo. It takes values in the range of 1 - 5 (including 1 and 5)

        `val` argument is the value to write to the servo. It takes values in the range of 0 - 255 (including 0 and 255).


    - ####  `get_potentiometer(self, id: int, module_id: int):`

      **`Return:`** *Returns the ADC conversion from the potentiometer module*

        This method gets the potentiometer module data with given index.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the potentiometer. It takes values in the range of 1 - 5 (including 1 and 5).


  The setRGB() method is used to control an RGB Led module by specifying the intensity or color values for each of the RGB components.

    - ####  `set_rgb(self, id: int, module_id: int, red: int, green: int, blue: int):`

      **`Return:`** *None*

        This method sets the colour emitted from the RGB module.

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the RGB. It takes values in the range of 1 - 5 (including 1 and 5).

        `red` argument is representing red color's level. It takes values in the range of 0 - 255 (including 0 and 255).

        `green` argument is representing green color's level. It takes values in the range of 0 - 255 (including 0 and 255).

        `blue` argument is representing blue color's level. It takes values in the range of 0 - 255 (including 0 and 255).

    The method and colors can be used as in the example below for the RGB module.
    
    ``` python
    from smd.red import*
    import time
    m = Master("/dev/ttyUSB0")
    m.attach(Red(0))
    m.scan_modules(0)

    m.set_rgb(0, Index.RGB_1, 255, 0, 0) # Red color
    time.sleep(0.5)
    m.set_rgb(0, Index.RGB_1, 0, 255, 0) # Green color
    time.sleep(0.5)
    m.set_rgb(0, Index.RGB_1, 0, 0, 255) # Blue color
    time.sleep(0.5)
    m.set_rgb(0, Index.RGB_1, 128, 0, 128) # Purple color
    time.sleep(0.5)
    ```

    - ####  `get_imu(self, id: int, module_id: int):`

      **`Return:`** *Returns roll, pitch angles*

        This method gets the IMU module data (roll, pitch).

        `id` argument is the device ID of the driver.

        `module_id` argument is the module ID of the IMU. It takes values in the range of 1 - 5 (including 1 and 5).

    
    ``` python
    from smd.red import*
    import time
    m = Master("/dev/ttyUSB0")
    m.attach(Red(0))
    m.scan_modules(0)

    
    while True:
      IMU = m.get_imu(0, Index.IMU_1)
      roll  = IMU[0]
      pitch = IMU[1]
    ```


pkgId: 148106669a0867458a992a773db3f990467d154a6108c091bde2b5ac9ba386f6
name: python-across-burstcube
arch: src
version: 0.0.9
epoch: 0
release: 1
summary: ACROSS API Python client for BurstCube
url: https://pypi.org/project/across-burstcube/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-across-burstcube-0.0.9-1.src.rpm
checksum_type: sha256
description:
  This is the Python API for the Astrophysics Cross-Observatory Science Support
  (ACROSS), a NASA initiative to provide cross-observatory support for
  time-domain and multi-messenger (TDAMM) coordination and observation planning.

  The client provides support for accessing the BurstCube TOO interface that
  ACROSS provides.



  To install the client, enter the command `pip install across-burstcube`.

  The `across_client` module should now be available for use.



  The relevant classes are:

  `BurstCubeTOO`

  Main interface for submitting, updating, fetching and deleting BurstCube TOO
  requests.

  `BurstCubeTriggerInfo`

  Class that provides extended information on the triggering event, this is an
  parameter for `BurstCubeTOO`.

  `BurstCubeTOORequests`

  Allows to fetch multiple `BurstCubeTOO` entries using various filter criteria.

  Note that submission of BurstCubeTOO requests requires an API Token, which will
  be supplied by ACROSS.


pkgId: 765088601eae552f5204b235c29126a5791401fd8812ce922d88999daf4db5d6
name: python-acryl-datahub
arch: src
version: 0.14.1
epoch: 0
release: 1
summary: A CLI to work with DataHub metadata
url: https://datahubproject.io/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acryl-datahub-0.14.1-1.src.rpm
checksum_type: sha256
description:
  The `acryl-datahub` package contains a CLI and SDK for interacting with DataHub,
  as well as an integration framework for pulling/pushing metadata from external systems.

  See the [DataHub docs](https://datahubproject.io/docs/metadata-ingestion).


pkgId: af7427dfd752366155847a0d9b9aaef3d00f65bfd8116b02af8bbaaa82636591
name: python-acryl-datahub-actions
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: An action framework to work with DataHub real time changes.
url: https://datahubproject.io/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acryl-datahub-actions-0.1.3-1.src.rpm
checksum_type: sha256
description:
  Welcome to DataHub Actions! The Actions framework makes responding to realtime changes in your Metadata Graph easy, enabling you to seamlessly integrate [DataHub](https://github.com/datahub-project/datahub) into a broader events-based architecture.

  For a detailed introduction, check out the [original announcement](https://www.youtube.com/watch?v=7iwNxHgqxtg&t=2189s) of the DataHub Actions Framework at the DataHub April 2022 Town Hall. For a more in-depth look at use cases and concepts, check out [DataHub Actions Concepts](../docs/concepts.md).



  To get started right away, check out the [DataHub Actions Quickstart](../docs/quickstart.md) Guide.




  The DataHub Actions CLI commands are an extension of the base `datahub` CLI commands. We recommend
  first installing the `datahub` CLI:

  ```shell
  python3 -m pip install --upgrade pip wheel setuptools
  python3 -m pip install --upgrade acryl-datahub
  datahub --version
  ```

  > Note that the Actions Framework requires a version of `acryl-datahub` >= v0.8.34




  Next, simply install the `acryl-datahub-actions` package from PyPi:

  ```shell
  python3 -m pip install --upgrade pip wheel setuptools
  python3 -m pip install --upgrade acryl-datahub-actions
  datahub actions version
  ```




  Actions are configured using a YAML file, much in the same way DataHub ingestion sources are. An action configuration file consists of the following

  1. Action Pipeline Name (Should be unique and static)
  2. Source Configurations
  3. Transform + Filter Configurations
  4. Action Configuration
  5. Pipeline Options (Optional)
  6. DataHub API configs (Optional - required for select actions)

  With each component being independently pluggable and configurable.

  ```yml

  name: <action-pipeline-name>


  source:
    type: <source-type>
    config:
      


  filter:
    event_type: <filtered-event-type>
    event:
      
      <filtered-event-fields>


  transform:
    - type: <transformer-type>
      config:
        


  action:
    type: <action-type>
    config:
      


  options:
    retry_count: 0 # The number of times to retry an Action with the same event. (If an exception is thrown). 0 by default.
    failure_mode: "CONTINUE" # What to do when an event fails to be processed. Either 'CONTINUE' to make progress or 'THROW' to stop the pipeline. Either way, the failed event will be logged to a failed_events.log file.
    failed_events_dir: "/tmp/datahub/actions"  # The directory in which to write a failed_events.log file that tracks events which fail to be processed. Defaults to "/tmp/logs/datahub/actions".


  datahub:
    server: "http://localhost:8080" # Location of DataHub API
    
  ```



  An simple configuration file for a "Hello World" action, which simply prints all events it receives, is

  ```yml

  name: "hello_world"

  source:
    type: "kafka"
    config:
      connection:
        bootstrap: ${KAFKA_BOOTSTRAP_SERVER:-localhost:9092}
        schema_registry_url: ${SCHEMA_REGISTRY_URL:-http://localhost:8081}

  action:
    type: "hello_world"
  ```

  We can modify this configuration further to filter for specific events, by adding a "filter" block.

  ```yml

  name: "hello_world"


  source:
    type: "kafka"
    config:
      connection:
        bootstrap: ${KAFKA_BOOTSTRAP_SERVER:-localhost:9092}
        schema_registry_url: ${SCHEMA_REGISTRY_URL:-http://localhost:8081}


  filter:
    event_type: "EntityChangeEvent_v1"
    event:
      category: "TAG"
      operation: "ADD"
      modifier: "urn:li:tag:pii"


  action:
    type: "hello_world"
  ```




  To run a new Action, just use the `actions` CLI command

  ```
  datahub actions -c <config.yml>
  ```

  Once the Action is running, you will see

  ```
  Action Pipeline with name '<action-pipeline-name>' is now running.
  ```



  You can run multiple actions pipeline within the same command. Simply provide multiple
  config files by restating the "-c" command line argument.

  For example,

  ```
  datahub actions -c <config-1.yaml> -c <config-2.yaml>
  ```



  Simply append the `--debug` flag to the CLI to run your action in debug mode.

  ```
  datahub actions -c <config.yaml> --debug
  ```



  Just issue a Control-C as usual. You should see the Actions Pipeline shut down gracefully, with a small
  summary of processing results.

  ```
  Actions Pipeline with name '<action-pipeline-name' has been stopped.
  ```




  Two event types are currently supported. Read more about them below.

  - [Entity Change Event V1](../docs/events/entity-change-event.md)
  - [Metadata Change Log V1](../docs/events/metadata-change-log-event.md)




  Currently, the only event source that is officially supported is `kafka`, which polls for events
  via a Kafka Consumer.

  - [Kafka Event Source](../docs/sources/kafka-event-source.md)




  By default, DataHub supports a set of standard actions plugins. These can be found inside the folder
  `src/datahub-actions/plugins`.

  Some pre-included Actions include

  - [Hello World](../docs/actions/hello_world.md)
  - [Executor](../docs/actions/executor.md)






  Notice that we support all actions command using a separate `datahub-actions` CLI entry point. Feel free
  to use this during development.

  ```

  ./gradlew datahub-actions:build


  cd datahub-actions && source venv/bin/activate


  datahub-actions actions -c ../examples/hello_world.yaml


  datahub-actions actions -c ../examples/executor.yaml


  datahub-actions actions -c ../examples/executor.yaml -c ../examples/hello_world.yaml
  ```



  To develop a new Transformer, check out the [Developing a Transformer](../docs/guides/developing-a-transformer.md) guide.



  To develop a new Action, check out the [Developing an Action](../docs/guides/developing-an-action.md) guide.




  Contributing guidelines follow those of the [main DataHub project](https://github.com/datahub-project/datahub/blob/master/docs/CONTRIBUTING.md). We are accepting contributions for Actions, Transformers, and general framework improvements (tests, error handling, etc).




  Check out the [original announcement](https://www.youtube.com/watch?v=7iwNxHgqxtg&t=2189s) of the DataHub Actions Framework at the DataHub April 2022 Town Hall.




  [Apache 2.0](./LICENSE)


pkgId: e2a7729442dad6dae4f164115fce3d3c0ea64e9f6d2a4037e2a19ddd0b3c8999
name: python-acryl-datahub-airflow-plugin
arch: src
version: 0.14.0.5
epoch: 0
release: 1
summary: Datahub Airflow plugin to capture executions and send to Datahub
url: https://datahubproject.io/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acryl-datahub-airflow-plugin-0.14.0.5-1.src.rpm
checksum_type: sha256
description:
  See [the DataHub Airflow docs](https://datahubproject.io/docs/lineage/airflow) for details.



  See the [developing docs](../../metadata-ingestion/developing.md).


pkgId: e34ebe16eea31498f29b3037d123b0cd7ab04e709b38563d4e577b2e0022fa18
name: python-acryl-datahub-classify
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: Library to predict info types for DataHub
url: https://datahubproject.io/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acryl-datahub-classify-0.0.11-1.src.rpm
checksum_type: sha256
description:
  Predict InfoTypes for [DataHub](https://datahubproject.io/).



  `python3 -m pip install --upgrade acryl-datahub-classify`



  This API populates infotype proposal(s) for each input column by using metadata, values & confidence level threshold. Following are the input and output contract



  API expects following parameters in the output

  - `column_infos` - This is a list of ColumnInfo objects. Each ColumnInfo object contains metadata (col_name, description, datatype, etc) and values of a column.
  - `confidence_level_threshold` - If the infotype prediction confidence is greater than the confidence threshold then the prediction is considered as a proposal. This is the common threshold for all infotypes.
  - `global_config` - This dictionary contains configuration details about all supported infotypes. Refer section [Infotype Configuration](#infotype-configuration) for more information.
  - `infotypes` - This is a list of infotypes that is to be processed. This is an optional argument, if specified then it will override the default list of all supported infotypes. If user is interested in only few infotypes then this list can be specified with correct infotype names. Infotype names are case sensitive.
  - `minimum_values_threshold` - Minimum number of column values required for processing. This is an optional argument, default is 50.



  API returns a list of ColumnInfo objects of length same as input ColumnInfo objects list. A populated list of Infotype proposal(s), if any, is added in the ColumnInfo object itself with a variable name as `infotype_proposals`. The infotype_proposals list contains InfotypeProposal objects which has following information

  - `infotype` - A proposed infotype name.
  - `confidence_level` - Overall confidence of the infotype proposal.
  - `debug_info` - confidence score of each prediction factor involved in the overall confidence score calculation. Refer section [Debug Information](#debug-information) for more information.

  **Convention:**
  If `infotype_proposals` list is non-empty then it indicates that there is at least one infotype proposal with confidence greater than `confidence_level_threshold`.



  Infotype configuration is a dictionary with all infotypes at root level key. Each infotype has following configurable parameters (value of each parameter is a dictionary)

  - `Prediction_Factors_and_Weights` - This is a dictionary that specifies the weight of each prediction factor which will be used in the final confidence calculation. Following are the prediction factors
    1. Name
    2. Description
    3. Datatype
    4. Values
  - `ExcludeName` - optional exact match list for column names to exclude from classification for this info_type
  - `Name` - regex list which is to be matched against column name
  - `Description` - regex list which is to be matched against column description
  - `Datatype` - list of datatypes to be matched against column datatype
  - `Values` - this dictionary contains following information
    1. `prediction_type` - values evaluation model (regex/library)
    2. `regex` - regex list which is to be matched against column values
    3. `library` - library name which is to be used to evaluate column values



  ```python
  {
      '<Infotype1>': {
          'Prediction_Factors_and_Weights': {
              'Name': 0.4,
              'Description': 0,
              'Datatype': 0,
              'Values': 0.6
          },
          'Name': { 'regex': [<regex patterns>] },
          'Description': { 'regex': [<regex patterns>] },
          'Datatype': { 'type': [<list of datatypes>] },
          'Values': {
              'prediction_type': 'regex/library',
              'regex': [<regex patterns>],
              'library': [<library name>]
          }
      },
      '<Infotype2>': {
      ..
      ..
      ..
      }
  }
  ```



  A debug information is associated with each infotype proposal, it provides details about confidence score from each prediction factor involved in overall confidence score calculation. This is a dictionary with following four prediction factors as key

  - Name
  - Description
  - Datatype
  - Values

  ```python
  {
      'Name': 0.4,
      'Description': 0.2,
      'Values': 0.6,
      'Datatype': 0.3
  }
  ```



  Below Infotypes are supported out of the box.
  1. Age
  2. Gender
  3. Person Name / Full Name
  4. Email Address
  5. Phone Number
  6. Street Address
  7. Credit-Debit Card Number
  8. International Bank Account Number
  9. Vehicle Identification Number
  10. US Social Security Number
  11. Ipv4 Address
  12. Ipv6 Address
  13. Swift Code
  14. US Driving License Number

  Regex based custom infotypes are supported. Specify custom infotype configuration in format mentioned [here](#infotype-configuration).



  - If value prediction factor weight is non-zero (indicating values should be used for infotype inspection) then a minimum 50 non-null column values should be present.





  ```sh
  cd datahub-classify
  ../gradlew :datahub-classify:installDev # OR pip install -e ".[dev]"
  source venv/bin/activate
  ```



  ```sh
  pytest tests/ --capture=no --log-cli-level=DEBUG
  ```



  ```sh

  black src/ tests/
  isort src/ tests/
  flake8 src/ tests/
  mypy src/ tests/
  ```



  ```sh
  ../gradlew :datahub-classify:build
  ```

  You can also run these steps via the gradle build:

  ```sh
  ../gradlew :datahub-classify:lint
  ../gradlew :datahub-classify:lintFix
  ../gradlew :datahub-classify:testQuick
  ```


pkgId: c33bd873cd8a7f99632dee0efd7e3cef1c711e37fcb7a0900859b06fe781d999
name: python-acryl-executor
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: An library used within Acryl Agents to execute tasks
url: https://datahubproject.io/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acryl-executor-0.1.1-1.src.rpm
checksum_type: sha256
description:
  Remote execution agent used for running DataHub tasks, such as ingestion powered through the UI.


  ```bash
  python3 -m venv --upgrade-deps venv
  source venv/bin/activate
  pip3 install .
  ```



  By default, this library comes with a set of default task implementations:



  - **SubprocessProcessIngestionTask** - Executes a metadata ingestion run by spinning off a subprocess. Supports ingesting from a particular version, and with a specific plugin (based on the platform type requested)

  - **InMemoryIngestionTask** - Executes a metadata ingestion run using the datahub library in the same process. Not great for production where we can see strange dependency conflicts when certain packages are executed together. Use this for testing, as it has no ability to check out a specific DataHub Metadata Ingestion plugin.



  There is one implementation of a cloud logging client that writes logs to S3. This is used by the Acryl Executor to write logs to S3.
  To enable it you should set the following environment variables:
  `ENV DATAHUB_CLOUD_LOG_BUCKET` - The S3 bucket to write logs to
  `ENV DATAHUB_CLOUD_LOG_PATH` - The S3 path to write logs to

  The logs are compressed with tar and gzipped before being uploaded to S3 to the following path:
  `s3://CLOUD_LOG_BUCKET/CLOUD_LOG_PATH/<pipeline_id>/year=/month=/day=/<run_id>/`


pkgId: 00143c9b3a8816d466859c7a85ca44f63183d1ab42034a25aa4e8ad0be285ab5
name: python-acslib
arch: src
version: 0.1.11
epoch: 0
release: 1
summary: A library for interacting with Access Control Systems like Genetec or Ccure9k
url: https://github.ncsu.edu/SAT/acslib
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acslib-0.1.11-1.src.rpm
checksum_type: sha256
description:
  <p align="left">
  <a href="https://pypi.org/project/acslib/">
      <img src="https://img.shields.io/pypi/v/acslib.svg"
          alt = "Release Status">
  </a>


  A library for interacting with Access Control Systems like Genetec or Ccure9k. This is a work in progress and is not ready for production use.

  Currently development is heavily influenced by Ccure9k, but the goal is to abstract the differences between the two systems and provide a common
  interface for interacting with them.


  </p>



  * Free software: MIT
  * Documentation: <https://github.com/ncstate-sat/acslib>




  * Currently supports CRUD operations for `Personnel`, `Clearances`, `Credentials`, and `ClearanceItem` in Ccure9k, and all other Ccure object types.
  * Supports search by custom fields.







  ```python
  from acslib import CcureAPI

  ccure = CcureAPI()
  response = ccure.personnel.search("Roddy Piper".split())
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.filters import PersonnelFilter, FUZZ

  ccure = CcureAPI()
  search_filter = PersonnelFilter(lookups={"Text1": FUZZ})
  response = ccure.personnel.search(["PER0892347"], search_filter=search_filter)
  ```



  ```python
  from acslib import CcureAPI


  ccure = CcureAPI()
  ccure.personnel.update(5001, {"Text14": "new text here", "MiddleName": "Shaquille"})
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.data_models import PersonnelCreateData as pcd

  ccure = CcureAPI()
  new_person_data = pcd(FirstName="Kenny", LastName="Smith", Text1="001132808")
  ccure.personnel.create(new_person_data)
  ```



  ```python
  from acslib import CcureAPI


  ccure = CcureAPI()
  ccure.personnel.delete(6008)
  ```





  ```python
  from acslib import CcureAPI

  ccure = CcureAPI()
  response = ccure.clearance.search(["suite", "door"])
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.filters import ClearanceFilter, NFUZZ


  ccure = CcureAPI()
  search_filter = ClearanceFilter(lookups={"ObjectID": NFUZZ})
  response = ccure.clearance.search([8897], search_filter=search_filter)
  ```





  ```python
  from acslib import CcureAPI

  ccure = CcureAPI()
  response = ccure.credential.search()
  ```



  ```python
  from acslib import CcureAPI


  ccure = CcureAPI()
  response = ccure.credential.search(["charles", "barkley"])
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.filters import CredentialFilter, NFUZZ


  ccure = CcureAPI()
  search_filter = CredentialFilter(lookups={"ObjectID": NFUZZ})
  response = ccure.credential.search([5001], search_filter=search_filter)
  ```



  ```python
  from acslib import CcureAPI


  ccure = CcureAPI()
  response = ccure.credential.update(5001, {"CardInt1": 12345})
  ```



  Clearance items include "door" and "elevator."



  ```python
  from acslib import CcureAPI
  from acslib.ccure.types import ObjectType


  ccure = CcureAPI()
  response = ccure.clearance_item.search(ObjectType.DOOR.complete, ["hall", "interior"])
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.filters import ClearanceItemFilter, NFUZZ
  from acslib.ccure.types import ObjectType


  ccure = CcureAPI()
  search_filter = ClearanceItemFilter(lookups={"ObjectID": NFUZZ})
  response = ccure.clearance_item.search(ObjectType.ELEVATOR.complete, [5000], search_filter=search_filter)
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.types import ObjectType

  ccure = CcureAPI()
  response = ccure.clearance_item.update(ObjectType.DOOR.complete, 5000, update_data={"Name": "new door name 123"})
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.data_models import ClearanceItemCreateData
  from acslib.ccure.types import ObjectType


  ccure = CcureAPI()
  new_elevator_data = ClearanceItemCreateData(
      Name="New elevator 1",
      Description="newest elevator in town",
      ParentID=5000,
      ParentType="SoftwareHouse.NextGen.Common.SecurityObjects.iStarController",
      ControllerID=5000,
      ControllerClassType="SoftwareHouse.NextGen.Common.SecurityObjects.iStarController"
  )
  response = ccure.clearance_item.create(ObjectType.ELEVATOR.complete, create_data=new_elevator_data)
  ```



  ```python
  from acslib import CcureAPI
  from acslib.ccure.types import ObjectType


  ccure = CcureAPI()
  response = ccure.clearance_item.delete(ObjectType.DOOR.complete, 5000)
  ```





  ```python
  from acslib import CcureAPI
  from acslib.ccure.filters import CcureFilter, NFUZZ


  ccure = CcureAPI()
  schedule_type_full = "SoftwareHouse.CrossFire.Common.Objects.TimeSpec"
  search_filter = CcureFilter()
  response = ccure.ccure_object.search(
      object_type=schedule_type_full,
      search_filter=search_filter,
      terms=[5001]
  )
  ```



  Use `ccure.action` to perform some common tasks like assigning or revoking clearances or getting personnel images.



  ```python
  from acslib import CcureAPI


  ccure = CcureAPI()
  response = ccure.action.personnel.assign_clearances(
      personnel_id=5005,
      clearance_ids=[5002, 5003],
  )
  ```


pkgId: ed9cf54c6b93ec5115bddbc1ad73e24048e9a5c3e36be6cdff41f031aaff5bf5
name: python-acsoo
arch: src
version: 3.4.1
epoch: 0
release: 1
summary: Acsone Odoo Dev Tools
url: https://pypi.org/project/acsoo/
rpm_license: GPLv3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acsoo-3.4.1-1.src.rpm
checksum_type: sha256
description:
  This is a set of command-line utilities to facilitate
  the Odoo development workflow at Acsone.
  It assumes the project is a setuptools-based python package
  that can be packaged and installed with pip.
  Criteria for tools to be included here:
  * being small wrappers around standard commands (``git``, ``pip``, etc)
  * yet being sufficiently non-trivial to be error-prone or time consuming when
    done manually
  * being used across several Acsone Odoo projects
  Installation
  ~~~~~~~~~~~~
     pip install --user acsoo
  or
     pipx install acsoo
     Since ``acsoo`` has a lot of dependencies that are not required at runtime,
     for your application, it is not recommanded to install it in the same
     virtualenv as your project.
  To enable bash completion, add this line in your ``.bashrc``:
       eval "$(_ACSOO_COMPLETE=source acsoo)"
  What we have here
  ~~~~~~~~~~~~~~~~~
  Below, the list of available commands with a few examples.
  Use ``acsoo --help`` or ``acsoo <command> --help`` for more information.


pkgId: ce87781046a74f03c3f645a349bf0562acbc76d20b2ece09c2c900322f0499af
name: python-acstore
arch: src
version: 20240407
epoch: 0
release: 1
summary: Attribute Container Storage (ACStore).
url: https://github.com/log2timeline/acstore
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acstore-20240407-1.src.rpm
checksum_type: sha256
description:
  ACStore, or Attribute Container Storage, provides a stand-alone implementation to read and write attribute container storage files.


pkgId: c75c697f3848b7f2c8446e01327761fdbffa04f657133b6608821008c58e7c17
name: python-acsylla
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: A high performance asynchronous Cassandra and ScyllaDB client
url: http://github.com/acsylla/acsylla
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-acsylla-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/acsylla/acsylla/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/acsylla/acsylla/actions/workflows/ci.yml)
  [![CI](https://github.com/acsylla/acsylla/actions/workflows/release.yml/badge.svg?branch=v0.1.7a0)](https://github.com/acsylla/acsylla/actions/workflows/release.yml)
  [![PyPI](https://img.shields.io/pypi/v/acsylla.svg)](https://pypi.org/project/acsylla/)
  [![Number of PyPI downloads](https://img.shields.io/pypi/dm/acsylla.svg)](https://pypi.org/project/acsylla/)
  [![Documentation Status](https://readthedocs.org/projects/acsylla/badge/?version=latest)](https://acsylla.readthedocs.io/en/latest/)


  A composition of ***async*** + ***cassandra*** + ***scylla*** words.



  Under the hood **_acsylla_** has modern, feature-rich and shard-aware [C/C++ client](https://github.com/scylladb/cpp-driver) library for [Cassandra](https://cassandra.apache.org) and [ScyllaDB](https://www.scylladb.com).


    * [Features](#features)
    * [Compatibility](#compatibility)
    * [Install](#install)
    * [Cluster](#cluster)
      * [Configuration options](#configuration-options)
      * [Configuration methods](#configuration-methods)
    * [Session](#session)
    * [Statement](#statement)
    * [PreparedStatement](#preparedstatement)
    * [Batch](#batch)
    * [Result](#result)
    * [Row](#row)
    * [Logger](#logger)
    * [Examples](#examples)
      * [Basic usage](#basic-usage)
      * [Binding Parameters](#binding-parameters)
        * [Non Prepared Statement](#non-prepared-statement)
        * [Prepared Statement](#prepared-statement)
      * [Use prepared statement and paging](#use-prepared-statement-and-paging)
      * [Configure Shard-Awareness connection](#configure-shard-awareness-connection-to-scylladb-cluster)
      * [SSL Example](#ssl-example)
      * [Retrieving metadata](#retrieving-metadata)
      * [Configure logging](#configure-logging)
        * [Set log level](#set-log-level)
        * [Set callback for capture log messages](#set-callback-for-capture-log-messages)
      * [Execution profiles](#execution-profiles)
      * [Tracing](#tracing)
      * [Host State Changes](#host-state-changes)
    * [Developing](#developing)




  * Shard-Awareness
  * Asynchronous API
  * Simple, Prepared, and Batch statements
  * Asynchronous I/O, parallel execution, and request pipelining
  * Connection pooling
  * Automatic node discovery
  * Automatic reconnection
  * Configurable load balancing
  * Works with any cluster size
  * Authentication
  * SSL
  * Latency-aware routing
  * Performance metrics
  * Tuples and UDTs
  * Nested collections
  * Retry policies
  * Client-side timestamps
  * Data types
  * Idle connection heartbeats
  * Support for materialized view and secondary index metadata
  * Support for clustering key order, `frozen<>` and Cassandra version metadata
  * Whitelist/blacklist DC, and whitelist/blacklist hosts load balancing policies
  * Custom authenticators
  * Reverse DNS with SSL peer identity verification support
  * Randomized contact points
  * Speculative execution



  This driver works exclusively with the Cassandra Query Language v3 (CQL3) and
  Cassandra's native protocol. The current version works with:

  * Scylla and Scylla Enterprise
  * Apache Cassandra® versions 2.1, 2.2 and 3.0+
  * Python 3.7, 3.8, 3.9, 3.10 and 3.11 for Linux and MacOS



  There is an Beta realease compabitble with Python 3.7, 3.8, 3.9, 3.10 and 3.11 for Linux and MacOS environments uploaded as a Pypi package. Use the following
  command for installing it:

  ```bash
  pip install acsylla
  ```


  You can build your own package for any supported python version for ***x86_64*** and ***aarch64*** Linux.

  Example for build wheel for Python 3.12 ***x86_64*** from master branch
  ```bash
  git clone https://github.com/acsylla/acsylla.git
  cd acsylla
  docker run -v `pwd`:/io -e PYTHON_VERSION=3.12  quay.io/pypa/manylinux_2_28_x86_64  /io/bin/build_manylinux_2_28_wheel.sh
  ```

  Example for build wheel for Python 3.12 ***aarch64*** from master branch
  ```bash
  git clone https://github.com/acsylla/acsylla.git
  cd acsylla
  docker run --platform linux/arm64 -v `pwd`:/io -e PYTHON_VERSION=3.12  quay.io/pypa/manylinux_2_28_aarch64  /io/bin/build_manylinux_2_28_wheel.sh
  ```



  The `Cluster` object describes a Cassandra/ScyllaDB cluster’s configuration.
  The ***default cluster object is good for most clusters*** and only requires a single
  or multiple list of contact points in order to establish a session connection.
  ***For example:***
  `cluster = acsylla.create_cluster('127.0.0.1, 127.0.0.2')`

  Once a session is connected using a cluster object its configuration is constant.

  Modifying the cluster object configuration once a session is established does not alter the session’s configuration.



  List of named arguments to configure cluster with  `acsylla.create_cluster` helper.

  - ***contact_points:*** Sets contact points. This MUST be set. White space is striped from the contact points.
      *Examples:* “127.0.0.1”,  “127.0.0.1,127.0.0.2”, “server1.domain.com”

  - ***port:*** Sets the port.
      *Default:* 9042

  - ***local_address:*** Sets the local address to bind when connecting to the
      cluster, if desired. IP address to bind, or empty string for no
      binding. Only numeric addresses are supported; no resolution is done.

  - ***local_port_range_min:*** Sets the range of outgoing port numbers (ephemeral
      ports) to be used when establishing the shard-aware connections. This
      is applicable when the routing of connection to shard is based on the
      client-side port number.
      When application connects to multiple CassCluster-s it is advised
      to assign mutually non-overlapping port intervals to each. It is assumed
      that the supplied range is allowed by the OS (e.g. it fits inside
      /proc/sys/net/ipv4/ip_local_port_range on *nix systems)
      *Default:* `49152`

  - ***local_port_range_max:*** See `local_port_range_min`
      *Default:* `65535`

  - ***username:*** Set username for plain text authentication.

  - ***password:*** Set password for plain text authentication.

  - ***connect_timeout:*** Sets the timeout for connecting to a node.
      *Default:* `5` seconds

  - ***request_timeout:*** Sets the timeout for waiting for a response from a node.
      Use 0 for no timeout.
      *Default:* `12` seconds

  - ***resolve_timeout:*** Sets the timeout for waiting for DNS name resolution.
      *Default:* `2` seconds

  - ***log_level:*** Sets the log level.
      Available levels:
    - `disabled`
    - `critical`
    - `error`
    - `warn`
    - `info`
    - `debug`
    - `trace`

    *Default:* `warn`

  - ***logging_callback:*** Sets a callback function to catch log messages.
      *Default:* An internal logger with "acsylla" name.
      `logging.getLogger('acsylla')`

  - ***ssl_enable:*** Enable SSL connection
      *Default:* `False`

  - ***ssl_cert:*** Set client-side certificate chain. This is used to authenticate
      the client on the server-side. This should contain the entire
      Certificate chain starting with the certificate itself

  - ***ssl_private_key:*** Set client-side private key. This is used to authenticate
      the client on the server-side.

  - ***ssl_private_key_password:*** Password for `ssl_private_key`

  - ***ssl_trusted_cert:*** Adds a trusted certificate. This is used to verify the
      peer’s certificate.

  - ***ssl_verify_flags:*** Sets verification performed on the peer’s certificate.
      - `NONE` No verification is performed
      - `PEER_CERT` Certificate is present and valid
      - `PEER_IDENTITY` IP address matches the certificate’s common name or one
            of its subject alternative names. This implies the certificate is
            also present.
      - `PEER_IDENTITY_DNS` Hostname matches the certificate’s common name or
            one of its subject alternative names. This implies the certificate
            is also present.
        *Default:* `PEER_CERT`

  - ***protocol_version:*** Sets the protocol version. The driver will automatically
      downgrade to the lowest supported protocol version.
      *Default:* `acsylla.ProtocolVersion.V4` or `acsylla.ProtocolVersion.DSEV1` when
      using the DSE driver with DataStax Enterprise.

  - ***use_beta_protocol_version:*** Use the newest beta protocol version. This
      currently enables the use of protocol version `cyacsylla.ProtocolVersion.V5`
      or `cyacsylla.ProtocolVersion.DSEV2` when using the DSE driver with
      DataStax Enterprise.
      *Default:* `False`

  - ***consistency:*** Sets default consistency level of statement. `acsylla.Consistency`
      *Default:* `LOCAL_ONE`

  - ***serial_consistency:*** Sets default serial consistency level of statement. `acsylla.Consistency`
      *Default:* `ANY`

  - ***queue_size_io:*** Sets the size of the fixed size queue that stores pending
      requests.
      *Default:* `8192`

  - ***num_threads_io:*** Sets the number of IO threads. This is the number of threads that
      will handle query requests.
      *Default:* `1`

  - ***core_connections_per_host:*** Sets the number of connections made to each
      server in each IO thread.
      *Default:* `1`

  - ***constant_reconnect_delay_ms:*** Configures the cluster to use a reconnection
      policy that waits a constant time between each reconnection attempt.
      Time in milliseconds to delay attempting a reconnection; 0 to perform
      a reconnection immediately.
      *Default:* Not set

  - ***exponential_reconnect_base_delay_ms:*** The base delay (in milliseconds) to
      use for scheduling reconnection attempts.
      Configures the cluster to use a reconnection policy that waits
      exponentially longer between each reconnection attempt; however will
      maintain a constant delay once the maximum delay is reached.
      *Note:* A random amount of jitter (+/- 15%) will be added to the pure
      exponential delay value. This helps to prevent situations where
      multiple connections are in the reconnection process at exactly the
      same time. The jitter will never cause the delay to be less than the
      base delay, or more than the max delay.
      *Default:* `2000`

  - ***exponential_reconnect_max_delay_ms:*** The maximum delay to wait between two
      reconnection attempts. See `exponential_reconnect_max_delay_ms`
      *Default:* `60000`

  - ***coalesce_delay_us:*** Sets the amount of time, in microseconds, to wait for
      new requests to coalesce into a single system call. This should be set
      to a value around the latency SLA of your application’s requests while
      also considering the request’s roundtrip time. Larger values should be
      used for throughput bound workloads and lower values should be used for
      latency bound workloads.
      *Default:* `200` us

  - ***new_request_ratio:*** Sets the ratio of time spent processing new requests
      versus handling the I/O and processing of outstanding requests. The
      range of this setting is 1 to 100, where larger values allocate more
      time to processing new requests and smaller values allocate more time
      to processing outstanding requests.
      *Default:* `50`

  - ***max_schema_wait_time_ms:*** Sets the maximum time to wait for schema
      agreement after a schema change is made (e.g. creating, altering,
      dropping a table/keyspace/view/index etc).
      *Default:* `10000` milliseconds

  - ***tracing_max_wait_time_ms:*** Sets the maximum time to wait for tracing data to become available.
      *Default:* `15` milliseconds

  - ***tracing_retry_wait_time_ms:*** Sets the amount of time to wait between attempts to check to see if tracing is available.
      *Default:*  `3` milliseconds

  - ***tracing_consistency:*** Sets the consistency level to use for checking to see if tracing data is available.
      *Default:* `ONE`

  - ***load_balance_round_robin:*** Configures the cluster to use round-robin load
      balancing. The driver discovers all nodes in a cluster and cycles
      through them per request. All are considered local.

  - ***load_balance_dc_aware:*** The primary data center to try first.
      Configures the cluster to use DC-aware load balancing. For each query,
      all live nodes in a primary ‘local’ DC are tried first, followed by any
      node from other DCs.
      *Note:* This is the default, and does not need to be called unless
      switching an existing from another policy or changing settings. Without
      further configuration, a default local_dc is chosen from the first
      connected contact point, and no remote hosts are considered in query
      plans. If relying on this mechanism, be sure to use only contact points
      from the local DC.

  - ***load_balance_rack_aware_dc:*** Configures the cluster to use Rack-aware load
      balancing.
      For each query, all live nodes in a primary 'local' rack are tried first,
      followed by nodes from local DC and then nodes from other DCs.
      With empty local_rack and local_dc,  default local_dc and local_rack
      is chosen from the first connected contact point,
      and no remote hosts are considered in query plans.
      If relying on this mechanism, be sure to use only contact
      points from the local rack.

  - ***load_balance_rack_aware_rack:*** Configures the cluster to use Rack-aware load
      balancing.
      For each query, all live nodes in a primary 'local' rack are tried first,
      followed by nodes from local DC and then nodes from other DCs.
      With empty local_rack and local_dc,  default local_dc and local_rack
      is chosen from the first connected contact point,
      and no remote hosts are considered in query plans.
      If relying on this mechanism, be sure to use only contact
      points from the local rack.

  - ***token_aware_routing:*** Configures the cluster to use token-aware request
      routing or not. This routing policy composes the base routing policy,
      routing requests first to replicas on nodes considered ‘local’ by the
      base load balancing policy.
      *Important:* Token-aware routing depends on keyspace metadata. For this
      reason enabling token-aware routing will also enable retrieving and
      updating keyspace schema metadata.
      *Default:* `True` (enabled).

  - ***token_aware_routing_shuffle_replicas:*** Configures token-aware routing to
      randomly shuffle replicas. This can reduce the effectiveness of
      server-side caching, but it can better distribute load over replicas
      for a given partition key.
      *Note:* Token-aware routing `token_aware_routing` must be enabled for the
      setting to be  applicable.
      *Default:* `True` (enabled).

  - ***latency_aware_routing:*** Configures the cluster to use latency-aware request
      routing or not. This routing policy is a top-level routing policy. It
      uses the base routing policy to determine locality (dc-aware) and/or
      placement (token-aware) before considering the latency.
      *Default:* `False` (disabled).

  - ***latency_aware_routing_settings:*** Configures the settings for latency-aware
      request routing. Instance of `acsylla.LatencyAwareRoutingSettings`
      *Default:*
      - `exclusion_threshold` ***2.0*** *Controls how much worse the latency
                                        be compared to the average latency of
                                        the best performing node before it
                                        penalized.*
      - `scale_ms` ***100 milliseconds*** *Controls the weight given to older
                                        latencies when calculating the average
                                        latency of a node. A bigger scale will
                                        give more weight to older latency
                                        measurements.*
      - `retry_period_ms` ***10,000 milliseconds*** *The amount of time a node is
                                        penalized by the policy before being
                                        given a second chance when the current
                                        average latency exceeds the calculated
                                        threshold (exclusion_threshold *
                                        best_average_latency).*
      - `update_rate_ms` ***100 milliseconds*** *The rate at which the best
                                        average latency is recomputed.*
      - `min_measured` ***50*** *The minimum number of measurements per-host
                                        required to be considered by the policy*

  - ***whitelist_hosts:*** Sets whitelist hosts. The first call sets the whitelist
      hosts and any subsequent calls appends additional hosts. Passing an
      empty string will clear and disable the whitelist. White space is
      striped from the hosts.
      This policy filters requests to all other policies, only allowing
      requests to the hosts contained in the whitelist. Any host not in the
      whitelist will be ignored and a connection will not be established.
      This policy is useful for ensuring that the driver will only connect to
      a predefined set of hosts.
      *Examples*: “127.0.0.1”, “127.0.0.1,127.0.0.2”

  - ***blacklist_hosts:*** Sets blacklist hosts. The first call sets the blacklist
      hosts and any subsequent calls appends additional hosts. Passing an
      empty string will clear and disable the blacklist. White space is
      striped from the hosts.
      This policy filters requests to all other policies, only allowing
      requests to the hosts not contained in the blacklist. Any host in the
      blacklist will be ignored and a connection will not be established.
      This policy is useful for ensuring that the driver will not connect to
      a predefined set of hosts.
      *Examples*: “127.0.0.1”, “127.0.0.1,127.0.0.2”

  - ***whitelist_dc:*** Same as `whitelist_hosts`, but whitelist all hosts of a dc
      *Examples*: “dc1”, “dc1,dc2”

  - ***blacklist_dc:*** Same as `blacklist_hosts`, but blacklist all hosts of a dc
      *Examples*: “dc1”, “dc1,dc2”

  - ***tcp_nodelay:*** Enable/Disable Nagle’s algorithm on connections.
      *Default:* True

  - ***tcp_keepalive_sec:*** Set keep-alive delay in seconds.
      *Default:* disabled

  - ***timestamp_gen:*** "server_side" or "monotonic" Sets the timestamp generator
      used to assign timestamps to all requests unless overridden by setting
      the timestamp on a statement or a batch.
      *Default:* Monotonically increasing, client-side timestamp generator.

  - ***heartbeat_interval_sec:*** Sets the amount of time between heartbeat messages
      and controls the amount of time the connection must be idle before
      sending heartbeat messages. This is useful for preventing intermediate
      network devices from dropping connections.
      *Default:* 30 seconds

  - ***idle_timeout_sec:*** Sets the amount of time a connection is allowed to be
      without a successful heartbeat response before being terminated and
      scheduled for reconnection.
      *Default:* 60 seconds

  - ***retry_policy:*** May be set to `default` or `fallthrough` Sets the retry policy used for
      all requests unless overridden by setting a retry policy on a statement
      or a batch.
      - `default` This policy retries queries in the following cases:
        - On a read timeout, if enough replicas replied but data was not received.
        - On a write timeout, if a timeout occurs while writing the distributed batch log
        - On unavailable, it will move to the next host
        - In all other cases the error will be returned. This policy always uses the query’s original consistency level.
      - `fallthrough` This policy never retries or ignores a server-side
          failure. The error is always returned.

      *Default:* `default` This policy will retry on a read timeout if there
      was enough replicas, but no data present, on a write timeout if a
      logged batch request failed to write the batch log, and on a
      unavailable error it retries using a new host. In all other cases the
      default policy will return an error.

  - ***retry_policy_logging:*** This policy logs the retry decision of its child
      policy. Logging is done using INFO level.
      *Default:* False

  - ***use_schema:*** Enable/Disable retrieving and updating schema metadata. If
      disabled this is allows the driver to skip over retrieving and updating
      schema metadata and `session.get_metadata()` will
      always return an empty object. This can be useful for reducing the
      startup overhead of short-lived sessions.
      *Default:* True (enabled)

  - ***hostname_resolution:*** Enable retrieving hostnames for IP addresses
      using reverse IP lookup. This is useful for authentication (Kerberos)
      or encryption (SSL) services that require a valid hostname for
      verification.
      *Default:* False (disabled)

  - ***randomized_contact_points:*** Enable/Disable the randomization of the contact
      points list.
      *Important:* This setting should only be disabled for debugging or tests.
      *Default:* True (enabled)

  - ***speculative_execution_policy:*** Enable constant speculative executions with
      the supplied settings `acsylla.SpeculativeExecutionPolicy`.

  - ***max_reusable_write_objects:*** Sets the maximum number of “pending write”
      objects that will be saved for re-use for marshalling new requests.
      These objects may hold on to a significant amount of memory and
      reducing the number of these objects may reduce memory usage of the
      application.
         The cost of reducing the value of this setting is potentially slower
      marshalling of requests prior to sending.
      *Default:* Max unsigned integer value

  - ***prepare_on_all_hosts:*** Prepare statements on all available hosts.
      *Default:* True

  - ***no_compact:*** Enable the NO_COMPACT startup option. This can help facilitate
      uninterrupted cluster upgrades where tables using COMPACT_STORAGE will
      operate in “compatibility mode” for BATCH, DELETE, SELECT, and UPDATE
      CQL operations.
      *Default:* False

  - ***host_listener_callback:*** Sets a callback for handling host state changes in
      the cluster.
      Note: The callback is invoked only when state changes in the cluster
      are applicable to the configured load balancing policy(s).

  - ***application_name:*** Set the application name. This is optional; however it
      provides the server with the application name that can aid in debugging
      issues with larger clusters where there are a lot of client (or
      application) connections.

  - ***application_version:*** Set the application version. This is optional;
      however it provides the server with the application version that can
      aid in debugging issues with large clusters where there are a lot of
      client (or application) connections that may have different versions
      in use.

  - ***client_id:*** Set the client id. This is optional; however it provides the
      server with the client ID that can aid in debugging issues with large
      clusters where there are a lot of client connections.
      *Default:* UUID v4 generated

  - ***monitor_reporting_interval_sec:*** Sets the amount of time between monitor
      reporting event messages.
      *Default:* 300 seconds.

  - ***cloud_secure_connection_bundle:*** Absolute path to DBaaS credentials file.
      Sets the secure connection bundle path for processing DBaaS credentials.
      This will pre-configure a cluster using the credentials format provided
      by the DBaaS cloud provider.
      *Note:* `contact_points` and `ssl_enable` should not used in conjunction
      with `cloud_secure_connection_bundle`.

      ***Example:*** "/path/to/secure-connect-database_name.zip"
      *Default:* None

  - ***dse_gssapi_authenticator:*** Enables GSSAPI authentication for DSE clusters
      secured with the DseAuthenticator.
      Instance of `acsylla.DseGssapiAuthenticator`

  - ***dse_gssapi_authenticator_proxy:*** Enables GSSAPI authentication with proxy
      authorization for DSE clusters secured with the DseAuthenticator.
      Instance of `acsylla.DseGssapiAuthenticatorProxy`

  - ***dse_plaintext_authenticator:*** Enables plaintext authentication for DSE
      clusters secured with the DseAuthenticator.
      Instance of `acsylla.DsePlaintextAuthenticator`

  - ***dse_plaintext_authenticator_proxy:*** Enables plaintext authentication with
      proxy authorization for DSE clusters secured with the DseAuthenticator.
      Instance of `acsylla.DsePlaintextAuthenticatorProxy`



  For full list of methods to configure `Cluster` see [base.py](./acsylla/base.py)



  A session object is used to execute queries and maintains cluster state through
  the control connection. The control connection is used to auto-discover nodes
  and monitor cluster changes (topology and schema). Each session also maintains
  multiple pools of connections to cluster nodes which are used to query the cluster.

  ```python
  import acsylla

  cluster = acsylla.create_cluster(['localhost'])
  session = await cluster.create_session(keyspace="acsylla")
  ```



  - ***async def close(self):***
   Closes the session instance, outputs a close future which can be used to
      determine when the session has been terminated. This allows in-flight
      requests to finish.

  - ***async def set_keyspace(self, keyspace: str) -> "Result":***
   Sets the keyspace for session

  - ***def get_client_id(self) -> str:***
   Get the client id.

  - ***def get_metadata(self):***
   Returns `Metadata` instance class for retrieving metadata from cluster.

  - ***async def create_prepared(self, statement: str, timeout: Optional[float] = None) -> PreparedStatement:***
   Create a prepared statement.
   By providing a `timeout` all requests built by the prepared statement will use it, otherwise timeout provided during the `Cluster` instantantation will be used. Value expected is seconds.

  - ***async def execute(self, statement: "Statement") -> Result***
   Executes an statement and returns the `Result` instance.

  - ***async def execute_batch(self, batch: Batch) -> Result:***
   Executes a batch of statements.

  - ***def metrics(self) -> SessionMetrics:***
   Returns the metrics related to the session.

  - ***def speculative_execution_metrics(self) -> SpeculativeExecutionMetrics:***
   Returns speculative execution performance metrics gathered by the driver.



  A statement object is an executable query. It represents either a regular
  (adhoc) statement or a prepared statement. It maintains the queries’ parameter
  values along with query options (consistency level, paging state, etc.)



  - ***def add_key_index(self, index: int) -> None:***
   Adds a key index specifier to this a statement. When using
      token-aware routing, this can be used to tell the driver which
      parameters within a non-prepared, parameterized statement are part of
      the partition key.
   Use consecutive calls for composite partition keys.
   This is not necessary for prepared statements, as the key parameters
      are determined in the metadata processed in the prepare phase.

  - ***def reset_parameters(self, count: int) -> None:***
   Clear and/or resize the statement’s parameters.

  - ***def bind(self, index: int, value: SupportedType) -> None:***
  Binds the value to a specific index parameter.
  If an invalid type is used for a prepared statement this will raise
      immediately an error. If a none prepared exception is used error will
      be raised later during the execution statement.
  If an invalid index is used this will raise immediately an error

  - ***def bind_by_name(self, name: str, value: SupportedType) -> None:***
  Binds the the value to a specific parameter by name.
  If an invalid type is used for this will raise immediately an error. If an
      invalid name is used this will raise immediately an error

  - ***def bind_list(self, values: Sequence[SupportedType]) -> None:***
  Binds the values into all parameters from left to right.
  For types supported and errors that this function might raise take
      a look at the `Statement.bind` function.

  - ***def bind_dict(self, values: Mapping[str, SupportedType]) -> None:***
  Binds the values into all parameter names. Names are the keys
      of the mapping provided.
  For types supported and errors that this function might raise take
      look at the `Statement.bind_dict` function.
  Note: This method are only allowed for statements created using
      prepared statements

  - ***def set_page_size(self, page_size: int) -> None:***
   Sets the statement's page size.

  - ***def set_page_state(self, page_state: bytes) -> None:***
   Sets the statement's paging state. This can be used to get the next
      page of data in a multi-page query.
   *Warning:* The paging state should not be exposed to or come from
      untrusted environments. The paging state could be spoofed and potentially
      used to gain access to other data.


  - ***def set_timeout(self, timeout: float) -> None:***
   Sets the statement's timeout in seconds for waiting for a response from a node.
   *Default:* Disabled (use the cluster-level request timeout)


  - ***def set_consistency(self, timeout: float) -> None:***
   Sets the statement’s consistency level.
   *Default:* LOCAL_ONE

  - ***def set_serial_consistency(self, timeout: float) -> None:***
   Sets the statement’s serial consistency level.
   *Default:* Not set

  - ***def set_timestamp(self, timestamp: int):***
   Sets the statement’s timestamp.

  - ***def set_is_idempotent(self, is_idempotent: bool):***
   Sets whether the statement is idempotent. Idempotent statements are
      able to be automatically retried after timeouts/errors and can be
      speculatively executed.

  - ***def set_retry_policy(self, retry_policy: str, retry_policy_logging: bool = False):***
   Sets the statement’s retry policy.
   May be set to `default` or `fallthrough`
      - `default` This policy retries queries in the following cases:
        - On a read timeout, if enough replicas replied but data was not received.
        - On a write timeout, if a timeout occurs while writing the distributed batch log
        - On unavailable, it will move to the next host
        - In all other cases the error will be returned. This policy always uses the query’s original consistency level.
      - `fallthrough` This policy never retries or ignores a server-side
          failure. The error is always returned.
      *Default:* `default` This policy will retry on a read timeout if there
      was enough replicas, but no data present, on a write timeout if a
      logged batch request failed to write the batch log, and on a
      unavailable error it retries using a new host. In all other cases the
      default policy will return an error.
      - `retry_policy_logging` If set to `True`, this policy logs the retry decision of its child
          policy. Logging is done using `INFO` level. *Default:* `False`

  - ***def set_tracing(self, enabled: bool = None):***
   Sets whether the statement should use tracing.

  - ***def set_host(self, host: str, port: int = 9042):***
   Sets a specific host that should run the query.
   In general, this should not be used, but it can be useful in the
      following situations:
   To query node-local tables such as system and virtual tables.
   To apply a sequence of schema changes where it makes sense for all
      the changes to be applied on a single node.

  - ***def set_execution_profile(self, name: str) -> None:***
   Sets the execution profile to execute the statement with.
      Note: Empty string will clear execution profile from statement

  - ***def set_execute_as(self, name: str) -> None:***
   Sets the name of the user to execute the statement as.




  A statement that has been prepared cluster-side (It has been pre-parsed and cached).



  Use the `session.create_prepared()` coroutine for creating a new instance of `PreparedStatement`.
  ```python
  prepared = await session.create_prepared("SELECT id, value FROM test")
  statement = prepared.bind(page_size=10)
  ```
  - ***def bind(self, page_size: Optional[int] = None, page_state: Optional[bytes] = None, execution_profile: Optional[str] = None,) -> Statement:***
   Returns a new `Statement` using the prepared.

  - ***def set_execution_profile(self, statement: Statement, name: str) -> None:***
   Sets the execution profile to execute the statement with.
   ***Note:*** Empty string will clear execution profile from statement


  A group of statements that are executed as a single batch.


  Use the `acsylla.create_batch_logged()`, `acsylla.create_batch_unlogged()` and
  `acsylla.create_batch_counter()` factories for creating a new instance.

  - ***def set_consistency(self, consistency: int):***
   Sets the batch’s consistency level

  - ***def set_serial_consistency(self, consistency: int):***
   Sets the batch’s serial consistency level.

  - ***def set_timestamp(self, timestamp: int):***
   Sets the batch’s timestamp.

  - ***def set_request_timeout(self, timeout_ms: int):***
   Sets the batch’s timeout for waiting for a response from a node.
   ***Default:*** Disabled (use the cluster-level request timeout)

  - ***def set_is_idempotent(self, is_idempotent):***
   Sets whether the statements in a batch are idempotent. Idempotent
      batches are able to be automatically retried after timeouts/errors and
      can be speculatively executed.

  - ***def set_retry_policy(self, retry_policy: str, retry_policy_logging: bool = False):***
   Sets the batch’s retry policy.
   May be set to `default` or `fallthrough`
      - `default` This policy retries queries in the following cases:
        - On a read timeout, if enough replicas replied but data was not received.
        - On a write timeout, if a timeout occurs while writing the distributed batch log
        - On unavailable, it will move to the next host
        - In all other cases the error will be returned. This policy always uses the query’s original consistency level.
      - `fallthrough` This policy never retries or ignores a server-side
          failure. The error is always returned.
      *Default:* `default` This policy will retry on a read timeout if there
      was enough replicas, but no data present, on a write timeout if a
      logged batch request failed to write the batch log, and on a
      unavailable error it retries using a new host. In all other cases the
      default policy will return an error.
      - `retry_policy_logging` If set to `True`, this policy logs the retry decision of its child
          policy. Logging is done using `INFO` level. *Default:* `False`

  - ***def set_tracing(self, enabled: bool):***
   Sets whether the batch should use tracing.

  - ***def add_statement(self, statement: Statement) -> None:***
   Adds a new statement to the batch.

  - ***def set_execution_profile(self, name: str) -> None:***
   Sets the execution profile to execute the statement with.
   *Note:* Empty string will clear execution profile from statement


  The result of a query.


  Provides a result instance class. Use the `session.execute()` coroutine for
  getting the result  from a query

  - ***def count(self) -> int:***
   Returns the total rows of the result

  - ***def column_count(self) -> int:***
   Returns the total columns returned

  - ***def columns_names(self):***
   Returns the columns names

  - ***def first(self) -> Optional["Row"]:***
   Return the first result, if there is no row returns None.

  - ***def all(self) -> Iterable["Row"]:***
   Return the all rows using of a result, using an iterator.
   If there is no rows iterator returns no rows.

  - ***def has_more_pages(self) -> bool:***
   Returns true if there is still pages to be fetched

  - ***def page_state(self) -> bytes:***
   Returns a token with the page state for continuing fetching
      new results.
   Before calling this method you must first checks if there are more
      results using the `has_more_pages` function, and if there are use the
      token returned by this function as an argument of the factories for creating
      an statement for returning the next page.


  A collection of column values.

  Provides access to a row of a `Result`.
  ```python
  result = await session.execute(statement)
  for row in result:
      print(row.as_dict())
  ```

  - ***def as_dict(self) -> dict:***
   Returns the row as dict.

  - ***def as_list(self) -> list:***
   Returns the row as list.

  - ***def as_tuple(self) -> tuple:***
   Returns the row as tuple.

  - ***def as_named_tuple(self) -> tuple:***
   Returns the row as named tuple.

  - ***def column_count(self) -> int:***
   Returns column count.

  - ***def column_value(self, name: str) -> SupportedType:***
   Returns the row column value called by `name`.
   Raises a `CassException` derived exception if the column can not be found
   Type is inferred by using the Cassandra driver
      and converted, if supported, to a Python type or one
      of the extended types provided by Acsylla.

  - ***def column_value_by_index(self, index):***
   Returns the column value by `column index`.
      Raises an exception if the column can not be found


  The driver’s logging system.


  Use the `acsylla.get_logger()` for acces to `Logger` instance.

  ```python
  logger = acsylla.get_logger()
  ```

  - ***def set_log_level(self, level: str) -> None:***
   Sets the log level.
   Available levels: `disabled`, `critical`, `error`, `warn`, `info`, `debug`, `trace`

  - ***set_logging_callback(self, callback: Callable) -> None:***
   Sets a callback function to catch log messages.
   *Default:* An internal logger with "acsylla" name.

  - ***def get_logger(self) -> None:***
   Returns python logger.




  The driver includes several examples in the [examples](./examples/) directory.



  The following snippet shows the minimal stuff that would be needed for creating a new ``Session``
  object for the keyspace ``acsylla`` and then peform a query for reading a set of rows.
  For more info see [base.py](./acsylla/base.py) and [factories.py](./acsylla/factories.py)
  Acsylla supports all native datatypes including `Collections` and `UDT`

  ```python
  import asyncio
  import acsylla

  async def main():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      statement = acsylla.create_statement("SELECT id, value FROM test WHERE id=100")
      result = await session.execute(statement)
      row = result.first()
      value = row.column_value("value")
      await session.close()

  asyncio.run(main())
  ```


  The ‘?’ marker is used to denote the bind variables in a query string.
  This can be used for both regular and prepared parameterized queries.


  In addition to adding the bind marker to your query string your application
  must also provide the number of bind variables to
  `acsylla.create_statement()` via `parameters` kwargs when constructing a new
  statement.

  ```python
  import asyncio
  import acsylla


  async def bind_by_index():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      statement = acsylla.create_statement(
          "INSERT INTO test (id, value) VALUES (?, ?)", parameters=2)
      statement.bind(0, 1)
      statement.bind(1, 1)
      await session.execute(statement)


  async def bind_list():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      statement = acsylla.create_statement(
          "INSERT INTO test (id, value) VALUES (?, ?)", parameters=2)
      statement.bind_list([1, 1])
      await session.execute(statement)

  asyncio.run(bind_by_index())
  asyncio.run(bind_list())
  ```


  Bind variables can be bound by the marker’s index or by name and must be
  supplied for all bound variables.

  ```python
  import asyncio
  import acsylla


  async def bind_by_index():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      prepared = await session.create_prepared("INSERT INTO test (id, value) VALUES (?, ?)")
      statement = prepared.bind()
      statement.bind(0, 1)
      statement.bind(1, 1)
      await session.execute(statement)


  async def bind_by_name():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      prepared = await session.create_prepared(
          "INSERT INTO test (id, value) VALUES (?, ?)")
      statement = prepared.bind()
      statement.bind_by_name("id", 1)
      statement.bind_by_name("value", 1)
      await session.execute(statement)


  async def bind_list():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      prepared = await session.create_prepared(
          "INSERT INTO test (id, value) VALUES (?, ?)")
      statement = prepared.bind()
      statement.bind_list([0, 1])
      await session.execute(statement)


  async def bind_dict():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      prepared = await session.create_prepared(
          "INSERT INTO test (id, value) VALUES (?, ?)")
      statement = prepared.bind()
      statement.bind_dict({'id': 1, 'value': 1})
      await session.execute(statement)


  async def bind_named_parameters():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      prepared = await session.create_prepared(
          "INSERT INTO test (id, value) VALUES (:test_id, :test_value)")
      statement = prepared.bind()
      statement.bind_dict({'test_id': 1, 'test_value': 1})
      await session.execute(statement)


  asyncio.run(bind_by_index())
  asyncio.run(bind_by_name())
  asyncio.run(bind_list())
  asyncio.run(bind_dict())
  asyncio.run(bind_named_parameters())
  ```



  ```python
  import asyncio
  import acsylla

  async def main():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      prepared = await session.create_prepared("SELECT id, value FROM test")
      statement = prepared.bind(page_size=10)
      while True:
          result = await session.execute(statement)
          print(result.columns_names())
          
          for row in result:
              print(dict(row))
              
              print(list(row))
              
              print(row.as_list())
              
              print(row.as_tuple())
              
          if result.has_more_pages():
              statement.set_page_size(100) # you can change statement settings on the fly
              statement.set_page_state(result.page_state())
          else:
              break

  asyncio.run(main())
  ```



  ```python
  import asyncio
  import acsylla

  class AsyncResultGenerator:
      def __init__(self, session, statement):
          self.session = session
          self.statement = statement

      async def __aiter__(self):
          result = await self.session.execute(self.statement)
          while True:
              if result.has_more_pages():
                  self.statement.set_page_state(result.page_state())
                  future_result = asyncio.create_task(
                      self.session.execute(self.statement))
                  await asyncio.sleep(0)
              else:
                  future_result = None
              for row in result:
                  yield dict(row)
              if future_result is not None:
                  result = await future_result
              else:
                  break
  def find(session, statement):
      return AsyncResultGenerator(session, statement)

  async def main():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      prepared = await session.create_prepared("SELECT id, value FROM test")

      statement = prepared.bind(page_size=10)

      async for res in find(session, statement):
          print(res)

  asyncio.run(main())
  ```



  ```python
  import acsylla

  cluster = acsylla.create_cluster(['node1', 'node2', 'node3'],
      port=19042,                 # default: 9042
      core_connections_per_host=8,# default: 1
      local_port_range_min=49152, # default: 49152
      local_port_range_max=65535  # default: 65535
  )
  ```



  ```python
  import acsylla

  with open('./certs/client.cert.pem') as f:
      ssl_cert = f.read()
  with open('./certs/client.key.pem') as f:
      ssl_private_key = f.read()
  with open('./certs/trusted.cert.pem') as f:
      ssl_trusted_cert = f.read()

  cluster = acsylla.create_cluster(
      ['localhost'],
      ssl_enabled=True,
      ssl_cert=ssl_cert,
      ssl_private_key=ssl_private_key,
      ssl_trusted_cert=ssl_trusted_cert,
      ssl_verify_flags=acsylla.SSLVerifyFlags.PEER_IDENTITY)
  ```



  ```python
  import asyncio
  import acsylla

  async def main():
      cluster = acsylla.create_cluster(['localhost'])
      session = await cluster.create_session(keyspace="acsylla")
      metadata = session.get_metadata()
      for keyspace in metadata.get_keyspaces():
          keyspace_metadata = metadata.get_keyspace_meta(keyspace)
          print('\n\n'.join(keyspace_metadata.as_cql_query(formatted=True)))
      await session.close()

  asyncio.run(main())
  ```





  Available levels: `disabled` `critical` `error` `warn` `info` `debug` `trace`

  ```python
  import logging
  import asyncio
  import acsylla

  logging.basicConfig(format="[1.1s s] (s) s")

  async def main():
      cluster = acsylla.create_cluster(['localhost'], log_level='trace')
      session = await cluster.create_session(keyspace="acsylla")
      cluster.set_log_level('info')
      await session.close()

  asyncio.run(main())
  ```



  ```python
  import asyncio
  import acsylla

  def on_log_message(msg):
      print(msg.time_ms,
            msg.log_level,
            msg.file,
            msg.line,
            msg.function,
            msg.message)

  async def main():
      cluster = acsylla.create_cluster(['localhost'],
                                       log_level='debug',
                                       logging_callback=on_log_message)
      session = await cluster.create_session(keyspace="acsylla")
      await session.close()

  asyncio.run(main())
  ```



  ```python
  import asyncio
  import acsylla

  async def main():
      cluster = acsylla.create_cluster(['localhost'])
      cluster.create_execution_profile(
          'test_profile',
          request_timeout=200,
          load_balance_round_robin=True,
          whitelist_hosts='localhost',
          retry_policy='default',
          retry_policy_logging=True,
      )
      session = await cluster.create_session(keyspace="acsylla")
      
      statement = acsylla.create_statement("SELECT id, value FROM test WHERE id=100", execution_profile="test_profile")
      
      statement.set_execution_profile('statement')
      await session.execute(statement)
      
      prepared = await session.create_prepared("SELECT id, value FROM test")
      statement = prepared.bind(execution_profile='test_profile')
      
      statement.set_execution_profile('test_profile')
      await session.execute(statement)
      
      batch = acsylla.create_batch(execution_profile="test_profile")
      
      batch.set_execution_profile("test_profile")
      await session.close()

  asyncio.run(main())
  ```



  ```python
  import acsylla
  import asyncio


  async def pint_tracing_result(session, tracing_id):
      print('*' * 10, tracing_id, '*' * 10)
      statement = acsylla.create_statement(
          "SELECT * FROM system_traces.sessions WHERE session_id = ?", 1)
      statement.bind(0, tracing_id)
      result = await session.execute(statement)
      for row in result:
          print("\n".join([f"\033[1m{k}:\033[0m {v}" for k, v in list(row)]))


  async def tracing_example():
      cluster = acsylla.create_cluster(["localhost"])
      session = await cluster.create_session()
      
      statement = acsylla.create_statement(
          "SELECT release_version FROM system.local")
      statement.set_tracing(True)
      result = await session.execute(statement)
      await pint_tracing_result(session, result.tracing_id)
      
      batch_statement1 = acsylla.create_statement(
          "INSERT INTO acsylla.test (id, value) VALUES (1, 1)")
      batch_statement2 = acsylla.create_statement(
          "INSERT INTO acsylla.test (id, value) VALUES (2, 2)")
      batch = acsylla.create_batch_logged()
      batch.add_statement(batch_statement1)
      batch.add_statement(batch_statement2)
      batch.set_tracing(True)
      result = await session.execute_batch(batch)
      await pint_tracing_result(session, result.tracing_id)


  asyncio.run(tracing_example())
  ```


  The status and membership of a node can change within the life-cycle of the cluster. A host listener callback can be used to detect these changes.


  ```python
  import acsylla
  import asyncio


  def host_listener_callback(event: acsylla.HostListenerEvent, host: str):
      if event == acsylla.HostListenerEvent.UP:
          print('Host', host, 'is UP')
      else:
          print(event.name, host)


  async def main():
      cluster = acsylla.create_cluster(["localhost"], host_listener_callback=host_listener_callback)
      session = await cluster.create_session(keyspace="acsylla")
      await session.close()


  asyncio.run(main())
  ```



  For developing you must clone the respository and first compile the CPP Cassandra driver, please
  follow the [instructions](https://docs.datastax.com/en/developer/cpp-driver/2.6/topics/building/>)
  for installing any dependency that you would need for compiling the driver:

  > **_NOTE:_**
      The driver depends on `libuv` and `openssl`. To install on Mac OS X, do `brew install libuv`
      and `brew install openssl` respectively. Additionally, you may need to export openssl lib
      locations: `export LDFLAGS="-L/opt/homebrew/lib"`
      and `export CPPFLAGS="-I/opt/homebrew/include"`.


  ```bash
  git clone git@github.com:acsylla/acsylla.git
  make install-driver
  ```

  Set up the environment and compile the package using the following commands:

  ```bash
  python -m venv venv
  source venv/bin/activate
  make compile
  make install-dev
  ```

  And finally run the tests:

  ```bash
  make cert
  docker-compose up -d
  make test
  ```


