# packages

pkgId: baf05e013ba8e7fe705a31b51decc8e6c24b10161e228e94ac7704872577adf5
name: python-ageqrp
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Query Results Parser (QRP) for Apache AGE database queries using psycopg
description: Query Results Parser (QRP) for Apache AGE database queries using psycopg
url: https://github.com/cjoakim/ageqrp
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ageqrp-0.1.0-1.src.rpm
checksum_type: sha256
rpm_license:
  MIT License  Copyright (c) 2024 Chris Joakim  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: d30aa3d437851528fd5a23c517aa1fd85795c829c0527e54d4f3bf4d19c4e7a4
name: python-agera5tools
arch: src
version: 2.0.16
epoch: 0
release: 1
summary: AgERA5 is a tool for handling AgERA5 data from the Copernicus Climate Data Store.
url: https://github.com/ajwdewit/agera5tools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agera5tools-2.0.16-1.src.rpm
checksum_type: sha256
description:
  Tools for mirroring, manipulating (exporting, extracting) and
  serving [AgERA5](https://doi.org/10.24381/cds.6c68c9bb) data.

  The agera5tools consist of a set of commandline scripts as well as the `agera5tools` python package
  which can be used to
  - set up a mirror for AgERA5 that can automatically build a
    local copy and keep it up to date with the latest AgERA5 data.
  - Allow operations on the downloaded NetCDF files directly such as dumping, point extraction and clipping
  - Serve AgERA5 data on web API through the HTTP protocol. By providing the latitude and longitude in the
    URL, agera5tools can retrieve the corresponding data and return it as JSON.




  The agera5 commandline tools currently have 8 options. The first four are for setting up and managing
  the local AgERA5 database:
  - *init* to generate a configuration file and initialize the set up.
  - *build* to download the relevant AgERA5 data from Copernicus Climate Data Store (CDS) and build the local database.
  - *mirror* to update the current database with new days from the CDS.
  - *serve* to serve AgERA5 data through a web API and return as JSON encoded data.

  The other four tools operate directly on the NetCDF files downloaded from the CDS.
  - *extract_point*: this can be used to extract a time-series of variables for a given location
  - *dump* which can be used to dump one day of AgERA5 data to CSV, JSON or SQLite
  - *clip* which can be used to extract a subset of AgERA5 data which will be written to a new NetCDF file.
  - *dump_grid* which dumps the AgERA5 grid definition to CSV, JSON or SQLite.



  ```Shell
  $ agera5tools init --help
  using config from /data/agera5/agera5tools.yaml
  Usage: agera5tools init [OPTIONS]

    Initializes AgERA5tools

    This implies the following:
     - Creating a template configuration file in the current directory
     - Creating a $HOME/.cdsapirc file for access to the CDS
     - Creating the database tables
     - Filling the grid table with the reference grid.

  Options:
    --help  Show this message and exit.
  ```



  ```Shell
  $ agera5tools build --help
  using config from /data/agera5/agera5tools.yaml
  Usage: agera5tools build [OPTIONS]

    Builds the AgERA5 database by bulk download from CDS

  Options:
    -d, --to_database  Load AgERA5 data into the database
    -c, --to_csv       Write AgERA5 data to compressed CSV files.
    --help             Show this message and exit.
  ```



  ```Shell
  $ agera5tools mirror --help
  using config from /data/agera5/agera5tools.yaml
  Usage: agera5tools mirror [OPTIONS]

    Incrementally updates the AgERA5 database by daily downloads from the CDS.

  Options:
    -c, --to_csv  Write AgERA5 data to compressed CSV files.
    --help        Show this message and exit.
  ```



  ```Shell
  $ agera5tools serve --help
  using config from /data/agera5/agera5tools.yaml
  Usage: agera5tools serve [OPTIONS]

    Starts the http server to serve AgERA5 data through HTTP

  Options:
    -p, --port INTEGER  Port to number to start listening, default=8080.
    --help              Show this message and exit.
  ```



  ```Shell
  $ agera5tools extract_point --help
  Usage: agera5tools extract_point [OPTIONS] AGERA5_PATH LONGITUDE LATITUDE
                                   STARTDATE ENDDATE
    Extracts AgERA5 data for given location and date range.

    AGERA5_PATH: path to the AgERA5 dataset
    LONGITUDE: the longitude for which to extract [dd, -180:180]
    LATITUDE: the latitude for which to extract [dd, -90:90]
    STARTDATE: the start date (yyyy-mm-dd, >=1979-01-01)
    ENDDATE: the last date (yyyy-mm-dd, <= 1 week ago)

  Options:
    -o, --output PATH  output file to write to: .csv, .json and .db3 (SQLite)
                       are supported.Giving no output will write to stdout in
                       CSV format

    --tocelsius        Convert temperature values from degrees Kelvin to Celsius
    --help             Show this message and exit.
  ```



  ```Shell
  $ agera5tools dump --help
  Usage: agera5tools dump [OPTIONS] AGERA5_PATH DAY

    Dump AgERA5 data for a given day to CSV, JSON or SQLite

    AGERA5_PATH: Path to the AgERA5 dataset
    DAY: specifies the day to be dumped (yyyy-mm-dd)

  Options:
    -o, --output PATH  output file to write to: .csv, .json and .db3 (SQLite)
                       are supported. Giving no output will write to stdout in
                       CSV format

    --tocelsius        Convert temperature values from degrees Kelvin to Celsius
    --add_gridid       Adds a grid ID instead of latitude/longitude columns.
    --bbox FLOAT...    Bounding box: <lon_min> <lon_max> <lat_min< <lat max>
    --help             Show this message and exit.
  ```



  ```Shell
  $ agera5tools clip --help
  Usage: agera5tools clip [OPTIONS] AGERA5_PATH DAY

    Extracts a portion of agERA5 for the given bounding box and saves to
    NetCDF.

    AGERA5_PATH: Path to the AgERA5 dataset
    DAY: specifies the day to be dumped (yyyy-mm-dd)

  Options:
    --base_fname TEXT      Base file name to use, otherwise will use
                           'agera5_clipped'

    -o, --output_dir PATH  Directory to write output to. If not provided, will
                           use current directory.

    --box FLOAT...         Bounding box: <lon_min> <lon_max> <lat_min< <lat max>
    --help                 Show this message and exit.
  ```



  ```Shell
  Usage: agera5tools dump_grid [OPTIONS]

    Dump the agERA5 grid to a CSV, JSON or SQLite DB.

  Options:
    -o, --output PATH  output file to write to: .csv, .json and .db3 (SQLite)
                       are supported.Giving no output will write to stdout in
                       CSV format

    --help             Show this message and exit.

  ```



  The shell commands described above can also be used from python directly by importing the agera5tools package.
  Their working is nearly identical as the shell commands. The major difference is that the python functions
  return either datasets (clip) or dataframes (extract_point, dump, dump_grid). An example for the `clip` function:

  ```python
  In [1]: import datetime as dt
     ...: import agera5tools
     ...: from agera5tools.util import BoundingBox
     ...: day = dt.date(2018,1,1)
     ...: bbox = BoundingBox(lon_min=87, lon_max=90, lat_min=24, lat_max=27)
     ...: ds = agera5tools.clip(day, bbox)
     ...:

  In [2]: ds
  Out[2]:
  <xarray.Dataset>
  Dimensions:                            (time: 1, lon: 30, lat: 30)
  Coordinates:
    * time                               (time) datetime64[ns] 2018-01-01
    * lon                                (lon) float64 87.1 87.2 ... 89.9 90.0
    * lat                                (lat) float64 26.9 26.8 ... 24.1 24.0
  Data variables:
      Precipitation_Flux                 (time, lat, lon) float32 dask.array<chunksize=(1, 30, 30), meta=np.ndarray>
      Solar_Radiation_Flux               (time, lat, lon) float32 dask.array<chunksize=(1, 30, 30), meta=np.ndarray>
      Temperature_Air_2m_Max_Day_Time    (time, lat, lon) float32 dask.array<chunksize=(1, 30, 30), meta=np.ndarray>
      Temperature_Air_2m_Mean_24h        (time, lat, lon) float32 dask.array<chunksize=(1, 30, 30), meta=np.ndarray>
      Temperature_Air_2m_Min_Night_Time  (time, lat, lon) float32 dask.array<chunksize=(1, 30, 30), meta=np.ndarray>
      Vapour_Pressure_Mean               (time, lat, lon) float32 dask.array<chunksize=(1, 30, 30), meta=np.ndarray>
      Wind_Speed_10m_Mean                (time, lat, lon) float32 dask.array<chunksize=(1, 30, 30), meta=np.ndarray>
  Attributes:
      CDI:          Climate Data Interface version 1.9.2 (http://mpimet.mpg.de/...
      history:      Fri Mar 12 15:04:43 2021: cdo splitday /archive/ESG/wit015/...
      Conventions:  CF-1.7
      CDO:          Climate Data Operators version 1.9.2 (http://mpimet.mpg.de/...
  ```

  It works in a very similar way for the `extract_point` function:

  ```python
  In[6]: from agera5tools.util import Point

  In[7]: pnt = Point(latitude=26, longitude=89)
  In[8]: df = agera5tools.extract_point(pnt, startday=dt.date(2018, 1, 1), endday=dt.date(2018, 1, 31)),
  In [7]: df.head(5)
  Out[7]:
            day  precipitation_flux  solar_radiation_flux  ...  temperature_air_2m_min_night_time  vapour_pressure_mean  wind_speed_10m_mean
  0  2018-01-01                0.31              13282992  ...                          12.156799             11.809731             1.317589
  1  2018-01-02                1.91              13646220  ...                          12.342041             11.711860             1.416075
  2  2018-01-03                0.14              14817991  ...                          11.064514             11.198871             1.524268
  3  2018-01-04                0.03              14131904  ...                          10.861877             11.413278             1.566405
  4  2018-01-05                0.07              14315206  ...                          12.292969             10.984181             1.597181

  [5 rows x 8 columns]
  ```

  Note that extracting point data for a long timeseries can be time-consuming because all netCDF files have to be opened, decompressed and the point extracted.




  The agera5tools package requires python >=3.8 and has a number of dependencies:
  - pandas == 1.4.1
  - PyYAML >= 6.0
  - Pandas >= 1.5
  - SQLAlchemy >= 1.4
  - PyYAML >= 6.0
  - xarray >= 2022.12.0
  - dask >= 2022.7.0
  - click >= 8.1
  - flask >= 2.2
  - cdsapi >= 0.5.1
  - dotmap >= 1.3
  - netCDF4 >= 1.6
  - requests >= 2.28
  - wsgiserver >= 1.3

  Lower versions of dependencies may work, but have not been tested.



  Installing `agera5tools` can be done through the github repository to get the latest version:

  ```shell script
  pip install https://github.com/ajwdewit/agera5tools/archive/refs/heads/main.zip
  ```

  or directory from PyPI:

  ```shell script
  pip install agera5tools
  ```


pkgId: b3a3e1a8992c164633f57ecec784815b0bab74843af26064a5f5081c94755aff
name: python-aget
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Aget - An Asynchronous Downloader
url: https://github.com/PeterDing/aget
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aget-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [中文](https://github.com/PeterDing/aget/blob/master/README_zh.md)

  Aget is an asynchronous downloader operated in command-line, running on Python > 3.5.

  It supports HTTP(S), using [httpx](https://github.com/encode/httpx) request library.

  Aget continues downloading a partially downloaded file as default.



  ```shell
  $ pip3 install aget
  ```



  ```shell
  aget https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png


  aget https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png -o 'google.png'


  aget https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png -H "User-Agent: Mozilla/5.0" -H "Accept-Encoding: gzip"


  aget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.tar.xz -s 10


  aget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.tar.xz -k 1M
  ```



  ```shell
  -o OUT, --out OUT             # output path
  -H HEADER, --header HEADER    # request header
  -X METHOD, --method METHOD    # request method
  -d DATA, --data DATA          # request data
  -t TIMEOUT, --timeout TIMEOUT # timeout
  -s CONCURRENCY, --concurrency CONCURRENCY   # concurrency
  -k CHUCK_SIZE, --chuck_size CHUCK_SIZE      # request range size
  ```





  Use environment variable `AGET_LOG_LEVEL` to setting logging level.
  The default level is `CRITICAL`.


pkgId: 6043a08c58cde94784800e8fedaddbcba9abe84a102e5238e29679fce9498ba0
name: python-agfusion
arch: src
version: 1.4.3
epoch: 0
release: 1
summary: Python package to annotate and visualize gene fusions.
url: https://github.com/murphycj/AGFusion
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agfusion-1.4.3-1.src.rpm
checksum_type: sha256
description:
  [![test](https://img.shields.io/github/v/release/murphycj/agfusion)](https://img.shields.io/github/v/release/murphycj/agfusion)
  [![test](https://img.shields.io/github/last-commit/murphycj/agfusion)](https://img.shields.io/github/last-commit/murphycj/agfusion)
  [![Downloads](https://pepy.tech/badge/agfusion)](https://pepy.tech/project/agfusion)
  [![Unit tests](https://github.com/murphycj/AGFusion/actions/workflows/test.yaml/badge.svg)](https://github.com/murphycj/AGFusion/actions/workflows/test.yaml)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
  [![DOI](https://img.shields.io/badge/DOI-10.1101%2F080903-lightgrey.svg?style=flat-square)](http://dx.doi.org/10.1101/080903)
  [![Citations: 21](https://img.shields.io/badge/citations-21-brightgreen)](https://scholar.google.com/scholar?cites=10329835253652722473&as_sdt=5,33&sciodt=0,33&hl=en)



  **Checkout the webapp:** [https://www.agfusion.app](https://www.agfusion.app)

  AGFusion (pronounced 'A G Fusion') is a python package for annotating gene fusions from the human or mouse genomes. AGFusion simply needs the reference genome, the two gene partners, and the fusion junction coordinates as input, and outputs the following:

  * FASTA files of cDNA, CDS, and protein sequences.
  * Visualizes the protein domain and exon architectures of the fusion transcripts.
  * Saves tables listing the coordinates of protein features and exons included in the fusion.
  * Optional exon structure and protein domain visualization of the wild-type  version of the fusion gene partners.

  Some other things to know:

  * AGFusion automatically predicts the functional effect of the gene fusion (e.g. in-frame, out-of-frame, etc.).
  * Annotation is by default done only for canonical gene isoforms, but there is the option to annotate all gene non-canonical isoform combinations.
  * All gene and protein annotation is from Ensembl
  * Supports up to Ensembl release 95




  - [Installation](#installation)
  - [Dependencies](#dependencies)
  - [Examples](#examples)
    * [Basic Usage](#basic-usage)
    * [Plotting wild-type protein and exon structure](#plotting-wild-type-protein-and-exon-structure)
    * [Canonical gene isoforms](#canonical-gene-isoforms)
    * [Input from fusion-finding algorithms](#input-from-fusion-finding-algorithms)
    * [Graphical parameters](#graphical-parameters)
  - [Building your own database](#building-your-own-database)
  - [Troubleshooting](#troubleshooting)
  - [License](#license)
  - [Citing AGFusion](#citing-agfusion)



  **Step 1:** Install AGFusion.

  ```
  pip install agfusion
  ```

  **Step 2:** Download your desired pyensembl reference genome database. For example:

  ```
  For GRCh38/hg38:
  pyensembl install --species homo_sapiens --release 95

  For GRCh37/hg19:
  pyensembl install --species homo_sapiens --release 75

  For GRCm38/mm10:
  pyensembl install --species mus_musculus --release 87
  ```

  **Step 3:** Finally, download your desired AGFusion database.

  ```
  For GRCh38/hg38:
  agfusion download -g hg38

  For GRCh37/hg19:
  agfusion download -g hg19

  For GRCm38/mm10:
  agfusion download -g mm10
  ```

  You can view all supported species and ensembl releases with ```agfusion download -a```.



  * Python 3.7 or higher
  * Python package dependencies are listed in [requirements.txt](https://github.com/murphycj/AGFusion/blob/master/requirements.txt).





  You just need to provide the two fusion gene partners (gene symbol, Ensembl ID, or Entrez gene ID), their predicted fusion junctions in genomic coordinates, and the genome build. You can also specify certain transcripts with Ensembl transcript ID or RefSeq ID

  Example usage from the command line:

  ```
  agfusion annotate \
    --gene5prime DLG1 \
    --gene3prime BRAF \
    --junction5prime 31684294 \
    --junction3prime 39648486 \
    -db agfusion.mus_musculus.87.db \
    -o DLG1-BRAF
  ```

  The protein domain structure of the DLG1-BRAF fusion:

  ![alt tag](https://github.com/murphycj/AGFusion/blob/master/doc/ENSMUST00000064477-ENSMUST00000002487.png)

  The exon structure of the DLG1-BRAF fusion:

  ![alt tag](https://github.com/murphycj/AGFusion/blob/master/doc/ENSMUST00000064477-ENSMUST00000002487.exon.png)



  You can additionally plot the wild-type proteins and exon structures for each gene with --WT flag.

  ```
  agfusion annotate \
     -g5 ENSMUSG00000022770 \
     -g3 ENSMUSG00000002413 \
     -j5 31684294 \
     -j3 39648486 \
     -db agfusion.mus_musculus.87.db \
     -o DLG1-BRAF \
     --WT
  ```



  By default AGFusion only plots the [canonical](http://useast.ensembl.org/Help/Glossary?id=346) gene isoforms, but you can tell AGFusion to include non-canonical isoform with the --noncanonical flag.

  ```
  agfusion annotate \
    -g5 ENSMUSG00000022770 \
    -g3 ENSMUSG00000002413 \
    -j5 31684294 \
    -j3 39648486 \
    -db agfusion.mus_musculus.87.db \
    -o DLG1-BRAF \
    --noncanonical
  ```



  You can provide as input output files from fusion-finding algorithms. Currently supported algorithms are:

  * [Arriba](https://github.com/suhrig/arriba)
  * Bellerophontes
  * BreakFusion
  * ChimeraScan
  * ChimeRScope
  * [deFuse](https://github.com/amcpherson/defuse)
  * EricScript
  * [FusionCatcher](https://github.com/ndaniel/fusioncatcher)
  * FusionHunter
  * FusionMap
  * InFusion
  * [JAFFA](https://github.com/Oshlack/JAFFA)
  * [LongGF](https://github.com/WGLab/LongGF)
  * MapSplice (only if --gene-gtf specified)
  * [STAR-Fusion](https://github.com/STAR-Fusion/STAR-Fusion)
  * TopHat-Fusion



  Below is an example for FusionCatcher.

  ```
  agfusion batch \
    -f final-list_candidate-fusion-genes.txt \
    -a fusioncatcher \
    -o test \
    -db agfusion.mus_musculus.87.db
  ```



  You can change domain names and colors:

  ```
  agfusion annotate \
    -g5 ENSMUSG00000022770 \
    -g3 ENSMUSG00000002413 \
    -j5 31684294 \
    -j3 39648486 \
    -db agfusion.mus_musculus.87.db \
    -o DLG1-BRAF \
    --recolor "Pkinase_Tyr;red" --recolor "L27_1;blue" \
    --rename "Pkinase_Tyr;Kinase" --rename "L27_1;L27"
  ```

  ![alt tag](https://github.com/murphycj/AGFusion/blob/master/doc/ENSMUST00000064477-ENSMUST00000002487-recolorRename.png)

  You can rescale the protein length so that images of two different fusions have appropriate relative lengths when plotted side by side:

  ```
  agfusion annotate \
    -g5 ENSMUSG00000022770 \
    -g3 ENSMUSG00000002413 \
    -j5 31684294 \
    -j3 39648486 \
    -db agfusion.mus_musculus.87.db \
    -o DLG1-BRAF \
    --recolor "Pkinase_Tyr;red" --recolor "L27_1;blue" \
    --rename "Pkinase_Tyr;Kinase" --rename "L27_1;L27" \
    --scale 2000
  agfusion annotate \
    -g5 FGFR2 \
    -g3 DNM3 \
    -j5 130167703 \
    -j3 162019992 \
    -db agfusion.mus_musculus.87.db \
    -o FGFR2-DNM3 \
    --recolor "Pkinase_Tyr;red" \
    --rename "Pkinase_Tyr;Kinase" \
    --scale 2000
  ```

  ![alt tag](https://github.com/murphycj/AGFusion/blob/master/doc/ENSMUST00000064477-ENSMUST00000002487-rescale.png)
  ![alt tag](https://github.com/murphycj/AGFusion/blob/master/doc/ENSMUST00000122054-ENSMUST00000070330-rescale.png)


  AGFusion uses a pre-built SQLite database to annotation gene fusions; in addition to data from pyensembl. The SQLite databases are stored on AWS S3.

  Follow the steps below if you want to build your own SQLite database:

  (1) Install [mysqlclient](https://github.com/PyMySQL/mysqlclient).

  (2) Download and unzip the PFAM reference file: [https://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam-A.clans.tsv.gz](https://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam-A.clans.tsv.gz)

  (3) Install your desired pyensembl reference genome. For example: `pyensembl install --release 111`.

  (4) Build the AGFusion database: `agfusion build -d . -s homo_sapiens -r 111 --pfam Pfam-A.clans.tsv`



  **(1) Problem:** I get a warning message like the following:


  > 2017-08-28 15:02:51,377 - AGFusion - WARNING - No cDNA sequence available for AC073283.4! Will not print cDNA sequence for the AC073283.4-MSH2 fusion. You might be working with an outdated pyensembl. Update the package and rerun 'pyensembl install'

  **Solution:** Run the following to update pyensembl package and database:

  ```
  git clone git@github.com:hammerlab/pyensembl.git
  cd pyensembl
  sudo pip install .
  pyensembl install --release (your-release) --species (your-species)
  ```

  **(2) Problem:** Cannot run `agfusion download` due to `URLError`.
  When downloading the database you may run into this error:
  ```
  urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>
  ```

  **Solution:**
  A potential solution for Mac users is from [here](https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error). You can run the following command:

  ```
  /Applications/Python\ 3.8/Install\ Certificates.command
  ```




  MIT license



  You can cite bioRxiv: http://dx.doi.org/10.1101/080903


pkgId: 250d0563f4cb7766ac2e3975739e86dfe79dd0d905c4ed6a6d2594e7ecef5f8f
name: python-aggPy
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: Calculate network properties from MD trajectory
url: https://github.com/Corcellilab/Phosphates/tree/main/aggPy
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aggPy-0.3.0-1.src.rpm
checksum_type: sha256
rpm_license:
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. " " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 0ebc040364965e9466ce6f0e4e766df26974c02b8be6c3209a57693d1cac8c5b
name: python-aggie-unterprise
arch: src
version: 1.0.7
epoch: 0
release: 1
summary: A Python package for extracting and processing grant data from AggieEnterprise spreadsheets.
url: https://github.com/dave-doty/aggie-unterprise
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aggie-unterprise-1.0.7-1.src.rpm
checksum_type: sha256
description:
  This document is intended to be read on [github](https://github.com/dave-doty/aggie-unterprise#readme). Some of what appears below does not render properly on other websites such as pypi.org.



  * [Installation](#installation)
  * [Overview](#overview)
  * [Examples](#examples)
  * [API](#api)
  * [Standalone program](#standalone-program)




  This assumes you have [Python](https://www.python.org/) installed (and [pip](https://pip.pypa.io/en/stable/installation/), which comes with Python unless you have a very old Python distribution). At a command prompt (e.g., cmd or Powershell in Windows, terminal in Linux or Max), type
  ```
  pip install aggie-unterprise
  ````
  If you don't want to install Python or write Python code, some functionality is available through a downloadable [standalone program](#standalone-program).



  This is an example of a useful summary of research grant funds:


  | Project Name                       |     Expenses |       Salary |      Travel |   Supplies |      Fringe |   Fellowship |     Indirect |      Balance |       Budget |
  |------------------------------------|--------------|--------------|-------------|------------|-------------|--------------|--------------|--------------|--------------|
  | INDIRECT COST RETURN               |       \$0.00 |       \$0.00 |      \$0.00 |     \$0.00 |      \$0.00 |       \$0.00 |       \$0.00 |     \$904.00 |     \$904.00 |
  | DISCRETIONARY FUNDS                |       \$0.00 |       \$0.00 |      \$0.00 |     \$0.00 |      \$0.00 |       \$0.00 |       \$0.00 |   \$2,500.00 |   \$2,500.00 |
  | NSF Engineering DNA and RNA        |  \$61,316.61 |  \$34,800.00 |      \$0.00 |   \$133.40 |  \$3,263.70 |       \$0.00 |  \$23,119.51 | \$318,683.39 | \$380,000.00 |
  | NSF CAREER Chemical Computation    | \$468,000.72 | \$211,746.21 | \$33,334.25 | \$8,847.54 | \$58,519.35 |   \$5,166.81 | \$150,386.56 |  \$17,180.28 | \$485,181.00 |
  | REU CAREER Chemical Computation    |  \$44,062.63 |  \$43,180.29 |      \$0.00 |     \$0.00 |    \$882.34 |       \$0.00 |       \$0.00 |  \$18,750.37 |  \$62,813.00 |
  | DOE Office of Science Basic Energy |  \$15,045.49 |   \$8,642.86 |      \$0.00 |     \$0.00 |    \$760.57 |       \$0.00 |   \$5,642.06 |  \$51,372.51 |  \$66,418.00 |

  [AggieEnterprise](https://aggieenterprise.ucdavis.edu/) is a software system used by [UC Davis](https://www.ucdavis.edu/), whose purpose is bury this useful information beneath mountains of gibberish, resulting in a spreadsheet filled with useless trash like this:

  ![AggieEnterprise spreadsheet screenshot](images/spreadsheet.png)

  The aggie_unterprise Python package helps you, the **AGGIE**, to **UN**do this en**TERPRIS**ing feat. It sifts through the trash to find the important data related to your grants.



  Suppose you have generated a spreadsheet from AggieEnterprise named `2024-8-1.xlsx` following [these instructions](https://servicehub.ucdavis.edu/servicehub?id=ucd_kb_article&sys_id=cc1942f61b32c6d80e0b2068b04bcbbf). The following code:

  ```python
  from aggie_unterprise import Summary
  summary = Summary.from_file('2024-8-1.xlsx')
  print(f'Totals for {summary.month()} {summary.year()}')
  print(summary)
  ```

  will print something like this:

  ```
  Totals for August 2024
  ╭────────────────────────────────────┬─────────────┬─────────────┬────────────┬────────────┬────────────┬──────────────┬─────────────┬─────────────┬─────────────╮
  │ Project Name                       │    Expenses │      Salary │     Travel │   Supplies │     Fringe │   Fellowship │    Indirect │     Balance │      Budget │
  ├────────────────────────────────────┼─────────────┼─────────────┼────────────┼────────────┼────────────┼──────────────┼─────────────┼─────────────┼─────────────┤
  │ INDIRECT COST RETURN               │       $0.00 │       $0.00 │      $0.00 │      $0.00 │      $0.00 │        $0.00 │       $0.00 │     $904.00 │     $904.00 │
  │ DISCRETIONARY FUNDS                │       $0.00 │       $0.00 │      $0.00 │      $0.00 │      $0.00 │        $0.00 │       $0.00 │   $2,500.00 │   $2,500.00 │
  │ NSF Engineering DNA and RNA        │  $61,316.61 │  $34,800.00 │      $0.00 │    $133.40 │  $3,263.70 │        $0.00 │  $23,119.51 │ $318,683.39 │ $380,000.00 │
  │ NSF CAREER Chemical Computation    │ $468,000.72 │ $211,746.21 │ $33,334.25 │  $8,847.54 │ $58,519.35 │    $5,166.81 │ $150,386.56 │  $17,180.28 │ $485,181.00 │
  │ REU CAREER Chemical Computation    │  $44,062.63 │  $43,180.29 │      $0.00 │      $0.00 │    $882.34 │        $0.00 │       $0.00 │  $18,750.37 │  $62,813.00 │
  │ DOE Office of Science Basic Energy │  $15,045.49 │   $8,642.86 │      $0.00 │      $0.00 │    $760.57 │        $0.00 │   $5,642.06 │  $51,372.51 │  $66,418.00 │
  ╰────────────────────────────────────┴─────────────┴─────────────┴────────────┴────────────┴────────────┴──────────────┴─────────────┴─────────────┴─────────────╯
  ```

  The table summarizes expenses, broken down by type of expense, remaining balance, and original total budget, for each grant. These are the totals since the start of each grant.

  Since we sometimes care about monthly spending, we may want to know the *differences* between months, to indicate for instance, how much money was spent during July (e.g., $800 total spent by August - $600 total spent by July = $200 spent *during* July). The method `Summary.diff_table` gives this information:

  ```python
  from aggie_unterprise import Summary
  summary_aug = Summary.from_file('2024-8-1.xlsx')
  summary_jul = Summary.from_file('2024-7-1.xlsx')
  print(f'Difference between {summary_aug.month()} and {summary_jul.month()}')
  print(summary_aug.diff_table(summary_jul))
  ```

  ```
  Difference between August and July
  ╭────────────────────────────────────┬────────────┬────────────┬───────────┬────────────┬───────────┬──────────────┬────────────┬─────────────╮
  │ Project Name                       │   Expenses │     Salary │    Travel │   Supplies │    Fringe │   Fellowship │   Indirect │     Balance │
  ├────────────────────────────────────┼────────────┼────────────┼───────────┼────────────┼───────────┼──────────────┼────────────┼─────────────┤
  │ INDIRECT COST RETURN               │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  │ DISCRETIONARY FUNDS                │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  │ NSF Engineering DNA and RNA        │ $32,401.41 │ $18,300.00 │     $0.00 │     $13.40 │ $1,811.70 │        $0.00 │ $12,276.31 │ -$32,401.41 │
  │ NSF CAREER Chemical Computation    │ $14,347.87 │  $5,275.73 │ $3,504.27 │  $2,458.96 │   $100.24 │   -$3,826.31 │  $6,834.98 │  $62,178.13 │
  │ REU CAREER Chemical Computation    │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  │ DOE Office of Science Basic Energy │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  ╰────────────────────────────────────┴────────────┴────────────┴───────────┴────────────┴───────────┴──────────────┴────────────┴─────────────╯
  ```

  In the diff table, one would normal expect each entry under Balance (which represents a change in balance from July to August) to be the negative of the entry under Expenses (total amount of expenses between July and August), as in the project "NSF Engineering DNA and RNA". However, sometimes a grant agency will deposit new funds in between the dates (as happened in the "NSF CAREER Chemical Computation" entry above), so the change in balance and change in expenses are not always negatives of each other.

  You can also render the tables in Markdown in a Jupyter notebook, so they will appear similar to the first table shown at the top of this document. When you print/stringify a `Summary`, it calls a method called `table` (so `f'{summary}'` is equivalent to `f'{summary.table()}'`), which, along with the method `diff_table`, can take the `tablefmt` argument with value `'github'` to render the table appropriately for Markdown (`'github'` means ["GitHub-flavored Markdown"](https://github.github.com/gfm/), which [Jupyter](https://jupyter.org/) can render nicely):

  ```python
  from aggie_unterprise import Summary, summary_diff_table, summary_table

  summary_aug = Summary.from_file('2024-8-5.xlsx')
  summary_jul = Summary.from_file('2024-7-11.xlsx')

  from IPython.display import display, Markdown
  display(Markdown(f"""\

  {summary_aug.table(tablefmt='github')}

  {summary_jul.table(tablefmt='github')}

  {summary_aug.diff_table(summary_jul, tablefmt='github')}
  """))
  ```

  In general, you can pass any value to `tablefmt` that the [tabulate](https://pypi.org/project/tabulate/) package expects in its function tabulate: https://github.com/astanin/python-tabulate?tab=readme-ov-file#table-format.

  Finally, you can customize a bit how to clean up project names. They are taken either from the column "Project Name" in the spreadsheet for sponsored (external) grant, or the column "Task/Subtask Name" for internal funds (e.g., startup grants or indirect cost return), since the project names for internal grants tend to be identical (for the CS department for me, they are all named "David Doty ENGR COMPUTER SCIENCE PPM Only").

  To clean up the project names, you can specify two arguments to the `Summary.from_file` method: `substrings_to_clean` and `suffixes_to_clean`. Any substring appearing in `substrings_to_clean` will be removed, for example if I set `substrings_to_clean=['CS', 'Doty']`, it will change the project name `"CS NSF Engineering DNA and RNA Doty K302325F33"` to `"NSF Engineering DNA and RNA K302325F33"`. Anything in `suffixes_to_clean` will be removed, not only that substring, but the entire rest of the name. For instance, if I set `suffixes_to_clean=['K3023']`, it will change `"NSF Engineering DNA and RNA  K302325F33"` to `"NSF Engineering DNA and RNA"`.

  I personally use them like this:
  ```python
  suffixes = ['K3023', 'DOTY DEFAULT PROJECT 13U00']
  substrings = ['Doty', 'CS ']
  summary_aug = Summary.from_file('2024-8-1.xlsx', substrings_to_clean=substrings, suffixes_to_clean=suffixes)
  ```
  due to the particular manner in which someone mashed their palm against the keyboard to generate the alien-looking project names of my own grants (e.g. "*CS NSF DNA and RNA Partic Support Doty K3023EDRNA*"), but you will want to customize according to the shape of your SPO representative's palm.


  [API documentation](https://aggie-unterprise.readthedocs.io/).



  If you do not want to install Python or write Python code, there is a standalone command-line program called aggie-report that can do some basic tasks. There are pre-compiled versions of aggie-report you can download:
  - [Windows](https://github.com/dave-doty/aggie-unterprise/releases/latest/download/aggie-report-win.exe) (save with file name `aggie-report.exe`)
  - [Linux](https://github.com/dave-doty/aggie-unterprise/releases/latest/download/aggie-report-linux) (save with file name `aggie-report`)
  - [macOS](https://github.com/dave-doty/aggie-unterprise/releases/latest/download/aggie-report-mac) (save with file name `aggie-report`)

  Open a command prompt in the directory where you saved the file.

  On Mac (respectively Linux), type `mv aggie-report-mac aggie-report` to rename then file to `aggie-report` (respectively `mv aggie-report-limux aggie-report` on Linux).

  On Mac and Linux, first type `chmod +x aggie-report` (after renaming the file to `aggie-report`) to make the program executable.

  On Mac, you must then type `xattr -d com.apple.quarantine ./aggie-report` to enable the program to run.

  Run `aggie-report -h` to see all the options.

  Alternately, you can [install Python](https://www.python.org/downloads/), install the package by typing `pip install aggie_unterprise`. After doing this, you will have a program named `aggie-report` you can use from any directory:

  ```
  $ aggie-report -d reports
  ```

  Assuming you have a subdirectory `reports` of your current directory with your AggieEnterprise reports in it, this will print to the screen a summary of each report, as well as a summary of differences between adjacent-in-creation-time reports. It sorts them in descending order of the date they were produced (so prints the latest one first).

  The other options are as follows, but in case this documentation gets outdated, run `aggie-report -h` to see the latest options:

  ```
  usage: aggie-report [-h] [-d DIRECTORY | -f FILE [FILE ...]] [-o OUTFILE] [-nd | -ni]
  [-s] [-sb SUBSTRING [SUBSTRING ...]] [-sf SUFFIX [SUFFIX ...]]
  [-sbf SUBSTRINGS_FILE] [-sff SUFFIXES_FILE]

  Processes reports generated by AggieEnterprise to summarize the useful data in them.
  By default it sorts the files by the date they were generated (according to cell A3
  inside the spreadsheet file), and in that order going backwards (so latest file is
  processed first), summarizes each file, as well as summarizing differences between
  adjacent files. If run with no arguments like this: `C:\reports> aggie-report`
  (or if you are using the Python script, `C:\reports> python aggie_report.py`)
  it will process all the .xlsx files in the current directory and print the results to
  the screen. Command line arguments can be used to customize this; type
  `aggie_report -h` to see all the options.

  options:
    -h, --help            show this help message and exit
    -d DIRECTORY, --directory DIRECTORY
                          directory to search for .xlsx files generated by AggieEnterprise.
                          All .xlsx files are processed; to process only some files,
                          list them explicitly after the flag -f. If neither -d nor -f
                          is given, all .xlsx files in the current directory are processed.
                          This option is mutually exclusive with -f.
    -f FILE [FILE ...], --files FILE [FILE ...]
                          List of one or more .xlsx files generated by AggieEnterprise.
                          To specify that all .xlsx files in a directory should be
                          processed, use the -d option. This option is mutually exclusive
                          with -d.
    -o OUTFILE, --outfile OUTFILE
                          Name of file to print output; if not specified, print output to
                          the screen.
    -nd, --no-diffs       If specified, do not include differences between adjacent files
                          in the output. This option is mutually exclusive with -ni.
    -ni, --no-individual  If specified, do not include summaries for individual files.
                          This option is mutually exclusive with -nd.
    -s, --sort-increasing-by-date
                          If specified, sort the files by date in increasing order instead
                          of the default, which is to sort by date in decreasing order.
    --sb SUBSTRING [SUBSTRING ...], --substrings SUBSTRING [SUBSTRING ...]
                          List of substrings to remove from the project name. This can
                          help clean up ugly project names like "NSF CAREER K20304932"
                          by specifying substring "K20304932", which would change the
                          project name to "NSF CAREER".
    --sf SUFFIX [SUFFIX ...], --suffixes SUFFIX [SUFFIX ...]
                          List of substrings to remove from the project name, as well
                          as the entire suffix from there to the end. This can help
                          clean up ugly project names like "NSF CAREER K302777" and
                          "NSF Small K302999" by specifying substring "K302", which
                          would change these project names "NSF CAREER" and "NSF
                          Small".
    --sbf SUBSTRINGS_FILE, --substrings-file SUBSTRINGS_FILE
                          Filename containing substrings (separated by whitespace or
                          newlines) to remove from the project name. This is like the
                          -sb option, but reads the substrings from a file so that you
                          do not have to type them all out at the command line and can
                          reuse them in multiple runs.
    --ssf SUFFIXES_FILE, --suffixes-file SUFFIXES_FILE
                          Filename containing substrings (separated by whitespace or
                          newlines) to remove from the project name, as well as the
                          entire suffix from there to the end. This is like the -sf
                          option, but reads the substrings from a file so that you do
                          not have to type them all out at the command line and can
                          reuse them in multiple runs.
  ```


pkgId: 9e813420f7da11e557f342d539125a2c762d8d60ad6ef3bcb77f01281c2b3a18
name: python-aggie-unterprise
arch: src
version: 1.0.8
epoch: 0
release: 1
summary: A Python package for extracting and processing grant data from AggieEnterprise spreadsheets.
url: https://github.com/dave-doty/aggie-unterprise
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aggie-unterprise-1.0.8-1.src.rpm
checksum_type: sha256
description:
  This document is intended to be read on [github](https://github.com/dave-doty/aggie-unterprise#readme). Some of what appears below does not render properly on other websites such as pypi.org.



  * [Installation](#installation)
  * [Overview](#overview)
  * [Examples](#examples)
  * [API](#api)
  * [Standalone program](#standalone-program)




  This assumes you have [Python](https://www.python.org/) installed (and [pip](https://pip.pypa.io/en/stable/installation/), which comes with Python unless you have a very old Python distribution). At a command prompt (e.g., cmd or Powershell in Windows, terminal in Linux or Max), type
  ```
  pip install aggie-unterprise
  ````
  If you don't want to install Python or write Python code, some functionality is available through a downloadable [standalone program](#standalone-program).



  This is an example of a useful summary of research grant funds:


  | Project Name                       |     Expenses |       Salary |      Travel |   Supplies |      Fringe |   Fellowship |     Indirect |      Balance |       Budget |
  |------------------------------------|--------------|--------------|-------------|------------|-------------|--------------|--------------|--------------|--------------|
  | INDIRECT COST RETURN               |       \$0.00 |       \$0.00 |      \$0.00 |     \$0.00 |      \$0.00 |       \$0.00 |       \$0.00 |     \$904.00 |     \$904.00 |
  | DISCRETIONARY FUNDS                |       \$0.00 |       \$0.00 |      \$0.00 |     \$0.00 |      \$0.00 |       \$0.00 |       \$0.00 |   \$2,500.00 |   \$2,500.00 |
  | NSF Engineering DNA and RNA        |  \$61,316.61 |  \$34,800.00 |      \$0.00 |   \$133.40 |  \$3,263.70 |       \$0.00 |  \$23,119.51 | \$318,683.39 | \$380,000.00 |
  | NSF CAREER Chemical Computation    | \$468,000.72 | \$211,746.21 | \$33,334.25 | \$8,847.54 | \$58,519.35 |   \$5,166.81 | \$150,386.56 |  \$17,180.28 | \$485,181.00 |
  | REU CAREER Chemical Computation    |  \$44,062.63 |  \$43,180.29 |      \$0.00 |     \$0.00 |    \$882.34 |       \$0.00 |       \$0.00 |  \$18,750.37 |  \$62,813.00 |
  | DOE Office of Science Basic Energy |  \$15,045.49 |   \$8,642.86 |      \$0.00 |     \$0.00 |    \$760.57 |       \$0.00 |   \$5,642.06 |  \$51,372.51 |  \$66,418.00 |

  [AggieEnterprise](https://aggieenterprise.ucdavis.edu/) is a software system used by [UC Davis](https://www.ucdavis.edu/), whose purpose is bury this useful information beneath mountains of gibberish, resulting in a spreadsheet filled with useless trash like this:

  ![AggieEnterprise spreadsheet screenshot](images/spreadsheet.png)

  The aggie_unterprise Python package helps you, the **AGGIE**, to **UN**do this en**TERPRIS**ing feat. It sifts through the trash to find the important data related to your grants.



  Suppose you have generated a spreadsheet from AggieEnterprise named `2024-8-1.xlsx` following [these instructions](https://servicehub.ucdavis.edu/servicehub?id=ucd_kb_article&sys_id=cc1942f61b32c6d80e0b2068b04bcbbf). The following code:

  ```python
  from aggie_unterprise import Summary
  summary = Summary.from_file('2024-8-1.xlsx')
  print(f'Totals for {summary.month()} {summary.year()}')
  print(summary)
  ```

  will print something like this:

  ```
  Totals for August 2024
  ╭────────────────────────────────────┬─────────────┬─────────────┬────────────┬────────────┬────────────┬──────────────┬─────────────┬─────────────┬─────────────╮
  │ Project Name                       │    Expenses │      Salary │     Travel │   Supplies │     Fringe │   Fellowship │    Indirect │     Balance │      Budget │
  ├────────────────────────────────────┼─────────────┼─────────────┼────────────┼────────────┼────────────┼──────────────┼─────────────┼─────────────┼─────────────┤
  │ INDIRECT COST RETURN               │       $0.00 │       $0.00 │      $0.00 │      $0.00 │      $0.00 │        $0.00 │       $0.00 │     $904.00 │     $904.00 │
  │ DISCRETIONARY FUNDS                │       $0.00 │       $0.00 │      $0.00 │      $0.00 │      $0.00 │        $0.00 │       $0.00 │   $2,500.00 │   $2,500.00 │
  │ NSF Engineering DNA and RNA        │  $61,316.61 │  $34,800.00 │      $0.00 │    $133.40 │  $3,263.70 │        $0.00 │  $23,119.51 │ $318,683.39 │ $380,000.00 │
  │ NSF CAREER Chemical Computation    │ $468,000.72 │ $211,746.21 │ $33,334.25 │  $8,847.54 │ $58,519.35 │    $5,166.81 │ $150,386.56 │  $17,180.28 │ $485,181.00 │
  │ REU CAREER Chemical Computation    │  $44,062.63 │  $43,180.29 │      $0.00 │      $0.00 │    $882.34 │        $0.00 │       $0.00 │  $18,750.37 │  $62,813.00 │
  │ DOE Office of Science Basic Energy │  $15,045.49 │   $8,642.86 │      $0.00 │      $0.00 │    $760.57 │        $0.00 │   $5,642.06 │  $51,372.51 │  $66,418.00 │
  ╰────────────────────────────────────┴─────────────┴─────────────┴────────────┴────────────┴────────────┴──────────────┴─────────────┴─────────────┴─────────────╯
  ```

  The table summarizes expenses, broken down by type of expense, remaining balance, and original total budget, for each grant. These are the totals since the start of each grant.

  Since we sometimes care about monthly spending, we may want to know the *differences* between months, to indicate for instance, how much money was spent during July (e.g., $800 total spent by August - $600 total spent by July = $200 spent *during* July). The method `Summary.diff_table` gives this information:

  ```python
  from aggie_unterprise import Summary
  summary_aug = Summary.from_file('2024-8-1.xlsx')
  summary_jul = Summary.from_file('2024-7-1.xlsx')
  print(f'Difference between {summary_aug.month()} and {summary_jul.month()}')
  print(summary_aug.diff_table(summary_jul))
  ```

  ```
  Difference between August and July
  ╭────────────────────────────────────┬────────────┬────────────┬───────────┬────────────┬───────────┬──────────────┬────────────┬─────────────╮
  │ Project Name                       │   Expenses │     Salary │    Travel │   Supplies │    Fringe │   Fellowship │   Indirect │     Balance │
  ├────────────────────────────────────┼────────────┼────────────┼───────────┼────────────┼───────────┼──────────────┼────────────┼─────────────┤
  │ INDIRECT COST RETURN               │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  │ DISCRETIONARY FUNDS                │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  │ NSF Engineering DNA and RNA        │ $32,401.41 │ $18,300.00 │     $0.00 │     $13.40 │ $1,811.70 │        $0.00 │ $12,276.31 │ -$32,401.41 │
  │ NSF CAREER Chemical Computation    │ $14,347.87 │  $5,275.73 │ $3,504.27 │  $2,458.96 │   $100.24 │   -$3,826.31 │  $6,834.98 │  $62,178.13 │
  │ REU CAREER Chemical Computation    │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  │ DOE Office of Science Basic Energy │      $0.00 │      $0.00 │     $0.00 │      $0.00 │     $0.00 │        $0.00 │      $0.00 │       $0.00 │
  ╰────────────────────────────────────┴────────────┴────────────┴───────────┴────────────┴───────────┴──────────────┴────────────┴─────────────╯
  ```

  In the diff table, one would normal expect each entry under Balance (which represents a change in balance from July to August) to be the negative of the entry under Expenses (total amount of expenses between July and August), as in the project "NSF Engineering DNA and RNA". However, sometimes a grant agency will deposit new funds in between the dates (as happened in the "NSF CAREER Chemical Computation" entry above), so the change in balance and change in expenses are not always negatives of each other.

  You can also render the tables in Markdown in a Jupyter notebook, so they will appear similar to the first table shown at the top of this document. When you print/stringify a `Summary`, it calls a method called `table` (so `f'{summary}'` is equivalent to `f'{summary.table()}'`), which, along with the method `diff_table`, can take the `tablefmt` argument with value `'github'` to render the table appropriately for Markdown (`'github'` means ["GitHub-flavored Markdown"](https://github.github.com/gfm/), which [Jupyter](https://jupyter.org/) can render nicely):

  ```python
  from aggie_unterprise import Summary, summary_diff_table, summary_table

  summary_aug = Summary.from_file('2024-8-5.xlsx')
  summary_jul = Summary.from_file('2024-7-11.xlsx')

  from IPython.display import display, Markdown
  display(Markdown(f"""\

  {summary_aug.table(tablefmt='github')}

  {summary_jul.table(tablefmt='github')}

  {summary_aug.diff_table(summary_jul, tablefmt='github')}
  """))
  ```

  In general, you can pass any value to `tablefmt` that the [tabulate](https://pypi.org/project/tabulate/) package expects in its function tabulate: https://github.com/astanin/python-tabulate?tab=readme-ov-file#table-format.

  Finally, you can customize a bit how to clean up project names. They are taken either from the column "Project Name" in the spreadsheet for sponsored (external) grant, or the column "Task/Subtask Name" for internal funds (e.g., startup grants or indirect cost return), since the project names for internal grants tend to be identical (for the CS department for me, they are all named "David Doty ENGR COMPUTER SCIENCE PPM Only").

  To clean up the project names, you can specify two arguments to the `Summary.from_file` method: `substrings_to_clean` and `suffixes_to_clean`. Any substring appearing in `substrings_to_clean` will be removed, for example if I set `substrings_to_clean=['CS', 'Doty']`, it will change the project name `"CS NSF Engineering DNA and RNA Doty K302325F33"` to `"NSF Engineering DNA and RNA K302325F33"`. Anything in `suffixes_to_clean` will be removed, not only that substring, but the entire rest of the name. For instance, if I set `suffixes_to_clean=['K3023']`, it will change `"NSF Engineering DNA and RNA  K302325F33"` to `"NSF Engineering DNA and RNA"`.

  I personally use them like this:
  ```python
  suffixes = ['K3023', 'DOTY DEFAULT PROJECT 13U00']
  substrings = ['Doty', 'CS ']
  summary_aug = Summary.from_file('2024-8-1.xlsx', substrings_to_clean=substrings, suffixes_to_clean=suffixes)
  ```
  due to the particular manner in which someone mashed their palm against the keyboard to generate the alien-looking project names of my own grants (e.g. "*CS NSF DNA and RNA Partic Support Doty K3023EDRNA*"), but you will want to customize according to the shape of your SPO representative's palm.


  [API documentation](https://aggie-unterprise.readthedocs.io/).



  If you do not want to install Python or write Python code, there is a standalone command-line program called aggie-report that can do some basic tasks. There are pre-compiled versions of aggie-report you can download:
  - [Windows](https://github.com/dave-doty/aggie-unterprise/releases/latest/download/aggie-report-win.exe) (save with file name `aggie-report.exe`)
  - [Linux](https://github.com/dave-doty/aggie-unterprise/releases/latest/download/aggie-report-linux) (save with file name `aggie-report`)
  - [macOS](https://github.com/dave-doty/aggie-unterprise/releases/latest/download/aggie-report-mac) (save with file name `aggie-report`)

  Open a command prompt in the directory where you saved the file.

  On Mac (respectively Linux), type `mv aggie-report-mac aggie-report` to rename the file to `aggie-report` (respectively `mv aggie-report-limux aggie-report` on Linux).

  On Mac and Linux, type `chmod +x aggie-report` (after renaming the file to `aggie-report`) to make the program executable.

  On Mac, you must then type `xattr -d com.apple.quarantine ./aggie-report` to enable the program to run.

  Run `aggie-report -h` to see all the options.

  Alternately, you can [install Python](https://www.python.org/downloads/), then install the package by typing `pip install aggie_unterprise`. After doing this, you will have a program named `aggie-report` you can use from any directory:

  ```
  $ aggie-report -d reports
  ```

  Assuming you have a subdirectory `reports` of your current directory with your AggieEnterprise reports in it, this will print to the screen a summary of each report, as well as a summary of differences between adjacent-in-creation-time reports. It sorts them in descending order of the date they were produced (so prints the latest one first).

  The other options are as follows, but in case this documentation gets outdated, run `aggie-report -h` to see the latest options:

  ```
  usage: aggie-report [-h] [-d DIRECTORY | -f FILE [FILE ...]] [-o OUTFILE] [-nd | -ni]
  [-s] [-sb SUBSTRING [SUBSTRING ...]] [-sf SUFFIX [SUFFIX ...]]
  [-sbf SUBSTRINGS_FILE] [-sff SUFFIXES_FILE]

  Processes reports generated by AggieEnterprise to summarize the useful data in them.
  By default it sorts the files by the date they were generated (according to cell A3
  inside the spreadsheet file), and in that order going backwards (so latest file is
  processed first), summarizes each file, as well as summarizing differences between
  adjacent files. If run with no arguments like this: `C:\reports> aggie-report`
  (or if you are using the Python script, `C:\reports> python aggie_report.py`)
  it will process all the .xlsx files in the current directory and print the results to
  the screen. Command line arguments can be used to customize this; type
  `aggie_report -h` to see all the options.

  options:
    -h, --help            show this help message and exit
    -d DIRECTORY, --directory DIRECTORY
                          directory to search for .xlsx files generated by AggieEnterprise.
                          All .xlsx files are processed; to process only some files,
                          list them explicitly after the flag -f. If neither -d nor -f
                          is given, all .xlsx files in the current directory are processed.
                          This option is mutually exclusive with -f.
    -f FILE [FILE ...], --files FILE [FILE ...]
                          List of one or more .xlsx files generated by AggieEnterprise.
                          To specify that all .xlsx files in a directory should be
                          processed, use the -d option. This option is mutually exclusive
                          with -d.
    -o OUTFILE, --outfile OUTFILE
                          Name of file to print output; if not specified, print output to
                          the screen.
    -nd, --no-diffs       If specified, do not include differences between adjacent files
                          in the output. This option is mutually exclusive with -ni.
    -ni, --no-individual  If specified, do not include summaries for individual files.
                          This option is mutually exclusive with -nd.
    -s, --sort-increasing-by-date
                          If specified, sort the files by date in increasing order instead
                          of the default, which is to sort by date in decreasing order.
    --sb SUBSTRING [SUBSTRING ...], --substrings SUBSTRING [SUBSTRING ...]
                          List of substrings to remove from the project name. This can
                          help clean up ugly project names like "NSF CAREER K20304932"
                          by specifying substring "K20304932", which would change the
                          project name to "NSF CAREER".
    --sf SUFFIX [SUFFIX ...], --suffixes SUFFIX [SUFFIX ...]
                          List of substrings to remove from the project name, as well
                          as the entire suffix from there to the end. This can help
                          clean up ugly project names like "NSF CAREER K302777" and
                          "NSF Small K302999" by specifying substring "K302", which
                          would change these project names "NSF CAREER" and "NSF
                          Small".
    --sbf SUBSTRINGS_FILE, --substrings-file SUBSTRINGS_FILE
                          Filename containing substrings (separated by whitespace or
                          newlines) to remove from the project name. This is like the
                          -sb option, but reads the substrings from a file so that you
                          do not have to type them all out at the command line and can
                          reuse them in multiple runs.
    --ssf SUFFIXES_FILE, --suffixes-file SUFFIXES_FILE
                          Filename containing substrings (separated by whitespace or
                          newlines) to remove from the project name, as well as the
                          entire suffix from there to the end. This is like the -sf
                          option, but reads the substrings from a file so that you do
                          not have to type them all out at the command line and can
                          reuse them in multiple runs.
  ```


pkgId: 6de39eef13fe710c1b689ef59464121fa869c40dcc6bfd24ce3112796c238b7a
name: python-aggify
arch: src
version: 0.3.9
epoch: 0
release: 1
summary: A MongoDB aggregation generator for Mongoengine
url: https://github.com/Aggify/aggify
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aggify-0.3.9-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <img src="https://i.imgur.com/BBp9vUQ.png" alt="Aggify">
  </p>
  <p align="center">
      <em>Aggify is a Python library to generate MongoDB aggregation pipelines</em>
  </p>

  [![Package version](https://img.shields.io/pypi/v/aggify?color=%2334D058&label=pypi%20package)](https://pypi.org/project/aggify)
  [![Downloads](https://img.shields.io/pypi/dm/aggify)](https://pypi.org/project/aggify)
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/aggify.svg?color=%2334D058)](https://pypi.org/project/aggify)
  [![Coverage](https://img.shields.io/codecov/c/github/Aggify/aggify)](https://app.codecov.io/gh/Aggify/aggify)
  [![License](https://img.shields.io/github/license/Aggify/aggify.svg)](https://github.com/Aggify/aggify/blob/main/LICENSE)
  [![Contributors](https://img.shields.io/github/contributors/Aggify/aggify.svg)](https://github.com/Aggify/aggify/graphs/contributors)
  [![Telegram](https://img.shields.io/badge/-telegram-red?color=white&logo=telegram&logoColor=blue)](https://t.me/Aggify)



  Aggify is a Python library for generating MongoDB aggregation pipelines, designed to work seamlessly with Mongoengine.
  This library simplifies the process of constructing complex MongoDB queries and aggregations using an intuitive and
  organized interface.



  - Programmatically build MongoDB aggregation pipelines.
  - Filter, project, group, and perform various aggregation operations with ease.
  - Supports querying nested documents and relationships defined using Mongoengine.
  - Encapsulates aggregation stages for a more organized and maintainable codebase.
  - Designed to simplify the process of constructing complex MongoDB queries.







  You can install Aggify using pip:

  ```bash
  pip install aggify
  ```



  Here's a code snippet that demonstrates how to use Aggify to construct a MongoDB aggregation pipeline:

  ```python
  from mongoengine import Document, fields

  class AccountDocument(Document):
      username = fields.StringField()
      display_name = fields.StringField()
      phone = fields.StringField()
      is_verified = fields.BooleanField()
      disabled_at = fields.LongField()
      deleted_at = fields.LongField()
      banned_at = fields.LongField()

  class FollowAccountEdge(Document):
      start = fields.ReferenceField("AccountDocument")
      end = fields.ReferenceField("AccountDocument")
      accepted = fields.BooleanField()
      meta = {
          "collection": "edge.follow.account",
      }

  class BlockEdge(Document):
      start = fields.ObjectIdField()
      end = fields.ObjectIdField()
      meta = {
          "collection": "edge.block",
      }
  ```

  Aggify query:

  ```python
  from models import *
  from aggify import Aggify, F, Q
  from bson import ObjectId

  aggify = Aggify(AccountDocument)

  pipelines = list(
      (
          aggify.filter(
              phone__in=[],
              id__ne=ObjectId(),
              disabled_at=None,
              banned_at=None,
              deleted_at=None,
              network_id=ObjectId(),
          )
          .lookup(
              FollowAccountEdge,
              let=["id"],
              query=[Q(start__exact=ObjectId()) & Q(end__exact="id")],
              as_name="followed",
          )
          .lookup(
              BlockEdge,
              let=["id"],
              as_name="blocked",
              query=[
                  (Q(start__exact=ObjectId()) & Q(end__exact="id"))
                  | (Q(end__exact=ObjectId()) & Q(start__exact="id"))
              ],
          )
          .filter(followed=[], blocked=[])
          .group("username")
          .annotate(annotate_name="phone", accumulator="first", f=F("phone") + 10)
          .redact(
              value1="phone",
              condition="==",
              value2="132",
              then_value="keep",
              else_value="prune",
          )
          .project(username=0)[5:10]
          .out(coll="account")
      )
  )
  ```

  Mongoengine equivalent query:

  ```python
  [
      {
          "$match": {
              "phone": {"$in": []},
              "_id": {"$ne": ObjectId("65486eae04cce43c5469e0f1")},
              "disabled_at": None,
              "banned_at": None,
              "deleted_at": None,
              "network_id": ObjectId("65486eae04cce43c5469e0f2"),
          }
      },
      {
          "$lookup": {
              "from": "edge.follow.account",
              "let": {"id": "$_id"},
              "pipeline": [
                  {
                      "$match": {
                          "$expr": {
                              "$and": [
                                  {
                                      "$eq": [
                                          "$start",
                                          ObjectId("65486eae04cce43c5469e0f3"),
                                      ]
                                  },
                                  {"$eq": ["$end", "$$id"]},
                              ]
                          }
                      }
                  }
              ],
              "as": "followed",
          }
      },
      {
          "$lookup": {
              "from": "edge.block",
              "let": {"id": "$_id"},
              "pipeline": [
                  {
                      "$match": {
                          "$expr": {
                              "$or": [
                                  {
                                      "$and": [
                                          {
                                              "$eq": [
                                                  "$start",
                                                  ObjectId("65486eae04cce43c5469e0f4"),
                                              ]
                                          },
                                          {"$eq": ["$end", "$$id"]},
                                      ]
                                  },
                                  {
                                      "$and": [
                                          {
                                              "$eq": [
                                                  "$end",
                                                  ObjectId("65486eae04cce43c5469e0f5"),
                                              ]
                                          },
                                          {"$eq": ["$start", "$$id"]},
                                      ]
                                  },
                              ]
                          }
                      }
                  }
              ],
              "as": "blocked",
          }
      },
      {"$match": {"followed": [], "blocked": []}},
      {"$group": {"_id": "$username", "phone": {"$first": {"$add": ["$phone", 10]}}}},
      {
          "$redact": {
              "$cond": {
                  "if": {"$eq": ["phone", "132"]},
                  "then": "$$KEEP",
                  "else": "$$PRUNE",
              }
          }
      },
      {"$project": {"username": 0}},
      {"$skip": 5},
      {"$limit": 5},
      {"$out": "account"},
  ]
  ```

  In the sample usage above, you can see how Aggify simplifies the construction of MongoDB aggregation pipelines by
  allowing you to chain filters, lookups, and other operations to build complex queries.
  For more details and examples, please refer to the documentation and codebase.


pkgId: 6b1b661f1c08b681b4943f6c51934ee5f9b09de0abf1f78412fadf3902a0cb85
name: python-aggregate-root
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A small Python library for defining domain-driven design aggregates and domain events.
url: https://github.com/willemse-and-co/aggregate-root
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aggregate-root-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Aggregate Root is a Python library that provides a base implementation for aggregate roots and domain events in a Domain-Driven Design (DDD) context. This library simplifies the creation and management of aggregate roots and domain events, enabling developers to focus on business logic and domain rules.


  You can install the `aggregate-root` library from PyPI using pip:

  ```bash
  pip install aggregate-root
  ```





  `AggregateRoot` is the base class for aggregate roots, and `Event` is the base class for state events produced by command methods on AggregateRoots. Together, they enable the creation and management of Domain-Driven Design (DDD) aggregates.


  ```python
  import re
  from dataclasses import dataclass
  from datetime import datetime, timedelta
  from typing import Optional

  from aggregate_root import AggregateRoot, Event












  @dataclass(frozen=True)
  class BookCreated(Event):
      pass


  @dataclass(frozen=True)
  class BookTitleUpdated(Event):
      title: str


  @dataclass(frozen=True)
  class BookAuthorUpdated(Event):
      author: str


  @dataclass(frozen=True)
  class BookYearPublishedUpdated(Event):
      year_published: int


  @dataclass(frozen=True)
  class CopyAdded(Event):
      barcode: str
      date: datetime


  @dataclass(frozen=True)
  class CopyRemoved(Event):
      barcode: str
      date: datetime


  @dataclass(frozen=True)
  class CopyBorrowed(Event):
      barcode: str
      date: datetime
      borrower_id: str
      due_at: datetime


  @dataclass(frozen=True)
  class CopyReturned(Event):
      barcode: str
      date: datetime








  class Book(AggregateRoot):
      def __init__(self, isbn: str):
          super().__init__(id=isbn)
          self._copies: list[BookCopy] = []
          self._title: str = ""
          self._author: str = ""
          self._year_published: int = 0

      @property
      def title(self):
          return self._title

      @property
      def author(self):
          return self._author

      @property
      def year_published(self):
          return self._year_published

      @property
      def copies(self):
          return self._copies

      @classmethod
      def create(cls, isbn: str, title: str, author: str, year_published: int) -> "Book":
          """
          Factory method to create a new book.
          """
          if not re.match(r"^\d{13}$", isbn):
              raise ValueError("ISBN must be 13 digits")
          if not title:
              raise ValueError("Title cannot be empty")
          if not author:
              raise ValueError("Author cannot be empty")
          if year_published < 0 or year_published > datetime.now().year:
              raise ValueError("Invalid year published")

          instance = cls(isbn)

          
          
          
          
          instance.produce_events(
              BookCreated(),
              BookTitleUpdated(title),
              BookAuthorUpdated(author),
              BookYearPublishedUpdated(year_published),
          )
          return instance

      
      
      

      @AggregateRoot.produces_events
      def add_copy(self, barcode: str) -> CopyAdded:
          """
          Add a copy of the book
          """
          if not barcode:
              raise ValueError("Barcode cannot be empty")
          if any(copy.barcode == barcode for copy in self._copies):
              raise ValueError("Copy already exists")
          return CopyAdded(barcode, datetime.now())

      @AggregateRoot.produces_events
      def update_title(self, title: str) -> BookTitleUpdated:
          """
          Update the title of the book
          """
          if not title:
              raise ValueError("Title cannot be empty")
          return BookTitleUpdated(title)

      @AggregateRoot.produces_events
      def update_author(self, author: str) -> BookAuthorUpdated:
          """
          Update the author of the book
          """
          if not author:
              raise ValueError("Author cannot be empty")
          return BookAuthorUpdated(author)

      @AggregateRoot.produces_events
      def update_year_published(self, year_published: int) -> BookYearPublishedUpdated:
          """
          Update the year published of the book
          """
          if year_published < 0 or year_published > datetime.now().year:
              raise ValueError("Invalid year published")
          return BookYearPublishedUpdated(year_published)

      @AggregateRoot.produces_events
      def remove_copy(self, barcode: str) -> CopyRemoved:
          """
          Remove a copy of the book
          """
          for copy in self._copies:
              if copy.barcode == barcode:
                  return CopyRemoved(barcode, datetime.now())
          raise ValueError("Copy not found")

      @AggregateRoot.produces_events
      def borrow_copy(self, barcode: str, borrower_id: str) -> CopyBorrowed:
          """
          Borrow a copy of the book
          """
          for copy in self._copies:
              if copy.barcode == barcode:
                  if copy.borrowed:
                      raise ValueError("Copy is already borrowed")
                  now = datetime.now()
                  due_date = now + timedelta(days=14)
                  return CopyBorrowed(barcode, now, borrower_id, due_date)
          raise ValueError("Copy not found")

      @AggregateRoot.produces_events
      def return_copy(self, barcode: str) -> CopyReturned:
          """
          Return a copy of the book
          """
          for copy in self._copies:
              if copy.barcode == barcode:
                  if not copy.borrowed:
                      raise ValueError("Copy is not borrowed")
                  return CopyReturned(barcode, datetime.now())
          raise ValueError("Copy not found")


      
      
      
      
      
      

      @AggregateRoot.handles_events(BookTitleUpdated)
      def _handle_book_title_updated(self, event: BookTitleUpdated):
          self._title = event.title

      @AggregateRoot.handles_events(BookAuthorUpdated)
      def _handle_book_author_updated(self, event: BookAuthorUpdated):
          self._author = event.author

      @AggregateRoot.handles_events(BookYearPublishedUpdated)
      def _handle_book_year_published_updated(self, event: BookYearPublishedUpdated):
          self._year_published = event.year_published

      @AggregateRoot.handles_events(CopyAdded)
      def _handle_copy_added(self, event: CopyAdded):
          self._copies.append(BookCopy(event.barcode))

      @AggregateRoot.handles_events(CopyRemoved)
      def _handle_copy_removed(self, event: CopyRemoved):
          self._copies = [copy for copy in self._copies if copy.barcode != event.barcode]

      @AggregateRoot.handles_events(CopyBorrowed)
      def _handle_copy_borrowed(self, event: CopyBorrowed):
          for copy in self._copies:
              if copy.barcode == event.barcode:
                  copy.check_out(event.borrower_id)

      @AggregateRoot.handles_events(CopyReturned)
      def _handle_copy_returned(self, event: CopyReturned):
          for copy in self._copies:
              if copy.barcode == event.barcode:
                  copy.check_in()








  class BookCopy:
      def __init__(self, barcode: str):
          self._barcode: str = barcode
          self.borrower_id: Optional[str] = None

      def check_out(self, borrower_id: str):
          self.borrower_id = borrower_id

      def check_in(self):
          self.borrower_id = None

      @property
      def borrowed(self):
          return self.borrower_id is not None

      @property
      def barcode(self):
          return self._barcode







  book = Book.create("9781617294549", "Microservices Patterns", "Chris Richardson", 2019)


  book.add_copy("BARCODE_1")
  book.add_copy("BARCODE_2")


  book.borrow_copy("BARCODE_1", "USER_1")


  book.return_copy("BARCODE_1")


  book.remove_copy("BARCODE_1")


  events = book.pending_events

  book.clear_events()


  with book.flush() as events:
      
  ```


pkgId: 9beb748e9d08786ba05dc654f479124779438483929a062dc81545e857a3e11d
name: python-agh-vqis
arch: src
version: 3.2.1
epoch: 0
release: 1
summary: A Python wrapper for 18 image quality indicators.
url: https://qoe.agh.edu.pl/indicators/
rpm_license: EVALUATION LICENSE AGREEMENT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agh-vqis-3.2.1-1.src.rpm
checksum_type: sha256
description:
  A Python package computing a set of image quality indicators (IQIs) for a given input video.

  Following IQIs are included in the package:

  - A set of 15 Video Quality Indicators (VQIs) developed by the team from AGH. See the following website for more information: https://qoe.agh.edu.pl/indicators/.
  - Our Python reimplementation of the Colourfulness IQI. See [this](http://infoscience.epfl.ch/record/33994/files/HaslerS03.pdf) paper for more information regarding this IQI.
  - Blur Amount IQI. See [package's Python Package Index web page](https://pypi.org/project/cpbd/) for more information.
  - UGC IQI (User-generated content).

  **Authors**: Jakub Nawała <[jakub.nawala@agh.edu.pl](mailto:jnawala@agh.edu.pl)>, Filip Korus <[fkorus@student.agh.edu.pl](mailto:fkorus@student.agh.edu.pl)>


  - ffmpeg - version >= 4.4.2
  - Python - version >= 3.9


  ```shell
  pip install agh_vqis
  ```


  1. Single multimedia file:
      ```python
      from agh_vqis import process_single_mm_file, VQIs
      from pathlib import Path

      if __name__ == '__main__':
          process_single_mm_file(Path('/path/to/single/video.mp4'))
      ```


  2. Folder with multimedia files:
      ```python
      from agh_vqis import process_folder_w_mm_files, VQIs
      from pathlib import Path

      if __name__ == '__main__':
          process_folder_w_mm_files(Path('/path/to/multimedia/folder/'))
     ```


  3. Options parameter - in either `process_single_mm_file` and `process_folder_w_mm_files` function options could be provided as an optional argument. It is being passed to function as a dictionary like below.
      ```python
       process_single_mm_file(Path('/path/to/single/video.mp4'), options={
            VQIs.contrast: False,  # disable contrast indicator
            VQIs.colourfulness: False,  # disable colourfulness indicator
       })
      ```


  4. How to disable/enable indicators to count? Every indicator is **enabled by default except `blue_amount`** due to long computing time. To disable one of following indicators `(blockiness, SA, letterbox, pillarbox, blockloss, blur, TA, blackout, freezing, exposure, contrast, interlace, noise, slice, flickering, colourfulness, ugc)` pass
     ```python
     VQIs.indicator_name: False
     ```
     to options dictionary. Whereas to **enable** `blur_amount` indicator pass `True` value.


  5. agh-vqis package could be used from command line interface as well. For example:
     ```shell
     python3 -m agh_vqis /path/to/single/movie.mp4 # will run VQIS for single file
     ```
     or
     ```shell
     python3 -m agh_vqis /path/to/multimedia/folder/ # will run VQIS for folder
     ```
     Whereas this command will display help:
     ```shell
     $ python3 -m agh_vqis -h
     ```
  6. Supported multimedia files: `mp4`, `y4m`, `mov`, `mkv`, `avi`, `ts`, `webm`, `jpg`, `jpeg`, `png`, `gif`, `bmp`.


  7. First row of the output CSV file contains header with image quality indicators (IQIs) names, whereas each row below the header represents single video frame from the input video file. Each column provides a numerical result as returned by a given IQI when applied to the respective frame.


  8. Cast chosen indicators for different resolutions (**experimental**). For example: to cast Blur to 1440p and Blockiness to 2160p you should pass two additional lines in `options` dictionary like below.
     ```python
         from agh_vqis import process_single_mm_file, CastVQI, DestResolution
         from pathlib import Path

         if __name__ == '__main__':
             process_single_mm_file(Path('/path/to/single/video.mp4'), options={
                CastVQI.blur: DestResolution.p1440,
                CastVQI.blockiness: DestResolution.p2160
             })
        ```

     
     
     | source resolution | destination resolution | correctness |
     |-------------------|------------------------|-------------|
     | 1080p             | 1440p                  | 99.80%      |
     | 1080p             | 2160p                  | 99.72%      |
     | 1440p             | 2160p                  | 99.68%      |
     | 2160p             | 1440p                  | 99.81%      |

     
     | source resolution | destination resolution | correctness |
     |-------------------|------------------------|-------------|
     | 240p              | 360p                   | 93.91%      |
     | 240p              | 480p                   | 87.78%      |
     | 360p              | 240p                   | 94.28%      |
     | 360p              | 480p                   | 98.08%      |
     | 360p              | 720p                   | 92.51%      |
     | 480p              | 240p                   | 87.68%      |
     | 480p              | 360p                   | 98.05%      |
     | 480p              | 720p                   | 97.35%      |
     | 720p              | 360p                   | 92.69%      |
     | 720p              | 480p                   | 97.31%      |
     | 720p              | 1080p                  | 80.95%      |
     | 1080p             | 1440p                  | 99.12%      |
     | 1080p             | 2160p                  | 93.41%      |
     | 1440p             | 1080p                  | 99.07%      |
     | 1440p             | 2160p                  | 96.24%      |
     | 2160p             | 1080p                  | 93.59%      |
     | 2160p             | 1440p                  | 96.39%      |

     
     | source resolution | destination resolution | correctness |
     |-------------------|------------------------|-------------|
     | 240p              | 360p                   | 97.75%      |
     | 240p              | 480p                   | 94.89%      |
     | 240p              | 720p                   | 89.71%      |
     | 360p              | 240p                   | 97.77%      |
     | 360p              | 480p                   | 98.68%      |
     | 360p              | 720p                   | 94.83%      |
     | 360p              | 1080p                  | 80.37%      |
     | 480p              | 240p                   | 94.82%      |
     | 480p              | 360p                   | 98.68%      |
     | 480p              | 720p                   | 97.80%      |
     | 480p              | 1080p                  | 82.90%      |
     | 480p              | 1440p                  | 80.40%      |
     | 720p              | 240p                   | 89.32%      |
     | 720p              | 360p                   | 94.87%      |
     | 720p              | 480p                   | 97.85%      |
     | 720p              | 1080p                  | 86.99%      |
     | 720p              | 1440p                  | 84.66%      |
     | 720p              | 2160p                  | 82.34%      |
     | 1080p             | 360p                   | 80.71%      |
     | 1080p             | 480p                   | 83.41%      |
     | 1080p             | 720p                   | 86.88%      |
     | 1080p             | 1440p                  | 98.78%      |
     | 1080p             | 2160p                  | 96.91%      |
     | 1440p             | 480p                   | 80.90%      |
     | 1440p             | 720p                   | 84.85%      |
     | 1440p             | 1080p                  | 98.83%      |
     | 1440p             | 2160p                  | 99.05%      |
     | 2160p             | 720p                   | 82.89%      |
     | 2160p             | 1080p                  | 96.93%      |
     | 2160p             | 1440p                  | 98.98%      |

     
     | source resolution | destination resolution | correctness |
     |-------------------|------------------------|-------------|
     | 240p              | 360p                   | 99.83%      |
     | 240p              | 480p                   | 99.69%      |
     | 240p              | 720p                   | 99.55%      |
     | 240p              | 1080p                  | 87.94%      |
     | 240p              | 1440p                  | 87.94%      |
     | 240p              | 2160p                  | 87.91%      |
     | 360p              | 240p                   | 99.85%      |
     | 360p              | 480p                   | 99.97%      |
     | 360p              | 720p                   | 99.93%      |
     | 360p              | 1080p                  | 88.36%      |
     | 360p              | 1440p                  | 88.34%      |
     | 360p              | 2160p                  | 88.36%      |
     | 480p              | 240p                   | 99.73%      |
     | 480p              | 360p                   | 99.97%      |
     | 480p              | 720p                   | 99.98%      |
     | 480p              | 1080p                  | 88.61%      |
     | 480p              | 1440p                  | 88.67%      |
     | 480p              | 2160p                  | 88.67%      |
     | 720p              | 240p                   | 99.61%      |
     | 720p              | 360p                   | 99.93%      |
     | 720p              | 480p                   | 99.98%      |
     | 720p              | 1080p                  | 88.45%      |
     | 720p              | 1440p                  | 88.46%      |
     | 720p              | 2160p                  | 88.46%      |
     | 1080p             | 240p                   | 87.12%      |
     | 1080p             | 360p                   | 87.71%      |
     | 1080p             | 480p                   | 87.82%      |
     | 1080p             | 720p                   | 87.91%      |
     | 1080p             | 1440p                  | 99.99%      |
     | 1080p             | 2160p                  | 99.99%      |
     | 1440p             | 240p                   | 87.13%      |
     | 1440p             | 360p                   | 87.72%      |
     | 1440p             | 480p                   | 87.85%      |
     | 1440p             | 720p                   | 87.92%      |
     | 1440p             | 1080p                  | 99.99%      |
     | 1440p             | 2160p                  | 100.0%      |
     | 2160p             | 240p                   | 87.11%      |
     | 2160p             | 360p                   | 87.72%      |
     | 2160p             | 480p                   | 87.85%      |
     | 2160p             | 720p                   | 87.91%      |
     | 2160p             | 1080p                  | 99.99%      |
     | 2160p             | 1440p                  | 100.0%      |

     
     | source resolution | destination resolution | correctness |
     |-------------------|------------------------|-------------|
     | 240p              | 360p                   | 86.93%      |
     | 360p              | 240p                   | 87.19%      |
     | 360p              | 480p                   | 88.32%      |
     | 480p              | 360p                   | 87.22%      |
     | 480p              | 720p                   | 90.80%      |
     | 720p              | 480p                   | 91.21%      |
     | 720p              | 1080p                  | 82.65%      |
     | 1080p             | 1440p                  | 81.35%      |

     
     | source resolution | destination resolution | correctness |
     |-------------------|------------------------|-------------|
     | 240p              | 360p                   | 88.85%      |
     | 360p              | 240p                   | 88.08%      |
     | 360p              | 480p                   | 86.33%      |
     | 480p              | 360p                   | 85.94%      |
     | 480p              | 720p                   | 88.71%      |
     | 720p              | 480p                   | 88.12%      |
     | 1080p             | 1440p                  | 94.84%      |
     | 1080p             | 2160p                  | 80.34%      |
     | 1440p             | 1080p                  | 92.28%      |
     | 1440p             | 2160p                  | 87.24%      |
     | 2160p             | 1440p                  | 88.54%      |



  The `agh-vqis` Python package is provided via the [Evaluation License Agreement](https://app.qoe.agh.edu.pl/public/agh-vqis/license.txt).


pkgId: 9770049407770422fd5a3ae7b0d82d2520ea716fad170f7ad03e91354298680e
name: python-aghplctools
arch: src
version: 4.8.8
epoch: 0
release: 1
summary: Interaction package for Agilent ChemStation report files
url: https://gitlab.com/heingroup/aghplctools
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aghplctools-4.8.8-1.src.rpm
checksum_type: sha256
rpm_license:
  Copyright 2019 Lars Yunker / Hein Group  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 07c852a271a2efe4d5729cdb4b86aa0d11d057692cfaf029b20257a984f563e4
name: python-agi-med-utils
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: Utils for agi-med team
url: https://pypi.org/project/agi-med-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agi-med-utils-0.3.0-1.src.rpm
checksum_type: sha256
description:
  Стандартизация компонент общей библиотеки отдела



  @bakulin



  - Доступ к Yandex_GPT, Gigachat
  - Стандартный конфиг
  - Общие для сервисов ЦА функции
  - Даталоадер для ЦА



  - `sudo docker compose -f docker-compose.yaml up --build`


pkgId: 552cb1f9dc45b1f104e163e72ebb0d3e84e385146098a1ae0a4fedf61aaf5a6c
name: python-agi-med-utils
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Utils for agi-med team
url: https://pypi.org/project/agi-med-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agi-med-utils-1.0.0-1.src.rpm
checksum_type: sha256
description:
  Стандартизация компонент общей библиотеки отдела



  @kopanichuk



  - Доступ к Yandex_GPT, Gigachat
  - Стандартный конфиг
  - Общие для сервисов ЦА функции
  - Даталоадер для ЦА



  - `sudo docker compose -f docker-compose.yaml up --build`


pkgId: 05cb4fa2622f5759acdc82d933dfcca3ee0de660557154815b21e8c8a62ad71e
name: python-agi.green
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: AGI.green Framework
description: Copyright (c) 2023 Ken Seehart, AGI Green
url: https://pypi.org/project/agi.green/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agi.green-0.2.1-1.src.rpm
checksum_type: sha256
rpm_license:
  MIT License  Copyright (c) 2023 kenseehart  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 7f9fe9e86908794789ceb8d1c2c41c75ff73ee3a8eee773158e1406d67fe85c8
name: python-agi.green
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: AGI.green Framework
url: https://pypi.org/project/agi.green/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agi.green-0.2.4-1.src.rpm
checksum_type: sha256
description:
  A modern Python framework for building AI-powered asynchonous chat applications with a browser interface, featuring markdown content rendering and a unified messaging system.

  Application can be built entirely in Python or can integrate with arbitrary external services.
  This differs from conventional full stack solutions with a javascript frontend application making API calls to a Python backend.
  Instead, the frontend is a slave and the backend is the application.



  - **Unified Message Protocol**: Consistent message handling across different communication channels
  - **Rich Content Support**:
    - Markdown rendering
    - Mermaid diagrams
    - MathJax equations
    - Code syntax highlighting
  - **Flexible Architecture**:
    - WebSocket-based real-time communication
    - AMQP integration for distributed systems
    - Extensible protocol system
  - **AI Integration**:
    - OpenAI API support
    - Anthropic Claude support
    - Custom model integration capability
  - **Asynchronous Execution**:
    - Non limited to call and response
    - Can add chat messages in response to arbitrary events, e.g. incoming email or SMS or task completion
    - Can execute arbitrary code in response to a message or other events



  1. Install dependencies:
  ```bash

  sudo apt-get install rabbitmq-server  # Ubuntu/Debian
  brew install rabbitmq                 # macOS


  pip install agi.green
  ```

  2. Create a basic chat application:
  ```python
  from agi_green.dispatcher import Dispatcher

  class ChatNode(Dispatcher):
      async def on_mq_chat(self, author: str, content: str):
          'Receive chat message from RabbitMQ'
          await self.send_ws('append_chat', content=content)

      async def on_ws_chat_input(self, content: str = ''):
          'Handle chat input from browser'
          await self.send_mq('chat',
              author=self.name,
              content=content
          )
  ```



  The framework uses a protocol-based architecture where each protocol handles specific types of communication:

  - `ws`: WebSocket communication with browser
  - `mq`: RabbitMQ for peer-to-peer messaging
  - `gpt`: OpenAI API integration
  - `http`: HTTP/HTTPS server
  - Custom protocols can be added by extending the base Protocol class



  Support for rich content in messages:
  ```python

  await self.send_ws('append_chat',
      content='```python\nprint("Hello")\n```'
  )


  await self.send_ws('append_chat',
      content='```mermaid\ngraph TD;\nA-->B;\n```'
  )


  await self.send_ws('append_chat',
      content=r'\\( \int x dx = \frac{x^2}{2} + C \\)'
  )
  ```



  Currently in active development (March 2024). The framework is being used in production but the API may have breaking changes.



  - Python 3.11+
  - RabbitMQ server
  - Modern web browser



  Contributions are welcome! Please check our [Contributing Guidelines](CONTRIBUTING.md) for details.



  Copyright (c) 2024 Ken Seehart, AGI Green. See [LICENSE](LICENSE) for details.

rpm_license:
  MIT License  Copyright (c) 2023 kenseehart  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 6d1bb6cebee4cedb539f5b1609c87c562d7510ff8567b45fa0f6ea7754caa56c
name: python-agi.green
arch: src
version: 0.2.7
epoch: 0
release: 1
summary: AGI.green Framework
url: https://pypi.org/project/agi.green/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agi.green-0.2.7-1.src.rpm
checksum_type: sha256
description:
  A modern Python framework for building AI-powered asynchonous chat applications with a browser interface, featuring markdown content rendering and a unified messaging system.

  Application can be built entirely in Python or can integrate with arbitrary external services.
  This differs from conventional full stack solutions with a javascript frontend application making API calls to a Python backend.
  Instead, the frontend is a slave and the backend is the application.



  - **Unified Message Protocol**: Consistent message handling across different communication channels
  - **Rich Content Support**:
    - Markdown rendering
    - Mermaid diagrams
    - MathJax equations
    - Code syntax highlighting
    - YAML forms implementing [Vueform](https://vueform.com/)
  - **Flexible Architecture**:
    - WebSocket-based real-time communication
    - Message Queue (AMQP) integration for distributed systems - rabbitmq|ABS|inprocess
    - Extensible protocol system - asynchronous interaction with anything
  - **AI Integration**:
    - OpenAI API support
    - Anthropic Claude support
    - Custom model integration capability
  - **Asynchronous Execution**:
    - Non limited to call and response
    - Can add chat messages in response to arbitrary events, e.g. incoming email or SMS or task completion
    - Can execute arbitrary code in response to a message or other events
    - No javascript required on the frontend!
  - **Vue Forms in Markdown (chat and docs)**:
    - Support for YAML and JSON forms in markdown
    - Support for forms in chat messages
    - Support for forms in documents
    - Asynchronous form data events with no javascript required on the frontend (python only)
    - That means no need to write any javascript to use forms!



  1. Install dependencies:
  ```bash

  sudo apt-get install rabbitmq-server  # Ubuntu/Debian
  brew install rabbitmq                 # macOS


  pip install agi.green
  ```

  2. Create a basic chat application:
  ```python
  from agi_green.dispatcher import Dispatcher

  class ChatNode(Dispatcher):
      async def on_mq_chat(self, author: str, content: str):
          'Receive chat message from RabbitMQ'
          await self.send_ws('append_chat', content=content)

      async def on_ws_chat_input(self, content: str = ''):
          'Handle chat input from browser'
          await self.send_mq('chat',
              author=self.name,
              content=content
          )
  ```



  The framework uses a protocol-based architecture where each protocol handles specific types of communication:

  - `ws`: WebSocket communication with browser
  - `mq`: RabbitMQ for peer-to-peer messaging
  - `gpt`: OpenAI API integration
  - `http`: HTTP/HTTPS server
  - Custom protocols can be added by extending the base Protocol class



  Support for rich content in messages:
  ```python

  await self.send_ws('append_chat',
      content='```python\nprint("Hello")\n```'
  )


  await self.send_ws('append_chat',
      content='```mermaid\ngraph TD;\nA-->B;\n```'
  )


  await self.send_ws('append_chat',
      content=r'\\( \int x dx = \frac{x^2}{2} + C \\)'
  )
  ```



  Currently in active development (March 2024). The framework is being used in production but the API may have breaking changes. See [CHANGELOG](CHANGELOG.md) for version history.



  - Python 3.11+
  - RabbitMQ server
  - Modern web browser



  Contributions are welcome! Please check our [Contributing Guidelines](CONTRIBUTING.md) for details.



  Copyright (c) 2024 Ken Seehart, AGI Green. See [LICENSE](LICENSE) for details.

rpm_license:
  MIT License  Copyright (c) 2023 kenseehart  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: ff9ecdb35303db0f152bf3468ceca9f7197024e559a45e02ff837ac51816e679
name: python-agiflow-sdk
arch: src
version: 0.0.24
epoch: 0
release: 1
url: https://github.com/AgiFlow/agiflow-sdks/tree/main/packages/python/agiflow-sdk
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agiflow-sdk-0.0.24-1.src.rpm
checksum_type: sha256
summary:
  Agiflow Software Development Kit (SDK) for Python, support LLM APIs and Frameworks tracing with Opentelemetry and more.

description:
  Welcome to the `agiflow-sdk` documentation. This guide will help you integrate with the Agiflow Python SDK quickly and easily. The SDK provides automatic and manual tracing capabilities for LLM apis and frameworks, as well as helpers to interact with backend APIs.



  You can install the `agiflow-sdk` using either `pip` or `poetry`.

  ```sh
  pip install agiflow-sdk
  ```



  The `agiflow-sdk` offers the following functionalities:
  - Automatic tracing with `Open Telemetry`.
  - Decorators for manual tracing.
  - Helpers to interact with backend APIs.



  Initialize the `agiflow-sdk` client at the entry point of your application:

  ```python
  from agiflow import Agiflow

  Agiflow.init(
    app_name="<YOUR_APP_NAME>",
    api_key="<AGIFLOW_API_KEY>" # Or set AGIFLOW_API_KEY environment variable
  )
  ```

  You can find the API key on the `Environment > Settings > API Key` page on the [Agiflow Dashboard](https://app.agiflow.io).

  Once set up, if you run your backend application with supported LLM frameworks, traces should be logged on the Agiflow dashboard under `Environment > Logs`.



  - **AGIFLOW_BASE_URL**: Set this to your self-hosted endpoint if using Agiflow with Docker Compose for local development or self-hosting.
  - **AGIFLOW_API_KEY**: Switch API keys per environment.

  NOTE: Agiflow uses a separate global Open Telemetry trace provider to ensure all LLM traces are sent to support user feedback. To use the default Open Telemetry global trace provider, set the `AGIFLOW_OTEL_PYTHON_TRACER_PROVIDER_GLOBAL` environment variable to `true`.



  Traces are automatically logged when you set up Agiflow at the top of your application. By default, these traces are limited to backend applications and are not synchronized with frontend tracking.



  - **Anthropic**
  - **Chromadb**
  - **Cohere**
  - **CrewAI**
  - **GROQ**
  - **Langchain**
  - **Langgraph**
  - **Llamaindex**
  - **Openai**
  - **Pinecone**
  - **Qdrant**
  - **Weaviate**





  If you haven't integrated with the frontend SDK, you can still associate Open Telemetry trace with user and session using the following method:

  ```python
  from agiflow import Agiflow

  Agiflow.set_association_properties({
    "user_id": "<USER_ID>", # Optional
    "session_id": "<SESSION_ID>", # Optional
    "task_name": "<TASK_NAME>", # Optional, to label feedback task
  });
  ```



  If you have set up frontend tracing for [Web](../../libraries/web/tracing), your backend should have access to `x-agiflow-trace-id` in the HTTP headers.

  Use our header to associate frontend tracing with Open Telemetry tracing as follows:

  ```python
  from agiflow import Agiflow
  from agiflow.opentelemetry import extract_association_properties_from_http_headers

  Agiflow.set_association_properties(extract_association_properties_from_http_headers(request.headers))
  ```



  - This helper enhances the trace context by adding association properties metadata to the traces.
  - With manual tracing on the frontend, this will add `action_id` to the trace context.
  - With automatic tracing on the frontend, this will add `action_id`, `task_id`, and `session_id` to the trace context.



  You might want to log additional information that is important to your AI workflow or for tools that are not supported by Agiflow yet. In these cases, use manual tracing to add this information. These decorators support the following arguments:

  - **name**: Span label.
  - **method_name**: Method of the class to be decorated.
  - **description**: Add extra comments to make it easier for others to review the workflow and provide feedback.
  - **prompt_settings**: Associate LLM calls with a specific version of the prompt.
  - **input_serializer**: Format the input to make it easier for the end user to read.
  - **output_serializer**: Format the output to make it easier for the end user to read.
  - **context_parser**: Restore trace context from distributed messages.



  Trace the workflow with a unique name and extra information using the following methods:

  ```python
  from agiflow.opentelemetry import aworkflow

  @aworkflow(name="<WORKFLOW_NAME>", method_name="bar")
  class Foo:
      async def bar(self):
          ...
  ```



  Trace the task with a unique name and extra information using the following methods:

  ```python
  from agiflow.opentelemetry import atask

  @atask(name="<TASK_NAME>", method_name="bar")
  class Foo:
      async def bar(self):
          ...
  ```



  Trace the agent with a unique name and extra information using the following methods:

  ```python
  from agiflow.opentelemetry import aagent

  @aagent(name="<AGENT_NAME>", method_name="bar")
  class Foo:
      async def bar(self):
          ...
  ```



  Trace the tool with a unique name and extra information using the following methods:

  ```python
  from agiflow.opentelemetry import atool

  @atool(name="<TOOL_NAME>", method_name="bar")
  class Foo:
      async def bar(self):
          ...
  ```



  If you are using an event-driven architecture, additional steps are required to enable trace flow throughout the workflow.



  Extract the current trace context and pass it to the message queue system as follows:

  ```python
  from agiflow.opentelemetry import get_carrier_from_trace_context

  carrier = get_carrier_from_trace_context()

  kafkaClient.produce({
    ...
    "otlp_carrier": carrier,
  })
  ```



  Retrieve the `carrier` information from the message and restore the context from the carrier information:

  ```python
  from agiflow.opentelemetry import get_trace_context_from_carrier, get_tracer

  carrier = message.get("otlp_carrier")
  ctx = get_trace_context_from_carrier(carrier)
  with get_tracer() as tracer:
      with tracer.start_as_current_span('job', ctx):
          ...
  ```

  The `children span` uses the same context and `parent span`, so you don't need to pass context around. Traces from the consumer will use the same context as the producer.

  For `HTTP` microservice architecture, OpenTelemetry will automatically pass the `carrier` via `traceparent` headers and restore the context.



  In an event-driven architecture, the parent span may not have the output on completion. This can make it difficult for reviewers to understand the workflow context. To address this, associate the `span_id` with your unique identifier (e.g., database row ID) using this method:

  ```python
  agiflow.associate_trace(
      id, # Unique ID linked to trace_id
      span_id # Unique ID linked to span_id
  );
  ```

  Then update the span using your database ID:

  ```python
  agiflow.update_span(
      id, # Unique ID linked to span_id
      {
      "output": "...',
      }
  );
  ```



  Agiflow supports adding user feedback via the backend API. Here is how to do it:



  To provide feedback on past actions, you need to provide extra information, such as

   `message Id`, to correctly associate user feedback with the right action.

  ```python
  agiflow.associate_trace(
    id, # Unique ID linked to trace_id
    span_id # Unique ID linked to span_id
  );
  ```

  Later, when a user provides feedback, you can simply do:

  ```python
  agiflow.report_score(
    id, # action_id or unique ID
    0.6 # Normalized score
  );
  ```



  You can asynchronously invoke the feedback widget on the frontend to collect user feedback.



  This comprehensive documentation provides an overview of setting up and using the `agiflow-sdk`, including installation, setup, tracing, and user feedback. If you would like to add additional libraries support, please see [contribution guideline](../../../Contribution.md), we would love to have your support. Thanks!


pkgId: f01923c76726a74f833a9b72bd955290ac3b6f18c15f04e7a5d2c76895e9abb8
name: python-agile-toolkit
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: Agile toolkit for publishing and repository management
url: https://github.com/quantmind/agile-toolkit
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agile-toolkit-0.6.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/agile-toolkit.svg)](https://badge.fury.io/py/agile-toolkit)
  [![Python versions](https://img.shields.io/pypi/pyversions/agile-toolkit.svg)](https://pypi.org/project/agile-toolkit)
  [![build](https://github.com/quantmind/agile-toolkit/workflows/build/badge.svg)](https://github.com/quantmind/agile-toolkit/actions?query=workflow%3Abuild)
  [![codecov](https://codecov.io/gh/quantmind/agile-toolkit/branch/master/graph/badge.svg)](https://codecov.io/gh/quantmind/agile-toolkit)


pkgId: a8dfaadbc6987f62a518906df6df433c9fd8e2dc0101f64430f2b141c57256f1
name: python-agileetc
arch: src
version: 0.0.12
epoch: 0
release: 1
summary: Future Agile CICD tooling template
url: https://github.com/Agile-Solutions-GB-Ltd/automatic-eureka/tree/main/python/agileetc
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agileetc-0.0.12-1.src.rpm
checksum_type: sha256
description:
  Example python 3.9+ project where we can develop best practices and provide teams with a useful template with the following features:

  * Poetry packaged python project with example CLI entry point.
  * Linux and Windows compatible project.
  * Example read/write YML files.
  * Example Unit Tests.
  * Example flake8 linter configuration.
  * Example line operation via click API allowing project to be run from command line of from CICD pipelines.
  * Example use of Fabric API to execute external commands.
  * Example use of Texttable for pretty table output.
  * Example GoCD pipeline.
  * Example GitHub actions.
  * Python package publishing to PiPy.
  * Docker image publishing to docker hub.
  * Example usage of python package.
  * Example usage of docker image.



  This project uses poetry is a tool for dependency management and packaging in Python. It allows you to declare the
  libraries your project depends on, it will manage (install/update) them for you.

  Use the installer rather than pip [installing-with-the-official-installer](https://python-poetry.org/docs/master/#installing-with-the-official-installer).

  ```sh
  poetry self add poetry-bumpversion
  ```

  ```sh
  poetry -V
  Poetry (version 1.2.0)
  ```



  ```sh
  poetry update
  ```

  ```sh
  poetry install
  ```


  ```sh
  poetry run agileetc
  ```


  ```sh
  poetry run flake8
  ```


  ```sh
  poetry run pytest
  ```



  * By default we are using [PYPI packages](https://packaging.python.org/en/latest/tutorials/installing-packages/).
  * Create yourself an access token for PYPI and then follow the instructions.

  ```sh
  export PYPI_USERNAME=__token__
  export PYPI_PASSWORD=<Your API Token>
  poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD
  ```


  We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/Agile-Solutions-GB-Ltd/agileup/tags).



  We are using [poetry-bumpversion](https://github.com/monim67/poetry-bumpversion) to manage release versions.

  ```sh
  poetry version patch
  ```



  Once the release has been created it is now available for you to use in other python projects via:

  ```sh
  pip install agileetc
  ```

  And also for poetry projects via:

  ```sh
  poetry add aigleetc
  ```



  The objects of each of the example CI pipelines here are to:

  * Lint the python code.
  * Run Unit Tests
  * Build package.
  * Release package, bumping the version.
  * Publishing in new package version.



  The example GitHub actions CI for this project is located in file .github/workflows/python-ci.yml and is available from
  the GitHub dashboard. This CI is setup to [run via a local runner](https://github.com/Agile-Solutions-GB-Ltd/automatic-eureka/settings/actions/runners) which should be configured.









  Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.



  This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details


pkgId: 48cca9ff35dc7720d206d9ea3f5474bd2da92a72c97725cff69fe8aff41ee43a
name: python-agilent-format
arch: src
version: 0.4.6
epoch: 0
release: 1
summary: File reader for Agilent Resolutions Pro FT-IR images
url: https://github.com/stuart-cls/python-agilent-file-formats
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agilent-format-0.4.6-1.src.rpm
checksum_type: sha256
description:
  Python library for reading FT-IR imaging datasets created by Resolutions Pro on
  Agilent Cary instruments with FPA area detectors.

  Port of https://bitbucket.org/AlexHenderson/agilent-file-formats/ to Python

  Developed for use in the [orange-spectroscopy](https://github.com/Quasars/orange-spectroscopy) add-in, which is part
  of the [Quasar](https://quasar.codes/) data analysis program.



  The package can be installed from [PyPI](https://pypi.org) as:

  `pip install agilent-format`



  There are four primary classes for loading data, depending on the type:

  | Class              | Data Type                  | Extension   |
  |--------------------|----------------------------|-------------|
  | `agilentImage`     | Single-tile FPA image      | .dat        |
  | `agilentMosaic`    | Mosaic FPA image           | .dmt        |
  | `agilentImageIFG`  | Single-tile interferograms | .seq        |
  | `agilentMosaicIFG` | Mosaic interferograms      | .dmt        |

  To use, load the corresponding data loader class with the appropriate filename:

  ```python
  from agilent_format import agilentImage

  ai = agilentImage("agilent_format/datasets/4_noimage_agg256.dat")

  ai.data         # 3-dimensional numpy array (height x width x wavenumbers)
  ai.wavenumbers  # list of wavenumbers in order of .data array

  px_size = ai.info['FPA Pixel Size'] * ai.info['PixelAggregationSize']
  ```


pkgId: 15d300fb39b84be99e92146a48cc5f49e540f6e171497e8e22009e8b56ea13ac
name: python-agilerl
arch: src
version: 1.0.15
epoch: 0
release: 1
summary: AgileRL is a deep reinforcement learning library focused on improving RL development through RLOps.
url: https://pypi.org/project/agilerl/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agilerl-1.0.15-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <img src=https://user-images.githubusercontent.com/47857277/222710068-e09a4e3c-368c-458a-9e01-b68674806887.png height="120">
  </p>
  <p align="center"><b>Reinforcement learning streamlined.</b><br>Easier and faster reinforcement learning with RLOps. Visit our <a href="https://agilerl.com">website</a>. View <a href="https://docs.agilerl.com">documentation</a>.<br>Join the <a href="https://discord.gg/eB8HyTA2ux">Discord Server</a> for questions, help and collaboration.</p>

  <div align="center">

  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  [![Documentation Status](https://readthedocs.org/projects/agilerl/badge/?version=latest)](https://docs.agilerl.com/en/latest/?badge=latest)
  [![Downloads](https://static.pepy.tech/badge/agilerl)](https://pypi.python.org/pypi/agilerl/)
  [![Discord](https://dcbadge.vercel.app/api/server/eB8HyTA2ux?style=flat)](https://discord.gg/eB8HyTA2ux)

  </div>

  AgileRL is a Deep Reinforcement Learning library focused on improving development by introducing RLOps - MLOps for reinforcement learning.

  This library is initially focused on reducing the time taken for training models and hyperparameter optimization (HPO) by pioneering [evolutionary HPO techniques](https://docs.agilerl.com/en/latest/evo_hyperparam_opt/index.html) for reinforcement learning.<br>
  Evolutionary HPO has been shown to drastically reduce overall training times by automatically converging on optimal hyperparameters, without requiring numerous training runs.<br>
  We are constantly adding more algorithms and features. AgileRL already includes state-of-the-art evolvable [on-policy](https://docs.agilerl.com/en/latest/on_policy/index.html), [off-policy](https://docs.agilerl.com/en/latest/off_policy/index.html), [offline](https://docs.agilerl.com/en/latest/offline_training/index.html), [multi-agent](https://docs.agilerl.com/en/latest/multi_agent_training/index.html) and [contextual multi-armed bandit](https://docs.agilerl.com/en/latest/bandits/index.html) reinforcement learning algorithms with [distributed training](https://docs.agilerl.com/en/latest/distributed_training/index.html).

  <p align="center">
    <img src=https://user-images.githubusercontent.com/47857277/236407686-21363eb3-ffcf-419f-b019-0be4ddf1ed4a.gif width="100%" max-width="900">
  </p>
  <p align="center">AgileRL offers 10x faster hyperparameter optimization than SOTA.</p>


    * [Get Started](#get-started)
    * [Benchmarks](#benchmarks)
    * [Tutorials](#tutorials)
    * [Algorithms implemented](#evolvable-algorithms-implemented-more-coming-soon)
    * [Train an agent](#train-an-agent-to-beat-a-gym-environment)
    * [Citing AgileRL](#citing-agilerl)



  To see the full AgileRL documentation, including tutorials, visit our [documentation site](https://docs.agilerl.com/). To ask questions and get help, collaborate, or discuss anything related to reinforcement learning, join the [AgileRL Discord Server](https://discord.gg/eB8HyTA2ux).

  Install as a package with pip:
  ```bash
  pip install agilerl
  ```
  Or install in development mode:
  ```bash
  git clone https://github.com/AgileRL/AgileRL.git && cd AgileRL
  pip install -e .
  ```

  Demo:
  ```bash
  cd demos
  python demo_off_policy.py
  ```



  Reinforcement learning algorithms and libraries are usually benchmarked once the optimal hyperparameters for training are known, but it often takes hundreds or thousands of experiments to discover these. This is unrealistic and does not reflect the true, total time taken for training. What if we could remove the need to conduct all these prior experiments?

  In the charts below, a single AgileRL run, which automatically tunes hyperparameters, is benchmarked against Optuna's multiple training runs traditionally required for hyperparameter optimization, demonstrating the real time savings possible. Global steps is the sum of every step taken by any agent in the environment, including across an entire population.

  <p align="center">
    <img src=https://user-images.githubusercontent.com/47857277/227481592-27a9688f-7c0a-4655-ab32-90d659a71c69.png min-width="100%" width="600">
  </p>
  <p align="center">AgileRL offers an order of magnitude speed up in hyperparameter optimization vs popular reinforcement learning training frameworks combined with Optuna. Remove the need for multiple training runs and save yourself hours.</p>

  AgileRL also supports multi-agent reinforcement learning using the Petting Zoo-style (parallel API). The charts below highlight the performance of our MADDPG and MATD3 algorithms with evolutionary hyper-parameter optimisation (HPO), benchmarked against epymarl's MADDPG algorithm with grid-search HPO for the simple speaker listener and simple spread environments.

  <p align="center">
    <img src=https://github-production-user-asset-6210df.s3.amazonaws.com/118982716/264712154-4965ea5f-b777-423c-989b-e4db86eda3bd.png  min-width="100%" width="700">
  </p>


  We are in the process of creating tutorials on how to use AgileRL and train agents on a variety of tasks.

  Currently, we have [tutorials for single-agent tasks](https://docs.agilerl.com/en/latest/tutorials/gymnasium/index.html)
  that will guide you through the process of training both on and off-policy agents to beat a variety of Gymnasium environments. Additionally, we have [multi-agent tutorials](https://docs.agilerl.com/en/latest/tutorials/pettingzoo/index.html) that make use of PettingZoo environments such as training DQN to play Connect Four with curriculum learning and self-play, and also for multi-agent tasks in MPE environments. The [tutorial on using hierarchical curriculum learning](https://docs.agilerl.com/en/latest/tutorials/skills/index.html) shows how to teach agents Skills and combine them to achieve an end goal. There are also [tutorials for contextual multi-arm bandits](https://docs.agilerl.com/en/latest/tutorials/bandits/index.html), which learn to make the correct decision in environments that only have one timestep.

  The demo files in ``demos`` also provide examples on how to train agents using AgileRL, and more information can be found in our <a href="https://docs.agilerl.com">documentation</a>.



    

    | RL         | Algorithm |
    | ---------- | --------- |
    | [On-Policy](https://docs.agilerl.com/en/latest/on_policy/index.html)  | [Proximal Policy Optimization (PPO)](https://docs.agilerl.com/en/latest/api/algorithms/ppo.html) |
    | [Off-Policy](https://docs.agilerl.com/en/latest/off_policy/index.html) | [Deep Q Learning (DQN)](https://docs.agilerl.com/en/latest/api/algorithms/dqn.html) <br>  [Rainbow DQN](https://docs.agilerl.com/en/latest/api/algorithms/dqn_rainbow.html) <br> [Deep Deterministic Policy Gradient (DDPG)](https://docs.agilerl.com/en/latest/api/algorithms/ddpg.html) <br> [Twin Delayed Deep Deterministic Policy Gradient (TD3)](https://docs.agilerl.com/en/latest/api/algorithms/td3.html) |
    | [Offline](https://docs.agilerl.com/en/latest/offline_training/index.html)    | [Conservative Q-Learning (CQL)](https://docs.agilerl.com/en/latest/api/algorithms/cql.html) <br>  [Implicit Language Q-Learning (ILQL)](https://docs.agilerl.com/en/latest/api/algorithms/ilql.html) |

    

    | RL         | Algorithm |
    | ---------- | --------- |
    | [Multi-agent](https://docs.agilerl.com/en/latest/multi_agent_training/index.html) | [Multi-Agent Deep Deterministic Policy Gradient (MADDPG)](https://docs.agilerl.com/en/latest/api/algorithms/maddpg.html) <br> [Multi-Agent Twin-Delayed Deep Deterministic Policy Gradient (MATD3)](https://docs.agilerl.com/en/latest/api/algorithms/matd3.html) |

    

    | RL         | Algorithm |
    | ---------- | --------- |
    | [Bandits](https://docs.agilerl.com/en/latest/bandits/index.html) | [Neural Contextual Bandits with UCB-based Exploration (NeuralUCB)](https://docs.agilerl.com/en/latest/api/algorithms/neural_ucb.html) <br> [Neural Contextual Bandits with Thompson Sampling (NeuralTS)](https://docs.agilerl.com/en/latest/api/algorithms/neural_ts.html) |



  Before starting training, there are some meta-hyperparameters and settings that must be set. These are defined in <code>INIT_HP</code>, for general parameters, and <code>MUTATION_PARAMS</code>, which define the evolutionary probabilities, and <code>NET_CONFIG</code>, which defines the network architecture. For example:
  ```python
  INIT_HP = {
      'ENV_NAME': 'LunarLander-v2',   # Gym environment name
      'ALGO': 'DQN',                  # Algorithm
      'DOUBLE': True,                 # Use double Q-learning
      'CHANNELS_LAST': False,         # Swap image channels dimension from last to first [H, W, C] -> [C, H, W]
      'BATCH_SIZE': 256,              # Batch size
      'LR': 1e-3,                     # Learning rate
      'MAX_STEPS': 1_000_000,         # Max no. steps
      'TARGET_SCORE': 200.,           # Early training stop at avg score of last 100 episodes
      'GAMMA': 0.99,                  # Discount factor
      'MEMORY_SIZE': 10000,           # Max memory buffer size
      'LEARN_STEP': 1,                # Learning frequency
      'TAU': 1e-3,                    # For soft update of target parameters
      'TOURN_SIZE': 2,                # Tournament size
      'ELITISM': True,                # Elitism in tournament selection
      'POP_SIZE': 6,                  # Population size
      'EVO_STEPS': 10_000,            # Evolution frequency
      'EVAL_STEPS': None,             # Evaluation steps
      'EVAL_LOOP': 1,                 # Evaluation episodes
      'LEARNING_DELAY': 1000,         # Steps before starting learning
      'WANDB': True,                  # Log with Weights and Biases
  }
  ```
  ```python
  MUTATION_PARAMS = {
      
      'NO_MUT': 0.4,                              # No mutation
      'ARCH_MUT': 0.2,                            # Architecture mutation
      'NEW_LAYER': 0.2,                           # New layer mutation
      'PARAMS_MUT': 0.2,                          # Network parameters mutation
      'ACT_MUT': 0,                               # Activation layer mutation
      'RL_HP_MUT': 0.2,                           # Learning HP mutation
      'RL_HP_SELECTION': ['lr', 'batch_size'],    # Learning HPs to choose from
      'MUT_SD': 0.1,                              # Mutation strength
      'RAND_SEED': 1,                             # Random seed
  }
  ```
  ```python
  NET_CONFIG = {
      'arch': 'mlp',      # Network architecture
      'hidden_size': [32, 32], # Actor hidden size
  }
  ```
  First, use <code>utils.utils.create_population</code> to create a list of agents - our population that will evolve and mutate to the optimal hyperparameters.
  ```python
  from agilerl.utils.utils import make_vect_envs, create_population
  import torch

  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

  num_envs = 16
  env = make_vect_envs(env_name=INIT_HP['ENV_NAME'], num_envs=num_envs)
  try:
      state_dim = env.single_observation_space.n          # Discrete observation space
      one_hot = True                                      # Requires one-hot encoding
  except Exception:
      state_dim = env.single_observation_space.shape      # Continuous observation space
      one_hot = False                                     # Does not require one-hot encoding
  try:
      action_dim = env.single_action_space.n             # Discrete action space
  except Exception:
      action_dim = env.single_action_space.shape[0]      # Continuous action space

  if INIT_HP['CHANNELS_LAST']:
      state_dim = (state_dim[2], state_dim[0], state_dim[1])

  agent_pop = create_population(
      algo=INIT_HP['ALGO'],                 # Algorithm
      state_dim=state_dim,                  # State dimension
      action_dim=action_dim,                # Action dimension
      one_hot=one_hot,                      # One-hot encoding
      net_config=NET_CONFIG,                # Network configuration
      INIT_HP=INIT_HP,                      # Initial hyperparameters
      population_size=INIT_HP['POP_SIZE'],  # Population size
      num_envs=num_envs,                    # Number of vectorized environments
      device=device,
  )
  ```
  Next, create the tournament, mutations and experience replay buffer objects that allow agents to share memory and efficiently perform evolutionary HPO.
  ```python
  from agilerl.components.replay_buffer import ReplayBuffer
  from agilerl.hpo.tournament import TournamentSelection
  from agilerl.hpo.mutation import Mutations

  field_names = ["state", "action", "reward", "next_state", "done"]
  memory = ReplayBuffer(
      memory_size=INIT_HP['MEMORY_SIZE'],   # Max replay buffer size
      field_names=field_names,              # Field names to store in memory
      device=device,
  )

  tournament = TournamentSelection(
      tournament_size=INIT_HP['TOURN_SIZE'], # Tournament selection size
      elitism=INIT_HP['ELITISM'],            # Elitism in tournament selection
      population_size=INIT_HP['POP_SIZE'],   # Population size
      eval_loop=INIT_HP['EVAL_LOOP'],        # Evaluate using last N fitness scores
  )

  mutations = Mutations(
      algo=INIT_HP['ALGO'],                                 # Algorithm
      no_mutation=MUTATION_PARAMS['NO_MUT'],                # No mutation
      architecture=MUTATION_PARAMS['ARCH_MUT'],             # Architecture mutation
      new_layer_prob=MUTATION_PARAMS['NEW_LAYER'],          # New layer mutation
      parameters=MUTATION_PARAMS['PARAMS_MUT'],             # Network parameters mutation
      activation=MUTATION_PARAMS['ACT_MUT'],                # Activation layer mutation
      rl_hp=MUTATION_PARAMS['RL_HP_MUT'],                   # Learning HP mutation
      rl_hp_selection=MUTATION_PARAMS['RL_HP_SELECTION'],   # Learning HPs to choose from
      mutation_sd=MUTATION_PARAMS['MUT_SD'],                # Mutation strength
      arch=NET_CONFIG['arch'],                              # Network architecture
      rand_seed=MUTATION_PARAMS['RAND_SEED'],               # Random seed
      device=device,
  )
  ```
  The easiest training loop implementation is to use our <code>train_off_policy()</code> function. It requires the <code>agent</code> have methods <code>get_action()</code> and <code>learn().</code>
  ```python
  from agilerl.training.train_off_policy import train_off_policy

  trained_pop, pop_fitnesses = train_off_policy(
      env=env,                                   # Gym-style environment
      env_name=INIT_HP['ENV_NAME'],              # Environment name
      algo=INIT_HP['ALGO'],                      # Algorithm
      pop=agent_pop,                             # Population of agents
      memory=memory,                             # Replay buffer
      swap_channels=INIT_HP['CHANNELS_LAST'],    # Swap image channel from last to first
      max_steps=INIT_HP["MAX_STEPS"],            # Max number of training steps
      evo_steps=INIT_HP['EVO_STEPS'],            # Evolution frequency
      eval_steps=INIT_HP["EVAL_STEPS"],          # Number of steps in evaluation episode
      eval_loop=INIT_HP["EVAL_LOOP"],            # Number of evaluation episodes
      learning_delay=INIT_HP['LEARNING_DELAY'],  # Steps before starting learning
      target=INIT_HP['TARGET_SCORE'],            # Target score for early stopping
      tournament=tournament,                     # Tournament selection object
      mutation=mutations,                        # Mutations object
      wb=INIT_HP['WANDB'],                       # Weights and Biases tracking
  )

  ```



  If you use AgileRL in your work, please cite the repository:
  ```bibtex
  @software{Ustaran-Anderegg_AgileRL,
  author = {Ustaran-Anderegg, Nicholas and Pratt, Michael},
  license = {Apache-2.0},
  title = {{AgileRL}},
  url = {https://github.com/AgileRL/AgileRL}
  }
  ```


pkgId: 263564ddef63b84994524ce7cd0a4830c681eef4c55661738321633c226882d2
name: python-agileupstate
arch: src
version: 0.0.44
epoch: 0
release: 1
summary: State mangement tool for Future Agile CICD
url: https://github.com/Agile-Solutions-GB-Ltd/agileupstate
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agileupstate-0.0.44-1.src.rpm
checksum_type: sha256
description:
  Python 3.8+ project to manage AgileUP pipeline states with the following features:

  * Linux and Windows compatible project.
  * Defines state model.
  * Saves and fetches states from vault.
  * Exports private key for Linux SSH connections.
  * Exports client PKI data for Windows WinRM connections.
  * Creates cloud init zip file for mTLS connection data to Windows WinRM hosts.
  * Exports ansible inventories for both Linux(SSH) and Windows(WinRM) connections.
  * Provides simple connectivity tests.



  This project uses poetry is a tool for dependency management and packaging in Python. It allows you to declare the
  libraries your project depends on, it will manage (install/update) them for you.

  Use the installer rather than pip [installing-with-the-official-installer](https://python-poetry.org/docs/master/#installing-with-the-official-installer).

  ```sh
  poetry self add poetry-bumpversion
  ```

  ```sh
  poetry -V
  Poetry (version 1.2.0)
  ```



  Install poetry from powershell in admin mode.

  ```shell
  (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
  ```

  The path will be `C:\Users\<YOURUSER>\AppData\Roaming\Python\Scripts\poetry.exe` which you will need to add to your system path.



  When using gitbash you can setup an alias for the poetry command:

  ```shell
  alias poetry="\"C:\Users\<YOURUSER>\AppData\Roaming\Python\Scripts\poetry.exe\""
  ```



  ```sh
  poetry update
  ```

  ```sh
  poetry install
  ```



  This project uses the [hvac](https://github.com/hvac/hvac) python module and to develop locally you can run vault
  as a docker service as detailed here [local docker vault](https://hub.docker.com/_/vault). For local development vault
  setup follow the [VAULT](VAULT.md) guide for information.

  Check your connection with the following command, note in development mode vault should not be sealed.

  ```shell
  export VAULT_ADDR='http://localhost:8200'
  export VAULT_TOKEN='8d02106e-b1cd-4fa5-911b-5b4e669ad07a'

  poetry run agileupstate check
  ```



  | Variable         | Description                                                     |
  |------------------|-----------------------------------------------------------------|
  | SIAB_ID          | Unique environment ID.                                          |
  | SIAB_CLOUD       | Cloud vendor API mnemonic.                                      |
  | SIAB_LOCATION1   | Cloud vendor defined cloud location, uksouth, etc.              |
  | SIAB_LOCATION2   | Cloud vendor defined cloud location, UK South, etc.             |
  | SIAB_CONTEXT     | Environment context, e.g. dev. test, prod.                      |
  | SIAB_VALUES_PATH | Vault path to common environment values to be exported.         |
  | SIAB_DOMAIN      | Optional public domain that overrides cloud provided DNS names. |

  `SIAB_LOCATION`: Azure has a different location string between "accounts" and "resources" and only `uksouth` is useful
  to the automation, but we must also provide `UK South` for resource groups. **FIXME: Needs to be verified**.

  `SIAB_VALUES_PATH`: Rather than load variables into the delivery platform environment, there can be many, a better option
  is to define a YML file that contains all the required common variables for a specific environment and have the user upload
  that to vault. This application can then download the YML data file and convert it into an exports file that can be sourced
  by the pipelines. These environment values that are exported can then be used by this project and other utilities such as
  terraform, ansible and powershell.

  `SIAB_DOMAIN`: Cloud DNS services might in some cases provide a DNS domain that is not the same as the public internet
  domain required by the project, for example server1.uksouth.cloudapp.azure.com might optionally be server1.meltingturret.io.

  `username/password`: These values are common across the environment, for example Ubuntu Azure images use a `username=azureuser`,
  and so it simplifies configuration if the same credentials are used for Linux and Windows environments running in Azure for
  administration access, client administration access as well as PFX certificate files used on Windows for WinRM certificate
  authentication. For AWS `ubuntu` is the username for Ubuntu images the same approach can be taken there.

  **Required environment inputs:**

  > These values should be setup in your CD platforms environment variables.

  ```shell
  export SIAB_ID=001
  export SIAB_CLOUD=arm
  export SIAB_LOCATION1=uksouth
  export SIAB_LOCATION2="UK South"
  export SIAB_CONTEXT=dev
  export SIAB_VALUES_PATH=siab-state/001-arm-uksouth-dev/siab-values/siab-values.yml
  ```

  **Required values inputs (stored in vault path `SIAB_VALUES_PATH`):**

  ```yaml
  connection:
    url: https://server1.meltingturret.io:5986
    username: azureuser
    password: mypassword
    ca_trust_path: siab-client/chain.meltingturret.io.pem
    cert_pem: siab-client/azureuser@meltingturret.io.pem
    cert_key_pem: siab-client/azureuser@meltingturret.io.key
  cloud:
    group_owner: Paul Gilligan
    group_department: DevOps
    group_location: uksouth
  ```



  Some data is generated only once and thus can be uploaded to vault manually.

  **Uploading values file:**

  ```shell
  base64 ./siab-values.yml | vault kv put secret/siab-state/001-arm-uksouth-dev/siab-values/siab-values.yml file=-
  ```

  **Uploading pfx files:**

  ```shell
  base64 ./server1.meltingturret.io.pfx | vault kv put secret/siab-pfx/server1.meltingturret.io.pfx file=-
  base64 ./azureuser@meltingturret.io.pfx | vault kv put secret/siab-pfx/azureuser@meltingturret.io.pfx file=-
  ```

  **Uploading pki files:**

  ```shell
  base64 ./chain.meltingturret.io.pem | vault kv put secret/siab-client/chain.meltingturret.io.pem file=-
  base64 ./azureuser@meltingturret.io.key | vault kv put secret/siab-client/azureuser@meltingturret.io.key file=-
  base64 ./azureuser@meltingturret.io.pem | vault kv put secret/siab-client/azureuser@meltingturret.io.pem file=-
  ```



  Example steps required for the Windows terraform provision use case shown below.

  ```shell
  agileupstate cloud-init --server-path=siab-pfx/ags-w-arm1.meltingturret.io.pfx --client-path=siab-pfx/devops@meltingturret.io.pfx
  agileupstate create
  source ./siab-state-export.sh
  terraform init
  terraform apply -auto-approve
  agileupstate save
  ```

  Example steps required for the Linux terraform provision use case shown below.

  ```shell
  agileupstate create
  source ./siab-state-export.sh
  terraform init
  terraform apply -auto-approve
  agileupstate save
  ```



  Example steps required for recovering system state use case shown below which might be for example to destroy an environment.

  ```shell
  agileupstate load
  source ./siab-state-export.sh
  terraform init
  terraform destroy -auto-approve
  ```



  Example steps required for the Windows ansible use case shown below.

  ```shell
  agileupstate load
  source ./siab-state-export.sh
  agileupstate inventory-windows --ca-trust-path=siab-client/chain.meltingturret.io.pem --cert-pem=siab-client/azureuser@meltingturret.io.pem --cert-key-pem=siab-client/devops@meltingturret.io.key
  ansible-inventory -i inventory.ini --list
  ansible -i inventory.ini "${TF_VAR_siab_name_underscore}" -m win_ping
  ```

  Example steps required for the Linux ansible use case shown below.

  ```shell
  agileupstate load
  source ./siab-state-export.sh
  agileupstate inventory-linux
  ansible-inventory -i inventory.ini --list
  ANSIBLE_HOST_KEY_CHECKING=True ansible -i inventory.ini --user "${TF_VAR_admin_username}" "${TF_VAR_siab_name_underscore}" -m ping
  ```



  The `yml` file from `SIAB_VALUES_PATH` is exported to the file `siab-state-export.sh` with the contents as shown in the
  example below which can then be used by downstream utilities.

  ```shell
  export SIAB_URL=https://server1.meltingturret.io:5986
  export SIAB_USERNAME=azureuser
  export SIAB_PASSWORD=mypassword
  export SIAB_CA_TRUST_PATH=siab-client/chain.meltingturret.io.pem
  export SIAB_CERT_PEM=siab-client/azureuser@meltingturret.io.pem
  export SIAB_CERT_KEY_PEM=siab-client/azureuser@meltingturret.io.key
  export TF_VAR_group_owner=Paul Gilligan
  export TF_VAR_group_department=DevOps
  export TF_VAR_group_location=UK South
  export TF_VAR_admin_username=azureuser
  export TF_VAR_admin_password=mypassword
  export TF_VAR_siab_name=001-arm-uksouth-dev
  export TF_VAR_siab_name_underscore=001_arm_uksouth_dev
  ```

  ```shell
  source ./siab-state-export.sh
  ```



  Example cloud init command that generates the zip file that is loaded onto Windows machines for WimRM certificate authentication.

  ```shell
  poetry run agileupstate cloud-init --server-path=siab-pfx/ags-w-arm1.meltingturret.io.pfx --client-path=siab-pfx/azureuser@meltingturret.io.pfx
  ```



  `inventory.ini` is generated with the target(s) and configuration information for a successful SSH connection from Ansible.

  **When `export SIAB_DOMAIN=meltingturret.io`:**

  ```ini
  [001_arm_uksouth_dev]
  ags-w-arm1.meltingturret.io
  [001_arm_uksouth_dev:vars]
  ansible_user=azureuser
  ansible_password=heTgDg!J4buAv5kc
  ansible_connection=winrm
  ansible_port=5986
  ansible_winrm_ca_trust_path=chain.meltingturret.io.pem
  ansible_winrm_cert_pem=azureuser@meltingturret.io.pem
  ansible_winrm_cert_key_pem=azureuser@meltingturret.io.key
  ansible_winrm_transport=certificate
  ```



  `inventory.ini` is generated with the target(s) and configuration information for a successful SSH connection from Ansible.

  **When `export SIAB_DOMAIN=meltingturret.io`:**

  ```ini
  [001_arm_uksouth_dev]
  ags-w-arm1.meltingturret.io ansible_ssh_private_key_file=vm-rsa-private-key.pem
  ```


  ```sh
  poetry run agileupstate
  ```


  ```sh
  poetry run flake8
  ```


  ```sh
  poetry run pytest
  ```



  * By default we are using [PYPI packages](https://packaging.python.org/en/latest/tutorials/installing-packages/).
  * Create yourself an access token for PYPI and then follow the instructions.

  ```sh
  export PYPI_USERNAME=__token__
  export PYPI_PASSWORD=<Your API Token>
  poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD
  ```


  We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/Agile-Solutions-GB-Ltd/agileup/tags).



  We are using [poetry-bumpversion](https://github.com/monim67/poetry-bumpversion) to manage release versions.

  ```sh
  poetry version patch
  ```



  Once the release has been created it is now available for you to use in other python projects via:

  ```sh
  pip install agileupstate
  ```

  And also for poetry projects via:

  ```sh
  poetry add agileupstate
  ```



  Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.



  This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details


pkgId: c53b098c53ba188279e058f2febe489c480483e5dbabb9922e3850452d8c656d
name: python-agilicus
arch: src
version: 1.270.13
epoch: 0
release: 1
summary: Agilicus SDK
url: https://www.agilicus.com/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agilicus-1.270.13-1.src.rpm
checksum_type: sha256
description:
  The [Agilicus Platform](https://www.agilicus.com/) [API](https://www.agilicus.com/api).
  is defined using [OpenAPI 3.0](https://github.com/OAI/OpenAPI-Specification),
  and may be used from any language. This allows configuration of our Zero-Trust Network Access cloud native platform
  using REST. You can see the API specification [online](https://www.agilicus.com/api).

  This package provides a Python SDK, class library interfaces for use in
  accessing individual collections. In addition it provides a command-line-interface (CLI)
  for interactive use.

  Read the class-library documentation [online](https://www.agilicus.com/api/)

  [Samples](https://git.agilicus.com/pub/samples) shows various examples of this code in use.

  Generally you may install this from [pypi](https://pypi.org/project/agilicus/) as:

  ```
  pip install --upgrade agilicus
  ```

  You may wish to add bash completion by adding this to your ~/.bashrc:

  ```
  eval "$(_AGILICUS_CLI_COMPLETE=source agilicus-cli)"
  ```


  The below python code will show the same output as the CLI command:
  `agilicus-cli --issuer https://auth.dbt.agilicus.cloud list-users`

  ```
  import agilicus
  import argparse
  import sys

  scopes = agilicus.scopes.DEFAULT_SCOPES

  parser = argparse.ArgumentParser(description="update-user")
  parser.add_argument("--auth-doc", type=str)
  parser.add_argument("--issuer", type=str)
  parser.add_argument("--email", type=str)
  parser.add_argument("--disable-user", type=bool, default=None)
  args = parser.parse_args()

  if not args.auth_doc and not args.issuer:
      print("error: specify either an --auth-doc or --issuer")
      sys.exit(1)

  if not args.email:
      print("error: specify an email to search for a user")
      sys.exit(1)

  api = agilicus.GetClient(
      agilicus_scopes=scopes, issuer=args.issuer, authentication_document=args.auth_doc
  )

  users = api.users.list_users(org_id=api.default_org_id, email=args.email)
  if len(users.users) != 1:
      print(f"error: failed to find user with email: {args.email}")
      sys.exit(1)

  user = users.users[0]

  if args.disable_user is not None:
      user.enabled = args.disable_user

  result = api.users.replace_user(
      user.id, user=user, _check_input_type=False, _host_index=0
  )
  print(result)
  ```


pkgId: 7ec1d0cd06ffaf59485a10210184dc9141fd1d6c8075cfab618db177ae34b61c
name: python-agilkia
arch: src
version: 0.8.0
epoch: 0
release: 1
summary: Automated smart testing strategies for web services.
url: https://github.com/utting/agilkia
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agilkia-0.8.0-1.src.rpm
checksum_type: sha256
description:
  This toolkit is intended to make it easier to build testing tools that learn
  from traces of customer behaviors, analyze those traces for common patterns
  and unusual behaviors (e.g. using clustering techniques), learn machine learning (ML)
  models of typical behaviors, and use those models to generate smart tests that
  imitate customer behaviors.

  Agilkia is intended to provide a storage and interchange format that makes it easy to
  built 'smart' tools on top of this toolkit, often with just a few lines of code.
  The main focus of this toolkit is saving and loading traces in a standard *.JSON
  format, and transforming those traces to and from lots of other useful formats,
  including:

   * Pandas DataFrames (for data analysis and machine learning);
   * ARFF files (for connection to Weka and the StackedTrees tools);
   * SciPy Linkage matrices (for hierarchical clustering and drawing Dendrograms);
   * CSV files in application-specific formats (requires writing some Python code).

  The key datastructures supported by this library are:

   * TraceSet = a sequence of Trace objects
   * Trace = a sequence of Event objects
   * Event = one interaction with a web service/site, with an action name, inputs, outputs.

  In addition, note that the TraceSet can store 'clustering' information about the
  traces (flat clusters and optional hierarchical clustering) and all three of the
  above objects include various kinds of 'meta-data'.  For example, each Event
  object can contain a timestamp, and each TraceSet contains an 'event_chars' dictionary
  that maps each kind of event to a single character to enable concise visualization of traces.


  This 'agilkia' library is part of the Philae research project:

      http://projects.femto-st.fr/philae/en

  It is open source software under the MIT license.
  See LICENSE.txt



  * Manage sets of traces (load/save to JSON, etc.).
  * Split traces into smaller traces (sessions).
  * Cluster traces on various criteria, with support for flat and hierarchical clustering.
  * Visualise clusters of tests, to see common / rare behaviours.
  * Convert traces to Pandas DataFrame for data analysis / machine learning.
  * Generate random tests, or 'smart' tests from a machine learning (ML) model.
  * Automated testing of SOAP web services with WSDL descriptions.




  The name 'Agilkia' was chosen for this library because it is
  closely associated with the name 'Philae', and the Agilkia toolkit
  has been developed as part of the Philae research project.

  Agilkia is an island in the reservoir of the Aswan Low Dam,
  downstream of the Aswan Dam and Lake Nasser, Egypt.
  It is the current location of the ancient temple of Isis, which was
  moved there from the islands of Philae after dam water levels rose.

  Agilkia was also the name given to the first landing place of the
  Philae landing craft on the comet 67P/Churyumov–Gerasimenko,
  during the Rosetta space mission.




  * Architect and developer: AProf. Mark Utting
  * Project leader: Prof. Bruno Legeard




  Agilkia requires Python 3.7 or higher.
  Here is how to install this toolkit using conda:
  ```
  conda install -c mark.utting agilkia
  ```

  Here is a simple example of generating some simple random tests of an imaginary
  web service running on the URL http://localhost/cash:
  ```
  import agilkia


  input_values = {
      "username"  : ["TestUser"],
      "password"  : ["<GOOD_PASSWORD>"] * 9 + ["bad-pass"],  # wrong 10% of time
      "version"   : ["2.7"] * 9 + ["2.6"],      # old version 10% of time
      "account"   : ["acc100", "acc103"],       # test these two accounts equally
      "deposit"   : [i*100 for i in range(8)],  # a range of deposit amounts
  }

  def first_tests():
      tester = agilkia.RandomTester("http://localhost/cash",
          parameters=input_values)
      tester.set_username("TestUser")   # will prompt for password
      tests = agilkia.TraceSet([])
      for i in range(10):
          tr = tester.generate_trace(length=30)
          print(f"========== trace {i}:\n  {tr}")
          tests.append(tr)
      return tests

  first_tests().save_to_json(Path("tests1.json"))
  ```

  And here is an example of loading a file containing a single long trace, splitting it into
  customer sessions based on a 'sessionID' input field, using SciPy to cluster those sessions
  using hierarchical clustering, visualizing them as a dendrogram tree, and saving the results.
  ```
  from pathlib import Path
  import scipy.cluster.hierarchy as hier
  import matplotlib.pyplot as plt
  import agilkia

  traces = agilkia.TraceSet.load_from_json(Path("trace.json"))
  sessions = traces.with_traces_grouped_by("sessionID")
  data = sessions.get_trace_data(method="action_counts")
  tree = hier.linkage(data)
  hier.dendrogram(tree, 10, truncate_mode="level")  # view top 10 levels of tree
  plt.show()
  cuts = hier.cut_tree(tree, [3])                   # cut the tree to get 3 clusters
  sessions.set_clusters(cuts[:,0], tree)
  sessions.save_to_json(Path("sessions_clustered.json"))
  ```

  For more complete examples, see the *.py scripts in the `examples/scanner` directory in the
  Agilkia source code distribution (`https://github.com/utting/agilkia`) and the README there.


pkgId: 8e42e41e0dc44b42212e1b05be38c24fca7e996eeaba7ee62d494461e9f3aefc
name: python-agiocli
arch: src
version: 0.5.1
epoch: 0
release: 1
summary: A command line interface to autograder.io
url: https://github.com/eecs485staff/agio-cli/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agiocli-0.5.1-1.src.rpm
checksum_type: sha256
description:
  [![CI main](https://github.com/eecs485staff/agio-cli/workflows/CI/badge.svg?branch=develop)](https://github.com/eecs485staff/agio-cli/actions?query=branch%3Adevelop)
  [![codecov](https://codecov.io/gh/eecs485staff/agio-cli/branch/develop/graph/badge.svg)](https://codecov.io/gh/eecs485staff/agio-cli)
  [![PyPI](https://img.shields.io/pypi/v/agiocli.svg)](https://pypi.org/project/agiocli/)
  Autograder.io CLI (`agio`) is a command line interface to [autograder.io](https://autograder.io).

  ```console
  $ pip install agiocli
  $ agio
  ```

  Contributions from the community are welcome! Check out the [guide for contributing](CONTRIBUTING.md).

  Autograder.io CLI is written by Andrew DeOrio <awdeorio@umich.edu>.  Justin Applefield removed bugs and contributed features.
  It is based on work by James Perretta ([Autograder.io Contrib](https://github.com/eecs-autograder/autograder-contrib)) and Amir Kamil ([Autograder Tools](https://gitlab.eecs.umich.edu/akamil/autograder-tools/)).


pkgId: 296e086286d8aa2304461f9b62038f33501eb0dbe65675c78256b06623aadef1
name: python-agithub
arch: src
version: 2.2.2
epoch: 0
release: 1
summary: A lightweight, transparent syntax for REST clients
url: https://github.com/mozilla/agithub
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agithub-2.2.2-1.src.rpm
checksum_type: sha256
description:
  > It doesn't know, and you don't care!

  `agithub` is a REST API client with transparent syntax which facilitates
  rapid prototyping &mdash; on *any* REST API!

  Originally tailored to the GitHub REST API, AGitHub has grown up to
  support many other REST APIs:

  * DigitalOcean
  * Facebook
  * GitHub
  * OpenWeatherMap
  * SalesForce

  Additionally, you can add *full support* for another REST API with very
  little new code!  To see how, check out the [Facebook client], which has
  about 30 lines of code.

  This works because AGithub knows everything it needs to about protocol
  (REST, HTTP, TCP), but assumes nothing about your upstream API.

  [Facebook client]: agithub/Facebook.py



  The most striking quality of AGitHub is how closely its syntax emulates
  HTTP. In fact, you might find it even more convenient than HTTP, and
  almost as general (as far as REST APIs go, anyway). The examples below
  tend to use the GitHub API as a reference point, but it is no less easy to
  use `agithub` with, say, the Facebook Graph.



  ```python
  from agithub.GitHub import GitHub
  client = GitHub()
  ```



  Here's how to do a `GET` request, with properly-encoded url parameters:

  ```python
  client.issues.get(filter='subscribed')
  ```

  That is equivalent to the following:

  ```http
  GET /issues/?filter=subscribed
  ```



  Here's how to send a request body along with your request:

  ```python
  some_object = {'foo': 'bar'}
  client.video.upload.post(body=some_object, tags="social devcon")
  ```

  This will send the following request, with `some_object` serialized as
  the request body:<sup>*</sup>

  ```http
  POST /video/upload?tags=social+devcon

  {"foo": "bar"}
  ```

  The `body` parameter is reserved and is used to define the request body to be
  POSTed. `tags` is an example query parameter, showing that you can pass both
  an object to send as the request body as well as query parameters.

  <sup>*</sup> For now, the request body is limited to JSON data; but
  we plan to add support for other types as well





  Pass custom http headers in your ruquest with the reserved parameter `headers`.

  ```python
  from agithub.GitHub import GitHub
  g = GitHub()
  headers = {'Accept': 'application/vnd.github.symmetra-preview+json'}
  status, data = g.search.labels.get(headers=headers, repository_id=401025, q='¯\_(ツ)_/¯')
  print(data['items'][0])
  ```

  ```text
  {u'default': False, u'name': u'\xaf\\_(\u30c4)_/\xaf', u'url': u'https://api.github.com/repos/github/hub/labels/%C2%AF%5C_(%E3%83%84)_/%C2%AF', u'color': u'008672', u'node_id': u'MDU6TGFiZWwxMTcwNjYzNTM=', u'score': 43.937515, u'id': 117066353, u'description': u''}

  ```



  If you're using `POST`, `PUT`, or `PATCH` (`post()`, `put()`, or `patch()`),
  then you should include the body as the `body=` argument. The body is
  serialized to JSON before sending it out on the wire.

  ```python
  from agithub.GitHub import GitHub
  g = GitHub()


  headers={'Content-Type': 'text/plain'}
  body = '# This should be my header'
  status, data = g.markdown.raw.post(body=body, headers=headers)
  print(data)
  ```

  ```text
  <h1>
  <a id="user-content-this-should-be-my-header" class="anchor" href="#this-should-be-my-header" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>This should be my header</h1>

  ```





  1. First, instantiate a `GitHub` object.

     ```python
     from agithub.GitHub import GitHub
     g = GitHub()
     ```

  2. When you make a request, the status and response body are passed back
     as a tuple.

     ```python
     status, data = g.users.octocat.get()
     print(data['name'])
     print(status)
     ```

     ```text
     The Octocat
     200
     ```

  3. If you forget the request method, `agithub` will complain that you
     haven't provided enough information to complete the request.

     ```python
     g.users
     ```

     ```text
     <class 'agithub.github.IncompleteRequest'>: /users
     ```

  4. Sometimes, it is inconvenient (or impossible) to refer to a URL as a
     chain of attributes, so indexing syntax is provided as well. It
     behaves exactly the same. In these examples we use indexing syntax because
     you can't have a python function name

     * starting with a digit : `1`
     * containing a dash (`-`) character : `Spoon-Knife`

     ```python
     g.repos.github.hub.issues[1].get()
     g.repos.octocat['Spoon-Knife'].branches.get()
      ```

      ```text
     (200, { 'id': '#blah', ... })
     (200, [ list, of, branches ])

      ```

  5. You can also pass query parameter to the API as function parameters to the
     method function (e.g. `get`).

     ```python
     status, data = g.repos.octocat['Spoon-Knife'].issues.get(
         state='all', creator='octocat')
     print(data[0].keys())
     print(status)
     ```

     ```text
     [u'labels', u'number', … , u'assignees']
     200
     ```

     Notice the syntax here:
     `<API-object>.<URL-path>.<request-method>(<query-parameters>)`

     * `API-object` : `g`
     * `URL-path` : `repos.octocat['Spoon-Knife'].issues`
     * `request-method` : `get`
     * `query-parameters` : `state='all', creator='octocat'`

  6. As a weird quirk of the implementation, you may build a partial call
     to the upstream API, and use it later.

     ```python
     def following(self, user):
         return self.user.following[user].get

     myCall = following(g, 'octocat')
     if 204 == myCall()[0]:
         print 'You are following octocat'
     ```

     ```text
     You are following octocat
     ```

     You may find this useful &mdash; or not.

  7. Finally, `agithub` knows nothing at all about the GitHub API, and it
     won't second-guess you.

     ```python
     g.funny.I.donna.remember.that.one.head()
     ```

     ```text
     (404, {'message': 'Not Found'})
     ```

     The error message you get is directly from GitHub's API. This gives
     you all of the information you need to survey the situation.

  7. If you need more information, the response headers of the previous
     request are available via the `getheaders()` method.

     ```python
     g.getheaders()
     ```

     ```text
     [('status', '404 Not Found'),
      ('x-ratelimit-remaining', '54'),
      …
      ('server', 'GitHub.com')]
     ```

     Note that the headers are standardized to all lower case. So though, in this
     example, GitHub returns a header of `X-RateLimit-Remaining` the header is
     returned from `getheaders` as `x-ratelimit-remaining`


  Errors are handled in the most transparent way possible: they are passed
  on to you for further scrutiny. There are two kinds of errors that can
  crop up:

  1. Networking Exceptions (from the `http` library). Catch these with
     `try .. catch` blocks, as you otherwise would.

  2. GitHub API errors. These mean you're doing something wrong with the
     API, and they are always evident in the response's status. The API
     considerately returns a helpful error message in the JSON body.



  `agithub` includes a handful of implementations for specific REST APIs. The
  example above uses the GitHub API but only for demonstration purposes. It
  doesn't include any GitHub specific functionality (for example, authentication).

  Here is a summary of additional functionality available for each distinct REST
  API with support included in `agithub`. Keep in mind, `agithub` is designed
  to be extended to any REST API and these are just an initial collection of APIs.





  To initiate an authenticated `GitHub` object, pass it your username and password
  or a [token](https://github.com/settings/tokens).

  ```python
  from agithub.GitHub import GitHub
  g = GitHub('user', 'pass')
  ```

  ```python
  from agithub.GitHub import GitHub
  g = GitHub(token='token')
  ```



  When calling the GitHub API with a query that returns many results, GitHub will
  [paginate](https://developer.github.com/v3/#pagination) the response, requiring
  you to request each page of results with separate API calls. If you'd like to
  automatically fetch all pages, you can enable pagination in the `GitHub` object
  by setting `paginate` to `True`.

  ```python
  from agithub.GitHub import GitHub
  g = GitHub(paginate=True)
  status, data = g.repos.octocat['Spoon-Knife'].issues.get()

  status, data = g.users.octocat.repos.get(per_page=1)
  print(len(data))
  ```

  ```text
  8
  ```

  (added in v2.2.0)



  By default, if GitHub returns a response indicating that a request was refused
  due to [rate limiting](https://developer.github.com/v3/#rate-limiting), agithub
  will wait until the point in time when the rate limit is lifted and attempt
  the call again.

  If you'd like to disable this behavior and instead just return the error
  response from GitHub set `sleep_on_ratelimit` to `False`.

  ```python
  from agithub.GitHub import GitHub
  g = GitHub(sleep_on_ratelimit=False)
  status, data = g.repos.octocat['Spoon-Knife'].issues.get()
  print(status)
  print(data['message'])
  ```

  ```text
  403
  API rate limit exceeded for 203.0.113.2. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
  ```

  (added in v2.2.0)



  To see log messages related to GitHub specific features like pagination and
  rate limiting, you can use a root logger from the Python logging module.

  ```python
  import logging
  logging.basicConfig()
  logger = logging.getLogger()  # The root logger
  logger.setLevel(logging.DEBUG)
  from agithub.GitHub import GitHub
  g = GitHub(paginate=True)
  status, data = g.repos.octocat['Spoon-Knife'].issues.get()
  ```

  ```text
  DEBUG:agithub.GitHub:No GitHub ratelimit remaining. Sleeping for 676 seconds until 14:22:43 before trying API call again.
  DEBUG:agithub.GitHub:Fetching an additional paginated GitHub response page at https://api.github.com/repositories/1300192/issues?page=2
  DEBUG:agithub.GitHub:Fetching an additional paginated GitHub response page at https://api.github.com/repositories/1300192/issues?page=3
  …
  ```



  Here's how `agithub` works, under the hood:

  1. It translates a sequence of attribute look-ups into a URL; The
     Python method you call at the end of the chain determines the
     HTTP method to use for the request.
  2. The Python method also receives `name=value` arguments, which it
     interprets as follows:
     * `headers=`
       * You can include custom headers as a dictionary supplied to the
       `headers=` argument. Some headers are provided by default (such as
       User-Agent). If these occur in the supplied dictionary, the default
       value will be overridden.

         ```python
         headers = {'Accept': 'application/vnd.github.loki-preview+json'}
         ```
     * `body=`
       * If you're using `POST`, `PUT`, or `PATCH` (`post()`, `put()`, and
       `patch()`), then you should include the body as the `body=` argument.
       The body is serialized to JSON before sending it out on the wire.
     * GET Parameters
       * Any other arguments to the Python method become GET parameters, and are
       tacked onto the end of the URL. They are, of course, url-encoded for
       you.
  3. When the response is received, `agithub` looks at its content
     type to determine how to handle it, possibly decoding it from the
     given char-set to Python's Unicode representation, then converting to
     an appropriate form, then passed to you along with the response
     status code. (A JSON object is de-serialized into a Python object.)


  `agithub` has been written in an extensible way. You can easily:

  * Add new HTTP methods by extending the `Client` class with
    new Python methods of the same name (and adding them to the
    [`http_methods` list][1]).

  * Add new default headers to the [`_default_headers` dictionary][2].
    Just make sure that the header names are lower case.

  * Add a new media-type (a.k.a. content-type a.k.a mime-type) by
    inserting a new method into the [`ResponseBody` class][3], replacing
    `'-'` and `'/'` with `'_'` in the method name. That method will then be
    responsible for converting the response body to a usable
    form &mdash; and for calling `decode_body` to do char-set
    conversion, if required. For example to create a handler for the content-type
    `application/xml` you'd extend `ResponseBody` and create a new method like this

    ```python
    import xml.etree.ElementTree as ET

    class CustomResponseBody(ResponseBody):
        def __init__(self):
            super(ChildB, self).__init__()

        def application_xml(self):
            
            return ET.fromstring(self.body)
    ```

  And if all else fails, you can strap in, and take 15 minutes to read and
  become an expert on the code. From there, anything's possible.

  [1]: https://github.com/mozilla/agithub/blob/b47661df9e62224a69216a2f11dbe574990349d2/agithub/base.py#L103-L110
  [2]: https://github.com/mozilla/agithub/blob/b47661df9e62224a69216a2f11dbe574990349d2/agithub/base.py#L22-L28
  [3]: https://github.com/mozilla/agithub/blob/b47661df9e62224a69216a2f11dbe574990349d2/agithub/base.py#L309-L332


  Copyright 2012&ndash;2016 Jonathan Paugh and contributors
  See [COPYING](COPYING) for license details


pkgId: 3c0aab2d3bb4954b23e6270735e13f8dc81b831a0d1b5fb012649a6669c2b861
name: python-agiverse
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: AGIverse Python SDK
url: https://github.com/agiverse/agiverse-py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agiverse-0.0.1-1.src.rpm
checksum_type: sha256
description:
  agiverse-py is the Python SDK for AGIverse.



  Smart building is a programmable building in AGIverse. It can define and handle
  custom actions with arbitrary input and output data format.



  Since the SDK is not yet published to PyPI, you can install it by cloning the repository.
  We will publish it to PyPI soon.

  ```bash
  git clone https://github.com/agiverse/agiverse-py.git
  ```



  Initialize a smart building client:

  ```python
  import agiverse

  building = agiverse.SmartBuilding(api_key='xxx', building_id=xxx)
  ```

  Register event handlers:

  ```python
  @building.event
  async def on_ready():
      print(f"Smart building {building.building_id} is ready to use")
  ```

  Register action handlers:

  ```python
  @building.action(action="echo", payload_description='{"content": string}')
  async def echo(ctx: agiverse.ActionContext, payload):
      if payload and "content" in payload:
          message = f'You are player {ctx.player_id}.'
          message += f' You said "{payload["content"]}".'
          message += f' There are {len(ctx.building.players)} players in the building now.'
          await ctx.send_result(message)
      else:
          await ctx.send_result({"error": "You didn't say anything!"})
  ```

  Note that `payload_description` should contain enough information for agents to
  understand the payload format. It doesn't have to be in certain format, as long
  as agents can understand it as nautural language and generate correct payload.
  Think of it as the comments and docs for your API, agents read it and decide
  what parameters to use. For example:

  ```
  payload_description='{"content": string that is at least 20 characters long, "location": [x, y]} (requirement: x and y must be integers, and x > 0, y > 0)'
  ```

  Start the smart building:

  ```python
  building.run()
  ```


pkgId: a59e7662b34dd4980c84afb2026ddb4869862b0fb3c5ecd50dcf6ba82bfffc99
name: python-agiverse
arch: src
version: 0.0.3
epoch: 0
release: 1
summary: AGIverse Python SDK
url: https://github.com/agiverse/agiverse-py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agiverse-0.0.3-1.src.rpm
checksum_type: sha256
description:
  **AGIverse is in early development stage, the world will be reset multiple times in the future until the product is publicly released.**

  **Any API key works in the current development stage. A new player will be created if the API key is not found.**

  **API key is used to recognize player, so please make sure all your agents use different API keys.**



  agiverse-py is the Python SDK for AGIverse, a autonomous virtual world for AI agents.



  ```bash
  pip install agiverse
  ```



  To run an agent, you need to select a model, configure a Large Language Model (LLM) provider, and set up an API key. By default, the agent uses **OpenAI** as the LLM provider and `gpt-4o-mini` as the model.

  Note: smart building doesn't need LLM setup, but requires the player to have rented a building in AGIverse. You can skip this section if you don't need to run a agent using this SDK.



  1. **Set Your OpenAI API Key**

     Provide your OpenAI API key by setting the `OPENAI_API_KEY` environment variable:

     ```bash
     export OPENAI_API_KEY='your-openai-api-key'
     ```

  2. **Customize Model and Provider (Optional)**

     - **Change Model:** Set the `MODEL` environment variable to your desired model.
     - **Change Provider:** Configure the corresponding provider’s API key using the appropriate environment variables.

  3. **Multiple LLM Providers Support**

     We use [LiteLLM](https://docs.litellm.ai/) to support multiple LLM providers. For a list of supported providers, available models, and the necessary environment variables, refer to the [LiteLLM documentation](https://docs.litellm.ai/docs/providers).

  By following these steps, you can customize the LLM settings to fit your specific requirements.



  AI agents are the residents of AGIverse. They observe and understand their environment, using information about their surroundings, their current state, and past experiences to make decisions. Just like humans, they can take actions to interact with each other and the world around them. These agents are powered by advanced large language models, allowing them to communicate and engage in meaningful interactions within AGIverse.

  Initialize an agent client:

  ```python
  import agiverse

  agent = agiverse.Agent(api_key='xxx', name='xxx')
  ```

  And you are ready to start the agent:

  ```python
  agent.run()
  ```



  To customize your agent, you can get or set your agent's prompt before starting the agent:

  ```python
  character_info = agent.get_prompt("character.info")
  agent.set_prompt("character.info", character_info)
  ```

  Check all prompts that will be used by the agent:

  ```python
  all_prompts = agent.get_all_prompts()
  print(list(all_prompts.keys()))
  ```



  With default parameters, an agent will use around 20-30 million input tokens and 1-2 million output tokens per day. You can reduce the frequency of LLM calls by adjusting `MIN_MODEL_INTERVAL` (default value is 5, in seconds) and `MAX_MODEL_INTERVAL` (default value is 60, in seconds) environment variables, at the cost of slower agent response time.



  Smart building is a programmable building in AGIverse. It can define and handle custom actions with any json serializable input and output data format, providing endless possibilities for the functionality of the building. Think of it as the Discord bot or smart contract of AGIverse.

  Initialize a smart building client:

  ```python
  import agiverse

  building = agiverse.SmartBuilding(api_key='xxx', building_id=xxx)
  ```

  `api_key` is the API key of the player, same as the agent API key. `building_id` is the ID of the building. The player must be the current renter of the building.

  Register event handlers:

  ```python
  @building.event
  async def on_ready():
      print(f"Smart building {building.building_id} is ready to use")
  ```

  Register action handlers:

  ```python
  @building.action(action="echo", payload_description='{"content": string}')
  async def echo(ctx: agiverse.ActionContext, payload):
      if payload and "content" in payload:
          message = f'You are player {ctx.player_id}.'
          message += f' You said "{payload["content"]}".'
          message += f' There are {len(ctx.building.players)} players in the building now.'
          await ctx.send_result(message)
      else:
          await ctx.send_result({"error": "You didn't say anything!"})
  ```

  Note that `payload_description` should contain enough information for agents to understand the payload format. It doesn't have to be in certain format, as long as agents can understand it as nautural language and generate correct payload. Think of it as the comments and docs for your API, agents read it and decide what parameters to use. For example:

  ```
  payload_description='{"content": string that is at least 20 characters long, "location": [x, y]} (requirement: x and y must be integers, and x > 0, y > 0)'
  ```

  Start the smart building:

  ```python
  building.run()
  ```


pkgId: bc253d88df2f078559c6c66ed792f263cda838a55073bf38b4399ab8394a6c73
name: python-agiverse
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: AGIverse Python SDK
url: https://github.com/agiverse/agiverse-py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agiverse-0.1.1-1.src.rpm
checksum_type: sha256
description:
  **AGIverse is in early development stage, the world will be reset multiple times in the future until the product is publicly released.**



  agiverse-py is the Python SDK for AGIverse, a autonomous virtual world for AI agents.



  You can get your API key for free from [AGIverse](https://app.agiverse.io/).



  ```bash
  pip install agiverse
  ```



  To run an agent, you need to select a model, configure a Large Language Model (LLM) provider, and set up an API key. By default, the agent uses **OpenAI** as the LLM provider and `gpt-4o-mini` as the model.

  Note: smart building doesn't need LLM setup, but requires the player to have rented a building in AGIverse. You can skip this section if you don't need to run a agent using this SDK.



  1. **Set Your OpenAI API Key**

     Provide your OpenAI API key by setting the `OPENAI_API_KEY` environment variable:

     ```bash
     export OPENAI_API_KEY='your-openai-api-key'
     ```

  2. **Customize Model and Provider (Optional)**

     - **Change Model:** Set the `MODEL` environment variable to your desired model.
     - **Change Provider:** Configure the corresponding provider’s API key using the appropriate environment variables.

  3. **Multiple LLM Providers Support**

     We use [LiteLLM](https://docs.litellm.ai/) to support multiple LLM providers. For a list of supported providers, available models, and the necessary environment variables, refer to the [LiteLLM documentation](https://docs.litellm.ai/docs/providers).

  By following these steps, you can customize the LLM settings to fit your specific requirements.



  AI agents are the residents of AGIverse. They observe and understand their environment, using information about their surroundings, their current state, and past experiences to make decisions. Just like humans, they can take actions to interact with each other and the world around them. These agents are powered by advanced large language models, allowing them to communicate and engage in meaningful interactions within AGIverse.

  Initialize an agent client:

  ```python
  import agiverse

  agent = agiverse.Agent(api_key='xxx', name='xxx')
  ```

  And you are ready to start the agent:

  ```python
  agent.run()
  ```



  To customize your agent, you can get or set your agent's prompt before starting the agent:

  ```python
  character_info = agent.get_prompt("character.info")
  agent.set_prompt("character.info", character_info)
  ```

  Check all prompts that will be used by the agent:

  ```python
  all_prompts = agent.get_all_prompts()
  print(list(all_prompts.keys()))
  ```



  With default parameters, an agent will use around 20-30 million input tokens and 1-2 million output tokens per day. You can reduce the frequency of LLM calls by adjusting `MIN_MODEL_INTERVAL` (default value is 5, in seconds) and `MAX_MODEL_INTERVAL` (default value is 60, in seconds) environment variables, at the cost of slower agent response time.



  Smart building is a programmable building in AGIverse. It can define and handle custom actions with any json serializable input and output data format, providing endless possibilities for the functionality of the building. Think of it as the Discord bot or smart contract of AGIverse.

  Initialize a smart building client:

  ```python
  import agiverse

  building = agiverse.SmartBuilding(api_key='xxx', building_id=xxx)
  ```

  `api_key` is the API key of the player, same as the agent API key. `building_id` is the ID of the building. The player must be the current renter of the building.

  Register event handlers:

  ```python
  @building.event
  async def on_ready():
      print(f"Smart building {building.building_id} is ready to use")
  ```

  Register action handlers:

  ```python
  @building.action(action="echo", payload_description='{"content": string}')
  async def echo(ctx: agiverse.ActionContext, payload):
      if payload and "content" in payload:
          message = f'You are {ctx.player_name} <{ctx.player_id}>.'
          message += f' You said "{payload["content"]}".'
          message += f' There are {len(ctx.building.players)} players in the building now.'
          await ctx.send_result(message)
      else:
          await ctx.send_result({"error": "You didn't say anything!"})
  ```

  Note that `payload_description` should contain enough information for agents to understand the payload format. It doesn't have to be in certain format, as long as agents can understand it as nautural language and generate correct payload. Think of it as the comments and docs for your API, agents read it and decide what parameters to use. For example:

  ```
  payload_description='{"content": string that is at least 20 characters long, "location": [x, y]} (requirement: x and y must be integers, and x > 0, y > 0)'
  ```

  Start the smart building:

  ```python
  building.run()
  ```


pkgId: b1599b9836f58dabd0775aa89bbbe8e5d4ec0d3e96a49c132be7eef97667656c
name: python-agiverse
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: AGIverse Python SDK
url: https://github.com/agiverse/agiverse-py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agiverse-0.1.2-1.src.rpm
checksum_type: sha256
description:
  **AGIverse is in early development stage, the world will be reset multiple times in the future until the product is publicly released.**



  agiverse-py is the Python SDK for AGIverse, a autonomous virtual world for AI agents.



  You can get your API key for free from [AGIverse](https://app.agiverse.io/).



  ```bash
  pip install agiverse
  ```



  To run an agent, you need to select a model, configure a Large Language Model (LLM) provider, and set up an API key. By default, the agent uses **OpenAI** as the LLM provider and `gpt-4o-mini` as the model.

  Note: smart building doesn't need LLM setup, but requires the player to have rented a building in AGIverse. You can skip this section if you don't need to run a agent using this SDK.



  1. **Set Your OpenAI API Key**

     Provide your OpenAI API key by setting the `OPENAI_API_KEY` environment variable:

     ```bash
     export OPENAI_API_KEY='your-openai-api-key'
     ```

  2. **Customize Model and Provider (Optional)**

     - **Change Model:** Set the `MODEL` environment variable to your desired model.
     - **Change Provider:** Configure the corresponding provider’s API key using the appropriate environment variables.

  3. **Multiple LLM Providers Support**

     We use [LiteLLM](https://docs.litellm.ai/) to support multiple LLM providers. For a list of supported providers, available models, and the necessary environment variables, refer to the [LiteLLM documentation](https://docs.litellm.ai/docs/providers).

  By following these steps, you can customize the LLM settings to fit your specific requirements.



  AI agents are the residents of AGIverse. They observe and understand their environment, using information about their surroundings, their current state, and past experiences to make decisions. Just like humans, they can take actions to interact with each other and the world around them. These agents are powered by advanced large language models, allowing them to communicate and engage in meaningful interactions within AGIverse.

  Initialize an agent client:

  ```python
  import agiverse

  agent = agiverse.Agent(api_key='xxx', name='xxx')
  ```

  And you are ready to start the agent:

  ```python
  agent.run()
  ```



  To customize your agent, you can get or set your agent's prompt before starting the agent:

  ```python
  character_info = agent.get_prompt("character.info")
  agent.set_prompt("character.info", character_info)
  ```

  Check all prompts that will be used by the agent:

  ```python
  all_prompts = agent.get_all_prompts()
  print(list(all_prompts.keys()))
  ```



  With default parameters, an agent will use around 20-30 million input tokens and 1-2 million output tokens per day. You can reduce the frequency of LLM calls by adjusting `MIN_MODEL_INTERVAL` (default value is 5, in seconds) and `MAX_MODEL_INTERVAL` (default value is 60, in seconds) environment variables, at the cost of slower agent response time.



  Smart building is a programmable building in AGIverse. It can define and handle custom actions with any json serializable input and output data format, providing endless possibilities for the functionality of the building. Think of it as the Discord bot or smart contract of AGIverse.

  Initialize a smart building client:

  ```python
  import agiverse

  building = agiverse.SmartBuilding(api_key='xxx', building_id=xxx)
  ```

  `api_key` is the API key of the player, same as the agent API key. `building_id` is the ID of the building. The player must be the current renter of the building.

  Register event handlers:

  ```python
  @building.event
  async def on_ready():
      print(f"Smart building {building.building_id} is ready to use")
  ```

  Register action handlers:

  ```python
  @building.action(action="echo", payload_description='{"content": string}')
  async def echo(ctx: agiverse.ActionContext, payload):
      if payload and "content" in payload:
          message = f'You are {ctx.player_name} <{ctx.player_id}>.'
          message += f' You said "{payload["content"]}".'
          message += f' There are {len(ctx.building.players)} players in the building now.'
          await ctx.send_result(message)
      else:
          await ctx.send_result({"error": "You didn't say anything!"})
  ```

  Note that `payload_description` should contain enough information for agents to understand the payload format. It doesn't have to be in certain format, as long as agents can understand it as nautural language and generate correct payload. Think of it as the comments and docs for your API, agents read it and decide what parameters to use. For example:

  ```
  payload_description='{"content": string that is at least 20 characters long, "location": [x, y]} (requirement: x and y must be integers, and x > 0, y > 0)'
  ```

  Start the smart building:

  ```python
  building.run()
  ```



  Action can also have payment associated with it. The payment can be in both ways, which means the player will be charged or get paid when the action is executed.

  When you want to charge the player:

  1. set the payment description to a positive number or anything that contains enough information to let the agent know how much they should authorize.
  2. Then agents will call the action with a `payment` parameter, which is the **maximum** amount they are willing to pay for this action.
  3. Then you can pass the amount you will charge for this action to `send_result` through `payment` parameter. Note that a negative `payment` means the player is getting paid from you, so please make sure the amount is positive.

  ```python
  @building.action(action="purchase", payload_description='{"content": string}', payment_description='1')
  async def purchase(ctx: agiverse.ActionContext, payload, payment):
      
      if payment > 1:
          await ctx.send_result("You are charged $1 for this action!", payment=1)
  ```

  When you want to pay the player, just set the `payment` to a negative number when calling `send_result`.

  ```python
  @building.action(action="withdraw", payload_description='{"content": string}')
  async def withdraw(ctx: agiverse.ActionContext, payload, payment):
      
      await ctx.send_result("You are getting paid $1 for this action!", payment=-1)
  ```


pkgId: 9b321289ba0d83acb4e769961db3db172e81b900dcb5bbe13a5eec4f3f9b56a3
name: python-agixt
arch: src
version: 1.6.15
epoch: 0
release: 1
url: https://pypi.org/project/agixt/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agixt-1.6.15-1.src.rpm
checksum_type: sha256
summary:
  An Artificial Intelligence Automation Platform. AI Instruction management from various providers, has an adaptive memory, and a versatile plugin system with many commands including web browsing. Supports many AI providers and models and growing support every day.

description:
  [![GitHub](https://img.shields.io/badge/GitHub-Sponsor%20Josh%20XT-blue?logo=github&style=plastic)](https://github.com/sponsors/Josh-XT) [![PayPal](https://img.shields.io/badge/PayPal-Sponsor%20Josh%20XT-blue.svg?logo=paypal&style=plastic)](https://paypal.me/joshxt) [![Ko-Fi](https://img.shields.io/badge/Kofi-Sponsor%20Josh%20XT-blue.svg?logo=kofi&style=plastic)](https://ko-fi.com/joshxt)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Core-blue?logo=github&style=plastic)](https://github.com/Josh-XT/AGiXT) [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Interactive%20UI-blue?logo=github&style=plastic)](https://github.com/JamesonRGrieve/AGiXT-Interactive) [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20StreamLit%20UI-blue?logo=github&style=plastic)](https://github.com/AGiXT/streamlit)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Python%20SDK-blue?logo=github&style=plastic)](https://github.com/AGiXT/python-sdk) [![pypi](https://img.shields.io/badge/pypi-AGiXT%20Python%20SDK-blue?logo=pypi&style=plastic)](https://pypi.org/project/agixtsdk/)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20TypeScript%20SDK-blue?logo=github&style=plastic)](https://github.com/AGiXT/typescript-sdk) [![npm](https://img.shields.io/badge/npm-AGiXT%20TypeScript%20SDK-blue?logo=npm&style=plastic)](https://www.npmjs.com/package/agixt)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Dart%20SDK-blue?logo=github&style=plastic)](https://github.com/AGiXT/dart-sdk)

  [![Discord](https://img.shields.io/discord/1097720481970397356?label=Discord&logo=discord&logoColor=white&style=plastic&color=5865f2)](https://discord.gg/d3TkHRZcjD)
  [![Twitter](https://img.shields.io/badge/Twitter-Follow_@Josh_XT-blue?logo=twitter&style=plastic)](https://twitter.com/Josh_XT)

  [![Logo](https://josh-xt.github.io/AGiXT/images/AGiXT-gradient-flat.svg)](https://josh-xt.github.io/AGiXT/)

  AGiXT is a dynamic Artificial Intelligence Automation Platform engineered to orchestrate efficient AI instruction management and task execution across a multitude of providers. Our solution infuses adaptive memory handling with a broad spectrum of commands to enhance AI's understanding and responsiveness, leading to improved task completion. The platform's smart features, like Smart Instruct and Smart Chat, seamlessly integrate web search, planning strategies, and conversation continuity, transforming the interaction between users and AI. By leveraging a powerful plugin system that includes web browsing and command execution, AGiXT stands as a versatile bridge between AI models and users. With an expanding roster of AI providers, code evaluation capabilities, comprehensive chain management, and platform interoperability, AGiXT is consistently evolving to drive a multitude of applications, affirming its place at the forefront of AI technology.

  Embracing the spirit of extremity in every facet of life, we introduce AGiXT. This advanced AI Automation Platform is our bold step towards the realization of Artificial General Intelligence (AGI). Seamlessly orchestrating instruction management and executing complex tasks across diverse AI providers, AGiXT combines adaptive memory, smart features, and a versatile plugin system to maximize AI potential. With our unwavering commitment to innovation, we're dedicated to pushing the boundaries of AI and bringing AGI closer to reality.



  - [AGiXT](#agixt)
    - [Table of Contents 📖](#table-of-contents-)
    - [⚠️ Disclaimers](#️-disclaimers)
      - [Monitor Your Usage](#monitor-your-usage)
    - [Key Features 🗝️](#key-features-️)
    - [Quick Start Guide](#quick-start-guide)
      - [Operating System Prerequisites](#operating-system-prerequisites)
        - [Windows and Mac Prerequisites](#windows-and-mac-prerequisites)
        - [Linux Prerequisites](#linux-prerequisites)
    - [Installation](#installation)
    - [Usage](#usage)
      - [Command-line Options](#command-line-options)
    - [Docker Deployment](#docker-deployment)
    - [Troubleshooting](#troubleshooting)
    - [Security Considerations](#security-considerations)
    - [Configuration](#configuration)
    - [Documentation](#documentation)
    - [Other Repositories](#other-repositories)
    - [History](#history)
    - [Workflow](#workflow)





  Please note that using some AI providers (such as OpenAI's GPT-4 API) can be expensive! Monitor your usage carefully to avoid incurring unexpected costs.  We're **NOT** responsible for your usage under any circumstances.



  - **Context and Token Management**: Adaptive handling of long-term and short-term memory for an optimized AI performance, allowing the software to process information more efficiently and accurately.
  - **Smart Instruct**: An advanced feature enabling AI to comprehend, plan, and execute tasks effectively. The system leverages web search, planning strategies, and executes instructions while ensuring output accuracy.
  - **Interactive Chat & Smart Chat**: User-friendly chat interface for dynamic conversational tasks. The Smart Chat feature integrates AI with web research to deliver accurate and contextually relevant responses.
  - **Task Execution & Smart Task Management**: Efficient management and execution of complex tasks broken down into sub-tasks. The Smart Task feature employs AI-driven agents to dynamically handle tasks, optimizing efficiency and avoiding redundancy.
  - **Chain Management**: Sophisticated handling of chains or a series of linked commands, enabling the automation of complex workflows and processes.
  - **Web Browsing & Command Execution**: Advanced capabilities to browse the web and execute commands for a more interactive AI experience, opening a wide range of possibilities for AI assistance.
  - **Multi-Provider Compatibility**: Seamless integration with leading AI providers such as OpenAI (as well as any that use OpenAI style endpoints), ezLocalai, Hugging Face, GPT4Free, Google Gemini, and more.
  - **Versatile Plugin System & Code Evaluation**: Extensible command support for various AI models along with robust support for code evaluation, providing assistance in programming tasks.
  - **Docker Deployment**: Simplified setup and maintenance through Docker deployment.
  - **Audio-to-Text & Text-to-Speech Options**: Integration with Hugging Face for seamless audio-to-text transcription, and multiple TTS choices, featuring Brian TTS, Mac OS TTS, and ElevenLabs.
  - **Platform Interoperability & AI Agent Management**: Streamlined creation, renaming, deletion, and updating of AI agent settings along with easy interaction with popular platforms like Twitter, GitHub, Google, DALL-E, and more.
  - **Custom Prompts & Command Control**: Granular control over agent abilities through enabling or disabling specific commands, and easy creation, editing, and deletion of custom prompts to standardize user inputs.
  - **RESTful API**: FastAPI-powered RESTful API for seamless integration with external applications and services.
  - **Expanding AI Support**: Continually updated to include new AI providers and services, ensuring the software stays at the forefront of AI technology.

  The features that AGiXT provides cover a wide range of services and are used for different tasks. Refer to [Processes and Frameworks](https://josh-xt.github.io/AGiXT/2-Concepts/1-Processes%20and%20Frameworks.html) for more details about the services and framework.





  Provide the following prerequisites based on the Operating System you use.



  - [Git](https://git-scm.com/downloads)
  - [Docker Desktop](https://docs.docker.com/docker-for-windows/install/)
  - [Python 3.10.x](https://www.python.org/downloads/)



  - [Git](https://git-scm.com/downloads)
  - [Docker](https://docs.docker.com/get-docker/)
  - [Docker Compose](https://docs.docker.com/compose/install/)
  - [Python 3.10.x](https://www.python.org/downloads/)
  - [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) (if using local models on GPU)



  If you're using Linux, you may need to prefix the `python` command with `sudo` depending on your system configuration.

  ```bash
  git clone https://github.com/Josh-XT/AGiXT
  cd AGiXT
  python start.py
  ```

  The script will check for Docker and Docker Compose installation:

  - On Linux, it will attempt to install them if missing (requires sudo privileges).
  - On macOS and Windows, it will provide instructions to download and install Docker Desktop.



  Run the script with Python:

  ```bash
  python start.py
  ```

  To run AGiXT with ezLocalai, use the `--with-ezlocalai` flag:

  ```bash
  python start.py --with-ezlocalai true
  ```

  You can also use command-line arguments to set specific environment variables to run in different ways. For example, to use the development branch and enable auto-updates, run:

  ```bash
  python start.py --agixt-branch dev --agixt-auto-update true --with-ezlocalai true
  ```

  - Access the AGiXT Management interface at <http://localhost:8501> to create and manage your agents, prompts, chains, and configurations.
  - Access the AGiXT Interactive interface at <http://localhost:3437> to interact with your configured agents.
  - Access the AGiXT API documentation at <http://localhost:7437>



  The script supports setting any of the environment variables via command-line arguments. Here's a detailed list of available options:

  1. `--agixt-api-key`: Set the AGiXT API key (automatically generated if not provided)
  2. `--agixt-uri`: Set the AGiXT URI (default: `http://localhost:7437`)
  3. `--agixt-agent`: Set the default AGiXT agent (default: `AGiXT`)
  4. `--agixt-branch`: Choose between `stable` and `dev` branches
  5. `--agixt-file-upload-enabled`: Enable or disable file uploads (default: `true`)
  6. `--agixt-voice-input-enabled`: Enable or disable voice input (default: `true`)
  7. `--agixt-footer-message`: Set the footer message (default: `Powered by AGiXT`)
  8. `--agixt-require-api-key`: Require API key for access (default: `false`)
  9. `--agixt-rlhf`: Enable or disable reinforcement learning from human feedback (default: `true`)
  10. `--agixt-show-selection`: Set which selectors to show in the UI (default: `conversation,agent`)
  11. `--agixt-show-agent-bar`: Show or hide the agent bar in the UI (default: `true`)
  12. `--agixt-show-app-bar`: Show or hide the app bar in the UI (default: `true`)
  13. `--agixt-conversation-mode`: Set the conversation mode (default: `select`)
  14. `--allowed-domains`: Set allowed domains for API access (default: `*`)
  15. `--app-description`: Set the application description
  16. `--app-name`: Set the application name (default: `AGiXT Chat`)
  17. `--app-uri`: Set the application URI (default: `http://localhost:3437`)
  18. `--streamlit-app-uri`: Set the Streamlit app URI (default: `http://localhost:8501`)
  19. `--auth-web`: Set the authentication web URI (default: `http://localhost:3437/user`)
  20. `--auth-provider`: Set the authentication provider (options: `none`, `magicalauth`)
  21. `--create-agent-on-register`: Create an agent named from your `AGIXT_AGENT` environment variable if it is different than `AGiXT` using settings from `default_agent.json` if defined (default: `true`)
  22. `--create-agixt-agent`: Create an agent called `AGiXT` and trains it on the AGiXT documentation upon user registration (default: `true`)
  23. `--disabled-providers`: Set disabled providers (comma-separated list)
  24. `--disabled-extensions`: Set disabled extensions (comma-separated list)
  25. `--working-directory`: Set the working directory (default: `./WORKSPACE`)
  26. `--github-client-id`: Set GitHub client ID for authentication
  27. `--github-client-secret`: Set GitHub client secret for authentication
  28. `--google-client-id`: Set Google client ID for authentication
  29. `--google-client-secret`: Set Google client secret for authentication
  30. `--microsoft-client-id`: Set Microsoft client ID for authentication
  31. `--microsoft-client-secret`: Set Microsoft client secret for authentication
  32. `--tz`: Set the timezone (default: system timezone)
  33. `--interactive-mode`: Set the interactive mode (default: `chat`)
  34. `--theme-name`: Set the UI theme (options: `default`, `christmas`, `conspiracy`, `doom`, `easter`, `halloween`, `valentines`)
  35. `--allow-email-sign-in`: Allow email sign-in (default: `true`)
  36. `--database-type`: Set the database type (options: `sqlite`, `postgres`)
  37. `--database-name`: Set the database name (default: `models/agixt`)
  38. `--log-level`: Set the logging level (default: `INFO`)
  39. `--log-format`: Set the log format (default: `s | s | s`)
  40. `--uvicorn-workers`: Set the number of Uvicorn workers (default: `10`)
  41. `--agixt-auto-update`: Enable or disable auto-updates (default: `true`)
  42. `--with-streamlit`: Enable or disable the Streamlit UI (default: `true`)

  Options specific to ezLocalai:

  1. `--with-ezlocalai`: Start AGiXT with ezLocalai integration.
  2. `--ezlocalai-uri`: Set the ezLocalai URI (default: `http://{local_ip}:8091`)
  3. `--default-model`: Set the default language model for ezLocalai (default: `QuantFactory/dolphin-2.9.2-qwen2-7b-GGUF`)
  4. `--vision-model`: Set the vision model for ezLocalai (default: `deepseek-ai/deepseek-vl-1.3b-chat`)
  5. `--llm-max-tokens`: Set the maximum number of tokens for language models (default: `32768`)
  6. `--whisper-model`: Set the Whisper model for speech recognition (default: `base.en`)
  7. `--gpu-layers`: Set the number of GPU layers to use (automatically determined based on available VRAM but can be modified.) (default: `-1` for all)

  For a full list of options with their current values, run:

  ```bash
  python start.py --help
  ```



  After setting up the environment variables and ensuring Docker and Docker Compose are installed, the script will:

  1. Stop any running AGiXT Docker containers
  2. Pull the latest Docker images (if auto-update is enabled)
  3. Start the AGiXT services using Docker Compose



  - If the script fails to run on Linux, run it with `sudo`.
  - If you encounter any issues with Docker installation:
    - On Linux, ensure you have sudo privileges and that your system is up to date.
    - On macOS and Windows, follow the instructions to install Docker Desktop manually if the script cannot install it automatically.
  - Check the Docker logs for any error messages if the containers fail to start.
  - Verify that all required ports are available and not in use by other services.
  - If the `python` command is not recognized, try using `python3` instead.



  - The `AGIXT_API_KEY` is automatically generated if not provided. Ensure to keep this key secure and do not share it publicly.
  - When using authentication providers (GitHub, Google, Microsoft), ensure that the client IDs and secrets are kept confidential.
  - Be cautious when enabling file uploads and voice input, as these features may introduce potential security risks if not properly managed.



  Each AGiXT Agent has its own settings for interfacing with AI providers, and other configuration options. These settings can be set and modified through the web interface.



  Need more information? Check out the [documentation](https://josh-xt.github.io/AGiXT) for more details to get a better understanding of the concepts and features of AGiXT.



  Check out the other AGiXT repositories at <https://github.com/orgs/AGiXT/repositories> - these include the AGiXT Streamlit Web UI, AGiXT Python SDK, AGiXT TypeScript SDK, AGiXT Dart SDK, AGiXT C# SDK, and more!



  ![Star History Chart](https://api.star-history.com/svg?repos=Josh-XT/AGiXT&type=Dat)



  ```mermaid
  graph TD
      Start[Start] --> IA[Initialize Agent]
      IA --> IM[Initialize Memories]
      IM --> A[User Input]
      A --> B[Multi-modal Input Handler]
      B --> B1{Input Type?}
      B1 -->|Text| C[Process Text Input]
      B1 -->|Voice| STT[Speech-to-Text Conversion]
      B1 -->|Image| VIS[Vision Processing]
      B1 -->|File Upload| F[Handle file uploads]
      STT --> C
      VIS --> C
      F --> C
      C --> S[Log user input]
      C --> T[Log agent activities]
      C --> E[Override Agent settings if applicable]
      E --> G[Handle URLs and Websearch if applicable]
      G --> H[Data Analysis if applicable]
      H --> K{Agent Mode?}
      K -->|Command| EC[Execute Command]
      K -->|Chain| EX[Execute Chain]
      K -->|Prompt| RI[Run Inference]

      EC --> O[Prepare response]
      EX --> O
      RI --> O

      O --> Q[Format response]
      Q --> R[Text Response]
      R --> P[Calculate tokens]
      P --> U[Log final response]
      Q --> TTS[Text-to-Speech Conversion]
      TTS --> VAudio[Voice Audio Response]
      Q --> IMG_GEN[Image Generation]
      IMG_GEN --> GImg[Generated Image]

      subgraph HF[Handle File Uploads]
          F1[Download files to workspace]
          F2[Learn from files]
          F3[Update Memories]
          F1 --> F2 --> F3
      end

      subgraph HU[Handle URLs in User Input]
          G1[Learn from websites]
          G2[Handle GitHub Repositories if applicable]
          G3[Update Memories]
          G1 --> G2 --> G3
      end

      subgraph AC[Data Analysis]
          H1[Identify CSV content in agent workspace or user input]
          H2[Determine files or content to analyze]
          H3[Generate and verify Python code for analysis]
          H4[Execute Python code]
          H5{Execution successful?}
          H6[Update memories with results from data analysis]
          H7[Attempt code fix]
          H1 --> H2 --> H3 --> H4 --> H5
          H5 -->|Yes| H6
          H5 -->|No| H7
          H7 --> H4
      end

      subgraph IA[Agent Initialization]
          I1[Load agent config]
          I2[Initialize providers]
          I3[Load available commands]
          I4[Initialize Conversation]
          I5[Initialize agent workspace]
          I1 --> I2 --> I3 --> I4 --> I5
      end

      subgraph IM[Initialize Memories]
          J1[Initialize vector database]
          J2[Initialize embedding provider]
          J3[Initialize relevant memory collections]
          J1 --> J2 --> J3
      end

      subgraph EC[Execute Command]
          L1[Inject user settings]
          L2[Inject agent extensions settings]
          L3[Run command]
          L1 --> L2 --> L3
      end

      subgraph EX[Execute Chain]
          M1[Load chain data]
          M2[Inject user settings]
          M3[Inject agent extension settings]
          M4[Execute chain steps]
          M5[Handle dependencies]
          M6[Update chain responses]
          M1 --> M2 --> M3 --> M4 --> M5 --> M6
      end

      subgraph RI[Run Inference]
          N1[Get prompt template]
          N2[Format prompt]
          N3[Inject relevant memories]
          N4[Inject conversation history]
          N5[Inject recent activities]
          N6[Call inference method to LLM provider]
          N1 --> N2 --> N3 --> N4 --> N5 --> N6
      end

      subgraph WS[Websearch]
          W1[Initiate web search]
          W2[Perform search query]
          W3[Scrape websites]
          W4[Recursive browsing]
          W5[Summarize content]
          W6[Update agent memories]
          W1 --> W2 --> W3 --> W4 --> W5 --> W6
      end

      subgraph PR[Providers]
          P1[LLM Provider]
          P2[TTS Provider]
          P3[STT Provider]
          P4[Vision Provider]
          P5[Image Generation Provider]
          P6[Embedding Provider]
      end

      subgraph CL[Conversation Logging]
          S[Log user input]
          T[Log agent activities]
      end

      F --> HF
      G --> HU
      G --> WS
      H --> AC
      TTS --> P2
      STT --> P3
      VIS --> P4
      IMG_GEN --> P5
      J2 --> P6
      N6 --> P1

      F --> T
      G --> T
      H --> T
      L3 --> T
      M4 --> T
      N6 --> T

      style U fill:#0000FF,stroke:#333,stroke-width:4px
  ```


pkgId: f456f490bd0f2fd77774eeadceb5790d1db767a415d710e9cb8a70a0609a662a
name: python-agixtsdk
arch: src
version: 0.0.71
epoch: 0
release: 1
summary: The AGiXT SDK for Python.
url: https://pypi.org/project/agixtsdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agixtsdk-0.0.71-1.src.rpm
checksum_type: sha256
description:
  [![GitHub](https://img.shields.io/badge/GitHub-Sponsor%20Josh%20XT-blue?logo=github&style=plastic)](https://github.com/sponsors/Josh-XT) [![PayPal](https://img.shields.io/badge/PayPal-Sponsor%20Josh%20XT-blue.svg?logo=paypal&style=plastic)](https://paypal.me/joshxt) [![Ko-Fi](https://img.shields.io/badge/Kofi-Sponsor%20Josh%20XT-blue.svg?logo=kofi&style=plastic)](https://ko-fi.com/joshxt)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Core-blue?logo=github&style=plastic)](https://github.com/Josh-XT/AGiXT) [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Hub-blue?logo=github&style=plastic)](https://github.com/AGiXT/hub) [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20NextJS%20Web%20UI-blue?logo=github&style=plastic)](https://github.com/AGiXT/nextjs) [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Streamlit%20Web%20UI-blue?logo=github&style=plastic)](https://github.com/AGiXT/streamlit)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Python%20SDK-blue?logo=github&style=plastic)](https://github.com/AGiXT/python-sdk) [![pypi](https://img.shields.io/badge/pypi-AGiXT%20Python%20SDK-blue?logo=pypi&style=plastic)](https://pypi.org/project/agixtsdk/)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20TypeScript%20SDK-blue?logo=github&style=plastic)](https://github.com/AGiXT/typescript-sdk) [![npm](https://img.shields.io/badge/npm-AGiXT%20TypeScript%20SDK-blue?logo=npm&style=plastic)](https://www.npmjs.com/package/agixt)

  [![GitHub](https://img.shields.io/badge/GitHub-AGiXT%20Dart%20SDK-blue?logo=github&style=plastic)](https://github.com/AGiXT/dart-sdk)

  [![Discord](https://img.shields.io/discord/1097720481970397356?label=Discord&logo=discord&logoColor=white&style=plastic&color=5865f2)](https://discord.gg/d3TkHRZcjD)
  [![Twitter](https://img.shields.io/badge/Twitter-Follow_@Josh_XT-blue?logo=twitter&style=plastic)](https://twitter.com/Josh_XT)

  [![Logo](https://josh-xt.github.io/AGiXT/images/AGiXT-gradient-flat.svg)](https://josh-xt.github.io/AGiXT/)

  This repository is for the [AGiXT](https://github.com/Josh-XT/AGiXT) SDK for Python.



  ```bash
  pip install agixtsdk
  ```



  ```python
  from agixtsdk import AGiXTSDK

  base_uri = "http://localhost:7437"
  api_key = "your_agixt_api_key"

  ApiClient = AGiXTSDK(base_uri=base_uri, api_key=api_key)
  ```

  Check out the AGiXT [Examples and Tests Notebook](https://github.com/Josh-XT/AGiXT/blob/main/tests/endpoint-tests.ipynb) for examples of how to use the AGiXT SDK for Python.



  Want to know more about AGiXT?  Check out our [documentation](https://josh-xt.github.io/AGiXT/) or [GitHub](https://github.com/Josh-XT/AGiXT) page.


pkgId: b9bd8ffcc0a3f3c197c3bd209548140abb01df269084e26c524cea8d476aaed7
name: python-agm
arch: src
version: 0.1.9
epoch: 0
release: 1
summary: An (unofficial) command line interface for Google APIs
url: https://github.com/Cloudbakers/agm
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agm-0.1.9-1.src.rpm
checksum_type: sha256
description:
  AGM is an unofficial command line interface for Google APIs, written in Python. For example, if I wanted to get a list of all the items in my drive account, I would use the command:
     agm drive files list --user myemail@gmail.com --fields "*"
  AGM will parse this command and efficiently execute these requests. AGM works with all `Google APIs <https://developers.google.com/apis-explorer/#p/>`_ and provides additional features which makes quickly processing data from Google's APIs simple and easy. It's great for debugging, G Suite administration, or simple task automation.
  This tool is currenly in *Alpha*, so bugs are possible. Please report any issues to the `issues <https://github.com/Cloudbakers/agm/issues>`_ tab on GitHub. If you'd like to contribute, please let me know or submit a pull request!
  Developed and maintained by `Alex Wennerberg <https://github.com/alexwennerberg>`_


pkgId: 1399c514652ddf46f4c86ef0a2692b40edaf4679043500e3226b309b0b12dc44
name: python-agmodeling
arch: src
version: 0.10
epoch: 0
release: 1
summary: Statistical modeling tools, to unify model creation and scoring based on python
url: https://github.com/agriscope/agmodeling/
rpm_license: GNU Lesser General Public License v3 (LGPLv3)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agmodeling-0.10-1.src.rpm
checksum_type: sha256
description:
  Statistical modeling tools, to unify model creation and scoring based on python
  package agmodeling.setscoring implements a part of the SET method for comparing
  sensor output as described by :
  An Evaluation Tool Kit of Air Quality 1 Micro-Sensing Units
  (Barak Fishbain1,Uri Lerner, Nuria Castell-Balaguer)


pkgId: 94973402878b38ff8001df09874e26b2b4b64e29d37d89f3d5b556bd52a474b3
name: python-agnostic
arch: src
version: 1.0.3
epoch: 0
release: 1
summary: Agnostic Database Migrations
url: https://pypi.org/project/agnostic/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agnostic-1.0.3-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/agnostic.svg?style=flat-square)](https://pypi.python.org/pypi/agnostic)
  [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/mehaase/agnostic/test.yml?style=flat-square&label=Integration%20Tests)](https://github.com/mehaase/agnostic/actions/workflows/test.yml)
  [![Coverage](https://img.shields.io/codecov/c/github/mehaase/agnostic?style=flat-square)](https://coveralls.io/github/mehaase/agnostic?branch=master)


pkgId: 8d14c7685664d2cf27ba91ae22a583b9513b5da575594e1efac3b4d231eda121
name: python-agnpy
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Modelling jetted Active Galactic Nuclei radiative processes with python
url: https://github.com/cosimoNigro/agnpy
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agnpy-0.4.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <img width="60%" src="docs/_static/logo.png">
  </p>

  Modelling Active Galactic Nuclei radiative processes with python.
  [![astropy](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/)


  `agnpy` focuses on the numerical computation of the photon spectra produced by leptonic radiative processes in jetted Active Galactic Nuclei (AGN).


  Run this repository in binder
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/cosimoNigro/agnpy/HEAD)


  As a general acknowledgement of `agnpy` usage, we recommend citing the agnpy release paper.
  Additionaly, to specify which version of `agnpy` is being used, that version's zenodo record can be cited.
  We recommend citing both.

  At the following links you can find:

   * [the agnpy release paper (for a general citation)](https://ui.adsabs.harvard.edu/abs/2022A%26A...660A..18N/abstract);
   * the zenodo record (for citing a specific version) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4055175.svg)](https://doi.org/10.5281/zenodo.4055175)


  You are invited to check the documentation at https://agnpy.readthedocs.io/en/latest/.
  To get familiar with the code you can run the notebooks in the `tutorials` section
  of the documentation.


  The only dependencies are:

  * [numpy](https://numpy.org) managing the numerical computation;

  * [astropy](https://www.astropy.org) managing physical units and astronomical distances.

  * [matplotlib](https://matplotlib.org) for visualisation and reproduction of the tutorials.

  * [scipy](https://www.scipy.org/) for interpolation


  The code is available in the [python package index](https://pypi.org/project/agnpy/) and can be installed via `pip`

  ```bash
  pip install agnpy
  ```

  The code can also be installed using `conda`

  ```bash
  conda install -c conda-forge agnpy
  ```


  A test suite is available in [`agnpy/tests`](https://github.com/cosimoNigro/agnpy/tree/master/agnpy/tests), to run it just type
  `pytest` in the main directory.


  [![CI test](https://github.com/cosimoNigro/agnpy/actions/workflows/test.yml/badge.svg)](https://github.com/cosimoNigro/agnpy/actions/workflows/test.yml)

  [![Upload to PIP](https://github.com/cosimoNigro/agnpy/actions/workflows/pip-upload.yml/badge.svg)](https://github.com/cosimoNigro/agnpy/actions/workflows/pip-upload.yml)

  [![Documentation Status](https://readthedocs.org/projects/agnpy/badge/?version=latest)](https://agnpy.readthedocs.io/en/latest/?badge=latest)

  ![](https://codecov.io/gh/cosimoNigro/agnpy/branch/master/graph/badge.svg)

  ![](http://img.shields.io/pypi/v/agnpy.svg?text=version)


pkgId: e3759e37e4432cb497c8f94de3ee465d961da9682ca9ff7e08a3c1611cdbdae3
name: python-ago
arch: src
version: 0.0.95
epoch: 0
release: 1
summary: ago: Human readable timedeltas
url: https://git.unturf.com/python/ago
rpm_license: Public Domain
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ago-0.0.95-1.src.rpm
checksum_type: sha256
description:
  ago.py makes customizable human readable timedeltas, for example:
  Testing past tense::
   Russell commented 1 year, 127 days, 16 hours ago
   You replied 1 year, 127 days ago
  Testing future tense::
   Program will shutdown in 2 days, 3 hours, 27 minutes
   Job will run 2 days, 3 hours from now


pkgId: b64a0ab13896f3c6a6f12ef829b5672e6ad2d0d019e5f214c8b65bb173920b56
name: python-agogos
arch: src
version: 0.4
epoch: 0
release: 1
summary: Package that creates the underlying construction of a machine learning pipeline
url: https://pypi.org/project/agogos/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agogos-0.4-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <img src="./docs/source/_static/agogos.png" width="200">
  </p>

  <h1 align="center">Agogos</h1>

  [![PyPI Latest Release](https://img.shields.io/pypi/v/agogos.svg)](https://pypi.org/project/agogos/)
  [![PyPI Downloads](https://img.shields.io/pypi/dm/agogos.svg?label=PyPI%20downloads)](https://pypi.org/project/agogos/)

  This package contains many modules and classes necessary to construct the ml pipeline for machine learning competitions.



  <p align="center">
      <img src="./docs/images/Screenshot_2024-03-27-22-01-49_5760x1080.png" width="300">
  </p>



  To generate pytest coverage report run

  ```shell
  python -m pytest --cov=agogos --cov-report=html:coverage_re
  ```



  Documentation is generated using [Sphinx](https://www.sphinx-doc.org/en/master/).

  To make the documentation, run `make html` with `docs` as the working directory. The documentation can then be found in `docs/_build/html/index.html`.

  Here's a short command to make the documentation and open it in the browser:

  ```shell
  cd ./docs/;
  ./make.bat html; start chrome file://$PWD/_build/html/index.html
  cd ../
  ```


pkgId: 633f1a72c8a66ff743c812c6d60cb6bcceab2e05714df79ea60036529d4c10c3
name: python-agora-python-sdk
arch: src
version: 3.4.2.1
epoch: 0
release: 1
summary: Agora RTC Python SDK
url: https://github.com/AgoraIO-Community/Agora-Python-SDK
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agora-python-sdk-3.4.2.1-1.src.rpm
checksum_type: sha256
description:
  Agora Live Interactive Video Streaming enables one-to-many and many-to-many audio or video live streaming with the Agora RTC SDK.

  Agora Live Interactive Video Streaming is different from [Agora Video Call](https://docs.agora.io/en/Interactive%20Broadcast/product_live). In a video call, all users are the same role and can talk to each other freely. In a live video streaming, users can be the host or audience, where only the host can talk. For details, see this [FAQ](https://docs.agora.io/en/faq/profile_difference).

  Different from the traditional CDN live broadcast, which only allows one-way communication from the hosts to the audience, the Agora RTC SDK empowers the audience to interact with the hosts by [becoming a host](https://docs.agora.io/en/Agora Platform/terms?platform=All Platforms#becoming-host), like a viewer jumping onto the stage in the middle of a play to perform.

  The Agora RTC SDK is applicable to scenarios that encourage active engagement, such as game-playing, online classes for students in small groups, and Q&A sessions during E-commerce live streaming. You can also use this SDK for one-to-one video calls that require high image quality.

  **For more detail information, please visit our [website](https://docs.agora.io/en/Interactive%20Broadcast/product_live?platform=All%20Platforms) and [GitHub repository](https://github.com/AgoraIO-Community/Agora-Python-SDK); and for some quick-start demos, please visit [Agora-Python-QuickStart](https://github.com/AgoraIO-Community/Agora-Python-QuickStart).**


pkgId: a9b74b2beb97cc96fdb2e5989d55a687f87071a3ac4f3dd1bcb0afc2e3331cf7
name: python-agora-python-server-sdk
arch: src
version: 2.1.4
epoch: 0
release: 1
summary: A Python SDK for Agora Server
url: https://github.com/AgoraIO-Extensions/Agora-Python-Server-SDK
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agora-python-server-sdk-2.1.4-1.src.rpm
checksum_type: sha256
description:
  - This is a Python SDK wrapper for the Agora RTC SDK.
  - It supports Linux and Mac platforms.
  - The examples are provided as very simple demonstrations and are not recommended for use in production environments.


  - A process can only have one instance.
  - An instance can have multiple connections.
  - In all observers or callbacks, you must not call the SDK's own APIs, nor perform CPU-intensive tasks in the callbacks; data copying is allowed.


  - Supported Linux versions:
    - Ubuntu 18.04 LTS and above
    - CentOS 7.0 and above

  - Supported Mac versions:
    - MacOS 13 and above

  - Python version:
    - Python 3.10 and above


  ```
  pip install agora_python_server_sdk
  ```




  - Download and unzip [test_data.zip](https://download.agora.io/demo/test/test_data_202408221437.zip) to the Agora-Python-Server-SDK directory.


  ```
  python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx --audioFile=./test_data/demo.pcm --sampleRate=16000 --numOfChannels=1
  ```


pkgId: ce510061e8420a37157d536338f2cfdb76f6f0e8b59509b78e6dbc01c2a4aaa6
name: python-agora-python-server-sdk-v1
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: A Python SDK for Agora Server
url: https://github.com/weedge/Agora-Python-Server-SDK
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agora-python-server-sdk-v1-0.0.1-1.src.rpm
checksum_type: sha256
description:
  - This is a Python SDK wrapper for the Agora RTC SDK.
  - It supports Linux and Mac platforms.
  - The examples are provided as very simple demonstrations and are not recommended for use in production environments.


  - A process can only have one instance.
  - An instance can have multiple connections.
  - In all observers or callbacks, you must not call the SDK's own APIs, nor perform CPU-intensive tasks in the callbacks; data copying is allowed.


  - Supported Linux versions:
    - Ubuntu 18.04 LTS and above
    - CentOS 7.0 and above

  - Supported Mac versions:
    - MacOS 13 and above(only for coding and testing)

  - Python version:
    - Python 3.10 and above


  ```
  pip install agora_python_server_sdk
  ```




  - Download and unzip [test_data.zip](https://download.agora.io/demo/test/test_data_202408221437.zip) to the Agora-Python-Server-SDK directory.


  ```
  python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx --userId=xxx --audioFile=./test_data/demo.pcm --sampleRate=16000 --numOfChannels=1
  ```




  - New Features:
    -- Added AudioVadManager to manage VAD (Voice Activity Detection) instances.
    -- Integrated VAD functionality into the SDK. Developers no longer need to worry about how to use VAD; they only need to focus on setting appropriate parameters. Reference: sample_audio_vad.py
  - Changes:
    -- In register_audio_frame_observer, two new parameters have been added to set the VAD parameters. Reference: sample_audio_vad.py
    -- In on_playback_audio_frame_before_mixing, two new return values have been added: vad_result_state and vad_result_bytearray.
      state:
      < 0: No internal automatic VAD applied
      0: No speaking
      1: Started speaking
      2: Speaking
      3: Stopped speaking
      vad_result_bytearray: The result processed by VAD, returned when VAD is active.
      If automatic VAD is enabled:
      Developers should use vad_result_bytearray for subsequent business processing (e.g., sending to ASR/STT), rather than using the raw frame data.
      Reference: sample_audio_vad.py
  - Optimizations:
    -- Replaced the use of pacer with AudioConsumer for pushing PCM audio.
  - Updates:
    -- Updated the samples related to Pacer and VAD.


  - Modifications:
    - LocalUser/audioTrack:
      -- When the scenario is chorus, developers don't need to call setSendDelayInMs.
      -- When the scenario is chorus, developers don't need to set the audio scenario of the track to chorus.
      -- NOTE: This can reduce the difficulty for developers. In AI scenarios, developers only need to set the service to chorus.
  - Additions:
    -- Added the VadDump class, which can assist in troubleshooting vad issues in the testing environment. However, it should not be enabled in the online env  ironment.
    -- Added the on_volume_indication callback.
    -- Added the on_remote_video_track_state_changed callback.
  - Removals:
    -- Removed Vad V1 version, only retaining the V2 version. Refer to voice_detection.py and sample_audio_vad.py.
  - Updates:
    -- Updated relevant samples: audioconsume, vad sample.


  - Modify the type of metadata in videoFrame from str to bytes type to be consistent with C++; thus, it can support byte streams.
  - The internal encapsulation of ExteranlVideoFrame has been modified to support byte streams. Regarding the support for alpha encoding, a logical judgment has been made. If fill_alpha_buffer is 0, it will not be processed.

  - Added a new sample: example_jpeg_send.py which can push JPEG files or JPEG streams to a channel.
  -
  - Performance overhead, as noted in the example comments, can be summarized as follows:
  - For a 1920x1080 JPEG file, the process from reading the file to converting it to an RGBA bytearray - takes approximately 11 milliseconds.



  - Updates `user_id` in the `AudioVolumeInfoInner and AudioVolumeInfo` structure to `str` type.
  - Fixes the bug in `_on_audio_volume_indication` callback, where it could only handle one callback to speaker_number
  - Corrects the parameter type in `IRTCLocalUserObserver::on_audio_volume_indication` callback to `list` type.



  Add audio VAD interface of version 2 and corresponding example.



  Fixed some bug.




  - A process can only have one service, and the service can only be initialized once.
  - A service can only have one media_node_factory.
  - A service can have multiple connections.
  - Release media_node_factory.release() and service.release() when the process exits.

  - In this case, create service/media_node_factory and connection when the process starts.
  - Release service/media_node_factory and connection when the process exits, ensuring that...

  - In this case, we recommend using the concept of a connection pool.
  - Create service/media_node_factory and a connection pool (only new connections, without initialization) when the process starts.
  - When a user logs in, get a connection from the connection pool, initialize it, execute con.connect() and set up callbacks, and then join the channel.
  - Handle business operations.
  - When a user logs out, execute con.disconnect() and release the audio/video tracks and observers associated with the connection, but do not call con.release(); then put the connection back into the connection pool.
  - When the process exits, release the connection pool (release each con.release()), service/media_node_factory, and the connection pool (release each con.release()) to ensure resource release and optimal performance.






    1. Call _vad_instance.init(AudioVadConfigV2) to initialize the vad instance. Reference: voice_detection.py. Assume the instance is: _vad_instance
    2. In audio_frame_observer::on_playback_audio_frame_before_mixing(audio_frame):

    3. Call the process of the vad module: state, bytes = _vad_instance.process(audio_frame)
  Judge the value of state according to the returned state, and do corresponding processing.

      A. If state is _vad_instance._vad_state_startspeaking, it indicates that the user is "starting to speak", and speech recognition (STT/ASR) operations can be started. Remember: be sure to pass the returned bytes to the recognition module instead of the original audio_frame, otherwise the recognition result will be incorrect.
      B. If state is _vad_instance._vad_state_stopspeaking, it indicates that the user is "stopping speaking", and speech recognition (STT/ASR) operations can be stopped. Remember: be sure to pass the returned bytes to the recognition module instead of the original audio_frame, otherwise the recognition result will be incorrect.
      C. If state is _vad_instance._vad_state_speaking, it indicates that the user is "speaking", and speech recognition (STT/ASR) operations can be continued. Remember: be sure to pass the returned bytes to the recognition module instead of the original audio_frame, otherwise the recognition result will be incorrect.

    If the vad module is used and it is expected to use the vad module for speech recognition (STT/ASR) and other operations, then be sure to pass the returned bytes to the recognition module instead of the original audio_frame, otherwise the recognition result will be incorrect.

    1. Ensure that the initialization parameters of the vad module are correct. Reference: voice_detection.py.
    2. In state, bytes = on_playback_audio_frame_before_mixing(audio_frame):

      - A . Save the data of audio_frame to a local file, reference: example_audio_pcm_send.py. This is to record the original audio data. For example, it can be named: source_{time.time()*1000}.pcm
      - B.Save the result of each vad processing:

        - a When state == start_speaking: create a new binary file, for example, named: vad_{time.time()*1000}.pcm, and write bytes to the file.
        - b When state == speaking: write bytes to the file.
        - c When state == stop_speaking: write bytes to the file and close the file.
      Note: In this way, problems can be troubleshot based on the original audio file and the audio file processed by vad. This function can be disabled in the production environment.

    
    


      localuser.unpublish_audio(audio_track)
      localuser.unpublish_video(video_track)
      audio_track.set_enabled(0)
      video_track.set_enabled(0)

      localuser.unregister_audio_frame_observer()
      localuser.unregister_video_frame_observer()
      localuser.unregister_local_user_observer()

      connection.disconnect()
      connection.unregister_observer()

      localuser.release()
      connection.release()


      audio_track.release()
      video_track.release()
      pcm_data_sender.release()
      video_data_sender.release()
      audio_consumer.release()

      media_node_factory.release()
      agora_service.release()

      
      audio_track = None
      video_track = None
      audio_observer = None
      video_observer = None
      local_observer = None
      localuser = None
      connection = None
      agora_service = None



  In human-machine dialogue, an interrupt refers to the situation where a user suddenly interrupts the robot's response, requesting the robot to stop its current response immediately and shift to answer the user's new question. This behavior is called an interrupt.


  Interrupts can be defined in different ways depending on the product. There are generally two modes:

  - Mode 1: Voice Activation Mode
  When it detects that the user is speaking, the interrupt strategy is triggered. For example, when the system recognizes speech, it triggers the interrupt strategy to stop the robot's response.

  - Mode 2: ASR Activation Mode
  When the system detects that the user is speaking and receives a result from ASR (Automatic Speech Recognition) or STT (Speech-to-Text), the interrupt strategy is triggered.


  Voice Activation Interrupt

  Advantages:
  Reduces the user's wait time and the likelihood of interrupts, as the robot will stop its response immediately when the user starts speaking, eliminating the need for the user to wait for the robot to finish speaking.
  Disadvantages:
  Since this is voice-activated, it may be triggered by meaningless audio signals, depending on the accuracy of the VAD (Voice Activity Detection). For example, if someone is typing on the keyboard while the AI is speaking, it might trigger the interrupt incorrectly.
  ASR Activation Interrupt

  Advantages:
  Reduces the probability of unnecessary interrupts because the interrupt strategy is triggered only after ASR or STT has recognized the user’s speech.
  Disadvantages:
  Since this is ASR/STT-triggered, it requires converting the audio signal into text, which introduces a delay before the interrupt can be processed.
  - Recommended Mode
  If the VAD can filter out non-speech signals and only triggers when human speech is detected, the Voice Activation Mode is recommended. This mode is also suitable when the delay in processing the interrupt is not a major concern.

  If the interrupt delay is not sensitive, the ASR Activation Mode is recommended. This mode can filter out non-speech signals more effectively and reduce the probability of an unintended interrupt.

  How to Implement Interrupts? What Actions Are Required?
  In a human-machine dialogue system, conversations are typically structured in "rounds," where each round consists of a question from the user, followed by a response from the robot, and so on. For each round, we can assign a roundId, incrementing it with each new round. A round consists of the following stages:

  VAD (Voice Activity Detection):
  This marks the start of the dialogue, where the system detects the beginning and end of the user's speech. It then passes this information to the ASR for further processing.

  ASR (Automatic Speech Recognition):
  This phase involves recognizing the user's speech and converting it into text, which is then passed to the LLM (Large Language Model).

  LLM (Large Language Model):
  This is the generation phase, where the LLM processes the recognized user input and generates a response.

  TTS (Text-to-Speech):
  In this phase, the LLM’s response is converted into an audio format.

  RTC Streaming:
  The generated audio is streamed via RTC (Real-Time Communication) to be played back to the user.

  Therefore, an interrupt happens when, in the next round (roundId+1), either through Voice Activation (triggered by the VAD phase) or ASR Activation (triggered when ASR recognizes the user’s speech), the following actions must be performed:

  Stop the LLM Generation in the current round (roundId).
  Stop the TTS Synthesis in the current round (roundId).
  Stop the RTC Streaming in the current round (roundId).
  API Call References:
  Call: AudioConsumer.clear()
  Call: LocalAudioTrack.clear_sender_buffer()
  Business Layer: Clear any remaining TTS-related data (if applicable)



  LLM (Large Language Model) results are returned asynchronously and in a streaming manner. When should the results from the LLM be passed to TTS (Text-to-Speech) for synthesis?

  Two main factors need to be considered:

  Ensure that the TTS synthesized speech is unambiguous:
  The speech synthesized by TTS must be clear, complete, and continuous. For example, if the LLM returns the text: "中间的首都是北京吗？", and we pass it to TTS as:

  "中",
  "国首",
  "是北",
  "京吗？",
  This would result in ambiguous synthesis because there are no spaces between certain words (e.g., between "中" and "国", "首" and "是", and "京" and "吗"). Proper segmentation must be ensured to avoid such ambiguities.
  Minimize overall processing delay:
  If the LLM results are passed to TTS only after the entire response is generated, the speech synthesis will be unambiguous and continuous. However, this approach introduces significant delay, which negatively affects the user experience.

  Recommended Approach
  To achieve a balance between clarity and minimal delay, the following steps should be followed:

  Store the LLM results in a cache as they are received.
  Perform a reverse scan of the cached data to find the most recent punctuation mark.
  Truncate the data from the start to the most recent punctuation mark and pass it to TTS for synthesis.
  Remove the truncated data from the cache. The remaining data should be moved to the beginning of the cache and continue waiting for additional data from the LLM.


pkgId: 248fe4e5a28821bbc1cdb86d29bb4d4a546bedb999f9c7ab296ef78a08550cff
name: python-agora-realtime-ai-api-v1
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Agora's low latency, high performance Realtime API to work with Voice Conversational AI
url: https://github.com/weedge/agora-realtime-ai-api
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agora-realtime-ai-api-v1-0.0.1-1.src.rpm
checksum_type: sha256
description:
  The `Channel` class handles the RTC channel and associated operations such as connection, audio subscriptions, and data stream messages.

  ```python
  Channel(rtc: "RtcEngine", options: RtcOptions)
  ```

  - `connect() -> None`: Connects to the channel asynchronously.
  - `disconnect() -> None`: Disconnects from the channel asynchronously.
  - `get_audio_frames(uid: int) -> AudioStream`: Returns the audio stream for a specific user.
  - `push_audio_frame(frame: bytes) -> None`: Sends a PCM audio frame to the channel.
  - `clear_sender_audio_buffer() -> None`: Clears the audio buffer used for sending.
  - `subscribe_audio(uid: int) -> None`: Subscribes to a user's audio stream.
  - `unsubscribe_audio(uid: int) -> None`: Unsubscribes from a user's audio stream.


pkgId: c7465fba176cc58c5a40667593d9f3a31e616e82a4a8cba269e265f9b41bd301
name: python-agora-utils
arch: src
version: 1.2.5
epoch: 0
release: 1
summary: Utilities libraries for the Agora Edge Apps SDK 2.0 (Python)
url: https://pypi.org/project/agora-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agora-utils-1.2.5-1.src.rpm
checksum_type: sha256
description:
  This package is the Utilities library for the Agora Edge Apps SDK (Python) developed by SLB.

  Use this SDK to construct an edge application, and then containerize it for the running on the edge with AgoraIoT.  Documentation on using the entire SDK can be found at: [AgoraIoT SDK Documentation](https://slb-edge.github.io).




  - Fix bug to set the default redis server to be the redis container name on the gateway if not found in the AEA.json


  - Make versions of all modules the same



  - Make versions of all modules all the same
  - Add ability to Mock (AEA2:BusClient:Mock (True/False)) the BusClient
  - Fix issue with subscriptions



  - Initial test release.


pkgId: d28eaca988a360b2c571d6ce8fbb1a1ebdf167a1ce1bb210f24443cb070dd170
name: python-agori
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: A secure working memory for agents
url: https://github.com/govindshukl/agori
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agori-0.1.3-1.src.rpm
checksum_type: sha256
description:
  Agori is a secure Python package that provides encrypted document storage and semantic search capabilities using ChromaDB and Azure OpenAI embeddings. It focuses on secure storage and retrieval of sensitive documents while maintaining searchability through encrypted vector embeddings.



  - 🔐 End-to-end encryption for documents and metadata
  - 🔍 Semantic search using Azure OpenAI embeddings
  - 📚 Multiple collection management within a database
  - 💾 Persistent storage with database isolation
  - 🚀 Simple and intuitive API
  - 🛡️ Comprehensive error handling
  - 📝 Detailed logging
  - 🧹 Automatic resource cleanup



  ```bash
  pip install agori
  ```



  ```python
  from agori.core import WorkingMemory
  from cryptography.fernet import Fernet


  encryption_key = Fernet.generate_key()


  db = WorkingMemory(
      api_key="your-azure-openai-key",
      api_endpoint="your-azure-endpoint",
      encryption_key=encryption_key,
      db_unique_id="my_secure_db"
  )


  collection_metadata = {
      "description": "Research papers database",
      "owner": "research_team"
  }
  collection = db.create_collection("research_papers", metadata=collection_metadata)


  documents = [
      "Advances in Neural Networks",
      "Quantum Computing Overview",
      "Machine Learning Applications"
  ]
  metadata_list = [
      {"author": "John Doe", "year": "2023"},
      {"author": "Jane Smith", "year": "2023"},
      {"author": "Bob Wilson", "year": "2024"}
  ]


  doc_ids = db.add_documents(
      collection_name="research_papers",
      documents=documents,
      metadatas=metadata_list
  )


  results = db.query_collection(
      collection_name="research_papers",
      query_texts=["neural networks"],
      n_results=2
  )


  for i, (doc, distance) in enumerate(zip(results["documents"][0], results["distances"][0])):
      print(f"Result {i+1}:")
      print(f"Document: {doc}")
      print(f"Similarity Score: {1 - distance}")  # Convert distance to similarity
      if "metadatas" in results:
          print(f"Metadata: {results['metadatas'][0][i]}")
      print()


  db.drop_collection("research_papers")
  db.cleanup_database()

  ```





  - All documents and metadata are encrypted using Fernet symmetric encryption
  - Secure key generation and management required
  - Encrypted storage of documents and metadata


  - Each database instance has a unique ID
  - Separate storage paths for different databases
  - Secure cleanup of resources



  To set up the development environment:

  ```bash

  git clone https://github.com/govindshukl/agori.git
  cd agori


  python -m venv venv
  source venv/bin/activate  # On Windows: venv\Scripts\activate


  pip install -r requirements-dev.txt


  pip install -e .
  ```



  ```bash

  pytest tests -v --cov=agori


  black src/agori tests
  isort src/agori tests


  flake8 src/agori tests
  mypy src/agori tests
  ```



  - Python 3.8 or higher
  - Azure OpenAI API access
  - Required packages:
    - chromadb
    - cryptography
    - azure-openai




  1. Never hardcode encryption keys or API credentials
  2. Use environment variables for sensitive information
  3. Implement proper key management
  4. Regular cleanup of sensitive data


  1. Use context managers for automatic cleanup
  2. Properly handle collection lifecycle
  3. Implement error handling for all operations



  Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (`git checkout -b feature/NewFeature`)
  3. Commit your changes (`git commit -m 'Add NewFeature'`)
  4. Push to the branch (`git push origin feature/NewFeature`)
  5. Open a Pull Request



  This project is licensed under the MIT License - see the LICENSE file for details.



  If you encounter any issues or need support, please:

  1. Check the [documentation](https://github.com/govindshukl/agori/docs)
  2. Search through [existing issues](https://github.com/govindshukl/agori/issues)
  3. Open a new issue if needed



  - ChromaDB for vector database functionality
  - Azure OpenAI for embeddings generation
  - Cryptography.io for encryption capabilities


pkgId: 9d17cbe27888957b125eb9c4f3013be2fc2affe62dfd1308df93f0b9f8c3582a
name: python-agori
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: AI-powered decision-making frameworks for enhancing group decisions
url: https://github.com/govindshukl/agori
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agori-0.1.4-1.src.rpm
checksum_type: sha256
description:
  Agori is a Python package that implements various decision-making frameworks powered by generative AI. It aims to enhance group decision-making processes by leveraging the capabilities of large language models.




  The Nominal Group Technique is a structured decision-making method that helps groups reach consensus through a systematic process of idea generation and evaluation. Our implementation enhances this process using AI to:
  - Generate diverse expert perspectives
  - Analyze problems from multiple angles
  - Synthesize insights into actionable recommendations



  ```bash
  pip install agori
  ```



  Here's a simple example using the NGT framework:

  ```python
  import asyncio
  from agori.decision_frameworks.ngt import NGTProcessor
  from langchain_community.document_loaders import PyPDFLoader

  async def analyze_document(document_path: str, query: str):
      
      loader = PyPDFLoader(document_path)
      pages = loader.load()

      
      ngt = NGTProcessor(
          deployment="your-deployment",
          endpoint="your-endpoint",
          api_key="your-api-key",
          api_version="your-api-version",
          verbose=True
      )

      
      ngt.add_documents(pages)

      
      result = await ngt.run_ngt_analysis(query)
      return result


  document_path = "your_document.pdf"
  query = "What strategic decisions should we make based on this document?"
  result = await analyze_document(document_path, query)
  ```




  - **Expert Role Generation**: Automatically identifies relevant expert perspectives based on the problem context
  - **Multi-perspective Analysis**: Analyzes problems from different expert viewpoints
  - **Parallel Processing**: Efficiently processes large documents using concurrent analysis
  - **Structured Output**: Provides organized insights with clear recommendations
  - **Configurable Parameters**: Allows customization of processing parameters
  - **Detailed Logging**: Offers verbose mode for tracking the decision-making process



  The NGT processor accepts various configuration parameters:

  ```python
  from agori.decision_frameworks.ngt.models import Config

  config = Config(
      MAX_TOKENS_PER_REQUEST=126000,
      CHUNK_SIZE=31500,
      CHUNK_OVERLAP=2000,
      MAX_WORKERS=3,
      MAX_PARALLEL_REQUESTS=3,
      VERBOSE=True
  )

  ngt = NGTProcessor(
      deployment="your-deployment",
      endpoint="your-endpoint",
      api_key="your-api-key",
      api_version="your-api-version",
      config=config
  )
  ```





  You can also run the NGT process step by step:

  ```python

  experts = await ngt.generate_experts(query)


  expert_responses = await ngt.analyze_with_experts(experts, query)


  synthesis = await ngt.synthesize_ngt_results(expert_responses)
  ```



  The package includes custom exceptions for better error handling:

  ```python
  from agori.decision_frameworks.ngt import (
      NGTError,
      ExpertGenerationError,
      IdeaGenerationError,
      SynthesisError
  )

  try:
      result = await ngt.run_ngt_analysis(query)
  except ExpertGenerationError as e:
      print(f"Error generating experts: {e}")
  except IdeaGenerationError as e:
      print(f"Error generating ideas: {e}")
  except SynthesisError as e:
      print(f"Error synthesizing results: {e}")
  except NGTError as e:
      print(f"General NGT error: {e}")
  ```



  - langchain
  - tiktoken
  - azure-openai
  - asyncio
  - typing
  - dataclasses



  Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.



  [MIT License](LICENSE)



  This project is actively under development. The NGT framework is the first implementation, with more decision-making frameworks planned for future releases.



  - [ ] Additional decision frameworks
  - [ ] Working memory for intermediate results caching
  - [ ] Support for more LLM providers
  - [ ] Integration with decision support tools




  If you use Agori in your research, please cite:

  ```bibtex
  @software{agori2024,
    title = {Agori: AI-Powered Decision Frameworks},
    year = {2024},
    url = {https://github.com/govindshukl/agori}
  }
  ```



  For questions and feedback, please open an issue on the GitHub repository.


pkgId: f4048f15288a0d1230ef75afb49660bf3ee1883cf13015185ca293baea1f2fbd
name: python-agpypeline
arch: src
version: 0.0.52
epoch: 0
release: 1
summary: Installable package for entrypoint and drone-specific environment code within a transformer
url: https://github.com/AgPipeline/agpypeline
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agpypeline-0.0.52-1.src.rpm
checksum_type: sha256
description:
  Package containing entrypoint.py from entrypoint code and environment.py for drone-specific environment code. This allows for transformers to havecommon entrypoint and environment code in an installable package


pkgId: 3ffd8e615f2f7bd19a73e1c975232ea1604ff4a4413d2df4b17ac59dc417469b
name: python-agro-met-equations-dynalogic
arch: src
version: 2.0.3
epoch: 0
release: 1
url: https://github.com/dynalogic-agtech/dynalogic-agro-met-equations-pkg
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agro-met-equations-dynalogic-2.0.3-1.src.rpm
checksum_type: sha256
summary:
  Library for agrometeorological calculation like evapotranspiration, water balance, degree days, water balance ...

description:
  |           |                                                    |
  |-----------|----------------------------------------------------|
  |Authors:   | Bruno Ducraux (bducraux@dynalogic.net)             |
  |           | Mariana Gonçalves dos Reis (mreis@dynalogic.net)   |
  | Based on: | [PyEto](https://github.com/woodcrafty/PyETo)       |
  |           |                                                    |


pkgId: 5f87ce2a83d1030f5afe6b572db5b04ab27e43f97d21bb50098d8145a8aaf552
name: python-agrossuite
arch: src
version: 2024.7.4.35220
epoch: 0
release: 1
summary: Multiplatform application for the solution of physical problems based on the deal.II library
url: http://www.agros2d.org/
rpm_license: License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agrossuite-2024.7.4.35220-1.src.rpm
checksum_type: sha256
description:
  Agros Suite is a multiplatform application for the solution of physical problems based on the deal.II library, developed by the group at the University of West Bohemia in Pilsen. Agros Suite is distributed under the GNU General Public License.


pkgId: 5b78d48b64e5aa0fe2dd5de939d7cdbe28c6b8ba8834672d7e22784a1ec92407
name: python-agstoolbox
arch: src
version: 0.5.3
epoch: 0
release: 1
summary: Utility to help manage Adventure Game Studio Projects and Editors.
url: https://github.com/ericoporto/agstoolbox
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agstoolbox-0.5.3-1.src.rpm
checksum_type: sha256
description:
  In Windows, install Python 3, and then open `cmd.exe` and type (press enter after):
      python -m pip install agstoolbox
  To run, you can type the following in `cmd.exe` or the `run...` prompt
      python -m agstoolbox


pkgId: 410869b2b4451698c1843331eff3dfbd2e8b4f1175b75459110ee555e22df80a
name: python-agt-server
arch: src
version: 1.5.4
epoch: 0
release: 1
description: <!---
url: https://github.com/brown-agt/agt-server-remastered
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agt-server-1.5.4-1.src.rpm
checksum_type: sha256
summary:
  The AGT Server is a python platform designed to run and implement game environments that autonomous agents can connect to and compete in.


pkgId: 97d71ffe6b45b75c9a0eda448741a168270f6f929057e48cb4a082ae74e7812d
name: python-agunua
arch: src
version: 1.7.1
epoch: 0
release: 1
summary: A library for the development of Gemini clients
url: https://framagit.org/bortzmeyer/agunua/
rpm_license: GPL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agunua-1.7.1-1.src.rpm
checksum_type: sha256
description:
  Agunua is a Python library for the development of Gemini clients.



  You need Python 3, [netaddr](https://github.com/netaddr/netaddr),
  [PySocks](https://github.com/Anorov/PySocks) and [PyOpenSSL](https://www.pyopenssl.org/).  You
  can install the dependencies with pip `pip3 install agunua`.



  ```
  import Agunua
  ...
  u = Agunua.GeminiUri(url)
  print(u)
  ```

  Parameters in the `GeminiUri()` constructor (you can find their
  default values at the beginning of the file `Agunua/__init__.py`):

  * `url`: the URL to load
  * `insecure`: accept invalid certificates (signed by unknown CA, for
    instance)
  * `tofu`: performs TOFU (Trust On First Use) validation. It is a
    string, not a boolean. If empty, we disable TOFU. Otherwise, it is
    the directory of TOFU data.
  * `accept_expired`: accept expired certificates (`insecure = True` is
    not sufficient for that)
  * `get_content`: retrieve the actual resource (default is to get
    metadata only)
  * `parse_content`: if it is gemtext (text/gemini), parse and extract
    links
  * `maxlines`: if it is text, maximum number of lines retrieved. Set to
    None if you don't want a limit
  * `maxsize`: maximum size in bytes to retrieve. Set to
    None if you don't want a limit
  * `binary`: (automatic if the content is text). Retrieve as binary
    content, don't play with end-of-lines
  * `follow_redirect`: automatically follow Gemini redirections
  * `redirect_depth`: maximum number of redirections followed
  * `ignore_missing_tls_close`: ignore the lack of a proper TLS close (may lead to truncation attacks but many Gemini servers don't send it)
  * `iri`: handle IRI (URI in Unicode)
  * `force_ipv4`: use the IPv4 protocol only
  * `force_ipv6`: use the IPv6 protocol only
  * `send_sni`: send the TLS Server Name Indication
  * `connect_to`: use the host name in the URI for the Gemini request but
    connect only to this host (name or address). Useful when the host is
    multihomed.
  * `clientcert`: the filename of a client certificate that will be sent
    to the server.
  * `clientkey`: the filename of the private key of the above
    certificate.
  * `use_socks`: use a SOCKS5 proxy (for instance for `.onion`
    capsules). The value must be a tuple (socks proxy name, socks proxy port).

  If the URL is invalid (wrong syntax), you won't get a `GeminiUri`
  object. If you get one, it does not mean the resource has been
  retrieved successfully. See the attribute `network_success` for that,
  and then the attribute `status_code` (that you have to interpret
  yourself, in most cases).

  Attributes of `GeminiUri` objects (not all of them will always be
  present; for instance, if you did not ask to get content, you won't
  have an attribute `size`; if the status code is not 20 - OK - you
  won't get a mediatype; etc):

  * `network_success`: resource was retrieved successfully
  * `status_code`: if retrieved successfully, the Gemini two-digit
    status code
  * `error`: if `network_success` is false, this is the reason
  * `ip_address`: IP address used for the retrieval (except is SOCKS was used)
  * `meta`: the `meta` field of the Gemini protocol. It depends on the
   status code. Read the Gemini specification for detail.
  * `binary`: if you asked for binary access, it will be True. If you
    asked for text access (binary=False in the constructor) and asked to
    ge the content (get_content=True), it will be set to False if
    decoding went well and True if the decoding failed, for instance
    because the file did not match the announced "charset".
  * `links`: an array of the links found in the document (if you've set
    `parse_content`)
  * `payload`: the content
  * `size`: the size of the payload. Since Gemini does not have a way to
    indicate at the beginning the payload size, this will be obtained
    only if `get_content`is true, and it will be limited by the
    parameter `maxsize`
  * `mediatype`: the media type (MIME type) of the resource, such as
  `text/gemini` or `image/jpeg`
  * `lang`: the human language of the resource, as standardized in [BCP 47](https://www.rfc-editor.org/info/bcp47)
  * `charset`: actually the encoding of the resource such as UTF-8 or US-ASCII
  * `tls_version`: the TLS version, for instance, "TLSv1.3"
  * `no_shutdown`: [DEPRECATED See https://framagit.org/bortzmeyer/agunua/-/issues/50] set to True if the server did not properly close the TLS session. It may mean that the content was truncated. Meaningful only with `get_content=True` and if you asked for the whole file.
  * `possible_truncation_issue`: set to True if we got a TLS error which may indicate that the data were truncated.
  * The rest is related to certificates:
  * `issuer`: the CA (Certificate Authority)
  * `subject`: the name in the certificate (X.509 calls it "subject")
  * `expired`: the certificate has expired
  * `cert_not_after`: expiration date
  * `cert_not_before`: inception date
  * `cert_algo`: algorithm used by the CA
  * `cert_key_type`: algorithm of the public key
  * `keystring`: the public key
  * `cert_key_size`: size of the public key

  For an example, see `sample-client.py`. (In the source code, the test suite under `tests/` is also a good way to learn about how to use the library.) Agunua is used in the [Manisha monitoring tool](https://framagit.org/bortzmeyer/manisha/) and in the [Lupa crawler](https://framagit.org/bortzmeyer/lupa/).



  `agunua` is a simple Gemini command-line client, a bit like curl. See
  [its documentation](agunua.md). Most parameters of the library
  `GeminiUri()` constructor can be set via options. Important: the
  default value is not always the same with the command-line tool. For
  instance, it defaults to actually retrieving the content.



  Another command-line client, `geminitrack`, allows you to retrieve an entire capsule, for instance for backups. See [its documentation](geminitrack.md).



  Agunua is a melanesian serpent god. Caduceus would have been better
  for a Python + Gemini project since there are two snakes on a caduceus
  but it was already used.



  GPL. See LICENSE.



  See the file CHANGES.



  Stéphane Bortzmeyer <stephane+framagit@bortzmeyer.org>.



  https://framagit.org/bortzmeyer/agunua/ Use the Gitlab issue tracker to
  report bugs or wishes. But you can of course also access it with
  gemini at gemini://gemini.bortzmeyer.org/software/agunua/



  * https://tildegit.org/solderpunk/gemini-demo-1 Very simple but working client
  * https://github.com/cbrews/ignition Modelled on the `requests` library so very convenient for programmers
  * https://git.carcosa.net/jmcbray/gusmobile/ Good code
  * https://git.sr.ht/~fkfd/picross
  * https://github.com/apellis/pygemini No longer maintained


pkgId: 6019c90bff4c26b13ab2d1f0309e54ab86ed1dc4127f634db185ed974a67e920
name: python-agutil
arch: src
version: 5.0.1
epoch: 0
release: 1
summary: A collection of python utilities
url: https://gitlab.graubert.com/agraubert/agutil
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-agutil-5.0.1-1.src.rpm
checksum_type: sha256
description:
  [![Master Build Status](https://gitlab.graubert.com/agraubert/agutil/badges/master/pipeline.svg)](https://gitlab.graubert.com/agraubert/agutil/-/pipelines)

  A collection of python utilities

  **Version:** [![Live Package Version](https://img.shields.io/pypi/v/agutil)](https://pypi.python.org/pypi/agutil)


  * search_range (A utility for manipulating numerical ranges)
  * status_bar (A simple progress bar indicator)
  * Logger (A class for fast, simple, logging)
  * ActiveTimeout (A class for enforcing a timeout for a set of operations)
  * Several standalone utility methods (See the [agutil module page](https://gitlab.graubert.com/agraubert/agutil/-/wikis/agutil-(main-module)) on the wiki)

  The __io__ package:

  * Socket (A low-level network IO class built on top of the standard socket class)
  * SocketServer (A low-level listen server to accept connections and return Socket classes)
  * MPlexSocket (A low-level network IO class which multiplexes I/O through multiple channels. Threadless version of `QueuedSocket`)

  The __parallel__ package:

  * parallelize (A decorator to easily convert a regular function into a parallelized version)
  * parallelize2 (A similar parallelization decorator with a slightly different flavor)
  * IterDispatcher (Logical backend for dispatching calls with parallelize)
  * DemandDispatcher (Logical backend for dispatching calls with parallelize2)
  * ThreadWorker (Task management backend for dispatching parallel calls to threads)
  * ProcessWorker (Task management backend for dispatching parallel calls to processes)

  The __security__ package:

  * SecureSocket (A mid-level network IO class built to manage encrypted network communications)
  * SecureConnection (A high-level, multithreaded class for sending and receiving encrypted files and messages)
  * SecureServer (A low-level listen server to accept connections and return SecureConnection instances)
  * agutil-secure (A command line utility for encrypting and decrypting files)
  * EncryptionCipher and DecryptionCipher (Twin classes for agutil's modular encryption format)
  * Several other utility functions and classes for encrypting and decrypting data


  Detailed documentation of these packages can be found on the [agutil Github wiki page](https://gitlab.graubert.com/agraubert/agutil/-/wikis/home)


pkgId: 5cd5882ac161505ede08baffa210824e25c6e1d6cff2e6ea27665eb3ec06c0af
name: python-ahapy
arch: src
version: 0.0.7
epoch: 0
release: 1
summary: A small Aha.io API client
url: https://github.com/henkhaus/ahapy
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahapy-0.0.7-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/ahapy.svg)](https://badge.fury.io/py/ahapy)


  A small Aha.io API client. The package handles authentication and pagination, giving the user exactly the information they seek.

  This is in no way associated with Aha.io. For Aha.io API documentation, please visit [aha.io/api](https://www.aha.io/api).



  ```commandline
  pip install ahapy
  ```




  After importing the library, create an instance of AhaV1 by providing your subdomain from https://[my-subdomain].aha.io/ and your API key.
  ```python
  from ahapy import AhaV1

  aha = AhaV1('<your-sub-domain>', '<your-api-key>')
  ```

  Create a simple query by running the query method, giving the method the desired endpoint.
  ```python
  data = aha.query('initiatives')

  for i in data:
      print(i)
  ```

  While using the query method, you can specify page size and customize the fields to be returned.
  ```python
  data = aha.query('initiatives', per_page=200, fields='name,id')

  for i in data:
      print(i)
  ```

  After running a query, you can check if the number of record receieved is the number that was expected.

  ```python
  data = aha.query('initiatives')

  if len(data) == aha.count:
      print('Records returned match expectation.')
  ```

  The endpoint argument can be 'overloaded' to accommodate searches for objects by foriegn key. The actual endpoint is parsed and available on .endpoint member

  ```python
  aha.query('initiatives/' + initiative_id + '/epics')

  print(aha.endpoint)

  ```


pkgId: c6e805f418a2eb60b79a8d3e5a4a29ecbd1441afd0685b05fa3fb8fc6ec1d38f
name: python-ahfhalotools
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: A Python 3 library for the analysis of data produced by AMIGA's Halo Finder (AHF).
url: https://github.com/BenDavisonPetch/ahfhalotools
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahfhalotools-1.1.1-1.src.rpm
checksum_type: sha256
description:
  AHFHaloTools is a Python 3 library for the analysis of data produced by AMIGA's Halo Finder (AHF).


  * File parsing for `.AHF_halos`, `.AHF_profiles`, `.AHF_mtree(_idx)`
  * File truncation
  * Analysis of radial profile data
  * Analysis of integral properties (halo data)
  * Proper tracking of halos through time
  * Merger detection
  * Analysis of enclosed halos as indicator of host halo kinematics


  * [NumPy](https://numpy.org/)
  * [matplotlib](https://matplotlib.org/)
  * [AstroPy](https://www.astropy.org/)


  `pip install ahfhalotools`


  View HTML documentation __[here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/BenDavisonPetch/ahfhalotools/main/docs/ahfhalotools/index.html)__

  Documentation is also available in docstrings within the
  code, which can be viewed using the built-in ``help`` function:

  ```python
      >>> from ahfhalotools.objects import Cluster
      >>> help(Cluster)
      Help on class Cluster in module ahfhalotools.objects: ...
  ```

  The majority of analysis is enabled by the `ahfhalotools.objects.Cluster` object.


  Example scripts are available in `/examples`. These scripts are provided without data, as the data files are large and can't go on GitHub. To run them on a local machine, data must be downloaded and truncated, and the paths to the data in the scripts should be updated to reflect the location of the files.
  Alternatively the scripts could be deployed to popia/castor and run there, after updating the directory paths in the code. Data should still be truncated before running, otherwise the scripts will execute very slowly.


  For information on AMIGA's Halo Finder, including documentation and output file formats, you can visit their website [here](http://popia.ft.uam.es/AHF/Download.html).


  ![Velocity Distribution of Enclosed Halo as a Function of Redshift](https://raw.githubusercontent.com/BenDavisonPetch/ahfhalotools/main/gallery/enclosedHalovDist.png)
  ![Velocity Distribution of Enclosed Halo as a Function of Redshift with Skew Plots](https://raw.githubusercontent.com/BenDavisonPetch/ahfhalotools/main/gallery/enclosedHalovDistwSkewPlots.png)
  ![Local Density times Radius Squared as a function of z and r](https://raw.githubusercontent.com/BenDavisonPetch/ahfhalotools/main/gallery/localDensityZR.png)
  ![Local Density times Radius Squared as a function of z and r for select redshifts](https://raw.githubusercontent.com/BenDavisonPetch/ahfhalotools/main/gallery/selectzs.png)
  ![Local Gas Density as a function of Radius, with quartiles of dynamical state highlighted](https://raw.githubusercontent.com/BenDavisonPetch/ahfhalotools/main/clusterCompDensvR/quartile%20selection/gasDensMBP.png)


pkgId: 53bfe5c080fd1490424869fe5fb2642569ea6e976f68a5dc9b41945fedc48549
name: python-ahi
arch: src
version: 0.19.31
epoch: 0
release: 1
summary: Application Hacking Interface. An HTTP API client helper for "unofficial" APIs.
url: https://gitlab.com/unsanctioned/ahi
rpm_license: LGPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahi-0.19.31-1.src.rpm
checksum_type: sha256
description:
  ```python
  from logging import *
  c = ahi.HTTPClient(cache_ttl=60, force_wait_interval=1, auto_adjust_for_rate_limiting=True, logging_level=DEBUG, proxy='http://127.0.0.1:8080', verify=True, allow_redirects=False, timeout=None)
  resp = c.get('http://example.com/')
  print(resp)
  ```


  ```python
  from logging import *
  from selenium.webdriver.common.keys import Keys
  ff = ahi.SeleniumFirefox(headless=True, force_wait_interval=timedelta(seconds=0), logging_level=DEBUG)
  ff.get('https://example.com/')
  ff.html.css('#LoginForm_Password').send_keys('P4$$w0rd')
  ff.html.css('#LoginForm_Password').send_keys(Keys.RETURN)
  ff.execute_script('''SetLocation('\x2Fdocs\x2FProMyPlanning.aspx?_Division_=549942',event, 0)''')
  ff.html.css('#Reports_Reports_Reports_MyPlanning').click()
  print(ff.html)
  ```


  ```bash
  girl --curl https://example.com/
  ```


pkgId: 623304d7d7f526421470713903dd275fddddc3025983d87d2fc3d0a0aed0b0f4
name: python-ahkunwrapped
arch: src
version: 2.2.1
epoch: 0
release: 1
summary: Bundled and bridged AutoHotkey for full native code execution from Python.
url: https://github.com/CodeOptimist/ahkunwrapped
rpm_license: GNU Affero General Public License v3 or later (AGPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahkunwrapped-2.2.1-1.src.rpm
checksum_type: sha256
description:
  ```python
  from ahkunwrapped import Script
  ahk = Script('''
  LuckyMinimize(winTitle) {
    global myVar
    myVar := 7
    WinMinimize, % winTitle
    Clipboard := "You minimized: " winTitle
  }
  ''')
  ahk.call('LuckyMinimize', 'ahk_class Notepad')
  print("Lucky number", ahk.get('myVar'))


pkgId: dfaa07a7164b8332eddef3af7ebca77cebe3d291f0fe8cc883bab532acb10626
name: python-ahlbatross
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/Hochfrequenz/ahlbatross
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahlbatross-0.1.1-1.src.rpm
checksum_type: sha256
description:
  <img src="https://raw.githubusercontent.com/Hochfrequenz/ahlbatross/main/ahlbatross.png" alt="ahlbatross.png">



  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?labelColor=30363D&color=fccccc)](LICENSE)
  ![Unittests status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Unittests/badge.svg)
  ![Coverage status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Coverage/badge.svg)
  ![Pylint status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Linting/badge.svg)
  ![Formatting status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Formatting/badge.svg)

  Tool for **automatic AHB comparison** of consecutive `Formatversionen` provided by
  [machine-readable-anwendungshandbücher](https://github.com/Hochfrequenz/machine-readable_anwendungshandbuecher/).<br>
  Highlighted changes between `PruefIDs` of various `Nachrichtenformate` are stored in the `.xlsx` files located inside
  the `./data/output/` [directory](https://github.com/Hochfrequenz/ahlbatross/tree/main/data/output).

  <img width="75%" src="https://raw.githubusercontent.com/Hochfrequenz/ahlbatross/main/output.png" alt="output.png">



  To set up the python development environment, install the required dependencies via

  ```shell
  $ tox -e dev
  ```

  For local testing and code quality maintenance, run

  ```shell
  tox
  ```

  Check out our [Python Template Repository](https://github.com/Hochfrequenz/python_template_repository#how-to-use-this-repository-on-your-machine)
  for detailed descriptions and step-by-step instructions.



  Feel free to contribute to this project by opening a pull request against the main branch.


pkgId: 004fedde755a793e54eeebd6c377dfb1a334cde8eaaea07b5d163973878719b5
name: python-ahlbatross
arch: src
version: 0.1.6
epoch: 0
release: 1
url: https://github.com/Hochfrequenz/ahlbatross
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahlbatross-0.1.6-1.src.rpm
checksum_type: sha256
summary:
  Tool for comparing and visualizing changes between AHB documents across different format version releases.

description:
  <img src="https://raw.githubusercontent.com/Hochfrequenz/ahlbatross/main/ahlbatross.png" alt="ahlbatross.png">



  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?labelColor=30363D&color=fccccc)](LICENSE)
  ![Pypi status badge](https://img.shields.io/pypi/v/ahlbatross?labelColor=30363D&color=fccccc)
  ![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/ahlbatross.svg?labelColor=30363D&color=fccccc)

  ![Unittests status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Unittests/badge.svg)
  ![Coverage status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Coverage/badge.svg)
  ![Pylint status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Linting/badge.svg)
  ![Formatting status badge](https://github.com/Hochfrequenz/ahlbatross/workflows/Formatting/badge.svg)

  Tool for automatic AHB comparison of consecutive `Formatversionen`. Highlighted changes between `PruefIDs` of various
  `Nachrichtenformate` are provided by already formatted `.xlsx` files or raw `.csv` files located inside the
  [machine-readable-anwendungshandbücher](https://github.com/Hochfrequenz/machine-readable_anwendungshandbuecher/tree/main/diff)
  repository.

  <img src="https://raw.githubusercontent.com/Hochfrequenz/ahlbatross/main/output.png" alt="output.png">


  Install this package from [PyPI](https://pypi.org/project/ahlbatross/) using

  ```shell
  pip install ahlbatross
  ```



  To set up the python development environment, install the required dependencies via

  ```shell
  $ tox -e dev
  ```

  For local testing and code quality maintenance, run

  ```shell
  tox
  ```

  Check out our [Python Template Repository](https://github.com/Hochfrequenz/python_template_repository#how-to-use-this-repository-on-your-machine)
  for detailed descriptions and step-by-step instructions.


  To publish a new version of this library on PyPI [create a new release](https://github.com/Hochfrequenz/ahlbatross/releases/new).
  Use semantic versioning with leading `v`, e.g. `v1.2.3` and please include at least the autogenerated release notes.



  Feel free to contribute to this project by opening a pull request against the main branch.


pkgId: b4fe5174108d879a9a041a2bf95abfba856cffe8cf46625fa3b841b3b80b3427
name: python-ahocorapy
arch: src
version: 1.6.2
epoch: 0
release: 1
summary: ahocorapy - Pure python ahocorasick implementation
url: https://github.com/abusix/ahocorapy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahocorapy-1.6.2-1.src.rpm
checksum_type: sha256
description:
  [![Test](https://img.shields.io/github/workflow/status/abusix/ahocorapy/test/master)](https://github.com/abusix/ahocorapy/actions)
  [![Test Coverage](https://img.shields.io/codecov/c/gh/abusix/ahocorapy/master)](https://codecov.io/gh/abusix/ahocorapy)
  [![Downloads](https://pepy.tech/badge/ahocorapy)](https://pepy.tech/project/ahocorapy)
  [![PyPi Version](https://img.shields.io/pypi/v/ahocorapy.svg)](https://pypi.python.org/pypi/ahocorapy)
  [![PyPi License](https://img.shields.io/pypi/l/ahocorapy.svg)](https://pypi.python.org/pypi/ahocorapy)
  [![PyPi Versions](https://img.shields.io/pypi/pyversions/ahocorapy.svg)](https://pypi.python.org/pypi/ahocorapy)
  [![PyPi Wheel](https://img.shields.io/pypi/wheel/ahocorapy.svg)](https://pypi.python.org/pypi/ahocorapy)



  ahocorapy is a pure python implementation of the Aho-Corasick Algorithm.
  Given a list of keywords one can check if at least one of the keywords exist in a given text in linear time.





  We started working on this in the beginning of 2016. Our requirements included unicode support combined with python2.7. That
  was impossible with C-extension based libraries (like [pyahocorasick](https://github.com/WojciechMula/pyahocorasick/)). Pure
  python libraries were very slow or unusable due to memory explosion. Since then another pure python library was released
  [py-aho-corasick](https://github.com/JanFan/py-aho-corasick). The repository also contains some discussion about different
  implementations.
  There is also [acora](https://github.com/scoder/acora), but it includes the note ('current construction algorithm is not
  suitable for really large sets of keywords') which really was the case the last time I tested, because RAM ran out quickly.



  - Compared to [pyahocorasick](https://github.com/WojciechMula/pyahocorasick/) our library supports unicode in python 2.7 just like [py-aho-corasick](https://github.com/JanFan/py-aho-corasick).
    We don't use any C-Extension so the library is not platform dependant.

  - On top of the standard Aho-Corasick longest suffix search, we also perform a shortcutting routine in the end, so
    that our lookup is fast while, the setup takes longer. During set up we go through the states and directly add transitions that are
    "offered" by the longest suffix or their longest suffixes. This leads to faster lookup times, because in the end we only have to
    follow simple transitions and don't have to perform any additional suffix lookup. It also leads to a bigger memory footprint,
    because the number of transitions is higher, because they are all included explicitely and not implicitely hidden by suffix pointers.

  - We added a small tool that helps you visualize the resulting graph. This may help understanding the algorithm, if you'd like. See below.

  - Fully pickleable (pythons built-in de-/serialization). ahocorapy uses a non-recursive custom implementation for de-/serialization so that even huge keyword trees can be pickled.



  I compared the two libraries mentioned above with ahocorapy. We used 50,000 keywords long list and an input text of 34,199 characters.
  In the text only one keyword of the list is contained.
  The setup process was run once per library and the search process was run 100 times. The following results are in seconds (not averaged for the lookup).

  You can perform this test yourself using `python tests/ahocorapy_performance_test.py`. (Except for the pyahocorasick_py results. These were taken by importing the
  pure python version of the code of [pyahocorasick](https://github.com/WojciechMula/pyahocorasick/). It's not available through pypi
  as stated in the code.)

  I also added measurements for the pure python libraries with run with pypy.

  These are the results:

  | Library (Variant)                                      | Setup (1x) | Search (100x) |
  | ------------------------------------------------------ | ---------- | ------------- |
  | ahocorapy\*                                            | 0.30s      | 0.29s         |
  | ahocorapy (run with pypy)\*                            | 0.37s      | 0.10s         |
  | pyahocorasick\*                                        | 0.04s      | 0.04s         |
  | pyahocorasick (run with pypy)\*                        | 0.10s      | 0.05s         |
  | pyahocorasick (pure python variant in github repo)\*\* | 0.50s      | 1.68s         |
  | py_aho_corasick\*                                      | 0.72s      | 4,60s         |
  | py_aho_corasick (run with pypy)\*                      | 0.83s      | 2.02s         |

  As expected the C-Extension shatters the pure python implementations. Even though there is probably still room for optimization in
  ahocorapy we are not going to get to the mark that pyahocorasick sets. ahocorapy's lookups are faster than py_aho_corasick.
  When run with pypy ahocorapy is almost as fast as pyahocorasick, at least when it comes to
  searching. The setup overhead is higher due to the suffix shortcutting mechanism used.

  \* Specs

  CPU: AMD Ryzen 2700X
  Linux Kernel: 6.0.6
  CPython: 3.11.0
  pypy: PyPy 7.3.9 (Python 3.9.12) with GCC 10.2.1 20210130
  Date tested: 2022-11-22

  \*\* Old measurement with different specs





  ```
  pip install ahocorapy
  ```



  ```python
  from ahocorapy.keywordtree import KeywordTree
  kwtree = KeywordTree(case_insensitive=True)
  kwtree.add('malaga')
  kwtree.add('lacrosse')
  kwtree.add('mallorca')
  kwtree.add('mallorca bella')
  kwtree.add('orca')
  kwtree.finalize()
  ```



  ```python
  result = kwtree.search('My favorite islands are malaga and sylt.')
  print(result)
  ```

  Prints :

  ```python
  ('malaga', 24)
  ```

  The search_all method returns a generator for all keywords found, or None if there is none.

  ```python
  results = kwtree.search_all('malheur on mallorca bellacrosse')
  for result in results:
      print(result)
  ```

  Prints :

  ```python
  ('mallorca', 11)
  ('orca', 15)
  ('mallorca bella', 11)
  ('lacrosse', 23)
  ```



  The construction of the tree is currently NOT thread safe. That means `add`ing shouldn't be called multiple times concurrently. Behavior is undefined.

  After `finalize` is called you can use the `search` functionality on the same tree from multiple threads at the same time. So that part is thread safe.



  You can print the underlying graph with the Visualizer class.
  This feature requires a working pygraphviz library installed.

  ```python
  from ahocorapy_visualizer.visualizer import Visualizer
  visualizer = Visualizer()
  visualizer.draw('readme_example.png', kwtree)
  ```

  The resulting .png of the graph looks like this:

  ![graph for kwtree](https://raw.githubusercontent.com/abusix/ahocorapy/master/img/readme_example.png "Keyword Tree")


pkgId: 983d006eff50e7d2907148e998a746c7413843232ea01758860062a08f11f5dd
name: python-ahoy-dtu-webthing
arch: src
version: 1.2.22
epoch: 0
release: 1
summary: Ahoy DTU webthing
url: https://pypi.org/project/ahoy-dtu-webthing/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahoy-dtu-webthing-1.2.22-1.src.rpm
checksum_type: sha256
description:
  A webthing adapter to provide the [AhyoDTU](https://ahoydtu.de/)  interface via the [webthing API](https://iot.mozilla.org/wot/).

  Example
  ```


  curl http://192.168.0.23:7122/0/properties

  {
     "name": "Terrasse",
     "serial": "114180123418",
     "p_dc": 23
     ....
  }
  ```

  To install this software you can use [PIP](https://realpython.com/what-is-pip/) package manager as shown below
  ```
  sudo pip install ahoy_dtu_webthing
  ```

  After this installation you can use the Webthing http endpoint in your Python code or from the command line with
  ```
  sudo dtu --command listen --port 7122 --base_uri http://10.1.11.35/
  ```
  Here the webthing API is bound to the local port 7122. Additionally, the base uri of the AhyoDTU REST api must be set.

  As an alternative to the *list* command, you can also use the *register* command to register and start the webthing service as a systemd entity.
  This way, the webthing service is started automatically at boot time. Starting the server manually with the *listen* command is no longer necessary.
  ```
  sudo dtu --command register --port 7122 --base_uri http://10.1.11.35/
  ```


pkgId: c5dadbf3012577ba700eadbcb3685eb2f4886bff593cde1ecfd10b808c049660
name: python-ahp-gauss
arch: src
version: 0.1.4
epoch: 0
release: 1
url: https://pypi.org/project/ahp-gauss/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahp-gauss-0.1.4-1.src.rpm
checksum_type: sha256
summary:
  The AHP-Gaussian Decision Support Library is a extensible solution designed for multi-criteria decision-making (MCDM) leveraging both traditional and advanced AHP methodologies

description:
  The **AHP-Gaussian Decision Support Library** is a extensible solution designed for multi-criteria decision-making (MCDM) leveraging both traditional and advanced AHP methodologies. It provides an implementation of Saaty's **Analytic Hierarchy Process (AHP)** and an enhanced **Gaussian-based AHP**, developed to handle complex scenarios involving a large number of criteria. This library is structured to facilitate the application of decision-support systems in research, data analysis, and organizational decision-making processes.


  - **AHP using Saaty’s Method**: Enables decision analysis with pairwise criteria comparisons, generating consistency-validated weightings.
  - **Gaussian-AHP**: Offers a pairwise comparison-free alternative, ideal for scalability, by assigning weights based on sensitivity analysis through the Gaussian distribution.
  - **Configurable Settings**: Allows fine-tuning via YAML configuration, including parameters for consistency thresholds and optimization objectives.
  - **Comprehensive Visualization**: Supports graphical output of decision matrices, judgment matrices, and preference rankings for clear insight into each step of the decision-making process.



  ```plaintext
  .
  ├── ahp_gaussian.py         # Gaussian-AHP class for advanced MCDM with Gaussian factors
  ├── ahp_saaty.py            # Traditional AHP class implementing Saaty’s methodology
  ├── config_manager.py       # YAML-based configuration manager
  ├── create_csv_files.py     # Script to generate sample CSV files for testing
  ├── data/                   # Folder to store decision and judgment matrices
  ├── decision_helper.py      # Helper functions for matrix validation, normalization, and aggregation
  ├── main.py                 # Primary script to execute decision-making processes
  ├── requirements.txt        # Library dependencies
  ├── results/                # Folder to save result outputs, including CSVs and visualizations
  ├── settings/               # Configuration directory with YAML settings
  └── tests/                  # Unit tests for functional validation
  ```

  Each module is structured to allow modular application and customization for specific decision-making frameworks.



  To use this library, clone the repository and install the required dependencies:

  ```bash
  git clone <repository_url>
  cd <repository_name>
  pip install -r requirements.txt
  ```




  The `main.py` script is designed as the primary entry point, which initializes configurations, loads matrices, and executes both AHP-Saaty and AHP-Gaussian analyses. It automatically saves output results in the `results/` directory and provides optional visualizations.


  1. **Data Preparation**: Ensure that `decision_matrix.csv` and `judgment_matrix.csv` are available in the `data/` directory. These files should represent the decision criteria and pairwise comparisons, respectively.
     - **Decision Matrix**: Rows represent alternatives, and columns represent criteria.
     - **Judgment Matrix**: A square matrix representing pairwise comparison for criteria weight calculation.

  2. **Run Analysis**: Execute the main script:
     ```bash
     python main.py
     ```

  3. **Results**: Results are stored in the `results/` directory. The directory includes global and local preference CSV files and graphical representations.



  The `create_csv_files.py` script provides an example decision matrix and judgment matrix. Execute it to generate sample data for testing purposes:

  ```bash
  python create_csv_files.py
  ```





  The `AHPGaussian` class is a novel, scalable approach to multi-criteria decision-making. By analyzing the sensitivity of criteria weights using Gaussian distribution factors, this method circumvents the need for pairwise comparison, allowing it to handle large matrices efficiently.

  - **Attributes**:
    - `local_preference`: Matrix of alternatives' local preferences for each criterion.
    - `gaussian_factor`: Represents the criteria's variance as a proportion of the mean, essential for weight calculation.
    - `weights`: Weighting of each criterion based on Gaussian sensitivity analysis.

  - **Core Methods**:
    - `global_preference()`: Ranks alternatives by global preference scores.
    - `visualize_decision_matrix()`, `visualize_local_preference()`, `visualize_global_preference()`: Visualize decision matrices and preferences.



  The `AHPSaaty` class implements the traditional AHP method, where criteria weights are derived from a reciprocal pairwise comparison matrix. This method validates the consistency of the judgments using Saaty’s Consistency Ratio (CR).

  - **Attributes**:
    - `weights`: Criterion weights derived from normalized judgment matrices.
    - `cr`: Consistency ratio to evaluate the matrix's adherence to transitivity.

  - **Core Methods**:
    - `local_preference(decision_matrix)`: Computes alternative preferences for each criterion.
    - `global_preference(decision_matrix)`: Provides global ranking based on combined criterion weights.
    - Visualization methods for judgment, local, and global preferences.



  Manages external configuration through a YAML file (`ahp_settings.yaml`), enabling users to define decision-making parameters such as consistency indices and objectives.

  **YAML Configuration**:
  ```yaml
  consistency_index:
    "1": 0
    "2": 0
    "3": 0.58
    "4": 0.9
    "5": 1.12
    "6": 1.24
    "7": 1.32
    "8": 1.41
    "9": 1.45
    "10": 1.49
    "11": 1.51
    "12": 1.48
    "13": 1.56
    "14": 1.57
    "15": 1.59
  ```



  `DecisionHelper` is a utility class providing essential operations such as:
  - **Matrix Validation**: Ensures matrices align with required structure and criteria.
  - **Normalization and Aggregation**: Prepares matrices for consistent and valid decision-making.
  - **Visualization Tools**: Includes functions for heatmaps and bar charts, enhancing data interpretability.

  **Key Methods**:
  - `normalize_decision_matrix()`: Adjusts each criterion based on optimization objectives (maximize or minimize).
  - `aggregate_matrix()`: Aggregates preferences with weights to produce global rankings.
  - `plot_*` functions for detailed visual representations.



  The library offers in-depth visual analysis for decision matrices and preferences, with heatmaps and bar charts generated using Matplotlib and Seaborn. These visualizations are essential for interpreting judgment consistency, criterion weighting, and preference rankings.



  1. **Initialize Configuration and Load Data**: Load settings from YAML and input CSVs.
  2. **Analyze with AHP-Saaty**:
     - Calculate local and global preferences.
     - Validate consistency.
     - Generate visualizations and export results.
  3. **Analyze with AHP-Gaussian**:
     - Compute preferences using Gaussian factor sensitivity.
     - Rank alternatives by preference scores.
     - Save results and generate graphical insights.



  ```python
  from ahp_saaty import AHPSaaty
  import pandas as pd


  judgment_matrix = pd.read_csv('data/judgment_matrix.csv', index_col=0)


  ahp_saaty = AHPSaaty(judgment_matrix, objective='max')
  local_preferences = ahp_saaty.local_preference(decision_matrix)
  global_preferences = ahp_saaty.global_preference(decision_matrix)


  ahp_saaty.visualize_judgment_matrix()
  ahp_saaty.visualize_global_preference(decision_matrix)
  ```



  The results are saved as follows:
  - **Local Preference (Saaty)**: `results/local_pref_saaty.csv`
  - **Global Preference (Saaty)**: `results/global_pref_saaty.csv`
  - **Global Preference (Gaussian)**: `results/global_pref_gaussian.csv`

  Each output file provides a ranked listing of alternatives based on the respective method's calculated scores.



  Unit tests are provided for all core modules under `tests/`. The tests ensure functional accuracy of criteria weighting, consistency validation, preference calculation, and result aggregation. To execute tests:

  ```bash
  pytest tests/
  ```



  - Python 3.10 or later
  - Required Libraries:
    - `pandas` for data manipulation
    - `matplotlib` and `seaborn` for data visualization
    - `yaml` for configuration management


pkgId: 52e9fb52a3edbdd33a63d94b16b17bf446ec2048d4f5129ea917430bec81f1fa
name: python-ahp-graph
arch: src
version: 2.0.4
epoch: 0
release: 1
summary: Attributed Hierarchical Port Graph
url: https://github.com/lpsmodsim/ahp_graph
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahp-graph-2.0.4-1.src.rpm
checksum_type: sha256
description:
  AHP Graphs - https://arxiv.org/pdf/1802.06492.pdf

  Requires Python3.9 at a minimum. There is a "noTyping" branch which works with older versions of Python (like 3.6)


  ```Bash
  apt install graphviz libgraphviz-dev
  ```

  ```Bash
  yum install graphviz graphviz-devel
  ```

  ```Bash
  python3 -m pip install pygraphviz orjson
  ```


  - Assembly names are automatically prefixed to the expanded devices names when the graph is flattened
  - Besides graph construction, the main features that ahp_graph provides are several outputs
    - `SSTGraph.build()` will immediately turn your graph into SST components and begin a simulation
    - `SSTGraph.write_json()` will output the graph along with parameters in JSON format
    - `DeviceGraph.write_dot()` will output the graph in DOT format and optionally draw SVGs with them
  - All output generated by ahp_graph goes into a folder called 'output'
    - This is for the `SSTGraph.write_json()` and `DeviceGraph.write_dot()` functions
  - SST global parameters are set by adding things to the DeviceGraph attr field
  - SST component parameters are set by adding things to the Device attr field
  - You can still do normal SST Python things (examples below):
    - `sst.setProgramOption()`
    - `sst.setStatisticLoadLevel()`
    - `sst.setStatisticOutput()`
  - `SSTGraph.build()` returns a dictionary of devices with their name as the key
    - You can use this to enable statistics for devices after they are created
  - If you plan to build the graph with ahp_graph partitioning and run with MPI, remember to include the `--parallel-load=SINGLE` flag to sst
    - `--parallel-load` by default will work with multiple unique files
    - ahp_graph can generate the graph for each rank using a single file, so it needs the value 'SINGLE'
  - By default sst grabs all command line parameters
    - You can pass parameters to the python script by putting `-- ` before your script parameters

rpm_license:
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 569f7385732fa4095a15560e63b0928a959d3d0bb10759989ebf0e34bd01a835
name: python-ahqapiclient
arch: src
version: 0.7.9
epoch: 0
release: 1
summary: AbuseHQ API Client
url: https://www.abusix.com/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ahqapiclient-0.7.9-1.src.rpm
checksum_type: sha256
description:
  **ahqapiclient** is a library which reflects the AbuseHQ API on client side.



  import Client from ahqapiclient



  endpoint = {
    "auth_method": "JWT",
    "auth_options": {
      "token": "<YOUR_API_KEY>"
    },
    "url": "https://<yourcompany>.abusehq.net/api/v1"
  }

  api_client = Client(endpoint)




  case = api_client.case.get_case('case_id')



  api_client.case.trigger_transition('case_id', 'transition_id')


pkgId: 01884a1f94fc5ff48a23466c37d62a9a246ac057721d62880490e958268590f8
name: python-ai-agent-state
arch: src
version: 0.1.12
epoch: 0
release: 1
summary: A library for managing state machines in AI agents
url: https://github.com/AlgorithmicResearchGroup/Agent-States
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-agent-state-0.1.12-1.src.rpm
checksum_type: sha256
description:
  The AI Agent State Library is a library designed to manage the state and decision-making processes of AI agents. At its core, it implements the concept of finite state machines, a computational model used to design systems with a finite number of states and transitions between those states.

  Key features of the library include:

  1. **State Machine Creation**: It allows developers to define and create intricate state machines that model the behavior of AI agents.

  2. **Flexible State Definition**: States can be customized with associated data and metadata, allowing for rich context within each state.

  3. **Dynamic Transitions**: The library supports the creation of transitions between states, which can be conditional and trigger specific actions.

  4. **State Transition Guards**: Implement conditions that must be met for transitions to occur, providing more control over state changes.

  5. **Persistence**: Integration with ChromaDB enables efficient storage and retrieval of state machines, allowing for continuity across sessions or distributed systems.

  6. **Visualization**: The library includes tools to visualize state machines, aiding in debugging and understanding complex agent behaviors.

  7. **OpenAI Integration**: It leverages the OpenAI API for dynamic decision-making, allowing for more intelligent and adaptive state transitions.



  The AI Agent State Library proves particularly valuable in scenarios such as:

  - **Conversational AI**: Managing the flow and context of conversations, ensuring coherent and contextually appropriate responses.

  - **Business Process Automation**: Modeling and executing complex workflows that involve decision points and varied paths based on different conditions.

  - **Multi-Agent Systems**: Coordinating the behavior and interactions of multiple AI agents in a complex environment.

  The library's flexibility and extensibility make it adaptable to a wide range of AI applications where managing complex state and behavior is crucial. Its integration with modern tools like ChromaDB for persistence and OpenAI for decision-making enhances its utility in creating sophisticated, adaptive AI systems.

  By providing a structured way to design, implement, and manage AI agent behavior, the AI Agent State Library helps developers create more reliable, understandable, and maintainable AI systems, reducing the complexity often associated with developing intelligent agents.



  - Create and manage complex state machines for AI agents
  - Define custom states with associated data and metadata
  - Create transitions between states with optional conditions and actions
  - Implement state transition guards for controlled state changes
  - Persist and retrieve state machines using ChromaDB
  - Visualize state machines for easy understanding and debugging
  - Integration with OpenAI's API for dynamic decision-making



  To install the AI Agent State Library, use pip:

  ```bash
  pip install ai-agent-state
  ```

  Make sure you have the following dependencies installed:

  - Python 3.7+
  - ChromaDB
  - OpenAI
  - python-dotenv
  - graphviz (optional, for visualization)



  Here's a simple example to get you started with the AI Agent State Library. This example shows how to create a state machine and specify the OpenAI model to be used:

  ```python
  import uuid
  from ai_agent_state import State, StateData, StateMachine, Transition


  states = [
      State(
          id=str(uuid.uuid4()),
          name='initialize',
          data=StateData(data={'message': 'Initializing AI agent...'})
      ),
      State(
          id=str(uuid.uuid4()),
          name='process',
          data=StateData(data={'message': 'Processing task...'})
      ),
      State(
          id=str(uuid.uuid4()),
          name='idle',
          data=StateData(data={'message': 'Waiting for next task...'})
      ),
  ]


  state_machine = StateMachine(
      name='SimpleAIAgent',
      initial_state=states[0],
      model_name='gpt-3.5-turbo'  # Replace with your desired model
  )


  for state in states:
      state_machine.add_state(state)


  state_machine.add_transition(Transition(from_state='initialize', to_state='process'))
  state_machine.add_transition(Transition(from_state='process', to_state='idle'))
  state_machine.add_transition(Transition(from_state='idle', to_state='process'))


  state_machine.trigger_transition("Start processing")
  print(f"Current State: {state_machine.current_state.name}")
  state_machine.trigger_transition("Finish processing")
  print(f"Current State: {state_machine.current_state.name}")


  from ai_agent_state import ChromaStateManager
  chroma_manager = ChromaStateManager(persist_directory="chroma_db")
  chroma_manager.save_state_machine(state_machine)
  ```



  For detailed documentation on classes and methods, please refer to the [full documentation](link-to-your-documentation).



  The AI Agent State Library supports advanced features such as:

  - Custom transition conditions and actions
  - State transition guards for controlled state changes
  - Integration with language models for dynamic decision-making
  - Searching for similar states using vector embeddings
  - Visualizing complex state machines

  For examples of advanced usage, check out the [examples directory](/examples) in the repository.



  Here's an example of how to use this library to create an AI agent that manages customer support interactions. This example includes passing in the model during the state machine creation:

  ```python
  import os
  import uuid
  from dotenv import load_dotenv
  from ai_agent_state import State, StateData, StateMachine, Transition


  load_dotenv()


  welcome_state = State(
      id=str(uuid.uuid4()),
      name='Welcome',
      data=StateData(data={'message': 'Welcome to E-Shop! How can I assist you today?'})
  )

  main_menu_state = State(
      id=str(uuid.uuid4()),
      name='MainMenu',
      data=StateData(data={'message': 'Please choose an option: Order Tracking, Returns and Refunds, Product Inquiry, Account Management, or type "exit" to quit.'})
  )

  order_tracking_state = State(
      id=str(uuid.uuid4()),
      name='OrderTracking',
      data=StateData(data={'task': 'Assisting with order tracking...'})
  )

  collect_order_number_state = State(
      id=str(uuid.uuid4()),
      name='CollectOrderNumber',
      data=StateData(data={'message': 'Please provide your order number.'})
  )

  provide_order_status_state = State(
      id=str(uuid.uuid4()),
      name='ProvideOrderStatus',
      data=StateData(data={'task': 'Providing order status...'})
  )

  returns_refunds_state = State(
      id=str(uuid.uuid4()),
      name='ReturnsAndRefunds',
      data=StateData(data={'task': 'Assisting with returns and refunds...'})
  )

  product_inquiry_state = State(
      id=str(uuid.uuid4()),
      name='ProductInquiry',
      data=StateData(data={'task': 'Answering product inquiries...'})
  )

  account_management_state = State(
      id=str(uuid.uuid4()),
      name='AccountManagement',
      data=StateData(data={'task': 'Assisting with account management...'})
  )

  goodbye_state = State(
      id=str(uuid.uuid4()),
      name='Goodbye',
      data=StateData(data={'message': 'Thank you for visiting E-Shop! Have a great day!'})
  )


  state_machine = StateMachine(
      name='CustomerSupportAssistant',
      initial_state=welcome_state,
      model_name='gpt-3.5-turbo'  # Replace with your desired model
  )


  state_machine.add_state(main_menu_state)
  state_machine.add_state(order_tracking_state)
  state_machine.add_state(collect_order_number_state)
  state_machine.add_state(provide_order_status_state)
  state_machine.add_state(returns_refunds_state)
  state_machine.add_state(product_inquiry_state)
  state_machine.add_state(account_management_state)
  state_machine.add_state(goodbye_state)


  transitions = [
      Transition(from_state='Welcome', to_state='MainMenu'),
      Transition(from_state='MainMenu', to_state='OrderTracking', condition=is_order_tracking),
      Transition(from_state='OrderTracking', to_state='CollectOrderNumber'),
      Transition(from_state='CollectOrderNumber', to_state='ProvideOrderStatus', condition=has_order_number),
      Transition(from_state='ProvideOrderStatus', to_state='MainMenu'),
      Transition(from_state='MainMenu', to_state='ReturnsAndRefunds', condition=is_returns_and_refunds),
      Transition(from_state='MainMenu', to_state='ProductInquiry', condition=is_product_inquiry),
      Transition(from_state='MainMenu', to_state='AccountManagement', condition=is_account_management),
      Transition(from_state='MainMenu', to_state='Goodbye', condition=is_exit_command),
      Transition(from_state='ReturnsAndRefunds', to_state='MainMenu'),
      Transition(from_state='ProductInquiry', to_state='MainMenu'),
      Transition(from_state='AccountManagement', to_state='MainMenu'),
  ]


  for transition in transitions:
      state_machine.add_transition(transition)


  def fetch_order_status(order_number: str) -> str:
      
      return f"Order {order_number} is currently in transit and will be delivered in 2 days."

  def handle_returns_and_refunds():
      return "I've initiated the return process for you. Please check your email for further instructions."

  def answer_product_inquiry():
      return "The product you're interested in is available in multiple colors and sizes."

  def assist_account_management():
      return "Your account settings have been updated as per your request."

  def main():
      print(f"Current State: {state_machine.current_state.name}")
      print(state_machine.current_state.data.data['message'])

      while True:
          user_input = input("You: ")

          if not user_input.strip():
              continue  # Skip empty input

          
          print(f"\n[Before Transition] Current State: {state_machine.current_state.name}")

          
          if is_exit_command(user_input, state_machine):
              state_machine.current_state = goodbye_state
              print(state_machine.current_state.data.data['message'])
              break

          state_machine.trigger_transition(user_input)

          
          print(f"[After Transition] Current State: {state_machine.current_state.name}")

          
          state_machine.state_history.append(state_machine.current_state.name)
          print(f"State History: {' -> '.join(state_machine.state_history)}")

          
          if state_machine.conversation_history:
              last_turn = state_machine.conversation_history[-1]
              assistant_response = last_turn.get('assistant_response', '')
              if assistant_response:
                  print(f"Assistant: {assistant_response}")

          
          if state_machine.current_state.name == 'ProvideOrderStatus':
              
              order_number = "123456"  # Replace with actual order number logic
              status_message = fetch_order_status(order_number)
              print(f"Action: {status_message}")
          elif state_machine.current_state.name == 'ReturnsAndRefunds':
              result_message = handle_returns_and_refunds()
              print(f"Action: {result_message}")
          elif state_machine.current_state.name == 'ProductInquiry':
              result_message = answer_product_inquiry()
              print(f"Action: {result_message}")
          elif state_machine.current_state.name == 'AccountManagement':
              result_message = assist_account_management()
              print(f"Action: {result_message}")
          elif state_machine.current_state.name == 'Goodbye':
              print(state_machine.current_state.data.data['message'])
              break

      
      print("\nFinal State History:")
      print(" -> ".join(state_machine.state_history))


  if __name__ == '__main__':
      main()
  ```

  **Explanation of the Example:**

  - **State Definitions:**
    - We define several states representing different stages of the customer support interaction, such as `Welcome`, `MainMenu`, `OrderTracking`, `ProvideOrderStatus`, etc.

  - **State Machine Initialization:**
    - We create a `StateMachine` instance, specifying the initial state and the OpenAI model to use.

  - **Adding States and Transitions:**
    - All states and transitions are added to the state machine. Transitions define how the state machine moves from one state to another based on the conversation flow.

  - **Action Functions:**
    - Functions like `fetch_order_status`, `handle_returns_and_refunds`, etc., simulate backend operations that would occur in a real-world scenario.

  - **Main Conversation Loop:**
    - The `main` function runs an interactive loop where the user can input messages, and the assistant responds accordingly.
    - The assistant uses the OpenAI model specified to process messages and determine state transitions.

  - **State Management:**
    - The state machine keeps track of the current state and moves to the next state based on user input and OpenAI's decision-making.
    - Actions associated with each state are performed when the state is active.

  **Sample Interaction:**

  ```plaintext
  Current State: Welcome
  Welcome to E-Shop! How can I assist you today?
  You: I'd like to track my order.

  [Before Transition] Current State: Welcome
  Assistant Response: Sure, I can help you with order tracking. Please provide your order number.
  [After Transition] Current State: CollectOrderNumber
  State History: Welcome -> CollectOrderNumber
  You: My order number is 123456.

  [Before Transition] Current State: CollectOrderNumber
  Assistant Response: Thank you! Retrieving the status of your order now.
  [After Transition] Current State: ProvideOrderStatus
  State History: Welcome -> CollectOrderNumber -> ProvideOrderStatus
  Action: Order 123456 is currently in transit and will be delivered in 2 days.
  You: Great, thanks!

  [Before Transition] Current State: ProvideOrderStatus
  Assistant Response: You're welcome! Is there anything else I can assist you with?
  [After Transition] Current State: MainMenu
  State History: Welcome -> CollectOrderNumber -> ProvideOrderStatus -> MainMenu
  You: No, that's all.

  [Before Transition] Current State: MainMenu
  Assistant Response: Thank you for visiting E-Shop! Have a great day!
  [After Transition] Current State: Goodbye
  State History: Welcome -> CollectOrderNumber -> ProvideOrderStatus -> MainMenu -> Goodbye

  Final State History:
  Welcome -> CollectOrderNumber -> ProvideOrderStatus -> MainMenu -> Goodbye
  ```

  **Note:**

  - In a real implementation, the assistant's responses and state transitions are determined by the OpenAI model based on your inputs.
  - Ensure that you have set the `OPENAI_API_KEY` in your environment variables or appropriately in your code.
  - Replace `'gpt-3.5-turbo'` with your desired OpenAI model.
  - The action functions simulate backend processes and should be replaced with actual logic in a production environment.



  We welcome contributions to the AI Agent State Library! Please read our [contributing guidelines](link-to-contributing-guidelines) for more information on how to get started.



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.






  Represents the data and metadata associated with a state.


  - `to_dict()`: Converts the StateData to a dictionary.
  - `from_dict(data)`: Creates a StateData object from a dictionary.
  - `update_metadata(llm_response, **kwargs)`: Updates the metadata with new information.


  Represents a single state in the state machine.


  - `id`: Unique identifier for the state.
  - `name`: Name of the state.
  - `data`: StateData object containing the state's data and metadata.


  - `to_dict()`: Converts the State to a dictionary.
  - `from_dict(data)`: Creates a State object from a dictionary.


  Represents a transition between states.


  - `from_state`: Name of the source state.
  - `to_state`: Name of the destination state.
  - `condition`: Optional function to determine if the transition should occur.
  - `action`: Optional function to execute during the transition.


  Manages the states and transitions of an AI agent.


  - `add_state(state)`: Adds a new state to the machine.
  - `add_transition(transition)`: Adds a new transition to the machine.
  - `trigger_transition(user_input)`: Processes user input and determines the next state.
  - `move_to_previous_state()`: Moves the state machine to the previous state.
  - `visualize(filename)`: Generates a visual representation of the state machine.


  Manages the persistence and retrieval of state machines using ChromaDB.


  - `save_state_machine(state_machine)`: Saves a state machine to the database.
  - `load_state_machine(state_machine_id)`: Loads a state machine from the database.
  - `search_similar_states(query, top_k)`: Searches for similar states based on a query.


  **Note:**

  - In a real implementation, the assistant's responses and state transitions are determined by the OpenAI model based on your inputs.
  - Ensure that you have set the `OPENAI_API_KEY` in your environment variables or appropriately in your code.
  - Replace `'gpt-3.5-turbo'` with your desired OpenAI model.
  - The action functions simulate backend processes and should be replaced with actual logic in a production environment.


pkgId: f14bcb62806c5d418ed91da61a1136a09fdcc5d3ade5a0730717ce89dbcd2e2d
name: python-ai-alchemy
arch: src
version: 1.0.1
epoch: 0
release: 1
url: https://pypi.org/project/ai-alchemy/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-alchemy-1.0.1-1.src.rpm
checksum_type: sha256
summary:
  Lightweight package for arbitrary data transformation and validation using AI models and first class python libraries like Pandas and Pydantic.

description:
  AI Alchemy is a Python library that provides a convenient way to interact with AI models, such as OpenAI's GPT-3.5 Turbo, and perform transformations on data.



  These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.



  You need to have Python installed on your machine. You can download Python [here](https://www.python.org/downloads/).



  You can install AI Alchemy via pip:

  ```bash
  pip install ai_alchemy
  ```


  Here's a basic example of how to use AI Alchemy:

  ```python

  import os
  import ai_alchemy
  from ai_alchemy.ai import OpenAIWrapper
  from pydantic import BaseModel


  openai = OpenAIWrapper(api_key=os.environ["OPENAI_API_KEY"], model="gpt-3.5-turbo")


  class User(BaseModel):
      name: str
      age: int


  data = "John Smith is 25 years old, five foot ten inches tall, and weighs 150 pounds."


  model = ai_alchemy.cast.str_to_pydantic_model(data, openai, User)


  ```


pkgId: bb496acd2d0d9ef82b5f2849d2bdf7ba4e357c0d304891a2b455c21d8b995a09
name: python-ai-benchmark
arch: src
version: 0.1.2
epoch: 0
release: 1
url: http://ai-benchmark.com
rpm_license: Apache License Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-benchmark-0.1.2-1.src.rpm
checksum_type: sha256
summary:
  AI Benchmark is an open source python library for evaluating AI performance of various hardware platforms, including CPUs, GPUs and TPUs.

description:
  [AI Benchmark Alpha](http://ai-benchmark.com/alpha) is an open source python library for evaluating AI performance of various hardware platforms, including CPUs, GPUs and TPUs. The benchmark is relying on [TensorFlow](https://www.tensorflow.org) machine learning library, and is providing a lightweight and accurate solution for assessing inference and training speed for key Deep Learning models.</br></br>

  In total, AI Benchmark consists of <b>42 tests</b> and <b>19 sections</b> provided below:</br>

  1. MobileNet-V2&nbsp; `[classification]`
  2. Inception-V3&nbsp; `[classification]`
  3. Inception-V4&nbsp; `[classification]`
  4. Inception-ResNet-V2&nbsp; `[classification]`
  5. ResNet-V2-50&nbsp; `[classification]`
  6. ResNet-V2-152&nbsp; `[classification]`
  7. VGG-16&nbsp; `[classification]`
  8. SRCNN 9-5-5&nbsp; `[image-to-image mapping]`
  9. VGG-19&nbsp; `[image-to-image mapping]`
  10. ResNet-SRGAN&nbsp; `[image-to-image mapping]`
  11. ResNet-DPED&nbsp; `[image-to-image mapping]`
  12. U-Net&nbsp; `[image-to-image mapping]`
  13. Nvidia-SPADE&nbsp; `[image-to-image mapping]`
  14. ICNet&nbsp; `[image segmentation]`
  15. PSPNet&nbsp; `[image segmentation]`
  16. DeepLab&nbsp; `[image segmentation]`
  17. Pixel-RNN&nbsp; `[inpainting]`
  18. LSTM&nbsp; `[sentence sentiment analysis]`
  19. GNMT&nbsp; `[text translation]`

  For more information and results, please visit the project website: [http://ai-benchmark.com/alpha](http://ai-benchmark.com/alpha)</br></br>



  The benchmark requires TensorFlow machine learning library to be present in your system.

  On systems that <b>do not have Nvidia GPUs</b>, run the following commands to install AI Benchmark:

  ```bash
  pip install tensorflow
  pip install ai-benchmark
  ```
  </br>

  If you want to check the <b>performance of Nvidia graphic cards</b>, run the following commands:

  ```bash
  pip install tensorflow-gpu
  pip install ai-benchmark
  ```

  <b>`Note 1:`</b> If Tensorflow is already installed in your system, you can skip the first command.

  <b>`Note 2:`</b> For running the benchmark on Nvidia GPUs, <b>`NVIDIA CUDA`</b> and <b>`cuDNN`</b> libraries should be installed first. Please find detailed instructions [here](https://www.tensorflow.org/install/gpu). </br></br>



  To run AI Benchmark, use the following code:

  ```bash
  from ai_benchmark import AIBenchmark
  benchmark = AIBenchmark()
  results = benchmark.run()
  ```

  Alternatively, on Linux systems you can type `ai-benchmark` in the command line to start the tests.

  To run inference or training only, use `benchmark.run_inference()` or `benchmark.run_training()`. </br></br>



  ```bash
  AIBenchmark(use_CPU=None, verbose_level=1):
  ```
  > use_CPU=`{True, False, None}`:&nbsp;&nbsp; whether to run the tests on CPUs&nbsp; (if tensorflow-gpu is installed)

  > verbose_level=`{0, 1, 2, 3}`:&nbsp;&nbsp; run tests silently | with short summary | with information about each run | with TF logs

  ```bash
  benchmark.run(precision="normal"):
  ```

  > precision=`{"normal", "high"}`:&nbsp;&nbsp; if `high` is selected, the benchmark will execute 10 times more runs for each test.

  </br>



  GPU with at least 2GB of RAM is required for running inference tests / 4GB of RAM for training tests.

  The benchmark is compatible with both `TensorFlow 1.x` and `2.x` versions. </br></br>



  Please contact `andrey@vision.ee.ethz.ch` for any feedback or information.


pkgId: 7c7cac2cd925ddbb2db596250d852dea33a82e8b404c92795ec54ed56d71a828
name: python-ai-benchmarks
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: HS-QA
url: https://pypi.org/project/ai-benchmarks/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-benchmarks-0.1.0-1.src.rpm
checksum_type: sha256
description:
  本仓库包含了测试常见推理服务吞吐的代码以及相关的测试结果。





  - Python 3.9 或以上版本
  - Poetry

  请使用以下命令安装 Poetry：
  ```bash
  pip install poetry
  ```





  1. **构建包或以其他方式获取：**
      ```bash
      cd ai-benchmarks && poetry build
      ```

  2. **安装包：**
      ```bash
      pip install ai_benchmarks-x.x.x.tar.gz
      ```

  3. **接口运行方式：**
     - 启动后可访问 [127.0.0.1:8012/docs](http://127.0.0.1:8012/docs) 查看接口文档。
      ```bash
      run-app
      ```

  4. **直接运行方式,-h查看帮助，默认执行配置文件默认测试端点：**
      ```bash
      run-benchmark -h
      ```



  1. **安装依赖：**
      ```bash
      cd ai-benchmarks
      poetry lock && poetry install
      ```

  2. **`benchmark.py`** 是主要的压测脚本，采用 asyncio、AsyncOpenAI 和 ProcessPoolExecutor等 实现多端压测框架。

  3. **直接运行压测：**
      ```bash
      poetry run python -m inference.benchmark
      ```

  4. **启动接口压测：**
     - 启动后可访问 [127.0.0.1:8012/docs](http://127.0.0.1:8012/docs) 查看接口文档。
      ```bash
      poetry run python -m inference.main
      ```

  5. **测试报告和结果：**
     - 测试报告输出到 `inference/report` 文件夹。
     - 原始测试结果数据输出到 `inference/results` 文件夹，可使用 `draw.ipynb` 进行绘图。



  ```yaml
  [section]                  # 支持多section
  endpoint:                  # *必须提供一个有效的 endpoint
  api_key:                   # 认证KEY
  concurrent_requests:       # 同时并发的请求数
  batch:                     # 执行批次
  duration_enabled:          # 启用持续请求的时间限制（开启后不执行 concurrent_requests）[True/False]
  duration_time:             # 请求持续时间，默认为 1 秒
  duratio_interval:          # 持续/请求间隔，默认0.2秒
  duration_batch:            # 请求持续时间内每次并发数量，默认为 10
  ip:                        # 用户查询机器资源占用
  username:                  # 用户名
  password:                  # 密码
  timeout:                   # 超时时间，默认 60 秒
  max_retries:               # 最大重试次数，默认 1
  max_connections:           # 最大连接数
  max_keepalive_connections: # 最大保持活动连接数
  model:                     # 自动获取，可手动添加
  owned_by:                  # 自动获取，可手动添加
  stream:                    # 流式回复默认关闭[True/False]
  prompts:                   # 问题, 为空自动匹配默认问题, 格式 [{"id": 1, "prompt": "Output from 1 to 100"}, {"id": 2, "prompt": "List the top 10 most important people in history."},]


pkgId: ce99f119c8c450ceef6ab940410c8e19cd42932a516b9769cfdaf3e33dfcb35d
name: python-ai-benchmarks
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: HS-QA
url: https://pypi.org/project/ai-benchmarks/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-benchmarks-0.1.1-1.src.rpm
checksum_type: sha256
description:
  本仓库包含了测试常见推理服务吞吐的代码以及相关的测试结果。





  - Python 3.9 或以上版本
  - Poetry

  请使用以下命令安装 Poetry：
  ```bash
  pip install poetry
  ```





      pip install ai_benchmarks
      run-benchmark -h
      run-app



  1. **构建包或以其他方式获取：**
      ```bash
      cd ai-benchmarks && poetry build
      ```

  2. **安装包：**
      ```bash
      pip install ai_benchmarks-x.x.x.tar.gz
      ```

  3. **接口运行方式：**
     - 启动后可访问 [127.0.0.1:8012/docs](http://127.0.0.1:8012/docs) 查看接口文档。
      ```bash
      run-app
      ```

  4. **直接运行方式,-h查看帮助，默认执行配置文件默认测试端点：**
      ```bash
      run-benchmark -h
      ```



  1. **安装依赖：**
      ```bash
      cd ai-benchmarks
      poetry lock && poetry install
      ```

  2. **`benchmark.py`** 是主要的压测脚本，采用 asyncio、AsyncOpenAI 和 ProcessPoolExecutor等 实现多端压测框架。

  3. **直接运行压测：**
      ```bash
      poetry run python -m inference.benchmark
      ```

  4. **启动接口压测：**
     - 启动后可访问 [127.0.0.1:8012/docs](http://127.0.0.1:8012/docs) 查看接口文档。
      ```bash
      poetry run python -m inference.main
      ```

  5. **测试报告和结果：**
     - 测试报告输出到 `inference/report` 文件夹。
     - 原始测试结果数据输出到 `inference/results` 文件夹，可使用 `draw.ipynb` 进行绘图。



  ```yaml
  [section]                  # 支持多section
  endpoint:                  # *必须提供一个有效的 endpoint
  api_key:                   # 认证KEY
  concurrent_requests:       # 同时并发的请求数
  batch:                     # 执行批次
  duration_enabled:          # 启用持续请求的时间限制（开启后不执行 concurrent_requests）[True/False]
  duration_time:             # 请求持续时间，默认为 1 秒
  duratio_interval:          # 持续/请求间隔，默认0.2秒
  duration_batch:            # 请求持续时间内每次并发数量，默认为 10
  ip:                        # 用户查询机器资源占用
  username:                  # 用户名
  password:                  # 密码
  timeout:                   # 超时时间，默认 60 秒
  max_retries:               # 最大重试次数，默认 1
  max_connections:           # 最大连接数
  max_keepalive_connections: # 最大保持活动连接数
  model:                     # 自动获取，可手动添加
  owned_by:                  # 自动获取，可手动添加
  stream:                    # 流式回复默认关闭[True/False]
  prompts:                   # 问题, 为空自动匹配默认问题, 格式 [{"id": 1, "prompt": "Output from 1 to 100"}, {"id": 2, "prompt": "List the top 10 most important people in history."},]


pkgId: 6087bd4174e0e5e39b6708a1abef964004f97d833d2958514db6608bd4ea9c9c
name: python-ai-changelog
arch: src
version: 0.0.14
epoch: 0
release: 1
summary: A Python project that generates AI-based changelogs.
url: https://github.com/joshuasundance-swca/ai_changelog
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-changelog-0.0.14-1.src.rpm
checksum_type: sha256
description:
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![python](https://img.shields.io/badge/Python-3.7+-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)

  [![Publish to PyPI](https://github.com/joshuasundance-swca/ai_changelog/actions/workflows/publish_on_pypi.yml/badge.svg)](https://github.com/joshuasundance-swca/ai_changelog/actions/workflows/publish_on_pypi.yml)
  ![GitHub tag (with filter)](https://img.shields.io/github/v/tag/joshuasundance-swca/ai_changelog)

  [![Push to Docker Hub](https://github.com/joshuasundance-swca/ai_changelog/actions/workflows/docker-hub.yml/badge.svg)](https://github.com/joshuasundance-swca/ai_changelog/actions/workflows/docker-hub.yml)
  [![Docker Image Size (tag)](https://img.shields.io/docker/image-size/joshuasundance/ai_changelog/latest)](https://hub.docker.com/r/joshuasundance/ai_changelog)

  ![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/joshuasundance-swca/ai_changelog)
  ![Code Climate issues](https://img.shields.io/codeclimate/issues/joshuasundance-swca/ai_changelog)
  ![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/joshuasundance-swca/ai_changelog)

  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
  ![Known Vulnerabilities](https://snyk.io/test/github/joshuasundance-swca/ai_changelog/badge.svg)

  [![Update AI Changelog on Push to Main](https://github.com/joshuasundance-swca/ai_changelog/actions/workflows/ai_changelog_main_push.yml/badge.svg)](https://github.com/joshuasundance-swca/ai_changelog/actions/workflows/ai_changelog_main_push.yml)

  `ai_changelog` is a Python project that automatically generates changelog files summarizing code changes, using AI.

  It uses [LangChain](https://github.com/langchain-ai/langchain) and [OpenAI](https://openai.com/) models to analyze Git commit diffs and generate natural language descriptions of the changes. This allows maintaining an up-to-date changelog without manual effort.

  This README was originally written by Claude, an LLM from Anthropic.



  ```bash
  usage: ai_changelog [-h] [--provider {openai,anthropic,anyscale}] [--model MODEL] [--temperature TEMPERATURE] [--max_tokens MAX_TOKENS] [--hub_prompt HUB_PROMPT]
                      [--context_lines CONTEXT_LINES] [--max_concurrency MAX_CONCURRENCY] [-v]
                      refs

  Process command line arguments.

  positional arguments:
    refs                  Reference comparison with standard git syntax

  options:
    -h, --help            show this help message and exit
    --provider {openai,anthropic,anyscale}
                          Model API provider
    --model MODEL         Model name
    --temperature TEMPERATURE
                          Model temperature
    --max_tokens MAX_TOKENS
                          Max tokens in output
    --hub_prompt HUB_PROMPT
                          Prompt to pull from LangChain Hub
    --context_lines CONTEXT_LINES
                          Number of context lines for each commit
    --max_concurrency MAX_CONCURRENCY
                          Number of concurrent connections to llm provider (0 means no limit)
    -v, --verbose         Run LangChain in verbose mode

  http://github.com/joshuasundance-swca/ai_changelog
  ```



  To generate a changelog locally:

  ```bash
  pip install ai_changelog

  ai_changelog --help
  ai_changelog main..HEAD  # to summarize changes locally
  ```



  ```bash
  docker pull joshuasundance/ai_changelog:latest
  docker run \
      --env-file .env \
      -v /local_repo_dir:/container_dir_in_repo \
      -w /container_dir_in_repo \
      joshuasundance/ai_changelog:latest \
      main..HEAD
  ```



  The [ai_changelog_main_pr.yml](.github/workflows/ai_changelog_main_push.yml) workflow runs on pushes to `main`.

  It generates summaries for the new commits and appends them to `AI_CHANGELOG.md`. The updated file is then committed back to the PR branch.

  ```bash
  ai_changelog origin/main^..origin/main  # in a GitHub action to summarize changes in response to a push to main
  ai_changelog origin/main..HEAD  # in a GitHub action to summarize changes in response to a PR
  ```

  Another flow was made to commit an updated changelog to an incoming PR before it was merged, but that seemed less useful although it did work well.



  - Set environment variables as needed for your provider of choice (default requires `OPENAI_API_KEY`).
  - Set LangSmith environment variables to enable LangSmith integration, if applicable.
  - Use command line arguments.



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.




  - Testing
  - Get CodeLlama working reliably in CICD (currently hit or miss on structured output)

rpm_license:
  MIT License  Copyright (c) 2023 Joshua Sundance Bailey  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 644c64c4c2e6c3d4332b242d61f79386f3e5c5c0f1ac63cac072219aaae83e53
name: python-ai-chat-tool
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: AI-Chat-Tool is a tool that brings ChatGPT to the command line
url: https://github.com/matoval/ai-chat-tool
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-chat-tool-0.0.11-1.src.rpm
checksum_type: sha256
description:
  AI-Chat-Tool is a tool that brings ChatGPT to the command line.

  To use this tool you will need a ChatGPT api key.


  - **--api-key**
      - (required) ChatGPT api key to use to access ChatGPT.
  - **--file**
      - (optional) File to write ChatGPT response to. Pass just the file(test.py) or the path and file(/first_dir/second_dir/test.py)
  - **--max-tokens**
      - (optional) The maximum number of tokens to generate in the completion. Default=7
  - **--temperature**
      - (optional) What sampling temperature to use. Default=0
  - **--line**
      - (optional) Line on a file where ChatGPT output will start.


  - Use AI-Chat-Tool to create a Python function that checks for even numbers

  **CLI**
  ```
  python -m ai-chat-tool --api-key=$CHATGPTKEY --file=test.py --max-tokens=2000 --line=4
  ```
  ```
  What can I do for you today?: Can you create a python function that checks for even numbers?
  Text written to test.py
  ```


  File created by AI-Chat-Tool
  **test.py**
  ```python



  def check_even(number):
      if number % 2 == 0:
          return True
      else:
          return False
  ```


pkgId: 8ebe77695c007bb7fad339220e7afafa9d285bdbdc096715838b7209e1e9b8b9
name: python-ai-core
arch: src
version: 0.0.14
epoch: 0
release: 1
url: https://github.com/AI-Core/ai-core
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-core-0.0.14-1.src.rpm
checksum_type: sha256
summary:
  Allows you to focus on building applications using the latest models and techniques, rather then building them yourself, by providing them in a simple API.


pkgId: f3dd0bbad96315db93f9850907d249444e044aec7b0bd37ba893556f8f86bcc4
name: python-ai-django-core
arch: src
version: 7.0.2
epoch: 0
release: 1
summary: Ambient toolbox - Lots of helper functions and useful widgets
url: https://pypi.org/project/ai-django-core/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-django-core-7.0.2-1.src.rpm
checksum_type: sha256
description:
  This package contains various useful helper functions. You can read up on all the fancy things at
  [readthedocs.io](https://ai-django-core.readthedocs.io/en/latest/index.html).

  - Install the package via pip:
    `pip install ai-django-core`
    or via pipenv:
    `pipenv install ai-django-core`
  - Add module to `INSTALLED_APPS` within the main django `settings.py`:
      ````
      INSTALLED_APPS = (
          'ai_django_core',
      )
       ````


  - Create a Python 3.11 virtualenv
  - Activate the virtualenv (take care that you need `Scripts/activate.ps1` for Windows users instead of
    `Scripts/activate`)
  - Install dependencies with `pip install .[dev,docs,view-layer,drf,graphql]`

  - Clone the project locally
  - Create a new branch for your feature
  - Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
    `-e /Users/workspace/ai-django-core` or via pip  `pip install -e /Users/workspace/ai-django-core`
  - Ensure the code passes the tests
  - Create a pull request

  - Check coverage
    ````
    pytest --cov=.
    ````
  - Run tests
    ````
    pytest
    ````

  We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in
  vain.
  To enable the configured pre-push hooks, you need to [install](https://pre-commit.com/) pre-commit and run once:
      pre-commit install -t pre-push -t pre-commit --install-hooks
  This will permanently install the git hooks for both, frontend and backend, in your local
  [`.git/hooks`](./.git/hooks) folder.
  The hooks are configured in the [`.pre-commit-config.yaml`](.pre-commit-config.yaml).
  You can check whether hooks work as intended using the [run](https://pre-commit.com/#pre-commit-run) command:
      pre-commit run [hook-id] [options]
  Example: run single hook
      pre-commit run ruff --all-files --hook-stage push
  Example: run all hooks of pre-push stage
      pre-commit run --all-files --hook-stage push

  - To generate new auto-docs for new modules run: `sphinx-apidoc -o ./docs/modules/ ./ai_django_core/` (in the current
    set up an auto doc for the antivirus module is not supported due to installation and import problems. Since it might
    be removed in the future, that should be fine for now).
  - To build the documentation run: `sphinx-build docs/ docs/_build/html/` or go into the **docs** folder and
    run: `make html`. Open `docs/_build/html/index.html` to see the documentation.

  If you have added custom text, make sure to wrap it in `_()` where `_` is
  gettext_lazy (`from django.utils.translation import gettext_lazy as _`).
  How to create translation file:
  * Navigate to `ai_django_core/ai_django_core` (the inner directory!)
  * `python manage.py makemessages -l de`
  * Have a look at the new/changed files within `ai_django_core/ai_django_core/locale`
  How to compile translation files:
  * Navigate to `ai_django_core/ai_django_core` (the inner directory!)
  * `python manage.py compilemessages`
  * Have a look at the new/changed files within `ai_django_core/ai_django_core/locale`

  - Fetch the latest changes in GitHub mirror and push them
  - Trigger new build at ReadTheDocs.io (follow instructions in admin panel at RTD) if the GitHub webhook is not yet set
    up.

  - Update documentation about new/changed functionality
  - Update the `Changelog`
  - Increment version in main `__init__.py`
  - Create pull request / merge to master
  - This project uses the flit package to publish to PyPI. Thus publishing should be as easy as running:
    ```
    flit publish
    ```
    To publish to TestPyPI use the following ensure that you have set up your .pypirc as
    shown [here](https://flit.readthedocs.io/en/latest/upload.html#using-pypirc) and use the following command:
    ```
    flit publish --repository testpypi
    ```


pkgId: 6ea0b564d35bdaac74723c64e131703e0290c6d354bf88de13fea5e4aaa7f470
name: python-ai-django-fileupload
arch: src
version: 0.1.5
epoch: 0
release: 1
summary: Integrate jQuery fileupload
url: https://gitlab.ambient-innovation.com/ai/ai-django-fileupload
rpm_license: The MIT License (MIT)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-django-fileupload-0.1.5-1.src.rpm
checksum_type: sha256
description:
  This package provides an easy way to implement the [jQuery Fileuploader](https://github.com/blueimp/jQuery-File-Upload), in your Django project.

  The uploaded files are stored through the Attachment model. Attachments could be linked to any model.

  Additionally, a list of attachments is rendered along with the uploader button. These attachments have a convenient delete feature.



  - Add a requirement to your requirements.txt:

      `ai-django-fileupload`

  - Add module to `INSTALLED_APPS`:

      `fileupload.apps.FileuploadConfig`

  - Add module's urls to your url file:

      `url(r'^upload/', include('fileupload.urls')),`

  - Add static files. They are not included in this package, though a convenient [npm package](https://www.npmjs.com/package/ai-django-fileupload) is provided.

      `npm install ai-django-fileupload`

  - Run migrations




  The uploader comes with a default thumbnail image, in case it couldn't be generated.

  You can set your own one, adding its location to the settings file:

      UPLOADER_DEFAULT_THUMBNAIL = '/static/img/default-thumbnail.png'

  Otherwise it'd be fetched from "static/node_modules/ai-django-fileupload/img/default-thumbnail.png". You may find useful to copy this image wherever your static content is stored.


  If your uploader needs the user be authenticated, you can enable this restriction adding this to the settings file:

      UPLOADER_LOGIN_REQUIRED = True


  The uploader prepends a UUID to the filename. You can disable this by adding this to the settings file:

      UPLOADER_PERSIST_FILENAME = True


  - Include the upload_file template tag in your template:

      `{% load upload_file %}`

  - Call it with the object that the uploaded files will be attached to:

      `{% upload_file obj=object %}`

     Make sure to put the template tag outside any other form tags you have since it will render a new form.

  - For a minimal setup, please load the following files. Scripts order is important.

  ```
    <link rel="stylesheet" type="text/css" href="node_modules/bootstrap/dist/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="node_modules/blueimp-file-upload/css/jquery.fileupload.css">

    <!-- jQuery -->
    <script src="node_modules/jquery/dist/jquery.js"></script>

    <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
    <script src="node_modules/blueimp-file-upload/js/vendor/jquery.ui.widget.js"></script>

    <!-- The Templates plugin is included to render the upload/download listings -->
    <script src="node_modules/blueimp-tmpl/js/tmpl.min.js"></script>

    <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
    <script src="node_modules/blueimp-load-image/js/load-image.all.min.js"></script>

    <!-- The Canvas to Blob plugin is included for image resizing functionality -->
    <script src="node_modules/blueimp-canvas-to-blob/js/canvas-to-blob.min.js"></script>

    <!-- The basic File Upload plugin and components-->
    <script src="node_modules/blueimp-file-upload/js/jquery.fileupload.js"></script>
    <script src="node_modules/blueimp-file-upload/js/jquery.fileupload-process.js"></script>
    <script src="node_modules/blueimp-file-upload/js/jquery.fileupload-image.js"></script>
    <script src="node_modules/blueimp-file-upload/js/jquery.fileupload-audio.js"></script>
    <script src="node_modules/blueimp-file-upload/js/jquery.fileupload-video.js"></script>
    <script src="node_modules/blueimp-file-upload/js/jquery.fileupload-validate.js"></script>
    <script src="node_modules/blueimp-file-upload/js/jquery.fileupload-ui.js"></script>

    <!-- Locale -->
    <script src="node_modules/ai-django-fileupload/locale.js"></script>

    <!-- CSRF token -->
    <script src="node_modules/ai-django-fileupload/csrf.js"></script>

    <!-- The main application script -->
    <script src="node_modules/ai-django-fileupload/index.js"></script>

    <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE8+ -->
    <!--[if gte IE 8]>
    <script src="node_modules/blueimp-file-upload/js/cors/jquery.xdr-transport.js"></script>
    <![endif]-->
  ```



  - Clone the project locally
  - Create a new branch for your feature
  - Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
      ```
      -e /Users/felix/Documents/workspace/ai-django-fileupload
      ```
  - Ensure the code passes the tests
  - Run:

      `python setup.py develop`

  - Create a pull request



  - Increment version in `setup.py`

  - Update `Changelog` in `Readme.md`

  - Create pull request / merge to master

  - Run:

      * Make sure you have all the required packages installed
      `pip install twine wheel`
      * Create a file in your home directory: `~/.pypirc`
      ```
      [distutils]
      index-servers=
          pypi
          testpypi

      [pypi]
      repository: https://upload.pypi.org/legacy/
      username: ambient-innovation

      [testpypi]
      repository: https://test.pypi.org/legacy/
      username: ambient-innovation
      ```
      * Empty `dist` directory
      * Create distribution
      `python setup.py sdist bdist_wheel`
      * Upload to Test-PyPi
      `twine upload --repository testpypi dist/*`
      * Check at Test-PyPi if it looks nice
      * Upload to real PyPi
      `twine upload dist/*`



  - Install requirements

      `pip install -r requirements.pip`

  - Check coverage

      `pytest --cov=fileupload fileupload`

  - Run tests

      `pytest`



  1. Activate a virtualenv with django installed
  2. Go to fileupload app
  3. Run

      ```django-admin makemessages -l <language_code>```
  4. Translate the .po file
  5. Run

      ```django-admin compilemessages```



  * **0.1.5** (2021-12-07)
      * Added `exclude` functionality where attachments can be excluded from the response by ids

  * **0.1.4** (2021-03-01)
      * Fixed a bug where the upload_to method would cause a RecursionError when using the persist-filename option
      * Added file type restriction configurable with UPLOADER_ALLOW_FILETYPE option

  * **0.1.3** (2021-02-22)
      * Added option to persist filename

  * **0.1.2** (2019-12-11)
      * Description altered

  * **0.1.1** (2019-12-11)
      * Updated Readme.md

  * **0.1.0** (2019-11-19)
      * Added support for django 2.2.*


pkgId: 56f4c58549865fee11991a36f1cb3bb9e87c54f7c0870db245585d231ac519d2
name: python-ai-edge-litert
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: LiteRT is for mobile and embedded devices.
url: https://www.tensorflow.org/lite/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-edge-litert-1.0.1-1.src.rpm
checksum_type: sha256
description:
  LiteRT is the official solution for running machine learning models on mobile
  and embedded devices. It enables on-device machine learning inference with low
  latency and a small binary size on Android, iOS, and other operating systems.


pkgId: 0324eb099bbe9696666c54e2259be8c0de13e85de0d030741c611c04e367689c
name: python-ai-edge-model-explorer
arch: src
version: 0.1.13
epoch: 0
release: 1
summary: A modern model graph visualizer and debugger
url: https://pypi.org/project/ai-edge-model-explorer/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-edge-model-explorer-0.1.13-1.src.rpm
checksum_type: sha256
description:
  Model Explorer offers an intuitive and hierarchical visualization of model
  graphs. It organizes model operations into nested layers, enabling users to
  dynamically expand or collapse these layers. It also provides a range of
  features to facilitate model exploration and debugging, including the ability to
  highlight input and output operations, overlay metadata on nodes, display layers
  in interactive pop-ups, perform searches, show identical layers, GPU-accelerated
  graph rendering, among others. It currently supports TFLite, TF, TFJS, MLIR, and
  PyTorch (Exported Program) model format, and provides an extension framework for
  developers to easily add support for additional formats.

  ![](https://raw.githubusercontent.com/google-ai-edge/model-explorer/main/screenshots/main_ui.png)

  <br>
  <br>

  Please check out our [Wiki](https://github.com/google-ai-edge/model-explorer/wiki) for
  more details:

  - [Installation](https://github.com/google-ai-edge/model-explorer/wiki/1.-Installation)
  - [User Guide](https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide)
  - [Command Line Guide](https://github.com/google-ai-edge/model-explorer/wiki/3.-Command-Line-Guide)
  - [API Guide](https://github.com/google-ai-edge/model-explorer/wiki/4.-API-Guide)
  - [Run in Colab Notebook](https://github.com/google-ai-edge/model-explorer/wiki/5.-Run-in-Colab-Notebook)
  - [Develop Adapter Extension](https://github.com/google-ai-edge/model-explorer/wiki/6.-Develop-Adapter-Extension)


pkgId: 331d45ece0c76191a506fa675520849ec3f968cb24117ca983333daea6df50c0
name: python-ai-edge-model-explorer-adapter
arch: src
version: 0.1.5
epoch: 0
release: 1
summary: Model Explorer offers an intuitive and hierarchical visualization of model graphs.
url: https://github.com/google-ai-edge/model-explorer
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-edge-model-explorer-adapter-0.1.5-1.src.rpm
checksum_type: sha256
description:
  It organizes model operations into nested layers, enabling users to dynamically
  expand or collapse these layers. It also provides a range of features to
  facilitate model exploration and debugging, including the ability to highlight
  input and output operations, overlay metadata on nodes, display layers in
  interactive pop-ups, perform searches, show identical layers, GPU-accelerated
  graph rendering, among others. It currently supports TFLite, TF, TFJS, MLIR, and
  PyTorch (Exported Program) model format, and provides an extension framework for
  developers to easily add support for additional formats.


pkgId: 5627eb96476f625166ca458dd05a03f81e9cb9d4596d700dbf6ba2a09cb43bf7
name: python-ai-enterprise-agent
arch: src
version: 0.0.9
epoch: 0
release: 1
summary: AI Agent simplifies the implementation and use of generative AI with LangChain.
url: https://pypi.org/project/ai-enterprise-agent/
rpm_license: Apache 2.0 License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-enterprise-agent-0.0.9-1.src.rpm
checksum_type: sha256
description:
  [![Publish new version to NPM](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml)



  AI Agent simplifies the implementation and use of generative AI with LangChain, was inspired by the project [autogen](https://github.com/microsoft/autogen)





  Use the package manager [pip](https://pypi.org/project/pip/) to install AI Agent.

  ```bash
  pip install ai_enterprise_agent
  ```




  ```python
    import asyncio

    from ai_enterprise_agent.agent import Agent
    from ai_enterprise_agent.interface.settings import (CHAIN_TYPE, DATABASE_TYPE, DIALECT_TYPE,
                                    LLM_TYPE, PROCESSING_TYPE, VECTOR_STORE_TYPE)
    agent = Agent({
      'processing_type': PROCESSING_TYPE.single,
      'chains': [CHAIN_TYPE.simple_chain],
      'model': {
        "type": LLM_TYPE.azure,
        "api_key": <api_key>,
        "model": <model>,
        "endpoint": <endpoint>,
        "api_version": <api_version>,
        "temperature": 0.0
      },
      "system": {
        "system_message": ""
      },
    })

    response = asyncio.run(
      agent._call(
        input={
          "question": "Who's Leonardo Da Vinci?.",
          "chat_thread_id": "<chat_thread_id>"
        }
      )
    )
    print(response)
  ```


  When using LLM with Orchestrator Mode the Agent finds the best way to answer the question in your base knowledge.
  ```python

    agent = Agent({
      'processing_type': PROCESSING_TYPE.orchestrator,
      'chains': [CHAIN_TYPE.simple_chain, CHAIN_TYPE.sql_chain],
      'model': {
        "type": LLM_TYPE.azure,
        "api_key": <api_key>,
        "model": <model>,
        "endpoint": <endpoint>,
        "api_version": <api_version>,
        "temperature": 0.0
      },
       "database": {
        "type": DIALECT_TYPE.postgres,
        "host": <host>,
        "port": <port>,
        "username": <username>,
        "password": <password>,
        "database": <database>,
        "includes_tables": ['table-1', 'table-2'],
      },
      "system": {
        "system_message": ""
      },
    })

    response = asyncio.run(
      agent._call(
        input={
          "question": "How many employees there?",
          "chat_thread_id": "<chat_thread_id>"
        }
      )
    )
    print(response)
  ```



  If you've ever wanted to contribute to open source, and a great cause, now is your chance!

  See the [contributing docs](CONTRIBUTING.md) for more information



  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  <!-- prettier-ignore-start -->
  <!-- markdownlint-disable -->

  <table>
    <tr>
      <td align="center">
        <a href="https://github.com/dev-jpnobrega">
          <img src="https://avatars1.githubusercontent.com/u/28389807?s=400&u=2c152fc946efc96badce0cfc743ebcb2585b4b3f&v=4" width="100px;" alt=""/>
          <br />
          <sub>
            <b>JP. Nobrega</b>
          </sub>
        </a>
        <br />
        <a href="https://github.com/dev-jpnobrega/ai-agent-py/issues" title="Answering Questions">💬</a>
        <a href="https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use" title="Documentation">📖</a>
        <a href="https://github.com/dev-jpnobrega/ai-agent-py/pulls" title="Reviewed Pull Requests">👀</a>
        <a href="#talk-kentcdodds" title="Talks">📢</a>
      </td>
      <td align="center">
        <a href="https://github.com/tuliogaio">
          <img src="https://github.com/tuliogaio.png" width="100px;" alt=""/>
          <br />
          <sub>
            <b>Túlio César Gaio</b>
          </sub>
        </a>
        <br />
        <a href="https://github.com/dev-jpnobrega/ai-agent-py/issues" title="Answering Questions">💬</a>
        <a href="https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use" title="Documentation">📖</a>
        <a href="https://github.com/dev-jpnobrega/ai-agent-py/pulls" title="Reviewed Pull Requests">👀</a>
        <a href="#talk-kentcdodds" title="Talks">📢</a>
      </td>
    </tr>
  </table>

  <!-- markdownlint-enable -->
  <!-- prettier-ignore-end -->
  <!-- ALL-CONTRIBUTORS-LIST:END -->


  [Apache-2.0](LICENSE)


pkgId: 697af265448e9ce86d9df2d37692bb7cd7c8dc177406bc6add4e52f9459addcd
name: python-ai-exchange
arch: src
version: 0.9.8
epoch: 0
release: 1
summary: a uniform python SDK for message generation with LLMs
url: https://pypi.org/project/ai-exchange/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-exchange-0.9.8-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
  <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg"></a>
  </p>

  <p align="center">
    <a href="#example">Example</a> •
    <a href="#plugins">Plugins</a>
  </p>

  <p align="center"><strong>Exchange</strong> <em>- a uniform python SDK for message generation with LLMs</em></p>

  - Provides a flexible layer for message handling and generation
  - Directly integrates python functions into tool calling
  - Persistently surfaces errors to the underlying models to support reflection



  > [!NOTE]
  > Before you can run this example, you need to setup an API key with
  > `export OPENAI_API_KEY=your-key-here`

  ``` python
  from exchange import Exchange, Message, Tool
  from exchange.providers import OpenAiProvider

  def word_count(text: str):
      """Get the count of words in text

      Args:
          text (str): The text with words to count
      """
      return len(text.split(" "))

  ex = Exchange(
      provider=OpenAiProvider.from_env(),
      model="gpt-4o",
      system="You are a helpful assistant.",
      tools=[Tool.from_function(word_count)],
  )
  ex.add(Message.user("Count the number of words in this current message"))



  reply = ex.reply()
  print(reply.text)


  print(ex.messages)
  ```



  *exchange* has a plugin mechanism to add support for additional providers and moderators. If you need a
  provider not supported here, we'd be happy to review contributions. But you
  can also consider building and using your own plugin.

  To create a `Provider` plugin, subclass `exchange.provider.Provider`. You will need to
  implement the `complete` method. For example this is what we use as a mock in our tests.
  You can see a full implementation example of the [OpenAiProvider][openaiprovider]. We
  also generally recommend implementing a `from_env` classmethod to instantiate the provider.

  ``` python
  class MockProvider(Provider):
      def __init__(self, sequence: List[Message]):
          
          self.sequence = sequence
          self.call_count = 0

      def complete(
          self, model: str, system: str, messages: List[Message], tools: List[Tool]
      ) -> Message:
          output = self.sequence[self.call_count]
          self.call_count += 1
          return output
  ```

  Then use [python packaging's entrypoints][plugins] to register your plugin.

  ``` toml
  [project.entry-points.'exchange.provider']
  example = 'path.to.plugin:ExampleProvider'
  ```

  Your plugin will then be available in your application or other applications built on *exchange*
  through:

  ``` python
  from exchange.providers import get_provider

  provider = get_provider('example').from_env()
  ```

  [openaiprovider]: src/exchange/providers/openai.py
  [plugins]: https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/


pkgId: 5e2a09b2fa32c9ec6935b6aa4f30662664013e64a6e120da141da340855fef01
name: python-ai-git-utils
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: AI git utils is an intelligent Git commit assistant that leverages AI to enhance your Git workflow.
url: https://pypi.org/project/ai-git-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-git-utils-0.2.2-1.src.rpm
checksum_type: sha256
description:
  AI git utils is an intelligent Git commit assistant that leverages AI to enhance your Git workflow.
  It provides smart commit message generation and emoji selection to make your version control process more efficient and expressive.



  - AI-powered commit message generation
  - Interactive emoji selection for commit messages
  - Multiple AI model support with easy configuration



  ```bash
  pip install ai-git-utils
  ```



  Generate AI-assisted commit message

  ```
  aigit commit
  ```

  Check the help

  ```
  aigit --help
  ```


pkgId: a7cf6ae87cc39542def99c3df4038099119750ac26693fb146eddbd842c1aefb
name: python-ai-git-utils
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: AI git utils is an intelligent Git commit assistant that leverages AI to enhance your Git workflow.
url: https://pypi.org/project/ai-git-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-git-utils-0.2.3-1.src.rpm
checksum_type: sha256
description:
  AI git utils is an intelligent Git commit assistant that leverages AI to enhance your Git workflow.
  It provides smart commit message generation and emoji selection to make your version control process more efficient and expressive.


  ![](./screen.png)



  - AI-powered commit message generation
  - Interactive emoji selection for commit messages
  - Multiple AI model support with easy configuration



  ```bash
  pip install ai-git-utils
  ```



  Generate AI-assisted commit message

  ```
  aigit commit
  ```

  Check the help

  ```
  aigit --help
  ```


pkgId: 9a063eaa85c5b90e3088c9ed72d3152ccd9051b847af4d82c964ee2697b25223
name: python-ai-harness
arch: src
version: 0.4.32
epoch: 0
release: 1
summary: A harness project for ML & DL
url: https://github.com/aicanhelp/ai-harness
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-harness-0.4.32-1.src.rpm
checksum_type: sha256
description:
  This project would like to supply some convenient tools for the machine learning and deep learning.
  Current features:
  - XMLConfiguration: for loading a configuration defined in xml files into a Python Object
  - Arguments: Mapping a Python Object to the arguments of argparse
  - inspector: Some convenient method for class/object
  - executors: Some convenient ProcessExecutor
  - fileutils: DirectoryNavigator, FileReadPipeLine
  - others:


  - 2019.4.18, version: 0.3.0: Added distributed training tools for python
  - 2019.4.23, version: 0.3.5: Added a Json file Reader
  - 2019.4.24, version: 0.3.6: Added a data utils for processing data
  - 2019.4.26, version: 0.3.7 Added a data utils for processing data for zip file
  - 2019.4.28, version: 0.3.8 Added QueueExecutor




  ```xml
  <?xml version="1.0" encoding="UTF-8" ?>
  <configuration>
      <arg name="name" default="TestName" help="Name Test Help"/>
      <arg name="age" default="20" help="Age Test Help"/>
      <group name="address">
          <arg name="home" default="shanghai" help="Home test Help"/>
          <arg name="phone" default="136" help="Phone test Help"/>
      </group>
      <group name="education">
          <arg name="school" default="beijing" help="school test Help"/>
          <arg name="grade" default="master" help="grade test Help"/>
      </group>
  </configuration>
  ```
  you can define multiple xml configuration files, and if the name is same, the value of the later will cover the previous.

  ```
  from aiharness.configuration import configclass,field

  @configclass
  class Address:
      phone: int = field(139, "phone help")
      home: str = field("beijing", "phone help")


  @configclass
  class Education:
      school: str = field('ustb', "phone help")
      grade: str = field("master", "phone help")


  @configclass
  class Config:
      name: str = field("test", "name help")
      age: str = field(10, "age help")
      address: Address = Address()
      education: Education = Education()
  ```

  ```
  from aiharness.configuration import XmlConfiguration

  config:Config=XmlConfiguration(Config).load(['configuration1.xml','configuration2.xml'])
  ```

  Generally, we use argparse as following:
  ```
  import argparse
  parser = argparse.ArgumentParser()
  parser.add_argument("--name",default='TEST',help='name help')
  parser.add_argument("--age",default=18,help='age help')
  arguments=parser.parse_args()
  ```
  And you can got a arguments object.

  Here give an example showing how to load a xml configuration and set to argparse arguments and to parse the arguments into a object you defined.
  And here the Config Class and 'configuration.xml' are same with those of the Configuration example.

  Firstly, in fact, the Config Class instead of the codes of 'add_argument' of the argparse.ArgumentParser.
  Secondly, you can put the configuration into a xml file so that you can change it conveniently.

  ```
  from aiharness.configuration import  Arguments, XmlConfiguration

  config: Config = XmlConfiguration(Config).load(['configuration.xml'])
  arguments = Arguments(config)
  config: Config = arguments.parse()

  ```


pkgId: 8e517177631ed58001bfbedb0d1807e904b912b488ae06ff6e0044fc281e0311
name: python-ai-integration
arch: src
version: 1.0.16
epoch: 0
release: 1
summary: AI Model Integration for python
url: https://github.com/deepai-org/ai_integration
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-integration-1.0.16-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/ai-integration.svg)](https://badge.fury.io/py/ai-integration)
  AI Model Integration for Python 2.7/3








  ![Diagram showing integration modes](https://yuml.me/diagram/plain;dir:RL/class/[Your%20Model]%20->%20[AI%20Integration],%20[AI%20Integration]<-[Many%20more%20coming!],%20[AI%20Integration]<-[Pickle],%20[AI%20Integration]<-[JSON],%20[AI%20Integration]<-[HTTP%20API],%20[AI%20Integration]<-[Command%20Line].jpg)



  - [Purpose](#purpose)
  - [Built-In Usage Modes](#built-in-usage-modes)
  - [Example Models](#example-models)
  - [How to call the integration library from your code](#how-to-call-the-integration-library-from-your-code)
    * [Simplest Usage Example](#simplest-usage-example)
  - [Docker Container Format Requirements](#docker-container-format-requirements)
  - [Inputs Dicts](#inputs-dicts)
  - [Result Dicts](#result-dicts)
  - [Error Handling](#error-handling)
  - [Inputs Schema](#inputs-schema)
      + [Schema Data Types](#schema-data-types)
      + [Schema Examples](#schema-examples)
          * [Single Image](#single-image)
          * [Multi-Image](#multi-image)
          * [Text](#text)
  - [Creating Usage Modes](#creating-usage-modes)


  There are several built-in modes for testing:

  * Command Line using argparse (command_line)
  * HTTP Web UI / multipart POST API using Flask (http)
  * Pipe inputs dict as JSON (test_inputs_dict_json)
  * Pipe inputs dict as pickle (test_inputs_pickled_dict)
  * Pipe single image for models that take a single input named image (test_single_image)
  * Test single image models with a built-in solid gray image (test_model_integration)


  * [Tensorflow AdaIN Style Transfer](https://github.com/deepai-org/tf-adain-style-transfer)
  * [Sentiment Analysis](https://github.com/deepai-org/sentiment-analysis)
  * [Deep Dream](https://github.com/deepai-org/deepdream)
  * [Open NSFW](https://github.com/deepai-org/open_nsfw)
  * [Super Resolution](https://github.com/deepai-org/tf-super-resolution)
  * [GPT-2 Text Generator](https://github.com/deepai-org/GPT2)
  * [StyleGAN Face Generator](https://github.com/deepai-org/face-generator)
  * [DeOldify Black-and-white Image Colorizer](https://github.com/deepai-org/DeOldify)



  `ai_integration` is a community project developed under the free Apache 2.0 license. We welcome any new modes, integrations, bugfixes, and your ideas.



  (An older version of this library required the user to expose their model as an inference function, but this caused pain in users and is no longer needed.)

  Run a "while True:" loop in your code and call "get_next_input" to get inputs.

  Pass an inputs_schema (see full docs below) to "get_next_input".

  See the specification below for "Inputs Dicts"

  "get_next_input" needs to be called using a "with" block as demonstrated below.

  Then process the data. Format the result or error as described under "Results Dicts"

  Then send the result (or error back) with "send_result".



  This example takes an image and returns a constant string without even looking at the input. It is a very bad AI algorithm for sure!

  ```python
  import ai_integration

  while True:
      with ai_integration.get_next_input(inputs_schema={"image": {"type": "image"}}) as inputs_dict:
          
          result_data = {
              "content-type": 'text/plain',
              "data": "Fake output",
              "success": True
          }
          ai_integration.send_result(result_data)


  ```





  1. Use the ai_integration library

  2. You install this library with pip (or pip3)

  3. ENTRYPOINT is used to set your python code as the entry point into the container.

  4. No command line arguments will be passed to your python entrypoint. (Unless using the command line interface mode)

  5. Do not use argparse in your program as this will conflict with command line mode.

  To test your finished container's integration, run:
      * nvidia-docker run --rm -it -e MODE=test_model_integration YOUR_DOCKER_IMAGE_NAME
      * use docker instead of nvidia-docker if you aren't using NVIDIA...
      * You should see a bunch of happy messages. Any sad messages or exceptions indicate an error.
      * It will try inference a few times. If you don't see this happening, something is not integrated right.




  inputs_dict is a regular python dictionary.

  - Keys are input names (typically image, or style, content)
  - Values are the data itself. Either byte array of JPEG data (for images) or text string.
  - Any model options are also passed here and may be strings or numbers. Best to accept either strings/numbers in your model.





  Content-type, a MIME type, inspired by HTTP, helps to inform the type of the "data" field

  success is a boolean.

  "error" should be the error message if success is False.


  ```python
  {
      'content-type': 'application/json', # or image/jpeg
      'data': "{JSON data or image data as byte buffer}",
      'success': True,
      'error': 'the error message (only if failed)'
  }
  ```



  If there's an error that you can catch:
  - set content-type to text/plain
  - set success to False
  - set data to None
  - set error to the best description of the error (perhaps the output of traceback.format_exc())



  An inputs schema is a simple python dict {} that documents the inputs required by your inference function.

  Not every integration mode looks at the inputs schema - think of it as a hint for telling the mode what data it needs to provide your function.

  All mentioned inputs are assumed required by default.

  The keys are names, the values specify properties of the input.


  - image
  - text
  - Suggest other types to add to the specification!




  By convention, name your input "image" if you accept a single image input
  ```python
  {
      "image": {
          "type": "image"
      }
  }
  ```


  For example, imagine a style transfer model that needs two input images.
  ```python
  {
      "style": {
          "type": "image"
      },
      "content": {
          "type": "image"
      },
  }
  ```


  ```python
  {
      "sentence": {
          "type": "text"
      }
  }
  ```



  A mode is a function that lives in a file in the modes folder of this library.


  To create a new mode:

  1. Add a python file in this folder
  2. Add a python function to your file that takes two args:

      def http(inference_function=None, inputs_schema=None):
  3. Attach a hint to your function
  4. At the end of the file, declare the modes from your file (each python file could export multiple modes), for example:
  ```python
  MODULE_MODES = {
      'http': http
  }

  ```

  Your mode will be called with the inference function and inference schema, the rest is up to you!

  The sky is the limit, you can integrate with pretty much anything.

  See existing modes for examples.


pkgId: e587f8f1725ff06f7ec8aa5825b4e60580d8ceb31cb5853692d6bcea5872ab11
name: python-ai-kernel-explorer
arch: src
version: 0.1.5
epoch: 0
release: 1
summary: Explore the Linux kernel source code with AI-generated summaries
url: https://github.com/mathiscode/ai-kernel-explorer
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-kernel-explorer-0.1.5-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/ai-kernel-explorer?color=blue)](https://pypi.org/project/ai-kernel-explorer/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ai-kernel-explorer)](https://pypi.org/project/ai-kernel-explorer/)
  [![PyPI - License](https://img.shields.io/pypi/l/ai-kernel-explorer?color=blue)](https://pypi.org/project/ai-kernel-explorer/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/ai-kernel-explorer)](https://pypi.org/project/ai-kernel-explorer/)

  Made with ❤️ by [Jay Mathis](https://github.com/mathiscode)



  The Linux kernel is a large and complex codebase, with over 30 million lines of code. Understanding the codebase can be challenging, especially for newcomers. To help developers navigate the codebase more easily, this is a lightweight tool that uses GPT-4o to generate summaries of the Linux kernel source code as you explore.

  ![screenshot](https://raw.githubusercontent.com/mathiscode/ai-kernel-explorer/main/assets/screenshot1.png)



  ```bash
  pip install ai-kernel-explorer # or ideally pipx install ai-kernel-explorer
  ```

  Ensure your OpenAI API key is set in the `OPENAI_API_KEY` environment variable or --api-key option.

  ```text
  usage: ai-kernel-explorer [-h] [--api-key API_KEY] [--cache CACHE] [--model MODEL] [--version] [root]

  Explore the Linux kernel source code with AI-generated summaries.

  positional arguments:
    root               The root directory of the Linux kernel source code. (default: /usr/src)

  options:
    -h, --help         show this help message and exit
    --api-key API_KEY  Your OpenAI API key. (default: $OPENAI_API_KEY)
    --cache CACHE      The path to store AI responses. (default: ~/.cache/ai-kernel-explorer)
    --model MODEL      The OpenAI model to use. (default: gpt-4o)
    --version          show program's version number and exit
  ```

  [https://github.com/mathiscode/ai-kernel-explorer](https://github.com/mathiscode/ai-kernel-explorer)


pkgId: 5a453086de2eb4e3fa4d1b89a3a70ab0c0351e9790b4699efc3a26cde34acde7
name: python-ai-lab-fat
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A package for solving the Travelling Salesman Problem
url: https://github.com/yourusername/ai_lab_fat
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-lab-fat-0.1.0-1.src.rpm
checksum_type: sha256
description:
  A Python package to solve the Travelling Salesman Problem (TSP).



  To install the package, use `pip`:

  ```bash
  pip install ai_lab_fat


pkgId: a5cbfac3c8830889159538f6d46c603bac861ab6df620f43e7077afd59d08220
name: python-ai-logicplum
arch: src
version: 1.2.8
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/ai-logicplum/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-logicplum-1.2.8-1.src.rpm
checksum_type: sha256
description:
  All notable changes to this project will be documented in this file.


  - Released.


  - code optimized.


  - Passing individual params instead of passing as dictionary except training.


  - 1.0.2 fixes.


  - config file changes.


  - 1.0.4 fixes


  - Code Fixes


  - Code Fixes


  - Code Fixes


  - Training module new updates


  - Report module new updates


  - graph module new updates


  - graph module new updates


  - graph module new updates


  - training new updates


  - training new updates


  - graph displaying feature added in plot.


  - Fixes.


  - JWT Authentication implemented


  - Fixes


  - Fixes


  - Newplot blueprint and auto model selection in deployment added .


  - Retrain model feature added.


  - Deployment auto model selection fixes.


  - Removed auto model selection from deployment .


  - Content type changed in deployment.


  - Fixes in deployment.


  - Fixes in deployment.


  - Manual prediction changes.


pkgId: 4676551fd82ce57f0bf0a5d0e09fc57db70535da4a5a791da07a44eeed05e452
name: python-ai-logstash
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: A versatile logging package with async support
url: https://pypi.org/project/ai-logstash/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-logstash-0.7.0-1.src.rpm
checksum_type: sha256
description:
  A versatile logging package that supports both synchronous and asynchronous logging in Python, with Logstash integration for centralized log management and monitoring.



  - Supports both synchronous and asynchronous logging
  - Integrates seamlessly with Logstash
  - Masks sensitive information automatically
  - Provides decorators for automatic exception logging
  - Includes environment variables and local variables in logs
  - Compatible with various Python applications, including FastAPI and Aiogram





  ```
  [packages]
  pipenv install ai_logstash
  ```



  ```bash
  pip install ai_logstash
  ```





  ```python
  from ai_logstash import SyncAiLogger, sync_log_exception

  logger = SyncAiLogger(
      'my-service',
      project_name="work_wallet",
      masked_variables_names=["PRIVATE", "password", "api_key"],
      logstash_host="logstash.example.com",
      logstash_port=5000,
      container_tag="1.0",
      environment="production"
  )

  @sync_log_exception(logger)
  def my_function():
      logger.info("Starting my_function")
      
  ```



  ```python
  from ai_logstash import AsyncAiLogger, create_async_error_handler

  logger = AsyncAiLogger(
      'my-async-service',
      project_name="work_wallet",
      masked_variables_names=["PRIVATE", "password", "api_key"],
      logstash_host="logstash.example.com",
      logstash_port=5000,
      container_tag="1.0",
      environment="production"
  )

  errors_handler = create_async_error_handler(logger)

  @errors_handler
  async def my_async_function():
      await logger.info("Starting my_async_function")
      
  ```



  - `service_name`: Name of your service
  - `project_name`: Name of your project (work_wallet, payout_bot, etc.)
  - `masked_variables_names`: List of sensitive variable names to be masked
  - `logstash_host`: Hostname of your Logstash server
  - `logstash_port`: Port of your Logstash server
  - `container_tag`: Tag for container version
  - `environment`: Deployment environment (e.g., "production", "development")
  - `log_level`: Logging level (default: "INFO")



  - Centralized logging with Logstash integration
  - Automatic masking of sensitive information
  - Easy integration with various Python frameworks
  - Supports both synchronous and asynchronous applications
  - Includes detailed error information and environment variables


pkgId: a5187dd30b74298b892bc860e848fc80eed6c37071d69521d38d3c21ae586647
name: python-ai-management
arch: src
version: 1.0.40
epoch: 0
release: 1
summary: This is a toolbox to help AI & ML teams to have a better management of their metrics.
url: https://github.com/adeo/aim
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-management-1.0.40-1.src.rpm
checksum_type: sha256
description:
  > This is a toolbox to help AI & ML teams to have a better management of their metrics and processes.

  Our desire is to enable the company with data related to AI solution, in a easy way to read and use. Some new goals are going to be included later

  [Confluence Documentation Link]()

  [Tangram Link](https://tangram.adeo.com/products/1d6f6abb-63ba-4663-bd1e-18007bffde36/overview)



  - [Project Structure](#project-structure)
  - [Features](#features)
  - [Installation/Usage](#Installation/Usage)
  - [Contact](#Contact)



  Describe the structure of the `project` folder, including the organization of modules, directories, and any important files.

  ```
  ai_management/
  ├── __init__.py
  ├── model_evaluation.py
  ├── config.yaml
  ```

  Explain the purpose of each module or significant files.



  Historize the technical model evaluation results at a Google Big Query table at a Google Cloud Platform project.


  ```python
  pip install ai-management
  ```




  ```python
  y_true = [1, 0, 0, 1, 1]
  y_pred = [1, 0, 0, 0, 1]

  y_test_a_lst = y_true
  y_pred_a_lst = y_pred

  y_test_a_arr = np.array(y_true)
  y_pred_a_arr = np.array(y_pred)
  ```


  ```python
  y_true = [0, 1, 2, 1, 2]
  y_pred = [[0.9, 0.1, 0.0], [0.3, 0.2, 0.5], [0.2, 0.3, 0.5], [0.1, 0.8, 0.1], [0.1, 0.2, 0.7]]

  y_test_b_lst = y_true
  y_pred_b_lst = y_pred

  y_test_b_arr = np.array(y_true)
  y_pred_b_arr = np.array(y_pred)
  ```


  ```python
  y_test = [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
  y_pred = [[0, 1, 2], [3, 4, 5], [6, 7, 9]]

  y_test_c_lst = y_test
  y_pred_c_lst = y_pred

  y_test_c_arr = np.array(y_true)
  y_pred_c_arr = np.array(y_pred)
  ```

  ```python
  y_true = [2.5, 3.0, 4.0, 5.5, 6.0]
  y_pred = [2.0, 3.5, 3.8, 5.0, 6.5]

  y_test_d_lst = y_true
  y_pred_d_lst = y_pred

  y_test_d_arr = np.array(y_true)
  y_pred_d_arr = np.array(y_pred)
  ```


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


  df_assossiation = pd.DataFrame({
      'ID_PRNCPAL': np.random.randint(1, 50000, size=103846),
      'CONFIDENCE': np.random.uniform(0.01, 0.03, size=103846)
  })

  df_assossiation.sort_values('ID_PRNCPAL')
  ```




  ```python
  import ai_management as aim
  client_bq = bigquery.Client(project='project')
  me = aim.ModelEvaluation(
      client_bq=client_bq,
      destination='project.dataset.table'
  )


  me.historize_model_evaluation(
      soltn_nm = 'Solution X',
      lst_mdls = [
          {
              'mdl_nm' : 'Model A',
              'algrthm_typ' : 'binary_classification',
              'data' : [y_test_a_lst, y_pred_a_lst]},
          {
              'mdl_nm' : 'Model B',
              'algrthm_typ' : 'multi_class_classification',
              'data' : [y_test_b_lst, y_pred_b_lst]},
          {
              'mdl_nm' : 'Model C',
              'algrthm_typ' : 'multi_label_classification',
              'data' : [y_test_c_lst, y_pred_c_lst]},
          {
              'mdl_nm' : 'Model D',
              'algrthm_typ' : 'assossiation',
              'data' : ['confidence', df_assossiation]},
      ]
  )


  me.historize_custom_metric(
      soltn_nm = "Solution Y",
      lst_mdls = [
          {
              'mdl_nm': 'Model E',
              'algrthm_typ': 'regression',
              'data': [
                  ["Lin's Concordance Correlation Coefficient", 0.85, None],
                  ["Huber's error", 123, {"delta": 0.75}],
              ]
          },
      ]
  )
  ```



  * Leroy Merlin Brazil AI scientists and developers: chapter_inteligencia_artificia@leroymerlin.com.br


pkgId: c0d44a96cf0f2b37702c27dad563b32787f3a79146f1d8b64c412f2d05e56af1
name: python-ai-microcore
arch: src
version: 3.10.4
epoch: 0
release: 1
summary: # Minimalistic Foundation for AI Applications
url: https://pypi.org/project/ai-microcore/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-microcore-3.10.4-1.src.rpm
checksum_type: sha256
description:
  <p align="right">
      <a href="https://github.com/Nayjest/ai-microcore/releases" target="_blank"><img src="https://img.shields.io/github/release/ai-microcore/microcore" alt="Release Notes"></a>
      <a href="https://app.codacy.com/gh/Nayjest/ai-microcore/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade" target="_blank"><img src="https://app.codacy.com/project/badge/Grade/441d03416bc048828c649129530dcbc3" alt="Code Quality"></a>
      <a href="https://github.com/Nayjest/ai-microcore/actions/workflows/pylint.yml" target="_blank"><img src="https://github.com/Nayjest/ai-microcore/actions/workflows/pylint.yml/badge.svg" alt="Pylint"></a>
      <a href="https://github.com/Nayjest/ai-microcore/actions/workflows/tests.yml" target="_blank"><img src="https://github.com/Nayjest/ai-microcore/actions/workflows/tests.yml/badge.svg" alt="Tests"></a>
      <a href="https://github.com/Nayjest/ai-microcore/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/static/v1?label=license&message=MIT&color=d08aff" alt="License"></a>
  </p>




  **MicroCore** is a collection of python adapters for Large Language Models
  and Semantic Search APIs allowing to
  communicate with these services in a convenient way, make them easily switchable
  and separate business logic from the implementation details.

  It defines interfaces for features typically used in AI applications,
  which allows you to keep your application as simple as possible and try various models & services
  without need to change your application code.

  You even can switch between text completion and chat completion models only using configuration.

  The basic example of usage is as follows:

  ```python
  from microcore import llm

  while user_msg := input('Enter message: '):
      print('AI: ' + llm(user_msg))
  ```



   -   [API Reference](https://ai-microcore.github.io/api-reference/)
   -   [PyPi Package](https://pypi.org/project/ai-microcore/)
   -   [GitHub Repository](https://github.com/Nayjest/ai-microcore)




  Install as PyPi package:
  ```
  pip install ai-microcore
  ```

  Alternatively, you may just copy `microcore` folder to your project sources root.
  ```bash
  git clone git@github.com:Nayjest/ai-microcore.git && mv ai-microcore/microcore ./ && rm -rf ai-microcore
  ```




  Python 3.10 / 3.11 / 3.12

  Both v0.28+ and v1.X OpenAI package versions are supported.






  Having `OPENAI_API_KEY` in OS environment variables is enough for basic usage.

  Similarity search features will work out of the box if you have the `chromadb` pip package installed.



  There are a few options available for configuring microcore:

  -   Use `microcore.configure(**params)`
      <br>💡 <small>All configuration options should be available in IDE autocompletion tooltips</small>
  -   Create a `.env` file in your project root; examples: [basic.env](https://github.com/Nayjest/ai-microcore/blob/main/.env.example), [Mistral Large.env](https://github.com/Nayjest/ai-microcore/blob/main/.env.mistral.example), [Anthropic Claude 3 Opus.env](https://github.com/Nayjest/ai-microcore/blob/main/.env.anthropic.example), [Gemini on Vertex AI.env](https://github.com/Nayjest/ai-microcore/blob/main/.env.google-vertex-gemini.example), [Gemini on AI Studio.env](https://github.com/Nayjest/ai-microcore/blob/main/.env.gemini.example)
  -   Use a custom configuration file: `mc.configure(DOT_ENV_FILE='dev-config.ini')`
  -   Define OS environment variables

  For the full list of available configuration options, you may also check [`microcore/config.py`](https://github.com/Nayjest/ai-microcore/blob/main/microcore/config.py).


  For the models working not via OpenAI API, you may need to install additional packages:

  ```bash
  pip install anthropic
  ```

  ```bash
  pip install google-generativeai
  ```

  ```bash
  pip install vertexai
  ```
  📌Additonaly for working through [Vertex AI](https://cloud.google.com/vertex-ai) you need to
  [install the Google Cloud CLI](https://cloud.google.com/sdk/docs/install)
  and [configure the authorization](https://cloud.google.com/sdk/docs/authorizing).



  You will need to install transformers and deep learning library of your choice (PyTorch, TensorFlow, Flax, etc).

  See [transformers installation](https://huggingface.co/docs/transformers/installation).



  1.  Configuration options passed as arguments to `microcore.configure()` have the highest priority.
  2.  The priority of configuration file options (`.env` by default or the value of `DOT_ENV_FILE`) is higher than OS environment variables.
      <br>💡 <small>Setting `USE_DOT_ENV` to `false` disables reading configuration files.</small>
  3.  OS environment variables have the lowest priority.






  Performs a request to a large language model (LLM).

  Asynchronous variant: `allm(prompt: str, **kwargs)`

  ```python
  from microcore import *


  use_logging()


  ai_response = llm('What is your model name?')




  llm(['1+2', '='])
  llm('1+2=', model='gpt-4')


  llm(dict(role='system', content='1+2='))

  llm(SysMsg('1+2='))


  assert '7' == llm([
   SysMsg('You are a calculator'),
   UserMsg('1+2='),
   AssistantMsg('3'),
   UserMsg('3+4=')]
  ).strip()


  for i in llm('1+2=?', n=3, temperature=2).choices:
      print('RESPONSE:', i.message.content)


  llm('Hi there', callback=lambda x: print(x, end=''))


  output = []
  llm('Hi there', callbacks=[
      lambda x: print(x, end=''),
      lambda x: output.append(x),
  ])
  ```


  Renders prompt template with params.

  Full-featured Jinja2 templates are used by default.

  Related configuration options:

  ```python
  from microcore import configure
  configure(
      
      PROMPT_TEMPLATES_PATH = 'my_templates_folder'
  )
  ```


  Similarity search


  Find most similar text


  Return collection of texts


  Store text and related metadata in embeddings database


  Store multiple texts and related metadata in the embeddings database


  Clear collection



  LLM Microcore supports all models & API providers having OpenAI API.



  | API Provider                                                                             |                                                                                                                                      Models |
  |------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------:|
  | [OpenAI](https://openai.com)                                                             |                                    All GPT-4 and GTP-3.5-Turbo models<br/>all text completion models (davinci, gpt-3.5-turbo-instruct, etc) |
  | [Microsoft Azure](https://azure.microsoft.com/en-us/products/ai-services/openai-service) |                                                                                                            All OpenAI models, Mistral Large |
  | [Anthropic](https://anthropic.com)                                                       |                                                                                                                             Claude 3 models |
  | [MistralAI](https://mistral.ai)                                                          |                                                                                                                          All Mistral models |
  | [Google AI Studio](https://aistudio.google.com/)                             |                                                                                                                        Google Gemini models |
  | [Google Vertex AI](https://cloud.google.com/vertex-ai?hl=en)                             |                                                   Gemini Pro & [other models](https://cloud.google.com/vertex-ai/docs/start/explore-models) |
  | [Deep Infra](https://deepinfra.com)                                                      | deepinfra/airoboros-70b<br/>jondurbin/airoboros-l2-70b-gpt4-1.4.1<br/>meta-llama/Llama-2-70b-chat-hf<br/>and other models having OpenAI API |
  | [Anyscale](https://anyscale.com)                                                         |                                           meta-llama/Llama-2-70b-chat-hf<br/>meta-llama/Llama-2-13b-chat-hf<br/>meta-llama/Llama-7b-chat-hf |
  | [Groq](https://groq.com/)                                                         |                                           LLaMA2 70b<br>Mixtral 8x7b<br>Gemma 7b |
  | [Fireworks](fireworks.ai)                                                         |                                           [Over 50 open-source language models](https://fireworks.ai/models?show=All) |


  - HuggingFace [Transformers](https://huggingface.co/docs/transformers/index) (see configuration examples [here](https://github.com/Nayjest/ai-microcore/blob/main/tests/local/test_transformers.py)).
  - Custom local models by providing own function for chat / text completion, sync / async inference.




  Performs code review by LLM for changes in git .patch files in any programming languages.


  Determine the number of petals and the color of the flower from a photo (gpt-4-turbo)


  Benchmark accuracy of 20+ state of the art models on solving olympiad math problems. Inferencing local language models via HuggingFace Transformers, parallel inference.





  @TODO


  **This is experimental feature.**

  Tweaks the Python import system to provide automatic setup of MicroCore environment
  based on metadata in module docstrings.

  ```python
  import microcore.ai_modules
  ```


  *   Automatically registers template folders of AI modules in Jinja2 environment




  Please see [CONTRIBUTING](https://github.com/Nayjest/ai-microcore/blob/main/CONTRIBUTING.md) for details.




  Licensed under the [MIT License](https://github.com/Nayjest/ai-microcore/blob/main/LICENSE)
  © 2023 [Vitalii Stepanenko](mailto:mail@vitaliy.in)


pkgId: 9debdb3e5c8d8c9f83b6cb92e8aae52dd362bd635bc3cf537239e182493f0b36
name: python-ai-mock
arch: src
version: 0.2.5
epoch: 0
release: 1
summary: Mock clients for your favorite LLM APIs
url: https://pypi.org/project/ai-mock/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-mock-0.2.5-1.src.rpm
checksum_type: sha256
description:
  ***False LLM endpoints for testing***

  MockAI provides a local server that interops with multiple LLM SDKs, so you can call these APIs as normal but receive mock or pre-determined responses at no cost!

  The package currently provides full support for OpenAI and Anthropic. It patches these libraries directly under the hood, so it will always be up to date.



  ```bash

  pip install ai-mock


  poetry add ai-mock


  uv add ai-mock
  ```




  This is the server that the mock clients will communicate with, we'll see later how we can configure our own pre-determined responses :).

  ```bash

  $ mockai
  ```


  To use a mock version of these providers, you only have to change a single line of code (and just barely!):

  ```diff
  - from openai import OpenAI         # Real Client
  + from mockai.openai import OpenAI  # Fake Client
  ```
  ```python

  client = OpenAI()

  response = client.chat.completions.create(
          model="gpt-5",  # Model can be whatever you want
          messages=[
              {
                  "role": "user",
                  "content": "Hi Mock!"
              }
          ],
          
          temperate = 0.7,
          top_k = 0.95
      )

  print(response.choices[0].message.content)




  ```
  Alternatively, you can use the real SDK and set the base url to the MockAI server address

  ```python
  from openai import OpenAI         # Real Client


  client = OpenAI(api_key="not used but required", base_url="http://localhost:8100/openai")

  response = client.chat.completions.create(
          model="gpt-5",
          messages=[
              {
                  "role": "user",
                  "content": "Hi Mock!"
              }
          ],
          temperate = 0.7,
          top_k = 0.95
      )

  print(response.choices[0].message.content)

  ```

  MockAI also provides clients for Anthropic:

  ```python

  from mockai.anthropic import Anthropic

  client = Anthropic()

  response = client.messages.create(
          model="claude-3.5-opus",
          messages=[{"role": "user", "content": "What's up!"}],
          max_tokens=1024
      )

  print(response.content)

  ```
  And of course the async versions of all clients are supported:
  ```python
  from mockai.openai import AsyncOpenAI
  from mockai.anthropic import AsyncAnthropic
  ```
  Streaming is supported as well:
  ```python
  from mockai.openai import OpenAI

  client = OpenAI()

  response = client.chat.completions.create(
          model="gpt-5",
          messages=[{"role": "user", "content": "Hi mock!"}],
          stream = True
      )


  for chunk in response:
      if chunk.choices:
          if chunk.choices[0].delta.content:
              print(chunk.choices[0].delta.content)








  ```

  To learn more about the usage of each client, you can look at the docs of the respective provider, the mock clients are the exact same!


  All mock clients also work with tool calling! To trigger a tool call, you must specify it in a pre-determined response.

  ```python
  from mockai.openai import OpenAI

  client = OpenAI()

  response = client.chat.completions.create(
          model="gpt-5",
          messages=[{"role": "user", "content": "Function!"}],
      )

  print(response.choices[0].message.tool_calls[0].function.name)

  print(response.choices[0].message.tool_calls[0].function.arguments)

  ```


  The MockAI server takes an optional path to a JSON file were we can establish our responses for both completions and tool calls. The structure of the json is simple: Each object must have a "type" key of value "text" or "function", an input key with a value, which is what will be matched against, and an output key, which is what will be returned if the input key matches the user input.

  ```json
  // mock_responses.json
  [
    {
      "type": "text",
      "input": "How are ya?",
      "output": "I'm fine, thank u 😊. How about you?"
    },
    {
      "type": "function",
      "input": "Where's my order?",
      "output": {
        "name": "get_delivery_date",
        "arguments": {
          "order_id": "1337"
        }
      }
    }
  ]
  ```
  When creating your .json file, please follow these rules:

  1. Each response must have a `type` key, whose value must be either `text` or `function`, this will determine the response object of the client.
  2. Responses of type `text` must have a `output` key with a string value.
  3. Responses of type `function` must have a `name` key with the name of the function, and a `arguments` key with a dict of args and values (Example: {"weather": "42 degrees Fahrenheit"}).
  4. Responses of type `function` can accept a list of objects, to simulate parallel tool calls.


  To create a MockAI server with our json file, we just need to pass it to the mockai command.
  ```bash
  $ mockai mock_responses.json


  $ mockai ~/home/foo/bar/mock_responses.json
  ```

  With this, our mock clients will have access to our pre-determined responses!

  ```python
  from mockai.openai import OpenAI

  client = OpenAI()

  response = client.chat.completions.create(
          model="gpt-5",
          messages=[{"role": "user", "content": "How are ya?"}],
      )

  print(response.choices[0].message.content)


  response = client.chat.completions.create(
          model="gpt-5",
          messages=[{"role": "user", "content": "Where's my order?"}],
      )

  print(response.choices[0].message.tool_calls[0].function.name)


  print(response.choices[0].message.tool_calls[0].function.arguments)

  ```


pkgId: 656301bafdaf7baa662b6b8dff514b914071b574122e285efc500b0e77dc8647
name: python-ai-models-gfs
arch: src
version: 0.0.10
epoch: 0
release: 1
summary: A package to run AI weather models with GFS initial conditions.
url: https://github.com/jacob-radford/ai-models-gfs/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ai-models-gfs-0.0.10-1.src.rpm
checksum_type: sha256
description:
  This package is based on ECMWF's ai-models package, adding options to retrieve GFS and GDAS data and to output to netCDF files. The `ai-models` command is used to run AI-based weather forecasting models. These models need to be installed independently.



  Although the source code `ai-models-gfs` and `ai-models` and its plugins are available under open sources licences, some model weights may be available under a different licence. For example some models make their weights available under the CC-BY-NC-SA 4.0 license, which does not allow commercial use. For more informations, please check the license associated with each model on their main home page, that we link from each of the corresponding plugins.



  Before using the `ai-models-gfs` command, ensure you have the following prerequisites:

  - Python 3.10 (it may work with different versions, but it has been tested with 3.10 on Linux/MacOS).
  - An ECMWF and/or CDS account for accessing ECMWF input data (see below for more details).
  - A GPU for optimal performance (strongly recommended).



  To install the `ai-models-gfs` command, run the following command:

  ```bash
  pip install ai-models-gfs
  ```



  Currently, three models can be installed (deprecating FourCastNet v1):

  ```bash
  pip install ai-models-panguweather-gfs
  pip install ai-models-graphcast-gfs  # Install details at https://github.com/jacob-radford/ai-models-graphcast-gfs
  pip install ai-models-fourcastnetv2-gfs
  ```

  See [ai-models-panguweather-gfs](https://github.com/jacob-radford/ai-models-panguweather-gfs), [ai-models-fourcastnetv2-gfs](https://github.com/jacob-radford/ai-models-fourcastnetv2-gfs) and [ai-models-graphcast-gfs](https://github.com/jacob-radford/ai-models-graphcast-gfs) for more details about these models.



  To run model, make sure it has been installed, then simply run:

  ```bash
  ai-models-gfs <model-name>
  ```

  Replace `<model-name>` with the name of the specific AI model you want to run.

  By default, the model will be run for a 10-day lead time (240 hours), using yesterday's 12Z analysis from ECMWF's MARS archive.

  To produce a 15 days forecast, use the `--lead-time HOURS` option:

  ```bash
  ai-models-gfs --lead-time 360 <model-name>
  ```

  You can change the other defaults using the available command line options, as described below.



  The AI models can run on a CPU; however, they perform significantly better on a GPU. A 10-day forecast can take several hours on a CPU but only around one minute on a modern GPU.

  :warning: **We strongly recommend running these models on a computer equipped with a GPU for optimal performance.**

  It you see the following message when running a model, it means that the ONNX runtime was not able to find a the CUDA libraries on your system:
  > [W:onnxruntime:Default, onnxruntime_pybind_state.cc:541 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference <https://onnxruntime.ai/docs/reference/execution-providers/CUDA-ExecutionProvider.html#requirements> to ensure all dependencies are met.

  To fix this issue, we suggest that you install `ai-models-gfs` in a [conda](https://docs.conda.io/en/latest/) environment and install the CUDA libraries in that environment. For example:

  ```bash
  conda create -n ai-models-gfs python=3.10
  conda activate ai-models-gfs
  conda install cudatoolkit
  pip install ai-models-gfs
  ...
  ```



  The AI models rely on weights and other assets created during training. The first time you run a model, you will need to download the trained weights and any additional required assets.

  To download the assets before running a model, use the following command:

  ```bash
  ai-models-gfs --download-assets <model-name>
  ```

  The assets will be downloaded if needed and stored in the current directory. You can provide a different directory to store the assets:

  ```bash
  ai-models-gfs --download-assets --assets <some-directory> <model-name>
  ```

  Then, later on, simply use:

  ```bash
  ai-models-gfs --assets <some-directory>  <model-name>
  ```

  or

  ```bash
  export AI_MODELS_ASSETS=<some-directory>
  ai-models-gfs <model-name>
  ```

  For better organisation of the assets directory, you can use the `--assets-sub-directory` option. This option will store the assets of each model in its own subdirectory within the specified assets directory.



  The models require input data (initial conditions) to run. You can provide the input data using different sources, as described below:



  By default, `ai-models-gfs`  use yesterday's 12Z analysis from ECMWF, fetched from the Centre's MARS archive using the [ECMWF WebAPI](https://www.ecmwf.int/en/computing/software/ecmwf-web-api). You will need an ECMWF account to access that service.

  To change the date or time, use the `--date` and `--time` options, respectively:

  ```bash
  ai-models-gfs --date YYYYMMDD --time HHMM <model-name>
  ```



  You can start the models using ERA5 (ECMWF Reanalysis version 5) data for the [Copernicus Climate Data Store (CDS)](https://cds.climate.copernicus.eu/). You will need to create an account on the CDS. The data will be downloaded using the [CDS API](https://cds.climate.copernicus.eu/api-how-to).

  To access the CDS, simply add `--input cds` on the command line. Please note that ERA5 data is added to the CDS with a delay, so you will also have to provide a date with `--date YYYYMMDD`.

  ```bash
  ai-models-gfs --input cds --date 20230110 --time 0000 <model-name>
  ```



  If you have input data in the GRIB format, you can provide the file using the `--file` option:

  ```bash
  ai-models-gfs --file <some-grib-file> <model-name>
  ```

  The GRIB file can contain more fields than the ones required by the model. The `ai-models-gfs` command will automatically select the necessary fields from the file.

  To find out the list of fields needed by a specific model as initial conditions, use the following command:

  ```bash
   ai-models-gfs --fields <model-name>
   ```



  By default, the model output will be written in GRIB format in a file called `<model-name>.grib`. You can change the file name with the option `--path <file-name>`. If the path you specify contains placeholders between `{` and `}`, multiple files will be created based on the [eccodes](https://confluence.ecmwf.int/display/ECC) keys. For example:

  ```bash
   ai-models-gfs --path 'out-{step}.grib' <model-name>
   ```

  This command will create a file for each forecasted time step.

  If you want to disable writing the output to a file, use the `--output none` option.



  It has the following options:

  - `--help`: Displays this help message.
  - `--models`: Lists all installed models.
  - `--debug`: Turns on debug mode. This will print additional information to the console.



  - `--input INPUT`: The input source for the model. This can be a `mars`, `cds`, `gfs`, `gdas`, or `file`.
  - `--file FILE`: The specific file to use as input. This option will set `--source` to `file`.

  - `--date DATE`: The analysis date for the model. This defaults to yesterday.
  - `--time TIME`: The analysis time for the model. This defaults to 1200.



  - `--output OUTPUT`: The output destination for the model. Values are `file` or `none`.
  - `--path PATH`: The path to write the output of the model.
  - `--nc_or_grib`: Whether to output as grib or netCDF. Values are `g`, `n`, or `gn`.



  - `--lead-time HOURS`: The number of hours to forecast. The default is 240 (10 days).



  - `--assets ASSETS`: Specifies the path to the directory containing the model assets. The default is the current directory, but you can override it by setting the `$AI_MODELS_ASSETS` environment variable.
  - `--assets-sub-directory`: Enables organising assets in `<assets-directory>/<model-name>` subdirectories.
  - `--download-assets`: Downloads the assets if they do not exist.



  - `--fields`: Print the list of fields needed by a model as initial conditions.
  - `--expver EXPVER`: The experiment version of the model output.
  - `--class CLASS`: The 'class' metadata of the model output.
  - `--metadata KEY=VALUE`: Additional metadata metadata in the model output

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


