# packages

pkgId: 5ca91002e5811de8bc70a7daf9834e5b3e80072273b2933db7fb76d88ef70a0e
name: python-calendly-fetcher
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: A package to fetch availability data from Calendly
url: https://github.com/malekinho8/calendly-fetcher.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calendly-fetcher-0.1.2-1.src.rpm
checksum_type: sha256
description:
  A code base using the Calendly API that fetches your calendar data and converts it into readable text format.



  Use PyPI to install the package:

  ```bash
  pip install calendly-fetcher
  ```

  Set the `CALENDLY_API_KEY` environment variable to your Calendly API key. You can get it from [here](https://calendly.com/integrations).

  ```bash
  export CALENDLY_API_KEY="your-api-key"
  ```

  Check that your API key is set correctly (you should see your API key printed):

  ```bash
  echo $CALENDLY_API_KEY
  ```

  Then, you can use the package in Python as follows:

  ```python
  import os
  from calendly_fetcher.calendly_fetcher import get_calendly_availability


  api_key = os.environ.get("CALENDLY_API_KEY")
  ```



  ```python
  import os
  import pytz
  from datetime import datetime, timedelta
  from calendly_fetcher.calendly_fetcher import get_calendly_availability, convert_basic_date_to_datetime


  api_key = os.environ.get("CALENDLY_API_KEY")


  start_date = "09-01-2021"
  end_date = "09-30-2021"


  start_date = convert_basic_date_to_datetime(start_date)
  end_date = convert_basic_date_to_datetime(end_date)


  my_timezone = "America/New_York"


  availability = get_calendly_availability(api_key, start_date, end_date)


  for slot in availability:
      if '30min' in slot['scheduling_url']:
          duration = 30
          slot['end_time'] = datetime.strptime(slot['start_time'], "%Y-%m-%dT%H:%M:%SZ") + timedelta(minutes=duration)
          
          utc_start_time = datetime.strptime(slot['start_time'], '%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=pytz.utc)
          local_start_time = utc_start_time.astimezone(pytz.timezone(my_timezone))
          utc_end_time = slot['end_time'].replace(tzinfo=pytz.utc)
          local_end_time = utc_end_time.astimezone(pytz.timezone(my_timezone))
          print(f"Available: {local_start_time} - {local_end_time}")
  ```


pkgId: 85e2764199c0f444dc3651ca9004043039ce46d88c52780f0e6485f04a8ab85f
name: python-calendra
arch: src
version: 7.9.1
epoch: 0
release: 1
summary: Worldwide holidays and working days helper and toolkit.
url: https://pypi.org/project/calendra/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calendra-7.9.1-1.src.rpm
checksum_type: sha256
description:
  [![](https://img.shields.io/pypi/v/calendra.svg)](https://pypi.org/project/calendra)

  ![](https://img.shields.io/pypi/pyversions/calendra.svg)

  [![tests](https://github.com/jaraco/calendra/actions/workflows/main.yml/badge.svg)](https://github.com/jaraco/calendra/actions?query=workflow%3A%22tests%22)

  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

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

  [![](https://img.shields.io/badge/skeleton-2024-informational)](https://blog.jaraco.com/skeleton)




  Calendra is a Python module that offers classes able to handle calendars, list legal / religious holidays and gives working-day-related computation functions.



  Calendra is a fork of [Workalendar](https://github.com/workalendar/workalendar)
  designed to be more extensible and introspectable, adding interfaces where
  [Workalendar is philosophically opposed for the sake of simplicity](https://github.com/workalendar/workalendar/pull/79).

  What can Calendra do that Workalendar cannot?

  - Provides descriptions for holidays for the "day indicated" for each
    Holiday (such as '3rd Monday in August').
  - Keeps distinct the indicated and observed dates for Holidays, such
    that it's possible to determine on what day a given holiday is observed.
  - Allows the number of Holidays in a calendar year to be counted.
  - Consolidates observance logic in the core code rather than requiring
    each calendar implementation to implement its own.



  The project is stable and in production use. Calendra follows the principles of [semver](https://semver.org) for released verisons.

  If you spot any bug or wish to add a calendar, please refer to the [Contributing doc](https://peopledoc.github.io/workalendar/contributing.html).



  ```python-repl
  >>> from datetime import date
  >>> from calendra.europe import France
  >>> cal = France()
  >>> cal.holidays(2012)
  [(datetime.date(2012, 1, 1), 'New year'),
   (datetime.date(2012, 4, 9), 'Easter Monday'),
   (datetime.date(2012, 5, 1), 'Labour Day'),
   (datetime.date(2012, 5, 8), 'Victory in Europe Day'),
   (datetime.date(2012, 5, 17), 'Ascension Day'),
   (datetime.date(2012, 5, 28), 'Whit Monday'),
   (datetime.date(2012, 7, 14), 'Bastille Day'),
   (datetime.date(2012, 8, 15), 'Assumption of Mary to Heaven'),
   (datetime.date(2012, 11, 1), "All Saints' Day"),
   (datetime.date(2012, 11, 11), 'Armistice Day'),
   (datetime.date(2012, 12, 25), 'Christmas')]
  >>> cal.is_working_day(date(2012, 12, 25))  # it's Christmas
  False
  >>> cal.is_working_day(date(2012, 12, 30))  # it's Sunday
  False
  >>> cal.is_working_day(date(2012, 12, 26))
  True
  >>> cal.add_working_days(date(2012, 12, 23), 5)  # 5 working days after Xmas
  datetime.date(2012, 12, 31)
  ```

  For a more complete documentation and advanced usage, go to [the official workalendar documentation](https://workalendar.github.io/workalendar).



  Calendra has been tested on the Python versions declared in setup.cfg.



  To run test, just install tox with `pip install tox` and run `tox`
  from the command line.






  - Austria
  - Belarus
  - Belgium
  - Bulgaria
  - Cayman Islands
  - Croatia
  - Cyprus
  - Czech Republic
  - Denmark
  - Estonia
  - European Central Bank
  - Finland
  - France
  - France (Alsace / Moselle)
  - Georgia
  - Germany
  - Greece
  - Guernsey
  - Hungary
  - Iceland
  - Ireland
  - Italy
  - Latvia
  - Lithuania
  - Luxembourg
  - Malta
  - Monaco
  - Netherlands (optionally with school holidays and carnival)
  - Norway
  - Poland
  - Portugal
  - Romania
  - Russia
  - Serbia
  - Slovakia
  - Slovenia
  - Spain (Andalusia, Aragon, Castile and León, Castilla-La Mancha, Canary Islands, Extremadura, Galicia, Balearic Islands, La Rioja, Community of Madrid, Murcia, Navarre, Asturias, Basque Country, Cantabria, Valencian Community)
  - Sweden
  - Switzerland (Aargau, Appenzell Innerrhoden, Appenzell Ausserrhoden, Bern, Basel-Landschaft, Basel-Stadt, Fribourg, Geneva, Glarus, Graubünden, Jura, Luzern, Neuchâtel, Nidwalden, Obwalden, St. Gallen, Schaffhausen, Solothurn, Schwyz, Thurgau, Ticino, Uri, Vaud, Valais, Zug, Zurich)
  - Turkey
  - Ukraine
  - United Kingdom (incl. Northern Ireland, Scotland and all its territories)



  - Argentina
  - Barbados
  - Brazil (all states, cities and for bank transactions, except the city of Viana)
  - Canada (including provincial and territory holidays)
  - Chile
  - Colombia
  - El Salvador
  - Mexico
  - Panama
  - Paraguay
  - United States of America
    - State holidays for all the 50 States
    - American Samoa
    - Chicago, Illinois
    - Guam
    - Suffolk County, Massachusetts
    - California Education, Berkeley, San Francisco, West Hollywood
    - Florida Legal and Florida Circuit Courts, Miami-Dade
    - Federal Reserve System



  - China
  - Hong Kong
  - Israel
  - Japan
  - JapanBank
  - Kazakhstan
  - Malaysia
  - Philippines
  - Qatar
  - Singapore
  - South Korea
  - Taiwan



  - Australia (incl. its different states)
  - Marshall Islands
  - New Zealand



  - Algeria
  - Angola
  - Benin
  - Ivory Coast
  - Kenya
  - Madagascar
  - Mozambique
  - Nigeria
  - São Tomé
  - South Africa
  - Tunisia

  And more to come (I hope!)



  Please take note that some calendars are not 100% accurate. The most common example is the Islamic calendar, where some computed holidays are not exactly on the same official day decided by religious authorities, and this may vary country by country. Whenever it's possible, try to adjust your results with the official data provided by the adequate authorities.

  Some countries have some holidays based on ephemerids and equinoxes. Those are computed for the previous and next 30 years to prevent big computations and dependencies.



  Please read our [contributing.md](https://github.com/workalendar/workalendar/blob/master/docs/contributing.md) document to discover how you can contribute to `workalendar`. Pull-requests are very welcome.



  This project was born in 2013, as an answer to the question "how do we calculate *this date + 5 working days*?". It was a use-case for [PeopleDoc](https://www.people-doc.fr/), in their ticketing application, for calculating SLAs. And it began as a small open-source library, for France and the USA at first.

  Thanks to PeopleDoc, this project grew and eventually became a world-wide library, with the help of dozens of contributors.

  As of June 2021, this project has moved to its own organization.



  This library is published under the terms of the MIT License. Please check the LICENSE file for more details.


pkgId: 25c4bd815a52c40efbbe8b270c3b07b0e5730a5977e940fa20a0786afa9cd65f
name: python-calflops
arch: src
version: 0.3.2
epoch: 0
release: 1
url: https://github.com/MrYxJ/calculate-flops.pytorch
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calflops-0.3.2-1.src.rpm
checksum_type: sha256
summary:
  This package is designed to compute the theoretical amount of FLOPs(floating-point operations)、MACs(multiply-add operations) and Parameters in all various neural networks, such as Linear、 CNN、 RNN、 GCN、Transformer(Bert、LlaMA etc Large Language Model)，including any custom models via torch.nn.function.* as long as based on the Pytorch implementation.

description:
  bloom-1b7     |(1,128)      | 1.72B    | 1722408960  | 310.92     | 155.42   | 932.76    | 466.27
  bloom-7b1     |(1,128)      | 7.07B    | 7069016064  | 1550.39    | 775.11   | 4651.18   | 2325.32
  bloomz-1b7    |(1,128)      | 1.72B    | 1722408960  | 310.92     | 155.42   | 932.76    | 466.27
  baichuan-7B   |(1,128)      | 7B       | 7000559616  | 1733.62    | 866.78   | 5200.85   | 2600.33
  chatglm-6b    |(1,128)      | 6.17B    | 6173286400  | 1587.66    | 793.75   | 4762.97   | 2381.24
  chatglm2-6b   |(1,128)      | 6.24B    | 6243584000  | 1537.68    | 768.8    | 4613.03   | 2306.4
  Qwen-7B       |(1,128)      | 7.72B    | 7721324544  | 1825.83    | 912.88   | 5477.48   | 2738.65
  llama-7b      |(1,128)      | 6.74B    | 6738415616  | 1700.06    | 850      | 5100.19   | 2550
  llama2-7b     |(1,128)      | 6.74B    | 6738415616  | 1700.06    | 850      | 5100.19   | 2550
  llama2-7b-chat |(1,128)     | 6.74B    | 6738415616  | 1700.06    | 850      | 5100.19   | 2550
  chinese-llama-7b | (1,128)  | 6.89B    | 6885486592  | 1718.89    | 859.41   |5156.67   | 2578.24
  chinese-llama-plus-7b| (1,128) | 6.89B | 6885486592  | 1718.89    | 859.41   |5156.67   | 2578.24
  EleutherAI/pythia-1.4b | (1,128) | 1.31B | 1311625216  | 312.54    | 156.23   |937.61   | 468.69
  EleutherAI/pythia-12b | (1,128) | 11.59B | 11586549760  | 2911.47    | 1455.59   | 8734,41 | 4366.77
  moss-moon-003-sft |(1,128) | 16.72B  | 16717980160 |  4124.93    | 2062.39  |  12374.8  | 6187.17
  moss-moon-003-sft-plugin |(1,128) | 16.06B  | 16060416000 |  3956.62    | 1978.24  |   11869.9  | 5934.71
  We can draw some simple and interesting conclusions from the table above:
  - The chatglm2-6b in the model of the same scale, the model parameters are smaller, and FLOPs is also smaller, which has certain advantages in speed performance.
  - The parameters of the llama1-7b, llama2-7b, and llama2-7b-chat models did not change at all, and FLOPs remained consistent. The structure of the model that conforms to the 7b described by [meta in its llama2 report](https://ai.meta.com/research/publications/llama-2-open-foundation-and-fine-tuned-chat-models/) has not changed, the main difference is the increase of training data tokens.
  - Similarly, it can be seen from the table that the chinese-llama-7b and chinese-llama-plus-7b data are also in line with [cui's report](https://arxiv.org/pdf/2304.08177v1.pdf), just more chinese data tokens are added for training, and the model structure and parameters do not change.
  - ......
  More model FLOPs would be updated successively, see github [calculate-flops.pytorch](https://github.com/MrYxJ/calculate-flops.pytorch)

  Input data format: batch_size=1, seq_len=128

rpm_license:
  MIT License  Copyright (c) [2023] [MrYXJ]  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: 65b771e78625810ed3e97038415dc23e3d34e10c3cce177db103c47baaa2921a
name: python-calib3d
arch: src
version: 2.10.1
epoch: 0
release: 1
summary: Python 3D calibration and homogenous coordinates computation library
url: https://github.com/ispgroupucl/calib3d
rpm_license: LGPL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calib3d-2.10.1-1.src.rpm
checksum_type: sha256
description:
  This library offers several tools for manipulation of calibrated cameras, projective geometry and computations using homogenous coordinates.

  Camera calibration allows to determine the relation between the camera's pixels (2D coordinates) and points in the real world
  (3D coordinates). It implies computation using homogenous coordinates. This python library aims at simplifying implementations
  of projective geometry computations, building on top of `numpy` and `cv2`.




  Installation using the package manager pip

  ```shell
  pip install calib3d
  ```



  Full API documentation is available in [here](https://ispgroupucl.github.io/calib3d).




  The `Point2D` (and `Point3D`) class represent 2D (and 3D) points extending `numpy.ndarray`. Access to y coordinate of `point` is `point.y`, and access to homogenous coordinates is made easy with `point.H`, while it is still possible to use `point` with any `numpy` operators.

  ```python
  >>> Point2D(1,2) == Point2D(2,4,2)
  True

  >>> points = Point2D(np.array([[0, 0, 1, 2, 3],   # x coordinates
                                 [1, 2, 3, 4, 5]])) # y coordinates
  >>> points.x
  array([0., 0., 1., 2., 3.])

  >>> points.H
  array([[0., 0., 1., 2., 3.],
         [1., 2., 3., 4., 5.],
         [1., 1., 1., 1., 1.]])
  ```




  The `Calib` class represents a calibrated camera. It has a serie of methods to handle 3D to 2D projections, 2D to 3D liftings, image transformations, and more.

  ```python
  >>> import numpy as np
  >>> from calib3d import Calib, Point3D, compute_rotation_matrix
  >>> f = 0.035                                      # lens focal length [m]      35 mm lens
  >>> w, h = np.array([4000, 3000])                  # sensor size       [px.px]  12 Mpx sensor
  >>> d = w/0.01                                     # pixel density     [px.m⁻¹] with a 1 cm sensor width
  >>> K = np.array([[ d*f,  0 , w/2 ],               # Camera matrix (intrinsic parameters)
  ...               [  0 , d*f, h/2 ],
  ...               [  0 ,  0 ,  1  ]])
  >>> C = Point3D(10,10,10)                          # Camera position in the 3D space
  >>> R = compute_rotation_matrix(Point3D(0,0,0), C) # Camera pointing towards origin
  >>> calib = Calib(K=K, T=-R@C, R=R, width=w, height=h)
  >>> calib.project_3D_to_2D(Point3D(0,0,0))
  Point2D([[2000.],
           [1500.]])
  ```

  Cropping or scaling a calib is made easy with the following operations (for more operations, check the documentation)
  ```python
  >>> new_calib = calib.crop(x_slice=slice(10, 110, None), y_slice=slice(500, 600, None))
  >>> new_calib = calib.scale(output_width=2000, output_height=1500)
  ```

  Other useful methods
  ```python
  >>> calib.projects_in(Point3D(0, 20, 20))
  False

  >>> calib.compute_length2D(Point3D(0, 0, 0), .42)  # Number of pixels that represent a length of .42 in the 3D space
  array([339.48195828])
  ```




  Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.



  This library is developed and maintained by [Gabriel Van Zandycke](https://github.com/gabriel-vanzandycke). If you use this repository, please consider citing my work.


pkgId: 164ac2ee5597b1b35258bd94886d2320de1cc8329e49fedd6e1d8fd6a1e23d0b
name: python-caliber
arch: src
version: 0.1.19
epoch: 0
release: 1
summary: Model-agnostic calibration and performance enhancement.
url: https://pypi.org/project/caliber/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caliber-0.1.19-1.src.rpm
checksum_type: sha256
description:
  You can install caliber via
      pip install caliber
  The following extras are available:
  - :code:`torch`: install `PyTorch <https://pytorch.org/>`_ dependencies.
  - :code:`docs`: install `Sphinx <https://www.sphinx-doc.org/en/master/>`_ dependencies.
  Alternatively, you can build the package using `Poetry <https://python-poetry.org/>`_.


pkgId: 81481ae82c3a79d3d0193549f8926c45ff8960da6bc51c453b0269f563ed759e
name: python-calibrated-explanations
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Extract calibrated explanations from machine learning models.
url: https://github.com/Moffran/calibrated_explanations
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calibrated-explanations-0.5.0-1.src.rpm
checksum_type: sha256
description:
  <!-- ======================= -->

  [![Calibrated Explanations PyPI version][pypi-version]][calibrated-explanations-on-pypi]
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/calibrated-explanations.svg)](https://anaconda.org/conda-forge/calibrated-explanations)
  [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Moffran/calibrated_explanations)](https://github.com/Moffran/calibrated_explanations/blob/main/CHANGELOG.md)
  [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://github.com/moffran/calibrated_explanations/blob/main/LICENSE)
  [![Downloads](https://static.pepy.tech/badge/calibrated-explanations)](https://pepy.tech/project/calibrated-explanations)
  <!-- [![Documentation Status](https://readthedocs.org/projects/calibrated-explanations/badge/?version=latest)](https://calibrated-explanations.readthedocs.io/en/latest/?badge=latest)
  [![Build Status for Calibrated Explanations][build-status]][build-log] -->
  <!-- [![Lint Status for Calibrated Explanations][lint-status]][lint-log] -->
  <!-- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Moffran/calibrated_explanations/main?urlpath=https%3A%2F%2Fgithub.com%2FMoffran%2Fcalibrated_explanations%2Fblob%2Fmain%2Fnotebooks%2Fquickstart.ipynb) -->

  **Calibrated Explanations** is an explanation method for machine learning designed to enhance both the interpretability of model predictions and the quantification of uncertainty. In many real-world applications, understanding how confident a model is about its predictions is just as important as the predictions themselves. This framework provides calibrated explanations for both predictions and feature importance by quantifying **aleatoric** and **epistemic uncertainty** — two types of uncertainty that offer critical insights into both data and model reliability.

  - **Aleatoric uncertainty** represents the noise inherent in the data. It affects the spread of probability distributions (for probabilistic outcomes) and predictions (for regression). This uncertainty is **irreducible** because it reflects limitations in the data generation process itself. Incorporating calibration ensures accurate aleatoric uncertainty.

  - **Epistemic uncertainty** arises from the model's lack of knowledge due to limited training data or insufficient complexity. It affects the model’s confidence in its output when it encounters unfamiliar or out-of-distribution data. Unlike aleatoric uncertainty, epistemic uncertainty is **reducible** — it can be minimized by gathering more data, improving the model architecture, or refining features.

  By providing estimates for both aleatoric and epistemic uncertainty, **Calibrated Explanations** offers a more comprehensive understanding of predictions, both in terms of accuracy and confidence. This is particularly valuable in high-stakes environments where model reliability and interpretability are essential, such as in healthcare, finance, and autonomous systems.

  For an in-depth guide on how to start using Calibrated Explanations, refer to the [Getting Started](#getting-started) section below.


  - **Calibrated Prediction Confidence**: Obtain well-calibrated uncertainty estimates for predictions, helping users make informed decisions based on the model’s confidence.
  - **Uncertainty-Aware Feature Importance**: Understand not only which features are important but also how uncertain the model is about the contribution of those features.
  - **Support for Various Tasks**: The framework supports classification, regression, and probabilistic regression, making it adaptable to a wide range of machine learning problems.

  The ability to quantify both aleatoric and epistemic uncertainty provides practitioners with actionable insights into the reliability of predictions and explanations, fostering **appropriate trust** ([read paper](https://scholar.google.com/citations?view_op=view_citation&hl=sv&user=reKgRBwAAAAJ&citation_for_view=reKgRBwAAAAJ:Se3iqnhoufwC)) and transparency in machine learning models.



  Calibrated Explanations offers a range of features designed to enhance both the interpretability and reliability of machine learning models. These characteristics can be summarized as follows:

  * **Fast, reliable, stable, and robust feature importance explanations** for:
    - **Binary classification models** ([Read paper](https://doi.org/10.1016/j.eswa.2024.123154)).
    - **Multi-class classification models** ([Read paper](https://raw.githubusercontent.com/mlresearch/v230/main/assets/lofstrom24a/lofstrom24a.pdf), [Slides](https://copa-conference.com/presentations/Lofstrom.pdf)).
    - **Regression models** ([Read paper](https://arxiv.org/abs/2308.16245)), including:
      - **Probabilistic explanations**: Provides the probability that the target exceeds a user-defined threshold.
      - **Difficulty-adaptable explanations**: Adjust explanations based on conformal normalization for varying levels of data difficulty.

  * **Aleatoric and epistemic uncertainty estimates**: These estimates are provided by **Venn-Abers** for probabilistic explanations and by **Conformal Predictive Systems** for regression tasks. Both these techniques are grounded in solid theoretical foundations, leveraging **conformal prediction** and **Venn prediction** to ensure reliability and robustness in uncertainty quantification.

  * **Calibration of the underlying model**: Ensures that predictions accurately reflect reality, improving trust in model outputs.

  * **Comprehensive uncertainty quantification**:
    - **Prediction uncertainty**: Quantifies both aleatoric and epistemic uncertainties for the model’s predictions.
    - **Feature importance uncertainty**: Measures uncertainty in feature importance scores, helping to assess the reliability of each feature's contribution.

  * **Proximity-based rules for straightforward interpretation**: Generates rules that are easily interpretable by relating instance values to feature importance weights.

  * **Alternative explanations with uncertainty quantification**: Provides explanations for how predicted outcomes would change if specific input features were modified, including uncertainty estimates for these alternative outcomes.

  * **Conjunctional rules**: Provides feature importance explanations for interactions between multiple features, highlighting joint contributions (discussed in detail in the [regression paper](https://arxiv.org/abs/2308.16245)).

  * **Conditional rules for contextual explanations**: Allows users to create explanations conditioned on specific criteria, enabling better handling of e.g. fairness and bias constraints ([Read paper](https://doi.org/10.1007/978-3-031-63787-2_17)). Using conformal terminology, this means that Mondrian categories are supported.


  Below is an example of a probabilistic alternative explanation for an instance from the California Housing regression dataset, with a threshold set at 180,000. The light red area in the background represents the calibrated probability interval for the prediction being below the threshold, as determined by the underlying model using a Conformal Predictive System to generate a probability estimate and Venn-Abers to generate epistemic uncertainty.

  The darker red bars for each rule (seen to the left) show the probability intervals provided by Venn-Abers, indicating how the likelihood of the outcome changes when specific feature values (seen to the right) are modified according to the rule conditions.
  <p align="center">
    <a href="https://calibrated-explanations.readthedocs.io/en/latest/?badge=latest">
      <img src="https://github.com/Moffran/calibrated_explanations/blob/main/docs/images/counterfactual_probabilistic_house_regression.jpg" alt="Probabilistic alternative explanation for California Housing">
    </a>
  </p>


  The [notebooks folder](https://github.com/Moffran/calibrated_explanations/tree/main/notebooks) contains a number of notebooks illustrating different use cases for `calibrated-explanations`. The [quickstart_wrap](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/quickstart_wrap.ipynb), using the `WrapCalibratedExplainer` class, is similar to this Getting Started, including plots and output.

  The notebooks listed below are using the `CalibratedExplainer` class. They showcase a number of different use cases, as indicated by their names:
  * [quickstart](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/quickstart.ipynb) - similar to this Getting Started, but without a wrapper class.
  * [demo_binary_classification](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_binary_classification.ipynb) - with examples for binary classification
  * [demo_multiclass](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_multiclass_glass.ipynb) - with examples for multi-class classification
  * [demo_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_regression.ipynb) - with examples for regression
  * [demo_probabilistic_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_probabilistic_regression.ipynb) - with examples for regression with thresholds
  * [demo_under_the_hood](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_under_the_hood.ipynb) - illustrating how to access the information composing the explanations


  Let us illustrate how we may use `calibrated_explanations` to generate explanations from a classifier trained on a dataset from
  [www.openml.org](https://www.openml.org), which we first split into a
  training and a test set using `train_test_split` from
  [sklearn](https://scikit-learn.org), and then further split the
  training set into a proper training set and a calibration set:


  ```python
  from sklearn.datasets import fetch_openml
  from sklearn.model_selection import train_test_split

  dataset = fetch_openml(name="wine", version=7, as_frame=True, parser='auto')

  X = dataset.data.values.astype(float)
  y = (dataset.target.values == 'True').astype(int)

  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=2, stratify=y)

  X_prop_train, X_cal, y_prop_train, y_cal = train_test_split(X_train, y_train,
                                                              test_size=0.25)

  ```

  We now create our wrapper object, using a `RandomForestClassifier` as learner.


  ```python
  from sklearn.ensemble import RandomForestClassifier
  from calibrated_explanations import WrapCalibratedExplainer, __version__

  print(f"calibrated_explanations {__version__}")

  classifier = WrapCalibratedExplainer(RandomForestClassifier())
  display(classifier)
  ```

  We now fit our model using the proper training set.


  ```python
  classifier.fit(X_prop_train, y_prop_train)
  display(classifier)
  ```

  The `WrapCalibratedExplainer` class has a `predict` and a `predict_proba` method that returns the predictions and probability estimates of the underlying classifier. If the model is not yet calibrated, then the underlying models `predict` and `predict_proba` methods are used. If the model is calibrated, then the `predict` and `predict_proba` method of the calibration model is used.


  ```python
  print('Uncalibrated prediction (probability estimates):')
  print(f'{classifier.predict(X_test)} ({classifier.predict_proba(X_test)})')
  ```

  Before we can generate explanations, we need to calibrate our model using the calibration set.


  ```python
  classifier.calibrate(X_cal, y_cal)
  display(classifier)
  ```

  Once the model is calibrated, the `predict` and `predict_proba` methods produce calibrated predictions and probability estimates.


  ```python
  proba, (low, high) = classifier.predict_proba(X_test, uq_interval=True)
  print('Calibrated prediction (probability estimates):')
  print(f'{classifier.predict(X_test)} ({proba})')
  print('Calibrated uncertainty interval for the positive class:')
  print([(low[i], high[i]) for i in range(len(low))])
  ```


  Let us explain a test instance using our `WrapCalibratedExplainer` object. The method used to get factual explanations is `explain_factual`.


  ```python
  factual_explanations = classifier.explain_factual(X_test)
  display(classifier)
  ```

  Once we have the explanations, we can plot all of them using the `plot` function. Default, a regular plot, without uncertainty intervals included, is created. To include uncertainty intervals, change the parameter `uncertainty=True`. To plot only a single instance, the `plot` function can be called, submitting the index of the test instance to plot.


  ```python
  factual_explanations.plot()
  factual_explanations.plot(uncertainty=True)

  factual_explanations.plot(0, uncertainty=True)
  ```

  You can also add and remove conjunctive rules.


  ```python
  factual_explanations.add_conjunctions().plot(0)
  factual_explanations.plot(0, uncertainty=True)
  factual_explanations.remove_conjunctions().plot(0, uncertainty=True)
  ```


  An alternative to factual rules is to extract alternative rules, which is done using the `explore_alternatives` function. Alternative explanations provides insights on how predicted outcomes would change if specific input features were modified, including uncertainty estimates for these alternative outcomes.


  ```python
  alternative_explanations = classifier.explore_alternatives(X_test)
  display(classifier)
  ```

  Alternatives are also visualized using the `plot` function. Plotting an individual alternative explanation is done using `plot`, submitting the index to plot. Adding or removing conjunctions is done as before.


  ```python
  alternative_explanations.plot()
  alternative_explanations.add_conjunctions().plot()

  alternative_explanations.plot(0)
  ```

  `calibrated_explanations` supports multiclass which is demonstrated in [demo_multiclass](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_multiclass_glass.ipynb). That notebook also demonstrates how both feature names and target and categorical labels can be added to improve the interpretability.


  Extracting explanations for regression is very similar to how it is done for classification. First we load and divide the dataset. The target is divided by 1000, meaning that the target is in thousands of dollars.


  ```python
  dataset = fetch_openml(name="house_sales", version=3)

  X = dataset.data.values.astype(float)
  y = dataset.target.values/1000

  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=2, random_state=42)

  X_prop_train, X_cal, y_prop_train, y_cal = train_test_split(X_train, y_train,
                                                              test_size=200)
  ```

  We now create our wrapper object, using a `RandomForestRegressor` as learner.


  ```python
  from sklearn.ensemble import RandomForestRegressor

  regressor = WrapCalibratedExplainer(RandomForestRegressor())
  display(regressor)
  ```

  We now fit our model using the proper training set.


  ```python
  regressor.fit(X_prop_train, y_prop_train)
  display(regressor)
  ```

  The `WrapCalibratedExplainer` class has a `predict` method that returns the predictions and probability estimates of the underlying classifier. If the model is not yet calibrated, then the underlying models `predict` method is used. If the model is calibrated, then the `predict` method of the calibration model is used.


  ```python
  print('Uncalibrated model prediction:')
  print(regressor.predict(X_test))
  ```

  Before we can generate explanations, we need to calibrate our model using the calibration set.


  ```python
  regressor.calibrate(X_cal, y_cal)
  display(regressor)
  ```

  We can easily add a difficulty estimator by assigning a `DifficultyEstimator` to the `difficulty_estimator` attribute when calibrating the model.


  ```python
  from crepes.extras import DifficultyEstimator

  de = DifficultyEstimator().fit(X=X_prop_train, learner=regressor.learner, scaler=True)
  regressor.calibrate(X_cal, y_cal, difficulty_estimator=de)
  display(regressor)
  ```

  A `DifficultyEstimator` can also be assigned to an already calibrated model using the `set_difficult_estimator` method. Using `set_difficult_estimator(None)` removes any previously assigned `DifficultyEstimator`.

  Once the model is calibrated, the `predict` method produce calibrated predictions with uncertainties. The default confidence is 90 per cent, which can be altered using the `low_high_percentiles` parameter.


  ```python
  prediction, (low, high) = regressor.predict(X_test, uq_interval=True) # default low_high_percentiles=(5, 95)
  print('Calibrated prediction:')
  print(prediction)
  print('Calibrated uncertainty interval:')
  print([(low[i], high[i]) for i in range(len(low))])
  ```

  You can also get the probability of the prediction being below a certain threshold using `predict_proba` by assigning the `threshold` parameter.


  ```python
  prediction = regressor.predict(X_test, threshold=200)
  print('Calibrated probabilistic prediction:')
  print(prediction)

  proba, (low, high) = regressor.predict_proba(X_test, uq_interval=True, threshold=200)
  print('Calibrated probabilistic probability estimate [y_hat > threshold, y_hat <= threshold]:')
  print(proba)
  print('Calibrated probabilistic uncertainty interval for y_hat <= threshold:')
  print([(low[i], high[i]) for i in range(len(low))])
  ```


  Let us explain a test instance using our `WrapCalibratedExplainer` object. The method used to get factual explanations is `explain_factual`.


  ```python
  factual_explanations = regressor.explain_factual(X_test) # default low_high_percentiles=(5, 95)
  display(regressor)
  ```

  Regression also offer both regular and uncertainty plots for factual explanations with or without conjunctive rules, in almost exactly the same way as for classification.


  ```python
  factual_explanations.plot()
  factual_explanations.plot(uncertainty=True)

  factual_explanations.add_conjunctions().plot(uncertainty=True)
  ```

  Default, the confidence interval is set to a symmetric interval of 90% (defined as `low_high_percentiles=(5,95)`). The intervals can cover any user specified interval, including one-sided intervals. To define a one-sided upper-bounded 90% interval, set `low_high_percentiles=(-np.inf,90)`, and to define a one-sided lower-bounded 95% interval, set `low_high_percentiles=(5,np.inf)`. Percentiles can also be set to any other values in the range (0,100) (exclusive), and intervals do not have to be symmetric.


  ```python
  lower_bounded_explanations = regressor.explain_factual(X_test, low_high_percentiles=(5,np.inf))
  asymmetric_explanations = regressor.explain_factual(X_test, low_high_percentiles=(5,75))
  ```


  The `explore_alternatives` will work exactly the same as for classification.


  ```python
  alternative_explanations = regressor.explore_alternatives(X_test) # default low_high_percentiles=(5, 95)
  display(regressor)
  ```

  Alternative plots work as for classification.


  ```python
  alternative_explanations.plot()
  alternative_explanations.add_conjunctions().plot()
  ```


  The difference between probabilistic regression and regular regression is that the former returns a probability of the prediction being below a certain threshold. This could for example be useful when the prediction is a time to an event, such as time to death or time to failure.


  ```python
  probabilistic_factual_explanations = regressor.explain_factual(X_test, threshold=200)
  probabilistic_factual_explanations.plot()
  probabilistic_factual_explanations.plot(uncertainty=True)
  ```


  ```python
  probabilistic_alternative_explanations = regressor.explore_alternatives(X_test, threshold=200)
  probabilistic_alternative_explanations.plot()
  ```

  Regression offers many more options but to learn more about them, see the [demo_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_regression.ipynb) or the [demo_probabilistic_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_probabilistic_regression.ipynb) notebooks.



  A `WrapCalibratedExplainer` can also be initialized with a trained model or with a `CalibratedExplainer` object, as is examplified below.

  ```python
  fitted_classifier = WrapCalibratedExplainer(classifier.learner)
  display(fitted_classifier)
  calibrated_classifier = WrapCalibratedExplainer(classifier.explainer)
  display(calibrated_classifier)

  fitted_regressor = WrapCalibratedExplainer(regressor.learner)
  display(fitted_regressor)
  calibrated_regressor = WrapCalibratedExplainer(regressor.explainer)
  display(calibrated_regressor)
  ```

  When a calibrated explainer is re-fitted, the explainer is reinitialized.

  [Top](#calibrated-explanations-documentation)


  The implementation currently only support numerical input. Use the `utils.helper.transform_to_numeric` (released in version v0.3.1) to transform a `DataFrame` with text data into numerical form and at the same time extracting `categorical_features`, `categorical_labels`, `target_labels` (if text labels) and `mappings` (used to apply the same mappings to new data) to be used as input to the `CalibratedExplainer`. The algorithm does not currently support image data.

  See e.g. the [Conditional Fairness Experiment](evaluation/Conditional_Fairness_Experiment.ipynb) for examples on how it can be used.

  [Top](#calibrated-explanations-documentation)




  Install `calibrated-explanations` from PyPI:

  ```bash
  pip install calibrated-explanations
  ```


  Alternatively, you can install it from conda-forge:

  ```bash
  conda install -c conda-forge calibrated-explanations
  ```

  <!-- ### From GitHub:
  To install the latest version directly from the GitHub repository, use the following command:

  ```bash
  conda install git+https://github.com/Moffran/calibrated_explanations.git
  ``` -->


  The following dependencies are required and will be installed automatically if not already present:

  * [crepes](https://github.com/henrikbostrom/crepes)
  * [venn-abers](https://github.com/ip200/venn-abers)
  * [scikit-learn](https://github.com/scikit-learn/scikit-learn)
  * [matplotlib](https://matplotlib.org/)
  * [NumPy](https://numpy.org/)

  [Top](#calibrated-explanations-documentation)



  Contributions are welcome.
  Please send bug reports, feature requests or pull requests through
  the project page on [GitHub](https://github.com/Moffran/calibrated_explanations).
  You can find a detailed guide for contributions in
  [CONTRIBUTING.md](https://github.com/Moffran/calibrated_explanations/blob/main/CONTRIBUTING.md).

  [Top](#calibrated-explanations-documentation)



  For documentation, see [calibrated-explanations.readthedocs.io](https://calibrated-explanations.readthedocs.io/en/latest/?badge=latest).

  [Top](#calibrated-explanations-documentation)




  If you use `calibrated-explanations` for a scientific publication, you are kindly requested to cite one of the following papers:

  - [Löfström, H](https://github.com/Moffran). (2023). [Trustworthy explanations: Improved decision support through well-calibrated uncertainty quantification](https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1810440&dswid=6197) (Doctoral dissertation, Jönköping University, Jönköping International Business School).
  - [Löfström, H](https://github.com/Moffran)., [Löfström, T](https://github.com/tuvelofstrom)., Johansson, U., and Sönströd, C. (2024). [Calibrated Explanations: with Uncertainty Information and Counterfactuals](https://doi.org/10.1016/j.eswa.2024.123154). Expert Systems with Applications, 1-27.
  - [Löfström, H](https://github.com/Moffran)., [Löfström, T](https://github.com/tuvelofstrom). (2024). [Conditional Calibrated Explanations: Finding a Path Between Bias and Uncertainty](https://doi.org/10.1007/978-3-031-63787-2_17). In: Longo, L., Lapuschkin, S., Seifert, C. (eds) Explainable Artificial Intelligence. xAI 2024. Communications in Computer and Information Science, vol 2153. Springer, Cham.
  - [Löfström, T](https://github.com/tuvelofstrom)., [Löfström, H](https://github.com/Moffran)., Johansson, U. (2024). [Calibrated Explanations for Multi-class](https://raw.githubusercontent.com/mlresearch/v230/main/assets/lofstrom24a/lofstrom24a.pdf). <i>Proceedings of the Thirteenth Workshop on Conformal and Probabilistic Prediction and Applications</i>, in <i>Proceedings of Machine Learning Research</i>, PMLR 230:175-194. [Presentation](https://copa-conference.com/presentations/Lofstrom.pdf)

  The paper that originated the idea of `calibrated-explanations` is:

  - [Löfström, H.](https://github.com/Moffran), [Löfström, T.](https://github.com/tuvelofstrom), Johansson, U., & Sönströd, C. (2023). [Investigating the impact of calibration on the quality of explanations](https://link.springer.com/article/10.1007/s10472-023-09837-2). Annals of Mathematics and Artificial Intelligence, 1-18. [Code and results](https://github.com/tuvelofstrom/calibrating-explanations).


  - [Löfström, T](https://github.com/tuvelofstrom)., [Löfström, H](https://github.com/Moffran)., Johansson, U., Sönströd, C., and [Matela, R](https://github.com/rudymatela). (2024). [Calibrated Explanations for Regression](https://arxiv.org/abs/2308.16245). arXiv preprint arXiv:2308.16245.
  - [Löfström, H](https://github.com/Moffran)., [Löfström, T](https://github.com/tuvelofstrom)., and [Hallberg Szabadvary, J](https://github.com/egonmedhatten). (2024). [Ensured: Explanations for Decreasing the Epistemic Uncertainty in Predictions](https://arxiv.org/abs/2410.05479). arXiv preprint arXiv:2410.05479.


  If you use `calibrated-explanations` for a scientific publication, you are kindly requested to cite one of the papers above. Bibtex entries can be found in [citing](https://github.com/Moffran/calibrated_explanations/blob/main/docs/citing.md#bibtex-entries).

  [Top](#calibrated-explanations-documentation)


  This research is funded by the [Swedish Knowledge Foundation](https://www.kks.se/) together with industrial partners supporting the research and education environment on Knowledge Intensive Product Realization SPARK at Jönköping University, Sweden, through projects: AFAIR grant no. 20200223, ETIAI grant no. 20230040, and PREMACOP grant no. 20220187. Helena Löfström was initially a PhD student in the Industrial Graduate School in Digital Retailing (INSiDR) at the University of Borås, funded by the Swedish Knowledge Foundation, grant no. 20160035.

  [Rudy Matela](https://github.com/rudymatela) has been our git guru and has helped us with the release process.

  We have used both the `ConformalPredictiveSystem` and `DifficultyEstimator` classes from [Henrik Boström](https://github.com/henrikbostrom)s [crepes](https://github.com/henrikbostrom/crepes) package to provide support for regression. The `MondrianCategorizer` class is also supported in the `WrapCalibratedExplainer` as an alternative to using the `bins` parameter to create conditional explanations.

  We have used the `VennAbers` class from [Ivan Petej](https://github.com/ip200)s [venn-abers](https://github.com/ip200/venn-abers) package to provide support for probabilistic explanations (both classification and probabilistic regression).

  The `FastExplanation`, created using the `explain_fast` method, is incorporating ideas and code from [ConformaSight](https://github.com/rabia174/ConformaSight) developed by [Fatima Rabia Yapicioglu](https://github.com/rabia174), Allesandra Stramiglio, and Fabio Vitali.

  We are using Decision Trees from `scikit-learn` in the discretizers.

  We have copied code from [Marco Tulio Correia Ribeiro](https://github.com/marcotcr)s [lime](https://github.com/marcotcr/lime) package for the `Discretizer` class.

  The `check_is_fitted` and `safe_instance` functions in `calibrated_explanations.utils` are copied from `sklearn` and `shap`.

  [Top](#calibrated-explanations-documentation)

  [build-log]:    https://github.com/Moffran/calibrated_explanations/actions/workflows/test.yml
  [build-status]: https://github.com/Moffran/calibrated_explanations/actions/workflows/test.yml/badge.svg
  [pypi-version]: https://img.shields.io/pypi/v/calibrated-explanations
  [calibrated-explanations-on-pypi]: https://pypi.org/project/calibrated-explanations


pkgId: f515cdef806c4db7e538cafb92133f6c661f98fa1feb4e30c9fbf563ef132754
name: python-calibrated-explanations
arch: src
version: 0.5.1
epoch: 0
release: 1
summary: Extract calibrated explanations from machine learning models.
url: https://pypi.org/project/calibrated-explanations/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calibrated-explanations-0.5.1-1.src.rpm
checksum_type: sha256
description:
  <!-- ======================= -->

  [![Calibrated Explanations PyPI version][pypi-version]][calibrated-explanations-on-pypi]
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/calibrated-explanations.svg)](https://anaconda.org/conda-forge/calibrated-explanations)
  [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Moffran/calibrated_explanations)](https://github.com/Moffran/calibrated_explanations/blob/main/CHANGELOG.md)
  [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://github.com/moffran/calibrated_explanations/blob/main/LICENSE)
  [![Downloads](https://static.pepy.tech/badge/calibrated-explanations)](https://pepy.tech/project/calibrated-explanations)
  <!-- [![Documentation Status](https://readthedocs.org/projects/calibrated-explanations/badge/?version=latest)](https://calibrated-explanations.readthedocs.io/en/latest/?badge=latest)
  [![Build Status for Calibrated Explanations][build-status]][build-log] -->
  <!-- [![Lint Status for Calibrated Explanations][lint-status]][lint-log] -->
  <!-- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Moffran/calibrated_explanations/main?urlpath=https%3A%2F%2Fgithub.com%2FMoffran%2Fcalibrated_explanations%2Fblob%2Fmain%2Fnotebooks%2Fquickstart.ipynb) -->

  **Calibrated Explanations** is an explanation method for machine learning designed to enhance both the interpretability of model predictions and the quantification of uncertainty. In many real-world applications, understanding how confident a model is about its predictions is just as important as the predictions themselves. This framework provides calibrated explanations for both predictions and feature importance by quantifying **aleatoric** and **epistemic uncertainty** — two types of uncertainty that offer critical insights into both data and model reliability.

  - **Aleatoric uncertainty** represents the noise inherent in the data. It affects the spread of probability distributions (for probabilistic outcomes) and predictions (for regression). This uncertainty is **irreducible** because it reflects limitations in the data generation process itself. Incorporating calibration ensures accurate aleatoric uncertainty.

  - **Epistemic uncertainty** arises from the model's lack of knowledge due to limited training data or insufficient complexity. It affects the model’s confidence in its output when it encounters unfamiliar or out-of-distribution data. Unlike aleatoric uncertainty, epistemic uncertainty is **reducible** — it can be minimized by gathering more data, improving the model architecture, or refining features.

  By providing estimates for both aleatoric and epistemic uncertainty, **Calibrated Explanations** offers a more comprehensive understanding of predictions, both in terms of accuracy and confidence. This is particularly valuable in high-stakes environments where model reliability and interpretability are essential, such as in healthcare, finance, and autonomous systems.

  To get a very condensed example on how Calibrated Explanations can be used, see the [Quick Overview](#quick-overview). For an in-depth guide on how to start using Calibrated Explanations, refer to the [Getting Started](#getting-started) section below.


  - **Calibrated Prediction Confidence**: Obtain well-calibrated uncertainty estimates for predictions, helping users make informed decisions based on the model’s confidence.
  - **Uncertainty-Aware Feature Importance**: Understand not only which features are important but also how uncertain the model is about the contribution of those features.
  - **Support for Various Tasks**: The framework supports classification, regression, and probabilistic regression, making it adaptable to a wide range of machine learning problems.

  The ability to quantify both aleatoric and epistemic uncertainty provides practitioners with actionable insights into the reliability of predictions and explanations, fostering **appropriate trust** ([read paper](https://scholar.google.com/citations?view_op=view_citation&hl=sv&user=reKgRBwAAAAJ&citation_for_view=reKgRBwAAAAJ:Se3iqnhoufwC)) and transparency in machine learning models.



  Calibrated Explanations offers a range of features designed to enhance both the interpretability and reliability of machine learning models. These characteristics can be summarized as follows:

  * **Fast, reliable, stable, and robust feature importance explanations** for:
    - **Binary classification models** ([Read paper](https://doi.org/10.1016/j.eswa.2024.123154)).
    - **Multi-class classification models** ([Read paper](https://raw.githubusercontent.com/mlresearch/v230/main/assets/lofstrom24a/lofstrom24a.pdf), [Slides](https://copa-conference.com/presentations/Lofstrom.pdf)).
    - **Regression models** ([Read paper](https://arxiv.org/abs/2308.16245)), including:
      - **Probabilistic explanations**: Provides the probability that the target exceeds a user-defined threshold.
      - **Difficulty-adaptable explanations**: Adjust explanations based on conformal normalization for varying levels of data difficulty.

  * **Aleatoric and epistemic uncertainty estimates**: These estimates are provided by **Venn-Abers** for probabilistic explanations and by **Conformal Predictive Systems** for regression tasks. Both these techniques are grounded in solid theoretical foundations, leveraging **conformal prediction** and **Venn prediction** to ensure reliability and robustness in uncertainty quantification.

  * **Calibration of the underlying model**: Ensures that predictions accurately reflect reality, improving trust in model outputs.

  * **Comprehensive uncertainty quantification**:
    - **Prediction uncertainty**: Quantifies both aleatoric and epistemic uncertainties for the model’s predictions.
    - **Feature importance uncertainty**: Measures uncertainty in feature importance scores, helping to assess the reliability of each feature's contribution.

  * **Proximity-based rules for straightforward interpretation**: Generates rules that are easily interpretable by relating instance values to feature importance weights.

  * **Alternative explanations with uncertainty quantification**: Provides explanations for how predicted outcomes would change if specific input features were modified, including uncertainty estimates for these alternative outcomes.
    - **Ensured Explanations**: Ensured explanations aims to help users find alternative explanations that reduce epistemic uncertainty (read more in the [changelog](https://github.com/Moffran/calibrated_explanations/releases/tag/v0.5.0) or [read the paper](https://arxiv.org/abs/2410.05479)). This includes:
      - Categories for uncertain explanations, such as counter-potential, semi-potential, and super-potential.
      - A new ranking metric, called _ensured_ ranking, to help balance uncertainty and probability among alternative explanations.
      - A new plot to help visualize uncertainties among alternative explanations.

  * **Conjunctional rules**: Provides feature importance explanations for interactions between multiple features, highlighting joint contributions (discussed in detail in the [regression paper](https://arxiv.org/abs/2308.16245)).

  * **Conditional rules for contextual explanations**: Allows users to create explanations conditioned on specific criteria, enabling better handling of e.g. fairness and bias constraints ([Read paper](https://doi.org/10.1007/978-3-031-63787-2_17)). Using conformal terminology, this means that Mondrian categories are supported.


  Below is an example of an alternative explanation for an instance from the Wine classification dataset. The triangular plots (subfigures (a) and (b)) show the prediction and uncertainty for the instance (red) and alternatives (blue). The uncertainty is represented by the width of the probability interval, shown in subfigure (c). The greyed area cannot be populated, as the probability is a regularised mean of the interval endpoints (the regularisation explains the curved shape). All explanations falling inside the rhombus-like shape in the middle are uncertain since their uncertainty interval covers probability 0.5, indicating that they can potentially be either positive or negative.

  * **Subfigure (a)**: Displays all generated alternatives, including conjunctive alternative explanations, indicating the outcome when changing feature value(s).
  * **Subfigures (b) and (c)**: Show a subset of ten alternative explanations, filtered by probability estimate (`rnk_metric='ensured'` and `rnk_weight=1`). The light red area in the background of (c) represents the calibrated probability interval on the original instance for the positive class, corresponding to the red dot in (a) and (b).

  The darker red bars for each rule (left) show the probability intervals provided by Venn-Abers, indicating how the likelihood of the outcome changes when original instance values (right) are modified according to the rule conditions. As an example, if _Chloride_ is reduced to below 0.04 (instead of the instance value 0.06), the probability for the positive class is increased and the uncertainty is decreased.
  <p align="center">
    <a href="https://calibrated-explanations.readthedocs.io/en/latest/?badge=latest">
      <!-- <img src="https://github.com/Moffran/calibrated_explanations/blob/main/docs/images/counterfactual_probabilistic_house_regression.jpg" alt="Probabilistic alternative explanation for California Housing"> -->
      <img src="https://github.com/Moffran/calibrated_explanations/blob/main/docs/images/alternatives_wine_ensured.png" alt="Alternative explanations for Wine (classification)">
    </a>
  </p>


  Here is a very condensed example to get you started:

  ```python
     from calibrated_explanations import WrapCalibratedExplainer
     
     

     
     classifier = WrapCalibratedExplainer(ClassifierOfYourChoice())
     regressor = WrapCalibratedExplainer(RegressorOfYourChoice())

     
     classifier.fit(X_proper_training_cls, y_proper_training_cls)
     regressor.fit(X_proper_training_reg, y_proper_training_reg)

     
     classifier.calibrate(X_calibration_cls, y_calibration_cls)
     regressor.calibrate(X_calibration_reg, y_calibration_reg)

     
     
     factual_explanations = classifier.explain_factual(X_test_cls)
     
     factual_explanations = regressor.explain_factual(X_test_reg) # low_high_percentiles=(5,95)
     
     factual_explanations = regressor.explain_factual(X_test_reg, low_high_percentiles=(10,90))
     
     your_threshold = 1000
     factual_explanations = regressor.explain_factual(X_test_reg, threshold=your_threshold)

     
     
     alternative_explanations = classifier.explore_alternatives(X_test_cls)
     
     alternative_explanations = regressor.explore_alternatives(X_test_reg) # low_high_percentiles=(5,95)
     
     alternative_explanations = regressor.explore_alternatives(X_test_reg, low_high_percentiles=(10,90))
     
     alternative_explanations = regressor.explore_alternatives(X_test_reg, threshold=your_threshold)

     
     factual_explanations.plot()
     factual_explanations.plot(uncertainty=True)
     alternative_explanations.plot()

     
     factual_conjunctions.add_conjunctions()
     alternative_conjunctions.add_conjunctions()

     
     factual_upper_bounded = regressor.explain_factual(X_test_reg, low_high_percentiles=(-np.inf,90))
     alternative_lower_bounded = regressor.explore_alternatives(X_test_reg, low_high_percentiles=(10,np.inf))
     alternative_asymmetric = regressor.explore_alternatives(X_test_reg, low_high_percentiles=(10,70))
  ```
  It is easy to access the predictions and probabilities from the calibrator and model.

  ```python
     
     classifier.fit(X_proper_training_cls, y_proper_training_cls)
     regressor.fit(X_proper_training_reg, y_proper_training_reg)

     
     uncal_proba_cls = classifier.predict_proba(X_test_cls)
     uncal_y_hat_cls = classifier.predict(X_test_cls)
     uncal_y_hat_reg = regressor.predict(X_test_reg)

     
     classifier.calibrate(X_calibration_cls, y_calibration_cls)
     regressor.calibrate(X_calibration_reg, y_calibration_reg)

     
     
     uncal_proba_cls = classifier.predict_proba(X_test_cls, calibrated=False)
     uncal_y_hat_cls = classifier.predict(X_test_cls, calibrated=False)
     uncal_y_hat_reg = regressor.predict(X_test_reg, calibrated=False)

     
     calib_proba_cls = classifier.predict_proba(X_test_cls)
     calib_y_hat_cls = classifier.predict(X_test_cls)
     calib_y_hat_reg = regressor.predict(X_test_reg)
     
     your_threshold = 1000
     thrld_y_hat_reg = regressor.predict(X_test_reg, threshold=your_threshold)
     thrld_proba_reg = regressor.predict_proba(X_test_reg, threshold=your_threshold)

     
     calib_proba_cls, low_high = classifier.predict_proba(X_test_cls, uq_interval=True)
     calib_y_hat_cls, (low, high) = classifier.predict(X_test_cls, uq_interval=True)
     calib_y_hat_reg, low_high = regressor.predict(X_test_reg, uq_interval=True) # default low_high_percentiles=(5, 95)
     calib_y_hat_reg, low_high = regressor.predict(X_test_reg, low_high_percentiles=(10,90), uq_interval=True)
     thrld_y_hat_reg, low_high = regressor.predict(X_test_reg, threshold=your_threshold, uq_interval=True)
     thrld_proba_reg, (low, high) = regressor.predict_proba(X_test_reg, threshold=your_threshold, uq_interval=True)
  ```


  The [notebooks folder](https://github.com/Moffran/calibrated_explanations/tree/main/notebooks) contains a number of notebooks illustrating different use cases for `calibrated-explanations`. The [quickstart_wrap](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/quickstart_wrap.ipynb) notebook, using the `WrapCalibratedExplainer` class, is similar to this Getting Started in structure and includes plots and output.

  The notebooks listed below are using the `CalibratedExplainer` class. They showcase a number of different use cases, as indicated by their names:
  * [quickstart](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/quickstart.ipynb) - similar to this Getting Started, but without a wrapper class.
  * [demo_binary_classification](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_binary_classification.ipynb) - with examples for binary classification
  * [demo_multiclass](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_multiclass_glass.ipynb) - with examples for multi-class classification
  * [demo_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_regression.ipynb) - with examples for regression
  * [demo_probabilistic_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_probabilistic_regression.ipynb) - with examples for regression with thresholds
  * [demo_under_the_hood](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_under_the_hood.ipynb) - illustrating how to access the information composing the explanations


  Let us illustrate how we may use `calibrated_explanations` to generate explanations from a classifier trained on a dataset from
  [www.openml.org](https://www.openml.org), which we first split into a
  training and a test set using `train_test_split` from
  [sklearn](https://scikit-learn.org), and then further split the
  training set into a proper training set and a calibration set:


  ```python
  from sklearn.datasets import fetch_openml
  from sklearn.model_selection import train_test_split

  dataset = fetch_openml(name="wine", version=7, as_frame=True, parser='auto')

  X = dataset.data.values.astype(float)
  y = (dataset.target.values == 'True').astype(int)

  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=2, stratify=y)

  X_prop_train, X_cal, y_prop_train, y_cal = train_test_split(X_train, y_train,
                                                              test_size=0.25)

  ```

  We now create our wrapper object, using a `RandomForestClassifier` as learner.


  ```python
  from sklearn.ensemble import RandomForestClassifier
  from calibrated_explanations import WrapCalibratedExplainer, __version__

  print(f"calibrated_explanations {__version__}")

  classifier = WrapCalibratedExplainer(RandomForestClassifier())
  display(classifier)
  ```

  We now fit our model using the proper training set.


  ```python
  classifier.fit(X_prop_train, y_prop_train)
  display(classifier)
  ```

  The `WrapCalibratedExplainer` class has a `predict` and a `predict_proba` method that returns the predictions and probability estimates of the underlying classifier. If the model is not yet calibrated, then the underlying models `predict` and `predict_proba` methods are used. If the model is calibrated, then the `predict` and `predict_proba` method of the calibration model is used.


  ```python
  predict = classifier.predict(X_test)
  proba = classifier.predict_proba(X_test)
  print('Uncalibrated prediction (probability estimates):')
  print(f'{predict} ({proba})')
  ```

  Before we can generate explanations, we need to calibrate our model using the calibration set.


  ```python
  classifier.calibrate(X_cal, y_cal)
  display(classifier)
  ```

  Once the model is calibrated, the `predict` and `predict_proba` methods produce calibrated predictions and probability estimates.


  ```python
  predict = classifier.predict(X_test)
  proba, (low, high) = classifier.predict_proba(X_test, uq_interval=True)
  print('Calibrated prediction (probability estimates):')
  print(f'{predict} ({proba})')
  print('Calibrated uncertainty interval for the positive class:')
  print([(low[i], high[i]) for i in range(len(low))])
  ```


  Let us explain a test instance using our `WrapCalibratedExplainer` object. The method used to get factual explanations is `explain_factual`.


  ```python
  factual_explanations = classifier.explain_factual(X_test)
  display(classifier)
  ```

  Once we have the explanations, we can plot all of them using the `plot` function. Default, a regular plot, without uncertainty intervals included, is created. To include uncertainty intervals, change the parameter `uncertainty=True`.


  ```python
  factual_explanations.plot()
  factual_explanations.plot(uncertainty=True)
  ```

  You can also add and remove conjunctive rules.


  ```python
  factual_explanations.add_conjunctions().plot(uncertainty=True)
  factual_explanations.remove_conjunctions().plot(uncertainty=True)
  ```

  All explanations support indexing using integer indexing, slices or boolean indexing.


  ```python
  factual_explanations[0].plot(uncertainty=True)
  factual_explanations[:1].plot(uncertainty=True)
  ```


  An alternative to factual rules is to extract alternative rules, which is done using the `explore_alternatives` function. Alternative explanations provides insights on how predicted outcomes would change if specific input features were modified, including uncertainty estimates for these alternative outcomes.


  ```python
  alternative_explanations = classifier.explore_alternatives(X_test)
  display(classifier)
  ```

  Alternatives are also visualized using the `plot` function. Plotting an individual alternative explanation is easiest done using indexing. Adding or removing conjunctions is done as before.


  ```python
  alternative_explanations.plot()
  alternative_explanations.add_conjunctions().plot()
  ```

  `calibrated_explanations` supports multiclass which is demonstrated in [demo_multiclass](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_multiclass_glass.ipynb). That notebook also demonstrates how both feature names and target and categorical labels can be added to improve the interpretability.


  Extracting explanations for regression is very similar to how it is done for classification. First we load and divide the dataset. The target is divided by 1000, meaning that the target is in thousands of dollars.


  ```python
  dataset = fetch_openml(name="house_sales", version=3)

  X = dataset.data.values.astype(float)
  y = dataset.target.values/1000

  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=2, random_state=42)

  X_prop_train, X_cal, y_prop_train, y_cal = train_test_split(X_train, y_train,
                                                              test_size=200)
  ```

  We now create our wrapper object, using a `RandomForestRegressor` as learner.


  ```python
  from sklearn.ensemble import RandomForestRegressor

  regressor = WrapCalibratedExplainer(RandomForestRegressor())
  display(regressor)
  ```

  We now fit our model using the proper training set.


  ```python
  regressor.fit(X_prop_train, y_prop_train)
  display(regressor)
  ```

  The `WrapCalibratedExplainer` class has a `predict` method that returns the predictions and probability estimates of the underlying classifier. If the model is not yet calibrated, then the underlying models `predict` method is used. If the model is calibrated, then the `predict` method of the calibration model is used.


  ```python
  predict = regressor.predict(X_test)
  print(f'Uncalibrated model prediction: \n{predict}')
  ```

  Before we can generate explanations, we need to calibrate our model using the calibration set.


  ```python
  regressor.calibrate(X_cal, y_cal)
  display(regressor)
  ```

  We can easily add a difficulty estimator by assigning a `DifficultyEstimator` to the `difficulty_estimator` attribute when calibrating the model.


  ```python
  from crepes.extras import DifficultyEstimator

  de = DifficultyEstimator().fit(X=X_prop_train, learner=regressor.learner, scaler=True)
  regressor.calibrate(X_cal, y_cal, difficulty_estimator=de)
  display(regressor)
  ```

  A `DifficultyEstimator` can also be assigned to an already calibrated model using the `set_difficult_estimator` method. Using `set_difficult_estimator(None)` removes any previously assigned `DifficultyEstimator`.

  Once the model is calibrated, the `predict` method produce calibrated predictions with uncertainties. The default confidence is 90 per cent, which can be altered using the `low_high_percentiles` parameter.


  ```python
  prediction, (low, high) = regressor.predict(X_test, uq_interval=True) # default low_high_percentiles=(5, 95)
  print('Calibrated prediction:')
  print(prediction)
  print('Calibrated uncertainty interval:')
  print([(low[i], high[i]) for i in range(len(low))])
  ```

  You can also get the probability of the prediction being below a certain threshold using `predict_proba` by assigning the `threshold` parameter.


  ```python
  import numpy as np
  prediction = regressor.predict(X_test, threshold=200)
  print('Calibrated probabilistic prediction:')
  print(prediction)

  proba, (low, high) = regressor.predict_proba(X_test, uq_interval=True, threshold=200)
  print('Calibrated probabilistic probability estimate [y_hat > threshold, y_hat <= threshold]:')
  print(proba)
  print('Calibrated probabilistic uncertainty interval for y_hat <= threshold ([lower_bound, upper_bound]):')
  print(np.array([(low[i], high[i]) for i in range(len(low))]))
  ```


  Let us explain a test instance using our `WrapCalibratedExplainer` object. The method used to get factual explanations is `explain_factual`.


  ```python
  factual_explanations = regressor.explain_factual(X_test) # default low_high_percentiles=(5, 95)
  display(regressor)
  ```

  Regression also offer both regular and uncertainty plots for factual explanations with or without conjunctive rules, in almost exactly the same way as for classification.


  ```python
  factual_explanations.plot()
  factual_explanations.plot(uncertainty=True)

  factual_explanations.add_conjunctions().plot(uncertainty=True)
  ```

  Default, the confidence interval is set to a symmetric interval of 90% (defined as `low_high_percentiles=(5,95)`). The intervals can cover any user specified interval, including one-sided intervals. To define a one-sided upper-bounded 90% interval, set `low_high_percentiles=(-np.inf,90)`, and to define a one-sided lower-bounded 95% interval, set `low_high_percentiles=(5,np.inf)`. Percentiles can also be set to any other values in the range (0,100) (exclusive), and intervals do not have to be symmetric.


  ```python
  lower_bounded_explanations = regressor.explain_factual(X_test, low_high_percentiles=(5,np.inf))
  asymmetric_explanations = regressor.explain_factual(X_test, low_high_percentiles=(5,75))
  ```


  The `explore_alternatives` will work exactly the same as for classification.


  ```python
  alternative_explanations = regressor.explore_alternatives(X_test) # default low_high_percentiles=(5, 95)
  display(regressor)
  ```

  Alternative plots work as for classification.


  ```python
  alternative_explanations.plot()
  alternative_explanations.add_conjunctions().plot()
  ```


  The difference between probabilistic regression and regular regression is that the former returns a probability of the prediction being below a certain threshold. This could for example be useful when the prediction is a time to an event, such as time to death or time to failure.


  ```python
  probabilistic_factual_explanations = regressor.explain_factual(X_test, threshold=200)
  probabilistic_factual_explanations.plot()
  probabilistic_factual_explanations.plot(uncertainty=True)
  ```


  ```python
  probabilistic_alternative_explanations = regressor.explore_alternatives(X_test, threshold=200)
  probabilistic_alternative_explanations.plot()
  ```

  Regression offers many more options but to learn more about them, see the [demo_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_regression.ipynb) or the [demo_probabilistic_regression](https://github.com/Moffran/calibrated_explanations/blob/main/notebooks/demo_probabilistic_regression.ipynb) notebooks.



  A `WrapCalibratedExplainer` can also be initialized with a trained model or with a `CalibratedExplainer` object, as is examplified below.

  ```python
  fitted_classifier = WrapCalibratedExplainer(classifier.learner)
  display(fitted_classifier)
  calibrated_classifier = WrapCalibratedExplainer(classifier.explainer)
  display(calibrated_classifier)

  fitted_regressor = WrapCalibratedExplainer(regressor.learner)
  display(fitted_regressor)
  calibrated_regressor = WrapCalibratedExplainer(regressor.explainer)
  display(calibrated_regressor)
  ```

  When a calibrated explainer is re-fitted, the explainer is reinitialized.

  [Top](#calibrated-explanations-documentation)


  The implementation currently only support numerical input. Use the `utils.helper.transform_to_numeric` (released in version v0.3.1) to transform a `DataFrame` with text data into numerical form and at the same time extracting `categorical_features`, `categorical_labels`, `target_labels` (if text labels) and `mappings` (used to apply the same mappings to new data) to be used as input to the `CalibratedExplainer`. The algorithm does not currently support image data.

  See e.g. the [Conditional Fairness Experiment](evaluation/Conditional_Fairness_Experiment.ipynb) for examples on how it can be used.

  [Top](#calibrated-explanations-documentation)




  Install `calibrated-explanations` from PyPI:

  ```bash
  pip install calibrated-explanations
  ```


  Alternatively, you can install it from conda-forge:

  ```bash
  conda install -c conda-forge calibrated-explanations
  ```

  <!-- ### From GitHub:
  To install the latest version directly from the GitHub repository, use the following command:

  ```bash
  conda install git+https://github.com/Moffran/calibrated_explanations.git
  ``` -->


  The following dependencies are required and will be installed automatically if not already present:

  * [crepes](https://github.com/henrikbostrom/crepes)
  * [venn-abers](https://github.com/ip200/venn-abers)
  * [scikit-learn](https://github.com/scikit-learn/scikit-learn)
  * [matplotlib](https://matplotlib.org/)
  * [NumPy](https://numpy.org/)

  [Top](#calibrated-explanations-documentation)



  Contributions are welcome.
  Please send bug reports, feature requests or pull requests through
  the project page on [GitHub](https://github.com/Moffran/calibrated_explanations).
  You can find a detailed guide for contributions in
  [CONTRIBUTING.md](https://github.com/Moffran/calibrated_explanations/blob/main/CONTRIBUTING.md).

  [Top](#calibrated-explanations-documentation)



  For documentation, see [calibrated-explanations.readthedocs.io](https://calibrated-explanations.readthedocs.io/en/latest/?badge=latest).

  [Top](#calibrated-explanations-documentation)




  If you use `calibrated-explanations` for a scientific publication, you are kindly requested to cite one of the following papers:

  - [Löfström, H](https://github.com/Moffran). (2023). [Trustworthy explanations: Improved decision support through well-calibrated uncertainty quantification](https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1810440&dswid=6197) (Doctoral dissertation, Jönköping University, Jönköping International Business School).
  - [Löfström, H](https://github.com/Moffran)., [Löfström, T](https://github.com/tuvelofstrom)., Johansson, U., and Sönströd, C. (2024). [Calibrated Explanations: with Uncertainty Information and Counterfactuals](https://doi.org/10.1016/j.eswa.2024.123154). Expert Systems with Applications, 1-27.
  - [Löfström, T](https://github.com/tuvelofstrom)., [Löfström, H](https://github.com/Moffran)., Johansson, U., Sönströd, C., and [Matela, R](https://github.com/rudymatela). (2024). [Calibrated Explanations for Regression (preprint)](https://arxiv.org/abs/2308.16245). Machine Learning. In press.
  - [Löfström, H](https://github.com/Moffran)., [Löfström, T](https://github.com/tuvelofstrom). (2024). [Conditional Calibrated Explanations: Finding a Path Between Bias and Uncertainty](https://doi.org/10.1007/978-3-031-63787-2_17). In: Longo, L., Lapuschkin, S., Seifert, C. (eds) Explainable Artificial Intelligence. xAI 2024. Communications in Computer and Information Science, vol 2153. Springer, Cham.
  - [Löfström, T](https://github.com/tuvelofstrom)., [Löfström, H](https://github.com/Moffran)., Johansson, U. (2024). [Calibrated Explanations for Multi-class](https://raw.githubusercontent.com/mlresearch/v230/main/assets/lofstrom24a/lofstrom24a.pdf). <i>Proceedings of the Thirteenth Workshop on Conformal and Probabilistic Prediction and Applications</i>, in <i>Proceedings of Machine Learning Research</i>, PMLR 230:175-194. [Presentation](https://copa-conference.com/presentations/Lofstrom.pdf)

  The paper that originated the idea of `calibrated-explanations` is:

  - [Löfström, H.](https://github.com/Moffran), [Löfström, T.](https://github.com/tuvelofstrom), Johansson, U., & Sönströd, C. (2023). [Investigating the impact of calibration on the quality of explanations](https://link.springer.com/article/10.1007/s10472-023-09837-2). Annals of Mathematics and Artificial Intelligence, 1-18. [Code and results](https://github.com/tuvelofstrom/calibrating-explanations).


  - [Löfström, H](https://github.com/Moffran)., [Löfström, T](https://github.com/tuvelofstrom)., and [Hallberg Szabadvary, J](https://github.com/egonmedhatten). (2024). [Ensured: Explanations for Decreasing the Epistemic Uncertainty in Predictions](https://arxiv.org/abs/2410.05479). arXiv preprint arXiv:2410.05479.
  - [Löfström, T](https://github.com/tuvelofstrom)., [Rabia Yapicioglu, F](https://github.com/rabia174)., Stramiglio A., [Löfström, H](https://github.com/Moffran)., and Vitali F. (2024). [Fast Calibrated Explanations: Efficient and Uncertainty-Aware Explanations for Machine Learning Models](https://arxiv.org/abs/2410.21129). arXiv preprint arXiv:2410.21129.


  If you use `calibrated-explanations` for a scientific publication, you are kindly requested to cite one of the papers above. Bibtex entries can be found in [citing](https://github.com/Moffran/calibrated_explanations/blob/main/docs/citing.md#bibtex-entries).

  [Top](#calibrated-explanations-documentation)


  This research is funded by the [Swedish Knowledge Foundation](https://www.kks.se/) together with industrial partners supporting the research and education environment on Knowledge Intensive Product Realization SPARK at Jönköping University, Sweden, through projects: AFAIR grant no. 20200223, ETIAI grant no. 20230040, and PREMACOP grant no. 20220187. Helena Löfström was initially a PhD student in the Industrial Graduate School in Digital Retailing (INSiDR) at the University of Borås, funded by the Swedish Knowledge Foundation, grant no. 20160035.

  [Rudy Matela](https://github.com/rudymatela) has been our git guru and has helped us with the release process.

  We have used both the `ConformalPredictiveSystem` and `DifficultyEstimator` classes from [Henrik Boström](https://github.com/henrikbostrom)s [crepes](https://github.com/henrikbostrom/crepes) package to provide support for regression. The `MondrianCategorizer` class is also supported in the `WrapCalibratedExplainer` as an alternative to using the `bins` parameter to create conditional explanations.

  We have used the `VennAbers` class from [Ivan Petej](https://github.com/ip200)s [venn-abers](https://github.com/ip200/venn-abers) package to provide support for probabilistic explanations (both classification and probabilistic regression).

  The `FastExplanation`, created using the `explain_fast` method, is incorporating ideas and code from [ConformaSight](https://github.com/rabia174/ConformaSight) developed by [Fatima Rabia Yapicioglu](https://github.com/rabia174), Allesandra Stramiglio, and Fabio Vitali.

  We are using Decision Trees from `scikit-learn` in the discretizers.

  We have copied code from [Marco Tulio Correia Ribeiro](https://github.com/marcotcr)s [lime](https://github.com/marcotcr/lime) package for the `Discretizer` class.

  The `check_is_fitted` and `safe_instance` functions in `calibrated_explanations.utils` are copied from `sklearn` and `shap`.

  [Top](#calibrated-explanations-documentation)

  [build-log]:    https://github.com/Moffran/calibrated_explanations/actions/workflows/test.yml
  [build-status]: https://github.com/Moffran/calibrated_explanations/actions/workflows/test.yml/badge.svg
  [pypi-version]: https://img.shields.io/pypi/v/calibrated-explanations
  [calibrated-explanations-on-pypi]: https://pypi.org/project/calibrated-explanations


pkgId: f6ffffe8234cc2fd19037b51c98a80ae8683f9d842dd4b8e9ea0309d8b9a2122
name: python-calibration-client
arch: src
version: 11.4.0
epoch: 0
release: 1
url: https://git.xfel.eu/ITDM/calibration_client
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calibration-client-11.4.0-1.src.rpm
checksum_type: sha256
summary:
  Python Client for European XFEL Calibration Catalogue Web App available at https://in.xfel.eu/calibration

description:
  Calcat is the Web App design for Calibration Constants Data Management
  at European XFEL.
  This library (calibration_client) is a client for the RESTful APIs exposed
  by the European XFEL Calibration Constants Catalogue Web Application - calCat
  (https://in.xfel.eu/calibration).
  *Repository:*
  - https://git.xfel.eu/ITDM/calibration_client
  *Dependencies:*
  - oauthlib (https://pypi.python.org/pypi/oauthlib)
  - requests (https://github.com/psf/requests)
  - requests-oauthlib (https://github.com/requests/requests-oauthlib)
  - oauth2_xfel_client (https://git.xfel.eu/ITDM/oauth2_xfel_client)
  - pytz (https://pypi.org/project/pytz/)


pkgId: 6ff6f3c6c041099052056e9da3dbceefd788a66d25a2300a29da04e238f011e7
name: python-calibrator
arch: src
version: 0.0.13
epoch: 0
release: 1
summary: A package for calibration on deep learning models for classification tasks.
url: https://github.com/pypa/sampleproject
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calibrator-0.0.13-1.src.rpm
checksum_type: sha256
description:
  a python package for calibrating the deep learning models


  ```sh
  pip install calibrator
  ```



  ```python
  from calibrator import LocalCalibrator
  import torch

  val_logits = torch.randn(1000, 10)
  val_labels = torch.randint(0, 10, (1000,))
  test_logits = torch.randn(1000, 10)

  calibrator = LocalCalibrator()
  eps_opt = calibrator.fit(val_logits, val_labels)
  calibrated_probability = calibrator.calibrate(test_logits)
  ```


  | Datasets | Method | Method Description | ECE | ACE | MCE | CECE | PIECE |
  | ------------------ | ----------- | ---------- | ---------- |  -------- | ---------- |  -------- | ---------- |
  | CIFAR-10 |   |   |   |   |   |   |
  | CIFAR-100 |   |   |   |   |   |   |
  | ImageNet-1K |   |   |   |   |   |   |



  | Calibration methods | Description | Paper | Source Code | Status |
  | ------------------ | ----------- | ---------- | ---------- | -------- |
  | Temperature Scaling (TS) | ICML 2017 | [paper](https://arxiv.org/abs/1706.04599) | [code](https://github.com/gpleiss/temperature_scaling/blob/master/temperature_scaling.py) | ✅ Implemented |
  | Parameterized Temperature Scaling (PTS) | ECCV 2022 | [paper](https://arxiv.org/abs/2102.12182) | [ code](https://github.com/tochris/pts-uncertainty) | 🔜 Pending |
  | Ensemble Temperature Scaling (ETS) | ICML 2020 | [paper](https://proceedings.mlr.press/v119/zhang20k.html) | [code](https://github.com/yashchandra/ensemble-calibration) | 🔜 Pending |
  | Class-based Temperature Scaling (CTS) | EUSIPCO 2021 | [paper](https://ieeexplore.ieee.org/document/9616219) | unavailable | 🔜 Pending |
  | Group Calibration with Temperature Scaling (GCTS)| NeurIPS 2023 | [paper](https://arxiv.org/abs/2306.04985) | [code](https://github.com/ThyrixYang/group_calibration) | 🔜 Pending |
  | Proximity-informed Calibration (PROCAL) | NeurIPS 2023 | [paper](https://arxiv.org/abs/2306.04590) | [code](https://github.com/MiaoXiong2320/ProximityBias-Calibration) | 🔜 Pending |
  | Isotonic Regression |   |   |   |   |
  | Histogram Binning |   |   |   |   |
  | Platt Scaling |   |   |   |   |
  | Bayesian Binning into Quantiles (BBQ) | AAAI 2015 | [paper](https://ojs.aaai.org/index.php/AAAI/article/view/9602) |  | 🔜 Pending |
  | BetaCal |   |   |   |   |
  | Scaling-Binning Calibrator | NeuIPS 2019 | [paper](https://arxiv.org/pdf/1909.10155) | [code](https://pypi.org/project/uncertainty-calibration/) | 🔜 Pending |
  | Dirichlet calibration |  NeurIPS 2019 |  [paper](https://arxiv.org/abs/1910.12656) | [code](https://github.com/dirichletcal/experiments_neurips) | 🔜 Pending |



  | Calibration Losses | Description | Paper | Source Code | Status |
  | ------------------ | ----------- | ---------- | ---------- | -------- |
  | Focal Loss |   |   |   |   |
  | Dual Focal Loss |   |   |   |   |
  | Adaptive Focal Loss |   |   |   |   |




  | Metrics | Description | Paper | Source Code | Status |
  | ------------------ | ----------- | ---------- | ---------- | -------- |
  | Expected Calibration Error (ECE) | AAAI 2015 | [paper](https://ojs.aaai.org/index.php/AAAI/article/view/9602) | [code](https://github.com/torrvision/focal_calibration/blob/main/Metrics/metrics.py) | ✅ Implemented |
  | Maximum Calibration Error (MCE) | AAAI 2015 | [paper](https://ojs.aaai.org/index.php/AAAI/article/view/9602) | [code](https://github.com/torrvision/focal_calibration/blob/main/Metrics/metrics.py) | 🔜 Pending |
  | Adaptive Calibration Error (ACE) | CVPRW 2019 | [paper](https://openaccess.thecvf.com/content_CVPRW_2019/papers/Uncertainty%20and%20Robustness%20in%20Deep%20Visual%20Learning/Nixon_Measuring_Calibration_in_Deep_Learning_CVPRW_2019_paper.pdf) | [code](https://github.com/torrvision/focal_calibration/blob/main/Metrics/metrics.py) | ✅ Implemented |
  | Classwise Expected Calibration Error (CECE) | NeurIPS 2019 | [paper](https://arxiv.org/abs/1910.12656) | [code](https://github.com/torrvision/focal_calibration/blob/main/Metrics/metrics.py) | ✅ Implemented |
  | Negative Log Likelihood (NLL) |   |   |   |   |
  | Accuracy |   |   |   |   |
  | Proximity-informed Expected Calibration Error (PIECE) | NeurIPS 2023 | [paper](https://arxiv.org/abs/2306.04590) | [code](https://github.com/MiaoXiong2320/ProximityBias-Calibration) | 🔜 Pending |


  | Datasets | Description | Paper | Source Code | Status |
  | ------------------ | ----------- | ---------- | ---------- | -------- |
  | CIFAR-10 |   |   |   |   |
  | CIFAR-100 |   |   |   |   |
  | ImageNet |   |   |   |   |
  | ImageNet-100 |   |   |   |   |
  | ImageNet-1000 |   |   |   |   |


  | Datasets | Description | Paper | Source Code | Status |
  | ------------------ | ----------- | ---------- | ---------- | -------- |
  | CIFAR-10 |   |   |   |   |
  | CIFAR-100 |   |   |   |   |
  | ImageNet |   |   |   |   |
  | ImageNet-100 |   |   |   |   |
  | ImageNet-1000 |   |   |   |   |


pkgId: 5bacfb0d22d678951fbe30308738de3c7d54be5fff11c3813a0637f1bab05b30
name: python-calibreweb
arch: src
version: 0.6.23
epoch: 0
release: 1
summary: Web app for browsing, reading and downloading eBooks stored in a Calibre database.
url: https://github.com/janeczku/calibre-web
rpm_license: GPLv3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calibreweb-0.6.23-1.src.rpm
checksum_type: sha256
description:
  After 6 years of more or less intensive programming on Calibre-Web, I need a break.
  The last few months, maintaining Calibre-Web has felt more like work than a hobby. I felt pressured and teased by people to solve "their" problems and merge PRs for "their" Calibre-Web.
  I have turned off all notifications from Github/Discord and will now concentrate undisturbed on the development of “my” Calibre-Web over the next few weeks/months.
  I will look into the issues and maybe also the PRs from time to time, but don't expect a quick response from me.



  Calibre-Web is a web app that offers a clean and intuitive interface for browsing, reading, and downloading eBooks using a valid [Calibre](https://calibre-ebook.com) database.

  [![License](https://img.shields.io/github/license/janeczku/calibre-web?style=flat-square)](https://github.com/janeczku/calibre-web/blob/master/LICENSE)
  ![Commit Activity](https://img.shields.io/github/commit-activity/w/janeczku/calibre-web?logo=github&style=flat-square&label=commits)
  [![All Releases](https://img.shields.io/github/downloads/janeczku/calibre-web/total?logo=github&style=flat-square)](https://github.com/janeczku/calibre-web/releases)
  [![PyPI](https://img.shields.io/pypi/v/calibreweb?logo=pypi&logoColor=fff&style=flat-square)](https://pypi.org/project/calibreweb/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/calibreweb?logo=pypi&logoColor=fff&style=flat-square)](https://pypi.org/project/calibreweb/)
  [![Discord](https://img.shields.io/discord/838810113564344381?label=Discord&logo=discord&style=flat-square)](https://discord.gg/h2VsJ2NEfB)

  <details>
  <summary><strong>Table of Contents</strong> (click to expand)</summary>

  1. [About](#calibre-web)
  2. [Features](#features)
  3. [Installation](#installation)
     - [Installation via pip (recommended)](#installation-via-pip-recommended)
     - [Quick start](#quick-start)
     - [Requirements](#requirements)
  4. [Docker Images](#docker-images)
  5. [Contributor Recognition](#contributor-recognition)
  6. [Contact](#contact)
  7. [Contributing to Calibre-Web](#contributing-to-calibre-web)

  </details>


  *This software is a fork of [library](https://github.com/mutschler/calibreserver) and licensed under the GPL v3 License.*

  ![Main screen](https://github.com/janeczku/calibre-web/wiki/images/main_screen.png)



  - Modern and responsive Bootstrap 3 HTML5 interface
  - Full graphical setup
  - Comprehensive user management with fine-grained per-user permissions
  - Admin interface
  - Multilingual user interface supporting 20+ languages ([supported languages](https://github.com/janeczku/calibre-web/wiki/Translation-Status))
  - OPDS feed for eBook reader apps
  - Advanced search and filtering options
  - Custom book collection (shelves) creation
  - eBook metadata editing and deletion support
  - Metadata download from various sources (extensible via plugins)
  - eBook conversion through Calibre binaries
  - eBook download restriction to logged-in users
  - Public user registration support
  - Send eBooks to E-Readers with a single click
  - Sync Kobo devices with your Calibre library
  - In-browser eBook reading support for multiple formats
  - Upload new books in various formats, including audio formats
  - Calibre Custom Columns support
  - Content hiding based on categories and Custom Column content per user
  - Self-update capability
  - "Magic Link" login for easy access on eReaders
  - LDAP, Google/GitHub OAuth, and proxy authentication support




  1. Create a virtual environment for Calibre-Web to avoid conflicts with existing Python dependencies
  2. Install Calibre-Web via pip: `pip install calibreweb` (or `pip3` depending on your OS/distro)
  3. Install optional features via pip as needed, see [this page](https://github.com/janeczku/calibre-web/wiki/Dependencies-in-Calibre-Web-Linux-and-Windows) for details
  4. Start Calibre-Web by typing `cps`

  *Note: Raspberry Pi OS users may encounter issues during installation. If so, please update pip (`./venv/bin/python3 -m pip install --upgrade pip`) and/or install cargo (`sudo apt install cargo`) before retrying the installation.*

  Refer to the Wiki for additional installation examples: [manual installation](https://github.com/janeczku/calibre-web/wiki/Manual-installation), [Linux Mint](https://github.com/janeczku/calibre-web/wiki/How-To:-Install-Calibre-Web-in-Linux-Mint-19-or-20), [Cloud Provider](https://github.com/janeczku/calibre-web/wiki/How-To:-Install-Calibre-Web-on-a-Cloud-Provider).



  1. Open your browser and navigate to `http://localhost:8083` or `http://localhost:8083/opds` for the OPDS catalog
  2. Log in with the default admin credentials
  3. If you don't have a Calibre database, you can use [this database](https://github.com/janeczku/calibre-web/raw/master/library/metadata.db) (move it out of the Calibre-Web folder to prevent overwriting during updates)
  4. Set `Location of Calibre database` to the path of the folder containing your Calibre library (metadata.db) and click "Save"
  5. Optionally, use Google Drive to host your Calibre library by following the [Google Drive integration guide](https://github.com/janeczku/calibre-web/wiki/G-Drive-Setup#using-google-drive-integration)
  6. Configure your Calibre-Web instance via the admin page, referring to the [Basic Configuration](https://github.com/janeczku/calibre-web/wiki/Configuration#basic-configuration) and [UI Configuration](https://github.com/janeczku/calibre-web/wiki/Configuration#ui-configuration) guides


  - **Username:** admin
  - **Password:** admin123



  - Python 3.7+
  - [Imagemagick](https://imagemagick.org/script/download.php) for cover extraction from EPUBs (Windows users may need to install [Ghostscript](https://ghostscript.com/releases/gsdnld.html) for PDF cover extraction)
  - Windows users need to install [libmagic for 32bit python](https://gnuwin32.sourceforge.net/downlinks/file.php) or [libmagic for 64bit python](https://github.com/nscaife/file-windows/releases/tag/20170108), depending on the python version; The files need to be installed in path (e.g. script folder of your Calibre-Web venv, or in the root folder of Calibre-Web
  - Optional: [Calibre desktop program](https://calibre-ebook.com/download) for on-the-fly conversion and metadata editing (set "calibre's converter tool" path on the setup page)
  - Optional: [Kepubify tool](https://github.com/pgaskin/kepubify/releases/latest) for Kobo device support (place the binary in `/opt/kepubify` on Linux or `C:\Program Files\kepubify` on Windows)



  Pre-built Docker images are available in the following Docker Hub repositories (maintained by the LinuxServer team):


  - [Docker Hub](https://hub.docker.com/r/linuxserver/calibre-web)
  - [GitHub](https://github.com/linuxserver/docker-calibre-web)
  - [GitHub - Optional Calibre layer](https://github.com/linuxserver/docker-mods/tree/universal-calibre)

    Include the environment variable `DOCKER_MODS=linuxserver/mods:universal-calibre` in your Docker run/compose file to add the Calibre `ebook-convert` binary (x64 only). Omit this variable for a lightweight image.

    Both the Calibre-Web and Calibre-Mod images are automatically rebuilt on new releases and updates.

    - Set "Path to Calibre Binaries" to `/usr/bin`
    - Set "Path to Unrar" to `/usr/bin/unrar`



  We would like to thank all the [contributors](https://github.com/janeczku/calibre-web/graphs/contributors) and maintainers of Calibre-Web for their valuable input and dedication to the project. Your contributions are greatly appreciated.



  Join us on [Discord](https://discord.gg/h2VsJ2NEfB)

  For more information, How To's, and FAQs, please visit the [Wiki](https://github.com/janeczku/calibre-web/wiki)



  Check out our [Contributing Guidelines](https://github.com/janeczku/calibre-web/blob/master/CONTRIBUTING.md)


pkgId: 79455e69b5a1bd1a73c2a99c2e360edc17d7624d8eacf35a5ffe5d6b7f7a3e8f
name: python-calibsunapi
arch: src
version: 0.0.16
epoch: 0
release: 1
summary: Lightweight client to interact with Calibsun's API
url: https://github.com/pypa/sampleproject
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calibsunapi-0.0.16-1.src.rpm
checksum_type: sha256
description:
  Calibsunapi is a Python client for interacting with the CalibSun API. This package allows developers to easily integrate and communicate with the CalibSun services, providing functionalities such as data retrieval, data submission, and various API interactions.

  It is designed to be simple, efficient, and easy to use, and provides different abstractions making it an ideal choice for developers looking to leverage CalibSun's capabilities in their Python applications.




  Having troubles installing or using Calibsunapi ? Feel free to ask questions at any of the contact methods or file an issue on [Calibsunapi's GitHub page](https://github.com/SOLAIS-FORECAST/api-python-client).


  Documentation : https://github.com/SOLAIS-FORECAST/api-python-client


pkgId: 550877595804847a3a0eda5e341ed55f5ff909c92827a14da198a7bb95c8515b
name: python-caliper-reader
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: A Python library for reading Caliper .cali files
url: https://github.com/LLNL/Caliper
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caliper-reader-0.4.0-1.src.rpm
checksum_type: sha256
description:
  This Python package reads the native .cali files produced by the
  [Caliper](https://github.com/LLNL/Caliper) performance profiling
  library.
  You can install caliper-reader with pip:
      $ pip install caliper-reader
  Alternatively, add the `python/caliper-reader` path in the cloned
  Caliper repository to `PYTHONPATH`.

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


pkgId: b0f494f8f89791b3c562f245319e98962459dd9c553570fceca2df121055ab97
name: python-calitp_map_utils
arch: src
version: 2024.5.23
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/calitp_map_utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calitp_map_utils-2024.5.23-1.src.rpm
checksum_type: sha256
description:
  This Svelte app and related Python code are intended to provide a minimal, embeddable interactive map for embedding
  in Jupyter notebooks, especially those built into static websites using JupyterBook. By using `IFrame` widgets to
  call the deployed application with a specific URL containing the desired state, a Jupyter user can render geospatial
  data that has been stored in GCS. This avoids the problem of `ipyleaflet` and other Jupyter visualization widgets
  that store their data in the static HTML of a rendered JupyterBook webpage. The Python code in `calitp_map_utils`
  defines the contract between data producers (i.e. notebooks) and the data consumer (i.e. the Svelte app) as well
  as provides some utilities for validating the GeoJSON of specific analysis types.



  As mentioned above, `calitp_map_utils` is a small utility library that defines Pydantic types that can be used for
  data validation as well as Typescript types for type-hinting in the Svelte app. Also, the library contains
  a few CLI commands to facilitate validating pre-existing data with those types and/or generate a quick URL
  with state for testing.

  A GitHub Action workflow exists to build the package and publish it to PyPi. Be sure to bump the version date in `pyproject.toml` in any pull request that updates the library.



  You can run a development server locally; use the calitp-map-utils CLI to generate a valid state URL for testing.

  ```bash
  npm run dev
  echo '{ "legend_url": "https://storage.googleapis.com/calitp-map-tiles/legend_test.svg", "layers": [ {"name": "D7 State Highway Network", "url": "https://storage.googleapis.com/calitp-map-tiles/d7_shn.geojson.gz", "type": "state_highway_network"}, {"name": "California High Quality Transit Areas - Stops", "url": "https://storage.googleapis.com/calitp-map-tiles/ca_hq_transit_stops.geojson.gz"}, {"name": "LA Metro Bus Speed Maps AM Peak", "url": "https://storage.googleapis.com/calitp-map-tiles/metro_am.geojson.gz", "type": "speedmap"} ] }' | gzip | basenc --base64url | poetry run python -m calitp_map_utils validate-state --base64url --compressed --data --verbose --host=http://localhost:5173
  ...
  URL: localhost:5173?state=H4sIAO38fWQC_6WSMU_DMBCF_8opM03GSt0KDAwUgcqGkHVNr47B8RnfhZJW_e8kbVE6FAY6WSef3_fek7dZwJqyCYTG-yvIPLaUpJtftj832e0Y5opKcOdstcYWHkjXnN6zbr9Jvl-pVKNMikKUE1rKLbP1hNFJXnJdlOidxlGNcaTOkxTLsZEq5Jb4Tbg7N72WtnHPkx5mqgPMhAEWE0dK6kiOhndXMNi86SArTsHh3ig8NT21heeEQZzCNBEKjLosHOUC7yWa6sPoQdVIr3Y-yLHSv13fT2FGmhiuG4F5JFrCDKPAdAaPhJd0XPeyBuvfWu5Z3fb5Yl_3f0GN5zAk2TDXw7RY8NfJhEKdmik5rJw9-VBkKSzNPzMcXyuJ5vJps9039EE5DrACAAA%3D
  ```

  You can point the `--host` parameter at a Netlify URL to provide an easy way to test against an already-published version of the app. As of 2023-07-21
  the production URL is [https://embeddable-maps.calitp.org](https://embeddable-maps.calitp.org) but you can also use preview
  Netlify sites deployed via `netlify deploy ...` with `--alias=some-alias` and/or without the `--prod` flag (see below).



  The site is deployed to production on merges to main, as defined in [../../.github/workflows/deploy-apps-maps.yml](../../.github/workflows/deploy-apps-maps.yml).

  You may also deploy manually with the following:

  ```bash
  (from the apps/maps folder)
  npm run build
  netlify deploy --site=embeddable-maps-calitp-org --dir=build
  ```

  By default, this deploys a preview site with a generated alias prefix. You may pass an explicit alias with `--alias=<some-alias>`
  or deploy to production with `--prod`.

  We could look into using the [Netlify adapter](https://kit.svelte.dev/docs/adapter-netlify) at some point.


pkgId: b6c82af02974210ff68940053241c8161ab494d23139afe3c1513b7550b5cffe
name: python-calkit-python
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Reproducibility simplified.
url: https://github.com/calkit/calkit
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calkit-python-0.4.0-1.src.rpm
checksum_type: sha256
description:
  [Calkit](https://calkit.io) helps simplify reproducibility,
  acting as a layer on top of
  [Git](https://git-scm.com/), [DVC](https://dvc.org/),
  [Docker](https://docker.com),
  and adds a domain-specific data model
  such that all aspects of the research process can be fully described in a
  single repository and therefore easily consumed by others.



  - [Microsoft Office (Word and Excel)](https://petebachant.me/office-repro/)
  - [Reproducible OpenFOAM simulations](https://petebachant.me/reproducible-openfoam/)



  If your work is reproducible, that means that someone else can "run" it and
  calculate the same results or outputs.
  This is a major step towards addressing
  [the replication crisis](https://en.wikipedia.org/wiki/Replication_crisis)
  and has some major benefits for both you as an individual and the research
  community:

  1. You will avoid mistakes caused by, e.g., running an old version of a script
     and including a figure that wasn't created after fixing a bug in the data
     processing pipeline.
  2. Since your project is "runnable," it's more likely that someone else will be
     able to reuse part of your work to run it in a different context, thereby
     producing a bigger impact and accelerating the pace of discovery.
     If someone can take what you've done and use it to calculate a
     prediction, you have just produced truly useful knowledge.



  Git, GitHub, DVC, Docker et al. are amazing tools/platforms, but their
  use involves multiple fairly difficult learning curves,
  and tying them together might mean developing something new for each project.
  Our goal is to provide a single tool and platform to unify all of these so
  that there is a single, gentle learning curve.
  However, it is not our goal to hide or replace these underlying components.
  Advanced users can use them directly, but new users aren't forced to, which
  helps them get up and running with less effort and training.
  Calkit should help users understand what is going on under the hood without
  forcing them to work at that lower level of abstraction.



  To install Calkit, [Git](https://git-scm.com) and Python must be installed.
  If you want to use [Docker](https://docker.com) containers,
  which is typically a good idea,
  that should also be installed.
  For Python, we recommend
  [Mambaforge](https://conda-forge.org/miniforge/).
  If you're a Windows user and decide to install Mambaforge or any other
  Conda-based distribution,
  e.g., Anaconda, you'll probably want to ensure that environment is
  [activated by default in Git Bash](https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473).

  After Python is installed, run

  ```sh
  pip install calkit-python
  ```



  The Calkit cloud platform (https://calkit.io) serves as a project
  management interface and a DVC remote for easily storing all versions of your
  data/code/figures/publications, interacting with your collaborators,
  reusing others' research artifacts, etc.

  After signing up, visit the [settings](https://calkit.io/settings) page
  and create a token.
  Then run

  ```sh
  calkit config set token ${YOUR_TOKEN_HERE}
  ```

  Then, inside a project repo you'd like to connect to the cloud, run

  ```sh
  calkit config setup-remote
  ```

  This will setup the Calkit DVC remote, such that commands like `dvc push` will
  allow you to push versions of your data or pipeline outputs to the cloud
  for safe storage and sharing with your collaborators.



  Calkit creates a simple human-readable "database" inside the `calkit.yaml`
  file, which serves as a way to store important information about the project,
  e.g., what question(s) it seeks to answer,
  what files should be considered datasets, figures, publications, etc.
  The Calkit cloud reads this database and registers the various entities
  as part of the entire ecosystem such that if a project is made public,
  other researchers can find and reuse your work to accelerate their own.



  1. Be opinionated. Users should not be forced to make unimportant decisions.
     However, if they disagree, they should have the ability to change the
     default behavior. The most common use case should be default.
     Commands that are commonly executed as groups should be combined, but
     still available to be run individually if desired.
  1. Commits should ideally be made automatically as part of actions that make
     changes to the project repo. For
     example, if a new object is added via the CLI, a commit should be made
     right then unless otherwise specified. This saves the trouble of running
     multiple commands and encourages atomic commits.
  1. Pushes should require explicit input from the user.
     It is still TBD whether or not a pull should automatically be
     made, though in general we want to encourage trunk-based development, i.e.,
     only working on a single branch. One exception might be for local
     experimentation that has a high likelihood of failure, in which case a
     branch can be a nice way to throw those changes away.
     Multiple branches should probably not live in the cloud, however, except
     for small, quickly merged pull requests.
  1. Idempotency is always a good thing. Unnecessary state is bad. For example,
     we should not encourage caching pipeline outputs for operations that are
     cheap. Caching should happen either for state that is valuable on its
     own, like a figure, or for an intermediate result that is expensive to
     generate.
  1. There should be the smallest number of
     frequently used commands as possible, and they should require at little
     memorization as possible to know how to execute, e.g., a user should be
     able to keep running `calkit run` and that's all they really need to do
     to make sure the project is up-to-date.


pkgId: dd1aab5ce218689661e9d6a1391bc9da6c335fc64af8b6ac2e50c866922203f6
name: python-calkit-python
arch: src
version: 0.8.0
epoch: 0
release: 1
summary: Reproducibility simplified.
url: https://github.com/calkit/calkit
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calkit-python-0.8.0-1.src.rpm
checksum_type: sha256
description:
  Calkit is a lightweight framework for doing reproducible research.
  It acts as a top-level layer to integrate and simplify the use of enabling
  technologies such as
  [Git](https://git-scm.com/),
  [DVC](https://dvc.org/),
  [Conda](https://docs.conda.io/en/latest/),
  and [Docker](https://docker.com).
  Calkit also adds a domain-specific data model
  such that all aspects of the research process can be fully described in a
  single repository and therefore easily consumed by others.

  Our goal is to make reproducibility easier so it becomes more common.
  To do this, we try to make it easy for users to follow two simple rules:

  1. **Keep everything in version control.** This includes large files like
     datasets, enabled by DVC. The [Calkit cloud](https://calkit.io)
     serves as a simple default DVC remote storage location for those who do not
     want to manage their own infrastructure.
  2. **Generate all important artifacts with a single pipeline.** There should be
     no special instructions required to reproduce a project's artifacts.
     It should be as simple as calling `calkit run`.
     The DVC pipeline (in a project's `dvc.yaml` file) is therefore the main
     thing to "build" throughout a research project.
     Calkit provides helper functionality to build pipeline stages that
     keep computational environments up-to-date and label their outputs for
     convenient reuse.



  - [Jupyter notebook as a DVC pipeline](docs/tutorials/notebook-pipeline.md)
  - [Keeping track of conda environments](docs/tutorials/conda-envs.md)
  - [Defining and executing manual procedures](docs/tutorials/procedures.md)
  - [Adding a new LaTeX-based publication with its own Docker build environment](docs/tutorials/adding-latex-pub-docker.md)
  - [A reproducible workflow using Microsoft Office (Word and Excel)](https://petebachant.me/office-repro/)
  - [Reproducible OpenFOAM simulations](https://petebachant.me/reproducible-openfoam/)



  If your work is reproducible, that means that someone else can "run" it and
  calculate the same results or outputs.
  This is a major step towards addressing
  [the replication crisis](https://en.wikipedia.org/wiki/Replication_crisis)
  and has some major benefits for both you as an individual and the research
  community:

  1. You will avoid mistakes caused by, e.g., running an old version of a script
     and including a figure that wasn't created after fixing a bug in the data
     processing pipeline.
  2. Since your project is "runnable," it's more likely that someone else will be
     able to reuse part of your work to run it in a different context, thereby
     producing a bigger impact and accelerating the pace of discovery.
     If someone can take what you've done and use it to calculate a
     prediction, you have just produced truly useful knowledge.



  Git, GitHub, DVC, Docker et al. are amazing tools/platforms, but their
  use involves multiple fairly difficult learning curves,
  and tying them together might mean developing something new for each project.
  Our goal is to provide a single tool and platform to unify all of these so
  that there is a single, gentle learning curve.
  However, it is not our goal to hide or replace these underlying components.
  Advanced users can use them directly, but new users aren't forced to, which
  helps them get up and running with less effort and training.
  Calkit should help users understand what is going on under the hood without
  forcing them to work at that lower level of abstraction.



  To install Calkit, [Git](https://git-scm.com) and Python must be installed.
  If you want to use [Docker](https://docker.com) containers,
  which is typically a good idea,
  that should also be installed.
  For Python, we recommend
  [Mambaforge](https://conda-forge.org/miniforge/).
  If you're a Windows user and decide to install Mambaforge or any other
  Conda-based distribution,
  e.g., Anaconda, you'll probably want to ensure that environment is
  [activated by default in Git Bash](https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473).

  After Python is installed, run

  ```sh
  pip install calkit-python
  ```



  The Calkit cloud platform (https://calkit.io) serves as a project
  management interface and a DVC remote for easily storing all versions of your
  data/code/figures/publications, interacting with your collaborators,
  reusing others' research artifacts, etc.

  After signing up, visit the [settings](https://calkit.io/settings) page
  and create a token.
  Then run

  ```sh
  calkit config set token ${YOUR_TOKEN_HERE}
  ```

  Then, inside a project repo you'd like to connect to the cloud, run

  ```sh
  calkit config setup-remote
  ```

  This will setup the Calkit DVC remote, such that commands like `dvc push` will
  allow you to push versions of your data or pipeline outputs to the cloud
  for safe storage and sharing with your collaborators.



  Calkit creates a simple human-readable "database" inside the `calkit.yaml`
  file, which serves as a way to store important information about the project,
  e.g., what question(s) it seeks to answer,
  what files should be considered datasets, figures, publications, etc.
  The Calkit cloud reads this database and registers the various entities
  as part of the entire ecosystem such that if a project is made public,
  other researchers can find and reuse your work to accelerate their own.



  1. Be opinionated. Users should not be forced to make unimportant decisions.
     However, if they disagree, they should have the ability to change the
     default behavior. The most common use case should be default.
     Commands that are commonly executed as groups should be combined, but
     still available to be run individually if desired.
  1. Commits should ideally be made automatically as part of actions that make
     changes to the project repo. For
     example, if a new object is added via the CLI, a commit should be made
     right then unless otherwise specified. This saves the trouble of running
     multiple commands and encourages atomic commits.
  1. Pushes should require explicit input from the user.
     It is still TBD whether or not a pull should automatically be
     made, though in general we want to encourage trunk-based development, i.e.,
     only working on a single branch. One exception might be for local
     experimentation that has a high likelihood of failure, in which case a
     branch can be a nice way to throw those changes away.
     Multiple branches should probably not live in the cloud, however, except
     for small, quickly merged pull requests.
  1. Idempotency is always a good thing. Unnecessary state is bad. For example,
     we should not encourage caching pipeline outputs for operations that are
     cheap. Caching should happen either for state that is valuable on its
     own, like a figure, or for an intermediate result that is expensive to
     generate.
  1. There should be the smallest number of
     frequently used commands as possible, and they should require as little
     memorization as possible to know how to execute, e.g., a user should be
     able to keep running `calkit run` and that's all they really need to do
     to make sure the project is up-to-date.


pkgId: 9ffbf0990eda392f81f7bc16f79162f12f6970e30e9ad0259d506cf7aaf5f8bc
name: python-call-function-with-timeout
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: Python Call function with timeouts
url: https://github.com/yang445786754/call_function_with_timeout
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-call-function-with-timeout-1.1.1-1.src.rpm
checksum_type: sha256
description:
  A library to make your funtions support timeouts

  Example

  ```python
  import time
  from call_function_with_timeout import SetTimeout


  def do_something(a=0, b=0):
      time.sleep(10)
      print(a + b)


  func_with_timeout = SetTimeout(do_something, timeout=5)

  is_done, is_timeout, erro_message, results = func_with_timeout(a=12, b=8)

  ```
  You will find that after the method is called to the time you specified, it will return and kill the currently executing thread.

  You can also use it as a decorator

  ```python
  import time
  from call_function_with_timeout import SetTimeoutDecorator


  @SetTimeoutDecorator(timeout=5)
  def do_something(a=0, b=0):
      time.sleep(10)
      print(a + b)


  is_done, is_timeout, erro_message, results = do_something(a=12, b=8)

  ```


pkgId: 5d4bcc3021791b04ee616b90b2eca604103663df75a17dad63adc474c9692296
name: python-call-throttle
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: A decorator used to throttle calls of regular functions and asyncio coroutines.
url: https://github.com/ktolstikhin/call-throttle.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-call-throttle-0.4.0-1.src.rpm
checksum_type: sha256
description:
  ![python](https://img.shields.io/pypi/pyversions/call-throttle.svg)
  ![version](https://img.shields.io/pypi/v/call-throttle.svg)
  ![downloads](https://img.shields.io/pypi/dm/call-throttle.svg)
  ![format](https://img.shields.io/pypi/format/call-throttle.svg)

  This package provides decorators which can be used to throttle calls of regular Python functions and asyncio coroutines.



  Use [pip](https://pip.pypa.io/en/stable/) package installer for Python:
  ```bash
  python -m pip install --upgrade call-throttle
  ```
  Make sure you have Python 3.7 or later installed.



  Here is a basic example for how to use the `throttle` decorator with functions and coroutines:
  ```python
  import time
  import asyncio
  from datetime import timedelta

  from call_throttle import throttle


  @throttle(calls=1, period=timedelta(seconds=1))
  def func():
      time.sleep(1)


  @throttle(calls=1, period=timedelta(seconds=2))
  async def coro():
      await asyncio.sleep(1)
  ```
  If passing `raise_on_throttle=True` to `@throttle(...)`, then a `call_throttle.ThrottleException` is raised when a decorated function or coroutine is called more times than the defined `calls` limit within the specified time `period`.



  This is a free software licensed under the terms of the MIT License.


pkgId: 5a065e7ee543c775a9c487ca5689031cb160f95b3024f95c2f28923692807df0
name: python-calleee
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Argument matchers for unittest.mock
url: https://github.com/untidy-hair/calleee
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calleee-0.4.0-1.src.rpm
checksum_type: sha256
description:
  Argument matchers for *unittest.mock*
  |Version| |Development Status| |Python Versions| |License| |Build Status|
  More robust tests
  ~~~~~~~~~~~~~~~~~
  Python's `mocking library`_ (or its `backport`_ for Python <3.3) is simple, reliable, and easy to use.
  But it is also a little lacking when it comes to asserting what calls a mock has received.
  You can be either very specific::
      my_mock.assert_called_once_with(42, some_foo_object, 'certain string')
  or extremely general::
      my_mock.assert_called_with(ANY, ANY, ANY)
      
  | The former can make your tests over-specified, and thus fragile.


pkgId: 8f2c9bf9c92b000a2b429d91469511b9a01e9ed2daea9b3ec8ad5913b7c368f9
name: python-callingCardsTools
arch: src
version: 1.8.0
epoch: 0
release: 1
summary: A collection of objects and functions to work with calling cards sequencing tools
url: https://cmatkhan.github.io/callingCardsTools/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-callingCardsTools-1.8.0-1.src.rpm
checksum_type: sha256
description:
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10042067.svg)](https://doi.org/10.5281/zenodo.10042067)
  [![callingCardsTools Test Coverage](https://github.com/cmatKhan/callingCardsTools/actions/workflows/codecov.yml/badge.svg?branch=main)](https://github.com/cmatKhan/callingCardsTools/actions/workflows/codecov.yml)
  [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/callingcardstools/README.html)



  `CallingCardsTools` Provides both an API and a number of cmd line tools
  for processing raw Calling Cards data. This is used in the
  [nf-core/callingcards](https://github.com/nf-core/callingcards) pipeline,
  which provides a workflow to process both yeast and mammals Calling Cards data.



  [Served Documentation](https://cmatkhan.github.io/callingCardsTools/) provides
  information on filetypes and the API. For help with the cmd line tools,
  simply install callingcardstools (see below) and do:

  ```bash
  callingcardstools --help
  ```

  Each of the cmd line tools also provides a `--help` message.



  callingCardsTools is available through bioconda:

  ```bash
  conda install -c bioconda callingcardstools
  ```

  pypi:

  ```bash
  pip install callingcardstools
  ```

  or github (this will be the most current version):

  ```bash
  pip install git+https://github.com/cmatkhan/callingCardsTools.git
  ```

  After installing, you can get help with the cmd line tools by doing:

  ```bash
  callingcardstools --help
  ```



  - A singularity container is hosted on
    [Galaxyhub](https://depot.galaxyproject.org/singularity/). If you go to this
    site, make sure the 'c's have loaded and then search for 'callingcardstools'.
    There is a container for each version which is on bioconda. Make sure you get
    the correct version.

  - A docker container is hosted on
    [quay (and biocontainers)](https://quay.io/repository/biocontainers/callingcardstools).
    Again, make sure you get the correct version.



  1. install [poetry](https://python-poetry.org/)

  - I prefer to set the default location of the virtual environment to the
    project directory. You can set that as a global configuration for your
    poetry installation like so: `poetry config virtualenvs.in-project true`

  2. git clone the repo

  3. cd into the repo and issue the command `poetry install`

  4. shell into the virtual environment with `poetry shell`

  5. you can `pip install -e .` to install the package in editable mode. This is
     useful if you want to test the cmd line interface as you make changes to the
     source code.


pkgId: 9ae2d11e0f2e5c3954620ead1ee78894b796d1c769204b83e221daffa369fdb3
name: python-callite
arch: src
version: 0.2.9
epoch: 0
release: 1
summary: Slim Redis RPC implementation
url: https://www.gri.ai
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-callite-0.2.9-1.src.rpm
checksum_type: sha256
description:
  callite is a lightweight Remote Procedure Call (RPC) implementation over Redis, designed to facilitate communication between different components of a distributed system. It minimizes dependencies and offers a simple yet effective solution for decoupling complex systems, thus alleviating potential library conflicts.



  Before using callite, ensure you have a Redis instance running. You can start a Redis server using the default settings or configure it as per your requirements.



  To implement the Callite server, follow these steps:

  1. Import the `RPCService` class from `server.rpc_server`.
  2. Define your main class and initialize the RPC service with the Redis URL and service name.
  3. Register your functions with the RPC service using the `register` decorator.
  4. Run the RPC service indefinitely.

  Here's an example server implementation:

  ```python
  from callite.server import RPCService


  class Main:
      def __init__(self):
          service = "service"
          redis_url = "redis://redis:6379/0"
          self.rpc_service = RPCService(redis_url, 'my_service')

      def run(self):
          @self.rpc_service.register
          def healthcheck():
              return "OK"

          @self.rpc_service.register
          def foo(paramX, paramY):
              // Do something with paramX and paramY
              return "OK"


          self.rpc_service.run_forever()


  if __name__ == "__main__":
      Main().run()
  ```



  Once the server is set up, you can call functions remotely from the client side. Follow these steps to call functions:

  1. Import the `RPCClient` class from `client.rpc_client`.
  2. Define your client class and initialize the RPC client with the Redis URL and service name.
  3. Call the function using the `execute` method of the RPC client.
  4. Optionally, you can pass arguments and keyword arguments to the function.

  Here's an example client implementation:

  ```python
  import time
  from callite.client.rpc_client import RPCClient


  class Healthcheck():
      def __init__(self):
          self.r = RPCClient("redis://redis:6379/0", "my_service")

      def get_status(self):
          status = self.r.execute('healthcheck')
          return status

      def foo(self. paramX, paramY):
          response = self.r.execute('foo', paramX = paramX, paramY = paramY)
          return status


  ```

  You can also pass arguments and keyword arguments to the `execute` method as follows:

  ```python
  client = RPCClient('redis://localhost:6379', 'my_service')
  ...
  ...
  response = client.execute('foo', 1, 2)
  ```
  This setup allows for efficient communication between components of a distributed system, promoting modularity and scalability.


pkgId: e1cc3c1ada71388e6b1892cac7d297212bda9360bb0e07f20c227cf1f3e15c76
name: python-callscript
arch: src
version: 0.7.2
epoch: 0
release: 1
summary: Makes scripts feel like functions.
url: https://pypi.org/project/callscript/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-callscript-0.7.2-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/callscript.svg)](https://badge.fury.io/py/callscript)
  [![Python package](https://github.com/nickdelgrosso/callscript/actions/workflows/python-package.yml/badge.svg)](https://github.com/nickdelgrosso/callscript/actions/workflows/python-package.yml)
  [![Coverage Status](https://coveralls.io/repos/github/nickdelgrosso/callscript/badge.svg?branch=main)](https://coveralls.io/github/nickdelgrosso/callscript?branch=main)
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)




  Not worth it to refactor your script into a bunch of functions?  This is a simple python library that lets you run your script as though you had, so you can
  call `results = callscript('myscript.py', x=3, y=4)`.  Just add comments in your scirpt to show where the inputs and outputs are, and `callscript` will
  make the function work properly:

  ```python

  x = 1      # input
  y = 2      # input
  w = x * y
  v = x / y  # output
  z = x + y  # output
  print(z)   # ignore
  ```

  Why does this exist?  Because sometimes you don't want to touch your old code or want to keep working with it using an interactive coding tool like Spyder, VSCode's interactive mode, or Jupyter, but you still want to be able to test your script using new parameters, or wrap it with a user interface.

  Or maybe you're not sure how to go about changing the script's code to make it work in a new context and don't have a lot of time at the moment to work it out, or maybe you're collaborating with someone who isn't ready to refactor the script yet.

  In any case,  with `callscript`, you can leave the original script alone and wrap it with your new functionality.






  Install `callscript` with PyPI

  ```bash
    pip install callscript
  ```






  If you label your script with the "input" or "output" comments, `callscript` can call it!


  ```python

  x = 3  # input
  y = 5  # input
  z = x + y  # output
  ```

  Then from your other code, you can call it with the `callscript()` function:

  ```python
  >>> from callscript import callscript
  >>> callscript('examples/script.py', x=10, y=20)
  {'z': 30}

  ```



  Want to change your variable names? You can do that, too!

  ```python

  x = 3  # input:FirstWeek
  y = 5  # input:SecondWeek
  z = x + y  # output:sum
  ```

  ```python
  >>> callscript('examples/script2.py', FirstWeek=10, SecondWeek=20)
  {'sum': 30}

  ```




  Want some lines to be ignored when being called by `callscript()`?  Use the `# ignore` tag!

  ```python

  x = 3  # input
  y = 5  # input
  input('What is your name?')  # ignore
  z = x + y  # output
  z = 100000   # ignore
  ```

  ```python
  >>> callscript('examples/script3.py', x=10, y=20)
  {'z': 30}

  ```



  `callscript()` will automatically use the original values of the inputs in the script as defaults.

  ```python

  name = 'Nick'          # input
  greeting = 'Hello, '   # input
  msg = greeting + name  # output
  ```

  ```python
  >>> callscript('examples/script4.py', name='Emma')
  {'msg': 'Hello, Emma'}

  ```


  - [Nicholas A. Del Grosso](https://www.github.com/nickdelgrosso)



  To run tests, run the following command

  ```bash
    tox
  ```







  Don't modify the `CHANGELOG.rst` file directly!  Instead, use`scriv create` make a new entry for the changelog.  After you've written a contribution, add the entry and write what  you did into the template.   When we are ready to make a release, we'll use the `scriv collect` command to aggregate these fragments into a new changeelog entry.

rpm_license:
  MIT License  Copyright (c) 2023 Nicholas A. Del Grosso  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: 894a898c9ac69606a6f966cd561d6a37657fa5452568dc07cdd6760d31db451a
name: python-callsign-regex
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Match ham radio callsigns based on ITU appendix42
url: https://github.com/mahtin/callsign-regex
rpm_license: OSI Approved :: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-callsign-regex-0.2.0-1.src.rpm
checksum_type: sha256
description:
  Python code to build a current regex for all ham radio callsigns



  Based on the page
  [https://www.itu.int/en/ITU-R/terrestrial/fmd/Pages/glad.aspx](https://www.itu.int/en/ITU-R/terrestrial/fmd/Pages/glad.aspx)
  visit this page
  [https://www.itu.int/en/ITU-R/terrestrial/fmd/Pages/call_sign_series.aspx](https://www.itu.int/en/ITU-R/terrestrial/fmd/Pages/call_sign_series.aspx)
  and download via the `.xlsx` button and produce a file like this:
  ```
      CallSignSeriesRanges-959674f2-22a8-4eb5-aa67-9df4fd606158.xlsx
  ```
  Your UUID part will be different.  This code looks for the newest file of that name pattern in your `Downloads` directory/folder, so don't worry about more than one file is downloaded.
  Under windows that's `C:\Users\YourUsername\Downloads\` and under Linux or MacOS it's `~/Downloads`.




  ```bash
  $ pip install itu-appendix42
  ```



  ```bash
  $ python callsign_regex.py -R
  ```

  The resulting output is the regex to match all ham radio callsigns:
  ```
  ([2BFGIKMNRW][A-Z]{0,2}|3[A-CE-Z][A-Z]{0,1}|4[A-MO-Z][A-Z]{0,1}|5[A-Z][A-Z]{0,1}|6[A-Z][A-Z]{0,1}|7[A-Z][A-Z]{0,1}|8[A-Z][A-Z]{0,1}|9[A-Z][A-Z]{0,1}|A[2-9A-Z][A-Z]{0,1}|C[2-9A-Z][A-Z]{0,1}|D[2-9A-Z][A-Z]{0,1}|E[2-7A-Z][A-Z]{0,1}|H[2-46-9A-Z][A-Z]{0,1}|J[2-8A-Z][A-Z]{0,1}|L[2-9A-Z][A-Z]{0,1}|O[A-Z][A-Z]{0,1}|P[2-9A-Z][A-Z]{0,1}|S[2-35-9A-RT-Z][A-Z]{0,1}|T[2-8A-Z][A-Z]{0,1}|U[A-Z][A-Z]{0,1}|V[2-8A-Z][A-Z]{0,1}|X[A-Z][A-Z]{0,1}|Y[2-9A-Y][A-Z]{0,1}|Z[238A-Z][A-Z]{0,1})([0-9][0-9A-Z]{0,3}[A-Z])
  ```

  The same output can be produced in code:
  ```python
  from itu_appendix42 import ItuAppendix42

  ituappendix42 = ItuAppendix42()
  print(ItuAppendix42._regex)
  ```

  The resulting regex can be used via many languages to pattern match a ham radio callsign correctly.



  ```python
  import sys
  from itu_appendix42 import ItuAppendix42

  ituappendix42 = ItuAppendix42()

  for line in sys.stdin:
      line = line.rstrip()
      v = ituappendix42.fullmatch(line)
      if v:
          print('' % (line))
      else:
          print(' INVALID' % (line))
  ```


pkgId: 80d3d324878a161af74b59419700f372bb6af1531477dd55745b8d26b45c234a
name: python-callstack
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: A call stack which includes the Class, and a simpler Frame structure.
url: https://gitlab.com/Atriace/callstack
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-callstack-0.2.0-1.src.rpm
checksum_type: sha256
description:
  <div style="text-align: center;">

  ![callstack logo](https://gitlab.com/Atriace/callstack/-/raw/main/assets/logo_text.png)

  ‎

  [![Support me on Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/atriace)

  </div>




  A Python module designed to address shortcomings in the standard Python stack inspection tools like `sys`, `inspect`, and `traceback`. Despite their utility, they do not provide the **name of the class** where a function originates, nor do they offer an easily digestable list of variables.

  For comparison, here is a `frame` object from `sys` versus `callstack`...



  ```python
  frame = {
      "f_back_": (frame),
      "f_builtins_": {dict: 153 entries}
      "f_code_": {
          "co_argcount" = (int),
          "co_cellvars" = (tuple),
          "co_code" = (bytes),
          "co_consts" = (tuple),
          "co_filename" =  'tests\callstack_test.py' (string),
          "co_firstlineno" = (int),
          "co_flags" = (int),
          "co_freevars" = (tuple: 0),
          "co_kwonlyargcount" = (int),
          "co_lnotab" = (bytes: 34),
          "co_name" = (string) 'hello',
          "co_names" = (tuple: 17)
          "co_nlocals" = (int)
          "co_posonlyargcount" = (int)
          "co_stacksize" = (int)
      },
      "f_globals_": {
          "__name__": (str) 'hello',
          "__doc__": (NoneType),
          "__package__": (str) 'tests',
          "__loader__": (SourceFileLoader),
          "__spec__": (NoneType),
          "__file__": (str),
          "_builtins_": (module),
          "_pydev_stop_at_break": (function),
          "callstack": (module),
          "__len__": (int)
      },
      "f_lasti": (int),
      "f_lineno": 47 (int),
      "f_locals_": {dict: 15 entries},
      "f_trace_": (NoneType),
      "f_trace_lines": (bool),
      "f_trace_opcodes": (bool),
      "__len__": (int)
  }
  ```

  Where do we find the properties we're looking for?

  - path = `frame.f_code_["co_filename"]`
  - package = `frame.f_globals_["__package__"]`
  - module = *sometimes valid, sometimes `__main__`*
  - line = `frame.f_lineno`
  - class = *completely missing*
  - function = `frame.f_code_["co_name"]`

  Obviously, there's a lot more data here that you could tap into (168 entries are hidden), but the variable locations are all over the place, and have fairly obtuse names.



  ```python
  frame = {
      "path": 'tests\test.py' (string),         # The file path of the code in the frame.
      "package": 'tests' (string),              # The package that contains the module.
      "module": 'test' (string),                # The module name.
      "line": 47 (int),                         # The line number in the source code.
      "cls": 'Alpha' (string),                  # The class name, if available.
      "clsRef": <class '__main__.Alpha'>        # An object reference to the class
      "function": 'hello' (string)              # The name of the function
      "location": 'test:47 > Alpha.hello()'     # Origin of code as a string for debugging
      "fqn": 'tests.test.Alpha'                 # The fully-qualified-name of the code location
      "internal": False                         # Invoked from the same package
      "protected": False                        # Invoked from the same class or subclass
  }
  ```

  > **Note:**
  >
  > Unlike other languages, Python's interpreter can't differentiate between `class` as a keyword versus a property. This deficiency necessitates using `cls` instead of `class`.

  How is this done? `callstack` uses `sys` to pull in the 4 aforementioned available properties. We then parse the module name from the filename, but the real issue is the *class name*.
  1. Every path in the `sys` callstack is parsed as text files.
  2. Line numbers are attributed to the class they belong to, and saved for future reference.
  3. On any given frame, we can query our dictionary by filepath & line number to return the matching class name.

  If you have a large codebase and are concerned about the overhead, this currently happens **on demand at runtime** and will only scan files that are in the callstack (so the impact should be negligible).
  However, **if you want to pre-scan your code** you may call `callstack.parseFile(filepath)` which will generate & cache the necessary lookup table per file.




  Accepts no arguments, and returns the callstack as a `list` of `Frames`.
  You can easily access individual frames by index (bypassing the need to use a `while` loop, or traversing via `frame.f_back`).

  *Example:*

  ```python
  import callstack

  class Alpha:
      def test():
          stack = callstack.get()
          print(f"Call stack has {len(stack)} entries...")

          for frame in stack:
              print(f"   {frame.location}")

          print(f"\nStarted with {stack[0].cls} and ended with {stack[-1].cls or stack[-1].module}")


  def beta():
      Alpha.test()


  beta()







  ```



  Accepts no arguments, and returns a Frame object representing the origin of the call, one level up the stack from where `getOrigin()` is called.  It provides a lightweight, lower-overhead way of retrieving this particular frame compared to `get()`.

  *Example:*

  ```python
  import callstack

  class Gamma:
      def test():
          frame = callstack.getOrigin()
          print(f"{frame.function} called Gamma.test()")

      def sibling():
          Gamma.test()


  Gamma.test()     # <module> called Gamma.test()
  Gamma.sibling()  # sibling called Gamma.test()
  ```


  Analyzes the Python call stack to determine the context of the calling frame relative to its caller. It is designed to identify whether the call is internal to the package and if the access level is protected (i.e., within the same class or a subclass).

  ```python
  class Alpha:
      def directTest(self):
          context = getContext()
          print(f"FQN:{context.fqn}, Protected: {context.protected}")

  class Beta(Alpha):
      def inheritedTest(self):
          self.directTest()

  a = Alpha()
  a.directTest()     # "tests.test, Protected: False"

  b = Beta()
  b.inheritedTest()  # "tests.test.Beta, Protected: True"
  ```



  Accepts a string *path* (relative or absolute), and parses Python modules as text files.  It stores the matchup of line-ranges to class names in our internal cache, returning nothing.

  *Example:*

  ```python
  import callstack
  callstack.parseFile("directory/path/to/module.py")
  ```


  Accepts a *path* & matching *linenumber*, and returns a string name of the relavent class name.  This function is useful if you still use `sys` (or some other stack inspection tools that provide more data not provided here), but still need the name of the *class*.

  Be aware that **if** the file hasn't already been parsed, it will be parsed when using this function.

  *Example:*

  ```python
  import callstack
  cls = callstack.getClassName("directory/path/to/module.py", 76)
  ```


pkgId: 6c599c69e1b3977b122c9fde0a572a1bce97b1d01f3a70ebfacb53b2df3be0f8
name: python-cally
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: A config as infrastructure foundation for your Internal Developer Platform
url: https://pypi.org/project/cally/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cally-0.6.0-1.src.rpm
checksum_type: sha256
description:
  A config as infrastructure foundation for your Internal Developer Platform


  To provide a powerful, but consisent configuration, and CLI to common Platform Engineering tasks


  - Multi layered configuration provided by Dyanconf
  - Built-in testing harness
  - Unit testing for your IaC
  - Abstraction of the CDK for Terraform
  - Build Terraform JSON, for consumption by [OpenTofu](https://opentofu.org/) or [Terraform](https://www.terraform.io/)


  Cally isn't intended to be consumed directly, but rather as a dependency of your internal IDP tool.


  To give a consistent experience across your Developers/Engineers/CI/CD, packaging your tooling, and providers, should be vailable via your internal python registry.

  Internal Registry options
  - [Self Hosted](https://packaging.python.org/en/latest/guides/hosting-your-own-index/)
  - [Google Artifact Registry](https://cloud.google.com/artifact-registry)
  - [AWS CodeArtifact](https://docs.aws.amazon.com/codeartifact/latest/ug/using-python.html)

  This `pyproject.toml` example from our [minimal example](https://github.com/CallyCo-io/cally-examples/tree/main/minimal), is enough to produce an empty stack, or run our hello world exampe command.
  ```toml
  [build-system]
  requires = ["setuptools"]
  build-backend = "setuptools.build_meta"

  [project]
  name = "minimal-idp"
  version = "0.1.0"

  dependencies = ["cally"]

  requires-python = ">=3.8"
  authors = [
    {name = "Example Org"},
  ]
  description = "Example Cally Extension"

  [tool.setuptools.packages.find]
  include=["cally.*"]

  [project.scripts]
  minimal-idp = "cally.cli:cally"

  [project.optional-dependencies]
  test = [
    "black",
    "build",
    "mypy",
    "pytest",
    "pytest-black",
    "pytest-mypy",
    "pytest-ruff<0.3",  # 0.3 + 0.3.1 are currently not working
    "ruff",
  ]

  [tool.black]
  skip-string-normalization = true

  [tool.pytest.ini_options]
  testpaths = "tests"
  addopts = "-p no:cacheprovider --black --mypy --ruff"
  filterwarnings = [
      "ignore",
      "default:::cally.*",
      "default:::tests.*"
  ]

  [tool.ruff]
  preview = true

  [tool.ruff.lint]
  select = [
      
      "A", "ARG", "B", "BLE", "C4", "PIE", "RET", "SIM", "S",
      "F",  # pyflakes
      "N",  # pep8-nameing
      "PL", # pylint
      "E",  # error
      "W",  # warning
      "PTH", # pathlib
      "RUF", # ruff
  ]
  ```

  Cally relies heavily on Python namespacing, and expects a structure following this convention:

  ```
  ├── cally
  │   └── idp
  │       ├── commands
  │       │   ├── example.py
  │       │   └── __init__.py
  │       ├── defaults.py
  │       ├── __init__.py
  │       ├── py.typed
  │       ├── resources
  │       │   ├── __init__.py
  │       │   └── random.py
  │       └── stacks
  │           ├── __init__.py
  │           └── pets.py
  ├── cally.yaml
  ├── pyproject.toml
  ├── README.md
  └── tests
      ├── __init__.py
      ├── test_cli.py
      ├── testdata
      │   └── random-pets.json
      └── test_stacks.py
  ```


  Cally is built on top of Dynaconf, with an opinionated loader. This can of course be [overriden](https://www.dynaconf.com/advanced/#creating-new-loaders), however the default is intended to provide a robust, but flexible interface. By default it will load a `cally.yaml` in your current working directory, but is only necessary if you wish to pass configuration to your services.


  When configuring a service, you can pass in the service name via `--service name` or via the environment variable `CALLY_SERVICE`


  When configuring a service, you can pass in the service name via `--environment name` or via the environment variable `CALLY_ENVIRONMENT`


  This is the expected layout of a `cally.yaml`. The layers have a resolution order, from left to right, with the last winning. Objects are combined as per Dynaconf's [merging](https://www.dynaconf.com/merging/) strategy.

  ```yaml
  defaults:
      provider:
          random:
              alias: foo
  development:
      provider:
          random:
              alias: bar
      services:
          test-service:
              provider:
                  random:
                      alias: this-wins
              stack_type: CallyStack
              stack_vars:
                  example: variable
  ```
  The output of test service would look like
  ```bash
  $ cally config print-service --environment development --service test-service
  ENVIRONMENT: development
  NAME: test-service
  PROVIDER:
    random:
      alias: this-wins
  STACK_TYPE: CallyStack
  STACK_VARS:
    example: variabl
  ```
  As a contrived example, this is what a tf print would output
  ```json
  {
    "//": {
      "metadata": {
        "backend": "local",
        "stackName": "test-service",
        "version": "0.20.5"
      },
      "outputs": {
      }
    },
    "terraform": {
      "backend": {
        "local": {
          "path": "state/development/test-service"
        }
      }
    }
  }
  ```


  The cally loader will attempt to load your projects defaults, from the `DEFAULTS` key, from the defaults namespace in your project.

  From the earlier example project layout, a `defaults.py` with the following contents
  ```python
  DEFAULTS = {
      "providers": {
          'random': {
              'alias': 'minimal'
          }
      }
  }
  ```
  Would result in the random provider being configured with an alias default of `minimal`


  This project is still in its early stages, documentation will be the next focal point, along with any bugs/oversights not found during early development.

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


pkgId: 03e09a509e91ef013fd7511b5af83b3ae0141deda362e7f18d9a3e9786f966a2
name: python-calmap
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: Calendar heatmaps from Pandas time series data
url: https://github.com/MarvinT/calmap
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calmap-0.0.11-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/calmap.svg)](https://badge.fury.io/py/calmap)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/calmap.svg)
  [![Build Status](https://travis-ci.com/MarvinT/calmap.svg?branch=master)](https://travis-ci.com/MarvinT/calmap)
  [![Coverage Status](https://coveralls.io/repos/github/MarvinT/calmap/badge.svg?branch=master)](https://coveralls.io/github/MarvinT/calmap?branch=master)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Downloads](https://pepy.tech/badge/calmap)](https://pepy.tech/project/calmap)
  Plot [Pandas](http://pandas.pydata.org/) time series data sampled by day in
  a heatmap per calendar year, similar to GitHub's contributions plot, using
  [matplotlib](http://matplotlib.org/).
  ![alt text](https://pythonhosted.org/calmap/_images/index-2.png "Example calendar heatmap")


pkgId: 1a59a69139a50596e995e4b0d76aba7855ae9d0e19495f36b23c02088cb0a2c9
name: python-calmjs.parse
arch: src
version: 1.3.1
epoch: 0
release: 1
summary: Various parsers for ECMA standards.
url: https://github.com/calmjs/calmjs.parse
rpm_license: mit
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calmjs.parse-1.3.1-1.src.rpm
checksum_type: sha256
description:
  A collection of parsers and helper libraries for understanding
  ECMAScript; a near feature complete fork of |slimit|_.  A CLI front-end
  for this package is shipped separately as |crimp|_.


pkgId: 08644699612cf98804fdbdc672c80e9e0e60a3e76b80a81a09c92f21991f6815
name: python-calmsize
arch: src
version: 0.1.3
epoch: 0
release: 1
url: https://github.com/Stonesjtu/calmsize
rpm_license: ZPL 2.1
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calmsize-0.1.3-1.src.rpm
checksum_type: sha256
summary:
  Fork from hurry.filesize, A simple Python library for human readable file sizes (or anything sized in bytes).

description:
  [![Build Status](https://travis-ci.com/Stonesjtu/calmsize.svg?token=vyTdxHbi1PCRzV6disHp&branch=master)](https://travis-ci.com/Stonesjtu/calmsize)
  ![PyPI](https://img.shields.io/pypi/v/calmsize.svg)
  [![PyPI download month](https://img.shields.io/pypi/dm/calmsize.svg)](https://pypi.python.org/pypi/calmsize/)

  I forked the repo from source file downloaded from pip `hurry.filesize`.
  That simple library is very useful when debugging memory issues, but
  unfortunately out-of-maintainance since 2009, so I decided to fork
  the great work of Martijn Faassen, Startifact.

  calmsize a simple Python library that can take a number of bytes and
  returns a human-readable string with the size in it, in kilobytes (K),
  megabytes (M), etc.
  The default system it uses is "traditional", where multipliers of 1024
  increase the unit size::
  ```ipython
  >>> from calmsize import size, ByteSize
  >>> size(1024)
  '1K'
  >>> size(-1024)
  '-1K'
  >>> '{:.2f}'.format(size(-1024))
  '-1.00K'
  ```
  An alternative, slightly more verbose system::
  ```ipython
  >>> from calmsize import alternative
  >>> size(1, system=alternative)
  '1 byte'
  >>> size(10, system=alternative)
  '10 bytes'
  >>> size(1024, system=alternative)
  '1 KB'
  ```
  A verbose system::
  ```ipython
  >>> from calmsize import verbose
  >>> size(10, system=verbose)
  '10 bytes'
  >>> size(1024, system=verbose)
  '1 kilobyte'
  >>> size(2000, system=verbose)
  '1 kilobyte'
  >>> size(3000, system=verbose)
  '2 kilobytes'
  >>> size(1024 * 1024, system=verbose)
  '1 megabyte'
  >>> size(1024 * 1024 * 3, system=verbose)
  '3 megabytes'
  ```
  You can also use the SI system, where multipliers of 1000 increase the unit
  size::
  ```ipython
  >>> from calmsize import si
  >>> size(1000, system=si)
  '1K'
  ```


pkgId: 18dc0ec987d53de3aecc23181e46a27e0aa757c54fb500b9836d605fdf72873f
name: python-calplot
arch: src
version: 0.1.7.5
epoch: 0
release: 1
summary: Calendar heatmaps from Pandas time series data
url: https://github.com/tomkwok/calplot
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calplot-0.1.7.5-1.src.rpm
checksum_type: sha256
description:
  |build| |sonar| |license| |pypi| |downloads|
  Calplot creates heatmaps from Pandas time series data.
  Plot `Pandas <http://pandas.pydata.org/>`_ time series data sampled by day in
  a heatmap per calendar year using
  `matplotlib <http://matplotlib.org/>`_.


pkgId: cf209585f3d886f458ab49774c4dfc68e866f442c97be5bcd58c4d73e6901023
name: python-caluma
arch: src
version: 10.5.1
epoch: 0
release: 1
summary: Caluma Service providing GraphQL API
url: https://caluma.io
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caluma-10.5.1-1.src.rpm
checksum_type: sha256
description:
  - Contributing guide: [CONTRIBUTING.md](CONTRIBUTING.md)
  - Maintainer's Handbook: [MAINTAINING.md](MAINTAINING.md)


pkgId: 7cd2db2a0f10f96145bf928ef0b86fe41da94f2829d6b32f090e0e0f535777fb
name: python-caluma-alexandria
arch: src
version: 6.4.0
epoch: 0
release: 1
summary: Document management service
url: https://github.com/projectcaluma/alexandria
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caluma-alexandria-6.4.0-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/projectcaluma/alexandria/workflows/Tests/badge.svg)](https://github.com/projectcaluma/alexandria/actions?query=workflow%3ATests)
  [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)](https://github.com/projectcaluma/alexandria/blob/master/pyproject.toml#L107)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  [![License: GPL-3.0-or-later](https://img.shields.io/github/license/projectcaluma/alexandria)](https://spdx.org/licenses/GPL-3.0-or-later.html)

  Our goal is to implement an external document management service to hold and provide uploaded documents.
  Documents can be uploaded and, depending on user access, managed by internal as well as external users.

  The goal is NOT to re implement a complex [DMS](https://en.wikipedia.org/wiki/Document_management_system) but rather to have a simple and user-friendly way of managing documents with different permissions.

  All User Interface interactions should be as simple as possible and easily understandable.

  [Original RFC that led to alexandria](docs/original_alexandria_rfc.md)





  **Requirements**

  - docker
  - docker-compose

  After installing and configuring those, download [docker-compose.yml](https://raw.githubusercontent.com/projectcaluma/alexandria/master/docker-compose.yml) and run the following commands:

  ```bash

  echo UID=$UID > .env

  docker compose up -d
  ```

  You can now access the api at [http://localhost:8000/api/v1/](http://localhost:8000/api/v1/).



  To load a set of categories run the following command:

  ```bash
  make load_example_data
  ```



  If alexandria is installed as a package you can use [PYTHON_API](PYTHON_API.md) for interacting with the models in an easier way.

  Various additional features can be configured:

  - Storage: Store uploaded content in S3, locally or anywhere else with [django-storages](https://github.com/jschneier/django-storages).

  - Thumbnails: Generate small preview images for the uploaded content with [preview-generator](https://github.com/algoo/preview-generator). Package required by preview-generator must be handled by yourself when using Alexandria as a package.

  - [ClamAV](https://www.clamav.net/): Virus scanning with ClamAV of uploaded content before it is saved to storage.

  - [Document Merge Service](https://github.com/adfinis/document-merge-service): Conversion of DOCX/ODT files to pdf through Alexandria. Creates a new Document and File for the converted DOCX/ODT.

  - WebDAV: Edit DOCX/ODT while directly saving to Alexandria storage.

  - File content search: Search through the text content of uploaded data, such as PDF, DOCX or images. Alexandria extracts content with [Apache Tika](https://tika.apache.org/) and makes it searchable through [full text search](https://docs.djangoproject.com/en/dev/ref/contrib/postgres/search/). Currently only English, German, French, Italian are configured.



  Alexandria is a [12factor app](https://12factor.net/) which means that configuration is stored in environment variables.
  Different environment variable types are explained at [django-environ](https://github.com/joke2k/django-environ#supported-types).

  Additional authorization and validation of the models is handled by [DGAP](https://github.com/adfinis/django-generic-api-permissions/?tab=readme-ov-file#usage---for-people-deploying-a-dgap-equipped-app).

  Below is the list of configuration options which are available. Minimal example is available in [docker-compose.yml](docker-compose.yml)



  - `SECRET_KEY`: A secret key used for cryptography. This needs to be a random string of a certain length. See [more](https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-SECRET_KEY).
  - `ALLOWED_HOSTS`: A list of hosts/domains your service will be served from. See [more](https://docs.djangoproject.com/en/2.1/ref/settings/#allowed-hosts).
  - `DATABASE_ENGINE`: Database backend to use. See [more](https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-DATABASE-ENGINE). (default: django.db.backends.postgresql)
  - `DATABASE_HOST`: Host to use when connecting to database (default: localhost)
  - `DATABASE_PORT`: Port to use when connecting to database (default: 5432)
  - `DATABASE_NAME`: Name of database to use (default: alexandria)
  - `DATABASE_USER`: Username to use when connecting to the database (default: alexandria)
  - `DATABASE_PASSWORD`: Password to use when connecting to database



  - `OIDC_OP_USER_ENDPOINT`: Userinfo endpoint for OIDC
  - `OIDC_VERIFY_SSL`: Set to `false` if you want to disable verifying SSL certs. Useful for development
  - `OIDC_DRF_AUTH_BACKEND`: Overwrite the default authentication backend with your own
  - `ALEXANDRIA_OIDC_USER_FACTORY`: Overwrite the default user with your own
  - `ALEXANDRIA_CREATED_BY_USER_PROPERTY`: Overwrite the default user property which is used for `..._by_user` (default: username)
  - `ALEXANDRIA_CREATED_BY_GROUP_PROPERTY`: Overwrite the default group property which is used for `..._by_group` (default: group)
  - `ALEXANDRIA_GET_USER_AND_GROUP_FUNCTION`: Overwrite the import string if further configuration how user and group are determined is needed.



  - `ALEXANDRIA_VISIBILITY_CLASSES`: Comma-separated list of [DGAP](https://github.com/adfinis/django-generic-api-permissions/?tab=readme-ov-file#visibilities) classes that define visibility for all models
  - `ALEXANDRIA_PERMISSION_CLASSES`: Comma-separated list of [DGAP](https://github.com/adfinis/django-generic-api-permissions/?tab=readme-ov-file#permissions) classes that define permissions for all models
  - Data validation configuration
    - `ALEXANDRIA_VALIDATION_CLASSES`: Comma-separated list of [DGAP](https://github.com/adfinis/django-generic-api-permissions/?tab=readme-ov-file#data-validation) classes that define custom validations. A default base class is used for file validation. Extend `AlexandriaValidator` for own validations.



  - `ALEXANDRIA_ENABLE_THUMBNAIL_GENERATION`: Set to `false` to disable thumbnail generation
    - Check the docker-compose file for an example on how to set up generation with s3 hooks
  - `ALEXANDRIA_THUMBNAIL_WIDTH`: Width of generated thumbnails
  - `ALEXANDRIA_THUMBNAIL_HEIGHT`: Height of generated thumbnails
  - `ALEXANDRIA_ENABLE_CHECKSUM`: Set to `false` to disable file checksums. Checksums are calculated after upload to allow later verification (not implemented in Alexandria)



  Storage backends are configured globally. The storable object bears information on the encryption status allowing the ORM appropriate handling of the data.

  - `ALEXANDRIA_FILE_STORAGE`: Set the backend for file uploads. [django-storages](https://github.com/jschneier/django-storages) is available (default: `alexandria.storages.backends.s3.S3Storage`)

  Encryption:

  - `ALEXANDRIA_ENABLE_AT_REST_ENCRYPTION`: Set to `true` to enable at-rest encryption of files (enabling this causes an error unless `ALEXANDRIA_ENCRYPTRION_METHOD` is set to a supported method)
  - `ALEXANDRIA_ENCRYPTION_METHOD`: Define encryption method that is applied to uploaded objects. Available values depend on storage backend's capabilities (default: `None`)
    - available methods
      - None: no at-rest encryption
      - `ssec-global`: encrypt all files with the same key (requires: `ALEXANDRIA_FILE_STORAGE`: `alexandria.storages.backends.s3.S3Storage`)

  Supported backends:

  - `FileSystemStorage`: files are stored to the `MEDIA_ROOT` directory
  - `S3Storage`: files are uploaded to the S3 object storage configured accordingly

    required configuations:

    - `ALEXANDRIA_S3_ACCESS_KEY`: identity
    - `ALEXANDRIA_S3_SECRET_KEY`: password to authorize identity
    - `ALEXANDRIA_S3_ENDPOINT_URL`: the url of the service
    - `ALEXANDRIA_S3_BUCKET_NAME`: the bucket name of the storage to access objects in path notation (not subdomain)

    The development setup features a minio service, implementing the S3 protocol.
    To use SSE-C in development make sure to generate a certificate for the minio container and set `ALEXANDRIA_S3_VERIFY` to `false`.



  - `ALEXANDRIA_CLAMD_ENABLED`: Set this to `True` to enable ClamAV (virus scanner).
  - `ALEXANDRIA_CLAMD_TCP_SOCKET`: ClamAV service socket
  - `ALEXANDRIA_CLAMD_TCP_ADDR`: ClamAV service address



  - `ALEXANDRIA_ENABLE_PDF_CONVERSION`: Set this to `True` to enable the pdf conversion endpoint.
  - `ALEXANDRIA_DMS_URL`: URL where the document merge service is running



  - `ALEXANDRIA_USE_MANABI`: Set to `true` to enable WebDAV via Manabi
  - `ALEXANDRIA_MANABI_DAV_URL_PATH`: Set the path segement where WebDAV is being served
  - `ALEXANDRIA_MANABI_ALLOWED_MIMETYPES`: List of which mime types can be served through WebDAV. (default: docx, xlsx)
  - `ALEXANDRIA_MANABI_DAV_URI_SCHEMES`: Dictionary of which mime types will be mapped to which WebDAV URI scheme. (default: docx, xlsx for editing in MS Word / Excel)
  - `MANABI_SHARED_KEY`: Can be generated with:

  ```py
  import manabi
  manabi.keygen()
  ```

  If you want to enable WebDAV for e.g. MS Powerpoint files you can do that by configuring `ALEXANDRIA_MANABI_ALLOWED_MIMETYPES` and `ALEXANDRIA_MANABI_DAV_URI_SCHEMES`:

  ```py
  ALEXANDRIA_MANABI_ALLOWED_MIMETYPES = [
      "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      "application/vnd.openxmlformats-officedocument.presentationml.presentation", # New
  ]
  ALEXANDRIA_MANABI_DAV_URI_SCHEMES = {
      "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "ms-word:ofe|u|",
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "ms-excel:ofe|u|",
      "application/vnd.openxmlformats-officedocument.presentationml.presentation": "ms-powerpoint:ofe|u|" # New, see https://learn.microsoft.com/en-us/office/client-developer/office-uri-schemes for more information
  }
  ```



  - `ALEXANDRIA_ENABLE_CONTENT_SEARCH`: Set to `True` to enable file content extraction
  - `ALEXANDRIA_ISO_639_TO_PSQL_SEARCH_CONFIG`: Mapping from language code from tika to django search vector language config. Also defines which languages are supported by the search. (default: `{"en":"english","de":"german","fr":"french","it":"italian"}`)
  - `ALEXANDRIA_CONTENT_SEARCH_TYPE`: Django full text search type. (default: phrase)


  For checksums and file content search [celery](https://docs.celeryq.dev) with a redis broker is used.

  - `REDIS_HOST`: Redis host (default: redis)
  - `REDIS_PORT`: Redis port (default: 6379)
  - `REDIS_USER`: Redis user (default: default)
  - `REDIS_PASSWORD`: Redis password (default: redis)
  - `CELERY_BROKER_URL`: Broker url (default: `redis://{REDIS_USER}:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/0`)
  - `CELERY_TASK_ACKS_LATE`: Tasks only are marked complete after finishing (default: True)
  - `CELERY_TASK_SOFT_TIME_LIMIT`: Prevents task existing forever (default: 60)



  For development, you can also set the following environemnt variables to help you:

  - `ALEXANDRIA_DEV_AUTH_BACKEND`: Set this to "true" to enable a fake auth backend that simulates an authenticated user. Requires `DEBUG` to be set to `True` as well.
  - `DEBUG`: Set this to true for debugging during development. Never enable this in production, as it **will** leak sensitive information to the public if you do.



  Look at our [contributing guidelines](CONTRIBUTING.md) to start with your first contribution.



  Some notes for maintaining this project can be found in [the maintainer's handbook](MAINTAINING.md).


pkgId: e33fb539667830a04a32cee521af57a4a26e868de8d09c422181cfe2cb1d1edc
name: python-calute
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Agents for intelligence and coordination
url: https://github.com/erfanzar/Calute
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calute-0.0.1-1.src.rpm
checksum_type: sha256
description:
  Calute is a powerful Python library for orchestrating and coordinating Large Language Model (LLM) agents, inspired by neural networks and cognitive architectures. It provides an intuitive framework for building sophisticated multi-agent systems that can collaborate, reason, and solve complex problems with direct client connect to EasyDeL.


pkgId: 9dd92a839f429d36ec6ad23e9ddab426a27241c44cebf3f877a39313b4649304
name: python-calweek
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Objects representing a (non-ISO) week
url: http://github.com/wonkyweirdy/calweek
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calweek-0.5.0-1.src.rpm
checksum_type: sha256
description:
  The calweek module provide the class *CalWeek*.  Instances represent
  specific weeks spanning 7 days Sunday to Saturday except weeks at the year
  beginning/end may be shorter.  There are 53 or 54 numbered weeks in a year.
  Week 1 is always starts on January 1 of the year.
  This is a traditional week number system different from the
  [ISO 8601]( https://en.wikipedia.org/wiki/ISO_8601) standard.
  ISO 8601 week numbering is now more predominate, but still sometimes
  software needs to work with the old system.
  For ISO 8601 week support in Python, use the
  [isoweek](https://pypi.org/project/isoweek/)
  module on which this code was based.
  The *CalWeek* instances are light weight and immutable with an interface similar
  to the datetime.date objects.  Example code:
      from calweek import CalWeek
      w = CalWeek(2011, 20)
      print "Week %s starts on %s" % (w, w.day(0))
      print "Current week number is", CalWeek.thisweek().week
      print "Next week is", CalWeek.thisweek() + 1


pkgId: 14165ae59f3f42285446d8ca6d246f70bae7988b5cd084d382865d0b3af0fa9f
name: python-calzone
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: A Geant4 Python wrapper.
url: https://pypi.org/project/calzone/
rpm_license: LGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calzone-1.0.0-1.src.rpm
checksum_type: sha256
description:
  (**CAL**orimeter **ZONE**)




  CalZone is a [Geant4][Geant4] Python wrapper for simulating the energy
  deposition by high-energy particles in a calorimeter. The interface has been
  designed with simplicity in mind. Primary particles are injected into the
  simulation volume as a `numpy.ndarray`, and a `numpy.ndarray` of energy deposits
  is returned. The Monte Carlo geometry is encoded in a Python `dict` which can be
  loaded from configuration files, e.g. using [JSON][JSON], [TOML][TOML] or
  [YAML][YAML] formats. This basic workflow is illustrated below,

  ```python
  import calzone

  simulation = calzone.Simulation("geometry.toml")
  particles = calzone.particles(10000, pid="e-", energy=0.5, position=(0,0,1))
  deposits = simulation.run(particles).deposits
  ```



  The Calzone source is distributed under the **GNU LGPLv3** license. See the
  provided [LICENSE](LICENSE) and [COPYING.LESSER](COPYING.LESSER) files.


  [JSON]: https://www.json.org/json-en.html
  [Geant4]: https://geant4.web.cern.ch/docs/
  [TOML]: https://toml.io/en/
  [YAML]: https://yaml.org/


pkgId: 89706b3c6d3539ce7e2285f752f5bf427f39a48405ecbb60db85440a40fb8532
name: python-calzone-display
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: A display extension for Calzone (CALorimeter ZONE)
url: https://pypi.org/project/calzone-display/
rpm_license: LGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-calzone-display-0.3.1-1.src.rpm
checksum_type: sha256
description:
  (**CAL**orimeter **ZONE**)



  The source of Calzone's display extension is distributed under the **GNU
  LGPLv3** license. See the provided [LICENSE](LICENSE) and
  [COPYING.LESSER](COPYING.LESSER) files.


  [CALZONE]: https://github.com/niess/calzone


pkgId: 7307d27bf562355a56e073ad984c958ed485350e7f4c69962f6157c2384ef9c2
name: python-cambai
arch: src
version: 0.1.8
epoch: 0
release: 1
summary: Camb AI API Python Library
url: https://github.com/cr2007/cambai
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cambai-0.1.8-1.src.rpm
checksum_type: sha256
description:
  <!-- omit from toc -->


  [![PyPI version](https://badge.fury.io/py/cambai.svg)](https://badge.fury.io/py/cambai)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cambai)

  This is a Python wrapper for the [Camb.ai](https://camb.ai) API. It is designed to make it easy to interact with the API from Python.

  > [!IMPORTANT]
  > This library is still in active development.
  > There will be some fixes and improvements to be made.

  <!-- omit from toc -->


  - [Installation](#installation)
  - [Usage](#usage)



  To install the CambAI API Wrapper, you can use `pip` to install:

  ```bash

  pip install cambai
  ```



  Checkout the '[**examples**](https://github.com/cr2007/cambai-python/tree/master/examples)' directory for examples on how to use the CambAI API Wrapper.


pkgId: 92b305ce9a4169edbd3a2c17ebf61bc1300aad5044a66ac0587683046fbb919a
name: python-cambridge
arch: src
version: 3.13.9
epoch: 0
release: 1
summary: cambridge is a terminal version of Cambridge Dictionary.
url: https://github.com/KateWang2016/cambridge
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cambridge-3.13.9-1.src.rpm
checksum_type: sha256
description:
  `cambridge` is a terminal version of Cambridge Dictionary, whose source is from https://dictionary.cambridge.org; also supports the Merriam-Webster Dictionary as backup.



  ![look up a word in Cambridge Dictionary](/screenshots/cambridge.png)


  ![look up a word in Merriam-Webster Dictionary](/screenshots/webster.png)


  1. `camb <word/phrase>` to look up in Cambridge Dictionary by default
  2. `camb -c <word/phrase>` to look up in Cambridge Dictionary with additional Chinese translation
  3. `camb -w <word/phrase>` to look up in Merriam-Webster Dictionary
  4. **support concurrent searching multiple words from one dictionary, or multiple words from different dictionaries**
  5. less than 2s taken to do all the work for the word, including fetching, parsing, printing, and writing cache
  6. less than 0.1s for the same word's later search by retrieving cache
  7. only the first dictionary from Cambridge (assuming the optimal) to avoid being confused by multiple dictionaries
  8. a list of suggestions will be given, if not found
  9. `camb l` to list cached words and phrases
  10. support checking "Word of the Day" from Merriam-Webster Dictionary
  11. support displaying spellcheck suggestion list, cache list, Webster's all of word of the days by `fzf`
  12. if `fzf` not installed, the aforementioned lists have been formatted elaborately
  13. well tuned to dark, light, blueish, grayish, `gruvbox` terminal colorschemes


  ```bash
  pip install cambridge
  pip uninstall -r requirements.txt -y
  rm -rf $HOME/.cache/cambridge
  rm -rf $HOME/.cache/fakeua


  make install
  make uninstall
  make clean_cache
  ```



  For looking up words/phrases in a dictionary or multiple dictionaries.
  ```bash
  camb <word/phrase>, <word/phrase>, ...     # look up words/phrases in Cambridge Dictionary
  camb -w <word/phrase>, <word/phrase>, ...  # look up words/phrases in Merriam-Webster Dictionary
  camb -c <word/phrase>, <word/phrase>, ...  # look up words/phrases in Cambridge with Chinese translation
  camb <w/p>, <w/p>, ... -w <w/p>, <w/p>, ... -c <w/p>, <w/p>, ... # concurrent searching


  --debug   # look up words/phrases in debug mode
  -f        # look up words/phrases afresh without using cache
  -n        # look up words/phrases without showing suggestions if not found



  camb "a stone's throw" | camb a stone\'s throw


  camb "have your/its moments" | camb have your\/its moments
  ```


  For listing and deleting items in the cache.
  ```bash
  camb l                  # list alphabetically ordered words/phrases you've found before
  camb l -t               # list words/phrases in reverse chronological order
  camb l -r               # list 20 words/phrases from the word list randomly
  camb l -d               # delete one or more words/phrases(separated by ", ") from the list
  ```


  For displaying 'Word of the Day' in the Merriam Webster Dictionary
  ```bash
  camb wod                # list today's Word of the Day from Merriam-Webster Dictionary
  camb wod -l             # list all words of the day
  ```


  ```bash
  camb -h, --help         # show this help message and exit
  camb -v, --version      # print the current version of the program
  ```


pkgId: a29abffdca61a028f283f47cbdf3e857ffa04cdef861e395d35f1e6fe0b24af5
name: python-camcops-server
arch: src
version: 2.4.21
epoch: 0
release: 1
summary: CamCOPS server
url: https://camcops.readthedocs.org/
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camcops-server-2.4.21-1.src.rpm
checksum_type: sha256
description:
  Server for the Cambridge Cognitive and Psychiatric Test Kit (CamCOPS).
  See https://camcops.readthedocs.io/.


pkgId: bf7f63387d149066aa7fe28f512a9c21bbb6b6d49f04e5602b06313a64eee213
name: python-camd
arch: src
version: 2022.8.24
epoch: 0
release: 1
summary: camd is software designed to support autonomous materials research and sequential learning
url: https://github.com/TRI-AMDD/CAMD
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camd-2022.8.24-1.src.rpm
checksum_type: sha256
description:
  camd is software designed to support Computational Autonomy for Materials Discovery
  based on ongoing work led by the
  [Toyota Research Institute](http://www.tri.global/accelerated-materials-design-and-discovery/).

  camd enables the construction of sequential learning pipelines using a set of
  abstractions that include
  * Agents - decision making entities which select experiments to run from pre-determined
      candidate sets
  * Experiments - experimental procedures which augment candidate data in a way that
      facilitates further experiment selection
  * Analyzers - Post-processing procedures which frame experimental results in the context
      of candidate or seed datasets

  In addition to these abstractions, camd provides a loop construct which executes
  the sequence of hypothesize-experiment-analyze by the Agent, Experiment, and Analyzer,
  respectively.  Simulations of agent performance can also be conducted using
  after the fact sampling of known data.


pkgId: 353d80dc5817f01eaca30af1602868b279e784882fb2001662cb72c48e533b39
name: python-camden-registration-api
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: client for interracting with camden website using api
url: https://github.com/polovinko1980/camden-registration-api
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camden-registration-api-1.1.1-1.src.rpm
checksum_type: sha256
description:
  Service to use wrapper on requests api
  to simulate user actions
  on the Camden Activity Registration portal




  Python > 3.9






  To install:

  ```
  pip3 install camden_registration_api

  ```

  And create your own runner file ```my_camden.py``` like below:

  ```
  from camden_registration_api import CamdenClient

  api_client = CamdenClient(
          login=<your login>,
          password=<your password>,
          activity_id=120589,
      )


  api_client.test()



  api_client.register()
  ```

  Then execute as normal python code:

  ```python3 my_camden.py```






  - Build:

  ```
  docker build -t polovinko1980/camden-registration:develop.latest -f camden.DockerFile .

  ```

  Create ```docker.env``` file with MongoDB credentials and trigger:

  ```
  docker run -d --name camden-registration --env-file docker.env polovinko1980/camden-registration:develop.latest python camden_registration_runner.py

  ```



  - Navigate to terraform folder

  - Execute:

  ```
  terraform apply -auto-approve
  ```

  Note: you need to have secrets manager configured o
  n your account with credentials to connect to datasource (mongoDB).

  Using other datasources like FB messenger or telegram WIP still.



  - connect to instance and check:

  ```
  cat /var/log/cloud-init-output.log

  sudo docker ps

  sudo docker logs <container_id>
  ```

  - After job is done, clean up:

  ```
  terraform destroy -auto-approve
  ```



  - Install dependencies:

  ```
  pip3 install -r requirements.txt

  ```

  - Make sure environmental variables to connect to mongo are setup


  - Run:

  ```
  python3 camden_registration_runner.py

  python3 camden_registration_runner.py --force

  python3 camden_registration_runner.py --test

  ```




  To call Camden: 1-408-559-8553





  Do not share with Alex K, let him train his fingers


pkgId: 9a48ab1bcb19caf661bbbc41fd4639ea36ca10fc4aaef8d8ebf1043d7d071f12
name: python-came-pytorch
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: CAME Optimizer - Pytorch Version
url: https://github.com/yangluo7/CAME/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-came-pytorch-0.1.3-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">CAME Optimizer</h1>
  <h3 align="center">ACL 2023 Outstanding Paper Award<br/>Confidence-guided Adaptive Memory Efficient Optimization</h3>


  This is an official implementation of **CAME** optimizer in the "[Confidence-guided Adaptive Memory Efficient Optimization](https://arxiv.org/abs/2307.02047)". Please cite the paper and star this repo if you find CAME useful. Thanks!

  [Paper](https://arxiv.org/abs/2307.02047) | [Twitter](https://twitter.com/ZangweiZheng/status/1680227732788236289) | [Blog](https://zhengzangw.github.io/blogs/came) | [Pypi Package](https://pypi.org/project/came-pytorch/) | [zhihu](https://zhuanlan.zhihu.com/p/643816029)


  In this work, we studied a confidence-guided strategy to reduce the instability of existing memory efficient optimizers. Based on this strategy, we proposed CAME to simultaneously achieve two goals: fast convergence as in traditional adaptive methods, and low memory usage as in memory-efficient methods.

  The pseudo code is presented in the figure with difference with Adafactor in blue fonts.

  <p align="center">
  <img src="assets/came_code.png" alt="CAME optimizer pseudo code" width="50%" />
  </p>
  <!-- ![CAME_code](assets/came_code.png) -->


  ```
  pip install came-pytorch
  ```


  ```python
  from came_pytorch import CAME
  optimizer = CAME(
      model.parameters(),
      lr=2e-4,
      weight_decay=1e-2,
      betas=(0.9, 0.999, 0.9999),
      eps=(1e-30, 1e-16)
  )
  ```



  * Pre-training: Based on our experiments on BERT-Large, GPT-2 and T5, it's suitable to choose a learning rate for CAME 3-1x smaller than that for AdamW.
  * Consider choosing $\beta_3$ between $[0.9995, 0.99995]$ if setting $\beta_1, \beta_2=0.9, 0.999$. Due to computational resource constraints, we did not explore more combinations of three betas. Different training tasks may require different combinations of optimal performance.
  * If you have any feedback or comments regarding hyper-parameter tuning, please do not hesitate to provide them to us!



  Apart from the BERT and T5 experiments shown in the paper, we conduct more and record the results here.



  |                | MMLU      | WikiText | HellaSwag | TruthfulQA (MC) | BoolQ     | COPA      | WSC       | WIC       |
  | -------------- | --------- | -------- | --------- | --------------- | --------- | --------- | --------- | --------- |
  | Alpaca-7B      | 40.21     | 6.74     | 59.76     | **38.89**       | **79.57** | **88.00** | 46.15     | 49.84     |
  | Alpaca-7B-CAME | **40.59** | **6.38** | **59.80** | 38.61           | 79.08     | **88.00** | **49.04** | **50.78** |

  We fine-tuned LLaMA-7B with [stanford-alpaca](https://github.com/tatsu-lab/stanford_alpaca) (52k instruction-tuning dataset). To replicate our result, first register the CAME optimizer to the transformer package. Then in Alpaca training script, change the default optimizer from "adamw" to "came".

  Alpaca-7B and Alpaca-7B-CAME are evaluated using [Instruct-eval](https://github.com/declare-lab/instruct-eval) and [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness).



  ![CAME_gpt2](assets/gpt-2_came.png)

  The pre-training of GPT-2 (Medium, 345M) is based on [Megatron-LM](https://github.com/NVIDIA/Megatron-LM). To replicate our result, add the CAME optimizer in [`megatron/optimizer/__init__.py`](https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/optimizer/__init__.py) and set the *args.optimizer* to "came".


  To ensure a fair comparison, we set the batch size to 1 for the pre-training of GPT-2 (Medium) to examine the memory footprint of CAME and AdamW.

  |              | AdamW | CAME     |
  |--------------|-------|----------|
  | Memory (GiB) | 8.77  | **7.44** |



  ```bibtex
  @inproceedings{luo2023came,
    title={CAME: Confidence-guided Adaptive Memory Efficient Optimization},
    author={Luo, Yang and Ren, Xiaozhe and Zheng, Zangwei and Jiang, Zhuo and Jiang, Xin and You, Yang},
    booktitle={Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
    pages={4442--4453},
    year={2023}
  }
  ```


pkgId: 7d012ccbbf38ca70173668c5f62cacc4a152eff15a6e98eacc6bb67ab40a205c
name: python-camel-ai
arch: src
version: 0.2.10
epoch: 0
release: 1
summary: Communicative Agents for AI Society Study
url: https://www.camel-ai.org/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camel-ai-0.2.10-1.src.rpm
checksum_type: sha256
description:
  Core components and utilities to build, operate, and enhance CAMEL-AI agents and societies.
  | Module | Description |
  |:---|:---|
  | **[Models](https://docs.camel-ai.org/key_modules/models.html)** | Model architectures and customization options for agent intelligence. |
  | **[Messages](https://docs.camel-ai.org/key_modules/messages.html)** | Messaging protocols for agent communication. |
  | **[Memory](https://docs.camel-ai.org/key_modules/memory.html)** | Memory storage and retrieval mechanisms. |
  | **[Tools](https://docs.camel-ai.org/key_modules/tools.html)** | Tools integration for specialized agent tasks. |
  | **[Prompts](https://docs.camel-ai.org/key_modules/prompts.html)** | Prompt engineering and customization. |
  | **[Tasks](https://docs.camel-ai.org/key_modules/tasks.html)** | Task creation and management for agent workflows. |
  | **[Loaders](https://docs.camel-ai.org/key_modules/loaders.html)** | Data loading tools for agent operation. |
  | **[Storages](https://docs.camel-ai.org/key_modules/storages.html)** | Storage solutions for agent. |
  | **[Society](https://docs.camel-ai.org/key_modules/society.html)** | Components for building agent societies and inter-agent collaboration. |
  | **[Embeddings](https://docs.camel-ai.org/key_modules/embeddings.html)** | Embedding models for RAG. |


pkgId: 7bbfa764c1f33bb6e075c4a83ce59ea248ce03095406f00efd0006872899195e
name: python-camel-ai
arch: src
version: 0.2.6
epoch: 0
release: 1
summary: Communicative Agents for AI Society Study
url: https://www.camel-ai.org/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camel-ai-0.2.6-1.src.rpm
checksum_type: sha256
description:
  [![Colab][colab-image]][colab-url]
  [![Hugging Face][huggingface-image]][huggingface-url]
  [![Slack][slack-image]][slack-url]
  [![Discord][discord-image]][discord-url]
  [![Wechat][wechat-image]][wechat-url]
  [![Twitter][twitter-image]][twitter-url]

  ______________________________________________________________________



  [![Python Version][python-image]][python-url]
  [![PyTest Status][pytest-image]][pytest-url]
  [![Documentation][docs-image]][docs-url]
  [![Star][star-image]][star-url]
  [![Package License][package-license-image]][package-license-url]

  <p align="center">
    <a href="https://github.com/camel-ai/camel#community">Community</a> |
    <a href="https://github.com/camel-ai/camel#installation">Installation</a> |
    <a href="https://camel-ai.github.io/camel/">Documentation</a> |
    <a href="https://github.com/camel-ai/camel/tree/HEAD/examples">Examples</a> |
    <a href="https://arxiv.org/abs/2303.17760">Paper</a> |
    <a href="https://github.com/camel-ai/camel#citation">Citation</a> |
    <a href="https://github.com/camel-ai/camel#contributing-to-camel-">Contributing</a> |
    <a href="https://www.camel-ai.org/">CAMEL-AI</a>
  </p>

  <p align="center">
    <img src='https://raw.githubusercontent.com/camel-ai/camel/master/misc/logo_light.png' width=800>
  </p>



  🐫 CAMEL is an open-source community dedicated to finding the scaling laws of agents. We believe that studying these agents on a large scale offers valuable insights into their behaviors, capabilities, and potential risks. To facilitate research in this field, we implement and support various types of agents, tasks, prompts, models, and simulated environments.

  Join us ([*Discord*](https://discord.camel-ai.org/), [*WeChat*](https://ghli.org/camel/wechat.png) or [*Slack*](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)) in pushing the boundaries of finding the scaling laws of agents.


  We provide a [![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing) demo showcasing a conversation between two ChatGPT agents playing roles as a python programmer and a stock trader collaborating on developing a trading bot for stock market.

  <p align="center">
    <img src='https://raw.githubusercontent.com/camel-ai/camel/master/misc/framework.png' width=800>
  </p>





  To install the base CAMEL library:
  ```bash
  pip install camel-ai
  ```
  Some features require extra dependencies:
  - To install with all dependencies:
      ```bash
      pip install 'camel-ai[all]'
      ```
  - To use the HuggingFace agents:
      ```bash
      pip install 'camel-ai[huggingface-agent]'
      ```
  - To enable RAG or use agent memory:
      ```bash
      pip install 'camel-ai[tools]'
      ```



  Install `CAMEL` from source with poetry (Recommended):
  ```sh




  git clone https://github.com/camel-ai/camel.git


  cd camel


  pip install poetry  # (Optional)


  poetry env use python3.10  # (Optional)


  poetry shell



  poetry install


  poetry install -E all # (Optional)


  exit
  ```

  > [!TIP]
  > If you encounter errors when running `poetry install`, it may be due to a cache-related problem. You can try running:
  > ```sh
  > poetry install --no-cache
  > ```




  Install `CAMEL` from source with conda and pip:
  ```sh

  conda create --name camel python=3.10


  conda activate camel


  git clone -b v0.2.6 https://github.com/camel-ai/camel.git


  cd camel


  pip install -e .


  pip install -e .[all] # (Optional)
  ```



  Detailed guidance can be find [here](https://github.com/camel-ai/camel/blob/master/.container/README.md)



  [CAMEL package documentation pages](https://camel-ai.github.io/camel/).



  You can find a list of tasks for different sets of assistant and user role pairs [here](https://drive.google.com/file/d/194PPaSTBR07m-PzjS-Ty6KlPLdFIPQDd/view?usp=share_link).

  As an example, to run the `role_playing.py` script:

  First, you need to add your OpenAI API key to system environment variables. The method to do this depends on your operating system and the shell you're using.

  **For Bash shell (Linux, macOS, Git Bash on Windows):**

  ```bash

  export OPENAI_API_KEY=<insert your OpenAI API key>
  OPENAI_API_BASE_URL=<inert your OpenAI API BASE URL>  #(Should you utilize an OpenAI proxy service, kindly specify this)
  ```

  **For Windows Command Prompt:**

  ```cmd
  REM export your OpenAI API key
  set OPENAI_API_KEY=<insert your OpenAI API key>
  set OPENAI_API_BASE_URL=<inert your OpenAI API BASE URL>  #(Should you utilize an OpenAI proxy service, kindly specify this)
  ```

  **For Windows PowerShell:**

  ```powershell

  $env:OPENAI_API_KEY="<insert your OpenAI API key>"
  $env:OPENAI_API_BASE_URL="<inert your OpenAI API BASE URL>"  #(Should you utilize an OpenAI proxy service, kindly specify this)
  ```

  Replace `<insert your OpenAI API key>` with your actual OpenAI API key in each case. Make sure there are no spaces around the `=` sign.

  After setting the OpenAI API key, you can run the script:

  ```bash

  python examples/ai_society/role_playing.py
  ```

  Please note that the environment variable is session-specific. If you open a new terminal window or tab, you will need to set the API key again in that new session.




  - Download [Ollama](https://ollama.com/download).
  - After setting up Ollama, pull the Llama3 model by typing the following command into the terminal:
      ```bash
      ollama pull llama3
      ```
  - Run the script. Enjoy your Llama3 model, enhanced by CAMEL's excellent agents.
      ```python
      from camel.agents import ChatAgent
      from camel.messages import BaseMessage
      from camel.models import ModelFactory
      from camel.types import ModelPlatformType

      ollama_model = ModelFactory.create(
          model_platform=ModelPlatformType.OLLAMA,
          model_type="llama3",
          model_config_dict={"temperature": 0.4},
      )

      assistant_sys_msg = BaseMessage.make_assistant_message(
          role_name="Assistant",
          content="You are a helpful assistant.",
      )
      agent = ChatAgent(assistant_sys_msg, model=ollama_model, token_limit=4096)

      user_msg = BaseMessage.make_user_message(
          role_name="User", content="Say hi to CAMEL"
      )
      assistant_response = agent.step(user_msg)
      print(assistant_response.msg.content)
      ```


  - [Install vLLM](https://docs.vllm.ai/en/latest/getting_started/installation.html)
  - After setting up vLLM, start an OpenAI compatible server for example by
      ```bash
      python -m vllm.entrypoints.openai.api_server --model microsoft/Phi-3-mini-4k-instruct --api-key vllm --dtype bfloat16
      ```
  - Create and run following script (more details please refer to this [example](https://github.com/camel-ai/camel/blob/master/examples/models/vllm_model_example.py))
      ```python
      from camel.agents import ChatAgent
      from camel.messages import BaseMessage
      from camel.models import ModelFactory
      from camel.types import ModelPlatformType

      vllm_model = ModelFactory.create(
          model_platform=ModelPlatformType.VLLM,
          model_type="microsoft/Phi-3-mini-4k-instruct",
          url="http://localhost:8000/v1",
          model_config_dict={"temperature": 0.0},
          api_key="vllm",
      )

      assistant_sys_msg = BaseMessage.make_assistant_message(
          role_name="Assistant",
          content="You are a helpful assistant.",
      )
      agent = ChatAgent(assistant_sys_msg, model=vllm_model, token_limit=4096)

      user_msg = BaseMessage.make_user_message(
          role_name="User",
          content="Say hi to CAMEL AI",
      )
      assistant_response = agent.step(user_msg)
      print(assistant_response.msg.content)
      ```


  | Dataset        | Chat format                                                                                         | Instruction format                                                                                               | Chat format (translated)                                                                   |
  |----------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
  | **AI Society** | [Chat format](https://huggingface.co/datasets/camel-ai/ai_society/blob/main/ai_society_chat.tar.gz) | [Instruction format](https://huggingface.co/datasets/camel-ai/ai_society/blob/main/ai_society_instructions.json) | [Chat format (translated)](https://huggingface.co/datasets/camel-ai/ai_society_translated) |
  | **Code**       | [Chat format](https://huggingface.co/datasets/camel-ai/code/blob/main/code_chat.tar.gz)             | [Instruction format](https://huggingface.co/datasets/camel-ai/code/blob/main/code_instructions.json)             | x                                                                                          |
  | **Math**       | [Chat format](https://huggingface.co/datasets/camel-ai/math)                                        | x                                                                                                                | x                                                                                          |
  | **Physics**    | [Chat format](https://huggingface.co/datasets/camel-ai/physics)                                     | x                                                                                                                | x                                                                                          |
  | **Chemistry**  | [Chat format](https://huggingface.co/datasets/camel-ai/chemistry)                                   | x                                                                                                                | x                                                                                          |
  | **Biology**    | [Chat format](https://huggingface.co/datasets/camel-ai/biology)                                     | x                                                                                                                | x                                                                                          |



  | Dataset          | Instructions                                                                                                         | Tasks                                                                                                         |
  |------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
  | **AI Society**   | [Instructions](https://atlas.nomic.ai/map/3a559a06-87d0-4476-a879-962656242452/db961915-b254-48e8-8e5c-917f827b74c6) | [Tasks](https://atlas.nomic.ai/map/cb96f41b-a6fd-4fe4-ac40-08e101714483/ae06156c-a572-46e9-8345-ebe18586d02b) |
  | **Code**         | [Instructions](https://atlas.nomic.ai/map/902d6ccb-0bbb-4294-83a8-1c7d2dae03c8/ace2e146-e49f-41db-a1f4-25a2c4be2457) | [Tasks](https://atlas.nomic.ai/map/efc38617-9180-490a-8630-43a05b35d22d/2576addf-a133-45d5-89a9-6b067b6652dd) |
  | **Misalignment** | [Instructions](https://atlas.nomic.ai/map/5c491035-a26e-4a05-9593-82ffb2c3ab40/2bd98896-894e-4807-9ed8-a203ccb14d5e) | [Tasks](https://atlas.nomic.ai/map/abc357dd-9c04-4913-9541-63e259d7ac1f/825139a4-af66-427c-9d0e-f36b5492ab3f) |


  We implemented amazing research ideas from other works for you to build, compare and customize your agents. If you use any of these modules, please kindly cite the original works:
  - `TaskCreationAgent`, `TaskPrioritizationAgent` and `BabyAGI` from *Nakajima et al.*: [Task-Driven Autonomous Agent](https://yoheinakajima.com/task-driven-autonomous-agent-utilizing-gpt-4-pinecone-and-langchain-for-diverse-applications/). [[Example](https://github.com/camel-ai/camel/blob/master/examples/ai_society/babyagi_playing.py)]


  - Released AI Society and Code dataset (April 2, 2023)
  - Initial release of `CAMEL` python library (March 21, 2023)


  ```
  @inproceedings{li2023camel,
    title={CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society},
    author={Li, Guohao and Hammoud, Hasan Abed Al Kader and Itani, Hani and Khizbullin, Dmitrii and Ghanem, Bernard},
    booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
    year={2023}
  }
  ```

  Special thanks to [Nomic AI](https://home.nomic.ai/) for giving us extended access to their data set exploration tool (Atlas).

  We would also like to thank Haya Hammoud for designing the initial logo of our project.



  The source code is licensed under Apache 2.0.


  We appreciate your interest in contributing to our open-source initiative. We provide a document of [contributing guidelines](https://github.com/camel-ai/camel/blob/master/CONTRIBUTING.md) which outlines the steps for contributing to CAMEL. Please refer to this guide to ensure smooth collaboration and successful contributions. 🤝🚀


  For more information please contact camel.ai.team@gmail.com.

  [python-image]: https://img.shields.io/badge/Python-3.10%2C%203.11%2C%203.12-brightgreen.svg
  [python-url]: https://www.python.org/
  [pytest-image]: https://github.com/camel-ai/camel/actions/workflows/pytest_package.yml/badge.svg
  [pytest-url]: https://github.com/camel-ai/camel/actions/workflows/pytest_package.yml
  [docs-image]: https://img.shields.io/badge/Documentation-grey.svg?logo=github
  [docs-url]: https://camel-ai.github.io/camel/index.html
  [star-image]: https://img.shields.io/github/stars/camel-ai/camel?label=stars&logo=github&color=brightgreen
  [star-url]: https://github.com/camel-ai/camel/stargazers
  [package-license-image]: https://img.shields.io/badge/License-Apache_2.0-blue.svg
  [package-license-url]: https://github.com/camel-ai/camel/blob/master/licenses/LICENSE

  [colab-url]: https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing
  [colab-image]: https://colab.research.google.com/assets/colab-badge.svg
  [huggingface-url]: https://huggingface.co/camel-ai
  [huggingface-image]: https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-CAMEL--AI-ffc107?color=ffc107&logoColor=white
  [slack-url]: https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ
  [slack-image]: https://img.shields.io/badge/Slack-CAMEL--AI-blueviolet?logo=slack
  [discord-url]: https://discord.camel-ai.org/
  [discord-image]: https://img.shields.io/badge/Discord-CAMEL--AI-7289da?logo=discord&logoColor=white&color=7289da
  [wechat-url]: https://ghli.org/camel/wechat.png
  [wechat-image]: https://img.shields.io/badge/WeChat-CamelAIOrg-brightgreen?logo=wechat&logoColor=white
  [twitter-url]: https://twitter.com/CamelAIOrg
  [twitter-image]: https://img.shields.io/twitter/follow/CamelAIOrg?style=social&color=brightgreen&logo=twitter


pkgId: f732b7a15b979ad64b8f78e6135dd607b915a7096c25daf6dc541207ba054a24
name: python-camel-converter
arch: src
version: 4.0.1
epoch: 0
release: 1
summary: Converts a string from snake case to camel case or camel case to snake case
url: https://pypi.org/project/camel-converter/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camel-converter-4.0.1-1.src.rpm
checksum_type: sha256
description:
  [![CI Status](https://github.com/sanders41/camel-converter/workflows/CI/badge.svg?branch=main&event=push)](https://github.com/sanders41/camel-converter/actions?query=workflow%3CI+branch%3Amain+event%3Apush)
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sanders41/camel-converter/main.svg)](https://results.pre-commit.ci/latest/github/sanders41/camel-converter/main)
  [![Coverage](https://codecov.io/github/sanders41/camel-converter/coverage.svg?branch=main)](https://codecov.io/gh/sanders41/camel-converter)
  [![PyPI version](https://badge.fury.io/py/camel-converter.svg)](https://badge.fury.io/py/camel-converter)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/camel-converter?color=5cc141)](https://github.com/sanders41/camel-converter)

  In JSON keys are frequently in camelCase format, while variable names in Python are typically
  snake_case. The purpose of this pacakgae is to help convert between the two formats.



  - To convert from camel case to snake case:

    ```py
    from camel_converter import to_snake

    snake = to_snake("myString")
    ```

    This will convert `myString` into `my_string`

  - To convert a dictonary's keys from camel case to snake case:

    ```py
    from camel_converter import dict_to_snake

    snake = dict_to_snake({"myString": "val 1"})
    ```

    This will convert `{"myString": "val 1"}` into `{"my_string": "val 1"}`. Non-string keys will be
    left unchanged.

    This is also available as a decorator for functions that return a dictionary.

    ```py
    from camel_converter.decorators import dict_to_snake

    @dict_to_snake
    def my_func() -> dict[str, str]:
        return {"myString": "val 1"}

    snake = my_func()
    ```

    `my_func` will return `{"my_string": "val 1"}`. Non-string keys will be
    left unchanged.

  - To convert from snake case to camel case:

    ```py
    from camel_converter import to_camel

    camel = to_camel("my_string")
    ```

    This will convert `my_string` into `myString`

  - To convert from a dictionary's keys from snake case to camel case:

    ```py
    from camel_converter import dict_to_camel

    camel = to_camel({"my_string": "val 1"})
    ```

    This will convert `{"my_string": "val 1"}` into `{"myString": "val 1"}` Non-string keys will be
    left unchanged.

    This is also available as a decorator for functions that return a dictionary.

    ```py
    from camel_converter.decorators import dict_to_camel

    @dict_to_camel
    def my_func() -> dict[str, str]:
        return {"my_string": "val 1"}

    camel = my_func()
    ```

    `my_func` will return `{"myString": "val 1"}`. Non-string keys will be
    left unchanged.

  - To convert from snake to pascal case:

    ```py
    from camel_converter import to_pascal

    pascal = to_pascal("my_string")
    ```

    This will convert `my_string` into `MyString`

  - To convert from a dictionary's keys from snake case to pascal case:

    ```py
    from camel_converter import dict_to_pascal

    pascal = to_pascal({"my_string": "val 1"})
    ```

    This will convert `{"my_string": "val 1"}` into `{"MyString": "val 1"}` Non-string keys will be
    left unchanged.

    This is also available as a decorator for functions that return a dictionary.

    ```py
    from camel_converter.decorators import dict_to_pascal

    @dict_to_pascal
    def my_func() -> dict[str, str]:
        return {"my_string": "val 1"}

    pascal = my_func()
    ```

    `my_func` will return `{"MyString": "val 1"}`. Non-string keys will be
    left unchanged.



  An optional extra is provided for [Pydantic](https://pydantic-docs.helpmanual.io/) that provides a
  base class to automatically convert between snake case and camel case. To use this Pydantic class
  install camel converter with:

  ```sh
  pip install camel-converter[pydantic]
  ```

  Then your Pydantic classes can inherit from CamelBase.

  ```py
  from camel_converter.pydantic_base import CamelBase


  class MyModel(CamelBase):
      test_field: str


  my_data = MyModel(**{"testField": "my value"})
  print(my_data.test_field)
  ```

  will result in `my value` being printed.

  With setting up your model in this way `myField` from the source, i.e. JSON data, will map to `my_field` in your model.



  If you are interested in contributing to this project please see our [contributing guide](CONTRIBUTING.md)

rpm_license:
  MIT License  Copyright (c) 2021 Paul Sanders  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: 35d23c7fcc9283e2ed858281206260a1412bd51659360abb71a3e4b55ac46e5f
name: python-camel-tools
arch: src
version: 1.5.5
epoch: 0
release: 1
description: |
url: https://github.com/CAMeL-Lab/CAMeL_Tools
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camel-tools-1.5.5-1.src.rpm
checksum_type: sha256
summary:
  A suite of Arabic natural language processing tools developed by the CAMeL Lab at New York University Abu Dhabi.


pkgId: 91fc6921f1a070e0c0ef1b8a0034d4e116345cee6e6b817e28c35f2424b6729a
name: python-camelCasing
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: Converts PascalCase or snake_case strings to camelCase.
url: https://github.com/afogarty85/camelCasing
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camelCasing-0.1.3-1.src.rpm
checksum_type: sha256
description:
  This package converts Pascal Case and snake_case strings into its camelCase
  equivalent.





  ```
  pip install camelCasing
  ```




  ```
  from camelCasing import camelCasing as cc
  ```

  Its functionality can be used in at least two ways:


  (1) Individually:

  ```

  cc.toCamelCase(s='TheQuickBrownFox', user_acronyms=None)
  ```

  or (2) in list comprehensions:

  ```

  [cc.toCamelCase(s=s, user_acronyms=None) for s in df.columns]
  ```



  One of the tricky problems facing camel case text generation is the problem
  of acronyms. This package allows for user defined acronyms that the program
  should look for and account for when creating its camelCase equivalent.

  Consider the following example:

  ```
  s = 'UefiDbx_UefiDbxKeyStatus'
  cc.toCamelCase(s=s, user_acronyms=['WMI', 'FRU', 'SKU', 'UEFI'])  # UEFIDbxUEFIDbxKeyStatus

  s = 'iaasByMicrosoft'
  cc.toCamelCase(s=s, user_acronyms=['IaaS'])  # IaaSByMicrosoft
  ```

  This functionality lets you have control over the acronyms that you want to keep and maintain.


pkgId: 667cd971a9bdb6ac95860916a667c4d8c723860a0bd3165aea4cf017beab9814
name: python-camelcase
arch: src
version: 0.2
epoch: 0
release: 1
summary: Converts a string to Camel Case
url: http://www.craigaddyman.com
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camelcase-0.2-1.src.rpm
checksum_type: sha256
description:
  from camelcase import CamelCase
  c = CamelCase()
  s = 'this is a sentence that needs CamelCasing!'
  print c.hump(s)

  If you have particular words that you want to skip then you can do the following...
  from camelcase import CamelCase
  c = CamelCase('little', 'another')
  s = 'this is a another sentence, but this one is a little different'
  print c.hump(s)


pkgId: 89d90ce78a3c9ef059a0218dfe1e6c31990b13651808d6e1edba98c9317b7250
name: python-camelsnake
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: camelsnake is a Python library for converting between camel case and snake case strings
url: https://github.com/nerandell/camelsnake
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camelsnake-0.0.2-1.src.rpm
checksum_type: sha256
description:
  `camelsnake` is a Python library for converting between camel case and snake case strings using regular expressions. It
  provides two functions:

  - `camel_to_snake(camel_str: str) -> str`: Converts a camel case string to a snake case string.
  - `snake_to_camel(snake_str: str) -> str`: Converts a snake case string to a camel case string.



  To install `camelsnake`, simply use `pip`:

  ```
  pip install camelsnake
  ```



  To use `camelsnake`, import the library and call the `camel_to_snake` and `snake_to_camel` functions with the
  appropriate input strings. Here's an example:

  ```python
  import camelsnake

  camel_str = 'HelloWorld'
  snake_str = camelsnake.camel_to_snake(camel_str)
  print(snake_str)  # Output: 'hello_world'

  snake_str = 'my_http_request'
  camel_str = camelsnake.snake_to_camel(snake_str)
  print(camel_str)  # Output: 'myHttpRequest'
  ```



  To run the tests for `camelsnake`, install `pytest` and run the following command in the project directory:

  ```
  pytest
  ```

  This will run the tests in the `test_camelsnake.py` file and output the results.



  `camelsnake` is licensed under the MIT License. See the `LICENSE` file for more information.



  Contributions to `camelsnake` are welcome! If you find a bug or would like to suggest a new feature, please open an
  issue or submit a pull request. See the `CONTRIBUTING.md` file for more information.

  PS - I published this package in an attempt to see how ridiculous the task is that qualifies for a library of its own


pkgId: 92c374fe85f3c0548b77f7a766c96f2c25bc9e5c439f4da8d69e881614e2209d
name: python-cameo-big-query-log
arch: src
version: 0.1.16
epoch: 0
release: 1
summary: A package for logging data to Google BigQuery
url: https://pypi.org/project/cameo-big-query-log/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cameo-big-query-log-0.1.16-1.src.rpm
checksum_type: sha256
description:
  這個套件提供了一個用於將使用者操作記錄插入到Google BigQuery的工具。它包括兩個主要的類：`UserData`和`BigQueryLogger`。



  你可以使用以下命令來安裝套件：

  ```sh
  pip install -e .
  ```



  在使用這個套件之前，你需要設置一些環境變數。你可以在項目根目錄下創建一個`.env`文件，並添加以下內容：

  ```
  BIG_QUREY_GOOGLE_APPLICATION_CREDENTIALS=path/to/your/service/account/key.json
  BIG_QUREY_KEY=your_fernet_key
  BIG_QUREY_DATASET_ID=your_dataset_id
  BIG_QUREY_TABLE_NAME=your_table_name
  ```

  - `BIG_QUREY_GOOGLE_APPLICATION_CREDENTIALS`：Google Cloud服務帳戶的憑證文件路徑，此份文件會將專案名稱包在裡面。
  - `BIG_QUREY_KEY`：用於加密的Fernet密鑰，可每半年修改一次。
  - `BIG_QUREY_DATASET_ID`：BigQuery數據集ID。
  - `BIG_QUREY_TABLE_NAME`：BigQuery表名。


  ```python
  from cameo_big_query_log.cameo_big_query_log import BigQueryLogger

  logger.generate_key()
  ```





  ```python
  from cameo_big_query_log.cameo_big_query_log import BigQueryLogger

  logger = BigQueryLogger()
  ```



  首先，創建一個包含使用者數據的字典（**必填欄位已標註**）：

  ```python
  user_data = {
      "user_name": "John Doe",  # 必填
      "user_department": "Engineering",  # 必填
      "domain_name": "example.com",  # 選填,default='unknown'
      "session_id": "123456",  # 選填, 對話的session_id, default='unknown'
      "action_type": "login",  # 必填, 選項有login、logout、conversation、picture、video
      "action_details": '{"detail": "value"}',  # 必填, log的詳細資訊, 字串形式, 如果是用completion, 可以直接json.dumps(messages)
      "resource_id": 'unknown',  # 選填, 可為波通鑒資料庫id、詢問的音檔或圖檔名稱
      "developer": "cameo"  # 選填, 開發者姓名, 預設cameo
  }
  ```

  然後，使用`insert_data_to_table`方法將數據插入到BigQuery表中：

  ```python
  logger.insert_data_to_table(user_data)
  ```





  `UserData`類用於驗證和存儲使用者數據。它使用Pydantic進行數據驗證。



  `BigQueryLogger`類用於與Google BigQuery進行交互。它包括以下方法：

  - `__init__`：初始化BigQuery客戶端和加密套件。
  - `generate_key`：生成一個新的Fernet密鑰。
  - `get_local_ip`：獲取本地IP地址。
  - `insert_data_to_table`：將使用者數據插入到BigQuery表中。
  - `create_table`：創建一個新的BigQuery表。



  你可以使用`pytest`來運行測試。確保你已經安裝了`pytest`：

  ```sh
  pip install pytest
  ```

  然後運行測試：

  ```sh
  pytest test
  ```

  這將運行位於`tests/test_cameo_big_query_log.py`中的測試腳本。



  歡迎提交問題和請求功能。如果你想貢獻代碼，請先fork這個倉庫，創建一個新的分支，提交你的更改，然後創建一個pull request。



  這個項目使用MIT許可證。詳情請參閱LICENSE文件。


pkgId: 77e8fca71905e8a57c0fa1ded1e248415688d3decb45aa0ee36e711b833d290a
name: python-cameo-botrun-prompt-tools
arch: src
version: 1.0.6
epoch: 0
release: 1
summary: cameo_botrun_prompt_tools
url: https://github.com/bohachu/cameo_botrun_prompt_tools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cameo-botrun-prompt-tools-1.0.6-1.src.rpm
checksum_type: sha256
description:
  這個套件提供了一系列工具，方便使用者產生與波特人相關的提示詞。


  使用 pip 安裝套件：
  ```
  pip install cameo_botrun_prompt_tools
  ```





  `print_button()` 和 `print_link()` 函式可以用來生成含有@begin @end的按鈕和連結文字。

  ```python
  from cameo_botrun_prompt_tools import print_button, print_link

  print_button("點擊我", "這是一個按鈕")
  print_link("https://www.example.com", "訪問範例網站")




  ```


  `print_buttons()` 和 `print_links()` 函式可以用來生成多個含有@begin @end的按鈕和連結文字。

  ```python
  from cameo_botrun_prompt_tools import print_buttons, print_links

  print_buttons([{"label": "按鈕1", "content": "這是按鈕1"}, {"label": "按鈕2", "content": "這是按鈕2"}])
  print_links([{"url": "https://www.example1.com", "content": "訪問範例網站1"}, {"url": "https://www.example2.com", "content": "訪問範例網站2"}])






  ```


  `format_info_for_readability()`函式可以藉由LLM將複雜資訊(例如API回傳的資訊)整理成方便人類閱讀的格式輸出。

  ```python
  from cameo_botrun_prompt_tools import format_info_for_readability

  formatted_info = format_info_for_readability(
      info, prompt="請將以下資訊整理成方便人類閱讀的格式輸出：\n",
      model="gpt-4o-mini"
  )
  print(formatted_info)
  ```


pkgId: 21a2c9fd8ca6e90e0b787fb5c6a0ccd262f4c789c2fb308f8576fb97ddba2c0a
name: python-camera-ui-python-common
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: camera.ui python utilities
url: https://github.com/seydx/camera.ui
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camera-ui-python-common-0.1.1-1.src.rpm
checksum_type: sha256
rpm_license:
  MIT License  Copyright (c) 2020-2024 seydx <dev@seydx.com>  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: 1717cd244be328cac580069e03c5504a42b46ff998717c0eb75023d150f88885
name: python-camera-util
arch: src
version: 1.1.7
epoch: 0
release: 1
url: https://github.com/uutzinger/camera
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camera-util-1.1.7-1.src.rpm
checksum_type: sha256
summary:
  Python wrapper for USB, blackfly, Raspi, Jetson Nano cameras. Works on Windows, Raspian (inlc Bullseye), JetsonNano, MacOS

description:
  A collection of python threaded camera support routines for
  -  USB and laptop internal webcams
  -  RTSP streams
  -  MIPI CSI cameras (Raspberry Pi, Jetson Nano)
  -  FLIR blackfly USB camera
  Save data as, HDF5, TIFF, AVI, MKV
  Works on most platforms: Windows, MacOS, Unix
  For detailed documentation please `Readme.md
  <https://github.com/uutzinger/camera/blob/master/README.md>`_.


pkgId: 6d493c1d58d8cd7e750c9470a17cd8d15db3a3d7a805555be0ce600b81a8b835
name: python-camera4kivy
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: Yet Another Camera for Kivy
url: https://github.com/Android-for-Python/Camera4Kivy
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camera4kivy-0.3.3-1.src.rpm
checksum_type: sha256
description:
  *Yet Another Camera for Kivy*
  **2023-11-13 This repository is archived.**
  2023/02/09 : Android users: camerax_provider has been updated to version 0.0.3
  - [Overview](https://github.com/Android-for-Python/Camera4Kivy#overview)
  - [Install](https://github.com/Android-for-Python/Camera4Kivy#install)
    * [Install Camera4Kivy on Desktop](https://github.com/Android-for-Python/Camera4Kivy#install-camera4kivy-on-desktop)
    * [Install Camera4Kivy on Android](https://github.com/Android-for-Python/Camera4Kivy#install-camera4kivy-on-android)
      + [buildozer.spec:](https://github.com/Android-for-Python/Camera4Kivy#buildozerspec-)
      + [Run Time Permissions](https://github.com/Android-for-Python/Camera4Kivy#run-time-permissions)
    * [Install Camera4Kivy on iOS](https://github.com/Android-for-Python/Camera4Kivy#install-camera4kivy-on-ios)
      + [Run Time Permissions](https://github.com/Android-for-Python/Camera4Kivy#run-time-permissions-1)
  - [Examples](https://github.com/Android-for-Python/Camera4Kivy#examples)
    * [Tested Examples](https://github.com/Android-for-Python/Camera4Kivy#tested-examples)
      + [C4K Photo Example](https://github.com/Android-for-Python/Camera4Kivy#c4k-photo-example)
      + [C4K QR Example](https://github.com/Android-for-Python/Camera4Kivy#c4k-qr-example)
      + [C4K OpenCV Example](https://github.com/Android-for-Python/Camera4Kivy#c4k-opencv-example)
      + [C4K MLKit Example](https://github.com/Android-for-Python/Camera4Kivy#c4k-mlkit-example)
      + [C4K TFLite Example](https://github.com/Android-for-Python/Camera4Kivy#c4k-tflite-example)
    * [Tested Platforms](https://github.com/Android-for-Python/Camera4Kivy#tested-platforms)
  - [Preview Widget](https://github.com/Android-for-Python/Camera4Kivy#preview-widget)
    * [Preview Widget Properties](https://github.com/Android-for-Python/Camera4Kivy#preview-widget-properties)
      + [aspect_ratio](https://github.com/Android-for-Python/Camera4Kivy#aspect-ratio)
      + [letterbox_color](https://github.com/Android-for-Python/Camera4Kivy#letterbox-color)
      + [orientation](https://github.com/Android-for-Python/Camera4Kivy#orientation)
    * [Preview Widget API](https://github.com/Android-for-Python/Camera4Kivy#preview-widget-api)
      + [Connect Camera](https://github.com/Android-for-Python/Camera4Kivy#connect-camera)
        - [camera_id](https://github.com/Android-for-Python/Camera4Kivy#camera-id)
        - [mirrored](https://github.com/Android-for-Python/Camera4Kivy#mirrored)
        - [filepath_callback](https://github.com/Android-for-Python/Camera4Kivy#filepath_callback)
        - [sensor_resolution](https://github.com/Android-for-Python/Camera4Kivy#sensor_resolution)
        - [sensor_rotation](https://github.com/Android-for-Python/Camera4Kivy#sensor_rotation)
        - [default_zoom](https://github.com/Android-for-Python/Camera4Kivy#default_zoom)
        - [analyze_pixels_resolution](https://github.com/Android-for-Python/Camera4Kivy#analyze_pixels_resolution)
        - [enable_analyze_pixels](https://github.com/Android-for-Python/Camera4Kivy#enable_analyze_pixels)
        - [enable_analyze_imageproxy](https://github.com/Android-for-Python/Camera4Kivy#enable_analyze_imageproxy)
        - [enable_zoom_gesture](https://github.com/Android-for-Python/Camera4Kivy#enable_zoom_gesture)
        - [enable_focus_gesture](https://github.com/Android-for-Python/Camera4Kivy#enable_focus_gesture)
        - [imageproxy_data_format](https://github.com/Android-for-Python/Camera4Kivy#imageproxy_data_format)
      + [Disconnect Camera](https://github.com/Android-for-Python/Camera4Kivy#disconnect-camera)
      + [Capture](https://github.com/Android-for-Python/Camera4Kivy#capture)
        - [location](https://github.com/Android-for-Python/Camera4Kivy#location)
        - [subdir](https://github.com/Android-for-Python/Camera4Kivy#subdir)
        - [name](https://github.com/Android-for-Python/Camera4Kivy#name)
      + [Select Camera](https://github.com/Android-for-Python/Camera4Kivy#select-camera)
      + [Zoom](https://github.com/Android-for-Python/Camera4Kivy#zoom)
      + [Pan/scroll](https://github.com/Android-for-Python/Camera4Kivy#panscroll)
      + [Flash](https://github.com/Android-for-Python/Camera4Kivy#flash)
      + [Torch](https://github.com/Android-for-Python/Camera4Kivy#torch)
      + [Focus](https://github.com/Android-for-Python/Camera4Kivy#focus)
      + [camera_connected](https://github.com/Android-for-Python/Camera4Kivy#camera_connected)
  - [Image analysis](https://github.com/Android-for-Python/Camera4Kivy#image-analysis)
    * [Overview and Examples](https://github.com/Android-for-Python/Camera4Kivy#overview-and-examples)
    * [User Interaction](https://github.com/Android-for-Python/Camera4Kivy#user-interaction)
    * [Coordinates and image encoding](https://github.com/Android-for-Python/Camera4Kivy#coordinates-and-image-encoding)
    * [Analysis Configuration](https://github.com/Android-for-Python/Camera4Kivy#analysis-configuration)
    * [Debugging](https://github.com/Android-for-Python/Camera4Kivy#debugging)
    * [Performance](https://github.com/Android-for-Python/Camera4Kivy#performance)
  - [Camera Behavior](https://github.com/Android-for-Python/Camera4Kivy#camera-behavior)
    * [A Physical Camera](https://github.com/Android-for-Python/Camera4Kivy#a-physical-camera)
    * [Resolution](https://github.com/Android-for-Python/Camera4Kivy#resolution)
      + [Sensor Resolution](https://github.com/Android-for-Python/Camera4Kivy#sensor-resolution)
      + [Cropped Sensor Resolution](https://github.com/Android-for-Python/Camera4Kivy#cropped-sensor-resolution)
      + [Preview Resolution](https://github.com/Android-for-Python/Camera4Kivy#preview-resolution)
      + [Capture Resolution](https://github.com/Android-for-Python/Camera4Kivy#capture-resolution)
      + [Analysis Resolution](https://github.com/Android-for-Python/Camera4Kivy#analysis-resolution)
      + [Display Resolution.](https://github.com/Android-for-Python/Camera4Kivy#display-resolution)
  - [Camera Provider](https://github.com/Android-for-Python/Camera4Kivy#camera-provider)
    * [Android Camera Provider](https://github.com/Android-for-Python/Camera4Kivy#android-camera-provider)
    * [OpenCV](https://github.com/Android-for-Python/Camera4Kivy#opencv)
    * [GStreamer](https://github.com/Android-for-Python/Camera4Kivy#gstreamer)
    * [Picamera](https://github.com/Android-for-Python/Camera4Kivy#picamera)
    * [AVFoundation](https://github.com/Android-for-Python/Camera4Kivy#avfoundation)
  - [Known Behavior](https://github.com/Android-for-Python/Camera4Kivy#known-behavior)
    * [Behavior: Android .mp4 Orientation](https://github.com/Android-for-Python/Camera4Kivy#behavior-android-mp4-orientation)
    * [Behavior: Android .jpg Orientation.](https://github.com/Android-for-Python/Camera4Kivy#behavior-android-jpg-orientation)
    * [Behavior: Android armeabi-v7a build installed on an arm64-v8a device](https://github.com/Android-for-Python/Camera4Kivy#behavior-android-armeabi-v7a-build-installed-on-an-arm64-v8a-device)
    * [Behavior: Android "No supported surface combination"](https://github.com/Android-for-Python/Camera4Kivy#behavior-android-no-supported-surface-combination)


pkgId: 9c3be891ca75c5091de1c0ab78dbae00427b8575cb905d2a30fa13a053dd176b
name: python-camerahub
arch: src
version: 0.38.0
epoch: 0
release: 1
summary: App for cataloguing vintage cameras, lenses, films, negatives & prints
url: https://camerahub.info/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camerahub-0.38.0-1.src.rpm
checksum_type: sha256
description:
  CameraHub is a web app for film photography that can be used to track cameras, lenses, accessories, films, negatives and prints, to fully
  catalogue a collection of photographic equipment as well as the pictures that are made with them.

  It replaces an earlier command-line project, called [PhotoDB](https://github.com/djjudas21/photodb-perl), which has now been deprecated.



  There are several ways of installing CameraHub, depending on your needs:

  * With Pip
  * [From source](docs/operations/source.rst)
  * [With Docker](docs/operations/docker.rst)
  * [With Kubernetes](docs/operations/kubernetes.rst)



  CameraHub requires almost no additional config to run with default settings. However it is insecure in this configuration so at least `CAMERAHUB_SECRET_KEY` and
  `CAMERAHUB_PROD` must be set if you are running in production.

  The following environment variables are supported:



  Email address for the `admin` account
  Default: `admin@example.com`



  Password for the `admin` account
  Default: `admin`



  [Database engine](https://docs.djangoproject.com/en/3.0/ref/settings/#engine)
  Default: `django.db.backends.sqlite3`



  [Database hostname or IP address](https://docs.djangoproject.com/en/3.0/ref/settings/#host) if an engine other than SQLite is configured



  [Database schema or path to SQLite db](https://docs.djangoproject.com/en/3.0/ref/settings/#name)
  `db/db.sqlite3`



  [Database password](https://docs.djangoproject.com/en/3.0/ref/settings/#password) if an engine other than SQLite is configured



  [Database port](https://docs.djangoproject.com/en/3.0/ref/settings/#port) if an engine other than SQLite is configured



  [Database username](https://docs.djangoproject.com/en/3.0/ref/settings/#user) if an engine other than SQLite is configured



  Enable [Django production mode](https://docs.djangoproject.com/en/3.0/ref/settings/#debug)
  Default: `false`



  Random secret value. The default string is for testing only and is insecure in production. Generate a new one [here](https://miniwebtool.com/django-secret-key-generator/)
  Default: `OverrideMe!`



  [Email backend](https://docs.djangoproject.com/en/3.1/topics/email/#email-backends)
  Default: `django.core.mail.backends.filebased.EmailBackend`



  Enable TLS for SMTP



  Enable TLS for SMTP



  SMTP server hostname



  SMTP server username



  SMTP server password



  SMTP server port number



  [From email address](https://docs.djangoproject.com/en/3.0/ref/settings/#default-from-email)
  Default: `noreply@camerahub.info`



  [Site domain](https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts)
  Default: `camerahub.info`



  URL for a status page



  Base data is supplied as fixtures and must be manually imported after installation. These are **not** idempotent so should only be run once.

  This data includes things like EXIF exposure programs, film formats, etc that are required to make CameraHub useful.

  ```sh
  poetry run python manage.py loaddata --app schema Condition ExposureProgram Format Manufacturer Filmstock MeteringMode MeteringType Mount NegativeSize Process ShutterSpeed
  ```

  There is also some test data like cameras and negatives which shouldn't be imported into a production deployment.



  * [Changelog](https://github.com/camerahub/camerahub/releases)
  * [Docs](docs/index.rst)


pkgId: f588ffbab99328d17c811c7f1ee34f4fa0c0f7a8d0ab99639a6807e8fe126ea3
name: python-camerahub-tagger
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: EXIF tagger for CameraHub
url: https://camerahub.info/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camerahub-tagger-0.6.0-1.src.rpm
checksum_type: sha256
description:
  CameraHub Tagger is a companion command-line app for [CameraHub](https://camerahub.info/) to tag JPG
  scans of negatives with EXIF metadata from the CameraHub API. This means you can organise your film
  scans in a digital photo management app with full metadata.

  To use CameraHub Tagger, you must already have entered your cameras, lenses, films and negatives into CameraHub. When you scan your negatives, name them consistently like `{FILM}-{FRAME}-IMG0001.jpg` (for example `45-12-IMG0001.jpg` is frame 12 on film 45).

  Run CameraHub Tagger in the same directory. CameraHub Tagger will attempt to match the JPGs with the
  negatives by using the filename (it will ask you if it can't figure it out). It will then generate a
  unique ID for that scanned JPG to tie it conclusively to the negative. Once the link is made, CameraHub
  Tagger will retrieve all data about that negative, film, lens and camera and use it to generate EXIF
  metadata, the same as digital cameras do. It is safe to run CameraHub Tagger multiple times on the same
  files, as only changed tags are written.

  When your images have been tagged, any digital photo app will read and display these tags in the same
  way as digital photos.



  Install from [PyPI](https://pypi.org/project/camerahub-tagger/) with Pip:

  ```console
  pip install camerahub-tagger
  ```

  This installs a `tagger` binary in your `$PATH`.



  ```console
  tagger [-h] [-r] [-a] [-y] [-d] [-f FILE] [-p PROFILE]
  ```



  Display help message and exit



  Search for scans recursively from current directory



  Don't prompt user to identify scans, only guess based on filename



  Accept all changes without confirmation



  Don't write any tags to image files



  Only update tags which have previously been written. Don't make any new Scan records in CameraHub.



  Image file to be tagged. If not supplied, tag everything in the current directory.



  CameraHub connection profile. Default: `prod`.



  Clear existing EXIF metadata from the image file.



  CameraHub Tagger needs some basic connection details to connect to CameraHub.
  On first run, it will ask for credentials for CameraHub and save them for future use.

  If you need multiple profiles (e.g. if you have multiple users, or you need to connect to
  a development instance of CameraHub) you can configure the extra profiles manually by editing
  `~/camerahub.ini` and adding more blocks.

  The names of each profile are arbitrary, but CameraHub Tagger will automatically use the `prod` profile
  unless you override it with the `--profile` option. Here's an example:

  ```ini
  [prod]
  server = https://camerahub.info/api
  username = anseladams
  password = yosemite

  [dev]
  server = https://dev.camerahub.info/api
  username = annieleibovitz
  password = johnandyoko

  [local]
  server = http://127.0.0.1:8000/api
  username = admin
  password = admin
  ```


pkgId: 31df59660a42b061b3a81ec65290ad6872c45204cbde5f01bff5d962607a3814
name: python-cameramodels
arch: src
version: 0.2.12
epoch: 0
release: 1
summary: A python library for cameramodels
url: https://github.com/iory/cameramodels
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cameramodels-0.2.12-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/iory/cameramodels/workflows/Run%20Tests/badge.svg?branch=master)](https://github.com/iory/cameramodels/actions)

  <h4>
      <a href="https://cameramodels.readthedocs.io/en/latest/">Documentation</a> |
      <a href="https://cameramodels.readthedocs.io/en/latest/reference/index.html">Python API</a> |
  </h4>

  Manipulate Camera Library.



  ```bash
  pip install cameramodels
  ```

  If you would like to use `open3d` conversion functions,

  ```bash
  pip install cameramodels[all]
  ```


pkgId: 7bef4d89da9bfb7045c0f95e13e756a790b9fc4eaf60b67d3402f3bfba43fa64
name: python-cami-amber
arch: src
version: 2.0.7
epoch: 0
release: 1
summary: AMBER: Assessment of Metagenome BinnERs
url: http://cami-challenge.org
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cami-amber-2.0.7-1.src.rpm
checksum_type: sha256
description:
  [![CircleCI](https://circleci.com/gh/CAMI-challenge/AMBER/tree/master.svg?style=svg)](https://circleci.com/gh/CAMI-challenge/AMBER/tree/master)


  AMBER is an evaluation package for the comparative assessment of genome reconstructions and taxonomic assignments from metagenome benchmark datasets. It provides performance metrics, results rankings, and comparative visualizations for assessing multiple programs or parameter effects. The provided metrics were used in the first community benchmarking challenge of the initiative for the [Critical Assessment of Metagenomic Interpretation](http://www.cami-challenge.org/).

  **Metrics computed per bin**

  * Predicted bin size in bps and sequences
  * True positives
  * (Average) Purity
  * (Average) Completeness

  **Metrics computed per sample**

  * Accuracy
  * Misclassification rate (contamination)
  * Purity
  * Completeness
  * (Adjusted) Rand index
  * Percentage of binned base pairs and sequences
  * Number of genomes recovered within levels of completeness and contamination
  * UniFrac (for taxonomic binning)


  **Example pages produced by AMBER**

  * [CAMI I high complexity challenge dataset](https://cami-challenge.github.io/AMBER/cami_i_hc/)
  * [CAMI II mouse gut toy dataset](https://cami-challenge.github.io/AMBER/cami_ii_mouse_gut/)
  * [CAMI II mouse gut toy dataset (using option --filter 1)](https://cami-challenge.github.io/AMBER/cami_ii_mouse_gut_filter1/)





  AMBER 2.0.7 has been tested with Python 3.11.

  See [requirements.txt](requirements.txt) for all dependencies.



  There are several options to install AMBER:

  * [Bioconda](#bioconda)
  * [Python pip](#python-pip)
  * [Docker](#docker)



  Install and configure [Bioconda](https://bioconda.github.io/index.html) if not already installed. Then use the following command to create a Conda environment and install AMBER:

  ~~~BASH
  conda create --name amber cami-amber
  ~~~

  Activate the Conda environment with:

  ~~~BASH
  conda activate amber
  ~~~



  Install pip if not already installed (tested on Linux Ubuntu 22.04):

  ~~~BASH
  sudo apt install python3-pip
  ~~~
  Should you receive the message `Unable to locate package python3-pip`, enter the following commands and repeat the previous step.

  ~~~BASH
  sudo add-apt-repository universe
  sudo apt update
  ~~~

  Then run:

  ~~~BASH
  pip install cami-amber
  ~~~

  Make sure to add AMBER to your PATH:

  ~~~BASH
  echo 'PATH=$PATH:${HOME}/.local/bin' >> ~/.bashrc
  source ~/.bashrc
  ~~~

  Alternatively, download or git-clone AMBER from GitHub. In AMBER's directory, install all requirements with the command:

  ~~~BASH
  pip install -r requirements.txt
  ~~~



  You can pull a pre-built [AMBER Docker BioContainer](https://bioconda.github.io/recipes/cami-amber/README.html) as follows:

  ~~~BASH
  docker pull quay.io/biocontainers/cami-amber:<tag>
  ~~~

  See [valid values for &lt;tag&gt;](https://quay.io/repository/biocontainers/cami-amber?tab=tags).

  Alternatively, download or git-clone AMBER from GitHub. In AMBER's directory, build the Docker image with the command:

  ~~~BASH
  docker build -t amber .
  ~~~

  See bellow an example of how to [run AMBER using Docker](#running-amberpy-using-docker).





  As input, AMBER uses three files and an additional file for assessing taxonomic binning:
  1. A gold standard mapping of contigs or read IDs to genomes and/or taxon IDs in the [CAMI binning Bioboxes format](https://github.com/bioboxes/rfc/tree/master/data-format). Columns are tab separated. Example:
  ~~~BASH
  @Version:0.9.1
  @SampleID:gsa

  @@SEQUENCEID BINID      TAXID  LENGTH
  RH|P|C37126  Sample6_89 45202  25096
  RH|P|C3274   Sample9_91 32644  10009
  RH|P|C26099  1053046    765201 689201
  RH|P|C35075  1053046    765201 173282
  RH|P|C20873  1053046    765201 339258
  ~~~
  See [here](./test/gsa_mapping.binning) another example. Observations:
  * The value of the SampleID header tag must uniquely identify a sample and be the same in the gold standard and the predictions (input 2 below).
  * Column BINID (TAXID) is required to assess genome (taxonomic) binning.
  * Column LENGTH can be added to a mapping file using tool [_src/utils/add_length_column.py_](#srcutilsadd_length_columnpy).

  2. One or more files, each containing the bin assignments from a binning program, also in the [CAMI binning Bioboxes format](https://github.com/bioboxes/rfc/tree/master/data-format). Column LENGTH is not required  (LENGTH is only required in the gold standard).

  Note: a tool for converting FASTA files, such that each file represents a bin, is available (see [_src/utils/convert_fasta_bins_to_biobox_format.py_](#srcutilsconvert_fasta_bins_to_biobox_formatpy)).

  3. For assessing **taxonomic binning**, AMBER also requires the file **nodes.dmp** from NCBI. Download taxdump.tar.gz from [ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz](ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz), extract nodes.tmp, and provide it to AMBER with option `--ncbi_dir`.



  Binnings of datasets with multiple samples are supported by AMBER. For each binning program, simply concatenate the binnings of the different samples into a single file to obtain one binning file per program. The gold standard must also consist in one file for all samples. Remember: binnings for the same sample must have the same SampleID.




  ~~~BASH
  usage: AMBER [-h] -g GOLD_STANDARD_FILE [-l LABELS] [-p FILTER] [-n MIN_LENGTH] -o OUTPUT_DIR [--stdout] [-d DESC] [--colors COLORS] [--silent] [--skip_gs] [-v] [-x MIN_COMPLETENESS]
               [-y MAX_CONTAMINATION] [-r REMOVE_GENOMES] [-k KEYWORD] [--genome_coverage GENOME_COVERAGE] [--ncbi_dir NCBI_DIR]
               bin_files [bin_files ...]

  AMBER: Assessment of Metagenome BinnERs

  positional arguments:
    bin_files             Binning files

  options:
    -h, --help            show this help message and exit
    -g GOLD_STANDARD_FILE, --gold_standard_file GOLD_STANDARD_FILE
                          Gold standard - ground truth - file
    -l LABELS, --labels LABELS
                          Comma-separated binning names
    -p FILTER, --filter FILTER
                          Filter out [FILTER]% smallest genome bins (default: 0)
    -n MIN_LENGTH, --min_length MIN_LENGTH
                          Minimum length of sequences
    -o OUTPUT_DIR, --output_dir OUTPUT_DIR
                          Directory to write the results to
    --stdout              Print summary to stdout
    -d DESC, --desc DESC  Description for HTML page
    --silent              Silent mode
    --skip_gs             Skip gold standard evaluation vs itself
    -v, --version         show program's version number and exit

  genome binning-specific arguments:
    -x MIN_COMPLETENESS, --min_completeness MIN_COMPLETENESS
                          Comma-separated list of min. completeness thresholds (default %: 50,70,90)
    -y MAX_CONTAMINATION, --max_contamination MAX_CONTAMINATION
                          Comma-separated list of max. contamination thresholds (default %: 10,5)
    -r REMOVE_GENOMES, --remove_genomes REMOVE_GENOMES
                          File with list of genomes to be removed
    -k KEYWORD, --keyword KEYWORD
                          Keyword in the second column of file with list of genomes to be removed (no keyword=remove all genomes in list)
    --genome_coverage GENOME_COVERAGE
                          genome coverages

  taxonomic binning-specific arguments:
    --ncbi_dir NCBI_DIR   Directory containing the NCBI taxonomy database dump files nodes.dmp, merged.dmp, and names.dmp
  ~~~
  **Example:**
  ~~~BASH
  amber.py -g test/gsa_mapping.binning \
  -l "MaxBin 2.0, CONCOCT, MetaBAT" \
  -p 1 \
  -r test/unique_common.tsv \
  -k "circular element" \
  test/naughty_carson_2 \
  test/goofy_hypatia_2 \
  test/elated_franklin_0 \
  -o output_dir/
  ~~~



  _amber.py_ can be run with the `docker run` command. Example:

  ~~~BASH
  docker run -v $(pwd):/host amber \
  amber.py \
  -l "CONCOCT (CAMI), MaxBin 2.0.2 (CAMI)" \
  -p 1 \
  -r /host/test/unique_common.tsv \
  -k "circular element" \
  -g /host/test/gsa_mapping.binning \
  /host/test/goofy_hypatia_2 \
  /host/test/naughty_carson_2 \
  -o /host/output_dir
  ~~~




  Adds column _LENGTH to the gold standard mapping file, eliminating the need to provide a FASTA or FASTQ file to amber.py.

  ~~~BASH
  usage: add_length_column.py [-h] -g GOLD_STANDARD_FILE -f FASTA_FILE

  Add length column _LENGTH to gold standard mapping and print mapping on the
  standard output

  optional arguments:
    -h, --help            show this help message and exit
    -g GOLD_STANDARD_FILE, --gold_standard_file GOLD_STANDARD_FILE
                          Gold standard - ground truth - file
    -f FASTA_FILE, --fasta_file FASTA_FILE
                          FASTA or FASTQ file with sequences of gold standard
  ~~~
  **Example:**
  File CAMI_low_RL_S001__insert_270_GoldStandardAssembly.fasta.gz used in the example can be downloaded [here](https://data.cami-challenge.org/participate).
  ~~~BASH
  python3 src/utils/add_length_column.py -g test/gsa_mapping.binning \
  -f test/CAMI_low_RL_S001__insert_270_GoldStandardAssembly.fasta.gz
  ~~~
  **Output:**
  ~~~BASH
  @Version:0.9.1
  @SampleID:gsa

  @@SEQUENCEID BINID           LENGTH
  RL|S1|C10817 Sample18_57     20518
  RL|S1|C11497 Sample22_57     37672
  RL|S1|C6571  evo_1286_AP.033 69914
  RL|S1|C10560 evo_1286_AP.033 995657
  ...
  ~~~


  ~~~BASH
  usage: convert_fasta_bins_to_biobox_format.py [-h] [-o OUTPUT_FILE]
                                                paths [paths ...]

  Convert bins in FASTA files to CAMI tsv format

  positional arguments:
    paths                 FASTA files including full paths

  optional arguments:
    -h, --help            show this help message and exit
    -o OUTPUT_FILE, --output_file OUTPUT_FILE
                          Output file
  ~~~
  **Example:**
  ~~~BASH
  python3 src/utils/convert_fasta_bins_to_cami.py \
  /path/to/file/maxbin.out.001.fasta \
  /path/to/file/maxbin.out.002.fasta \
  /path/to/file/maxbin.out.003.fasta \
  /path/to/file/maxbin.out.004.fasta \
  /path/to/file/maxbin.out.005.fasta \
  -o bins.tsv
  ~~~
  Alternatively:
  ~~~BASH
  python3 src/utils/convert_fasta_bins_to_cami.py /path/to/file/maxbin.out.0* -o bins.tsv
  ~~~
  **Output:**
  File bins.tsv is created in the working directory.



  We are using [tox](https://tox.readthedocs.io/en/latest/) for project automation.



  If you want to run tests, just type _tox_ in the project's root directory:

  ~~~BASH
  tox
  ~~~

  You can use all libraries that AMBER depends on by activating tox's virtual environment with the command:

  ~~~BASH
  source  <project_directory>/.tox/py311/bin/activate
  ~~~



  In order to update *https://cami-challenge.github.io/AMBER*, modify file index.html.



  If the dev branch is merged into the master branch:

  1. Update [version.py](version.py) according to [semantic versioning](https://semver.org/) on the dev branch.

  2. Merge the dev branch into the master branch.

  3. Make a release on GitHub with the same version number provided in [version.py](version.py) .

  4. Create package and upload it to PyPI:

  ~~~BASH
  python3 setup.py sdist bdist_wheel
  twine upload dist/*
  ~~~



  Please cite AMBER as:
  * Meyer, F., Hofmann, P., Belmann, P., Garrido-Oter, R., Fritz, A., Sczyrba, A., McHardy, A.C., **AMBER: Assessment of Metagenome BinnERs**, GigaScience 7, giy069 (2018). [https://doi.org/10.1093/gigascience/giy069](https://doi.org/10.1093/gigascience/giy069)

  The metrics implemented in AMBER were used and described in the CAMI manuscript, thus you may also cite:
  * Sczyrba, A., Hofmann, P., Belmann, P. et al. **Critical Assessment of Metagenome Interpretation—a benchmark of metagenomics software.** Nat Methods 14, 1063–1071 (2017). [https://doi.org/10.1038/nmeth.4458](https://doi.org/10.1038/nmeth.4458)

  or

  * Meyer, F., Fritz, A., Deng, ZL. et al. **Critical Assessment of Metagenome Interpretation: the second round of challenges.** Nat Methods 19, 429–440 (2022). [https://doi.org/10.1038/s41592-022-01431-4](https://doi.org/10.1038/s41592-022-01431-4)



  AMBER 2 is licensed under GPL v3.


pkgId: d915aa2aee89779fa7bec445a81115a1ee77453914975642286ae38a1ba0f050
name: python-camlab
arch: src
version: 0.1.3.0
epoch: 0
release: 1
summary: play with camera poses
url: https://github.com/leviome/camlab
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camlab-0.1.3.0-1.src.rpm
checksum_type: sha256
description:
  ```sh
  pip install camlab
  ```

  <p float="center">
    <img src="assets/camera_system_calibration.gif" width="78%" />
  </p>

  project a world-coordinate point to screen coordniate:

  ```python
  import numpy as np
  from camlab import CameraObj


  cam = CameraObj()


  focal = 1111.1
  w = 800
  h = 800
  cam.manual_init(focal, w, h)


  extri = np.array(
          [[-9.9990e-01,  4.1922e-03, -1.3346e-02, -5.3798e-02],
          [-1.3989e-02, -2.9966e-01,  9.5394e-01,  3.8455e+00],
          [-4.6566e-10,  9.5404e-01,  2.9969e-01,  1.2081e+00],
          [0.0, 0.0, 0.0, 1.0]])
  cam.load_extrinsic(extri)


  p_in_world = [0, 0, 0]
  p_in_screen = cam.world2screen(p_in_world, to_int=True)
  print(p_in_screen)


  ```

  make a ray from a screen point:

  ```python
  import numpy as np
  from camlab import CameraObj

  intri = [[1111.0, 0.0, 400.0],
           [0.0, 1111.0, 400.0],
           [0.0, 0.0, 1.0]]
  extri = np.array(
          [[-9.9990e-01,  4.1922e-03, -1.3346e-02, -5.3798e-02],
          [-1.3989e-02, -2.9966e-01,  9.5394e-01,  3.8455e+00],
          [-4.6566e-10,  9.5404e-01,  2.9969e-01,  1.2081e+00],
          [0.0, 0.0, 0.0, 1.0]])

  cam_obj = CameraObj(intri)
  cam_obj.load_extrinsic(extri)

  p = (400, 400)  # screen point
  rayo, rayd = cam_obj.make_ray(p)
  print(rayo, rayd)


  p_ = cam_obj.world2screen(rayd - rayo, to_int=True)

  print(p_)


  ```


pkgId: fbaa1ca59756471fd3dbb52f016b2843c6992f5931b37875575b62dd8337cc49
name: python-camlhmp
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Classification through yAML Heuristic Mapping Protocol
url: https://github.com/rpetit3/camlhmp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camlhmp-1.1.0-1.src.rpm
checksum_type: sha256
description:
  [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/rpetit3/camlhmp)



  🐪 camlhmp 🐪 - Classification through yAML Heuristic Mapping Protocol

  `camlhmp` is a tool for generating organism typing tools from YAML schemas. Through discussions
  with Tim Read, we identified a need for a straightforward method to define and manage typing
  schemas for organisms of interest. YAML was chosen for its simplicity and readability.

  Full documentation for `camlhmp` can be found at [https://rpetit3.github.io/camlhmp/](https://rpetit3.github.io/camlhmp/).



  The primary purpose of `camlhmp` is to provide a framework that enables researchers to
  _independently_ define typing schemas for their organisms of interest using YAML. This
  approach facilitates the management and analysis biological data for researchers at any
  level of experience.

  `camlhmp` does not supply pre-defined typing schemas. Instead, it equips researchers
  with the necessary tools to create and maintain their own schemas, ensuring these schemas
  can easily remain up to date with the latest scientific developments.

  Finally, the development of `camlhmp` was driven by a practical need to streamline
  maintenance of multiple organism typing tools. Managing these tools separately is
  time-consuming and challenging. `camlhmp` simplifies this by providing a single
  framework for each tool.



  `camlhmp` is available through [PyPI](https://pypi.org/project/camlhmp/) and
  [Bioconda](https://bioconda.github.io/recipes/camlhmp/README.html). While you can install it
  through PyPi, it is recommended to install it through BioConda so that non-Python dependencies
  are also installed.

  ```bash
  conda create -n camlhmp -c conda-forge -c bioconda camlhmp
  conda activate camlhmp
  camlhmp
  ```



  If you make use of `camlhmp` in your analysis, please cite the following:

  - __camlhmp__
  _Petit III RA, Read TD [camlhmp: Classification through yAML Heuristic Mapping Protocol](https://github.com/rpetit3/camlhmp) (GitHub)_

  - __[BLAST+](https://blast.ncbi.nlm.nih.gov/Blast.cgi)__
  _Camacho C, Coulouris G, Avagyan V, Ma N, Papadopoulos J, Bealer K, Madden TL [BLAST+: architecture and applications](http://dx.doi.org/10.1186/1471-2105-10-421). BMC Bioinformatics 10, 421 (2009)_



  If I'm being honest, I really wanted to name a tool with "camel" in it because they are my
  wife's favorite animal🐪 and they also remind me of my friends in Oman!

  Once it was decided YAML was going to be the format for defining schemas, I quickly stumbled
  on "Classification through YAML" and quickly found out I wasn't the only once who thought
  of "CAML". But, no matter, it was decided it would be something with "CAML", then Tim Read
  came with the save and suggested "Heuristic Mapping Protocol". So, here we are - _camlhmp_!



  I'm not a lawyer and MIT has always been my go-to license. So, MIT it is!



  Support for this project came (in part) from the [Wyoming Public Health Division](https://health.wyo.gov/publichealth/), and
  the [Center for Applied Pathogen Epidemiology and Outbreak Control (CAPE)](https://www.linkedin.com/company/center-for-applied-pathogen-epidemiology-and-outbreak-control/).

  ![Wyoming Public Health Division](docs/assets/wyphd-banner.jpg)
  ![Center for Applied Pathogen Epidemiology and Outbreak Control](docs/assets/cape-banner.png)


pkgId: cd50e76f34b04b4e6b2fbd92f3205b43287ccff51a763b097ac4186850f63527
name: python-camminapy
arch: src
version: 1.1.11
epoch: 0
release: 1
summary: My personal code collection.
url: https://thomascamminady.github.io/camminapy/camminapy.html
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camminapy-1.1.11-1.src.rpm
checksum_type: sha256
description:
  My personal code collection.

  Link to [Github](https://github.com/thomascamminady/camminapy).



  Install via `pip`:

  ```bash
  pip install camminapy
  ```


  Install via `poetry`:

  ```bash
  poetry add camminapy
  ```



  To create the documentation, run:
  ```bash
  make doc
  ```

  To publish an updated version to PyPi:
  ```bash
  make publish
  ```


pkgId: 68ba66812cdf2fa0fd11c88b8b8ded7edf2fd3afc49cc0b791a754f4be1eb6c5
name: python-camoufox
arch: src
version: 0.3.10
epoch: 0
release: 1
summary: Wrapper around Playwright to help launch Camoufox
url: https://camoufox.com/python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camoufox-0.3.10-1.src.rpm
checksum_type: sha256
description:
  This Python library wraps around Playwright's API to help automatically generate & inject unique device characteristics (OS, CPU info, navigator, fonts, headers, screen dimensions, viewport size, WebGL, addons, etc.) into Camoufox.
  It uses [BrowserForge](https://github.com/daijro/browserforge) under the hood to generate fingerprints that mimic the statistical distribution of device characteristics in real-world traffic.


pkgId: fb4c943345ccc7bed38e3d509783c33c532fe323b0efb62b4517813561088836
name: python-camptools
arch: src
version: 0.10.3
epoch: 0
release: 1
summary: Tools for camphor
url: https://github.com/Nkzono99/camptools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camptools-0.10.3-1.src.rpm
checksum_type: sha256
description:
  camphor用ツール


  ```
    pip install camptools --user
  ```



  ```
  $ nmyqsub <job file> -m <message> -d <directory>
    jobを投入し、job情報を記録する(job_status.sh, joblist.shなどに使用)
    directoryを指定した場合、指定ディレクトリに移動後にqsubを実行

  $ myqsub <job file> -m <message> -d <directory>
    jobを投入し、job情報を記録する(job_status.sh, joblist.shなどに使用)
    directoryを指定した場合、指定ディレクトリに移動後にqsubを実行
    投入されるjobファイルは、パラメータファイルplasma.inpに応じてノード数を決定し置換したもの
    python環境にf90nmlが必要

    <job file>の形式は以下のようにすること
      1. #QSUB -A p={}:t=1:c=64:m=90G
      2. aprun -n {} -d 1 -N 64 ./mpiemses3D plasma.inp
  ```


  ```
  $ job_status
    jobの状態と標準出力の一部を出力

  $ joblist
    jobの状態を出力
  ```


  ```
  $ jobhistory -n <num outputs> --correct_date
    過去のjobのリストを表示
    <job id>, <directory>, <message>, <date>

    --correct_date:
      *.o*ファイルから日付を読み取りjobに日付情報を付加する
      (この日付情報は保存されるため毎回呼ばなくても良い)
  ```


  ```
  $ extentsim <from-dir> <to-dir> --run
    EMSESの継続シミュレーションを行う
    from-dirに存在するmpiemses3D, job.sh, SNAPSHOT1, generate_xdmf.pyをto-dirにコピーする
    runフラグを指定するとmyqsubによるジョブの投入まで行う
  ```


  ```
  $ mymkdir --key <key> <directory>
    keyで指定した構成のディレクトリを作成する
    ディレクトリ構成の設定は~/copylist.jsonに記載する
  ```


  ```
  $ cmdjob [-h] {register,create} ...
  $ cmdjob register -ug <usergroup> -s <system> --local
    作成するjobの設定を登録する
    localフラグを指定するとそのディレクトリ以下での設定が変更される
  $ cmdjob create <command> -o <output>
    commandを実行するジョブファイルを作成する
    出力ファイル名はoutputで指定(デフォルト: tmpjob.sh)
  ```


  ```
  $ checkpoint {register, clear, list}
  $ checkpoint register -m <message>
    カレントディレクトリをチェックポイントとして保存する
  $ checkpoint clear -a -i <index>
    チェックポイントを削除する
    -aフラグを指定するとすべてのチェックポイントを削除する
    -iフラグを指定すると指定した番号をチェックポイントを削除する
  $ checkpoint list
    チェックポイントのリストを表示する
  ```


  ```
  $ filesync {lock, wait, notify}
  $ filesync lock <key>
    <key>名のロックを確保する (~/.camptools内にロック情報を書き込む)
  $ filesync wait <key>
    <key>名のロックが確保されていたら待機する
  $ filesync notify <key>
    <key>名のロックを解放する (~/.camptoolsからロック情報を削除する)
  ```


pkgId: c45ea6df48d495903087761f3ebf7b62444d21588112ce2030e91452cf550f96
name: python-camptown
arch: src
version: 0.3.13
epoch: 0
release: 1
summary: Semantic-HTML player engine
url: https://github.com/fluffy-critter/camptown
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camptown-0.3.13-1.src.rpm
checksum_type: sha256
description:
  A simple, accessibility-minded, semantic-HTML-based audio player for embedding albums into webpages.

  This is just the player template and a Python wrapper. If you want a fully-fledged editor, check out [Bandcrash](https://fluffy.itch.io/bandcrash).

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


pkgId: 2badf6b6c5cbb3fcc705951f4de374c56fb1326becdc1c45ca65fc7deed54475
name: python-campy
arch: src
version: 0.0.1.dev19
epoch: 0
release: 1
summary: Stanford's introductory libraries in Python, including the ACM graphical libraries.
url: https://campy.sredmond.io
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-campy-0.0.1.dev19-1.src.rpm
checksum_type: sha256
description:
  ![GitHub Top Language](https://img.shields.io/github/languages/top/sredmond/campy.svg)
  ![GitHub Issues](https://img.shields.io/github/issues/sredmond/campy.svg)
  ![GitHub License](https://img.shields.io/github/license/sredmond/campy.svg)
  ![PyPI](https://img.shields.io/pypi/v/campy.svg)
  ![PyPI - Status](https://img.shields.io/pypi/status/campy.svg)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/campy.svg)



  - All your favorite `GObject`s, like `GOval`s, `GRect`s, and more.
  - Functional event-driving GUIs.
  - I/O helpers.
  - Cross-platform support.




  To install `campy`, simply use `pip`:

  ```
  $ pip install campy
  ```



  Learn more about `campy` at `https://campy.sredmond.io/`.


pkgId: dab8d1525ff1becd1087466919ab034fbde3912c02d18b673f0085bd9df832a1
name: python-camu
arch: src
version: 0.1.7
epoch: 0
release: 1
summary: A package for filtering candidate mutations for spontaneous mutation rate estimates.
url: https://gitlab.rlp.net/nruffini/camufi/tree/master
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camu-0.1.7-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <img height="200" src="images/CaMu_py.png" alt="Camu Logo"/>
  </p>



  `CaMu.py` can easily be installed using pip. Just run the command:

  ```bash
  pip install camu
  ```

  pip will automatically install the required versions of the python packages that are included within `CaMu.py`.

  Additionally, it is necessary to have **samtools** >= 0.1.19 and **gatk**>=4.1.2 installed and added to the path.



  After installing `CaMu.py`, the main module `camu` can be run via
  ```bash
  python3 -m camu <additional parameter>
  ```

  Giving *-h* or *--help* as additional parameter opens the help page.

  Here you can see all additional parameters you need to pass in order to run `camu`.

  For the overall script it is necessary to provide a text file giving the paths all samples VCF files in column 1 and the corresponding BAM files in column 2 with *-i*.

  Additionally, the path to the control BAM file has to be provided via *-c*.

  Finally, the path to the reference genome has to be given with *-r*.

  If you want to run any script separately, you can call the script using

  ```bash
  python3 -m <scriptname>
  ```

  where \<scriptname\> has to be exchanged by one of the 5 modules given below (`preprocessing.py`, `filterDupAndLinked.py`, etc.).



  For direct estimation of the spontaneous mutation rate µ, it is necessary to calculate the rate of spontaneous de-novo mutations (DNM) occuring per site per generation.
  Consequently, counting DNM is essential for estimating µ.

  The raw approach is:
  * Sequencing samples and control --> FASTQ files
  * Assembly of sequencing results --> BAM files
  * perform some filtering steps
  * Variant calling
  * extraction of variants occurring in samples but not in control --> candidate mutations

  The resulting list of candidate mutations (CM) currently has to be manually curated using a genome browser like IGV.

  Unfortunately, approx. 90 % of these CM are no true DNM, they turn out to be false-positives.

  **CaMu.py** aims to accelerate the whole procedure of DNM counting by filtering out the vast majority of false-positive CM and by preparing the remaining CM for fast manual curation with IGV.

  **CaMu.py** consists of 5 main Python modules:
  1. `preprocessing.py`
  2. `filterDupAndLinked.py`
  3. `detectFIO.py`
  4. `snapshotIGV.py`
  5. `IGVsessions.py`


  `preprocessing.py` starts with an input text file containing paths to all sampels' VCF files in column 1 and paths to all corresponding BAM files in column 2.
  These VCF and BAM files are fread out nd further processed in order to find variants that are possible DNM - the candidate mutations CM.

  The rough is approach is the following:

  <p align="center">
    <img height="200" src="images/Preprocessing.png" alt="Preprocessing pipeline"/>
  </p>

  The following scripts within `CaMu.py` further filter the CM for those that fully linked to other mutations, those that are only included due to reads that are most probably PCR duplicates and for those variants occurring in other samples or several times in the control sample's BAM file.

  Finally, for all the remaining CM IGV Sessions and IGV snapshots are created within `IGVsessions.py` and `snapshotIGV.py` to further simplify the manual curation of the remaining CM.

  Here is an overview:

  <p align="center">
    <img height="200" src="images/workflowCaMu.png" alt="CaMu overview"/>
  </p>


pkgId: 4473d6ee1b447d44a4d944ccbeeffb0ce989da3c59465584c017260beceaf22a
name: python-camunda-external-task-client-python3
arch: src
version: 4.4.0
epoch: 0
release: 1
summary: Camunda External Task Client for Python 3
url: https://github.com/yogeshrnaik/camunda-external-task-client-python3
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-camunda-external-task-client-python3-4.4.0-1.src.rpm
checksum_type: sha256
description:
  [![Community Extension](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)](https://github.com/camunda-community-hub/community)[![Lifecycle: Stable](https://img.shields.io/badge/Lifecycle-Stable-brightgreen)](https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#stable-)


  ![camunda-external-task-client-python3](https://github.com/trustfactors/camunda-external-task-client-python3/workflows/camunda-external-task-client-python3/badge.svg)

  This repository contains Camunda External Task Client written in Python3.


  Implement your [BPMN Service Task](https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/) in Python3.

  > Python >= 3.7 is required


  Add following line to `requirements.txt` of your Python project.
  ```
  git+https://github.com/trustfactors/camunda-external-task-client-python3.git/#egg=camunda-external-task-client-python3
  ```

  Or use pip to install as shown below:
  ```
  pip install camunda-external-task-client-python3
  ```


  To run the examples provided in [examples](./examples) folder, you need to have Camunda running locally or somewhere.

  To run Camunda locally with Postgres DB as backend, you can use [docker-compose.yml](./docker-compose.yml) file.

  ```
  $> docker-compose -f docker-compose.yml up
  ```


  To run the examples with Auth Basic provided in [examples/examples_auth_basic](./examples/examples_auth_basic) folder, you need to have Camunda with AuthBasic, running locally or somewhere.

  To run Camunda with AuthBasic locally with Postgres DB as backend, you can use [docker-compose-auth.yml](./docker-compose-auth.yml) file.

  ```
  $> docker-compose -f docker-compose-auth.yml up
  ```



  1.  Make sure to have [Camunda](https://camunda.com/download/) running.
  2.  Create a simple process model with an External Service Task and define the topic as 'topicName'.
  3.  Deploy the process to the Camunda BPM engine.
  4.  In your Python code:

  ```python
  import time
  from camunda.external_task.external_task import ExternalTask, TaskResult
  from camunda.external_task.external_task_worker import ExternalTaskWorker


  default_config = {
      "maxTasks": 1,
      "lockDuration": 10000,
      "asyncResponseTimeout": 5000,
      "retries": 3,
      "retryTimeout": 5000,
      "sleepSeconds": 30
  }

  def handle_task(task: ExternalTask) -> TaskResult:
      """
      This task handler you need to implement with your business logic.
      After completion of business logic call either task.complete() or task.failure() or task.bpmn_error()
      to report status of task to Camunda
      """
      
      

      
      failure, bpmn_error = random_true(), random_true() # this code simulate random failure
      if failure:
          
          return task.failure(error_message="task failed",  error_details="failed task details",
                              max_retries=3, retry_timeout=5000)
      elif bpmn_error:
          return task.bpmn_error(error_code="BPMN_ERROR_CODE", error_message="BPMN Error occurred",
                                  variables={"var1": "value1", "success": False})

      
      return task.complete({"var1": 1, "var2": "value"})

  def random_true():
      current_milli_time = int(round(time.time() * 1000))
      return current_milli_time % 2 == 0

  if __name__ == '__main__':
     ExternalTaskWorker(worker_id="1", config=default_config).subscribe("topicName", handle_task)
  ```



  External Tasks are service tasks whose execution differs particularly from the execution of other service tasks (e.g. Human Tasks).
  The execution works in a way that units of work are polled from the engine before being completed.

  **camunda-external-task-client-python** allows you to create easily such client in Python3.




  Camunda provides functionality to start a process instance for a given process definition.

  To start a process instance, we can use `start_process()` from [engine_client.py](./camunda/client/engine_client.py#L24)

  You can find a usage example [here](./examples/start_process.py).

  ```python
  client = EngineClient()
  resp_json = client.start_process(process_key="PARALLEL_STEPS_EXAMPLE", variables={"intVar": "1", "strVar": "hello"},
                                   tenant_id="6172cdf0-7b32-4460-9da0-ded5107aa977", business_key=str(uuid.uuid1()))
  ```



  `ExternalTaskWorker(worker_id="1").subscribe("topicName", handle_task)` starts long polling of the Camunda engine for external tasks.

  * Polling tasks from the engine works by performing a fetch & lock operation of tasks that have subscriptions. It then calls the handler function passed to `subscribe()` function. i.e. `handle_task` in above example.
  * Long Polling is done periodically based on the `asyncResponseTimeout` configuration. Read more about [Long Polling](https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/#long-polling-to-fetch-and-lock-external-tasks).


  ```python
  from camunda.external_task.external_task import ExternalTask, TaskResult
  from camunda.external_task.external_task_worker import ExternalTaskWorker
  def handle_task(task: ExternalTask) -> TaskResult:
      

      
      
      return task.complete({"var1": 1, "var2": "value"})

  ExternalTaskWorker(worker_id="1").subscribe("topicName", handle_task)
  ```


  ```python
  from camunda.external_task.external_task import ExternalTask, TaskResult
  from camunda.external_task.external_task_worker import ExternalTaskWorker
  def handle_task(task: ExternalTask) -> TaskResult:
      

      
      return task.failure(error_message="task failed",  error_details="failed task details",
                          max_retries=3, retry_timeout=5000)
      
      
      

  ExternalTaskWorker(worker_id="1").subscribe("topicName", handle_task)
  ```


  ```python
  from camunda.external_task.external_task import ExternalTask, TaskResult
  from camunda.external_task.external_task_worker import ExternalTaskWorker
  def handle_task(task: ExternalTask) -> TaskResult:
      

      
      return task.bpmn_error(error_code="BPMN_ERROR", error_message="BPMN error occurred")

  ExternalTaskWorker(worker_id="1" ).subscribe("topicName", handle_task)
  ```


  ```python
  from camunda.external_task.external_task import ExternalTask, TaskResult
  from camunda.external_task.external_task_worker import ExternalTaskWorker
  def handle_task(task: ExternalTask) -> TaskResult:
      
      
      score = task.get_variable("score")
      if int(score) >= 100:
          return task.complete(...)
      else:
          return task.failure(...)

  ExternalTaskWorker().subscribe("topicName", handle_task)
  ```


  Camunda provides functionality to send a message event to a running process instance.

  You can read more about the message events here: https://docs.camunda.org/manual/7.13/reference/bpmn20/events/message-events/

  In our to send a message event to a process instance, a new function called `correlate_message()` is added to [engine_client.py](./camunda/client/engine_client.py#L60)

  We can correlate the message by:
  - process_instance_id
  - tenant_id
  - business_key
  - process_variables

  You can find a usage example [here](./examples/correlate_message.py).

  ```python
  client = EngineClient()
  resp_json = client.correlate_message("CANCEL_MESSAGE", business_key="b4a6f392-12ab-11eb-80ef-acde48001122")
  ```


  To create an EngineClient with AuthBasic simple

  ```python
  client = EngineClient(config={"auth_basic": {"username": "demo", "password": "demo"}})
  resp_json = client.start_process(process_key="PARALLEL_STEPS_EXAMPLE", variables={"intVar": "1", "strVar": "hello"},
                                   tenant_id="6172cdf0-7b32-4460-9da0-ded5107aa977", business_key=str(uuid.uuid1()))
  ```

  To create an ExternalTaskWorker with AuthBasic simple

  ```python
  from camunda.external_task.external_task import ExternalTask, TaskResult
  from camunda.external_task.external_task_worker import ExternalTaskWorker

  config = {"auth_basic": {"username": "demo", "password": "demo"}}

  def handle_task(task: ExternalTask) -> TaskResult:
      

      
      
      return task.complete({"var1": 1, "var2": "value"})

  ExternalTaskWorker(worker_id="1", config=config).subscribe("topicName", handle_task)
  ```


  The source files in this repository are made available under the [Apache License Version 2.0](./LICENSE).


pkgId: 4be10ada57bf8c0d44111f75267b307ff5e253ed4a573c4a3dc0522c71005eb7
name: python-can-j1939
arch: src
version: 2.0.12
epoch: 0
release: 1
summary: SAE J1939 stack implementation
url: https://github.com/juergenH87/python-can-j1939
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-can-j1939-2.0.12-1.src.rpm
checksum_type: sha256
description:
  |release| |docs|
  An implementation of the CAN SAE J1939 standard for Python.
  This is the first J1939-22 (J1939-FD) implementation!
  If you experience a problem or think the stack would not behave properly, do
  not hesitate to open a ticket or write an email.
  Pullrequests are of course even more welcome!
  The project uses the python-can_ package to support multiple hardware drivers.
  At the time of writing the supported interfaces are
  * CAN over Serial
  * CAN over Serial / SLCAN
  * CANalyst-II
  * IXXAT Virtual CAN Interface
  * Kvasers CANLIB
  * NEOVI Interface
  * NI-CAN
  * PCAN Basic API
  * Socketcan
  * SYSTEC interface
  * USB2CAN Interface
  * Vector
  * Virtual
  * isCAN


pkgId: d211ce9066baacac672ca86397a4b2b2c8a400e20f6047147c0612c02635da6d
name: python-canals
arch: src
version: 0.11.0
epoch: 0
release: 1
summary: A component orchestration engine for Haystack
url: https://pypi.org/project/canals/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canals-0.11.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center" float="left">
    <img alt="" src="https://raw.githubusercontent.com/deepset-ai/canals/main/images/canals-logo-light.png#gh-dark-mode-only"/>
    <img alt="" src="https://raw.githubusercontent.com/deepset-ai/canals/main/images/canals-logo-dark.png#gh-light-mode-only"/>
  </p>

  [![PyPI - Version](https://img.shields.io/pypi/v/canals.svg)](https://pypi.org/project/canals)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/canals.svg)](https://pypi.org/project/canals)
  <a href="https://github.com/deepset-ai/canals/actions/workflows/tests.yml">
      <img alt="Tests" src="https://github.com/deepset-ai/canals/workflows/Tests/badge.svg?branch=main">
  </a>
  [![Coverage Status](https://coveralls.io/repos/github/deepset-ai/canals/badge.svg?branch=main)](https://coveralls.io/github/deepset-ai/canals?branch=main)
  <a href="https://deepset-ai.github.io/canals/">
      <img alt="Documentation" src="https://img.shields.io/website?label=documentation&up_message=online&url=https%3A%2F%2Fdeepset-ai.github.io/canals/">
  </a>
  <a href="https://github.com/deepset-ai/canals/commits/main">
      <img alt="Last commit" src="https://img.shields.io/github/last-commit/deepset-ai/canals">
  </a>
  <a href="https://pepy.tech/project/canals">
      <img alt="Monthly Downloads" src="https://pepy.tech/badge/canals/month">
  </a>
  <a href="https://github.com/deepset-ai/canals">
      <img alt="Stars" src="https://shields.io/github/stars/deepset-ai/canals?style=social">
  </a>
  <a href="https://ossinsight.io/analyze/deepset-ai/canals">
      <img alt="Stats" src="https://img.shields.io/badge/Stats-updated-blue">
  </a>

  Canals is a **component orchestration engine**. Components are Python objects that can execute a task, like reading a file, performing calculations, or making API calls. Canals connects these objects together: it builds a graph of components and takes care of managing their execution order, making sure that each object receives the input it expects from the other components of the pipeline.

  Canals powers version 2.0 of the [Haystack framework](https://github.com/deepset-ai/haystack).



  To install Canals, run:

  ```console
  pip install canals
  ```

  To be able to draw pipelines (`Pipeline.draw()` method), please make sure you have either an internet connection (to reach the Mermaid graph renderer at `https://mermaid.ink`) or [graphviz](https://graphviz.org/download/) (version 2.49.0) installed. If you
  plan to use Mermaid there is no additional steps to take, while for graphviz
  you need to do:


  ```console
  sudo apt install graphviz  # You may need `graphviz-dev` too
  pip install pygraphviz
  ```


pkgId: 35316bcaedb7bb33d6c6db07f353fc5cef12838e3ad5583ff606a8d34d4a0401
name: python-canalyst-candas
arch: src
version: 0.0.46
epoch: 0
release: 1
summary: The official Canalyst Software Development Kit (SDK) for our public API
url: https://pypi.org/project/canalyst-candas/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canalyst-candas-0.0.46-1.src.rpm
checksum_type: sha256
description:
  Canalyst's Python SDK is intended as a full featured data science library facilitating dataframe manipulation, data model mapping, and interactive scenario analysis of core Model, ModelSet, and ModelMap objects.


  This package requires Python version `>=3.7`. Recommended Python version `>=3.8`.




  Run `pip install -r requirements.txt` to install the requried packages.


  The Python SDK supports a preview of sample data for three tickers: DIS US, TSLA US, or NFLX US.
  ```
  import canalyst_candas as cd
  model = cd.SampleModel(ticker="DIS US")
  df = model.model_frame()
  ```


  The Python SDK supports three ways of providing configuration, in order of precedence:
     1. [Creating a `Config` instance](#using-config)
     2. [Using environment variables](#using-environment-variables)
     3. [Using a configuration file](#using-configuration-file)

  `Config` is used to store a user's configuration information. On initial `canalyst_candas` import, it will attempt to retrieve the configuration.


  A `Config` instance can be created with the desired configurations.

  In Python/iPython or Jupyter Notebook. Replace `<..>` with values

  ```
  import sys
  sys.path.append('<path to sdk-python>/src')
  import canalyst_candas as cd
  from canalyst_candas.configuration.config import Config






  config_info = {
    "canalyst_api_key": "<Canalyst API key>",
    "canalyst_s3_id": "<S3 Access Key ID>",
    "canalyst_s3_key": "<S3 Secret Key>",
    "fred_key": "<Fred key>",
    "default_dir": "",
    "mds_host": "",
    "wp_host": "",
    "verify_ssl": "True",
  }

  config = Config(config=config_info)

  ticker = "<ticker you want test with>"
  model = cd.Model(ticker=ticker, config=config)
  model_set = cd.ModelSet(ticker_list=[ticker], config=config)
  cd.ModelMap(
    ticker=ticker,
    config=config,
    time_series_name=time_series,
    col_for_labels=<label>,
    common_size_tree=True,
    notebook=False,
    auto_download=False,
  )
  ```


  Environment variables can be set in your terminal. The SDK looks for
  - CANALYST_API_KEY
  - S3_ACCESS_KEY_ID
  - S3_SECRET_KEY
  - FRED_KEY (optional)
  - DEFAULT_DIR (optional; default is a temporary directory)
  - MDS_HOST (optional; default is production Model Data System)
  - WP_HOST (optional; default is production Web Portal)
  - VERIFY_SSL (optional: default is "True")

  In Python/iPython or Jupyter Notebook. Replace `<..>` with values

  ```
  import sys
  sys.path.append('<path to sdk-python>/src')
  import canalyst_candas as cd

  ticker = "<ticker to test with>"
  time_series = "<time series to test with>"
  label = "<label of interest>
  model = cd.Model(ticker=ticker)
  model_set = cd.ModelSet(ticker_list=[ticker])
  cd.ModelMap(
    ticker=ticker,
    time_series_name=time_series,
    col_for_labels=<label>,
    common_size_tree=True,
    notebook=False,
    auto_download=False,
  )
  ```


  When `canalyst_candas` is imported and if there is not already an existing configuration file, a configuration file, `keys.json`, is created in the user's home directory, `C:\Users\<username>\canalyst\keys.json` on Windows or `/User/<username>/canalyst/keys.json` on a Unix-based OS (e.g. Mac, Linux). The configuration file can be moved but must be under a user's home directory and must be in directly under a 'canalyst' folder. Examples of valid locations:

  Windows
  - `C:\Users\<username>\canalyst\keys.json`
  - `C:\Users\<username\Downloads\canalyst\keys.json'`

  Unix-based OS
  - `/Users/<username/canalyst/keys.json`
  - `/Users/<username>/Downloads/canalyst/keys.json`

  The contents of `keys.json`:
  ```
  {
      "canalyst_api_key": "",
      "canalyst_s3_id": "",
      "canalyst_s3_key": "",
      "fred_key": "",
      "default_dir": "",
      "mds_host": "",
      "wp_host": "",
      "verify_ssl": "",
      "proxies": ""
  }
  ```

  Fill in
  1. `canalyst_api_key`: Canalyst API token. Get it at https://app.canalyst.com/settings/api-tokens
  2. `canalyst_s3_id`:  AWS S3 Access Key ID
  3. `canalyst_s3_key`:  AWS S3 Secret Key
  4. (Optional) `default_dir`: your chosen directory for where downloads will go. The default is a temporary directory.

  In Python/iPython or Jupyter Notebook. Replace `<..>` with values

  ```
  import sys
  sys.path.append('<path to sdk-python>/src')
  import canalyst_candas as cd

  ticker = "<ticker to test with>"
  time_series = "<time series to test with>"
  label = "<label of interest>
  model = cd.Model(ticker=ticker)
  model_set = cd.ModelSet(ticker_list=[ticker])
  cd.ModelMap(
    ticker=ticker,
    time_series_name=time_series,
    col_for_labels=<label>,
    common_size_tree=True,
    notebook=False,
    auto_download=False,
  )
  ```


  The Candas library allows for proxies to be passed in as part of the request. The proxies are to be formatted as a python dictionary:

  `{"http": "http://http_proxy.com:8000", "https": "https://https_proxy.com:8001"}`

  If you only have one proxy, the `http` and `https` keys can have the same proxy link.
  This dictionary is to be passed in as part of the config object:

  ```
      "proxies": {
          "http": "http://18.206.117.131:3128",
          "https": "http://18.206.117.131:3128"
        }
  ```


pkgId: 23567e64ed2dfaa6d99f4f298f566604dd3ca74a1ab557609960d18461bc8960
name: python-canari
arch: src
version: 3.3.10
epoch: 0
release: 1
summary: Canari Framework - Maltego rapid transform development and execution framework.
url: https://github.com/redcanari/canari
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canari-3.3.10-1.src.rpm
checksum_type: sha256
description:
  |Build Status| |Doc Status|
  Welcome to the Canari 3 repository - the next generation Maltego rapid
  transform development framework which allows you to rapidly prototype,
  package, and distribute Maltego local and remote transforms. Please
  visit the `documentation <http://canari3.readthedocs.io/en/latest/>`__
  site for a quick how-to and more in-depth information on the framework
  itself.


pkgId: 763c9cb13c4a25b4febeebb6f972519d15d51728e73d65d8957a4c8d9251d4f4
name: python-canatax
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: An easy-to-use, dependency-free Canadian sales and income tax calculator.
url: https://github.com/firstflush/canatax
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canatax-1.3.0-1.src.rpm
checksum_type: sha256
description:
  ![Development Status](https://img.shields.io/badge/status-in_development-orange)

  **Note:** This package is currently in development. Expect frequent updates and potential breaking changes.

  **Canatax** is a simple and straightforward package for calculating Canadian sales or income taxes based on the current year's rates. Whether you need to calculate federal and provincial income taxes, CPP, EI, or estimate GST/PST/HST across different provinces and territories, Canatax provides an easy-to-use interface with no additional dependencies.



  - **Income Tax Calculation:**
    - **Current Year Rates:** Calculates taxes based on the most up-to-date rates for the current year.
    - **Federal and Provincial Taxes:** Automatically determines federal and provincial taxes based on your income and province.
    - **CPP and EI Deductions:** Includes Canada Pension Plan (CPP) and Employment Insurance (EI) deductions in the calculation.
    - **After-Tax Income:** Provides your net income after all deductions.

  - **Sales Tax Estimation:**
    - **Provincial and Territorial Rates:** Estimates GST, PST, and HST for all Canadian provinces and territories.
    - **Customizable Inputs:** Allows for quick calculations with adjustable amounts and locations.



  You can install Canatax via pip:

  ```bash
  pip install canatax
  ```





  Use the `IncomeTaxCalculator` class to calculate your income taxes:

  ```python
  from canatax import IncomeTaxCalculator


  income = 80000
  province = "AB"


  estimate = IncomeTaxCalculator.calculate(income=income, province=province)


  calculator = IncomeTaxCalculator(income=income, province=province)
  income_estimate = calculator.calculate_all()


  print(estimate.federal_tax)
  print(estimate.provincial_tax)
  print(estimate.cpp)
  print(estimate.ei)
  print(estimate.total_tax)
  print(estimate.after_tax_income)
  ```




  Use the `SalesTaxCalculator` class to calculate sales taxes:

  ```python
  from canatax import SalesTaxCalculator


  amount = 100.00
  province = "BC"


  sales_estimate = SalesTaxCalculator.quick_calc(amount=amount, province=province)


  sales_tax_calculator = SalesTaxCalculator(province=province)
  sales_estimate = sales_tax_caluclator.calculate()


  print(sales_estimate.gst_total)
  print(sales_estimate.pst_total)
  print(sales_estimate.hst_total)
  print(sales_estimate.tax_total)
  print(sales_estimate.after_tax_total)
  ```



  - **Additional Features:**
    - Expand support for retroactive tax calculations for previous years.
    - Increase testing
    - Add more detailed documentation and usage examples.



  Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.


pkgId: eb6419f6d1c0b06c7e11d34afeef5ca4b34bdfdaa38953b920e43cde428e1261
name: python-cancel-token
arch: src
version: 0.1.6
epoch: 0
release: 1
summary: Simple CancellationToken
url: https://github.com/Novakov/py-cancel-token
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cancel-token-0.1.6-1.src.rpm
checksum_type: sha256
description:
  This library provide simple cancellation token.

  First create token
  ```python
  from cancel_token import CancellationToken
  token = CancellationToken()
  ```
  At any point in time you can check if token has been cancelled:
  ```python
  if token.cancelled:
      print('Operation already cancelled')
      return None
  ```
  To cancel token call its `cancel` method:
  ```python
  token.cancel()
  assert token.cancelled
  ```
  It is also possible to add callbacks that will be called on when token is cancelled:
  ```python
  def handler():
      print('Operation has been cancelled')
  token.on_cancel(handler)
  ```
  **Note**:
  * If token is already cancelled, callback will be invoked immediately.
  * All registered callbacks will be called sequentially during `cancel` call.
  * Callback throwing exception will prevent remaining callbacks from calling. However token will be cancelled
  * During callback invocation token is already cancelled
  * It is possible to add callback from within callback
  * Removing callback from within callback **will not** prevent its execution


pkgId: abf24dcd99541d5c886149b16df7387bfaa9959e499ea05b34432d6bc25ac044
name: python-cancer-simulation
arch: src
version: 0.7.5
epoch: 0
release: 1
summary: A simple cancer and chemotherapy simulation
url: https://github.com/Zhukowych/CancerSimulation
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cancer-simulation-0.7.5-1.src.rpm
checksum_type: sha256
description:
  We implemented cancer development and chemotherapy impact simulation using
                     stochastic cellular automaton with Python. The main feature of implemented
                     app is capability of simulating different treatment strategies under same-
                     type cancer behavior.


pkgId: 4073cdfa89656cf2600937674b0601240bc76b287c0cf4e57ed0288315410d56
name: python-candas2
arch: src
version: 0.0.1
epoch: 0
release: 1
url: https://github.com/Dr-Br0t/Candas2
rpm_license: GNU Affero General Public License v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-candas2-0.0.1-1.src.rpm
checksum_type: sha256
summary:
  This is a project inspired on the original Candas library by https://gist.github.com/JulianWgs, a blf file can be handle in a faster way using python data science classical libraries.

description:
  This is a project inspired on the original Candas library by https://gist.github.com/JulianWgs, a blf file can be handle in a faster way using python data science classical libraries.


  ```
  pip install candas2
  ```


  ```python
  import candas2
  ```


  The CAN file in BLF format is automatically converted into a DataFrame for subsequent processing.
  The blf filepath should be provided.

  ```python
  blf = Candas(r'C:\Users\Folder\file.blf')
  ```


  IDs are filtered to allow for targeted analysis, ensuring only relevant data is processed.
  id_filter --> str

  ```python
  blf.id_filtering(id_filter)
  ```


  The time interval between each ID is reviewed to ensure accurate temporal analysis and synchronization.

  period_time(int) --> The time period between each ID, measured in milliseconds, is analyzed to ensure precise timing and synchronization in the data.

  tolerance(int) --> As with all electronic instruments, a certain level of lag or tolerance is accounted for to ensure accurate data interpretation and analysis. It should be provided in a range from 0 to 100


  ```python
  blf.time_rev(period_time, tolerance)
  ```


pkgId: f1db485d7917852d590413ee4409759dd5743872eee743ccbb400c39cff39b67
name: python-candidhealth
arch: src
version: 0.35.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/candidhealth/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-candidhealth-0.35.0-1.src.rpm
checksum_type: sha256
description:
  [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fcandidhealth%2Fcandid-python)
  [![pypi](https://img.shields.io/pypi/v/candidhealth)](https://pypi.python.org/pypi/candidhealth)

  The Candid Python library provides convenient access to the Candid API from Python.



  ```sh
  pip install candidhealth
  ```



  Instantiate and use the client with the following:

  ```python
  from candid.client import CandidApiClient

  client = CandidApiClient(
      client_id="YOUR_CLIENT_ID",
      client_secret="YOUR_CLIENT_SECRET",
  )
  client.auth.v_2.get_token(
      client_id="YOUR_CLIENT_ID",
      client_secret="YOUR_CLIENT_SECRET",
  )
  ```



  The SDK also exports an `async` client so that you can make non-blocking calls to our API.

  ```python
  import asyncio

  from candid.client import AsyncCandidApiClient

  client = AsyncCandidApiClient(
      client_id="YOUR_CLIENT_ID",
      client_secret="YOUR_CLIENT_SECRET",
  )


  async def main() -> None:
      await client.auth.v_2.get_token(
          client_id="YOUR_CLIENT_ID",
          client_secret="YOUR_CLIENT_SECRET",
      )


  asyncio.run(main())
  ```



  When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
  will be thrown.

  ```python
  from .api_error import ApiError

  try:
      client.auth.v_2.get_token(...)
  except ApiError as e:
      print(e.status_code)
      print(e.body)
  ```





  The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
  as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
  retry limit (default: 2).

  A request is deemed retriable when any of the following HTTP status codes is returned:

  - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
  - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
  - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)

  Use the `max_retries` request option to configure this behavior.

  ```python
  client.auth.v_2.get_token(...,{
      max_retries=1
  })
  ```



  The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.

  ```python

  from candid.client import CandidApiClient

  client = CandidApiClient(..., { timeout=20.0 }, )



  client.auth.v_2.get_token(...,{
      timeout_in_seconds=1
  })
  ```



  You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
  and transports.
  ```python
  import httpx
  from candid.client import CandidApiClient

  client = CandidApiClient(
      ...,
      http_client=httpx.Client(
          proxies="http://my.test.proxy.example.com",
          transport=httpx.HTTPTransport(local_address="0.0.0.0"),
      ),
  )
  ```



  While we value open-source contributions to this SDK, this library is generated programmatically.
  Additions made directly to this library would have to be moved over to our generation code,
  otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
  a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
  an issue first to discuss with us!

  On the other hand, contributions to the README are always very welcome!


pkgId: 0d209bfb243674c4f03adc0bf2a0a7ad2fc0b9a6441206758e2048795bdccdc6
name: python-candk
arch: src
version: 2.5.0
epoch: 0
release: 1
summary: Simple text parsing and markup for language-independent source code documentation
url: http://cerrax.com
rpm_license: BSD-2-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-candk-2.5.0-1.src.rpm
checksum_type: sha256
description:
   _Corndog with Ketchup_ is a combination of tools that allows quick and simple creation of source code documentation.

   A plain text extraction tool. _Corndog_ uses a special "corndog" marker ( ```-==```) in text and source code files to extract sections of text and output them to a console or file.
   _Corndog_ can parse the following file formats:
  | Type | File Extension | Type | File Extension |
  |---|---|---|---|
  | Plain text | ```.txt``` | HTML | ```.html``` |
  | Python | ```.py``` | CSS | ```.css``` |
  | Java | ```.java``` | PHP | ```.php``` |
  | SQL | ```.sql``` | JavaScript | ```.js``` |
  | C/C++ | ```.c```/ ```.cpp``` | TypeScript | ```.ts``` |
  | TaskBuilder **(deprecated)** | ```.tas``` | Vue.js | ```.vue``` |
  | Properties | ```.properties``` | FreeMarker | ```.ftl``` |
  | Ketchup | ```.kp``` | Bash shell script | ```.sh``` |
  | XML | ```.xml``` | Windows Batch file | ```.bat``` |
  | YAML | ```.yaml```/ ```.yml``` | Windows INI file | ```.ini``` |
  | TOML | ```.toml``` | Conf file | ```.conf``` |
  **NOTE:**  Support for TaskBuilder files ( ```.tas```) is deprecated and will be removed in a future version.
   **Usage**
   To capture text from a file, place a "corndog" marker ( ```-==```) in front of the text you wish to capture. Corndog will capture all text after the ```-==```symbol until it hits a newline or another ```-==```symbol.
   To preserve leading whitespace, use a double forward slash ( ```//```) in front of the whitespace you want to keep. By default, _Corndog_ will remove all leading whitespace.
   _Corndog_ can be run from a command line with the following command:
  ```
  corndog -hfrm -s <start_point> -n <output_name> -x <output_extension> -o <output_directory>
  ```
  | Option | Description |
  |---|---|
  | ```-h``` | Display the help text. |
  | ```-f``` | Output to a single file. Use with the ```-n```and ```-x```options to set a name and file extension for the output file. |
  | ```-r``` | Recursive search. If the ```start_point```provided by the ```-s```option is a directory, a recursive search will also search each subdirectory. |
  | ```-m``` | Output to multiple files, with each file corresponding to a source file. The files are named the same as the source file with the subfolders prepended by hyphens (-) and the extension ```.txt```. The names cannot be set with the ```-n```option, but the extension can be changed with the ```-x```option. |
  | ```-s``` | The starting point of the search. If the ```start_point```provided is a file, _Corndog_ will only parse that single file. If the ```strat_point```is a directory, it will parse every file in the directory. Use with the ```-r```option to make the search recursive. |
  | ```-n``` | The name of the resulting parsed file. This option is only relevant if the ```-f```option is used. |
  | ```-x``` | The file extension for the resulting file(s). This option is only relevant if the ```-f```or ```-m```option is used. |
  | ```-o``` | The directory to place the resulting output file(s). This option is only relevant if the ```-f```or ```-m```option is used. |
  | ```-v``` | Send warnings and errors to stderr to give more detailed feedback of the parsing and rendering. |

   A special markup language designed for documenting code. It includes many specialized tags, as well as some wiki-like markup.
   _Ketchup_ can read any text-based file, but the convention is to use the ```.kp```file extension for files that contain Ketchup tags.
   **Usage**
   _Ketchup_ can be run from a command line with the following command:
  ```
  ketchup  <filepath> -hmNw -p <page_name> -n <output_name> -o <output_directory> -c <css_file>
  ```
  | Option | Description |
  |---|---|
  | ```-h``` | Display the help text. |
  | ```-p``` | The name of the rendered HTML page. If the name has periods, the page title will be only the right-most portion, but the full ```.page_name```will display on the HTML page itself. |
  | ```-n``` | The name of the rendered HTML file. |
  | ```-o``` | The directory to place the rendered HTML file. |
  | ```-c``` | Replaces the default CSS with the stylesheet specified. |
  | ```-N``` | Makes h1 headers in navigation collapsible; for exceptionally large documents. |
  | ```-b``` | Disable creating headers from empty newlines |
  | ```-m```  ```-M``` | Export to Markdown ( ```.md```) rather than HTML ( ```.html```) |
  | ```-w``` | Automatically run Ketchup rendering whenever changes are detected in the file. |
  | ```-v``` | Send warnings and errors to stderr to give more detailed feedback of the parsing and rendering. |


pkgId: 79f2b071dc8cecb55f1ef1811b32d7ba424d86c00572d9573ab325f2efbb875f
name: python-candl-like
arch: src
version: 1.5.1
epoch: 0
release: 1
summary: Differentiable Likelihood for CMB Analysis
url: https://pypi.org/project/candl-like/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-candl-like-1.5.1-1.src.rpm
checksum_type: sha256
description:
  candl is a differentiable likelihood framework for analysing CMB power spectrum measurements.
  Key features are:
  * JAX-compatibility, allowing for fast and easy computation of gradients and Hessians of the likelihoods.
  * The latest public data releases from the South Pole Telescope and Atacama Cosmology Telescope collaborations.
  * Interface tools for work with other popular cosmology software packages (e.g. Cobaya and MontePython).
  * Auxiliary tools for common analysis tasks (e.g. generation of mock data).
  candl supports the analysis of primary CMB and lensing power spectrum data (:math:`TT`, :math:`TE`, :math:`EE`, :math:`BB`, :math:`\phi\phi`, :math:`\kappa\kappa`).


pkgId: cf03a6e5579e9b481a12f05f240c1f400cac64fe394d804a5d9012d7b56cbdd5
name: python-candore
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/candore/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-candore-1.4.0-1.src.rpm
checksum_type: sha256
description:
  `Candore` is the command line interface data integrity tool. The tool is build to verify the change made in a product has any impact on data in product.

  **The change** could be:
  - Upgrade of the product to new version
  - Some Patch applied to the product
  - Developers made code changes locally / upstream etc
  - Or any kind of change that we could  think of

  **Verifications** that candore supports is:

  - **Data loss** - The major impact that candore cares
  - **Data Altered** - The change in data entity
  - **Relation between the entities** -  Verifies if the link is not broken between entities




  ```
  $ mkdir ~/candore && cd ~/candore
  $ pip install candore
  ```



  The `candore` uses the `DynaConf` configuration python module to access the data in `settings.yaml`, it also allows an unique way of declaring secrets via Environment variables instead of putting in plain `settings.yaml`.

  e.g: The password field can be set via environment variable by exporting the environment variable

  ```

  ```



  Copy/Download `settings.yaml.template` to local `~/candore` directory as `settings.yaml`, update it with the details and other configuration details for successful run.





  * candore help:

  ```


  Usage: candore [OPTIONS] COMMAND [ARGS]...

    A data integrity validation CLI tool for products post change

  Options:
    --version                   Installed version of candore
    -s, --settings-file TEXT    Settings file path
    -c, --components-file TEXT  Components file path
    --help                      Show this message and exit.

  Commands:
    apis     List API lister endpoints from Product
    compare  Compare pre and post upgrade data
    extract  Extract and save data using API lister endpoints
    reader   JSON Reader for reading the specific path data from entities...
  ```

  There are 3 stages in which candore works:

  1. Read data from the web server using APIs, before change:

  ```

  ```
  This reads all data from web server before the change and saves in the json file in the current directory.


  2. Read data from the web server using APIs, after change:

  ```

  ```
  This reads all data from web server after the change and saves in the json file in the current directory.


  3. Use the json data files to compare the data integrity:

  ```

  ```
  This compares two json datasets and generates the reports of data integrity in CSV format in CSV file.

  Reports could be generated in json:
  ```

  ```


pkgId: 8ccee2d3a3439663ca81d26f236fb5360fb064c118ad2e04a97a14eab5a2360f
name: python-candv
arch: src
version: 1.5.0
epoch: 0
release: 1
url: https://github.com/oblalex/candv/tree/v1.5.0
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-candv-1.5.0-1.src.rpm
checksum_type: sha256
summary:
  Constants and Values: create enum-like complext constants with the ability to attach arbitrary attributes to them, e.g. values, human-readable names, help texts and so on

description:
  |pypi_package| |python_versions| |docs| |license|
  |linux_build| |windows_build| |codebeat| |codacy| |scrutinizer|
  ``candv`` allows to create complex enum-like constants.
  In contrast to other methods of defining constants, ``candv`` helps to organize and to document classes of constants.
  This is done by providing iteration and lookup facilities for containers of constants.
  Additionally, ``candv`` provides an ability to attach human-readable names, descriptions, arbitrary values, and methods to constants.
  Inspired by `Constants from Twisted`_ and `Form Fields from Django`_.


pkgId: 447d6a2524660906cf58aa44df00b262364bfaea7ea7f5ab2f215efea654787d
name: python-caniusepython3
arch: src
version: 7.3.0
epoch: 0
release: 1
summary: Determine what projects are blocking you from porting to Python 3
url: https://github.com/brettcannon/caniusepython3
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caniusepython3-7.3.0-1.src.rpm
checksum_type: sha256
description:
  This script takes in a set of dependencies and then figures out which
  of them are holding you up from porting to Python 3.


pkgId: 33e09affaa17dbc4522e0a48dcaa29cde9651ae5f9cf262e9e406c182c7599f5
name: python-canlib
arch: src
version: 1.27.606
epoch: 0
release: 1
summary: Python wrapper for Kvaser CANlib
url: https://github.com/Kvaser/pycanlib
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canlib-1.27.606-1.src.rpm
checksum_type: sha256
description:
  The Python canlib module wraps the Kvaser CANlib API in order to make it easy to control most aspects of any Kvaser CAN interface. For more information about Kvaser please go to https://www.kvaser.com/.
  The latest version of this package is available on the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_ (`pycanlib.zip <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130981911&utm_status=latest>`_).


pkgId: bfeb02cd95f753ec99c4c8a4b9817cf45dd1f1435b062df2535f8f4617afa6f0
name: python-canmatrix
arch: src
version: 1.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: http://github.com/ebroecker/canmatrix
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canmatrix-1.0-1.src.rpm
checksum_type: sha256
description:
  Canmatrix implements a "Python Can Matrix Object" which describes the can-communication
  and the needed objects (Boardunits, Frames, Signals, Values, ...) Canmatrix also includes
  two Tools (canconvert and cancompare) for converting and comparing CAN databases.
  There are also some extract and merge options for dealing with can databases.

  **supported file formats for import:**

              .dbc candb / Vector

              .dbf Busmaster (open source!)

              .kcd kayak (open source!)

              .arxml autosar system description

              .yaml dump of the python object

              .xls(x) excel xls-import, works with .xls-file generated by this lib

              .sym peak pcan can description

              .xml (fibex)

              .ldf (lin bus)

              .odx (diagnostic file)


  **supported file formats for export:**

              .dbc

              .dbf

              .kcd

              .xls(x)

              .json Canard (open source!)

              .arxml (very basic implementation)

              .yaml (dump of the python object)

              .sym

              .xml (fibex)

              .lua (wireshark script)

              .scapy


pkgId: 8c866bc073dec65bd28cf30b09ef91cf2cffc1520ce7a17e3db9a2c644ee02c8
name: python-canni
arch: src
version: 3.0.0
epoch: 0
release: 1
url: https://gitlab.com/networkjanitor/canni
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canni-3.0.0-1.src.rpm
checksum_type: sha256
summary:
  Create static html pages (with additional javascript functionality to copy text more easily) based on a dataset used for bronk.

description:
  If you are looking for the generated html code example (Triple Trouble):
  https://networkjanitor.gitlab.io/canni/
  If you are looking for the real, up-to-date versions, please use the following links:
  * Triple Trouble: https://networkjanitor.gitlab.io/xutt/
  * The Shatterer: https://networkjanitor.gitlab.io/jinni/


pkgId: 13f18a415e3ce46d678dc046b8dac20a24069038f7626d68d5aebc96de8c3638
name: python-cannoli
arch: src
version: 0.1.27
epoch: 0
release: 1
summary: Lib for prompt engineering using OpenAI
url: https://github.com/naruminho/cannoli
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cannoli-0.1.27-1.src.rpm
checksum_type: sha256
description:
  `!pip install cannoli`



  **Basic Usage:**

  This example demonstrates how to retrieve the API key from an environment variable named `OPENAI_API_KEY`. It also shows how to use default parameters defined in `default_settings.json`.

  ```python

  cnl = Cannoli()


  ans = cnl.quick_question("What's the boiling point of water?")
  ```

  **Customizing Parameters:**

  In this example, the Cannoli class instance is created with a user-provided API key and custom settings, including the choice of engine, custom prompt, token limits, and temperature settings.

  ```python

  api_key = 'your_api_key_here'
  setup = {
      "engine": "gpt-3.5-turbo-instruct",
      "prompt": "You are my personal assistant. Please provide the best answer you can.",
      "max_tokens": 300,
      "temperature": 0.7
  }
  cnl = Cannoli(api_key=api_key, setup=setup)


  ans = cnl.quick_question("What's the boiling point of water?")
  ```


pkgId: d3766ed87d8e98caee331156b8da23e15b9c4970b9a9a909416ad1fa87d5429e
name: python-cannon
arch: src
version: 0.0.80
epoch: 0
release: 1
summary: An SSH automation tool based on Exscript
url: https://github.com/mpenning/cannon
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cannon-0.0.80-1.src.rpm
checksum_type: sha256
description:
  [cannon][1] is a wrapper around [exscript][2] to connect with remote server or network
  devices with ssh.




  This script will login, run a few show commands.  If you want an interactive session, set `interact=True` when calling Shell()

  ```python
  import sys

  from cannon import Shell, Account
  from loguru import logger

  log_stderr_id = logger.add(sink=sys.stderr)

  @logger.catch(default=True, onerror=lambda _: sys.exit(1))
  def main():
      sess = Shell(
          host='route-views.routeviews.org',
          
          account= Account(name='rviews', password=''),
          debug=0,
          json_logfile='/tmp/cmd_log.json',
          )

      sess.execute('term len 0')

      sess.execute('show clock')

      sess.execute('show version')
      version_text = sess.response

      
      values = sess.execute('show ip int brief',
          template="""Value INTF (\S+)\nValue IPADDR (\S+)\nValue STATUS (up|down|administratively down)\nValue PROTO (up|down)\n\nStart\n  ^${INTF}\s+${IPADDR}\s+\w+\s+\w+\s+${STATUS}\s+${PROTO} -> Record""")
      print("VALUES "+str(values))
      sess.close()
  ```



  ```python
  from getpass import getpass
  import sys

  from cannon.main import Shell, Account

  log_stderr_id = logger.add(sink=sys.stderr)

  @logger.catch(default=True, onerror=lambda _: sys.exit(1))
  def main():
      account = Account("mpenning", getpass("Login password: "))
      conn = Shell(host="127.0.0.1", port=22, account=account, driver="generic", debug=0)
      assert conn is not None
      example_tfsm_template = """Value UNAME_LINE (.+)

  Start
    ^${UNAME_LINE}
  """
      print(conn.execute("sudo uname -a", debug=0, template=example_tfsm_template, timeout=2))
      print(conn.execute("whoami", debug=0, template=None, timeout=2))
      
      conn.close(force=True)

  if __name__=="__main__":
      main()
  ```



  - `git clone git@github.com:knipknap/Exscript`
  - `cd` into `Exscript/tests/Exscript/protocols` and `chmod 600 id_rsa`
  - exscript spawns a local tests ssh daemon, `pytest Exscript/tests/Exscript/protocols/SSH2Test.py`
  - Connect with `ssh -i id_rsa -p 1236 user@localhost`
  - one command is supported: `ls`

    [1]: https://pypi.python.org/pypi/cannon    # cannon on pypi
    [2]: https://pypi.python.org/pypi/exscript  # Exscript on pypi


pkgId: cf9e5297d2cb9cbf5cd8a93e2b1012d7924b83200e5b33cc8892862fa35ca724
name: python-cannula
arch: src
version: 0.15.0
epoch: 0
release: 1
summary: Async GraphQL Helper Library
url: https://github.com/rmyers/cannula
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cannula-0.15.0-1.src.rpm
checksum_type: sha256
description:
  [![CircleCI](https://circleci.com/gh/rmyers/cannula.svg?style=shield)](https://circleci.com/gh/rmyers/cannula)
  [![Documentation Status](https://readthedocs.org/projects/cannula/badge/?version=main)](https://cannula.readthedocs.io/en/main/?badge=main)
  [![codecov](https://codecov.io/gh/rmyers/cannula/branch/main/graph/badge.svg?token=4OOWACS3QD)](https://codecov.io/gh/rmyers/cannula)

  > GraphQL for people who like Python!

  * [Why Cannula](#why)
  * [Installation](#install)
  * [Quick Start](#start)
  * [Performance](#performance)
  * [Examples](#examples)
  * [Documentation](https://cannula.readthedocs.io/)

  <h2 id="why">Why Cannula?</h2>

  We wanted to make the world a better place, but we are programmers so we settled
  on making the web fun again. Too much attention has been given to Javascript
  client libraries. They all seem to compete on size and speed and features but
  most of them do not solve any of the actual problems you have. So while the
  todo application is quick and easy to follow the hard parts take a long time
  to complete.

  Now a days if you want a fancy single page application you need to invest a
  good week or so planning out all the tools you will need to assemble your site.
  Every decision is full of sorrow and doubt as you google for the latest trends
  or how to setup unit tests. Or searching for a bootstrapped version of the
  library you like.

  Using GraphQL you can simplify your web application stack and reduce
  dependencies to achieve the same customer experience without regret. By using
  a schema to define your application you can auto generate much of the code
  you need to interact with it.

  Our Philosophy:
  1. Make your site easy to maintain.
  2. Document your code.
  3. Don't lock yourself into a framework.
  4. Be happy!

  <h2 id="install">Installation</h2>

  Requires Python 3.8 or greater! The only dependency is
  [graphql-core-next](https://graphql-core-next.readthedocs.io/en/latest/).

  ```bash
  pip3 install cannula
  ```

  <h2 id="start">Quick Start</h2>

  Here is a small [hello world example](examples/hello.py):

  ```python
  import typing
  import sys

  import cannula

  SCHEMA = """
      type Query {
          hello(who: String!): String
      }
  """


  api = cannula.CannulaAPI(schema=SCHEMA)





  @api.query()
  async def hello(
      source: typing.Any,
      info: cannula.ResolveInfo,
      who: str,
  ) -> str:
      
      
      return f"{info.field_name} {who}!"



  SAMPLE_QUERY = cannula.gql(
      """
      query HelloWorld ($who: String!) {
          hello(who: $who)
      }
  """
  )


  def run_hello(who: str = "world"):
      return api.call_sync(SAMPLE_QUERY, variables={"who": who})


  if __name__ == "__main__":
      who = "world"
      if len(sys.argv) > 1:
          who = sys.argv[1]

      print(run_hello(who))

  ```

  Now you should see the results if you run the sample on the command line:

  ```
  $ python3 examples/hello.py
  ExecutionResult(
    data={'hello': "hello world!"},
    errors=None
  )

  $ python3 examples/hello.py Bob
  ExecutionResult(
    data={"hello": "hello Bob!"},
    errors=None
  )
  ```

  <h2 id="performance">Performance</h2>

  We try to make sure cannula is as fast as possible. While real world benchmarks are always difficult we do have a simple test that attempts to show how cannula performs against other setups.

  You can view the tests in [performance](performance/test_performance.py). We have a simple function that returns data then compare the time it takes to return those results with a plan FastAPI app vs a GraphQL request. Then we try the same GraphQL request in both Cannula and Ariadne. Here is a sample of the output:

  ```
  1000 iterations (lower is better)

  test_performance.py::test_performance
  performance test results:
  fastapi: 0.41961031800019555
  ariadne results: 1.8639117470011115
  cannula results: 0.5465521310106851
  PASSED
  test_performance.py::test_performance_invalid_request
  performance test results:
  fastapi: 0.375848950992804
  ariadne results: 0.8494849189883098
  cannula results: 0.4427280649833847
  PASSED
  test_performance.py::test_performance_invalid_query
  performance test results:
  fastapi: 0.37241295698913746
  ariadne results: 2.1828249279933516
  cannula results: 0.4591125229781028
  PASSED
  ```

  As you can see Cannula is close to the raw performance of FastAPI. Granted real world results might be different as the way Cannula achieves it speed is by caching query validation results. This works best if you have a relatively fixed set of queries that are performed such as a UI that you or another team manages. If the requests are completely ad hoc like a public api then the results will not be as great.

  <h2 id="examples">Examples and Documentation</h2>

  * [hello world](examples/hello.py)
  * [using mocks](examples/mocks.py)

  [Documentation](https://cannula.readthedocs.io/)


pkgId: 6f1061f7a1952d24fadbf32761733f111b887408a334e97c1a0b241529be79b7
name: python-canoPyHydro
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: An Innovative Approach to Vegetative Precipitation Partitioning
url: https://pypi.org/project/canoPyHydro/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canoPyHydro-0.1.1-1.src.rpm
checksum_type: sha256
description:
  <head>
     <meta charset=utf-8 />
  </head>
  <h1 align="center">CanoPyHydro</h1>
  <p align="center">
      <img src="./docs/source/_static//canhydro_logo.png" height="390" width="300">
  </p>
  <p align="center"> </p>
  <h3 align="center">Table of Contents</h3>
     <p align="center">
       <a href="#summary">Summary</a> •
       <a href="#functionality-overview">Functionality Overview</a> •
       <a href="#publications-and-acknowledgements">Publications and Acknowledgements</a>
     </p>
     <p align="center">
       <a href="#installing-canopyhydro">Installing CanoPyHydro</a> •
       <a href="#future-direction">Future Direction</a> •
       <a href="#contributing">Contributing</a>
     </p>

     CanoPyHydro was developed in the process of authoring [A LiDAR-driven pruning algorithm to delineate canopy drainage areas of stemflow and throughfall drip points]('https://doi.org/10.1111/2041-210X.14378'). Detailed information regarding package use cases, the definitions of relevant terms and the methods available in the package can be found in our [documentation](https://canopyhydrodynamics.readthedocs.io/main/).


  CanoPyHydro takes a bottom-up approach towards predicting precipitation redistribution; enriching Lidar-derived QSM data with additional structure via graph based hydrological models and traversing said graph to determine its connectivity. This can be interpreted as a series of simulations in which we ask the question: "After water lands on the branch represented by a given cylinder, where does it go?". In this way, canoPyHydro allows for the percise delineation of:

  - Stemflow and throughfall generating areas of the canopy
  - The 'drip points' to which throughfall is directed - complete with their relative volumes
  - 'Divides' and 'confluences' within the canopy that dictate the flow of water through the canopy

  The current tool set also boasts several different spacial analysis tools, several of which have been utilized in the study of non-hydrological environmental conditions within tree canopies. These include:

  - Functionality for characterizing the level of obsfucation present at given canopy cross sections
  - Tools for identifying, highlighting and isolating branch subnetworks meeting any arbitrary contition(s)
    - i.e. only branches with a radius > 10cm, branches with a branch order of 0 within 100cm of the ground, ...
  - 2D and 3D visualization functionality to interactively to explore the structure of tree canopies



  The below tutorial is a great starting place for those looking to get a feel for the capabilities of canoPyHydro. The tutorial will cover the creation of a CylinderCollection object, options for the visualization of QSMs in 2D and the calculation of flow characteristics.

  The Cylinder class is used to represent the 3-D cylinders that make up a QSM. The most important function of these Cylinder objects is their ability to return data regarding the projections onto the XY, XZ and YZ planes.

  ```{python}
    myCyl = Cylinder(
      cyl_id=1.0,
      x=[3, 6],
      y=[2, 4],
      z=[6, 12],
      radius=2.0,
      length=0.064433,
      branch_order=0.0,
      branch_id=0.0,
      volume=0.010021,
      parent_id=0.0,
      reverse_branch_order=32.0,
      segment_id=0.0,
    )
    fig = myCyl.draw_3D(show=False, draw_projections=True)
  ```

  <div align="center">
    <div class="container">
      <img src="./docs/source/_static/Cylinder_projections_3D.png" height="350" width="400" alt="Point Cloud and QSM"/>
    </div>
  </div>

  The Cylinder Collection class is a data class consisting of multiple cylinders and related metrics. Cylinder Collections almost always represent [QSMs](https://canopyhydrodynamics.readthedocs.io/main/qsms.html#) or parts of a QSM and are meant to help users explore these QSMs. Below, we demonstrate how one might create a cylinder collection using cylinder data (e.g. QSM data) stored in a CSV file and how the afforementioned concept of projections can be used to visualize the data in a variety of ways.
  Note: the tree chosen for the below is intentionally small to make the visualization easier to understand.

  ```{python}

  myCollection = CylinderCollection()



  myCollection.from_csv("charlie_brown.csv")


  myCollection.draw("XZ")


  myCollection.draw("XY")


  myCollection.draw("YZ")
  ```

  <div align="center">
    <div class="container">
      <img src="./docs/source/_static/charlie_brown_XZ.png" height="300" width="150" alt="Plot of the entire tree - XZ"/>
      <p>XZ Projection</p>
    </div>
    <div class="container">
      <img src="./docs/source/_static/charlie_brown_XY.png" height="300" width="300" alt="Plot of the entire tree - XY"/>
      <p>XY Projection</p>
    </div>
    <div class="container">
      <img src="./docs/source/_static/charlie_brown_YZ.png" height="300" width="150" alt="Plot of a branch only"/>
      <p>YZ Projection</p>
    </div>
  </div>

  Compared to a QSM, CylinderCollections have additional structure in the form of a digraph model. These digraph models represent the direction water flows along the branches of the modeled tree and are used in the 'find_flow_components' and 'calculate_flows' function to characterize the flow of water through the canopy. The below code, continuing from the above demonstrates the use of these functions.

  ```{python}

  myCollection.initialize_digraph_from()


  myCollection.find_flow_components()


  myCollection.calculate_flows()


  print(myCollection.flows)
  ```
  | num_cylinders | projected_area | surface_area | angle_sum | volume | sa_to_vol | drip_node_id | drip_node_loc |
  |-----|-----|-----|-----|-----|-----|-----|-----|
  | 162.0 | 0.345 | 1.167 | 111.92 | 0.019 | 82717.985 | 0.0 | (-0.5, 3.4, 8.7) |
  | 18 | 0.005 | 0.021 | 10.275 | 0.0 | 14370.354 | 232 | (1.9, 2.2, 13.9) |
  | 13 | 0.004 | 0.015 | 7.718 | 0.0 | 11229.764 | 360 | (1.8, 2.6, 13.6) |
  | 24 | 0.008 | 0.032 | 1.697 | 0.0 | 18378.751 | 515 | (1.5, 2.8, 12.9) |
  | ... | ... | ... | ... | ... | ... | ... | ... |

  What you see above is a sample of the flow characteristics calculated for the 'charlie_brown' tree. The first flow listed is, as is the convention in canoPyHydro, the tree's stemflow and the others are the throughfall flows. The 'drip_node_loc' column lists the x,y,z coordinates of the node of the afformentioned graph to which water intercepted by the flow's cylinders is directed. The various geometric characteristics give a sense of the size and shape of the flow's cylinders (or 'canopy drainage area').

  The draw function also allows for a variety of different overlays, filtering and highlighting. To demonstrate this briefly, we will show below how this filtering can be used in a variety of ways, including highlighting the various flows mentioned above. For more information on the CylinderCollection class, please refer to the [documentation](https://canopyhydrodynamics.readthedocs.io/en/latest/objects.html#canopyhydrodynamics.objects.CylinderCollection).


  ```{python}

  myCollection.draw("XZ", highlight_lambda=lambda:is_stem)


  myCollection.draw("XZ",
                    highlight_lambda=lambda:is_stem,
                    filter_lambda=lambda: cyl_id>100)


  myCollection.draw("XZ",
                    highlight_lambda=lambda:is_stem,
                    filter_lambda=lambda: cyl_id>100,
                    include_drips=True)
  ```

  <div align="center">
    <div class="container">
      <img src="./docs/source/_static/charlie_brown_stem_flow.png" height="375" width="200" alt="Plot of the entire tree - XZ"/>
      <p> <em>The entire tree, with stemflow generating branches highlighted in blue.</em> </p>
    </div>
    <div class="container">
      <img src="./docs/source/_static/charlie_brown_stem_flow_branch.png" height="300" width="300" alt="Plot of the entire tree - XY"/>
      <p> <em> A filtered subset of the same tree, note how sections of outward slope separate blue,
                 stemflow generating cylinders from grey, non-stemflow/throughfall generating cylinders </em></p>
    </div>
      <img src="./docs/source/_static/charlie_brown_stem_flow_branch_drips.png" height="300" width="300" alt="Plot of a branch only"/>
      <p> <em>The same filtered subsetm now with drip nodes indicted in red. Note how each separates a given set of thoughfall generating cylinders from the stemflow cylinders </em> </p>
  </div>

  The final bit of functionality we will review here is the ability to create concave hulls around groups of cylinders in a CylinderCollection. This is done using the 'watershed_boundary' function. The below code demonstrates how this function can be used to find a concave hull around the entire tree, or a portion of the tree. Note that a new, more robist example tree is used

  ```{python}

  myCollection = CylinderCollection()
  myCollection.from_csv("example_tree.csv")
  myCollection.project_cylinders("XY")
  myCollection.initialize_digraph_from()
  myCollection.find_flow_components()
  myCollection.calculate_flows()


  myCollection.draw("XY", save=True, file_name_ext="read_me_alpha")


  myCollection.watershed_boundary(plane = 'XY', draw=True)


  myCollection.draw("XY",
                    include_alpha_shape=True)


  myCollection.watershed_boundary(plane = 'XY',
                                  curvature_alpha=2,
                                  draw=True)
  myCollection.draw("XY",
                    include_alpha_shape=True)



  myCollection.watershed_boundary(plane = 'XY',
                                  curvature_alpha=2,
                                  filter_lambda=lambda: is_stem)
  myCollection.draw("XY",
                    include_alpha_shape=True,
                    highlight_lambda=lambda: is_stem)
  ```
  <div align="center">
    <div class="container">
      <img src="./docs/source/_static/10_MediumCollection_XY_read_me_only_hull.png" height="300" width="300" alt="Entire canopy hull alone"/>
      <p>Entire canopy hull alone</p>
    </div>
    <div class="container">
      <img src="./docs/source/_static/10_MediumCollectioncsv_XY_read_me_hull_and_tree.png" height="300" width="300" alt="Hull overlaid on the canopy"/>
      <p>Hull overlaid on the canopy</p>
    </div>
  </div>
  <div align="center">
    <div class="container">
      <img src="./docs/source/_static/10_MediumCollectioncsv_XY_tight_hull_and_tree.png" height="300" width="300" alt="A tighter fitting hull<"/>
      <p>A tighter fitting hull</p>
    </div>
    <div class="container">
      <img src="./docs/source/_static/10_MediumCollectioncsv_XY_stem_hull_and_tree.png" height="300" width="300" alt="The stem flow boundary hull"/>
      <p>The stem flow boundary hull</p>
    </div>
  </div>



     In order to run canoPyHydro locally, you will need to have installed [python]() on your local machine. Once python is installed, you can proceed to the setup steps described below. The entire set-up process (including installing python) should take <1hr. If you are encountering errors, or other complications when configuring your local environment, feel free to request some help by creating an ['issue'](https://github.com/wischmcj/canopyHydrodynamics/issues/new).

  1. **Create a Virtual Environment**: Below we use the native 'venv' module to create a virtual environment. This is not strictly necessary, but it is a good practice to keep your project dependencies separate from your system dependencies in a virtual environment.
     ```bash
     python -m venv canHydroVenv
     ```
  2. **Activate Your Environment**: Activate your virtual environment to install dependencies and run the project. The commands to activate the virtual environment depend on your operating system and shell. Below are the commands for activating the virtual environment in different operating systems and shells.

  ```bash
    
    source canHydroVenv/bin/activate
    
    source canHydroVenv\Scripts\activate.ps1
  ```

  3. **Install canoPyHydro**: canoPHydro is published with PyPA (the python packacing authority). You can install the latest stable release of canoPyHydro using pip. This installs our latest stable release as well as several libraries required for the use of the package's features. canoPyHydro currently supports Python versions 3.9 and up.

  ```bash
     pip install canoPyHydro
  ```

  4. **Set Configuration Options**: The default configuration file can be found at '/CanopyHydrodynamics/canopyhydro_config.toml'. Configuration options can be set by altering the contents of that file in place. Refer to the [configuration page in the docs](https://canopyhydrodynamics.readthedocs.io/en/latest/getting_started.html#configuration) for more information on configuration options.

  That's it! You're ready to start using canoPyHydro. Check out the the below tutorials and the [documentation](https://canopyhydrodynamics.readthedocs.io/en/latest/index.html) for more information on how to use the package.



     CanoPyHydro was developed in the process of authoring [A LiDAR-driven pruning algorithm to delineate canopy drainage areas of stemflow and throughfall drip points.]('https://doi.org/10.1111/2041-210X.14378'), which has been accepted for publication by the *'British Ecological Society's'* ['*Methods in Ecology and Evolution*'](https://www.britishecologicalsociety.org/publications/journals/methods-in-ecology-and-evolution/). Said paper, and the code within this repository, represents a collaboration between non-academic data professional Collin Wischmeyer, environmental science researcher [Professor John Van Stan](https://expertise.csuohio.edu/csufacultyprofile/detail.cfm?FacultyID=j_vanstan) with notable contributions from industry geo-scientist [Travis Swanson](https://thewaterinstitute.org/our-team/travis-swanson). Likewise, this tool could not exist without the data collected and the ideas put forward by several graduate students working in Cleveland State University's ['Wet Plant Lab'](https://www.researchgate.net/lab/Wet-Plant-Lab-John-Toland-Van-Stan).



  - We hope to widen the use cases for our tool by integrating additional real world data (i.e wind speed and direction, rain intensity and average angle, etc.).
  - By integrating python libraries for spacial analysis (scipy-spacial, open3d) into canoPyHydro, we hope to allow for the projection of cylinders at an arbitrary angle. This will lead directly into supporting the afformentioned integration of weather data.
  - Improve the efficiency of the flow finding algorithm and the flow caluclation algorithm. This will allow for the processing of larger QSMs and the use of more complex models (i.e. tessellated meshes).
    - Under the branch [improve-find-flows-efficiency](https://github.com/wischmcj/canopyHydrodynamics/tree/improve-find-flows-efficiency), you can see the current work being done to meet this goal. Early results so as much as a 200x increase in the speed of the algorithm as a result of:
      - migrating the the use of rust based graph models, using the rustworkx library
      - refactoring the current find flow algorithm as a graph traversal algorithm to enable parallel processing




  As stated above, we do hope to improve and extend canoPyHydro's current functionally. As we build a roadmap and decide on which features to focus on in this process, we will put a heavy emphasis on needs of the ecophysiology/ecohydrology research community. That said, we welcome both feature proposals and code contributions to this project! You can feel free to contact the authors via email, or to follow the steps below individually.


  If you encounter errors while running this package, or if you have suggestions for new functionality, you can quickly and easily inform the team by creating an ['issue'](https://github.com/wischmcj/canopyHydrodynamics/issues/new) for this repository.


     In order to successfully edit and test this package's code locally, you will need to 'clone' this repository to your local file system. Additionally, in order to properly test and build your code, you will need a few additional python libraries

  1. **Create a Local Copy**: If you will be using git (recommended) to track and share your edits, you can run the below code to clone this repo and create a new branch to hold the changes you make:
     ```bash
     git clone https://github.com/wischmcj/canopyHydrodynamics.git
     cd canoPyHydrodynamics
     git checkout -b a-descriptive-name-for-the-changes-you-are-making
     ```
     Alternatively, if you happen to be unfamiliar with the git ecosystem, you can download the repository as a zip file. In this case, we still welcome you to share your work with the authors/other users by attaching the code you create in a git ['issue'](https://github.com/wischmcj/canopyHydrodynamics/issues/new).

  3. **Install Additional Dependencies**: Some features (linting, git actions, etc.) may require additional dependencies. An additional 'requirements-dev.txt' file has been provided to install these dependencies.

     ```bash
     pip install -r requirements-dev.txt
     ```
  4. **Install Pre-commit**: This repository utilizes the ruff pre-commit hook to ensure that all code is linted before being committed. To install pre-commit, run the following commands:

     ```bash
     pip3 install pre-commit
     pre-commit install
     ```
  5. **Review the contributing Guidelines **: Check out the documentation, where you can find [contributing guidelines](https://canopyhydrodynamics.readthedocs.io/en/latest/contributing.html). Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

  Thank you for your interest in contributing to our project!


pkgId: d1eb1bbeec9d3fd4e46ce3bac433452fbd4d3442bf85305a2cf3c4146b5b9fa5
name: python-canonical
arch: src
version: 0.52.0
epoch: 0
release: 1
summary: Common models and types for business applications
url: https://gitlab.com/unimatrixone
rpm_license: Other/Proprietary License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonical-0.52.0-1.src.rpm
checksum_type: sha256
description:
  The `canonical` namespace contains sub-packages that define commonly used
  datastructures, for example as defined in a Request for Comments (RFC). Each
  model is implemented using `pydantic`.


pkgId: 4c08699863c21b190456d440851c8bf9ebd89b32ee4162db40869499e3b0b04a
name: python-canonical-api-connectors
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: A set of API utility connectors
url: https://pypi.org/project/canonical-api-connectors/
rpm_license: LGPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonical-api-connectors-0.2.0-1.src.rpm
checksum_type: sha256
description:
  This library is a collection of libraries that provide seamless integration with
  different SaaS systems.



  This library uses [poetry](https://github.com/python-poetry/poetry) for packaging and managing dependencies. To build the wheel file, simply run:

  ```
  poetry build -f wheel
  ```





  To install the entire package along with all supported libraries, simply run:

  ```
  pip install canonical-api-connectors
  ```



  If you wish to install only specific libraries, you can specify them as shown below. Here are the available options:

  - `jira`: Install the Jira library
  - `mattermost`: Install the Mattermost library
  - `vault`: Install the HashiCorp Vault library
  - `github`: Install the Github client library

  For example, to install only the Jira library:

  ```
  pip install canonical-api-connectors["jira"]
  ```

  To install multiple libraries, separate them with commas. For instance:

  ```
  pip install canonical-api-connectors["jira", "mattermost"]
  ```


pkgId: 2ec5aabc1ed118e228aaa901ca1405c414622f10128191f4e68ea7bd8d902bd4
name: python-canonicalwebteam-docstring-extractor
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Get Python docstrings from files
url: https://github.com/canonical-web-and-design/canonicalwebteam.docstring-extractor
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam-docstring-extractor-1.2.0-1.src.rpm
checksum_type: sha256
description:
  This library allows parsing docstrings of an entire Python file. It uses [ast](https://docs.python.org/3/library/ast.html) and [docstring-parser](https://github.com/rr-/docstring_parser).

  The main difference between this library and docstring-parser is that this one is able to parse entire Python files.


  `pip install docstring-extractor`



  ```python
  >>> from canonicalwebteam.docstring_extractor import get_docstrings
  >>>
  >>> with open("example.py") as file:
  ...     docstrings = get_docstrings(file)
  ```

  Imaging you have the following Python code:
  ```python
  """
  Example module.

  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
  tempor incididunt ut labore et dolore magna aliqua.
  """


  def test_function():
      """
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
      tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
      veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
      commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
      velit esse cillum dolore eu fugiat nulla pariatur.

      Parameters:
          a (int): A decimal integer
          b (int): Another decimal integer

      Returns:
          str: A string containing "foo"
      """
      return "foo"
  ```

  The output of the `get_docstrings` function will be the following dict object:

  ```python
  {'type': 'Module',
   'name': 'example',
   'line': 0,
   'docstring': <docstring_parser.common.Docstring at 0x7f06adee7a00>,
   'docstring_text': 'Example module.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua.',
   'content': [
      {'type': 'Function',
         'name': 'test_function',
         'line': 9,
         'docstring': <docstring_parser.common.Docstring at 0x7f06adef7490>,
         'docstring_text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea\ncommodo consequat. Duis aute irure dolor in reprehenderit in voluptate\nvelit esse cillum dolore eu fugiat nulla pariatur.\n\nParameters:\n    a (int): A decimal integer\n    b (int): Another decimal integer\n\nReturns:\n    str: A string containing "foo"',
      'content': []
      }
   ]
  }
  ```

  You can see the different properties of the Docstring object [here](https://github.com/rr-/docstring_parser/blob/master/docstring_parser/common.py), as an example if you are interested in obtaining the return type and return description of the first function:

  ```python
  >>> docstrings["content"][0]["docstring"].returns.type_name
  'str'
  >>> docstrings["content"][0]["docstring"].returns.description
  'A string containing "foo"'
  ```


pkgId: 27d1c865052780795c6c704497777628ab583bf5bd289e91271fcc7339d5de3e
name: python-canonicalwebteam.blog
arch: src
version: 6.4.2
epoch: 0
release: 1
summary: Flask extension to add a nice blog to your website
url: https://pypi.org/project/canonicalwebteam.blog/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.blog-6.4.2-1.src.rpm
checksum_type: sha256
description:
  This extension allows you to add a simple frontend section to your flask app. All the articles
  are pulled from [Canonical's Wordpress back-end](https://admin.insights.ubuntu.com/wp-admin/) through the JSON API.

  This extension provides a blueprint with 3 routes:

  - "/": that returns the list of articles
  - "/<slug>": the article page
  - "/feed": provides a RSS feed for the page.



  To install this extension as a requirement in your project, you can use PIP;

  ```bash
  pip3 install canonicalwebteam.blog
  ```

  See also the documentation for [pip install](https://pip.pypa.io/en/stable/reference/pip_install/).





  For local development, it's best to test this module with one of our website projects like [ubuntu.com](https://github.com/canonical-web-and-design/ubuntu.com/). For more information, follow [this guide (internal only)](https://discourse.canonical.com/t/how-to-run-our-python-modules-for-local-development/308).



  The module expects HTML templates at `blog/index.html`, `blog/article.html`, `blog/blog-card.html`, `blog/archives.html`, `blog/upcoming.html` and `blog/author.html`.

  An example of these templates can be found at https://github.com/canonical-websites/jp.ubuntu.com/tree/master/templates/blog.



  In your app you can then do the following:

  ```python3
  import flask
  import talisker.requests
  from flask_reggie import Reggie
  from canonicalwebteam.blog import BlogViews, build_blueprint, BlogAPI

  app = flask.Flask(__name__)
  Reggie().init_app(app)
  session = talisker.requests.get_session()

  blog = build_blueprint(
      BlogViews(
          api=BlogAPI(session=session),
      )
  )
  app.register_blueprint(blog, url_prefix="/blog")
  ```

  You can customise the blog through the following optional arguments:

  ```python3
  blog = build_blueprint(
      BlogViews(
          blog_title="Blog",
          blog_path="blog",
          tag_ids=[1, 12, 112],
          exclude_tags=[26, 34],
          per_page=12,
          feed_description="The Ubuntu Blog Feed",
          api=BlogAPI(
              session=session,
              use_image_template=True,
              thumbnail_width=330,
              thumbnail_height=185,
          ),
      )
  )
  ```



  All tests can be run with `./setup.py test`.



  All API calls are caught with [VCR](https://vcrpy.readthedocs.io/en/latest/) and saved as fixtures in the `fixtures` directory. If the API updates, all fixtures can easily be updated by just removing the `fixtures` directory and rerunning the tests.

  To do this run `rm -rf fixtures && ./setup.py test`.


pkgId: ab19c85637af7bff8ff9ba830428ca00851578a0b5554fba640395b5539a0c40
name: python-canonicalwebteam.discourse
arch: src
version: 5.7.2
epoch: 0
release: 1
summary: Flask extension to integrate discourse content generated to docs to your website.
url: https://github.com/canonical/canonicalwebteam.discourse
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.discourse-5.7.2-1.src.rpm
checksum_type: sha256
description:
  Flask extension to integrate discourse content generated to docs to your website. This project was previously named `discourse_docs`.



  Documentation for how to write documentation pages in Discourse for consumption by this module and how to configure the website to use the module can be found [in the Canonical discourse](https://discourse.canonical.com/t/creating-discourse-based-documentation-pages/159).

  Example Flask template for documentation pages can be found in [`examples`](/examples/) folder. Please refer to the [README](/examples/README.md) in that folder for more information.



  Install the project with pip: `pip install canonicalwebteam.discourse`

  You can add the extension on your project as follows, replacing, at least, `base_url` and `index_topic_id` with your own settings:

  ```python
  import talisker.requests
  from canonicalwebteam.discourse import DiscourseAPI, Tutorials, TutorialParser

  app = Flask("myapp")
  session = talisker.requests.get_session()

  discourse = Tutorials(
      parser=TutorialParser(
          api=DiscourseAPI(
              base_url="https://forum.example.com/", session=session
          ),
          index_topic_id=321,
          url_prefix="/docs",
      ),
      document_template="docs/document.html",
      url_prefix="/docs",
  )
  discourse.init_app(app)
  ```

  Once this is added you will need to add the file `document.html` to your template folder.



  For local development, it's best to test this module with one of our website projects like [ubuntu.com](https://github.com/canonical-web-and-design/ubuntu.com/). For more information, follow [this guide (internal only)](https://discourse.canonical.com/t/how-to-run-our-python-modules-for-local-development/308).



  Tests can be run with [Tox](https://tox.wiki/en/latest/):

  ``` bash
  pip3 install tox  # Install tox
  tox               # Run tests
  tox -e lint       # Check the format of Python code
  tox -e format     # Reformat the Python code
  ```



  Because you are viewing a protected topic, you must provide `api_key` and `api_username`. You also need an index topic id, which you can get from discourse.ubuntu.com. Your index topic must contain a metadata section. Visit the EngageParser for more information about the structure. You are encouraged to use an blueprint name that does not collide with existent blueprints. The templates must match the ones provided in the parameters indicated.

  Here is an example of an implementation:

  ```python
  engage_pages = EngagePages(
      api=DiscourseAPI(
          base_url="https://discourse.ubuntu.com/",
          session=session,
          get_topics_query_id=14,
          api_key=DISCOURSE_API_KEY, # replace with your API key
          api_username=DISCOURSE_API_USERNAME, # replace with correspoding username
      ),
      category_id=51,
      page_type="engage-pages", # one of ["engage-pages", "takeovers"]
      exclude_topics=[] # this is a list of topic ids that we want to exclude from Markdown error checks
      additional_metadata_validation=[] # list of additional keys in the metadata table that you want to validate existence for e.g. language
  )
  ```

  In your project, you need to create your own views:

  ```python
  app.add_url_rule(
      "/engage", view_func=build_engage_index(engage_pages)
  )

  app.add_url_rule(
      "/engage/<path>", view_func=single_engage_page(engage_pages)
  )
  ```

  - Where `build_engage_index` would be your view for the list of engage pages, which you can get by using the method `EngagagePages(args).get_index()`
  - While `single_engage_page` would be your single engage pages view, which you can get using `EngagePages(args).get_engage_page(path)`

  Similarly for takeovers, you just need to pass `page_type="takeovers"`.

  - To get a list of takeovers `EngagePages(args).get_index()` also.
  - To get a list of active takeovers `EngagePages(args).parse_active_takeovers()`.


  - `get_index` provides two additional arguments `limit` and `offset`, to provide pagination functionality. They default to 50 and 0 respectively.
  - If you want to get all engage pages, which in the case of some sites like jp.ubuntu.com there are not that many, you can pass `limit=-1`
  - Use `MaxLimitError` in the `exceptions.py` to handle excessive limit. By default, it will raise an error when it surpasses 500


pkgId: 78dce8e21f148e220a0cef84026b14dd3a93ac0a761bf5023a6b992f7446dde6
name: python-canonicalwebteam.flask-base
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: Flask extension that applies common configurationsto all of webteam's flask apps.
url: https://github.com/canonical-web-and-design/canonicalwebteam.flask-base
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.flask-base-2.0.0-1.src.rpm
checksum_type: sha256
description:
  Flask extension that applies common configurations to all of webteam's flask apps.



  ```python3
  from canonicalwebteam.flask_base.app import FlaskBase

  app = FlaskBase(__name__, "app.name")
  ```

  Or:

  ```python3
  from canonicalwebteam.flask_base.app import FlaskBase

  app = FlaskBase(
      __name__,
      "app.name",
      template_404="404.html",
      template_500="500.html",
      favicon_url="/static/favicon.ico",
  )
  ```



  For local development, it's best to test this module with one of our website projects like [ubuntu.com](https://github.com/canonical-web-and-design/ubuntu.com/). For more information, follow [this guide (internal only)](https://discourse.canonical.com/t/how-to-run-our-python-modules-for-local-development/308).





  FlaskBase includes [ProxyFix](https://werkzeug.palletsprojects.com/en/3.0.x/middleware/proxy_fix/) to avoid SSL stripping on redirects.



  FlaskBase uses [yaml-responses](https://github.com/canonical-web-and-design/canonicalwebteam.yaml-responses) to allow easy configuration of redirects and return of deleted responses, by creating `redirects.yaml`, `permanent-redirects.yaml` and `deleted.yaml` in the site root directory.



  `FlaskBase` can optionally use templates to generate the `404` and `500` error responses:

  ```python3
  app = FlaskBase(
      __name__,
      "app.name",
      template_404="404.html",
      template_500="500.html",
  )
  ```

  This will lead to e.g. `http://localhost/non-existent-path` returning a `404` status with the contents of `templates/404.html`.



  `FlaskBase` can optionally provide redirects for the commonly queried paths `/favicon.ico`, `/robots.txt` and `/humans.txt` to sensible locations:

  ```python3
  from canonicalwebteam.flask_base.app import FlaskBase

  app = FlaskBase(
      __name__,
      "app.name",
      template_404="404.html",
      template_500="500.html",
      favicon_url="/static/favicon.ico",
      robots_url="/static/robots.txt",
      humans_url="/static/humans.txt"
  )
  ```

  This will lead to e.g. `http://localhost/favicon.ico` returning a `302` redirect to `http://localhost/static/favicon.ico`.



  Automatically clears all trailing slashes from all routes.



  You get two jinja2 helpers to use in your templates from flask-base:

  - `now` is a function that outputs the current date in the passed [format](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) - `{{ now('%Y') }}` -> `YYYY`
  - `versioned_static` is a function that fingerprints the passed asset - `{{ versioned_static('asset.js') }}` -> `static/asset?v=asset-hash`



  You get the following headers automatically set:

  - `X-Content-Type-Options: NOSNIFF`
  - `Permissions-Policy: interest-cohort=()`
  - `X-Frame-Options: SAMEORIGIN`, which can be excluded with `exclude_xframe_options_header` decorator
  - `Cache-Control` if `response.cache_control.*` not set and according to static asset versioning (see `versioned_static` above)



  If you create a `security.txt`, `robots.txt` or `humans.txt` in the root of your project, these will be served at `/.well-known/security.txt`, `/robots.txt` and `/humans.txt` respectively.



  Automatically adds the `/_status/check` endpoint which is used by content-caches for backend health checking or e.g. by k8s for checking the status of pods.



  To run the tests execute `SECRET_KEY=fake python3 -m unittest discover tests`.


pkgId: d03ce9161eb22b92804fdeb91b24482f659fe3ef10478dba2a9599ab87f99523
name: python-canonicalwebteam.http
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: For making HTTP requests with helpful defaults for Canonical's webteam.
url: https://github.com/canonical-webteam/http
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.http-1.0.4-1.src.rpm
checksum_type: sha256
description:
  [![Tests status](https://github.com/canonical-web-and-design/canonicalwebteam.http/workflows/Tests/badge.svg)](https://github.com/canonical-web-and-design/canonicalwebteam.http/actions?query=workflow%3ATests)

  **NB: We are retiring this module and will be removing it from our codebases.**

  A Python library for making HTTP requests with sensible defaults.



  This module is in PyPi as `canonicalwebteam.http`. You should be able to install it simply with:

  ``` bash
  pip install canonicalwebteam.http
  ```



  Tests are located in the [tests](tests) directory and can be run with `python -m unittest discover tests/`.


pkgId: 5c9c697b8721f22404a64b617104ae9e9a01346751ba5da3b70577108fa7f769
name: python-canonicalwebteam.image-template
arch: src
version: 1.3.1
epoch: 0
release: 1
summary: Generate <img> markup block for an image.
url: https://github.com/canonical-web-and-design/canonicalwebteam.image-template
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.image-template-1.3.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/canonicalwebteam.image-template)](https://pypi.org/project/canonicalwebteam.image-template/)
  [![Tests](https://github.com/canonical-web-and-design/canonicalwebteam.image-template/workflows/Tests/badge.svg)](https://github.com/canonical-web-and-design/canonicalwebteam.image-template/actions?query=workflow%3ATests)
  [![Code coverage](https://codecov.io/gh/canonical-web-and-design/canonicalwebteam.image-template/branch/master/graph/badge.svg)](https://codecov.io/gh/canonical-web-and-design/canonicalwebteam.image-template)

  A module to generate performant HTML image markup for images. The markup
  will:

  - Use [native lazyloading](https://addyosmani.com/blog/lazy-loading/) if it's available
  - Output markup compatible with [lazysizes `noscript` plugin](https://github.com/aFarkas/lazysizes/tree/gh-pages/plugins/noscript)
  - Explicitly define `width` and `height` attributes to avoid the page jumping effect
  - Prefix all image URLs with cloudinary CDN proxy URLs, to transform the image to the optimal size
  - Use predefined (2x) `srcset` break points for hidef screens



  - `url` (mandatory string): The url to an image (e.g. `https://assets.ubuntu.com/v1/9f6916dd-k8s-prometheus-light.png`)
  - `alt` (mandatory string): Alt text to describe the image
  - `hi_def` (mandatory boolean): Has an image been uploaded 2x the width and height of the desired size
  - `width` (mandatory integer): The number of pixels wide the image should be
  - `height` (optional integer): The number of pixels high the image should be
  - `fill` (optional boolean): Set the crop mode to ["fill"](https://cloudinary.com/documentation/image_transformation_reference#crop_parameter)
  - `loading` (optional string, default: "lazy"): Set to ["auto" or "eager"](https://addyosmani.com/blog/lazy-loading/) to disable lazyloading
  - `attrs` (optional dictionary): Extra `<img>` attributes (e.g. `class` or `id`) can be passed as additional arguments



  The `image_template` function can be used directly to generate image Markup.

  ``` python3
  from canonicalwebteam import image_template

  image_markup = image_template(
      url="https://assets.ubuntu.com/v1/450d7c2f-openstack-hero.svg",
      alt="",
      width="534",
      height="319",
      hi_def=True,
      loading="auto",
  	fill=True,
      attrs={"class": "hero", "id": "openstack-hero"},
  )
  ```

  However, the most common usage is to add it to Django or Flask template contexts, as an `image` function.



  At the time of writing, the `loading` attribute [is only natively supported](https://caniuse.com/#search=loading) in Chrome. Therefore we use [lazysizes](https://github.com/aFarkas/lazysizes) to enable loading in other browsers while still taking advantage of the native functionality when it's available.

  If `loading` is set to "lazy" (the default) we will output [the Markup](#generated-markup) in a format supported by [lazysizes](https://github.com/aFarkas/lazysizes), with the [`noscript`](https://github.com/aFarkas/lazysizes/tree/gh-pages/plugins/noscript) and [`native-loading`](https://github.com/aFarkas/lazysizes/tree/gh-pages/plugins/native-loading) plugins enabled.

  To support this in your site you need to add the following script to the `<head>` of each page, *above* any `<link>` attributes:

  ``` html
  <script src="https://assets.ubuntu.com/v1/703e23c9-lazysizes+noscript+native-loading.5.1.2.min.js" defer></script>
  ```



  Add it as a template tag:

  ``` python3


  from canonicalwebteam import image_template
  from django import template
  from django.utils.safestring import mark_safe


  register = template.Library()

  @register.simple_tag
  def image(*args, **kwargs):
      return mark_safe(image_template(*args, **kwargs))




  TEMPLATES[0]["OPTIONS"]["builtins"].append("myapp.templatetags")
  ```

  Use it in templates:

  ``` html


  {% image url="https://assets.ubuntu.com/v1/9f6916dd-k8s-prometheus-light.png" alt="Operational dashboard" width="1040" height="585" hi_def=True fill=True %}
  ```



  Add it as a template tag:

  ``` python3


  from canonicalwebteam import image_template
  from flask import Flask

  app = Flask(__name__)

  @app.context_processor
  def utility_processor():
      return {"image": image_template}
  ```

  Use it in templates, e.g.::

  ``` html


  {{
    image(
      url="https://assets.ubuntu.com/v1/450d7c2f-openstack-hero.svg",
      alt="",
      width="534",
      height="319",
      hi_def=True,
  	fill=True,
      loading="auto",
      attrs={"class": "hero", "id": "openstack-hero"},
    ) | safe
  }}
  ```



  The output image markup will be e.g.:

  ``` html
  <img
      src="https://res.cloudinary.com/canonical/image/fetch/f_auto,q_auto,fl_sanitize,w_534,h_319,c_fill/https://assets.ubuntu.com/v1/450d7c2f-openstack-hero.svg"
      srcset="https://res.cloudinary.com/canonical/image/fetch/f_auto,q_auto,fl_sanitize,w_1068,h_638,c_fill/https://assets.ubuntu.com/v1/450d7c2f-openstack-hero.svg 2x"
      alt=""
      width="534"
      height="319"
      loading="auto"
      class="hero"
      id="openstack hero"
  />
  ```

  If `loading` is set to "lazy" (the default), the output markup will be wrapped in markup for lazysizes support:

  ``` html
  <div class="lazyload" data-noscript>
    <noscript>
      <img ...>
    </noscript>
  </div>
  ```



  To add the required markup for this template as a User Snippet, add the following as a HTML snippet (User Snippets under File > Preferences, or Code > Preferences on macOS):

  ```
  "Image module": {
  	"prefix": "image-module",
  	"body": [
  		"{{",
  		"	image_template(",
  		"		url=\"$1\",",
  		"		alt=\"$2\",",
  		"		height=\"$3\",",
  		"		width=\"$4\",",
  		"		hi_def=$5True,",
  		"		loading=\"auto|lazy$6\",",
  		"		attrs={\"class\": \"$7\"}",
  		"	) | safe",
  		"}}"
  	],
  	"description": "Image module include"
  }"
  ```


pkgId: 4b31fa4d4b99ab39ccef82475e7cae9d0edee8d4e149ccdd367670544363b1f5
name: python-canonicalwebteam.launchpad
arch: src
version: 0.9.0
epoch: 0
release: 1
summary: Trigger builds of snaps and ubuntu imagesthrough the launchpad API.
url: https://github.com/canonical-web-and-design/canonicalwebteam.launchpad
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.launchpad-0.9.0-1.src.rpm
checksum_type: sha256
description:
  Classes for triggering builds of snaps and Ubuntu images through the [Launchpad API](https://launchpad.net/+apidoc/devel.html).





  For local development, it's best to test this module with one of our website projects like [ubuntu.com](https://github.com/canonical-web-and-design/ubuntu.com/). For more information, follow [this guide (internal only)](https://discourse.canonical.com/t/how-to-run-our-python-modules-for-local-development/308).



  ``` python3
  from canonicalwebteam.launchpad import SnapBuilder

  snap_builder = SnapBuilder(
      username="build.snapcraft.io",
      token=os.getenv("SNAP_BUILDER_TOKEN"),
      secret=os.getenv("SNAP_BUILDER_SECRET"),
  )

  snap_name = "new-test-snap"
  git_repo = "https://github.com/build-staging-snapcraft-io/test1"
  snap_builder.create_snap(snap_name, git_repo)

  new_snap = snap_builder.get_snap_by_store_name("new-test-snap")
  ```



  ``` python3
  from canonicalwebteam.launchpad import ImageBuilder

  image_builder = ImageBuilder(
      username="image.build",
      token=os.getenv("IMAGE_BUILDER_TOKEN"),
      secret=os.getenv("IMAGE_BUILDER_SECRET"),
  )

  image_builder.build_image(
      board="cm3", system="core16", snaps=["code", "toto"]
  )
  ```



  Tests check calls against fixtures representing the Launchpad API. These fixtures are generated using [vcrpy](https://pypi.org/project/vcrpy/), based on real calls to the API when the test was first run.

  To new tests that rely on new API responses, or if we need to regenerate existing fixtures because the API has changed, the secrets need to be provided to authenticate with the API as follows:

  ``` bash
  export SNAP_BUILDER_TOKEN={token}
  export SNAP_BUILDER_SECRET={secret}
  export IMAGE_BUILDER_TOKEN={token}
  export IMAGE_BUILDER_SECRET={secret}

  rm tests/cassettes/...  # Remove any fixtures you need to regenerate

  ./setup.py test  # Run tests again to regenerate fixtures
  ```


pkgId: 6bd5177fe6f0d47bef57592cff2935fa2377ad8757f4c2804dc1e23507c2bbe3
name: python-canonicalwebteam.search
arch: src
version: 2.1.1
epoch: 0
release: 1
summary: Flask extension to provide a search view for querying the webteam's Google Custom Search account
url: https://github.com/canonical/canonicalwebteam.search
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.search-2.1.1-1.src.rpm
checksum_type: sha256
description:
  [![circleci build status](https://circleci.com/gh/canonical-web-and-design/canonicalwebteam.search.svg?style=shield)](https://circleci.com/gh/canonical-web-and-design/canonicalwebteam.search)
  [![Code coverage](https://codecov.io/gh/canonical-web-and-design/canonicalwebteam.search/branch/main/graph/badge.svg)](https://codecov.io/gh/canonical-web-and-design/canonicalwebteam.search)
  [![PyPI version](https://badge.fury.io/py/canonicalwebteam.search.svg)](https://pypi.org/project/canonicalwebteam.search/)

  Flask extension to provide a search view for querying the webteam's Google Custom Search account.



  `pip3 install canonicalwebteam.search`

  Or add `canonicalwebteam.search` to your `requirements.txt`.





  If you are using [Flask-Base](https://github.com/canonical/canonicalwebteam.flask-base) you need to be using atleast [2.0.0](https://github.com/canonical/canonicalwebteam.flask-base/releases/tag/2.0.0). If you are not, you will need atleast [Flask@2.3.0](https://flask.palletsprojects.com/en/2.3.x/changes/).



  For local development, it's best to test this module with one of our website projects like [ubuntu.com](https://github.com/canonical-web-and-design/ubuntu.com/). For more information, follow [this guide (internal only)](https://discourse.canonical.com/t/how-to-run-our-python-modules-for-local-development/308).



  You can add the extension on your project's application as follows:

  ``` python3
  import talisker.requests
  from flask import Flask
  from canonicalwebteam.search import build_search_view

  app = Flask("myapp") # You must provide app
  session = talisker.requests.get_session()  # You must provide a requests session

  app.add_url_rule("/search", "search", build_search_view(app, session))



  app.add_url_rule(
      "/docs/search",
      "docs-search",
      build_search_view(
          app=app # required in version 1.4.0 onwards
          session=session,
          site="maas.io/docs",
          template_path="docs/search.html",
          search_engine_id="xxxxxxxxxx", # Optional argument, required by some of our sites
          request_limit="500/day", # Allows your to configure the limit at which the user will be forbidden to query more. If omitted defaults to 2/second, 100/minute, 2000/day
      )
  )
  ```

  [![Publish](https://github.com/canonical-web-and-design/canonicalwebteam.search/actions/workflows/publish.yaml/badge.svg?branch=main)](https://github.com/canonical-web-and-design/canonicalwebteam.search/actions/workflows/publish.yaml)



  You need to create an HTML template at the specificed `template_path`. By default this will be `search.html` inside your templates folder. This template will be passed the following data:

  - `{{ query }}` - the contents of the `q=` search query parameter
  - `{{ start }}` - the contents of the `start=` query parameter - the offset at which to start returning results (used for pagination - default 0)
  - `{{ num }}` - the contents of the `num=` query parameter - the number of search results to return  (default 10)
  - `{{ results }}` - the results returned from the Google Custom Search query. The actual search results are in `{{ results.entries }}`.



  You then need to provide the API key for the Google Custom Search API  as an environment variable called `SEARCH_API_KEY` when the server starts - e.g.:

  ```
  SEARCH_API_KEY=xxxxx FLASK_APP=app.py flask run
  ```

  Once this is done, you should be able to visit `/search?q={some_query}` in your site and see search results built with your `search.html` template.

  For some sites, you will need to pass a specific search engine ID (cx) to the `build_search_view` which you will find in the [Custom Search Engine page](https://cse.google.co.uk/cse/all).



  If you created a new site and the API is not returning any results, you may need to add it to the Google Custom Search Engine [list of sites](https://cse.google.com/cse/all). If you don't see any sites in this page, ask the Webteam.


pkgId: 509f1776285d112478b0f90d9609cf76b9aa93688082e217a9abb101e53f2a75
name: python-canonicalwebteam.templatefinder
arch: src
version: 1.0.0
epoch: 0
release: 1
url: https://github.com/canonical-webteam/templatefinder
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.templatefinder-1.0.0-1.src.rpm
checksum_type: sha256
summary:
  A module which attempts to load the corresponding templates directly from URLs, without the need to write a view for each URL.

description:
  wrapper_template: "includes/markdown-wrapper.html"
  markdown_includes:
    nav: "includes/nav.md"
  context:
    title: "Welcome"


pkgId: b886de74185b55aa48008793cde69154774c1528de28bf20e43b582adabdf381
name: python-canonicalwebteam.versioned-static
arch: src
version: 1.0.2
epoch: 0
release: 1
url: https://github.com/ubuntudesign/django-versioned-static-url
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canonicalwebteam.versioned-static-1.0.2-1.src.rpm
checksum_type: sha256
summary:
  A Django template tag for generating a URL for a static file, with a version string which will be effectively unique based on the contents of the file.

description:
  A ``{% versioned_static %}`` Django template tag for generating a URL for a
  static file, with a version string which will be effectively unique
  based on the contents of the file.


pkgId: 6256b03ff13bd301aa1d7435fb321f9ca2ed5011feaff31eb03f4073d9473d3e
name: python-canopen
arch: src
version: 2.3.0
epoch: 0
release: 1
summary: CANopen stack implementation
url: https://pypi.org/project/canopen/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canopen-2.3.0-1.src.rpm
checksum_type: sha256
description:
  A Python implementation of the CANopen_ standard.
  The aim of the project is to support the most common parts of the CiA 301
  standard in a simple Pythonic interface. It is mainly targeted for testing and
  automation tasks rather than a standard compliant master implementation.
  The library supports Python 3.6+.

rpm_license:
  MIT License  Copyright (c) 2016 Christian Sandberg  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: d33304fdec9180ccb5a2bcf1ef059f63882dde1bc02452ba3c143a9eea449809
name: python-canopy
arch: src
version: 8.42
epoch: 0
release: 1
summary: Python Client for the Canopy Simulation API
url: https://github.com/canopysimulations/canopy-python/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canopy-8.42-1.src.rpm
checksum_type: sha256
description:
  This library uses [SimVer](http://simver.org/) versioning, where a change in the major version number indicates a
  breaking change and a change in the minor version number indicates a non-breaking change (such as an additional
  feature or bug fix).



  The changelog is available [here](CHANGELOG.md).



  This library has been tested on Python 3.6 and higher.



  ```sh
  pip install canopy
  ```

  You may need to run `pip` with root permission: `sudo pip install canopy`.

  From a Jupyter Notebook you can run `!pip install canopy`.



  Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

  ```sh
  python setup.py install --user
  ```
  (or `sudo python setup.py install` to install the package for all users)



  Unit tests can be run with:
  ```
  pytest canopy
  ```

  Integration tests can be run with:
  ```
  pytest integration_tests
  ```

  To run the integration tests you'll need to ensure you have an environment variable called `CANOPY_PYTHON_INTEGRATION_TEST_CREDENTIALS`
  containing the string `<client_id>|<client_secret>|<username>|<tenant_name>|<password>`.




  See the [Canopy Python Examples](https://github.com/CanopySimulations/canopy-python-examples) repository for example usage.



  This package is designed for customers of [Canopy Simulations](https://www.canopysimulations.com/) who would like
  to access the Canopy API from Python, for example using Jupyter Notebooks.

  Currently the library is split into two parts:

   - The client generated using the OpenAPI toolset is located in the "canopy/openapi" folder.
     We don't have a great deal of control over how this code looks, but it should give a fairly complete interface to the main API.

   - One folder up from that in the "canopy" folder we are adding helper functions which wrap common use cases in simple functions.
     You can also use these functions as a reference to using the OpenAPI generated code.

  When using the library you generally start by creating a `canopy.Session` object.
  The session object manages authentication, and the caching of user settings.
  Calling `session.authentication.authenticate()` before calling OpenAPI generated client functions ensures that you are
  authenticated and that any expired access tokens are refreshed.
  Our helper functions will handle calling `authenticate` before making any calls, so if you are only using our
  helper functions you won't need to call it yourself.

  The `session` should generally be created once per application. It will automatically dispose itself when the application
  shuts down. Alternatively you can enclose it in an `async with` or a `with` block if you need to create multiple sessions,
  as shown in the examples below.

  If you are using the OpenAPI generated code then you can pass the `session.async_client` or `session.sync_client` into the OpenAPI
  generated API client instance as the `api_client` parameter as shown below. Passing in `async_client` will cause it to use
  `asyncio`, and you will need to `await` the calls. Passing in `sync_client` will cause the calls to complete synchronously.

  Our helper functions all use `asyncio` for efficient parallelisation of downloads, and must therefore be awaited.

  The following example shows how to create a session and request some output channels from a study using our helper function:

  ```python
  import canopy
  import asyncio

  async with canopy.Session(client_id='<your_client_id>', username='<your_username>') as session:
      study_data = await canopy.load_study(session, '<study_id>', 'DynamicLap', ['sRun', 'vCar'])

      
      study_api = canopy.openapi.StudyApi(session.async_client)
      job_result = await study_api.study_get_study_job_metadata(
          session.authentication.tenant_id,
          '<study_id>',
          0)

      
      job_result_task = asyncio.ensure_future(study_api.study_get_study_job_metadata(
          session.authentication.tenant_id,
          '<study_id>',
          0))

      job_result_2 = await job_result_task

  ```

  When running this code you will be prompted for your client secret and your password if
  it is the first time `session.authentication.authenticate()` has been called for this session instance. Alternatively
  you can pass the client secret and password into the Session class (after fetching them from a secure location) to
  avoid being prompted.

  If you can't use `asyncio` and `async/await` you can instead instantiate the session object synchronously
  and use the `canopy.run` method when calling our async helper methods.
  You can pass `session.sync_client` into the OpenAPI client classes instead of `session.async_client` to make them
  return results synchronously.

  ```python
  import canopy

  with canopy.Session(client_id='<your_client_id>', username='<your_username>') as session:
      
      
      study_data = canopy.run(canopy.load_study(session, '<study_id>', 'DynamicLap', ['sRun', 'vCar']))

      
      study_api = canopy.openapi.StudyApi(session.sync_client)
      job_result = study_api.study_get_study_job_metadata(
          session.authentication.tenant_id,
          '<study_id>',
          0)

      
      job_result_thread = study_api.study_get_study_job_metadata(
          session.authentication.tenant_id,
          '<study_id>',
          0,
          async_req=True)

      job_result_2 = job_result_thread.get()
  ```



  You can configure your proxy server by passing in a `proxy` argument to the `canopy.Session` object:
  ```python
  async with canopy.Session(authentication_data, proxy=canopy.ProxyConfiguration('http://some.proxy.com', 'user', 'pass')) as session:
  ```



  This needs to be tidied up, improved, and automated.

  Additional options can be found here: https://openapi-generator.tech/docs/generators/openapi/
   - e.g. enumUnknownDefaultCase could be useful if the remaining exposed enums change in future.

  You can use the Dockerfile in this repository to create a docker image to generate the new API stubs:

  ```sh
  docker image build -t canopy-python-gen:1 .
  docker container run -i -t --mount type=bind,src='<path>/<to>/canopy/canopy-python',dst=/canopy/repo canopy-python-gen:1 /bin/bash
  ```

  ```sh
  java -jar openapi-generator-cli.jar generate -g python-legacy -i https://api.canopysimulations.com/swagger/v1/swagger.json -o ./gen --package-name "canopy.openapi"
  rm -r repo/canopy/openapi
  rm -r repo/docs
  cp -r gen/canopy/openapi repo/canopy
  cp -r gen/docs repo
  cp -r gen/README.md repo/OPENAPI_README.md
  ```

  To regenerate the `asyncio` files execute:
  ```sh
  rm -r gen
  java -jar openapi-generator-cli.jar generate -g python-legacy -i https://api.canopysimulations.com/swagger/v1/swagger.json -o ./gen --package-name "canopy.openapi" --library asyncio
  mv gen/canopy/openapi gen/canopy/openapi_asyncio
  rm -r gen/canopy/openapi_asyncio/api
  rm -r gen/canopy/openapi_asyncio/models
  rm gen/canopy/openapi_asyncio/configuration.py
  rm gen/canopy/openapi_asyncio/exceptions.py
  sed -i 's/from canopy\.openapi import rest/from canopy.openapi_asyncio import rest/g' gen/canopy/openapi_asyncio/api_client.py
  sed -i '/from canopy.*/d' gen/canopy/openapi_asyncio/__init__.py
  sed -i '/# import /d' gen/canopy/openapi_asyncio/__init__.py
  echo 'from canopy.openapi_asyncio.api_client import ApiClient' >> gen/canopy/openapi_asyncio/__init__.py
  cp -r gen/canopy/openapi_asyncio repo/canopy
  ```

  Note: The `openapi/configuration.py` file will need to be manually modified to add the default API host URL.
  Note: The `openapi_asyncio/rest.py` file will need to be manually modified to support proxy servers after generation.
  Note: The `openapi_asyncio/client_api.py` and `openapi/client_api.py` files will need to be manually modified to
  support numpy array serialization after generation.



  OpenAPI generated documentation can be found [here](OPENAPI_README.md).


pkgId: 5bb207dc4699fa8c76552521d0867df8edcc5bc806203b122f793f382ca0c2bf
name: python-canopy-sdk
arch: src
version: 0.9.0
epoch: 0
release: 1
summary: Retrieval Augmented Generation (RAG) framework and context engine powered by Pinecone
url: https://pypi.org/project/canopy-sdk/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canopy-sdk-0.9.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
  <a href="https://pypi.org/project/canopy-sdk" target="_blank">
      <img src="https://img.shields.io/pypi/pyversions/canopy-sdk" alt="Supported Python versions">
  </a>
  <a href="https://pypi.org/project/canopy-sdk" target="_blank">
      <img src="https://img.shields.io/pypi/v/canopy-sdk?label=pypi%20package" alt="Package version">
  </a>
  </p>


  **Canopy** is an open-source Retrieval Augmented Generation (RAG) framework and context engine built on top of the Pinecone vector database. Canopy enables you to quickly and easily experiment with and build applications using RAG. Start chatting with your documents or text data with a few simple commands.

  Canopy takes on the heavy lifting for building RAG applications: from chunking and embedding your text data to chat history management, query optimization, context retrieval (including prompt engineering), and augmented generation.

  Canopy provides a configurable built-in server so you can effortlessly deploy a RAG-powered chat application to your existing chat UI or interface. Or you can build your own, custom RAG application using the Canopy library.

  Canopy lets you evaluate your RAG workflow with a CLI based chat tool. With a simple command in the Canopy CLI you can interactively chat with your text data and compare RAG vs. non-RAG workflows side-by-side.

  Check out our [blog post](https://pinecone.io/blog/canopy-rag-framework) to learn more, or see a quick [tutorial here](https://www.youtube.com/watch?v=dVGPglKh80Y).



  ![](.readme-content/rag_flow.png)

  Canopy implements the full RAG workflow to prevent hallucinations and augment your LLM with your own text data.

  Canopy has two flows: knowledge base creation and chat. In the knowledge base creation flow, users upload their documents and transform them into meaningful representations stored in Pinecone's Vector Database. In the chat flow, incoming queries and chat history are optimized to retrieve the most relevant documents, the knowledge base is queried, and a meaningful context is generated for the LLM to answer.



  1. **Canopy Core Library** - The library has 3 main classes that are responsible for different parts of the RAG workflow:
      * **ChatEngine** - Exposes a chat interface to interact with your data. Given the history of chat messages, the `ChatEngine` formulates relevant queries to the `ContextEngine`, then uses the LLM to generate a knowledgeable response.
      * **ContextEngine**  - Performs the “retrieval” part of RAG. The `ContextEngine` utilizes the underlying `KnowledgeBase` to retrieve the most relevant documents, then formulates a coherent textual context to be used as a prompt for the LLM.
      * **KnowledgeBase** - Manages your data for the RAG workflow. It automatically chunks and transforms your text data into text embeddings, storing them in a Pinecone(Default)/Qdrant vector database. Given a text query - the knowledge base will retrieve the most relevant document chunks from the database.


  > More information about the Core Library usage can be found in the [Library Documentation](docs/library.md)

  2. **Canopy Server** - This is a webservice that wraps the **Canopy Core** library and exposes it as a REST API. The server is built on top of FastAPI, Uvicorn and Gunicorn and can be easily deployed in production.
  The server also comes with a built-in Swagger UI for easy testing and documentation. After you [start the server](#3-start-the-canopy-server), you can access the Swagger UI at `http://host:port/docs` (default: `http://localhost:8000/docs`)

   3. **Canopy CLI** - A built-in development tool that allows users to swiftly set up their own Canopy server and test its configuration.
  With just three CLI commands, you can create a new Canopy server, upload your documents to it, and then interact with the Chatbot using a built-in chat application directly from the terminal. The built-in chatbot also enables comparison of RAG-infused responses against a native LLM chatbot.



  0. set up a virtual environment (optional)
  ```bash
  python3 -m venv canopy-env
  source canopy-env/bin/activate
  ```
  > More information about virtual environments can be found [here](https://docs.python.org/3/tutorial/venv.html)

  1. install the package
  ```bash
  pip install canopy-sdk
  ```

  <details>
  <summary>You can also install canopy-sdk with extras. <b><u>CLICK HERE</u></b> to see the available extras

  <br />
  </summary>



  | Name           | Description                                                                                                                                              |
  | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `grpc`         | To unlock some performance improvements by working with the GRPC version of the [Pinecone Client](https://github.com/pinecone-io/pinecone-python-client) |
  | `torch`        | To enable embeddings provided by [sentence-transformers](https://www.sbert.net/)                                                                         |
  | `transformers` | If you are using Anyscale LLMs, it's recommended to use `LLamaTokenizer` tokenizer which requires transformers as dependency                             |
  | `cohere`       | To use Cohere reranker or/and Cohere LLM                                                                                                                 |
  | `qdrant`       | To use [Qdrant](http://qdrant.tech/) as an alternate knowledge base                                                                                      |

  </details>

  2. Set up the environment variables

  ```bash
  export PINECONE_API_KEY="<PINECONE_API_KEY>"
  export OPENAI_API_KEY="<OPENAI_API_KEY>"
  export INDEX_NAME="<INDEX_NAME>"
  ```

  <details>
  <summary><b><u>CLICK HERE</u></b> for more information about the environment variables

  <br />
  </summary>



  | Name                  | Description                                                                                                                 | How to get it?                                                                                                                                                               |
  |-----------------------|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | `PINECONE_API_KEY`    | The API key for Pinecone. Used to authenticate to Pinecone services to create indexes and to insert, delete and search data | Register or log into your Pinecone account in the [console](https://app.pinecone.io/). You can access your API key from the "API Keys" section in the sidebar of your dashboard |
  | `OPENAI_API_KEY`      | API key for OpenAI. Used to authenticate to OpenAI's services for embedding and chat API                                    | You can find your OpenAI API key [here](https://platform.openai.com/account/api-keys). You might need to login or register to OpenAI services                                |
  | `INDEX_NAME`          | Name of the Pinecone index Canopy will underlying work with                                                                  | You can choose any name as long as it follows Pinecone's [restrictions](https://support.pinecone.io/hc/en-us/articles/11729246212637-Are-there-restrictions-on-index-names-#:~:text=There%20are%20two%20main%20restrictions,and%20emojis%20are%20not%20supported.)                                                                                       |
  | `CANOPY_CONFIG_FILE` | The path of a configuration yaml file to be used by the Canopy server. | Optional - if not provided, default configuration would be used |



  These optional environment variables are used to authenticate to other supported services for embeddings and LLMs. If you configure Canopy to use any of these providers - you would need to set the relevant environment variables.

  | Name                  | Description                                                                                                                 | How to get it?                                                                                                                                                               |
  |-----------------------|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | `ANYSCALE_API_KEY`    | API key for Anyscale. Used to authenticate to Anyscale Endpoints for open source LLMs                                    | You can register Anyscale Endpoints and find your API key [here](https://app.endpoints.anyscale.com/)
  | `CO_API_KEY`   | API key for Cohere. Used to authenticate to Cohere services for embedding                                           | You can find more information on registering to Cohere [here](https://cohere.com/pricing)
  | `JINA_API_KEY`        | API key for Jina AI. Used to authenticate to JinaAI's services for embedding and chat API                                    | You can find your OpenAI API key [here](https://platform.openai.com/account/api-keys). You might need to login or register to OpenAI services                                |
  | `AZURE_OPENAI_ENDOINT`| The URL of the Azure OpenAI endpoint you deployed. | You can find this in the Azure OpenAI portal under _Keys and Endpoints`|
  | `AZURE_OPENAI_API_KEY` | The API key to use for your Azure OpenAI models. | You can find this in the Azure OpenAI portal under _Keys and Endpoints`|
  | `OCTOAI_API_KEY`       | API key for OctoAI. Used to authenticate for open source LLMs served in OctoAI                               | You can sign up for OctoAI and find your API key [here](https://octo.ai/)

  </details>


  3. Check that installation is successful and environment is set, run:
  ```bash
  canopy
  ```

  Output should be similar to this:

  ```bash
  Canopy: Ready

  Usage: canopy [OPTIONS] COMMAND [ARGS]...

  ```



  In this quickstart, we will show you how to use the **Canopy** to build a simple question answering system using RAG (retrieval augmented generation).



  As a one-time setup, Canopy needs to create a new Pinecone index that is configured to work with Canopy, just run:

  ```bash
  canopy new
  ```

  And follow the CLI instructions. The index that will be created will have a prefix `canopy--<INDEX_NAME>`.
  You only have to do this process once for every Canopy index you want to create.

  > To learn more about Pinecone indexes and how to manage them, please refer to the following guide: [Understanding indexes](https://docs.pinecone.io/docs/indexes)



  You can load data into your Canopy index using the command:

  ```bash
  canopy upsert /path/to/data_directory

  canopy upsert /path/to/data_directory/file.parquet

  canopy upsert /path/to/data_directory/file.jsonl

  canopy upsert /path/to/directory_of_txt_files/

  ```

  Canopy supports files in `jsonl`, `parquet` and `csv` formats. Additionally, you can load plaintext data files in `.txt` format. In this case, each file will be treated as a single document. The document id will be the filename, and the source will be the full path of the file.

  > **Note**: Document fields are used in the RAG flow and should comply with the following schema:

  ```bash
  +----------+--------------+--------------+---------------+
  | id(str)  | text(str)    | source       | metadata      |
  |          |              | Optional[str]| Optional[dict]|
  |----------+--------------+--------------+---------------|
  | "id1"    | "some text"  | "some source"| {"key": "val"}|
  +----------+--------------+--------------+---------------+










  ```

  [This notebook](https://colab.research.google.com/github/pinecone-io/examples/blob/master/learn/generation/canopy/00-canopy-data-prep.ipynb) shows how you create a dataset in this format, Follow the instructions in the CLI when you upload your data.

  > [!TIP]
  > If you would like to separate your data into [namespaces](https://docs.pinecone.io/docs/namespaces),
  > you can use the `--namespace` option or the `INDEX_NAMESPACE` environment variable.



  The Canopy server exposes Canopy's functionality via a REST API. Namely, it allows you to upload documents, retrieve relevant docs for a given query, and chat with your data. The server exposes a `/chat.completion` endpoint that can be easily integrated with any chat application.
  To start the server, run:

  ```bash
  canopy start
  ```
  Now, you should be prompted with the following standard Uvicorn message:
  ```
  ...

  INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  ```
  **That's it!** you can now start using the **Canopy** server with any chat application that supports a `/chat.completion` endpoint.

  > The canopy start command will keep the terminal occupied (recommended use).
  > If you want to run the server in the background, you can use the following command - **```nohup canopy start &```**



  To stop the server, simply press `CTRL+C` in the terminal where you started it.




  Canopy's CLI comes with a built-in chat app that allows you to interactively chat with your text data and compare RAG vs. non-RAG workflows side-by-side to evaluate the results

  In a new terminal window, set the [required environment variables](#setup) then run:

  ```bash
  canopy chat
  ```

  This will open a chat interface in your terminal. You can ask questions and the RAG-infused chatbot will try to answer them using the data you uploaded.

  To compare the chat response with and without RAG use the `--no-rag` flag

  > **Note**: This method is only supported with OpenAI at the moment.

  ```bash
  canopy chat --no-rag
  ```

  This will open a similar chat interface window, but will show both the RAG and non-RAG responses side-by-side.



  * Rate limits and pricing set by model providers apply to Canopy usage. Canopy currently works with OpenAI, Azure OpenAI, Anyscale, and Cohere models.
  * More integrations will be supported in the near future.


  Thank you for considering contributing to Canopy! Please see our [contributing guidelines](./CONTRIBUTING.md) for more information.





  If you already have an application that uses the OpenAI API, you can migrate it to **Canopy** by simply changing the API endpoint to `http://host:port/v1`, for example with the default configuration:

  ```python
  from openai import OpenAI

  client = OpenAI(base_url="http://localhost:8000/v1")
  ```

  If you would like to use a specific index namespace for chatting, you can just append the namespace to the API endpoint:
  ```python
  from openai import OpenAI

  client = OpenAI(base_url="http://localhost:8000/v1/my-namespace")
  ```




  Canopy is using FastAPI as the web framework and Uvicorn as the ASGI server.
  To use Canopy in production, it is recommended to utilize Canopy's docker image, available on [GitHub Packages](https://github.com/pinecone-io/canopy/pkgs/container/canopy),
  for your production needs.
  For guidance on deploying Canopy on the Google Cloud Platform (GCP), refer to the example provided in the
  [Deployment to GCP](docs/deployment-gcp.md) documentation.

  Alternatively, you can use Gunicorn as production-grade WSGI, more details [here](https://www.uvicorn.org/deployment/#using-a-process-manager).
  Set your desired `PORT` and `WORKER_COUNT` envrionment variables, and start the server with:
  ```bash
  gunicorn canopy_server.app:app --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT --workers $WORKER_COUNT
  ```

  > [!IMPORTANT]
  >  The server interacts with services like Pinecone and OpenAI using your own authentication credentials.
     When deploying the server on a public web hosting provider, it is recommended to enable an authentication mechanism,
     so that your server would only take requests from authenticated users.


pkgId: fc04d38d04f02b19b95f57936e828807ad5806bac1a0c5abe6a064dec39bc58c
name: python-canoser
arch: src
version: 0.8.2
epoch: 0
release: 1
summary: A python implementation of the LCS(Libra Canonical Serialization) for the Libra network.
url: https://github.com/yuan-xy/canoser-python.git
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canoser-0.8.2-1.src.rpm
checksum_type: sha256
description:
  A python implementation of the canonical serialization for the Libra network.

  Canonical serialization guarantees byte consistency when serializing an in-memory
  data structure. It is useful for situations where two parties want to efficiently compare
  data structures they independently maintain. It happens in consensus where
  independent validators need to agree on the state they independently compute. A cryptographic
  hash of the serialized data structure is what ultimately gets compared. In order for
  this to work, the serialization of the same data structures must be identical when computed
  by independent validators potentially running different implementations
  of the same spec in different languages.



  Require python 3.6 or above installed.

  ```sh
  $ python3 -m pip install canoser
  ```




  First define a data structure with Canoser, that is, write a class that inherits from "canoser.Struct", and then define the fields owned by the structure through the "\_fields" array. This structure naturally has the ability to canonical serialize and deserialize types. For example, the following AccountResource defines a data structure of the same name in the Libra code：
  ```python
    
  from canoser import Struct, Uint8, Uint64
  class AccountResource(Struct):
      _fields = [
          ('authentication_key', [Uint8]),
          ('balance', Uint64),
          ('delegated_withdrawal_capability', bool),
          ('received_events', EventHandle),
          ('sent_events', EventHandle),
          ('sequence_number', Uint64)
      ]
  ```

  Here is the code that defines this data structure and serialization in Libra code:
  ```rust
  // rust code in Libra
  // define the data structure
  pub struct AccountResource {
      balance: u64,
      sequence_number: u64,
      authentication_key: ByteArray,
      sent_events: EventHandle,
      received_events: EventHandle,
      delegated_withdrawal_capability: bool,
  }
  // serialization
  impl CanonicalSerialize for AccountResource {
      fn serialize(&self, serializer: &mut impl CanonicalSerializer) -> Result<()> {
          serializer
              .encode_struct(&self.authentication_key)?
              .encode_u64(self.balance)?
              .encode_bool(self.delegated_withdrawal_capability)?
              .encode_struct(self.received_events)?
              .encode_struct(self.sent_events)?
              .encode_u64(self.sequence_number)?;
          Ok(())
      }
  }
  ```
  ~~In the rust language used by Libra, it is necessary to manually write code to serialize/deserialize the data structure, and the order of the fields in the data structure and the order of serialization are not necessarily the same.~~

  In Canoser, after defining the data structure, you don't need to write code to implement serialization and deserialization. Note that the order of the data structures in Canoser is defined in the order in which they are serialized in Libra.



  | field type | optionl sub type | description |
  | ------ | ------ | ------ |
  | canoser.Uint8 |  | Unsigned 8-bit integer |
  | canoser.Uint16 |  | Unsigned 16-bit integer|
  | canoser.Uint32 |  | Unsigned 32-bit integer |
  | canoser.Uint64 |  | Unsigned 64-bit integer |
  | canoser.Uint128 |  | Unsigned 128-bit integer |
  | canoser.Int8 |  | Signed 8-bit integer |
  | canoser.Int16 |  | Signed 16-bit integer|
  | canoser.Int32 |  | Signed 32-bit integer |
  | canoser.Int64 |  | Signed 64-bit integer |
  | canoser.Int128 |  | Signed 128-bit integer |
  | bool |  | Boolean |
  | str |  | String |
  | bytes |  | Binary String |
  | [] | supported | Array Type |
  | {} | supported |  Map Type |
  | () | supported |  Tuple Type |
  | canoser.Struct |  | Another structure nested (cannot be recycled) |
  | RustEnum |  | Enum type |
  | RustOptional |  | Optional type |


  The default data type (if not defined) in the array is Uint8. The following two definitions are equivalent:
  ```python
    class Arr1(Struct):
        _fields = [(addr, [])]


    class Arr2(Struct):
        _fields = [(addr, [Uint8])]

  ```
  Arrays can also define lengths to represent fixed length data. For example, the address in Libra is 256 bits, which is 32 bytes, so it can be defined as follows:
  ```python
    class Address(Struct):
        _fields = [(addr, [Uint8, 32])]
  ```
  When the fixed length data is serialized, you can skip the length information written to the output. For example, following code will generate 32 bytes without writing the length of the addr during serialization.

  ```python
    class Address(Struct):
        _fields = [(addr, [Uint8, 32, False])]
  ```



  The default data type (if not defined) in the map is an array of Uint8 in Libra, both of key and value.
  But the python language dosn't support the array data type to be the key of a dict, so we change the key type from array of Uint8 to bytes in python, the type of value is unchanged.
  The following two definitions are equivalent:
  ```python
    class Map1(Struct):
      _fields = [(addr, {})]


    class Map2(Struct):
      _fields = [(addr, {bytes : [Uint8] })]

  ```


  In python and C, enum is just enumerated constants. But in Libra(Rust), a enum has a type constant and a optional Value. A rust enumeration is typically represented as:

  ```
  enum SomeDataType {
    type0(u32),
    type1(u64),
    type2
  }
  ```

  To define a enum with Canoser, first write a class that inherits from "canoser.RustEnum", and then define the types owned by the enum through the "\_enums" array.
  For example, the following TransactionArgument defines a data structure of the same name in the Libra code. The argument of a transaction can be one of the four types: Uint64 or Address or String or IntArray.：

  ```python
  class TransactionArgument(RustEnum):
      _enums = [
          ('U64', Uint64),
          ('Address', [Uint8, ADDRESS_LENGTH]),
          ('String', str),
          ('ByteArray', [Uint8])
      ]
  ```
  You can instantiate an enum obj and call its method and properties like this:

  ```python
      arg2 = TransactionArgument('String', 'abc')
      assert arg2.index == 2
      assert arg2.value == 'abc'
      assert arg2.String == True
      assert arg2.U64 == False
  ```

  Every RustEnum object has an `index` property and a `value` property. After instantiated, the `index` can't be modified. You can only modify the `value` of an enum with correct data type.

  For example, the following code is valid:

  ```python
      arg2 = TransactionArgument('String', 'abc')
      arg2.value == 'Bcd'
  ```

  For example, the following code is invalid:
  ```python
      arg2.index = 0      #raise an exception
      arg2.value = [3]    #raise an exception
  ```

  The RustEnum can have a enum without value type, which represented by `None`.

  ```python
  class Enum1(RustEnum):
      _enums = [('opt1', [Uint8]), ('opt2', None)]

  e2 = Enum1('opt2', None)

  e2 = Enum1('opt2')
  ```

  You can also instantiate a RustEnum object by index and value.

  ```python
  e1 = Enum1.new(0, [5])

  e1 = Enum1('opt1', [5])
  ```


  An optional type in libra is a nullable data either exists in its full representation or does not. For example,

  ```
  optional_data: Option(uint8); // Rust/Libra
  uint8 *optional_data; // C
  ```
  It has similar semantics meaning with the following enum type:
  ```
  enum Option<uint8> {
      Some(uint8),
      None,
  }
  ```

  To define a optional with Canoser, first write a class that inherits from "canoser.RustOptional", and then define the types owned by RustOptional through the "\_type" field. For example,

  ```python
  class OptionUInt(RustOptional):
      _type = Uint8

  null = OptionUInt(None)
  obj = OptionUInt(8)
  assert obj.value == 8
  ```

  Here's a complete example:

  ```python
  class OptionStr(RustOptional):
      _type = str

  class OptionTest(Struct):
      _fields = [
          ('message', OptionStr)
      ]

      def __init__(self, msg=None):
          if msg is not None:
              self.message = OptionStr(msg)
          else:
              self.message = OptionStr(None)

  test = OptionTest('test_str')
  assert test.message.value == 'test_str'
  ```


  The RustOptional type in canoser is similar to `typing.Optional` in python. Note that this is not the same concept as an optional argument, which is one that has a default.



  The following is a complex example with three data structures:
  ```python
  class Addr(Struct):
      _fields = [('addr', [Uint8, 32])]


  class Bar(Struct):
      _fields = [
          ('a', Uint64),
          ('b', [Uint8]),
          ('c', Addr),
          ('d', Uint32),
      ]

  class Foo(Struct):
      _fields = [
          ('a', Uint64),
          ('b', [Uint8]),
          ('c', Bar),
          ('d', bool),
          ('e', {}),
      ]
  ```
  This example refers to the test code from canonical serialization in libra.



  After defining canoser.Struct, you don't need to implement serialization and deserialization code yourself, you can directly call the default implementation of the base class. Take the AccountResource structure as an example:

  ```python

  obj = AccountResource(authentication_key=...,...)
  bbytes = obj.serialize()


  obj = AccountResource.deserialize(bbytes)
  ```



  For any canoser `Struct`, you can call the `to_json` method to get a formatted json string:

  ```python

  print(obj.to_json())

  ```



  For all fields defined by the "\_fields", the value of this field of an object can be obtained via field_name. such as:
  ```python
  obj.authentication_key
  ```



  For simple type alias in rust, such as:
  ```rust
  // in rust
  pub type Round = u64;
  ```

  We can define the alias like this:

  ```python

  Round = Uint64
  ```




  Struct like Address and ByteArray has no fields:

  ```rust
  pub struct Address([u8; ADDRESS_LENGTH]);
  pub struct ByteArray(Vec<u8>);
  ```

  These struct called `tuple struct` in `Rust` programming language. Tuple struct is like `typedef` other than struct in `C` like programming languages.

  You can just define them as a direct type, no struct. Just code like this:
  ```python
  class TransactionArgument(RustEnum):
      _enums = [
          ...
          ('Address', [Uint8, ADDRESS_LENGTH]),
          ...
      ]
  ```

  Or you can define an `Address` class which inherit from `canoser.DelegateT` and has a `delegate_type` field with type `[Uint8, ADDRESS_LENGTH]`:

  ```python
  class Address(DelegateT):
      delegate_type = [Uint8, ADDRESS_LENGTH]


  class TransactionArgument(RustEnum):
      _enums = [
          ...
          ('Address', Address),
          ...
      ]
  ```

  Do not instantiate a `canoser.DelegateT` type in assaignment, for example:

  ```python
  transactionArgument.address = [...] #ok
  transactionArgument.address = Address([...])  #error
  ```






  For example, the SignedTransaction in Libra is defined as following code:

  ```rust
  pub struct SignedTransaction {
      raw_txn: RawTransaction,
      public_key: Ed25519PublicKey,
      signature: Ed25519Signature,
      transaction_length: usize,
  }
  ```
  But field `transaction_length` doesn't write to the output.

  ```rust
  impl CanonicalSerialize for SignedTransaction {
      fn serialize(&self, serializer: &mut impl CanonicalSerializer) -> Result<()> {
          serializer
              .encode_struct(&self.raw_txn)?
              .encode_bytes(&self.public_key.to_bytes())?
              .encode_bytes(&self.signature.to_bytes())?;
          Ok(())
      }
  }
  ```

  So we define SignedTransaction in canoser as following code:
  ```python
  class SignedTransaction(canoser.Struct):
      _fields = [
          ('raw_txn', RawTransaction),
          ('public_key', [Uint8, ED25519_PUBLIC_KEY_LENGTH]),
          ('signature', [Uint8, ED25519_SIGNATURE_LENGTH])
      ]
  ```

  Here is another example. The definition sequence and serialize sequence is opposite in  `WriteOp`

  ```rust
  pub enum WriteOp {
      Value(Vec<u8>),
      Deletion,
  }

  enum WriteOpType {
      Deletion = 0,
      Value = 1,
  }

  impl CanonicalSerialize for WriteOp {
      fn serialize(&self, serializer: &mut impl CanonicalSerializer) -> Result<()> {
          match self {
              WriteOp::Deletion => serializer.encode_u32(WriteOpType::Deletion as u32)?,
              WriteOp::Value(value) => {
                  serializer.encode_u32(WriteOpType::Value as u32)?;
                  serializer.encode_vec(value)?
              }
          };
          Ok(())
      }
  }
  ```

  So, we define `WriteOp` as follow:
  ```python
  class WriteOp(RustEnum):
      _enums = [
          ('Deletion', None),
          ('Value', [Uint8])
      ]

  ```



  [MoveOnLibra OpenAPI: make writing libra wallet & move program easier](https://www.MoveOnLibra.com)

  [A Ruby implementation of the LCS(Libra Canonical Serialization)](https://github.com/yuan-xy/canoser-ruby)

  [A Python implementation of client APIs and command-line tools for the Libra network](https://github.com/yuan-xy/libra-client)





  The package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).


