# packages

pkgId: a47d9d4061e3ed9fdef6be4cbac7c668a99a4d5765f5f8c27093bdaf701998a7
name: python-sdss-mangadap-help
arch: noarch
version: 4.3.0
epoch: 0
release: 1
summary: Development documents and examples for sdss-mangadap
url: https://github.com/sdss/mangadap
rpm_license: BSD-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sdss-mangadap-4.3.0-1.src.rpm
location_href: Packages/python-sdss-mangadap-help-4.3.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/sdss/mangadap/actions/workflows/ci_tests.yml/badge.svg)](https://github.com/sdss/mangadap/actions)
  [![Coverage Status](https://codecov.io/gh/sdss/mangadap/branch/main/graph/badge.svg?token=S4veEPJwS1)](https://codecov.io/gh/sdss/mangadap)
  [![Doc Status](https://readthedocs.org/projects/sdss-mangadap/badge/?version=latest)](https://sdss-mangadap.readthedocs.io/en/latest/)
  [![License](https://img.shields.io/github/license/sdss/mangadap)](https://github.com/sdss/mangadap/blob/main/LICENSE.md)
  [![astropy](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/)

  The MaNGA data-analysis pipeline (MaNGA DAP) is the survey-led software package
  that has analyzed all galaxy data produced by the MaNGA data-reduction pipeline
  (MaNGA DRP).  Its goal is to produce high-level, science-ready data products
  derived from MaNGA spectra.  The products currently provided are:

   - Spatially stacked spectra
   - Stellar kinematics
   - Nebular emission-line properties: fluxes, equivalent widths, and
     kinematics
   - Spectral indices: absorption-line (e.g., H-delta) and bandhead/color
     (e.g., TiO, D4000) measurements

  That is, the DAP currently focuses on "model-independent" properties.
  Higher-level, model-dependent properties, such as stellar-population parameters,
  are outside of the scope of the current pipeline.

  **See our full documentation at [sdss-mangadap.readthedocs.io](https://sdss-mangadap.readthedocs.io/en/latest/).**




   - [SDSS-IV/MaNGA DR15](https://www.sdss.org/dr15/manga/) is based on version 2.2.1

   - [SDSS-IV/MaNGA DR17](https://www.sdss.org/dr17/manga/) is based on version
     3.1.2.  Note that the version of the code that produced the DR17 was version
     3.1.0; version 3.1.1 and 3.1.2 only include documentation updates.




  If you use the DAP software and/or its output products, please cite the
  following two papers:

   - *Overview*: [Westfall et al. (2019, AJ, 158, 231)](https://ui.adsabs.harvard.edu/abs/2019AJ....158..231W/abstract)
   - *Emission-line Modeling*: [Belfiore et al. (2019, AJ, 158, 160)](https://ui.adsabs.harvard.edu/abs/2019AJ....158..160B/abstract)

  Additionally, if you use SDSS-IV/MaNGA data, please see:

   - [How to Cite SDSS](https://www.sdss.org/collaboration/citing-sdss/)
   - [SDSS Technical Publications](https://www.sdss.org/science/technical_publications/)




  `pip install sdss-mangadap`

  See https://sdss-mangadap.readthedocs.io/en/latest/installation.html


pkgId: f99863f8103dfe5809d042d4153135647bedb365c39506496191be22063b3a94
name: python-sdss-target-selection-help
arch: noarch
version: 1.3.18
epoch: 0
release: 1
summary: Development documents and examples for sdss-target-selection
url: https://github.com/sdss/target_selection
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sdss-target-selection-1.3.18-1.src.rpm
location_href: Packages/python-sdss-target-selection-help-1.3.18-1.noarch.rpm
checksum_type: sha256
description:
  ![Versions](https://img.shields.io/badge/python->=3.10-blue)
  [![Documentation Status](https://readthedocs.org/projects/sdss-target-selection/badge/?version=latest)](https://sdss-target-selection.readthedocs.io/en/latest/?badge=latest)

  Code to perform target selection for BHM/MWM using catalogdb.



  To install `target_selection` do

  ```console
  pip install sdss-target-selection
  ```

  or from the GitHub repository

  ```console
  git clone git@github.com:sdss/target_selection
  cd target_selection
  pip install .
  ```



  This code adheres to the [SDSS Coding Standards](https://sdss-python-template.readthedocs.io/en/latest/standards.html).

  We use [poetry](https://python-poetry.org) as the PEP517 backend and for dependency specification and resolution. To install `poetry` follow [these instructions](https://python-poetry.org/docs/#installation). The you can install the project for development with

  ```console
  cd target_selection
  poetry install
  ```

  Note that as long as you don't need to install or update dependencies you can still install `target_selection` in editable mode with

  ```console
  pip install -e .
  ```

  (this will *not* install the development packages under the `dev` dependencies group, those need to be manually pip-installed in this case). Please, **do not add new dependencies without updating the `poetry.lock` file**. One of the workflows that run on commit will check that the lockfile is still valid.

  We use [ruff](https://docs.astral.sh/ruff/) for both linting, import sorting, and code formatting. The configuration is stored in `pyproject.toml` and it's mainly the default `ruff` configuration (and similar to `flake8`) but with a line length of 99 characters for historical reasons and because it simplifies writing long Peewee/SQLAlchemy query statements. The formatting is similar to [black](https://github.com/psf/black), and thus quite opinionated.

  A workflow checks for linting and formatting errors on each commit, and pull requests are blocked until the workflow succeeds. The easiest way to fix these problems is by installing `ruff` and letting it format the code, and then checking if any linting errors remain. The commands `ruff format` and `ruff check` are independent and both must be run.

  ```console
  $ pip install ruff
  $ ruff format ./python/
  1 file reformatted, 46 files left unchanged
  $ ruff check ./python/
  All checks passed!
  ```

  Updating the package version can be done directly in the `pyproject.toml` file and doesn't require having `poetry` installed or otherwise updating the lockfile.



  If using Visual Studio Code, it is recommended to install the [ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) and [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extensions. Then you can create a workspace file inside the cloned repo, under `.vscode/settings.json` with the following configuration

  ```json
  {
      "[python]": {
          "editor.formatOnSave": true,
          "editor.codeActionsOnSave": {
              "source.fixAll": "explicit",
              "source.organizeImports.ruff": "explicit"
          },
          "editor.wordWrap": "off",
          "editor.tabSize": 4,
          "editor.defaultFormatter": "charliermarsh.ruff"
      },
      "[markdown]": {
          "editor.wordWrapColumn": 88
      },
      "[restructuredtext]": {
          "editor.wordWrapColumn": 88
      },
      "[json]": {
          "editor.quickSuggestions": {
              "strings": true
          },
          "editor.suggest.insertMode": "replace",
          "editor.formatOnSave": true,
          "editor.defaultFormatter": "esbenp.prettier-vscode",
          "editor.tabSize": 2
      },
      "[yaml]": {
          "editor.insertSpaces": true,
          "editor.formatOnSave": true,
          "editor.defaultFormatter": "esbenp.prettier-vscode",
          "editor.tabSize": 2,
          "editor.autoIndent": "advanced",
      },
      "prettier.tabWidth": 2,
      "editor.rulers": [99],
      "editor.wordWrapColumn": 99,
      "python.analysis.typeCheckingMode": "off",
      "ruff.nativeServer": true
  }
  ```

  which will apply the formatting and linting automatically on save.



  Often developing `target_selection` requires concurrent changes to [sdssdb](https://github.com/sdss/sdssdb). This presents a bit of a challenge to keep everything in sync and provide a convenient developing environment.

  The recommended way to develop with `target_selection` and `sdssdb` is to install `sdssdb` in editable mode in the `target_selection` environment. To do this run

  ```bash
  pip install -e <PATH-TO-SDSSDB-ROOT-DIR>
  ```

  After this if you run

  ```bash
  pip list | grep sdssdb
  ```

  you should see a path next to the version, indicating that `sdssdb` is being imported from that path. Any local changes in that path will be applied when `target_selection` imports `sdssdb`.



  When tagging `target_selection` please make sure that you've tagged `sdssdb` (if needed) and that the lockfile reflects the change. First you'll need to install [poetry](https://python-poetry.org/docs/#installation) (this should only be required once). Follow the installation instructions there, but a recommended way to install is:

  1. Install [pipx](https://pipx.pypa.io/stable/installation/). Follow the instructions for your system, but generally `pip install pipx` works fine.
  2. Use `pipx` to install `poetry` with

      ```bash
      pipx install poetry
      ```

  3. Ensure that the `poetry` executable can be found. If you execute `poetry` in your shell and that files, make sure that you have `$HOME/.local/bin` in your `$PATH` or follow other `pipx` instructions.

  Once `poetry` is installed follow these instructions:

  1. If there are changes in `sdssdb` that affect `target_selection`, tag `sdssdb`. Please do update the `sdssdb` [change log](https://github.com/sdss/sdssdb/blob/main/CHANGELOG.rst) adding the header indicating the date in which the release was made. Note that you don't necessarily need to do this every time that `target_selection` is tagged, only when the new `target_selection` tag depends on untagged changes in `sdssdb`.

  2. Update the `version` in `pyproject.toml` to the release version.

  3. Update the dependency for `sdssdb` in `pyproject.toml` for example if `sdssdb` 0.14.1 has just been tagged, change

      ```toml
      sdssdb = "0.14.0"
      ```

      to

      ```toml
      sdssdb = "0.14.1"
      ```

  4. Recreate the lockfile with

      ```bash
      poetry lock
      ```

      It may take a bit of time for `poetry` to detect a recently released version of `sdss`. You may want to run `poetry lock --no-cache` which will take a bit longer but should grab the new package as long as PyPI has updated its internal cache.

      Note that `poetry lock` *will not* update the version of `sdssdb` in your virtual environment, only the lockfile. If you do want to update the dependency and the lockfile use `poetry update sdssdb` (or `poetry update` to update all the dependencies).

  5. Commit the new changes (including the `poetry.lock` file) and tag the new version of `target_selection`.


pkgId: b9fb0f515087622bac3c1c0af39ca5b803b35c0425cd88a132861a389ad8a267
name: python-sdv-help
arch: noarch
version: 1.17.3
epoch: 0
release: 1
summary: Development documents and examples for sdv
url: https://pypi.org/project/sdv/
rpm_license: BSL-1.1
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sdv-1.17.3-1.src.rpm
location_href: Packages/python-sdv-help-1.17.3-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
    <a href="https://datacebo.com"><picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://github.com/sdv-dev/SDV/blob/stable/docs/images/datacebo-logo-dark-mode.png">
        <img align="center" width=40% src="https://github.com/sdv-dev/SDV/blob/stable/docs/images/datacebo-logo.png"></img>
    </picture></a>
  </div>
  <br/>
  <br/>
  [The Synthetic Data Vault Project](https://sdv.dev) was first created at MIT's [Data to AI Lab](
  https://dai.lids.mit.edu/) in 2016. After 4 years of research and traction with enterprise, we
  created [DataCebo](https://datacebo.com) in 2020 with the goal of growing the project.
  Today, DataCebo is the proud developer of SDV, the largest ecosystem for
  synthetic data generation & evaluation. It is home to multiple libraries that support synthetic
  data, including:
  * 🔄 Data discovery & transformation. Reverse the transforms to reproduce realistic data.
  * 🧠 Multiple machine learning models -- ranging from Copulas to Deep Learning -- to create tabular,
    multi table and time series data.
  * 📊 Measuring quality and privacy of synthetic data, and comparing different synthetic data
    generation models.
  [Get started using the SDV package](https://bit.ly/sdv-docs) -- a fully
  integrated solution and your one-stop shop for synthetic data. Or, use the standalone libraries
  for specific needs.


pkgId: 70c6eb22538e0f329e995004f1d7794bb0363092b06266570ae50276aad3884e
name: python-seabirdscientific-help
arch: noarch
version: 2.3.0
epoch: 0
release: 1
summary: Development documents and examples for seabirdscientific
url: https://www.seabird.com/software
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seabirdscientific-2.3.0-1.src.rpm
location_href: Packages/python-seabirdscientific-help-2.3.0-1.noarch.rpm
checksum_type: sha256
description:
  This is the repository for the Sea-Bird Scientific (SBS) Community Toolkit. It is a collection of:
  - Python code to help in user developed processing of data collected with SBS instruments (see the repository src/sbs folder).
  - Example SBS instrument data (see the repository documentation/example_data folder).
  - A [Jupyter](https://jupyter.org/) notebook that documents the current toolkit processing options that can be applied to data collected with SBE 37 and SBE 19plus V2 CTDs (see the repository documentation folder). This notebook also serves to document the processing options available in the SBS Fathom application.


  https://github.com/Sea-BirdScientific/seabirdscientific/tree/main/documentation


  The seabirdscientific package uses Python 3.9 or greater. To install the package in a Python environment using pip send the command:

  On Windows:
  ``` bash
  py -m pip install seabirdscientific
  ```

  On Unix/macOS:

  ``` bash
  python3 -m pip install seabirdscientific
  ```
  For additional information see the [Python.org Installing Packages](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-packages) reference.


  ```python
  import sbs
  from sbs.process import contour
  import sbs.process.conversion as conv
  import sbs.process.processing as proc
  ```


  You must have [Python](https://www.python.org/downloads/) version 3.9 or higher installed in order to use the toolkit.


  The ctd-processing.ipynb notebook in the documentation folder provides examples of the methods that can be applied to SBS CTD data within both the toolkit and the SBS Fathom application. There are a number of online references available with information on Jupyter notebook setup for different platforms and environments. For those who are not interested in an interactive notebook, there is a static version available in [PDF](https://github.com/Sea-BirdScientific/seabirdscientific/blob/main/documentation/ctd-notebook.pdf) format.


  If you have code or data that you would like to contribute to the SBS community toolkit, please contact [SBS customer support](https://www.seabird.com/support)


pkgId: 04843b518b39e5fecad1cb2396a367c5224f8d1027e361f604ba4387ef5a62fa
name: python-seahorse-help
arch: noarch
version: 1.1.4
epoch: 0
release: 1
summary: Development documents and examples for seahorse
url: https://pypi.org/project/seahorse/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seahorse-1.1.4-1.src.rpm
location_href: Packages/python-seahorse-help-1.1.4-1.noarch.rpm
checksum_type: sha256
description:
  <img width="70%" src="https://raw.githubusercontent.com/corail-research/seahorse/main/assets/logo_seahorse.png" />

  [![PyPI - Version](https://img.shields.io/pypi/v/seahorse.svg)](https://pypi.org/project/seahorse)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/seahorse.svg)](https://pypi.org/project/seahorse)
  ![License](https://img.shields.io/github/license/corail-research/seahorse)
  ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/corail-research/seahorse/python-testing.yml)
  ![GitHub stars](https://img.shields.io/github/stars/corail-research/seahorse)
  ![GitHub contributors](https://img.shields.io/github/contributors/corail-research/seahorse)




  We proudly provide a Python framework that makes the building of an environment for adversarial agents easy !

  A lot of fun functionalities are provided an easily usable out of the box !

   - Implementing a new game setup from scratch ? **Painless !**
   - Playing against remote agents ? **Easy !**
   - Generating and collecting data about played games ? **Worriless !**
   - Organizing a contest for a large range of agents ? **Quick and reliable !**


  The package is publicly available on PyPI.

  We strongly encourage the use of a virtual environment:

  ```
      $ python3 -m venv venv

      $ source venv/bin/[activate|Activate.ps1]

      (venv)$ pip install seahorse

  ```


  Our full documentation and a series of tutorials are available on <a href="https://corail-research.github.io/seahorse/" target="blank">corail-research.github.io</a>.


  We are an enthusiastic team of M.Sc candidates led by Pr. Quentin Cappart at Polytechnique Montréal. The package was originally developed in the context of a introductory course to artificial intelligence given to undergrad computer and software engineering students.
  Checkout our [lab's page](https://corail-research.github.io/team/) for more information.



  `seahorse` is distributed under the termes of the <a href="https://opensource.org/license/bsd-3-clause/" target="blank_">3-Clause BSD License</a>.

  <div class="horizontal-container" style="display:inline-block; width:100%"> <p><img src="https://raw.githubusercontent.com/corail-research/seahorse/main/docs/assets/corail-logo.png" width=400/><img src="https://raw.githubusercontent.com/corail-research/seahorse/main/docs/assets/logo_poly.png" width=150/></p>
  </p>  </div>


pkgId: b4f9c2fe47ac7005cedd69726a8b54ba4c2b44ffa241f36b7d56d1466e87afbe
name: python-search-string-overvaagning
arch: noarch
version: 0.5.2
epoch: 0
release: 1
summary: SearchString is a custom implementation for searching strings for km24.dk.
url: https://github.com/km24-dk/search-string/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-search-string-overvaagning-0.5.2-1.src.rpm
location_href: Packages/python-search-string-overvaagning-0.5.2-1.noarch.rpm
checksum_type: sha256
description:
  ![GitHub Workflow Status (branch)](https://github.com/kaas-mulvad/search-string/workflows/CI/badge.svg)
  [![PyPI - Version](https://img.shields.io/pypi/v/search-string-overvaagning)][pypi]
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/search-string-overvaagning)



  You can install `search-string` from [PyPI][pypi]:

  ```bash
  $ pip install search-string-overvaagning
  ```

  The package is supported on Python 3.9+. However, the package is only compiled using `mypyc` starting from Python 3.10 which makes it about twice as fast. As such, it is strongly advised to run it on Python 3.10+.



  This package implements the search string object that is used across [km24.dk](https://km24.dk/) for different types of surveillance.

  It is used for searching a text. For something to be deemed a match, the text must match the `first_str` and if the `second_str` is not empty, the text must also match the `second_str`. If the `not_str` is not empty, the text must *not* match the `not_str`. A logical AND is used between the three conditions. The three strings can each be a collection of strings separated by semicolons wherein a match is deemed by logical OR. You can use '~' to make a word boundary. Finally, you can use `!global` at the end of a string to signal that that part should check globally.

  Quick examples:

  ```python
  >>> ss = SearchString('example;hello', 'text', 'elephant', data=None)
  >>> ss.match('This is an example text')
  True
  >>> ss.match('This text says hello')
  True
  >>> ss.match('This is just an example')
  False
  ```







  Start by importing the `SearchString` class:

  ```python
  >>> from search_string import SearchString
  ```

  Construct a new search string by supplying the `first_str`, `second_str`, `not_str` and any `data` that can be useful to refer back to later, such as an ID:

  ```python
  >>> ss = SearchString('first', '', '', data=2)
  ```

  Optionally, you can also supply a `third_str` that works in the same was as `first_str` and `not_str` but *has* to be supplied as a keyword argument:

  ```python
  >>> ss = SearchString('first', '', '', data=2, third_str='third')
  ```



  If you just need to find out whether a given search string matches a text, you can use the method `.match` on a `SearchString` instance.

  Often, what you want to do, is to match a collection of search strings across a list of text, e.g. sentences. You can do that the following way:

  ```python
  >>> from search_string import SearchString
  >>> search_strings = [
  ...    SearchString('kan', '', 'ritzau', data=1),
  ...    SearchString('kan', '', 'ritzau!global', data=2)
  ... ]
  >>> sentences = [
  ...    'Du kan skrive din tekst her.',
  ...    'Den kan bestå af flere sætninger.',
  ...    'Dig og Ritzau kan bestemme hvordan det skal være.',
  ...    'Nogle kan være lange, andre kan være korte.'
  ... ]
  >>> res = SearchString.find_all(sentences, search_strings)
  >>> res
  [SearchString(kan, -, ritzau, data=1)]
  ```

  For each of the matched search strings (in the above example, only one), you can extract the data and the matched text as follows:

  ```python
  >>> res[0].data
  1
  >>> res[0].matched_text
  'Du kan skrive din tekst her. Den kan bestå af flere sætninger. (...) Nogle kan være lange, andre kan være korte.'
  >>> res[0].matched_text_highligthed
  'Du <b>kan</b> skrive din tekst her. Den <b>kan</b> bestå af flere sætninger. (...) Nogle <b>kan</b> være lange, andre <b>kan</b> være korte.'
  ```




  If you have a problem where you repeatedly will be matching new texts against the same collection of search strings, it is highly advised to use the `SearchStringCollection` which behind the scenes uses a [trie] for efficient search when many search strings are present. There is some initial cost in building the trie. Thus, it is recommended that you initialize the collection once and then continue to use it.

  The most important method on `SearchStringCollection` is `find_all`, which takes a sentence (`str`) or list of sentences (`list[str]`) and returns the matched search strings, very similar to the familiar `SearchString.find_all`.

  ```python
  >>> from search_string import SearchString, SearchStringCollection
  >>> search_strings = [
  ...    SearchString('kan', '', 'ritzau', data=1),
  ...    SearchString('kan', '', 'ritzau!global', data=2)
  ... ]
  >>> sentences = ...  # Same as before
  >>> ss_collection = SearchStringCollection(search_strings)
  >>> res = ss_collection.find_all()
  >>> res
  [SearchString(kan, -, ritzau, data=1)]
  ```

  Importantly, `SearchStringCollection` relies on the `data` variable being set on the collection of search strings. If it is set to `None` or multiple search strings have the same value, the behavior is undefined.


  [pypi]: https://pypi.org/project/search-string-overvaagning/
  [trie]: https://en.wikipedia.org/wiki/Trie

rpm_license:
  End-User License Agreement (EULA) of SearchString  This End-User License Agreement ("EULA") is a legal agreement between you and Kaas & Mulvad. Our EULA was created by EULA Template for SearchString.  This EULA agreement governs your acquisition and use of our SearchString software ("Software") directly from Kaas & Mulvad or indirectly through a Kaas & Mulvad authorized reseller or distributor (a "Reseller").  Please read this EULA agreement carefully before completing the installation process and using the SearchString software. It provides a license to use the SearchString software and contains warranty information and liability disclaimers.  If you register for a free trial of the SearchString software, this EULA agreement will also govern that trial. By clicking "accept" or installing and/or using the SearchString software, you are confirming your acceptance of the Software and agreeing to become bound by the terms of this EULA agreement.  If you are entering into this EULA agreement on behalf of a company or other legal entity, you represent that you have the authority to bind such entity and its affiliates to these terms and conditions. If you do not have such authority or if you do not agree with the terms and conditions of this EULA agreement, do not install or use the Software, and you must not accept this EULA agreement.  This EULA agreement shall apply only to the Software supplied by Kaas & Mulvad herewith regardless of whether other software is referred to or described herein. The terms also apply to any Kaas & Mulvad updates, supplements, Internet-based services, and support services for the Software, unless other terms accompany those items on delivery. If so, those terms apply.  License Grant  Kaas & Mulvad hereby grants you a personal, non-transferable, non-exclusive licence to use the SearchString software on your devices in accordance with the terms of this EULA agreement.  You are permitted to load the SearchString software (for example a PC, laptop, mobile or tablet) under your control. You are responsible for ensuring your device meets the minimum requirements of the SearchString software.  You are not permitted to:  Edit, alter, modify, adapt, translate or otherwise change the whole or any part of the Software nor permit the whole or any part of the Software to be combined with or become incorporated in any other software, nor decompile, disassemble or reverse engineer the Software or attempt to do any such things Reproduce, copy, distribute, resell or otherwise use the Software for any commercial purpose Allow any third party to use the Software on behalf of or for the benefit of any third party Use the Software in any way which breaches any applicable local, national or international law use the Software for any purpose that Kaas & Mulvad considers is a breach of this EULA agreement Intellectual Property and Ownership  Kaas & Mulvad shall at all times retain ownership of the Software as originally downloaded by you and all subsequent downloads of the Software by you. The Software (and the copyright, and other intellectual property rights of whatever nature in the Software, including any modifications made thereto) are and shall remain the property of Kaas & Mulvad.  Kaas & Mulvad reserves the right to grant licences to use the Software to third parties.  Termination  This EULA agreement is effective from the date you first use the Software and shall continue until terminated. You may terminate it at any time upon written notice to Kaas & Mulvad.  It will also terminate immediately if you fail to comply with any term of this EULA agreement. Upon such termination, the licenses granted by this EULA agreement will immediately terminate and you agree to stop all access and use of the Software. The provisions that by their nature continue and survive will survive any termination of this EULA agreement.  Governing Law  This EULA agreement, and any dispute arising out of or in connection with this EULA agreement, shall be governed by and construed in accordance with the laws of dk.


pkgId: 9d0871916068cd3844f462f2797bf215e5332fe5170adccba71841e8c263e1c2
name: python-seatools-starter-server-uvicorn-help
arch: noarch
version: 1.0.2
epoch: 0
release: 1
summary: Development documents and examples for seatools-starter-server-uvicorn
url: https://github.com/seatools-py/seatools-starter-server-uvicorn
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seatools-starter-server-uvicorn-1.0.2-1.src.rpm
location_href: Packages/python-seatools-starter-server-uvicorn-help-1.0.2-1.noarch.rpm
checksum_type: sha256
description:
  该框架在`uvicorn`层完成`seatools.ioc`的加载, 使用该项目后无需在每个进程额外执行`seatools.ioc.run`函数, 仅在启动时传递一个`ioc`启动的函数即可


  1. 安装, `poetry add seatools-starter-server-uvicorn`
  2. 这里以`fastapi`为例, 假设`xxx.boot`模块存在`start`的自定义启动`ioc`函数

  ```python
  from seatools.ioc import run


  def start():
      run(scan_package_names='xxx', config_dir='./config')

  ```
  命令行启动`uvicorn xxx.boot:start xxx.fastapi.app:app`, 其他参数与官方`uvicorn`一致, 在`uvicorn`基础上增加了一个`ioc_app`的参数, 需要指明`ioc`应用启动的函数
  若配置`application.yml`或`application-[*].yml`中存在`seatools.server.uvicorn.app`配置, 则可不传递`uvicorn`的`app`仅传递`ioc_app`即可, 示例`uvicorn xxx.boot:start`
  若同时使用了`seatools-starter-web-*`的`web`启动包, 则`uvicorn`的`app`直接可省略
  3. 程序直接调用

  ```python
  from xxx.boot import start
  from seatools.ioc.server import uvicorn


  def main():
      uvicorn.run(
          start,
          'xxx.fastapi.app:app' # 配置中seatools.server.uvicorn.app存在 或 安装了seatools-starter-web-fastapi 此处可不填
      )


  if __name__ == '__main__':
      main()

  ```
  4. 支持配置`config/application.yml`
  ```yaml
  seatools:
    server:
      uvicorn:
        
        app: xxx.fastapi.app:app
        host: 127.0.0.1
        port: 8000
        workers: 1
        

  ```


pkgId: df596962a31debd44f26ea5f480e4e84b9b00d2d95ac788366f5774f3953af3c
name: python-seatools-starter-web-fastapi-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for seatools-starter-web-fastapi
url: https://github.com/seatools-py/seatools-starter-web-fastapi
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seatools-starter-web-fastapi-1.0.1-1.src.rpm
location_href: Packages/python-seatools-starter-web-fastapi-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  该框架必须和`seatools-starter-server-*`的包集成配合使用, 这里以`seatools-starter-server-uvicorn`为例


  1. 安装, `poetry add fastapi seatools-starter-server-uvicorn seatools-starter-web-fastapi`
  2. 配置`config/application.yml`如下:
  ```yaml

  seatools:
    server:
      
      uvicorn:
        host: 0.0.0.0
        port: 8000
        workers: 1
        reload: true
    
    fastapi:
      title: xxxxx
      description: xxx
      docs_url: none
  ```
  3. 使用, 通过定义ioc容器函数加载
  ```python
  from seatools.ioc import Autowired, Bean
  from fastapi import FastAPI


  @Bean
  def xxx_middleware(app: FastAPI):
      from fastapi.middleware.cors import CORSMiddleware

      app.add_middleware(
      CORSMiddleware,
      allow_origins=["*"],
      allow_credentials=True,
      allow_methods=["*"],
      allow_headers=["*"],
  )


  @Bean
  def global_exception_handler(app: FastAPI):

      
      @app.exception_handler(AssertionError)
      async def assert_exception_handler(request, exc):
          ...


  @Bean
  def xxx_router(app: FastAPI):

      @app.get('/')
      async def hello():
          return "hello"


  from fastapi import APIRouter
  custom_router = APIRouter(prefix='/custom')

  @custom_router.get('/')
  async def custom_hello():
      return "custom hello"

  @Bean
  def register_custom_router(app: FastAPI):
      app.include_router(custom_router)



  @Bean
  class ServiceA:

      async def hello(self):
          return "serviceA"


  @Bean
  def a_router(app: FastAPI):

      @app.get('/serviceA')
      async def serviceA(serviceA = Autowired(cls=ServiceA)): # 在控制器参数中使用Autowired方式注入seatools.ioc, 注意此处不能主动声明类型, fastapi会对参数类型校验不支持的类型将失败
          return await serviceA.hello()



  @Bean
  def a2_router(app: FastAPI, serviceA: ServiceA): # 具体注入方式见seatools

      @app.get('/serviceA')
      async def serviceA():
          return await serviceA.hello()
  ```
  3. 运行, 具体见`seatools-starter-server-*`, [`seatools-starter-server-uvicorn`](https://gitee.com/seatools-py/seatools-starter-server-uvicorn)


pkgId: aa5e9c75a2b9c401a699d08722fe61be06081b12bb3e90eaae65eb249249b928
name: python-seatools-starter-web-flask-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for seatools-starter-web-flask
url: https://github.com/seatools-py/seatools-starter-web-flask
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seatools-starter-web-flask-1.0.0-1.src.rpm
location_href: Packages/python-seatools-starter-web-flask-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  该框架必须和`seatools-starter-server-*`的包集成配合使用, 这里以`seatools-starter-server-uvicorn`为例


  1. 安装, `poetry add flask seatools-starter-server-uvicorn seatools-starter-web-flask`
  2. 配置`config/application.yml`如下:
  ```yaml

  seatools:
    server:
      
      uvicorn:
        host: 0.0.0.0
        port: 8000
        workers: 1
        reload: true
    
    flask:
      
      import_name: seatools.ioc.server.app
      static_folder: static
      template_folder: templates
      ...
  ```
  3. 使用, 通过定义ioc容器函数加载

  ```python
  import abc
  from seatools.ioc import Autowired, Bean
  from flask import Flask


  from flask import Flask


  @Bean
  def api_controller(app: Flask):
      @app.get('/')
      def hello():
          return 'hello flask'


  class Service(abc.ABC):

      def hello(self):
          raise NotImplementedError



  @Bean
  class ServiceA(Service):

      def hello(self):
          return "serviceA"


  @Bean
  def a2_router(app: Flask, service: Service):  # 具体注入方式见seatools

      @app.get('/service')
      def service():
          return service.hello() # return hello flask
  ```
  3. 运行, 具体见`seatools-starter-server-*`, [`seatools-starter-server-uvicorn`](https://gitee.com/seatools-py/seatools-starter-server-uvicorn)


pkgId: 5855acbfe6d4d0ebd5e395b5290048d440c85c65f05f9fe413db4af47c1d2b6a
name: python-seavoice-sdk-test-help
arch: noarch
version: 2.4.0
epoch: 0
release: 1
summary: Development documents and examples for seavoice-sdk-test
url: https://pypi.org/project/seavoice-sdk-test/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seavoice-sdk-test-2.4.0-1.src.rpm
location_href: Packages/python-seavoice-sdk-test-help-2.4.0-1.noarch.rpm
checksum_type: sha256
description:
  Please contact info@seasalt.ai if you have any questions.




  You will need a SeaVoice speech service account to run this example. Please contact info@seasalt.ai and apply for it.


  To install SeaVoice SDK:

  ```pip install seavoice-sdk-test```

  To import SeaVoice SDK:

  ```import seavoice_sdk_beta as speechsdk```



  See [SeaVoice SDK Documentation](https://docs.seasalt.ai/speech/seavoice_sdk_python_tutorial.html)


pkgId: 7cf53c71fdb04545ee506a18d4acd56e5fce4e2a26958a70ba047c08f958c9f6
name: python-secret-duck-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for secret-duck
url: https://pypi.org/p/secret-duck
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-secret-duck-0.0.1-1.src.rpm
location_href: Packages/python-secret-duck-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  Convert a Keepass database into [DuckDB secrets](https://duckdb.org/docs/configuration/secrets_manager.html) that may
  be loaded into DuckDB using its secret manager feature.



  ```bash
  pip install secret-duck
  ```



  ```bash
  secret-duck --help
  ```

  To create AWS S3 secrets and save the results to an SQL file.

  ```bash
  secret-duck my_secrets.kdbx --type S3 --keys {\"region\": \"eu-west-2\", \"endpoint\": \"s3.amazonaws.com\"} > secrets.sql
  ```


pkgId: 171ec5a16287809fdb3d78387c17ccf1b37274d5e2f3a8e764f6248dfdd103ab
name: python-secret-santa-handler-help
arch: noarch
version: 0.0.2
epoch: 0
release: 1
summary: Development documents and examples for secret-santa-handler
url: https://pypi.org/project/secret-santa-handler/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-secret-santa-handler-0.0.2-1.src.rpm
location_href: Packages/python-secret-santa-handler-help-0.0.2-1.noarch.rpm
checksum_type: sha256
description:
  A simple Python package to randomly assign Secret Santa pairs from a list of participants.



  - Randomly shuffles a list of names to create Secret Santa pairs.
  - Ensures each participant is assigned to another, with the last person assigned to the first, forming a complete loop.



  You can install the package using pip:

  ```bash
  pip install secret-santa-handler


pkgId: 80fc0e1c1d2a060ab0422107c0cc18ce93088a3e710676ac0617805de8dd0642
name: python-secretnote-help
arch: noarch
version: 0.0.49
epoch: 0
release: 1
summary: Development documents and examples for secretnote
url: https://pypi.org/project/secretnote/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-secretnote-0.0.49-1.src.rpm
location_href: Packages/python-secretnote-help-0.0.49-1.noarch.rpm
checksum_type: sha256
description:
  This is the backend of the notebook suite named [SecretNote](https://github.com/secretflow/secretnote). It serves both Jupyter Server, SecretNote specified APIs and static files of the playground, for both SecretFlow in Python and the SCQL.



  We recommend you to install in a clean Python 3.10 environment. You can use your favorite virtual environment solution.



  ```sh
  conda create -n secretnote python=3.10 # use conda for example
  conda activate secretnote
  pip install secretnote
  ```



  ```sh
  pnpm bootstrap # pnpm and rye are required
  ```



  Start SecretNote SF for SecretFlow Python programming

  ```bash
  secretnote sf . --config=/somewhere/config.py
  ```

  Start SecretNote SCQL for SCQL programming

  ```sh
  secretnote scql . --config=/somewhere/config.py
  ```

  Common Jupyter Command Line Options are supported. For example, to change the port, use

  ```bash
  secretnote sf . --ServerApp.port 8889
  ```


pkgId: 00f1002c441f8977551833f0001a1a577c0302aa16c1fbd7f314f5d6dab8c8df
name: python-sectionproperties-help
arch: noarch
version: 3.7.3
epoch: 0
release: 1
summary: Development documents and examples for sectionproperties
url: https://sectionproperties.readthedocs.io
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sectionproperties-3.7.3-1.src.rpm
location_href: Packages/python-sectionproperties-help-3.7.3-1.noarch.rpm
checksum_type: sha256
description:
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/_static/logo-dark-mode.png">
    <source media="(prefers-color-scheme: light)" srcset="docs/_static/logo-light-mode.png">
    <img alt="sectionproperties logo" src="docs/_static/logo-light-mode.png">
  </picture>

  [![PyPI](https://img.shields.io/pypi/v/sectionproperties.svg)][pypi_]
  [![Status](https://img.shields.io/pypi/status/sectionproperties.svg)][status]
  [![Python Version](https://img.shields.io/pypi/pyversions/sectionproperties)][python version]
  [![License](https://img.shields.io/pypi/l/sectionproperties)][license]
  [![Read the documentation at https://sectionproperties.readthedocs.io/](https://img.shields.io/readthedocs/sectionproperties/stable.svg?label=Read%20the%20Docs)][read the docs]
  [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)][uv]
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)][ruff]
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
  [![Tests](https://github.com/robbievanleeuwen/section-properties/actions/workflows/ci.yml/badge.svg?branch=master)][tests]
  [![Codecov](https://codecov.io/gh/robbievanleeuwen/section-properties/branch/master/graph/badge.svg)][codecov]
  [![DOI](https://joss.theoj.org/papers/10.21105/joss.06105/status.svg)][joss]

  [pypi_]: https://pypi.org/project/sectionproperties/
  [status]: https://pypi.org/project/sectionproperties/
  [python version]: https://pypi.org/project/sectionproperties
  [read the docs]: https://sectionproperties.readthedocs.io/
  [uv]: https://github.com/astral-sh/uv
  [ruff]: https://github.com/astral-sh/ruff
  [pre-commit]: https://github.com/pre-commit/pre-commit
  [tests]: https://github.com/robbievanleeuwen/section-properties/actions/workflows/ci.yml
  [codecov]: https://app.codecov.io/gh/robbievanleeuwen/section-properties
  [joss]: https://doi.org/10.21105/joss.06105

  `sectionproperties` is a python package for the analysis of arbitrary cross-sections
  using the finite element method. `sectionproperties` can be used to determine
  section properties to be used in structural design and visualise cross-sectional
  stresses resulting from combinations of applied forces and bending moments.

  [Subscribe](http://eepurl.com/dMMUeg) to the `sectionproperties` mailing list!



  You can install `sectionproperties` via [pip] from [PyPI]:

  ```shell
  pip install sectionproperties
  ```



  `sectionproperties` is fully documented including a user walkthrough, examples,
  background theory and an API guide. The documentation can found at
  [https://sectionproperties.readthedocs.io/](https://sectionproperties.readthedocs.io/).



  See the complete list of `sectionproperties` features
  [here](https://sectionproperties.readthedocs.io/en/stable/user_guide.html).



  Contributions are very welcome. To learn more, see the [Contributor Guide].



  Distributed under the terms of the [MIT license][license], `sectionproperties` is free
  and open source software.



  Found a bug 🐛, or have a feature request ✨, raise an issue on the
  GitHub [issue tracker](https://github.com/robbievanleeuwen/section-properties/issues)
  Alternatively you can get support on the
  [discussions](https://github.com/robbievanleeuwen/section-properties/discussions) page.



  `sectionproperties` is an open source engineering tool that continues to benefit from
  the collaboration of many contributors. Although efforts have been made to ensure the
  that relevant engineering theories have been correctly implemented, it remains the
  user's responsibility to confirm and accept the output. Refer to the
  [license](LICENSE.md) for clarification of the conditions of use.

  [pypi]: https://pypi.org/
  [pip]: https://pip.pypa.io/
  [license]: https://github.com/robbievanleeuwen/section-properties/blob/master/LICENSE
  [contributor guide]: https://github.com/robbievanleeuwen/section-properties/blob/master/CONTRIBUTING.md

rpm_license:
  MIT License  Copyright © 2024 Robbie van Leeuwen  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: 14ee90bf6661d2044cd8ae5bbd2c6909894e6776ed67ffdeab7981ca577d71c3
name: python-securelock-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for securelock
url: https://github.com/umittadelen/securelock
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-securelock-1.0.1-1.src.rpm
location_href: Packages/python-securelock-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  SecureLock is a lightweight Python library for securely encrypting and decrypting text using a password. It utilizes salted key derivation and XOR-based encryption to ensure the integrity and security of your data.


  - Compact design: Only two functions, `lock()` and `unlock()`.
  - Salted encryption: Each encryption is unique due to a randomly generated salt.
  - Key stretching: Uses SHA-256 hashing to derive a secure encryption key from the password.
  - Supports all Unicode characters.


  ```bash
  pip install securelock
  ```



  ```python
  from securelock import lock

  password = "strongpassword"
  text = "This is a secret message!"


  locked_text = lock(text, password)
  print("Locked Text:", locked_text)
  ```


  ```python
  from securelock import unlock


  unlocked_text = unlock(locked_text, password)
  print("Unlocked Text:", unlocked_text)
  ```


  ```plaintext
  Locked Text: 4a6f1c2b... (encrypted hex string)
  Unlocked Text: This is a secret message!
  ```


  - **Strong Passwords**: Always use strong and unpredictable passwords for maximum security.
  - **Key Derivation**: SecureLock uses SHA-256 with a randomly generated 32-byte salt, ensuring each encryption is unique.
  - **Brute-Force Resistance**: The implementation is designed to make brute-forcing computationally expensive.


  This project is licensed under the MIT License. See [LICENSE](./package/LICENSE.txt) for details.


  Feel free to submit issues or feature requests. Contributions are welcome!

rpm_license:
  MIT License  Copyright (c) 2024 umittadelen  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: df4f9e1a8f5c95793709dacc1a401928b2480c78e5bccc79be012c6f42c9d484
name: python-sed-processor-help
arch: noarch
version: 0.3.2
epoch: 0
release: 1
summary: Development documents and examples for sed-processor
url: https://github.com/OpenCOMPES/sed
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sed-processor-0.3.2-1.src.rpm
location_href: Packages/python-sed-processor-help-0.3.2-1.noarch.rpm
checksum_type: sha256
description:
  [![Documentation Status](https://github.com/OpenCOMPES/sed/actions/workflows/documentation.yml/badge.svg)]([https://opencompes.github.io/sed/](https://opencompes.github.io/docs/sed/latest/))
  [![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)
  ![](https://github.com/OpenCOMPES/sed/actions/workflows/linting.yml/badge.svg?branch=main)
  ![](https://github.com/OpenCOMPES/sed/actions/workflows/testing_multiversion.yml/badge.svg?branch=main)
  ![](https://img.shields.io/pypi/pyversions/sed-processor)
  ![](https://img.shields.io/pypi/l/sed-processor)
  [![](https://img.shields.io/pypi/v/sed-processor)](https://pypi.org/project/sed-processor)
  [![Coverage Status](https://coveralls.io/repos/github/OpenCOMPES/sed/badge.svg?branch=main&kill_cache=1)](https://coveralls.io/github/OpenCOMPES/sed?branch=main)

  **sed-processor** is a backend to process and bin multidimensional single-event datastreams, with the intended primary use case in multidimensional photoelectron spectroscopy using time-of-flight instruments.

  It builds on [Dask](https://www.dask.org/) dataframes, where each column represents a multidimensional "coordinate" such as position, time-of-flight, pump-probe delay etc., and each entry represents one electron. The `SedProcessor` class provides a single user entry point, and provides functions for handling various workflows for coordinate transformation, e.g. corrections and calibrations.

  Furthermore, "sed-processor" provides fast and parallelized binning routines to compute multidimensional histograms from the processed dataframes in a delayed fashion, thus reducing requirements on cpu power and memory consumption.

  Finally, in contains several export routines, including export into the [NeXus](https://www.nexusformat.org/) format with rich and standardized metadata annotation.




  - Python 3.8+
  - pip


  - Create a new virtual environment using either venv, pyenv, conda, etc. See below for an example.

  ```bash
  python -m venv .sed-venv
  ```

  - Activate your environment:

  ```bash

  source .sed-venv/bin/activate


  .sed-venv\Scripts\activate
  ```

  - Install `sed`, distributed as `sed-processor` on PyPI:

  ```bash
  pip install sed-processor[all]
  ```

  - If you intend to work with Jupyter notebooks, it is helpful to install a Jupyter kernel for your environment. This can be done, once your environment is activated, by typing:

  ```bash
  python -m ipykernel install --user --name=sed_kernel
  ```

  - If you do not use Jupyter Notebook or Jupyter Lab, you can skip the installing those dependencies

  ```bash
  pip install sed-processor
  ```


  Comprehensive documentation including several workflow examples can be found here:
  https://opencompes.github.io/docs/sed/latest/



  Users are welcome to contribute to the development of **sed-processor**. Information how to contribute, including how to install developer versions can be found in the [documentation](https://opencompes.github.io/docs/sed/latest/misc/contribution.html)

  We would like to thank our contributors!

  [![Contributors](https://contrib.rocks/image?repo=OpenCOMPES/sed)](https://github.com/OpenCOMPES/sed/graphs/contributors)




  sed-processor is licenced under the MIT license

  Copyright (c) 2022-2024 OpenCOMPES

  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: c530ac90d11f6565fb03fd1bfefcc11018e6e4b61a214e9e6e6d5649beb23c6f
name: python-seeq-help
arch: noarch
version: 66.2.0.20241213
epoch: 0
release: 1
summary: Development documents and examples for seeq
url: https://www.seeq.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seeq-66.2.0.20241213-1.src.rpm
location_href: Packages/python-seeq-help-66.2.0.20241213-1.noarch.rpm
checksum_type: sha256
description:
  In case you are looking for the Gencove package, it is available here: https://pypi.org/project/gencove/


pkgId: cb0de087d755787524cafc9d149292ffcda5c469954fa93587d664e2000eccc1
name: python-seeq-spy-help
arch: noarch
version: 193.17
epoch: 0
release: 1
summary: Development documents and examples for seeq-spy
url: https://www.seeq.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seeq-spy-193.17-1.src.rpm
location_href: Packages/python-seeq-spy-help-193.17-1.noarch.rpm
checksum_type: sha256
description:
  The **seeq-spy** Python module is the recommended programming interface for interacting with the Seeq Server.

  Use of this module requires a
  [Seeq Data Lab license](https://support.seeq.com/space/KB/113723667/Requesting+and+Installing+a+License+File).

  Documentation can be found at
  [https://python-docs.seeq.com](https://python-docs.seeq.com/).

  The Seeq **SPy** module is a friendly set of functions that are optimized for use with
  [Jupyter](https://jupyter.org), [Pandas](https://pandas.pydata.org/) and [NumPy](https://www.numpy.org/).

  The SPy module is the best choice if you're trying to do any of the following:

  - Search for signals, conditions, scalars, assets
  - Pull data out of Seeq
  - Import data in a programmatic way (when Seeq Workbench's *CSV Import* capability won't cut it)
  - Calculate new data in Python and push it into Seeq
  - Create an asset model
  - Programmatically create and manipulate Workbench Analyses or Organizer Topics

  **Use of the SPy module requires Python 3.7 or later.**

  **SPy version 187 and higher is compatible with Pandas 2.x.**

  To start exploring the SPy module, execute the following lines of code in Jupyter:

  ```
  from seeq import spy
  spy.docs.copy()
  ```

  Your Jupyter folder will now contain a `SPy Documentation` folder that has a *Tutorial* and *Command Reference*
  notebook that will walk you through common activities.

  For more advanced tasks, you may need to use the `seeq.sdk` module directly as described at
  [https://pypi.org/project/seeq](https://pypi.org/project/seeq).



  The `seeq-spy` module can/should be upgraded separately from the main `seeq` module by doing `pip install -U
  seeq-spy`. It is written to be compatible with Seeq Server version R60 and later.



  In **SPy v183** and later, the DataFrame metadata that is described in the *Properties stored in the output DataFrame*
  section of the **spy.search.ipynb** documentation notebook has been moved into a top-level `spy` namespace on the
  DataFrame (as opposed to each variable being at the top level). For example, in order to access the function name that
  was used to produce the DataFrame, you would use `search_df.spy.func` instead of just `search_df.func`. This change was
  made to avoid collisions with native DataFrame properties and functions.



  In **SPy v183** and later, `spy.assets.build()` conducts the build process in two passes instead of one. This generally
  has no repercussions for your Asset- or Mixin-derived classes, but you will notice that
  `@Asset.Component`-decorated functions are called twice per asset. In the first pass, the framework is expecting the
  component asset classes to be instantiated, and in the second pass it is expecting all attributes to be evaluated and
  built. This new behavior generally does not require you to make any changes to your classes, with one exception: If you
  were using `@Asset.Component` as a means by which you could generate multiple signals/conditions/scalars/metrics from a
  single function, you should instead use `@Asset.Attribute` to achieve that.



  In **Seeq Server R22.0.49.00**, the ability to schedule the update of an Organizer Topic was added. As a result, much of
  the internals of how Organizer Topic embedded content and date ranges are represented changed.

  If you have used `spy.workbooks.save()` in R22.0.48.XX and earlier to save a set of Organizer Topic workbooks to disk,
  you will not be able to use those files in R22.0.49.00 and later.

  Live Docs must now be specified by a `schedule` on the `TopicDocument` object. The `@Asset.DateRange`
  decorator no longer honors the `Auto Refresh Rate` property. To specify a Live Doc, you must specify a
  `schedule` dict for a TopicDocument by setting `document.schedule['Background'] = False` and then specifying a Cron
  expression like `schedule['Cron Schedule'] = ['*/30 * * * * *']` (every thirty seconds). Alternatively, you can specify
  a Scheduled Doc by setting `document.schedule['Background'] = True`.


pkgId: 8178cfb11ec81498117ed5e40bbaedf3994a157e83215857c3c87334be07a693
name: python-sefef-help
arch: noarch
version: 1.2.3
epoch: 0
release: 1
summary: Development documents and examples for sefef
url: https://pypi.org/project/sefef/
rpm_license: BSD 3-clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sefef-1.2.3-1.src.rpm
location_href: Packages/python-sefef-help-1.2.3-1.noarch.rpm
checksum_type: sha256
description:
  |
  ``SeFEF`` is a Seizure Forecast Evaluation Framework written in Python.
  The framework standardizes the development, evaluation, and reporting of individualized algorithms for seizure likelihood forecast.
  ``SeFEF`` aims to decrease development time and minimize implementation errors by automating key procedures within data preparation, training/testing, and computation of evaluation metrics.


pkgId: 7b0993b2a8eed3a2fc52be37c8dcb568d13cf548fb916b1e1ed470fc5bfb3ebf
name: python-segmentation-skeleton-metrics-help
arch: noarch
version: 4.9.27
epoch: 0
release: 1
summary: Development documents and examples for segmentation-skeleton-metrics
url: https://pypi.org/project/segmentation-skeleton-metrics/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-segmentation-skeleton-metrics-4.9.27-1.src.rpm
location_href: Packages/python-segmentation-skeleton-metrics-help-4.9.27-1.noarch.rpm
checksum_type: sha256
description:
  [![License](https://img.shields.io/badge/license-MIT-brightgreen)](LICENSE)
  ![Code Style](https://img.shields.io/badge/code%20style-black-black)

  [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)

  Python package for assessing the accuracy of a predicted neuron segmentation by comparing it to a set of ground truth skeletons. This tool detects topological mistakes (i.e. splits and merges) in a predicted segmentation and then computes several skeleton-based metrics that quantify its topological accuracy.



  We begin with a set of ground truth skeletons stored as individual SWC files, where the "xyz" coordinates correspond to voxels in an image. Each ground truth skeleton is loaded and represented as a NetworkX graph with the voxel coordinates as a node-level attribute. The evaluation is performed by first labeling the nodes of each graph with the corresponding segment IDs from the predicted segmentation. Topological mistakes are then detected by examining the labels of each edge, see figure below for an overview of how splits and merges are detected.

  <p>
    <img src="imgs/topological_mistakes.png" width="180" alt="Topological mistakes detected in skeleton">
    <br>
    <b> Figure: </b>Edges in skeletons are either correctly or incorrectly reconstructed based on the presence of mergers or splits that affect nodes attached to an edge. Colors correspond to segment IDs. From top to bottom: correct edge (both nodes have the same ID), split edge (nodes assigned to different segments), omitted edge (one or two nodes do not have an associated ID), merged edge (node assigned to a segment that covers more than one skeleton).
  </p>

  Metrics computed for each ground truth skeleton:

  - Number of Splits: Number of segments that a ground truth skeleton is broken into.
  - Number of Merges: Number of segments that are incorrectly merged into a single segment.
  - Percentage of Omit Edges: Proportion of edges in the ground truth that are omitted in the predicted segmentation.
  - Percentage of Merged Edges: Proportion of edges that are merged in the predicted segmentation.
  - Edge Accuracy: Proportion of edges that are correctly reconstructed in the predicted segmentation.
  - Expected Run Length (ERL): Expected length of segments or edges in the predicted segmentation.



  Here is a simple example of evaluating a predicted segmentation.

  ```python
  from tifffile import imread
  from xlwt import Workbook

  import numpy as np

  from segmentation_skeleton_metrics.skeleton_metric import SkeletonMetric


  def evaluate():
      
      pred_labels = imread(pred_labels_path)
      skeleton_metric = SkeletonMetric(
          target_swcs_pointer,
          pred_labels,
          fragments_pointer=pred_swcs_pointer,
          output_dir=output_dir,
      )
      full_results, avg_results = skeleton_metric.run()

      
      print(f"Averaged Results...")
      for stat_name in avg_results.keys():
          print(f"   {stat_name}: {round(avg_results[stat_name], 4)}")

      print(f"\nTotal Results...")
      print("# splits:", np.sum(list(skeleton_metric.split_cnt.values())))
      print("# merges:", np.sum(list(skeleton_metric.merge_cnt.values())))


  if __name__ == "__main__":
      
      output_dir = "./"
      pred_labels_path = "./pred_labels.tif"
      pred_swcs_pointer = "./pred_swcs.zip"
      target_swcs_pointer = "./target_swcs.zip"

      
      evaluate()


  ```

  <p>
    <img src="imgs/printouts.png" width=750">
  </p>

  Note: this Python package can also be used to evaluate the accuracy of a segmentation in which split mistakes have been corrected.


  To use the software, in the root directory, run
  ```bash
  pip install -e .
  ```

  To develop the code, run
  ```bash
  pip install -e .[dev]
  ```

  To install this package from PyPI, run
  ```bash
  pip install aind-segmentation-evaluation
  ```


pkgId: f7159dda6d7a02f926b63d93c72e93767fe1b56c8ec11ce7b426a96150b3c41b
name: python-segnivo-python-sdk-help
arch: noarch
version: 1.7.1
epoch: 0
release: 1
summary: Development documents and examples for segnivo-python-sdk
url: https://pypi.org/project/segnivo-python-sdk/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-segnivo-python-sdk-1.7.1-1.src.rpm
location_href: Packages/python-segnivo-python-sdk-help-1.7.1-1.noarch.rpm
checksum_type: sha256
description:
  As noted earlier, this API uses API keys for authentication. You can generate a Segnivo API key in the [API](https://messaging.segnivo.com/account/api) section of your account settings.
  You must include an API key in each request to this API with the `X-API-KEY` request header.

  If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.

  API access rate limits apply on a per-API endpoint basis in unit time. The limit is 10k requests per hour for most endpoints and 1m requests per hour for transactional/relay email-sending endpoints. Also, depending on your plan, you may have usage limits. If you exceed either limit, your request will return an HTTP 429 Too Many Requests status code or HTTP 403 if sending credits have been exhausted.

  An HTTP `503` response from our servers may indicate there is an unexpected spike in API access traffic, while this rarely happens, we ensure the server is usually operational within the next two to five minutes. If the outage persists or you receive any other form of an HTTP `5XX` error, contact support ([<i>developers@segnivo.com</i>](https://mailto:developers@segnivo.com)).

  To make a successful request, some or all of the following headers must be passed with the request.
  | **Header** | **Description** |
  | --- | --- |
  | Content-Type | Required and should be `application/json` in most cases. |
  | Accept | Required and should be `application/json` in most cases |
  | Content-Length | Required for `POST`, `PATCH`, and `PUT` requests containing a request body. The value must be the number of bytes rather than the number of characters in the request body. |
  | X-API-KEY | Required. Specifies the API key used for authorization. |

  If/when you use the code snippets used as example requests, remember to calculate and add the `Content-Length` header. Some request libraries, frameworks, and tools automatically add this header for you while a few do not. Kindly check and ensure yours does or add it yourself.
  [![PyPI](https://img.shields.io/badge/PyPI-v1.7.1-blue)](https://pypi.org/project/segnivo-python-sdk/1.7.1)
  [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/munchads/segnivo-sdk/tree/main/python#readme)

  <!-- toc -->
  - [Requirements](#requirements)
  - [Installation](#installation)
  - [Getting Started](#getting-started)
  - [Async](#async)
  - [Raw HTTP Response](#raw-http-response)
  - [Reference](#reference)
    * [`segnivo.email_address_verification.email_post`](#segnivoemail_address_verificationemail_post)
    * [`segnivo.email_campaigns.messages_get`](#segnivoemail_campaignsmessages_get)
    * [`segnivo.email_campaigns.messages_post`](#segnivoemail_campaignsmessages_post)
    * [`segnivo.email_campaigns.messages_uid_delete_post`](#segnivoemail_campaignsmessages_uid_delete_post)
    * [`segnivo.email_campaigns.messages_uid_get`](#segnivoemail_campaignsmessages_uid_get)
    * [`segnivo.email_campaigns.messages_uid_patch`](#segnivoemail_campaignsmessages_uid_patch)
    * [`segnivo.email_campaigns.messages_uid_pause_post`](#segnivoemail_campaignsmessages_uid_pause_post)
    * [`segnivo.email_campaigns.messages_uid_resume_post`](#segnivoemail_campaignsmessages_uid_resume_post)
    * [`segnivo.mailing_lists.lists_get`](#segnivomailing_listslists_get)
    * [`segnivo.mailing_lists.lists_post`](#segnivomailing_listslists_post)
    * [`segnivo.mailing_lists.lists_uid_add_field_post`](#segnivomailing_listslists_uid_add_field_post)
    * [`segnivo.mailing_lists.lists_uid_delete_post`](#segnivomailing_listslists_uid_delete_post)
    * [`segnivo.mailing_lists.lists_uid_get`](#segnivomailing_listslists_uid_get)
    * [`segnivo.mailing_lists.lists_uid_patch`](#segnivomailing_listslists_uid_patch)
    * [`segnivo.relay.relay_emails_id_get`](#segnivorelayrelay_emails_id_get)
    * [`segnivo.relay.relay_raw_post`](#segnivorelayrelay_raw_post)
    * [`segnivo.relay_transactional_emails.relay_send_post`](#segnivorelay_transactional_emailsrelay_send_post)
    * [`segnivo.subscribers_contacts.contacts_get`](#segnivosubscribers_contactscontacts_get)
    * [`segnivo.subscribers_contacts.contacts_post`](#segnivosubscribers_contactscontacts_post)
    * [`segnivo.subscribers_contacts.contacts_uid_add_tag_post`](#segnivosubscribers_contactscontacts_uid_add_tag_post)
    * [`segnivo.subscribers_contacts.contacts_uid_delete_post`](#segnivosubscribers_contactscontacts_uid_delete_post)
    * [`segnivo.subscribers_contacts.contacts_uid_get`](#segnivosubscribers_contactscontacts_uid_get)
    * [`segnivo.subscribers_contacts.contacts_uid_patch`](#segnivosubscribers_contactscontacts_uid_patch)
    * [`segnivo.subscribers_contacts.contacts_uid_subscribe_patch`](#segnivosubscribers_contactscontacts_uid_subscribe_patch)
    * [`segnivo.subscribers_contacts.contacts_uid_unsubscribe_patch`](#segnivosubscribers_contactscontacts_uid_unsubscribe_patch)
  <!-- tocstop -->

  Python >=3.7

  ```sh
  pip install segnivo-python-sdk==1.7.1
  ```

  ```python
  from pprint import pprint
  from segnivo import Segnivo, ApiException
  segnivo = Segnivo(
      api_key_auth="YOUR_API_KEY",
  )
  try:
      
      email_post_response = segnivo.email_address_verification.email_post()
  except ApiException as e:
      print("Exception when calling EmailAddressVerificationApi.email_post: %s\n" % e)
      pprint(e.body)
      pprint(e.headers)
      pprint(e.status)
      pprint(e.reason)
      pprint(e.round_trip_time)
  ```

  `async` support is available by prepending `a` to any method.
  ```python
  import asyncio
  from pprint import pprint
  from segnivo import Segnivo, ApiException
  segnivo = Segnivo(
      api_key_auth="YOUR_API_KEY",
  )
  async def main():
      try:
          
          email_post_response = await segnivo.email_address_verification.aemail_post()
      except ApiException as e:
          print("Exception when calling EmailAddressVerificationApi.email_post: %s\n" % e)
          pprint(e.body)
          pprint(e.headers)
          pprint(e.status)
          pprint(e.reason)
          pprint(e.round_trip_time)
  asyncio.run(main())
  ```

  To access raw HTTP response values, use the `.raw` namespace.
  ```python
  from pprint import pprint
  from segnivo import Segnivo, ApiException
  segnivo = Segnivo(
      api_key_auth="YOUR_API_KEY",
  )
  try:
      
      email_post_response = segnivo.email_address_verification.raw.email_post()
      pprint(email_post_response.headers)
      pprint(email_post_response.status)
      pprint(email_post_response.round_trip_time)
  except ApiException as e:
      print("Exception when calling EmailAddressVerificationApi.email_post: %s\n" % e)
      pprint(e.body)
      pprint(e.headers)
      pprint(e.status)
      pprint(e.reason)
      pprint(e.round_trip_time)
  ```


  The `/validate-email` endpoint allows you to pass the email addresses you wish to verify and get a response on each of their status.
  The following data should be passed in JSON format in the request body
  - **emails** - An array/collection containing a minimum of one and maximum of fifty email addresses for verification/validation.

  ```python
  email_post_response = segnivo.email_address_verification.email_post()
  ```

  `Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]`

  `/validate-email` `post`


pkgId: 0cfc8e2c3c7e9955a2b427c4b42d6a06c9cde3a4edb4ae2a4ed6f29088b18eac
name: python-seldon-deploy-sdk-help
arch: noarch
version: 2.4.0
epoch: 0
release: 1
summary: Development documents and examples for seldon-deploy-sdk
url: https://docs.seldon.ai/seldon-enterprise-platform
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seldon-deploy-sdk-2.4.0-1.src.rpm
location_href: Packages/python-seldon-deploy-sdk-help-2.4.0-1.noarch.rpm
checksum_type: sha256
description:
      API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy.  # noqa: E501


pkgId: 4c3f6c51ea5e122de554fb732fe9abfe26e4547ccd8793b4de0aafa98d08a9bf
name: python-selenium-toolkit-help
arch: noarch
version: 0.0.8
epoch: 0
release: 1
summary: Development documents and examples for selenium-toolkit
url: https://github.com/jorgepvasconcelos/webdriver-toolkit
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-selenium-toolkit-0.0.8-1.src.rpm
location_href: Packages/python-selenium-toolkit-help-0.0.8-1.noarch.rpm
checksum_type: sha256
description:
  This library provides an easier way to use and interact with selenium driver.

  Features that currently selenium-toolkit can offer:

  - ✅️ **More legible selenium code**
  - ✅️ **Abstractions of selenium methods**
  - ✅️ **Helpful tools to use when interacting with browsers**




  ```
  pip install selenium-toolkit
  ```


  ```python
  from selenium.webdriver import Chrome
  from selenium_toolkit import SeleniumToolKit


  driver = Chrome()


  selenium_kit = SeleniumToolKit(driver=driver)


  web_element = selenium_kit.query_selector('.class1')


  web_element.click()
  ```


pkgId: 1f40fdd67053274234696f319b1bf14af3b514fa990963356c449c01af652d14
name: python-sema4ai-data-help
arch: noarch
version: 0.0.4
epoch: 0
release: 1
summary: Development documents and examples for sema4ai-data
url: https://github.com/Sema4AI/data/
rpm_license: Sema4.ai Proprietary (see LICENSE)
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sema4ai-data-0.0.4-1.src.rpm
location_href: Packages/python-sema4ai-data-help-0.0.4-1.noarch.rpm
checksum_type: sha256
description:
  Python library to develop data packages for Sema4.ai.

  Note: This library is currently under heavy development and APIs are expected to be broken (until a 1.0.0 release).

  License: See [LICENSE](Sema4.ai End User License Agreement)


pkgId: f559c5c43906e30d854b97352a31cb60cc9337ecf13ae56bda1e686e9a7350a5
name: python-semantic-chunking-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for semantic-chunking
url: https://github.com/thanhhung2112/semantic_chunking
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-semantic-chunking-0.1.1-1.src.rpm
location_href: Packages/python-semantic-chunking-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  Semantic Chunking is a Python library for segmenting text into meaningful chunks using embeddings from Sentence Transformers.



  - Splits text into semantic chunks using cosine similarity
  - Configurable chunk size and similarity thresholds
  - Based on `sentence-transformers`



  ```bash
  pip install semantic-chunking
  ```



  ```python

  from semantic_chunking import SemanticChunker

  def test_semantic_chunker():
      text = """Machine learning is a subset of artificial intelligence that focuses on the use of data and algorithms to imitate the way that humans learn.
      Deep learning is a more specialized version of machine learning that uses neural networks with multiple layers.
      These advanced algorithms can process complex patterns and make intelligent decisions with minimal human intervention.
      The applications of machine learning are vast, ranging from image recognition to natural language processing."""

      chunker = SemanticChunker(model_name='all-MiniLM-L6-v2', max_chunk_size=128, similarity_threshold=0.3)
      chunks = chunker.semantic_chunk(text)

      print("Semantic Chunks:")
      for i, chunk in enumerate(chunks, 1):
          print(f"Chunk {i}: {chunk}")
          print(f"Words: {len(chunk.split())}\n")


  test_semantic_chunker()
  ```


pkgId: d9af82b3ee92d6c3cf235e02584c2108ef32edebc2c5fc83b2251262a617e367
name: python-semantic-kernel-help
arch: noarch
version: 1.17.1
epoch: 0
release: 1
summary: Development documents and examples for semantic-kernel
url: https://pypi.org/project/semantic-kernel/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-semantic-kernel-1.17.1-1.src.rpm
location_href: Packages/python-semantic-kernel-help-1.17.1-1.noarch.rpm
checksum_type: sha256
description:
  **Semantic Kernel (SK)** is a lightweight SDK enabling integration of AI Large
  Language Models (LLMs) with conventional programming languages. The SK
  extensible programming model combines natural language **semantic functions**,
  traditional code **native functions**, and **embeddings-based memory** unlocking
  new potential and adding value to applications with AI.

  Semantic Kernel incorporates cutting-edge design patterns from the latest in AI
  research. This enables developers to augment their applications with advanced
  capabilities, such as prompt engineering, prompt chaining, retrieval-augmented
  generation, contextual and long-term vectorized memory, embeddings,
  summarization, zero or few-shot learning, semantic indexing, recursive
  reasoning, intelligent planning, and access to external knowledge stores and
  proprietary data.



  - Learn more at the [documentation site](https://aka.ms/SK-Docs).
  - Join the [Discord community](https://aka.ms/SKDiscord).
  - Follow the team on [Semantic Kernel blog](https://aka.ms/sk/blog).
  - Check out the [GitHub repository](https://github.com/microsoft/semantic-kernel) for the latest updates.


pkgId: 675717af7c0702ff1720cadac74d042d2684eef5372bae159843fbdeef389ad9
name: python-semantic-router-help
arch: noarch
version: 0.0.72
epoch: 0
release: 1
summary: Development documents and examples for semantic-router
url: https://pypi.org/project/semantic-router/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-semantic-router-0.0.72-1.src.rpm
location_href: Packages/python-semantic-router-help-0.0.72-1.noarch.rpm
checksum_type: sha256
description:
  To get started with _semantic-router_ we install it like so:
  ```
  pip install -qU semantic-router
  ```
  ❗️ _If wanting to use a fully local version of semantic router you can use `HuggingFaceEncoder` and `LlamaCppLLM` (`pip install -qU "semantic-router[local]"`, see [here](https://github.com/aurelio-labs/semantic-router/blob/main/docs/05-local-execution.ipynb)). To use the `HybridRouteLayer` you must `pip install -qU "semantic-router[hybrid]"`._
  We begin by defining a set of `Route` objects. These are the decision paths that the semantic router can decide to use, let's try two simple routes for now — one for talk on _politics_ and another for _chitchat_:
  ```python
  from semantic_router import Route

  politics = Route(
      name="politics",
      utterances=[
          "isn't politics the best thing ever",
          "why don't you tell me about your political opinions",
          "don't you just love the president",
          "they're going to destroy this country!",
          "they will save the country!",
      ],
  )


  chitchat = Route(
      name="chitchat",
      utterances=[
          "how's the weather today?",
          "how are things going?",
          "lovely weather today",
          "the weather is horrendous",
          "let's go to the chippy",
      ],
  )

  routes = [politics, chitchat]
  ```
  We have our routes ready, now we initialize an embedding / encoder model. We currently support a `CohereEncoder` and `OpenAIEncoder` — more encoders will be added soon. To initialize them we do:
  ```python
  import os
  from semantic_router.encoders import CohereEncoder, OpenAIEncoder

  os.environ["COHERE_API_KEY"] = "<YOUR_API_KEY>"
  encoder = CohereEncoder()

  os.environ["OPENAI_API_KEY"] = "<YOUR_API_KEY>"
  encoder = OpenAIEncoder()
  ```
  With our `routes` and `encoder` defined we now create a `RouteLayer`. The route layer handles our semantic decision making.
  ```python
  from semantic_router.layer import RouteLayer
  rl = RouteLayer(encoder=encoder, routes=routes)
  ```
  We can now use our route layer to make super fast decisions based on user queries. Let's try with two queries that should trigger our route decisions:
  ```python
  rl("don't you love politics?").name
  ```
  ```
  [Out]: 'politics'
  ```
  Correct decision, let's try another:
  ```python
  rl("how's the weather today?").name
  ```
  ```
  [Out]: 'chitchat'
  ```
  We get both decisions correct! Now lets try sending an unrelated query:
  ```python
  rl("I'm interested in learning about llama 2").name
  ```
  ```
  [Out]:
  ```
  In this case, no decision could be made as we had no matches — so our route layer returned `None`!

  The _encoders_ of semantic router include easy-to-use integrations with [Cohere](https://github.com/aurelio-labs/semantic-router/blob/main/semantic_router/encoders/cohere.py), [OpenAI](https://github.com/aurelio-labs/semantic-router/blob/main/docs/encoders/openai-embed-3.ipynb), [Hugging Face](https://github.com/aurelio-labs/semantic-router/blob/main/docs/encoders/huggingface.ipynb), [FastEmbed](https://github.com/aurelio-labs/semantic-router/blob/main/docs/encoders/fastembed.ipynb), and [more](https://github.com/aurelio-labs/semantic-router/tree/main/semantic_router/encoders) — we even support [multi-modality](https://github.com/aurelio-labs/semantic-router/blob/main/docs/07-multi-modal.ipynb)!.


pkgId: 7115b09b493499cc70773f191f5e87b9f3f10143914941eafcc0cbffa9e16216
name: python-semanticlayertools-help
arch: noarch
version: 1.1.0
epoch: 0
release: 1
summary: Development documents and examples for semanticlayertools
url: https://gitlab.gwdg.de/modelsen/semanticlayertools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-semanticlayertools-1.1.0-1.src.rpm
location_href: Packages/python-semanticlayertools-help-1.1.0-1.noarch.rpm
checksum_type: sha256
description:
  ![PyPI](https://img.shields.io/pypi/v/semanticlayertools?label=pypi%20package) [![DH community code review: May 2022](https://img.shields.io/badge/DHCodeReview-May_2022-blue)](https://github.com/DHCodeReview/SemanticLayerTools/pull/1) [![Documentation Status](https://readthedocs.org/projects/semanticlayertools/badge/?version=latest)](https://semanticlayertools.readthedocs.io/en/latest/?badge=latest)

  Collects tools to create semantic layers in the socio-epistemic networks framework. Source material can be any structured corpus with metadata of authors, time, and at least one text column.

  Documentation is available on [ReadTheDocs](https://semanticlayertools.readthedocs.io/).

  Part of the code was reviewed by [Itay Zandbank](https://github.com/zmbq), thank you.



  tl;dr Use pip

  ~~~bash
  pip install semanticlayertools
  ~~~

  Consider using a clean virtual environment to keep your main packages separated.
  Create a new virtual environment and install the package

  ~~~bash
  python3 -m venv env
  source env/bin/activate
  pip install semanticlayertools
  ~~~

  To use some sentence embedding utility functions please install with the
  `ml` option

  ~~~bash
  pip install semanticlayertools[ml]
  ~~~




  Tests can be run by installing the _dev_ requirements and running `tox`.

  ~~~bash
  pip install semanticlayertools[dev]
  tox
  ~~~



  The documentation is build using _sphinx_. Install with the _dev_ option and run

  ~~~bash
  pip install semanticlayertools[dev]
  tox -e docs
  ~~~



  The development was part of the research project [ModelSEN](https://modelsen.gea.mpg.de)

  > Socio-epistemic networks: Modelling Historical Knowledge Processes,

  in Department I of the Max Planck Institute for the History of Science
  and funded by the Federal Ministry of Education and Research, Germany (Grant No. 01 UG2131). The work is continued at the Max Planck Institute of Geoanthropology, Jena.


pkgId: e6e71a8bc90720373b1b0bcf29f472cca986cd6f203a6497ea8081f6dee8701d
name: python-semantikon-help
arch: noarch
version: 0.0.4
epoch: 0
release: 1
summary: Development documents and examples for semantikon
url: https://pyiron.org/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-semantikon-0.0.4-1.src.rpm
location_href: Packages/python-semantikon-help-0.0.4-1.noarch.rpm
checksum_type: sha256
description:
  In the realm of the workflow management systems, there are well defined inputs and outputs for each node. `semantikon` is a Python package to give scientific context to node inputs and outputs by providing type hinting and interpreters. Therefore, it consists of two **fully** separate parts: type hinting and interpreters.



  `semantikon` provides a way to define types for any number of input parameters and any number of output values for function via type hinting, in particular: data type, unit and ontological type. Type hinting is done with the function `u`, which **requires** the type, and **optionally** you can define the units and the ontological type. The type hinting is done in the following way:

  ```python
  from semantikon.typing import u

  def my_function(
      a: u(int, units="meter"),
      b: u(int, units="second")
  ) -> u(int, units="meter/second", label="speed"):
      return a / b
  ```

  `semantikon`'s type hinting does not require to follow any particular standard. It only needs to be compatible with the interpreter applied.

  There are two possible ways to store the data for `semantikon`. The standard way is to do it by converting all arguments except for the data type as a string, which is the default behaviour. The other way is to store the data as a list, which is turned on by setting `use_list=True`. In most cases, the default behaviour is the safest option; in some cases, especially when the data cannot be represented as a string, you might want to switch on `use_list`, but `semantikon` is still under intensive development, and therefore there is no guarantee that you can retrieve the data across different versions correctly.






  In order to extract argument information, you can use the functions `parse_input_args` and `parse_output_args`. `parse_input_args` parses the input variables and return a dictionary with the variable names as keys and the variable information as values. `parse_output_args` parses the output variables and return a dictionary with the variable information as values if there is one output variable, or a list of dictionaries if it is a tuple.

  Example:

  ```python
  from semantikon.typing import u
  from semantikon.converter import parse_input_args, parse_output_args

  def my_function(
      a: u(int, units="meter"),
      b: u(int, units="second")
  ) -> u(int, units="meter/second", label="speed"):
      return a / b

  print(parse_input_args(my_function))
  print(parse_output_args(my_function))
  ```

  Output:

  ```python
  {'distance': {'units': 'meter', 'label': None, 'uri': None, 'shape': None, 'dtype': <class 'float'>}, 'time': {'units': 'second', 'label': None, 'uri': None, 'shape': None, 'dtype': <class 'float'>}}
  {'units': 'meter/second', 'label': 'speed', 'uri': None, 'shape': None, 'dtype': <class 'float'>}
  ```

  Here the output is the same whether `use_list` is set to `True` or `False`. When `use_list` is `False`, you can use additionally any tag that you want to store. When `use_list` is `True`, you can store only the data type, `units`, `label`, `uri`, `shape` and `dtype`.

  Future announcement: There will be no distrinction between `use_list=True` and `use_list=False` when the official support of python 3.10 is dropped (i.e. around autumn 2026).



  `semantikon` provides a way to interpret the types of inputs and outputs of a function via a decorator, in order to check consistency of the types and to convert them if necessary. Currently, `semantikon` provides an interpreter for `pint.UnitRegistry` objects. The interpreter is applied in the following way:

  ```python
  from semantikon.typing import u
  from semantikon.converters import units
  from pint import UnitRegistry

  @units
  def my_function(
      a: u(int, units="meter"),
      b: u(int, units="second")
  ) -> u(int, units="meter/second", label="speed"):
      return a / b


  ureg = UnitRegistry()

  print(my_function(1 * ureg.meter, 1 * ureg.second))
  ```

  Output: `1.0 meter / second`


  The interpreters check all types and, if necessary, convert them to the expected types **before** the function is executed, in order for all possible errors would be raised before the function execution. The interpreters convert the types in the way that the underlying function would receive the raw values.

  In case there are multiple outputs, the type hints are to be passed as a tuple (e.g. `(u(int, "meter"), u(int, "second"))`).

  Interpreters can distinguish between annotated arguments and non-anotated arguments. If the argument is annotated, the interpreter will try to convert the argument to the expected type. If the argument is not annotated, the interpreter will pass the argument as is.

  Regardless of type hints are given or not, the interpreter acts only when the input values contain units and ontological types. If the input values do not contain units and ontological types, the interpreter will pass the input values to the function as is.

rpm_license:
  BSD 3-Clause License  Copyright (c) 2024, Max-Planck-Institut für Nachhaltige Materialien GmbH - Computational Materials Design (CM) Department 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: 91535df9a3bc2f58c527bc8508d7c4edb927fbffd4566d853dbc888ded3a3691
name: python-semchunk-help
arch: noarch
version: 2.2.1
epoch: 0
release: 1
summary: Development documents and examples for semchunk
url: https://github.com/umarbutler/semchunk
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-semchunk-2.2.1-1.src.rpm
location_href: Packages/python-semchunk-help-2.2.1-1.noarch.rpm
checksum_type: sha256
description:
  <a href="https://pypi.org/project/semchunk/" alt="PyPI Version"><img src="https://img.shields.io/pypi/v/semchunk"></a> <a href="https://github.com/umarbutler/semchunk/actions/workflows/ci.yml" alt="Build Status"><img src="https://img.shields.io/github/actions/workflow/status/umarbutler/semchunk/ci.yml?branch=main"></a> <a href="https://app.codecov.io/gh/umarbutler/semchunk" alt="Code Coverage"><img src="https://img.shields.io/codecov/c/github/umarbutler/semchunk"></a> <a href="https://pypistats.org/packages/semchunk" alt="Downloads"><img src="https://img.shields.io/pypi/dm/semchunk"></a>

  `semchunk` is a fast and lightweight Python library for splitting text into semantically meaningful chunks.

  Owing to its complex yet highly efficient chunking algorithm, `semchunk` is both more semantically accurate than [`langchain.text_splitter.RecursiveCharacterTextSplitter`](https://python.langchain.com/v0.2/docs/how_to/recursive_text_splitter/#splitting-text-from-languages-without-word-boundaries) (see [How It Works 🔍](https://github.com/umarbutler/semchunk#how-it-works-)) and is also over 80% faster than [`semantic-text-splitter`](https://pypi.org/project/semantic-text-splitter/) (see the [Benchmarks 📊](https://github.com/umarbutler/semchunk#benchmarks-)).


  `semchunk` may be installed with `pip`:
  ```bash
  pip install semchunk
  ```


  The code snippet below demonstrates how text can be chunked with `semchunk`:
  ```python
  import semchunk
  from transformers import AutoTokenizer # Neither `transformers` nor `tiktoken` are required,
  import tiktoken                        # they are here for demonstration purposes.

  chunk_size = 2 # A low chunk size is used here for demonstration purposes. Keep in mind that
                 
                 
                 
  text = 'The quick brown fox jumps over the lazy dog.'





  chunker = semchunk.chunkerify('umarbutler/emubert', chunk_size) or \
            semchunk.chunkerify('gpt-4', chunk_size) or \
            semchunk.chunkerify('cl100k_base', chunk_size) or \
            semchunk.chunkerify(AutoTokenizer.from_pretrained('umarbutler/emubert'), chunk_size) or \
            semchunk.chunkerify(tiktoken.encoding_for_model('gpt-4'), chunk_size) or \
            semchunk.chunkerify(lambda text: len(text.split()), chunk_size)



  assert chunker(text) == ['The quick', 'brown', 'fox', 'jumps', 'over the', 'lazy', 'dog.']
  assert chunker([text], progress = True) == [['The quick', 'brown', 'fox', 'jumps', 'over the', 'lazy', 'dog.']]



  assert chunker([text], processes = 2) == [['The quick', 'brown', 'fox', 'jumps', 'over the', 'lazy', 'dog.']]
  ```


  ```python
  def chunkerify(
      tokenizer_or_token_counter: str | tiktoken.Encoding | transformers.PreTrainedTokenizer | \
                                  tokenizers.Tokenizer | Callable[[str], int],
      chunk_size: int = None,
      max_token_chars: int = None,
      memoize: bool = True,
  ) -> Callable[[str | Sequence[str], bool, bool], list[str] | list[list[str]]]:
  ```

  `chunkerify()` constructs a chunker that splits one or more texts into semantically meaningful chunks of a specified size as determined by the provided tokenizer or token counter.

  `tokenizer_or_token_counter` is either: the name of a `tiktoken` or `transformers` tokenizer (with priority given to the former); a tokenizer that possesses an `encode` attribute (eg, a `tiktoken`, `transformers` or `tokenizers` tokenizer); or a token counter that returns the number of tokens in a input.

  `chunk_size` is the maximum number of tokens a chunk may contain. It defaults to `None` in which case it will be set to the same value as the tokenizer's `model_max_length` attribute (deducted by the number of tokens returned by attempting to tokenize an empty string) if possible otherwise a `ValueError` will be raised.

  `max_token_chars` is the maximum numbers of characters a token may contain. It is used to significantly speed up the token counting of long inputs. It defaults to `None` in which case it will either not be used or will, if possible, be set to the numbers of characters in the longest token in the tokenizer's vocabulary as determined by the `token_byte_values` or `get_vocab` methods.

  `memoize` flags whether to memoize the token counter. It defaults to `True`.

  This function returns a chunker that takes either a single text or a sequence of texts and returns, if a single text has been provided, a list of chunks up to `chunk_size`-tokens-long with any whitespace used to split the text removed, or, if multiple texts have been provided, a list of lists of chunks, with each inner list corresponding to the chunks of one of the provided input texts.

  The resulting chunker can be passed a `processes` argument that specifies the number of processes to be used when chunking multiple texts.

  It is also possible to pass a `progress` argument which, if set to `True` and multiple texts are passed, will display a progress bar.

  Technically, the chunker will be an instance of the `semchunk.Chunker` class to assist with type hinting, though this should have no impact on how it can be used.


  ```python
  def chunk(
      text: str,
      chunk_size: int,
      token_counter: Callable,
      memoize: bool = True,
  ) -> list[str]
  ```

  `chunk()` splits a text into semantically meaningful chunks of a specified size as determined by the provided token counter.

  `text` is the text to be chunked.

  `chunk_size` is the maximum number of tokens a chunk may contain.

  `token_counter` is a callable that takes a string and returns the number of tokens in it.

  `memoize` flags whether to memoize the token counter. It defaults to `True`.

  This function returns a list of chunks up to `chunk_size`-tokens-long, with any whitespace used to split the text removed.


  `semchunk` works by recursively splitting texts until all resulting chunks are equal to or less than a specified chunk size. In particular, it:
  1. Splits text using the most semantically meaningful splitter possible;
  1. Recursively splits the resulting chunks until a set of chunks equal to or less than the specified chunk size is produced;
  1. Merges any chunks that are under the chunk size back together until the chunk size is reached; and
  1. Reattaches any non-whitespace splitters back to the ends of chunks barring the final chunk if doing so does not bring chunks over the chunk size, otherwise adds non-whitespace splitters as their own chunks.

  To ensure that chunks are as semantically meaningful as possible, `semchunk` uses the following splitters, in order of precedence:
  1. The largest sequence of newlines (`\n`) and/or carriage returns (`\r`);
  1. The largest sequence of tabs;
  1. The largest sequence of whitespace characters (as defined by regex's `\s` character class);
  1. Sentence terminators (`.`, `?`, `!` and `*`);
  1. Clause separators (`;`, `,`, `(`, `)`, `[`, `]`, `“`, `”`, `‘`, `’`, `'`, `"` and `` ` ``);
  1. Sentence interrupters (`:`, `—` and `…`);
  1. Word joiners (`/`, `\`, `–`, `&` and `-`); and
  1. All other characters.


  On a desktop with a Ryzen 9 7900X, 96 GB of DDR5 5600MHz CL40 RAM, Windows 11 and Python 3.12.4, it takes `semchunk` 2.87 seconds to split every sample in [NLTK's Gutenberg Corpus](https://www.nltk.org/howto/corpus.html#plaintext-corpora) into 512-token-long chunks with GPT-4's tokenizer (for context, the Corpus contains 18 texts and 3,001,260 tokens). By comparison, it takes [`semantic-text-splitter`](https://pypi.org/project/semantic-text-splitter/) (with multiprocessing) 25.03 seconds to chunk the same texts into 512-token-long chunks — a difference of 88.53%.

  The code used to benchmark `semchunk` and `semantic-text-splitter` is available [here](https://github.com/umarbutler/semchunk/blob/main/tests/bench.py).


  This library is licensed under the [MIT License](https://github.com/umarbutler/semchunk/blob/main/LICENCE).


pkgId: 894ba52f9ec2c09a1172bc8524fd9c87d540f3700817d59584b9fb97434e47ad
name: python-sendou-py-help
arch: noarch
version: 1.2.12
epoch: 0
release: 1
summary: Development documents and examples for sendou-py
url: https://github.com/IPLSplatoon/sendou.py/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sendou-py-1.2.12-1.src.rpm
location_href: Packages/python-sendou-py-help-1.2.12-1.noarch.rpm
checksum_type: sha256
description:
  An async Python client for Sendou.ink

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

  - [Documentation](https://sendou.opensource.iplabs.work/)
  - [PyPi](https://pypi.org/project/sendou.py/)


  - Vincent Lee


  - aiohttp
  - [aiohttp-client-cache](https://pypi.org/project/aiohttp-client-cache/)
  - python-dateutil


  `pip install sendou.py`


  - [x] Get user
  - [x] Get Calendar Entries
  - [x] Get Tournament Info
    - [x] Get Tournament Teams
    - [X] Get Tournament Brackets
      - [x] Get Tournament Match Info


  ```python
  import sendou
  import asyncio

  async def run():
      client = sendou.Client("API_KEY")
      player = await client.get_user("USER_ID")
      print(player.name)

  asyncio.run(run())
  ```


  To use this library, you must have an API key. You need to DM Sendou for an API Key currently.


  For development, you'll need [Poetry](https://python-poetry.org) installed for dependency management and building distributions


  When install dependencies for development run

  ```bash
  poetry install --with=dev
  ```

  *In CI you way want to run `poetry install --with=dev,ci` that includes CI dependencies for GitHub Actions*


  This package has *some* tests, these are written with pytest and can be run with

  ```bash
  pytest
  ```

  *You likely need to run `poetry install` before executing pytest*


  This package uses sendou.ink's [Public API Schema](https://github.com/Sendouc/sendou.ink/blob/rewrite/app/features/api-public/schema.ts)
  file to design the models uses in the package. To keep track of where the package is in relation to the upstream schema,
  the commit sha of the upstream schema is kept in the `pyproject.toml` file under `tool.sendou-py.source`.

  There are 2 scripts that help keep this package inline with the upstream schema.


  This script uses the GitHub API to check that the SHA stored in `tool.sendou-py.source` matches the latest commit for
  for the upstream schema.

  ```bash
  python3 scripts/checkUpstreamSchema.py
  ```



  This script pulls down the latest SHA hash for the upstream schema and saves it to the `pyproject.toml` file

  ```bash
  python3 scripts/updateUpstreamSchema.py
  ```

  **This should only be run after dev has checked their changes match the upstream schema**


pkgId: 26162628f104df3bb0d548a163c11ceea20f2ae04f9abf898689a79d141b7530
name: python-sentence-concreteness-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for sentence-concreteness
url: https://github.com/maubinle/sentence_concreteness.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sentence-concreteness-0.0.1-1.src.rpm
location_href: Packages/python-sentence-concreteness-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  This is a package for tagging sentences with their concreteness. The measure is an average of words in a sentence. Words are matched to their root form and person, place, or organizational entities are tagged with a maximum concretenes of 5. The word concreteness ratings that this package relies upon were provided by Brysbaert, Warriner & Kuperman (2013).

  This method has been empirically validated in our paper. If you find it helpful, please consider using the following citation:
  > Aubin Le Quéré, M., Matias, J. N. (2024). When Curiosity Gaps Backfire: Effects of Headline Concreteness on Information Selection Decisions. Under Review.


  `pip install sentence_concreteness`


     * `csv`
     * `string`
     * `inflect`
     * `spacy`
     * `truecase`
     * `nltk`


  See `demo.py` for an example of how to run sentence_concreteness.




  Returns the matched concreteness for an individual word. This method will try to match a word to a root form if able.

  | Name               | Type              | Description                      |
  | ------------------ | ----------------- | -------------------------------- |
  | `word`      | string   | Word that you wish to retrieve the concreteness for. |



  Returns the matched concreteness for a sentence word. For each word, this method will try to calculate a concreteness and then take the average of all retrieved concretenesses. If a word is considered an entity, it will automatically be assigned a concreteness of 5.

  | Name               | Type              | Description                      |
  | ------------------ | ----------------- | -------------------------------- |
  | `sentence`      | string   | Sentence that you wish to retrieve the concreteness for. |
  | `verbose`      | boolean   | Whether you want more information. |
  | `num_unmatched_words_allowed`      | int   | Number of allowable non-matched words before an error is returned. |


  To calculate concreteness ratings, we first identify any person, place, or organizational entities in a headline using the spaCy package, and encode these entities with the highest concreteness score of 5. We then split our headline into a list of tokens and remove standardized stopwords from the headline. We ignore punctuation and cardinal numbers. From the remaining list of tokens, we take an iterative approach to mapping each token to its concreteness rating, checking between each step if the words maps to a concreteness rating. At each step, if we cannot yet retrieve a concreteness rating for a token, we first attempt to retrieve a singular version of the token (e.g. "elephants" &rarr; "elephant"), a present tense version (e.g. "lounged" &rarr; "lounge"), or a base adjective (e.g. "greatest" &rarr; "great").
  If these steps all fail and a word is hyphenated, we take the average of both words (e.g. "super-spectacular" &rarr; "super", "spectacular").



  https://maria-antoniak.github.io/2020/03/25/pip.html \
  https://realpython.com/pypi-publish-python-package/#prepare-your-package-for-publication


pkgId: 4e9da738d6099351d6c39c830106439660af409be8a186159ba1200b3627d888
name: python-sentinelc-appfeed-help
arch: noarch
version: 4.1.0
epoch: 0
release: 1
summary: Development documents and examples for sentinelc-appfeed
url: https://gitlab.com/sentinelc/app-library-builder
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sentinelc-appfeed-4.1.0-1.src.rpm
location_href: Packages/python-sentinelc-appfeed-help-4.1.0-1.noarch.rpm
checksum_type: sha256
description:
    `applib-builder`
    Creates a feed based on the ./manifest folder and output the feed as ./feed/demo-feed.yml
    `applib-builder -p newmanifest -o customfeed -f feed.yml`
    Creates a feed based on the ./newmanifest folder and output the feed as ./customfeed/feed.yml
  ```

  ```bash
    Validates the folder hiearchy and values of a specific app in the manifest


pkgId: 15a5fca617930ebe24a56ac11a5decfc53c727d175dc1040da536f4bb7134d54
name: python-sentry-arroyo-help
arch: noarch
version: 2.19.6
epoch: 0
release: 1
summary: Development documents and examples for sentry-arroyo
url: https://github.com/getsentry/arroyo
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sentry-arroyo-2.19.6-1.src.rpm
location_href: Packages/python-sentry-arroyo-help-2.19.6-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
      <!-- do not specify height so that it scales proportionally on mobile -->
      <img src=docs/source/_static/arroyo-banner.png width=583 />
  </p>

  `Arroyo` is a library to build streaming applications that consume from and produce to Kafka.

  Arroyo consists of three components:

  * Consumer and producer backends
      - The Kafka backend is a wrapper around the librdkafka client, and attempts to simplify rebalancing and offset management even further
      - There is also an in memory and a file based consumer and producer implementation that can be used for testing
  * A strategy interface
      - Arroyo includes a number of pre-built strategies such as `RunTask`, `Filter`, `Reduce`, `CommitOffsets` and more.
      - Users can write their own strategies, though in most cases this should not be needed as the library aims to provide generic, reusable strategies that cover most stream processing use cases
      - Strategies can be chained together to form complex message processing pipelines.
  * A streaming engine which manages the relationship between the consumer and strategies
      - The `StreamProcessor` controls progress by the consumer and schedules work for execution by the strategies.

  All documentation is in the `docs` directory. It is hosted at https://getsentry.github.io/arroyo/ and can be built locally by running `make docs`


pkgId: ddfd734a077d2c171076e1f55177767ea32d38c5bd0e03f8c58875bb703da98c
name: python-sentry-devenv-help
arch: noarch
version: 1.14.4
epoch: 0
release: 1
summary: Development documents and examples for sentry-devenv
url: https://pypi.org/project/sentry-devenv/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sentry-devenv-1.14.4-1.src.rpm
location_href: Packages/python-sentry-devenv-help-1.14.4-1.noarch.rpm
checksum_type: sha256
description:
  managing dev environments since '24

  `devenv` is an extensible execution framework and library for authoring
  a simple set of high level commands - bootstrap, sync, doctor, nuke - that
  manage a repository's dev environment.



  Are you a Sentry employee? Make sure your GitHub account has been added to a [`getsentry/engineering` team](https://github.com/orgs/getsentry/teams/engineering). If not, open an IT Ticket before continuing.

  Otherwise, set the `SENTRY_EXTERNAL_CONTRIBUTOR` environment variable.



  Download [this](https://raw.githubusercontent.com/getsentry/devenv/main/install-devenv.sh) and run it:

  ```
  bash install-devenv.sh
  ```

  This "global" devenv is installed to `~/.local/share/sentry-devenv/bin/devenv`.

  To update this installation, run `devenv update`.




  `devenv bootstrap`

  This is intended for initial setup of a new machine.


  `devenv fetch [repository name]`

  Any repository on github in the form of `[org]/[reponame]`

  Repositories are cloned to a "coderoot" directory which is specified in the [global configuration](#configuration).

  Note: `sentry` and `ops` are currently special names which perform more complicated installations (e.g., `sentry` will set up both sentry and getsentry)

  `devenv sync`

  This runs a user-supplied `[reporoot]/devenv/sync.py` which should:
  - make sure any desired tools are installed
  - bring the dev environment up-to-date, or create it if it doesn't exist

  This script runs within devenv's [runtime](#runtime), which has access to many useful high-level routines.
  There are currently no api docs, but referring to the [examples](#examples) should get you 90% of the way there.

  If you have a feature request, please open an issue!

  In general, our library is designed to isolate, as much as possible, a repo's dev environment within `[reporoot]/.devenv`.
  For example, [gcloud](#gcloud) is installed to `[reporoot]/.devenv/bin/gcloud` (with the gcloud sdk at `[reporoot]/.devenv/bin/google-cloud-sdk`).
  An exception to this would be python virtualenvs, which was implemented before the idea of `[reporoot]/.devenv`.


  `devenv doctor`

  Use this to diagnose and fix common issues.

  Repo-specific checks and fixes can be defined in `[reporoot]/devenv/checks`.
  Otherwise we have "builtin" checks and fixes in `devenv.checks`.




  Everything devenv needs is in `~/.local/share/sentry-devenv`.

  - `~/.local/share/sentry-devenv/bin` contains `devenv` and `direnv`
      - we currently rely on a minimal [`[reporoot]/.envrc`](#direnv) to add `[reporoot]/.devenv/bin` to PATH
      - see [examples](#examples) for .envrc suggestions



  - `devenv` is installed exclusively in a virtualenv at `~/.local/share/sentry-devenv/venv`
      - this venv exclusively uses a python at `~/.local/share/sentry-devenv/python`




  `~/.config/sentry-devenv/config.ini`
  ```ini
  [devenv]

  coderoot = ~/code
  ```




  `[reporoot]/devenv/config.ini`
  ```ini
  [devenv]

  minimum_version = 1.11.0
  ```

  There are plenty more sections, their use is best seen in the [examples](#examples).




  Skip to:
  - [direnv](#direnv)
  - [python](#python)
  - [node](#node)
  - [brew](#brew)
  - [colima](#colima)
  - [gcloud](#gcloud)
  - [terraform](#terraform)



  A minimum viable `[reporoot]/.envrc` is currently needed:

  ```bash
  if [[ -f "${PWD}/.env" ]]; then
      dotenv
  fi

  PATH_add "${HOME}/.local/share/sentry-devenv/bin"

  if ! command -v devenv >/dev/null; then
      echo "install devenv: https://github.com/getsentry/devenv#install"
      return 1
  fi

  PATH_add "${PWD}/.devenv/bin"
  ```



  Need a single virtualenv (or have one already at `.venv` you want devenv to manage?)

  `[reporoot]/.envrc`
  ```bash
  export VIRTUAL_ENV="${PWD}/.venv"

  PATH_add "${PWD}/.venv/bin"
  ```

  `[reporoot]/devenv/sync.py`
  ```py
  from devenv.lib import config, venv

  def main(context: dict[str, str]) -> int:
      reporoot = context["reporoot"]

      venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, "venv")
      url, sha256 = config.get_python(reporoot, python_version)
      print(f"ensuring venv at {venv_dir}...")
      venv.ensure(venv_dir, python_version, url, sha256)

      print(f"syncing venv with {requirements}...")
      venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)

      return 0
  ```

  `[reporoot]/devenv/config.ini`
  ```ini
  [venv.venv]
  python = 3.12.3
  path = .venv
  requirements = requirements-dev.txt
  editable =
    .

  [python3.12.3]
  darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
  darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
  linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
  linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
  ```

  You can also have multiple virtualenvs, which is useful if you rely on a python tool
  that has a bunch of dependencies that may conflict with others.

  `[reporoot]/.envrc`
  ```bash
  export VIRTUAL_ENV="${PWD}/.exampleproject"

  PATH_add "${PWD}/.venv-exampleproject/bin"
  PATH_add "${PWD}/.venv-inhouse-tool/bin"
  ```

  `[reporoot]/devenv/sync.py`
  ```py
  from devenv.lib import config, venv

  def main(context: dict[str, str]) -> int:
      reporoot = context["reporoot"]

      for name in ("exampleproject", "inhouse-tool"):
          venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, name)
          url, sha256 = config.get_python(reporoot, python_version)
          print(f"ensuring {name} venv at {venv_dir}...")
          venv.ensure(venv_dir, python_version, url, sha256)

          print(f"syncing {name} with {requirements}...")
          venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)

      return 0
  ```

  `[reporoot]/devenv/config.ini`
  ```ini
  [venv.exampleproject]
  python = 3.12.3
  requirements = requirements-dev.txt
  editable =
    .

  [venv.inhouse-tool]
  python = 3.12.3
  requirements = inhouse-tool/requirements-dev.txt

  [python3.12.3]
  darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
  darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
  linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
  linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
  ```



  `[reporoot]/.envrc`
  ```bash
  PATH_add "${PWD}/node_modules/.bin"
  ```

  `[reporoot]/devenv/sync.py`
  ```py
  from devenv import constants
  from devenv.lib import config, node, proc

  def main(context: dict[str, str]) -> int:
      reporoot = context["reporoot"]
      cfg = config.get_repo(reporoot)

      node.install(
          cfg["node"]["version"],
          cfg["node"][constants.SYSTEM_MACHINE],
          cfg["node"][f"{constants.SYSTEM_MACHINE}_sha256"],
          reporoot,
      )
      node.install_yarn(cfg["node"]["yarn_version"], reporoot)

      print("installing node dependencies...")
      proc.run(
          (
              ".devenv/bin/yarn",
              "install",
              "--frozen-lockfile",
              "--no-progress",
              "--non-interactive",
          ),
      )

      return 0
  ```

  If you'd like a different node version, fill in the appropriate urls https://nodejs.org/dist/
  first in config.ini, then reach out to dev-infra and we can mirror it to GCS.

  `[reporoot]/devenv/config.ini`
  ```ini
  [node]

  darwin_x86_64 = https://storage.googleapis.com/sentry-dev-infra-assets/node/node-v20.13.1-darwin-x64.tar.xz
  darwin_x86_64_sha256 = c83bffeb4eb793da6cb61a44c422b399048a73d7a9c5eb735d9c7f5b0e8659b6
  darwin_arm64 = https://storage.googleapis.com/sentry-dev-infra-assets/node/node-v20.13.1-darwin-arm64.tar.xz
  darwin_arm64_sha256 = e8a8e78b91485bc95d20f2aa86201485593685c828ee609245ce21c5680d07ce
  linux_x86_64 = https://storage.googleapis.com/sentry-dev-infra-assets/node/node-v20.13.1-linux-x64.tar.xz
  linux_x86_64_sha256 = efc0f295dd878e510ab12ea36bbadc3db03c687ab30c07e86c7cdba7eed879a9

  version = v20.13.1
  yarn_version = 1.22.22
  ```



  `[reporoot]/devenv/sync.py`
  ```py
  from devenv import constants
  from devenv.lib import brew

  def main(context: dict[str, str]) -> int:
      reporoot = context["reporoot"]

      brew.install()

      proc.run(
          (f"{constants.homebrew_bin}/brew", "bundle"),
          cwd=reporoot,
      )

      return 0
  ```

  `[reporoot]/Brewfile`
  ```



  ```




  Since devenv 1.14.0, colima (and the docker CLI needed to interact with it)
  should have been installed globally for you during bootstrap.
  If you're on an older version, run `devenv update`.




  `[reporoot]/devenv/sync.py`
  ```py
  from devenv import constants
  from devenv.lib import config, gcloud

  def main(context: dict[str, str]) -> int:
      reporoot = context["reporoot"]
      cfg = config.get_repo(reporoot)

      gcloud.install(
          cfg["gcloud"]["version"],
          cfg["gcloud"][SYSTEM_MACHINE],
          cfg["gcloud"][f"{SYSTEM_MACHINE}_sha256"],
          reporoot,
      )

      return 0
  ```

  `[reporoot]/devenv/config.ini`
  ```ini
  [gcloud]


  darwin_x86_64 = https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-490.0.0-darwin-x86_64.tar.gz
  darwin_x86_64_sha256 = fa396909acc763cf831dd5d89e778999debf37ceadccb3c1bdec606e59ba2694
  darwin_arm64 = https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-490.0.0-darwin-arm.tar.gz
  darwin_arm64_sha256 = a3a098a5f067b561e003c37284a9b164f28f37fd0d6371bb55e326679f48641c
  linux_x86_64 = https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-490.0.0-linux-x86_64.tar.gz
  linux_x86_64_sha256 = 40ce41958236f76d9cb08f377ccb9fd6502d2df4da14b36d9214bcb620e2b020

  version = 490.0.0
  ```




  Our responsibility ends at installing `tenv` and containing `TENV_ROOT` at  `[reporoot]/.devenv/bin/tenv-root`. We install `terraform` and `terragrunt` shims which use that `TENV_ROOT`.

  Define `[reporoot]/.terraform-version` and `[reporoot]/.terragrunt-version` (if you want it) and after running sync, you should be able to just type `terraform` and `tenv` takes care of the rest.


  `[reporoot]/devenv/sync.py`
  ```py
  from devenv import constants
  from devenv.lib import config, tenv

  def main(context: dict[str, str]) -> int:
      reporoot = context["reporoot"]
      cfg = config.get_repo(reporoot)

      tenv.install(
          cfg["tenv"]["version"],
          cfg["tenv"][SYSTEM_MACHINE],
          cfg["tenv"][f"{SYSTEM_MACHINE}_sha256"],
          reporoot,
      )

      return 0
  ```

  `[reporoot]/devenv/config.ini`
  ```ini
  [tenv]
  darwin_x86_64 = https://github.com/tofuutils/tenv/releases/download/v1.3.0/tenv_v1.3.0_Darwin_x86_64.tar.gz
  darwin_x86_64_sha256 = 994100d26f4de6de4eebc7691ca4ea7b424e2fd73e6d5d77c5bf6dfd4af94752
  darwin_arm64 =  https://github.com/tofuutils/tenv/releases/download/v1.3.0/tenv_v1.3.0_Darwin_arm64.tar.gz
  darwin_arm64_sha256 = c31d2b8412147316a0cadb684408bc123e567852d7948091be7e4303fc19397a

  version = v1.3.0
  ```




  We use `tox`. The easiest way to run devenv locally is just using the tox venv's executable:

  ```
  ~/code/sentry $  ~/code/devenv/.tox/py311/bin/devenv sync
  ```


pkgId: eba77448f4af31e1b8c1db0146ee7317c77c0631b6c4e012ec5b7ecf08eb903c
name: python-sentry-feishu-gsmini-help
arch: noarch
version: 1.0
epoch: 0
release: 1
summary: Development documents and examples for sentry-feishu-gsmini
url: https://github.com/gsmini/sentry-feishu
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sentry-feishu-gsmini-1.0-1.src.rpm
location_href: Packages/python-sentry-feishu-gsmini-help-1.0-1.noarch.rpm
checksum_type: sha256
description:
  - 当前是针对sentry  24.10.0 做的插件其他版本暂未尝试。 相关依赖参考规则：https://github.com/getsentry/sentry/blob/24.10.0/requirements-frozen.txt


pkgId: 396b0182b51fb59d93357408305b4f063976c1d17e918269a34c6a72a3cd1c4b
name: python-seqio-nightly-help
arch: noarch
version: 0.0.18.dev20241214
epoch: 0
release: 1
summary: Development documents and examples for seqio-nightly
url: https://github.com/google/seqio/tree/nightly
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seqio-nightly-0.0.18.dev20241214-1.src.rpm
location_href: Packages/python-seqio-nightly-help-0.0.18.dev20241214-1.noarch.rpm
checksum_type: sha256
description:
  *Task-based datasets, preprocessing, and evaluation for sequence models*

  *Go to [SeqIO ReadTheDocs Documentation Page](https://seqio.readthedocs.io/).*




  **SeqIO** is a library for processing sequential data to be fed into downstream
  sequence models. It uses
  [`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset)
  to create scalable data pipelines but requires minimal use of TensorFlow. In
  particular, with one line of code, the returned dataset can be transformed to a
  numpy iterator and hence it is fully compatible with other frameworks such as
  [JAX](https://github.com/google/jax) or
  [PyTorch](https://pytorch.org/).

  SeqIO assumes that the dataset is a sequence. Modalities such as text or audio
  are naturally supported. Images are supported as long as they are represented as
  sequences (e.g., [Image GPT](http://proceedings.mlr.press/v119/chen20s.html)).

  SeqIO is a refactor of the
  [`t5.data`](https://github.com/google-research/text-to-text-transfer-transformer/)
  library used (in conjunction with the
  [Mesh Tensorflow](https://github.com/tensorflow/mesh) Transformer
  implementation) to train the T5 models introduced in [*Exploring the Limits of
  Transfer Learning with a Unified Text-to-Text
  Transformer*](https://arxiv.org/abs/1910.10683).

  If you have used `t5.data` in the past and want to know how SeqIO differs,
  please read [this section](#differences-from-t5data).





  ```sh
  pip install seqio
  ```



  ```sh
  git clone https://github.com/google/seqio.git
  cd seqio
  pip install -e .
  ```



  At a high level, we use SeqIO with the following steps.

  1.  Define a `Task` (and optionally a `Mixture`).

  1.  Define (or use an existing) a `FeatureConverter` based on the model
      architecture.

  1.  Use the top-level function `seqio.get_dataset` to obtain the
      `tf.data.Dataset` instance.

  We will look at each of these steps in detail.




  The most important class in SeqIO is the `Task`. It is an abstraction that
  combines:

    * a raw *data source*
    * one or more *preprocessing* steps
    * a *vocabulary* to tokenize/detokenize each preprocessed feature for the
    model
    * a *postprocessor* to convert detokenized model outputs into a format for
    evaluation
    * one or more *metrics* to evaluate with

  Oftentimes a `Task` lines up with a common benchmark. In this tutorial, we use
  [WMT 19 English-German](http://www.statmt.org/wmt19/translation-task.html)
  machine translation task. In the end, our `Task` will look like this:


  ```py
  seqio.TaskRegistry.add(
      "wmt19_ende",
      seqio.TfdsDataSource(tfds_name="wmt19_translate/de-en:1.0.0"),
      preprocessors=[
          functools.partial(
              translate, source_language='en', target_language='de'),
          seqio.preprocessors.tokenize, seqio.preprocessors.append_eos
      ],
      output_features={
          'inputs':
              seqio.Feature(
                  seqio.SentencePieceVocabulary('/path/to/inputs/vocab'),
                  add_eos=False,
                  dtype=tf.int32),
          'targets':
              seqio.Feature(
                  seqio.SentencePieceVocabulary('/path/to/targets/vocab'),
                  add_eos=True,
                  dtype=tf.int32),
      },
      metric_fns=[bleu])
  ```

  We typically add the `Task` to the global registry when we define it (as shown
  above) to make it easier to use with model configs and flags. Thus, it  must
  have a unique string name (`"wmt19_ende"` in this case). Note, however, that
  you may also instantiate a `seqio.Task` directly without adding it to the
  registry, if desired.

  We'll now break down each part of the task definition.



  Data sources are the first step in your pipeline, providing a way to load raw
  data in many formats as a `tf.data.Dataset`.
  All data sources are subclasses of the `DataSource` base class and are defined
  in
  [dataset_providers](https://github.com/google/seqio/tree/main/seqio/dataset_providers.py).

  Existing implementations include:

    * `TfdsDataSource` for loading examples from
    [TensorFlow Datasets](https://www.tensorflow.org/datasets).
    * `TextLineDataSource` for loading examples from text files (e.g., tsv).
    * `TFExampleDataSource` for loading
    [`tf.train.Example`](https://www.tensorflow.org/tutorials/load_data/tfrecord)
    protos from a file (e.g. a `TFRecord` file.)
    * `FunctionDataSource` for providing an custom function that returns a
    `tf.data.Dataset`.

  In our example, we are using the `TfdsDataSource`. We specify the name of the
  WMT dataset in TFDS
  ([`"wmt19_translate"`](https://www.tensorflow.org/datasets/catalog/wmt19_translate)),
  the specific config for the language pair that excludes the context for the open
  domain setting (`"de-en"`), and the version number (`"1.0.0"`).



  The `output_features` field expects a dictionary that maps string feature names
  to `seqio.Feature` objects. This defines what the `Task` is expected to produce
  in its output examples. The output examples *may* contain additional fields, but
  they *must* contain these fields in the specified format or exceptions will be
  raised.

  Each `Feature` includes:

  *   A `vocabulary`, which must subclass
      [`seqio.Vocabulary`](https://github.com/google/seqio/tree/main/seqio/vocabularies.py),
      to specify how the feature can be tokenized and detokenized. You may use
      `seqio.PassThroughVocabulary` if tokenization is not necessary.
  *   `add_eos`, which specifies whether the feature should end with the
      vocabulary's EOS token.
  *   The output `dtype` which must be a `tf.dtypes.DType`.

  **Note:** specifying these options on `Feature` does not by itself ensure the
  proper transformations are applied -- you must also include the necessary
  preprocessors.

  The [tasks used in T5](TODO) all produce "inputs" and "targets" features to be
  consumed by the text-to-text model. For a decoder-only language model, only a
  single feature (e.g., "targets") would be necessary. Nevertheless, SeqIO is
  flexible enough to generate arbitrary output features what will be converted
  into model features by the [`FeatureConverter`](#featureconverter) later in the
  pipeline.



  Preprocessors are functions that transform one `tf.data.Dataset` into a new
  `tf.data.Dataset`. Typically this involves executing a `map` over the given
  dataset. The preprocessors provided to the `Task` will be executed sequentially.

  As an example, let's look at the previously undefined `translate` from the
  "wmt19_ende" example above.

  ```py
  def translate(dataset: tf.data.Dataset,
                source_language: str,
                target_language: str) -> tf.data.Dataset:
    def _translate(ex: Mapping[str, tf.Tensor]) -> Mapping[str, tf.Tensor]:
      """Convert a translation example to a text2text pair.

      For example, say the dataset returns examples of this format:
        {'de': 'Das ist gut.', 'en': 'That is good.'}
      If source_language = 'de', target_language = 'en', then the outputs will
      have the format:
        {'inputs': 'translate de to en: Das ist gut.',
        'targets': 'That is good.'}

      Args:
        ex: an example to process.
        source_language: source language code (e.g. 'en') to translate from.
        target_language: target language code (e.g. 'de') to translate to.

      Returns:
        A preprocessed example with the format listed above.
      """
      src_str = f'translate {source_language}'
      tgt_str = f' to {target_language}: '
      return {
          'inputs': tf.strings.join([src_str, tgt_str, ex[source_language]]),
          'targets': ex[target_language],
      }

    return dataset.map(_translate,
                       num_parallel_calls=tf.data.experimental.AUTOTUNE)
  ```

  The TFDS dataset provides the dataset where each example has the form: `{'de':
  'Das ist gut.', 'en': 'That is good.'}`. We convert this to "inputs" and
  "targets" with the appropriate prompt to inform the model of the task.


  A few **important** notes:

  1.  When instantiating a `Task`, the preprocessor functions can have the
      following arguments: `dataset`, `output_features`, and `sequence_length`.
      The first (positional) dataset argument is always required. If an argument
      named `output_features` is provided, the
      [output feature mapping](#output-features) will be passed to the
      preprocessor. If `sequence_length` is provided, a mapping from feature name
      to its *maximum* final sequence length
      ([provided by the caller](#getting-a-preprocessed-dataset)) will be
      passed -- any sequences that are too long after preprocessing will be
      automatically truncated. If a preprocessor function does have other
      arguments, they must have default values or be bound (e.g., with
      `functools.partial` as used in `translate`) before instantiating the `Task`.

  1.  Mapping functions operate on and return `tf.Tensor`s using TensorFlow
      operations. This is more flexible than it may sound:

      *   Automatic
          [AutoGraph](https://www.tensorflow.org/guide/function#autograph_transformations)
          conversion allow you to write python control flow in your
          transformations.
      *   [tf.experimental.numpy](https://www.tensorflow.org/guide/tf_numpy)
          provides a numpy interface.
      *   [`tf.py_function`](https://www.tensorflow.org/api_docs/python/tf/py_function)
          allows you to wrap arbitrary Python code. Note: `tf.data` pipelines
          using this function can only be run in the python process where they
          were defined, and performance is limited by the python GIL.

      See `tf.data.Dataset`
      [documentation](https://www.tensorflow.org/api_docs/python/tf/data/Dataset)
      for more details.

  1.  When calling `map`, it is important to **always** set
      `num_parallel_calls=tf.data.experimental.AUTOTUNE` to avoid creating a
      bottleneck. The `seqio.map_over_dataset` decorator helps enforce this as
      follows.

      ```py
      @seqio.map_over_dataset
      def translate(ex: Mapping[str, tf.Tensor],
                    source_language: str,
                    target_language: str) -> Mapping[str, tf.Tensor]:
        """Convert a translation dataset to a text2text pair.

        For example, say the dataset returns examples of this format:
          {'de': 'Das ist gut.', 'en': 'That is good.'}
        If source_language = 'de', target_language = 'en', then the outputs will
        have the format:
          {'inputs': 'translate German to English: Das ist gut.',
          'targets': 'That is good.'}

        Args:
          ex: an example to process.
          source_language: source language code (e.g. 'en') to translate from.
          target_language: target language code (e.g. 'de') to translate to.

        Returns:
          A preprocessed example with the format listed above.
        """
        src_str = f'translate {source_language}'
        tgt_str = f' to {target_language}: '
        return {
            'inputs': tf.strings.join([src_str, tgt_str, ex[source_language]]),
            'targets': ex[target_language],
        }
      ```

      Note that `translate` takes as input an individual example. Then
      `seqio.map_over_dataset` decorates it to a function that takes in a
      `tf.data.Dataset` instance.

  1.  Stochastic operations must be
      [stateless](https://www.tensorflow.org/guide/random_numbers#stateless_rngs)
      if deterministic pipelines are needed. To get (optionally deterministic)
      seeds for these operations, use the `seqio.map_over_dataset(num_seeds=n)`
      decorator. For example:

      ```py
      def random_chunk(
        dataset: tf.data.Dataset,
        sequence_length: Mapping[str, int]
      ) -> tf.data.Dataset:
      """Takes a random chunk out of each feature with size `sequence_length`."""

        @seqio.map_over_dataset(num_seeds=1)
        def take_chunk(
            ex: Mapping[str, tf.Tensor],
            seed
        ) -> Mapping[str, tf.Tensor]:
          new_ex = {}
          for k, v in ex.items():
            if k in sequence_length:
              length = sequence_length[k]
              start_idx = tf.random.stateless_uniform(
                 (), seed, 0, tf.size(v) - (length + 1))
              new_ex[k] = v[start_idx:start_idx+length]
            else:
              new_ex[k] = v
          return new_ex

      return take_chunk(dataset)
      ```

      If `num_seeds > 1`, the arg will instead be called `seeds` and will contain
      a sequence of seeds.

  In our "wmt_19_ende" task, we also use the predefined preprocessors
  `seqio.preprocessors.tokenize` and `seqio.preprocessors.append_eos`. The former
  uses each `Feature.vocabulary` to tokenize it, and the the latter appends
  `Feature.vocabulary.eos_id` to the feature if the `Feature.add_eos` is True. See
  [preprocessors.py](https://github.com/google/seqio/tree/main/seqio/preprocessors.py) for
  their implementations and other useful preprocessors.



  During evaluation, the model outputs are first detokenized using the output
  feature vocabulary. Before passing these predictions to the metric functions,
  they can be run through a Python postprocessing function, alongside the full
  input example. Similarly, the raw targets are run through this function before
  being passed to the metrics. Since the postprocess function is used on both the
  model output and the targets, it is passed an `is_target` boolean in case the
  behavior should be different. It is also passed the fully preprocessed example,
  including fields that were excluded from `output_features`.

  For the "wmt19_ende", we don't need any postprocessors. See "trivia_qa_open"
  task in the [Advanced Postprocessing `Task`](#advanced-postprocessing-task) for
  an example postprocessor.



  Metrics are functions that are passed (by the [Evaluator](#evaluator)) the
  fully-materialized list of postprocessed model outputs (or scores) and targets
  and return a mapping from string names to `MetricValue` objects containing their
  values. These are most commonly floating-point scalars, but may also be text,
  images, audio, histograms, etc (see
  [metrics.py](https://github.com/google/seqio/tree/main/seqio/metrics.py) for the full list).

  The first argument of a metric function must always be called `targets`. If the
  second argument of a metric function is called `predictions`, it will be passed
  the decoded and detokenized model prediction. If it is called `scores`, it will
  be passed a list of log-likelihood scores for each example.

  If multiple metric functions are provided, they will all be used and their
  returned mappings merged.



  Prediction metrics are computed using the postprocessed targets and model
  outputs (predictions). The args must be named `targets` and `predictions`.

  Let's look at the metric function used for "wmt19_ende" task. A standard metric
  for the translation task is BLEU and we use `sacrebleu` implementation.

  ```py
  def bleu(targets: Sequence[str], predictions: Sequence[str]):
    """Computes BLEU score.

    Args:
      targets: list of strings or list of list of strings if multiple references
        are present.
      predictions: list of strings

    Returns:
      bleu_score across all targets and predictions
    """
    if isinstance(targets[0], list):
      targets = [[x for x in target] for target in targets]
    else:
      
      targets = [targets]

    bleu_score = sacrebleu.corpus_bleu(predictions, targets,
                                       smooth_method="exp",
                                       smooth_value=0.0,
                                       force=False,
                                       lowercase=False,
                                       tokenize="intl",
                                       use_effective_order=False)
    return {"bleu": bleu_score.score}
  ```




  Score metrics are computed using the postprocessed targets and their
  log-likelihood scores according to the model. The args must be named `targets`
  and `scores`.

  ```py
  def perplexity(targets: Sequence[str], scores: Sequence[float]):
    return {
      "perplexity": seqio.metrics.Scalar(np.exp(np.mean(scores)))
    }
  ```



  Once you have multiple `Task`s added to the `TaskRegistry`, you can define
  `Mixture`s that will combine the examples from them according to some specified
  rate. Examples will then be sampled from each task in proportion to its rate.

  As an example, [Multilingual T5](http://goo.gle/mt5) uses a `Mixture` of
  per-language `Task`s with tail languages up-weighted in the mixture.

  There are 3 ways to specify the tasks and their rates:

  1.  Provide a rate along with each task's name (rates are normalized before
      sampling). In this example, the rates provided are units of the final
      mixture that come from the component tasks. Here, 1/(1+7) of the final
      mixture will come from "task1".

      ```py
      seqio.MixtureRegistry.add(
        "mix1",
        [("task1", 1), ("task2", 7)]
      )
      ```

  1.  Provide a constant default rate for some or all tasks, which will be used
      when only the name is provided. The example below will produce identical
      mixing rates as the previous one.

      ```py
      seqio.MixtureRegistry.add(
        "mix1",
        [("task1", 0.5), "task2"],
        default_rate=3.5
      )
      ```

  1.  Provide a function that generates the rate for each task at runtime. The
      example below uses the provided
      [`seqio.mixing_rate_num_examples`](https://github.com/google/seqio/tree/main/seqio/utils.py),
      which uses the number of examples (computed during
      [offline caching](#optional-offline-caching)) as the rate for each task.

      ```py
      seqio.MixtureRegistry.add(
        "mix2",
        ["task1", "task2"],
        default_rate=seqio.mixing_rate_num_examples
      )
      ```

  You can also include `Mixture`s in your `Mixture`! For example, the following
  task would contain 1/24 (from "mix1") + 1/3 "task1", 7/24 (from "mix1") of
  "task2", and 1/3 "task3".

  ```py
  seqio.MixtureRegistry.add(
    "mix3",
    ["mix1", "task1", "task3"],
    default_rate=1
  )
  ```

  If sampling without replacement is important for your task, you can achieve that
  by using either deterministic tasks or using dataset checkpointing (and not
  running more than an epoch) for a non-deterministic task. Otherwise, the mixture
  may sample with replacement.



  Now that your `Task` (and/or `Mixture`) is defined, its primary functionality is
  to use it to generate a dataset.

  You may first need to use `seqio.get_mixture_or_task(mixture_or_task_name)` to
  access your dataset provider from the registry.

  After that, you can call `get_dataset` to build the `tf.data.Dataset`. For
  example:

  ```py
  dataset = seqio.get_mixture_or_task("mix1").get_dataset(
      sequence_length={"inputs": 256, "targets": 128},
      split="train",
      shuffle=True,
      num_epochs=1,
      shard_info=seqio.ShardInfo(index=0, num_shards=10),
      use_cached=False,
      seed=42
  )


  for _, ex in zip(range(5), dataset.as_numpy_iterator()):
    print(ex)
  ```

  Some notes on a few of the arguments:

  *   `sequence_length`: An *optional* mapping from feature name to *maximum*
      length. Will be passed to the preprocessors with a `sequence_length`
      argument. If not `None`, the final example features will be truncated if
      they exceed the specified length. Note that this value may be required to be
      set if any of the preprocessors use the `sequence_length` argument and do
      not handle the `None` case.
  *   `num_epochs`: The number of times to repeat the source dataset.
      Preprocessing will be re-applied with new seeds to enable new samples from
      stochastic steps. Note that if the `CacheDatasetPlaceholder` is included
      (see below) preprocessing is only re-applied after that step.
  *   `shard_info`: An optional sharding specification for loading a deterministic
      subset of the dataset. Loading will be most efficient if the number of
      shards evenly divides the number of shards in the raw data source.
  *   `use_cached`: Specifies whether to load from a pre-cached task for increased
      performance or to do the preprocessing on-the-fly. See the
      [following section](#optional-offline-caching) for details on how to cache
      your task, which must be done before this can be set to `True`.
  *   `seed`: An optional seed to use for deterministic shuffling and (stateless)
      stochastic ops. These operations will still be pseudorandom but will be
      reproducible with the same seed. Set to `None` if determinism is not
      desired.



  For improved performance at load time and to avoid redundant computations for
  commonly used tasks, you can pre-cache your `Task` with all or part of the
  preprocessing done in advance of training; this partial preprocessing is
  especially useful if the Task is stochastic and one wishes to cache the
  deterministic operations while running the stochastic ones on the fly. Caching
  stochastic SeqIO Mixtures in this way is not supported.

  The first step to doing so is to add a
  `seqio.CacheDatasetPlaceholder(required=False)` as one of the steps in your
  preprocessing pipeline. All steps before the placeholder will be cached offline
  and all steps after will be executed on the fly at load time. You may set
  `required=True` if you want `get_dataset` to fail unless `use_cached=True`.

  Caveats:

  *   Any stochastic operations that you wish to be re-run when `num_epochs > 1`
      or with a different `seed` *should* go after the placeholder since only a
      single sample will be cached.
  *   Any preprocessing steps that use the `sequence_length` argument *must* come
      after the `seqio.CacheDatasetPlaceholder` preprocessor since this is only
      known at runtime, or an exception will be raised. If you wish to cache for a
      specific sequence length, you can use
      [`seqio.experimental.add_fully_cached_task`](https://github.com/google/seqio/tree/main/seqio/experimental.py).

  Once your `Task` is registered, you can run
  [`cache_tasks_main`](https://github.com/google/seqio/tree/main/seqio/scripts/cache_tasks_main.py)
  to execute the offline preprocessing, providing it with the module containing
  your task definitions via the `--module_import` flag. For very large datasets,
  it's recommended you run this [Apache Beam](https://beam.apache.org/) script on
  a distributed framework like
  [Google Cloud DataFlow](https://beam.apache.org/documentation/runners/dataflow/).

  Finally, you are ready to load the cached version of your `Task` (or `Mixture`)
  containing it. You will need to add the path to the directory you passed to
  `--output_cache_dir` via `seqio.add_global_cache_dirs(["/my/cache/dir"])`. Now
  when you call `task_or_mixture.get_dataset(..., use_cached=True)`, the data will
  be loaded from the cache directory instead of the raw data source.



  The role of `Task` is to provide the dataset object with as little
  model-specific features (e.g., generic "inputs" and "targets") while the Feature
  Converters transform the model-agnostic features to model-specific features
  (e.g., "encoder_input_tokens"). We refer to the former as "task features" and
  the latter as "model features".

  Let's use machine translation (English to German) as a running example.

  The raw data consists of sentence pairs such as

  ```
  "That is good\tDas ist gut."
  ```

  A task registered to `Task` (e.g.,
  [wmt_t2t_ende_v003](t5/data/tasks.py?l=156&rcl=337594707))
  reads these sentence pairs from the data source and applies a series of
  [preprocessors](t5/data/preprocessors.py?rcl=343354647).
  One of the internal representations looks like

  ```python
  {"inputs": "translate English to German: That is good.",
   "targets": "Das ist gut."}
  ```

  The final output from the `Task` is a tokenized version of the parallel
  sentences. In the following toy example (the token ids do not correspond to the
  above string example), the dataset consists of 2 examples.

  ```python
  dataset = [{"inputs": [7, 8, 5], "targets": [3, 9]},
             {"inputs": [8, 4, 9, 3], "targets": [4]}]
  ```

  The format is in the `tf.data.Dataset` (i.e., each example is a dictionary with
  "inputs" and "targets" fields.

  The `FeatureConverter` then takes this as an input and converts to the
  model-specific features. In addition, the feature converter performs padding and
  optionally packing (for model implementations that support it) for efficiency.
  For example, let's assume that we are using the standard Transformer
  architecture with an encoder and a decoder. The output of the feature converter
  is

  ```python
  converted_dataset = [{
      "encoder_input_tokens": [7, 8, 5, 1, 8, 4, 9, 3, 1, 0],
       "encoder_segment_ids": [1, 1, 1, 1, 2, 2, 2, 2, 2, 0],
         "encoder_positions": [0, 1, 2, 3, 0, 1, 2, 3, 4, 0],
     "decoder_target_tokens": [3, 9, 1, 4, 1, 0, 0],
      "decoder_input_tokens": [0, 3, 9, 0, 4, 0, 0],
      "decoder_loss_weights": [1, 1, 1, 1, 1, 0, 0],
         "decoder_positions": [0, 1, 2, 0, 1, 0, 0],
       "decoder_segment_ids": [1, 1, 1, 2, 2, 0, 0],
  }]
  ```

  In this case, two task examples are packed into one. `*_segment_id` and
  `*_position` are the fields used to denote the membership and position of packed
  token in the original sequence. The EOS ids (i.e., 1) are appended. In addition,
  each fields is padded to the specified length.

  We will look at the details of this example in Encoder-decoder architecture:
  `seqio.EncDecFeatureConverter` section.




  We provide feature converters for three common architectures: encoder-decoder,
  decoder-only and encoder-only. Here we describe how users can use the feature
  converters for each of these architectures out of the box as a part of the SeqIO
  library.

  In the SeqIO library, each architecture has a class defining how the task
  features are converted to model features. Since these feature converters are
  already implemented, it is straightforward to use them by providing the class as
  a `feature_converter` argument of the `seqio.get_dataset` function. The
  following sections show example usage of `seqio.get_dataset`.


  This is the architecture of the original Transformer paper. For the
  English-to-German translation task, the following function call retrieves the
  `tf.data.Dataset` object with the model features.

  ```python
  dataset: tf.data.Dataset = seqio.get_dataset(
      mixture_or_task_name="wmt_t2t_ende_v003",
      task_feature_lengths={"inputs": 32, "targets": 32},
      dataset_split="train",
      shuffle=True,
      feature_converter=seqio.EncDecFeatureConverter(pack=True)
  )
  ```

  The resulting dataset object has the following 7 fields

  |Feature name          | Explanation                |
  |----------------------|---------------------------|
  |`encoder_input_tokens` | Input tokens to the encoder. |
  |`encoder_positions`    | Position index in the sequence before packing.|
  |`encoder_segment_ids`  | Sequence membership before packing. Two positions with
  the same positive integer mean that they belong to the same sequence before
  packing. |
  |`decoder_input_tokens` | Input tokens to the decoder. |
  |`decoder_target_tokens`| Output tokens from the decoder. |
  |`decoder_loss_weights` | A weight on each position that can be used as a mask. |
  |`decoder_positions`    | Position index in the sequence before packing. |
  |`decoder_segment_ids`  | Same as `encoder_segment_ids` but for decoder.|



  This architecture consists of a single autoregressive stack, which we denote as
  a "decoder".

  A decoder autoregressively produces an output sequence.
  Therefore, it can be used as a standard language model if the task dataset has
  only "targets" features, i.e., self-supervised. If the task dataset also has an
  "inputs" field, e.g., supervised machine translation, the decoder can still be
  used by concatenating the inputs and targets fields. See [Raffel et al.
  (2020)](https://arxiv.org/abs/1910.10683), Section 3.2.1 for more detailed take
  on this topic.

  We support both uses cases and refer to the former as *standard language model*
  and the latter as *prefix language model*. Each of these models is described
  separately below.

  Note that we do not provide special features to denote how the dataset should be
  consumed. For example, a Transformer-based fully autoregressive decoder has a
  fully-causal self-attention layer. Since there are many ways of implementing the
  masking pattern for such attention layer and, more importantly, SeqIO is not
  limited to attention-based models, we leave it up to the model implementations
  to apply the masking pattern. There is one exception, and we cover this in
  the Prefix LM section below.

  A common use pattern is to pretrain a decoder model with the left-to-right
  language modeling objective (unsupervised) using `seqio.LMFeatureConverter` and
  then fine-tune (supervised) using `seqio.PrefixLMFeatureConverter`.




  For the standard language model, the task dataset only has "targets" field.
  Therefore, the sequence length specification only needs to specify targets.

  ```python
  dataset: tf.data.Dataset = seqio.get_dataset(
      mixture_or_task_name="standard_lm",
      task_feature_lengths={"targets": 32},
      dataset_split="train",
      shuffle=True,
      feature_converter=seqio.LMFeatureConverter(pack=True)
  )
  ```

  Note that "standard_lm" is not a registered task in the codebase. It is the
  left-to-right language modeling task, i.e., predict the next token given the
  previous tokens on some language corpus (e.g.,
  [C4](https://www.tensorflow.org/datasets/catalog/c4)).

  The output dataset has the following model features.

  |Feature name          | Explanation                |
  |----------------------|---------------------------|
  |`decoder_target_tokens`| Output tokens from the decoder |
  |`decoder_input_tokens` | Input tokens to the decoder |
  |`decoder_loss_weights` | Binary mask to indicate where the loss should be taken |
  |`decoder_positions`    | Position index in the sequence before packing|
  |`decoder_segment_ids`  | Sequence membership before packing. Two positions with
  the same positive integer mean that they belong to the same sequence before
  packing. |

  The `decoder_target_tokens` is a shifted version of `decoder_input_tokens` for
  the standard teacher-forced autoregressive training.





  If the input dataset has a notion of "inputs" and "targets", we can concatenate
  them so that we can still use a single stack decoder. Therefore, the output only
  contains "targets" just like standard LM case.

  We use the same toy example for English-to-German translation task as a running
  example:

  ```
  {"inputs": "translate English to German: That is good.",
   "targets": "Das ist gut."}
  ```

  To be consumed by the decoder-only stack, `seqio.PrefixLMFeatureConverter`
  concatenates them form the new "targets". Consider 2-layer decoder architecture
  whose activations are shown below

  ```

  That  is  good <EOS> Das ist gut <EOS>
   |    |    |    |    |   |    |   |
   u1   u2   u3   u4   u5  u6   u7  u8
   |    |    |    |    |   |    |   |
   v1   v2   v3   v4   v5  v6   v7  v8
   |    |    |    |    |   |    |   |
  <BOS> That is  good <EOS> Das ist gut

  ```

  Let us denote the first layer's activation in the `i`th position as `vi`.
  Similarly, let `ui` denote the activation of the second layer in the `i`th
  position.


  For attention-based sequence models such as Transformer decoders, the
  self-attention layer is used to encode contextualized representation of the
  sequence. At a given layer, each position's representation is computed as a
  function of the representations of the tokens *before* its position in the
  previous layer.

  Referring to the toy example, when computing `u2` with fully-causal masking, we
  do not use `v3`. This results in a representation `u2` of the word "is" that
  does not take into account the word "good", which is unnecessarily limiting.

  For Prefix LM, this issue is resolved by having the fully visible masking
  pattern for the inputs portion only. For example, when computing `u2`, `v1`,
  `v2`, `v3`, `v4` and `v5` are all visible and taken into account. For the tokens
  in the "targets" of the `Task` dataset, we use the causal masking. For example,
  when computing `u6`, all `vi` for `i <= 6` are taken into account but not `v7`.

  <details>
    <summary>Why is `v5` included in the inputs attention pattern?</summary>
    In the same translation example, we note that when computing `u2`, the
    activation corresponding to the position where \<EOS\> token was input (i.e.,
    `v5`) was visible. This doesn't count as "cheating" because the model doesn't
    see the next word "Das". This can provide additional context in building the
    representation for "good". In this case, `u4` has the context that "good" is
    the last word in the sentence.
  </details>

  `seqio.PrefixLMFeatureConverter` provides a feature `decoder_causal_attention`
  to encode this information. For the above example, we have


  ```
  decoder_causal_attention = [1, 1, 1, 1, 1, 0, 0, 0]
  ```

  indicating that the non-causal attention can be applied to the first five
  positions. Note that this feature seems trivial, but for a packed dataset
  the inputs and targets boundary are more nuanced.


  A final consideration for the prefix LM is that because we concatenate "inputs"
  and "targets", which tokens are used for the loss computation is a modeling
  decision. For example, we can penalize the models only for the "targets" tokens
  or we may choose to penalize building the representation for "inputs" tokens.
  This is controlled by `loss_on_targets_only` argument (defaults to `True`) to
  `seqio.PrefixLMFeatureConverter` constructor. In the above example, we would get

  ```
  decoder_loss_weights = [0, 0, 0, 0, 1, 1, 1, 1]
  ```

  This indicates that the last 4 positions are used for the loss computation.

  To get the dataset with prefix LM features, we can use

  ```python
  dataset: tf.data.Dataset = seqio.get_dataset(
      mixture_or_task_name="wmt_t2t_ende_v003",
      task_feature_lengths={"inputs": 32, "targets": 32},
      dataset_split="train",
      shuffle=True,
      feature_converter=seqio.PrefixLMFeatureConverter(
          pack=True,
          loss_on_targets_only=True)
  )
  ```

  The resulting features have length 64 because it concatenates inputs and targets
  each with length 32.

  The output dataset has the following model features. Note that the only
  additional feature is `decoder_causal_attention`.

  |Feature name          | Explanation                |
  |----------------------|---------------------------|
  |`decoder_target_tokens`| Output tokens from the decoder |
  |`decoder_input_tokens` | Input tokens to the decoder |
  |`decoder_loss_weights` | Binary mask to indicate where the loss should be
  taken |
  |`decoder_positions`    | Position index in the sequence before packing|
  |`decoder_segment_ids`  | Sequence membership before packing. Two positions with
  the ` same positive integer mean that they belong to the same sequence before
  packing. |
  |`decoder_causal_attention`| Binary mask denoting which tokens are in the
  non-causal masking region.|


  Like decoder-only architecture, this one is a single stack, but not
  autoregressive.

  One notable assumption is that the inputs and targets are *aligned*, i.e., they
  have the same sequence length and `i`th position in the targets correspond to
  the output representation of the `i`th token in the inputs.

  A common model using encoder-only architecture is
  [BERT](https://arxiv.org/abs/1810.04805). We provide `Encoder` feature converter
  class to support the Masked Language Modeling (MLM) objective from BERT.

  We assume that a unique sentinel such as `[MASK]` token is used to mask some
  fraction of the input text and the task is to recover the original text.
  Therefore, the "targets" is naturally defined as the original text whereas
  "inputs" are the masked text.

  Encoder-only models are often used for classification tasks. In BERT, a special
  token `[CLS]` is prepended to the input sequence. The last layer's activation
  corresponding to this sentinel token is the contextualized representation of the
  sequence. We assume that such "classification" sentinel is prepended.

  Consider the following example for the MLM task. The input dataset has two
  examples, which is packed to one example. We assume that `mask_id = 9` and the
  `[CLS]` token has id of 8.

  ```py
  dataset = [{"inputs": [8, 9, 9, 3, 4], "targets": [8, 7, 4, 3, 4]},
             {"inputs": [8, 3, 9], "targets": [8, 3, 6]}]

  converted_dataset = {
       "encoder_input_tokens": [8, 9, 9, 3, 4, 1, 8, 3, 9, 1, 0],
      "encoder_target_tokens": [8, 7, 4, 3, 4, 1, 8, 3, 6, 1, 0],
        "encoder_segment_ids": [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0],
          "encoder_positions": [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0],
       "encoder_loss_weights": [0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0],
  }
  ```

  Note that the packed sequence has `[CLS]` token at the beginning of each
  sequences. Also note that the loss is taken only on the masked position.

  To use the pre-defined `EncoderFeatureConverter`, provide `mask_id` as an
  argument.

  ```py
  dataset: tf.data.Dataset = seqio.get_dataset(
      mixture_or_task_name="some mlm task",
      task_feature_lengths={"inputs": 32, "targets": 32},
      dataset_split="train",
      shuffle=True,
      feature_converter=seqio.EncoderFeatureConverter(
          pack=True,
          mask_id=9)
  )
  ```

  The resulting dataset object has the following 5 fields

  |Feature name          | Explanation                |
  |----------------------|---------------------------|
  |`encoder_input_tokens` | Input tokens to the encoder |
  |`encoder_positions`    | Position index in the sequence before packing|
  |`encoder_segment_ids`  | Sequence membership before packing. Two positions with
  the ` same positive integer mean that they belong to the same sequence before
  packing. |
  |`encoder_target_tokens`| Output tokens from the encoder |
  |`encoder_loss_weights` | Binary mask to indicate where the loss should be taken |                                          :


  For a custom model architecture, you need to create a subclass of
  `FeatureConverter` and override two methods `_convert_features` and
  `get_model_feature_lengths` to define how task features are mapped to the model
  features, including the length relationships. The existing feature converters
  (e.g., `seqio.EncDecFeatureConverter`) follow the same pattern, which can be a
  useful starting point.



  The SeqIO `Evaluator` class provides a way to evaluate models on SeqIO Tasks
  and Mixtures. For an interactive walkthrough of SeqIO evaluation, see the
  [Evaluation Notebook](https://github.com/google/seqio/blob/main/seqio/docs/tutorials.md).
  The following is a deep-dive into the `Evaluator` class.

  An Evaluator instance can be created by passing a SeqIO Task or
  Mixture, and additional eval params like feature converter, split, sequence
  lengths, seed, etc. The Evaluator init calls `get_dataset` for each Task to be
  evaluated with the appropriate params, creating the `task_dataset`, and invokes
  the model-specific feature converter on the `task_dataset` to create features
  that can be passed to a model, called `model_dataset`. Both `task_dataset` and
  `model_dataset` are stored in-memory so that the dataset can be reused across
  multiple evaluations (e.g. on checkpoints from a training run). Both datasets
  are enumerated so that even if the order of examples is changed during model
  inference, the enumeration can be used to match model outputs to examples from
  the `task_dataset`.

  For Mixtures, each sub-Task is evaluated separately, regardless of mixing
  rates, because in the context of eval benchmarks, Mixtures commonly refer to a
  collection of Tasks belonging to that benchmark, each of which is evaluated
  separately, e.g. SuperGLUE mixture.

  Once an `Evaluator` instance is created with a SeqIO Task or Mixture, a model
  can be evaluated by calling `evaluator.evaluate(...)` and passing a `predict_fn`
  and/or a `predict_with_aux_fn` and/or a `score_fn` to interact with the model.
  `predict_fn` takes the `model_dataset` as input and outputs a `Sequence[(index,
  token_ids)]` where `token_ids` is the sequence of token ids generated by the
  model for the input example whose index matches `index`. Therefore, even if
  `predict_fn` mixes the order of the examples during prediction, the order can be
  corrected as long as the correct index for each example is maintained. A common
  example is the multi-host setup where the evaluation dataset is split amongst
  multiple hosts that independently make predictions and combine the results
  during which the ordering can be mixed. `predict_with_aux_fn` is similar to
  `predict_fn`, except that it can also return a dictionary of auxiliary values
  along with each sequence of `token_ids`, e.g. scores from the generated tokens.
  The `score_fn` takes the `model_dataset` as input and returns a
  `Sequence[(index, score)]` where `score` is the sequence of log likelihood
  scores for the targets in the dataset. This simple interface allows users to
  easily integrate the SeqIO evaluation flow with popular training frameworks in
  TF and Jax.

  Corresponding to the model fns, users can configure three kinds of metric fns in
  their Tasks, which are differentiated by their function signature. Metrics
  computed on the outputs of `predict_fn` (and `predict_with_aux_fn`) have the
  signature `targets` and `predictions` (and optionally `aux_values`), while
  metrics computed on the outputs of `score_fn` have the signature `targets` and
  `scores`. The `Evaluator` takes care of calling the correct model fns and
  metric fns during evaluation. Here is an example of a metric of each type.

  ```
  def sequence_accuracy(targets, predictions):
   seq_acc = 100 * np.mean([p == t for p, t in zip(predictions, targets)])
   return {"sequence_accuracy": seq_acc}

  def log_likelihood(targets, scores):
   log_likelihood = np.mean([scipy.special.logsumexp(el) for el in scores])
   return {"log_likelihood": log_likelihood}
  ```

  There are 4 steps involved in the evaluation using predicted tokens:

  +   the `predict_fn` or `predict_with_aux_fn` returns indices and output_tokens:
      `Sequence[Tuple[int, Sequence[int]]]`, potentially with some auxiliary
      values.
  +   output tokens are decoded by `vocab.decode`
  +   postprocessors configured in Tasks are applied to the decoded output. These
      are denoted as predictions.
  +   metric fns configured in Tasks are applied to the predictions and the cached
      targets.

  There are 2 steps involved in the evaluation using scores:

  +   the `score_fn` returns indices and scores: `Sequence[Tuple[int,
      Sequence[float]]]`
  +   metric fns configured in Tasks is applied to the scores and the cached
      targets.

  Training codebases like T5X provide integration with SeqIO evaluation to allow
  evaluating checkpoints on SeqIO Tasks and Mixtures. See
  [T5X Eval](https://github.com/google-research/t5x/blob/main/docs/usage/eval.md)
  for instructions.



  The original `t5` library introduced and implemented the `t5.data.Task`
  abstraction for specifying preprocessing and evaluation metrics for text-to-text
  tasks. When creating a task, users specify a source dataset of raw text, some
  preprocessing steps, a vocabulary for tokenization, and evaluation metrics. The
  fully-specified Task can then be used to pre-train or fine-tune a
  encoder-decoder transformer model. However, the design included many baked-in
  assumptions about the types of tasks users could specify.

  SeqIO removes some of the constraints of this abstraction:

  *   Inputs and outputs are no longer required to be strings (e.g., it may be
      images or audio).
  *   Architectures other than the original encoder-decoder are supported (e.g.,
      decoder-only language models like GPT or encoder-only models like BERT).
  *   Users can control at which stage of the pipeline offline caching occurs.
  *   Users can control when and where EOS tokens are added.

  Furthermore, SeqIO has been made more modular with respect to the Mesh
  TensorFlow Transformer. This allows it to be used with other model
  implementations with more consistency and much less code duplication.




  This version of TriviaQA was introduced in [Roberts et al.
  2020](https://arxiv.org/abs/2002.08910).


  ```py
  seqio.TaskRegistry.add(
      "trivia_qa_open",
      source=seqio.TfdsDataSource(
        tfds_name="trivia_qa/unfiltered.nocontext:1.1.0",
        splits={
            "train": "train[:90%]",
            "validation": "train[90%:]",
            "test": "validation"
        }),
      preprocessors=[
          tqa_open_preprocessor,
          seqio.preprocessors.tokenize,
          seqio.preprocessors.append_eos,
      ],
      output_features={
          "inputs": seqio.Feature(
             seqio.SentencePieceVocabulary("/path/to/inputs/vocab"),
             add_eos=False, dtype=tf.int32
          ),
          "targets": seqio.Feature(
             seqio.SentencePieceVocabulary("/path/to/targets/vocab"),
             add_eos=True, dtype=tf.int32
          ),
      },
      postprocess_fn=tqa_open_postprocessor,
      metric_fns=[tqa_metric])
  ```

  In this example, we are using the `TfdsDataSource`. We specify the name of the
  TriviaQA dataset in TFDS
  ([`"trivia_qa"`](https://www.tensorflow.org/datasets/catalog/trivia_qa)), the
  specific config that excludes the context for the open domain setting
  (`"unfiltered.nocontext"`), and the version number (`"1.1.0"`). We also override
  the default splits to match what is commonly used for the open domain setting.
  Specifically, we set our "test" split to be the TFDS "validation" split, and
  create a small pseudo-"validation" set by taking examples out of the TFDS
  "train" split.

  The preprocessor `tqa_open_preprocessor` is defined as follows.

  ```py
  def tqa_open_preprocessor(
      dataset: tf.data.Dataset,
      prefix:str = "trivia_qa question: "
    ) -> tf.data.Dataset:
    """Convert TriviaQA dataset to open domain qa examples.

    The function takes the trivia_qa TFDS dataset and emits examples of the
    form:
    {
      "inputs": "trivia_qa question: What are the names of the Olsen Twins?"
      "targets": "Mary-Kate and Ashley",
      "answers": ["Mary-Kate and Ashley", "Ashley and Mary-Kate"]
    }

    Args:
      dataset: a tf.data.Dataset to process.
      prefix: str, prefix to prepend to the inputs.

    Returns:
      a tf.data.Dataset
    """
    def tqa_map(ex):
      """Map TriviaQA example to text-to-text example."""
      return {
          "inputs": prefix + ex["question"],
          "targets": ex["answer"]["value"],
          "answers": ex["answer"]["aliases"],
      }

    return dataset.map(tqa_map, num_parallel_calls=tf.data.experimental.AUTOTUNE)
  ```

  Or with the `seqio.map_overdataset` decorator, we have

  ```py
  def tqa_open_preprocessor(
    dataset: tf.data.Dataset,
    prefix: str = "trivia_qa question: "
  ) -> tf.data.Dataset:

    @seqio.map_over_dataset
    def tqa_map(ex: Mapping[str, tf.Tensor]) -> Mapping[str, tf.Tensor]:
      """Map TriviaQA example to text-to-text example."""
      return {
          "inputs": prefix + ex["question"],
          "targets": ex["answer"]["value"],
          "answers": ex["answer"]["aliases"],
      }

  return tqa_map(dataset)
  ```

  Here we made a thin wrapper to emphasize that the function decorated by
  `seqio.map_over_dataset` takes in an instance of `tf.data.Dataset`. In practice,
  this wrapper is not necessary.


  The postprocessor for this example is `tqa_open_postprocessor`, which is defined
  as follows:

  ```py
  def tqa_open_postprocessor(output_or_target, example=None, is_target=False):
    """Returns output as answer, or all answers if the full example is provided."""
    if is_target:
      return [a.decode("utf-8") for a in example["answers"]]
    else:
      return output_or_target.decode("utf-8")
  ```

  When processing the target, we ignore `output_or_target` (equivalent to
  `example["targets"]`) since it is just selecting a single answer in
  `trivia_qa_open`. Instead, we extract the full list of answers from the example
  and convert them from bytes to text. When handling the model output, we simply
  convert it to text from detokenized bytes.

  The metric function `tqa_metric` is defined as:

  ```py
  def tqa_metric(
    targets: Sequence[Sequence[str]],
    predictions: Sequence[str]
  ) -> Mapping[str, seqio.metrics.MetricValueValue]:
    """Computes official TriviaQA metrics.

    Args:
      targets: list of lists of strings
      predictions: list of strings

    Returns:
      dict with score_key: squad score across all targets and predictions
    """

    if len(targets) != len(predictions):
      raise ValueError("Number of targets and predictions must match.")

    def _normalize_answer(text):
      """Lower text and remove punctuation, articles and extra whitespace."""
      
      text = re.sub(r"\b(a|an|the)\b", " ", s)
      
      for punc in string.punctuation:
        text = text.replace(punc, '')
      
      text = " ".join(s.split())
      return text

    
    targets = [[_normalize_answer(t) for t in u] for u in targets]
    predictions = [_normalize_answer(p) for p in predictions]

    em = np.mean([
        max(pred == gt for gt in ground_truths)
        for pred, ground_truths in zip(predictions, targets)
    ])
    return {
        "exact_match": seqio.metrics.Scalar(em),
    }
  ```


  Please use the following bibtex entry to cite SeqIO.

  ```
  @article{roberts2022t5x,
    url = {https://arxiv.org/abs/2203.17189},
    author = {Roberts, Adam and Chung, Hyung Won and Levskaya, Anselm and Mishra,
    Gaurav and Bradbury, James and Andor, Daniel and Narang, Sharan and Lester,
    Brian and Gaffney, Colin and Mohiuddin, Afroz and Hawthorne, Curtis and
    Lewkowycz, Aitor and Salcianu, Alex and van Zee, Marc and Austin, Jacob and
    Goodman, Sebastian and Soares, Livio Baldini and Hu, Haitang and
    Tsvyashchenko, Sasha and Chowdhery, Aakanksha and Bastings, Jasmijn and
    Bulian, Jannis and Garcia, Xavier and Ni, Jianmo and Chen, Andrew and Kenealy,
    Kathleen and Clark, Jonathan H. and Lee, Stephan and Garrette, Dan and
    Lee-Thorp, James and Raffel, Colin and Shazeer, Noam and Ritter, Marvin and
    Bosma, Maarten and Passos, Alexandre and Maitin-Shepard, Jeremy and Fiedel,
    Noah and Omernick, Mark and Saeta, Brennan and Sepassi, Ryan and Spiridonov,
    Alexander and Newlan, Joshua and Gesmundo, Andrea},
    title = {Scaling Up Models and Data with $\texttt{t5x}$ and $\texttt{seqio}$},
    journal={arXiv preprint arXiv:2203.17189},
    year = {2022},
  }
  ```


pkgId: e0ee153cf50541bb8dbabe8a0003135c9006fe26f63b4bb235b68272ce8d8789
name: python-serious-help
arch: noarch
version: 1.6.2
epoch: 0
release: 1
summary: Development documents and examples for serious
url: https://github.com/mdrachuk/serious
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-serious-1.6.2-1.src.rpm
location_href: Packages/python-serious-help-1.6.2-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/serious)][pypi]
  [![Build Status](https://img.shields.io/azure-devops/build/misha-drachuk/serious/2)](https://dev.azure.com/misha-drachuk/serious/_build/latest?definitionId=1&branchName=master)
  [![Test Coverage](https://img.shields.io/coveralls/github/mdrachuk/serious/master)](https://coveralls.io/github/mdrachuk/serious)
  [![Supported Python](https://img.shields.io/pypi/pyversions/serious)][pypi]
  [![Documentation](https://img.shields.io/readthedocs/serious)][docs]

  A dataclass model toolkit: serialization, validation, and more.

  [Documentation][docs]



  - Model definitions in pure Python.
  - Validation showing up in code coverage.
  - Type annotations for all public-facing APIs.
  - (Optionally) ensures immutability.
  - Easily extensible.
  - Made for people.
  - Documented rigorously.



  Available from [PyPI][pypi]:
  ```shell
  pip install serious
  ```



  Central part of Serious API are different [Models][doc-models].

  Given a regular dataclass:
  ```python
  from dataclasses import dataclass

  @dataclass
  class Person:
      name: str
  ```

  Let’s create a `JsonModel`:
  ```python
  from serious.json import JsonModel

  model = JsonModel(Person)
  ```

  And use its [dump/load methods][doc-serialization]:
  ```python
  person = Person('Albert Einstein')

  model.dump(person) # {"name": "Albert Einstein"}
  ```


  To add validation to the example above all we need is to add `__validate__` method to person:
  ```python
  from dataclasses import dataclass
  from typing import Optional
  from serious import ValidationError, Email

  @dataclass
  class Person:
      name: str
      email: Optional[Email]
      phone: Optional[str]

      def __validate__(self):
          if len(self.name) == 0:
              raise ValidationError('Every person needs a name')
          if self.phone is None and self.email is None:
              raise ValidationError('At least some contact should be present')
  ```

  [More on validation.][doc-validation]



  - [x] [JSON][doc-json-model]
  - [x] [Python Dictionaries][doc-dict-model]
  - [ ] YAML
  - [ ] Form data



  [More in docs.][doc-types]

  - Other dataclasses
  - Primitives: `str`, `int`, `float`, `bool`
  - Dictionaries: only with string keys: `Dict[str, Any]`
  - Lists, [sets][set], [deques][deque]: python collections of any serializable type
  - [Tuples][tuple] both with and without ellipsis:
      - tuples as set of independent elements (e.g. `Tuple[str, int, date]`)
      - with ellipses, acting as a frozen list (`Tuple[str, ...]`)
  - [Enumerations][enum] by value:
      - of primitives (e.g. `OperatingSystem(Enum)`)
      - typed enums (`Color(str, Enum)` and `FilePermission(IntFlag)`)
  - [Decimal][decimal]: encoded to JSON as string
  - [Datetime][datetime], [date][date] and [time][time]: encoded to the [ISO 8601][iso8601] formatted string
  - [UUID][uuid]
  - `serious.types.Timestamp`: a UTC timestamp since [UNIX epoch][epoch] as float ms value
  - `serious.types.Email`: a string Tiny Type that supports validation and contains additional properties
  - custom immutable alternatives to native python types in `serious.types`: `FrozenList`, `FrozenDict`



  ```python
  from dataclasses import dataclass
  from serious import JsonModel, ValidationError
  from typing import List
  from enum import Enum

  class Specialty(Enum):
      Worker = 1
      Fool = 2


  @dataclass(frozen=True)
  class Minion:
      name: str
      type: Specialty


  @dataclass(frozen=True)
  class Boss:
      name: str
      minions: List[Minion]

      def __validate__(self):
          if len(self.minions) < 2:
              raise ValidationError('What kind of boss are you?')


  boss = Boss("me", [Minion('evil minion', Specialty.Fool), Minion('very evil minion', Specialty.Worker)])
  boss_json = """{
      "name": "me",
      "minions": [
          {
              "name": "evil minion",
              "type": "Fool"
          },
          {
              "name": "very evil minion",
              "type": "Worker"
          }
      ]
  }"""

  model = JsonModel(Boss, indent=4)

  assert model.dump(boss) == boss_json
  assert model.load(boss_json) == boss
  ```



  Initially, a fork of [@lidatong/dataclasses-json](https://github.com/lidatong/dataclasses-json).

  [pypi]: https://pypi.org/project/serious/
  [dataclass]: https://docs.python.org/3/library/dataclasses.html
  [iso8601]: https://en.wikipedia.org/wiki/ISO_8601
  [epoch]: https://en.wikipedia.org/wiki/Unix_time
  [enum]: https://docs.python.org/3/library/enum.html
  [decimal]: https://docs.python.org/3/library/decimal.html
  [tuple]: https://docs.python.org/3/library/stdtypes.html#tuple
  [list]: https://docs.python.org/3/library/stdtypes.html#list
  [set]: https://docs.python.org/3/library/stdtypes.html#set
  [deque]: https://docs.python.org/3.7/library/collections.html#collections.deque
  [datetime]: https://docs.python.org/3.7/library/datetime.html#datetime.datetime
  [date]: https://docs.python.org/3.7/library/datetime.html#datetime.date
  [time]: https://docs.python.org/3.7/library/datetime.html#datetime.time
  [uuid]: https://docs.python.org/3.7/library/uuid.html?highlight=uuid#uuid.UUID
  [doc-types]: https://serious.readthedocs.io/en/latest/types/
  [doc-models]: https://serious.readthedocs.io/en/latest/models/
  [doc-json-model]: https://serious.readthedocs.io/en/latest/models/#jsonmodel
  [doc-dict-model]: https://serious.readthedocs.io/en/latest/models/#dictmodel
  [doc-serialization]: https://serious.readthedocs.io/en/latest/serialization/ (Serialization documentation)
  [doc-validation]: https://serious.readthedocs.io/en/latest/validation/ (Validation documentation)
  [docs]: https://serious.readthedocs.io/en/latest/


pkgId: 7f29b53ab8dd0310879d14f4da40db8ef7ab8255d8dab66edff3a33fc2a339be
name: python-servc-help
arch: noarch
version: 1.3.1
epoch: 0
release: 1
summary: Development documents and examples for servc
url: https://github.com/serv-c/servc-python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-servc-1.3.1-1.src.rpm
location_href: Packages/python-servc-help-1.3.1-1.noarch.rpm
checksum_type: sha256
description:
  Serv-C implmentation for Python. Documentation can be found https://docs.servc.io

  [![PyPI version](https://badge.fury.io/py/servc.svg)](https://badge.fury.io/py/servc)
  ![Serv-C](https://github.com/serv-c/servc-python/actions/workflows/servc.yml/badge.svg)



  Here is the most simple example of use, starting a server to handle requests at the route `my-route`;

  ```python
  from servc.server import start_server

  def inputProcessor(messageId, bus, cache, payload, components, emitEvent):
    pass


  start_server(
    resolver={
      "methodA": inputProcessor
    }
  )
  ```


pkgId: d8b496f44c51e9111ca7b8cee5bdf41d67e58843d975690052fc715c5ad3f532
name: python-server-monitoring-made-easy-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for server-monitoring-made-easy
url: https://pypi.org/project/server-monitoring-made-easy/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-server-monitoring-made-easy-0.1.1-1.src.rpm
location_href: Packages/python-server-monitoring-made-easy-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  A lightweight, easy-to-configure server monitoring tool that focuses on the metrics that matter most.



  - Monitor critical server metrics:
    - CPU usage
    - Memory consumption
    - Disk space
    - Network latency (ping)
  - Flexible storage options:
    - File-based storage with JSON
    - PostgreSQL database support
  - Advanced alert management:
    - Customizable thresholds
    - Alert count requirements before triggering
    - Automatic alert resolution
    - Alert history and pruning
  - Comprehensive logging:
    - Component-level log configuration
    - Configurable log paths
    - Debug logging support
  - Run modes:
    - Daemon mode with proper PID management
    - Foreground mode for debugging
    - Container support
  - Easy-to-use CLI interface
  - Extensible architecture for custom monitors



  From source:

  ```bash
  git clone https://github.com/timmyb824/server-monitoring-made-easy.git
  cd server-monitoring-made-easy
  pip install -e .
  ```



  Create a configuration file `config.yaml`. Here's a complete example with all available options (required options are marked with \*):

  ````yaml

  logging:
    level: debug # Global log level (debug, info, warning, error)
    components: # Component-specific log levels (all optional)
      monitors: debug
      alerts: debug
      metrics: debug
      daemon: debug
      storage: debug
      alerts: debug


  paths:
    
    log_file: "/path/to/log/server-monitor.log"
    
    pid_file: "/path/to/pid/server-monitor.pid"


  storage: # * At least one storage type must be configured
    
    type: file
    
    file_path: "/path/to/alerts.json" # * Required if type is 'file'
    
    

    
    pruning:
      enabled: true
      max_age_days: 30 # Remove alerts older than this
      max_alerts: 1000 # Keep only the most recent N alerts


  monitors: # * At least one monitor must be enabled
    cpu:
      enabled: true # * Required for each monitor
      interval: 60 # Check every 60 seconds (optional, default: 60)
      threshold: 80 # Alert when CPU usage > 80% (optional, default: 80)
      alert_count: 3 # Require 3 consecutive threshold violations (optional, default: 1)

    memory:
      enabled: true
      interval: 60
      threshold: 80
      alert_count: 1 # Alert immediately on threshold violation

    disk:
      enabled: true
      interval: 300 # Check every 5 minutes
      threshold: 85
      alert_count: 2
      path: / # Monitor specific path (optional, default: /)

    ping:
      enabled: true
      interval: 60
      threshold: 200 # Alert when ping > 200ms
      alert_count: 5
      targets: # * Required if ping monitor is enabled
        - 8.8.8.8
        - 1.1.1.1
        - google.com


  alerts:
    
    default_alert_count: 1 # Default threshold violations before alerting (optional)
    resolution_time: 300 # Seconds to wait before auto-resolving (optional, default: 300)

  {{ ... }}



  - `server-monitor start [-f/--foreground] [-c/--config PATH]`: Start monitoring
    - `-f/--foreground`: Run in foreground instead of as daemon
    - `-c/--config`: Specify config file path
  - `server-monitor stop`: Stop the monitoring daemon
  - `server-monitor status`: Show daemon status
  - `server-monitor metrics`: Display current system metrics
  - `server-monitor alerts`: Show current and historical alerts
  - `server-monitor config show`: Display current configuration
  - `server-monitor config validate`: Validate configuration file
  - `server-monitor init PATH`: Create new configuration file with defaults





  1. Create a systemd service file at `/etc/systemd/system/server-monitor.service`:

  ```ini
  [Unit]
  Description=Server Monitoring Made Easy
  After=network.target

  [Service]
  Type=simple
  User=your_user
  Environment="SME_CONFIG=/path/to/config.yaml"
  ExecStart=/path/to/python/bin/server-monitor start --foreground
  Restart=always
  RestartSec=30

  [Install]
  WantedBy=multi-user.target
  ````

  2. Enable and start the service:

  ```bash
  sudo systemctl daemon-reload
  sudo systemctl enable server-monitor
  sudo systemctl start server-monitor
  ```



  ```yaml
  version: "3"
  services:
    monitor:
      build: .
      pid: "host" # Required for accurate system metrics
      volumes:
        - /proc:/host/proc:ro # For host metrics
        - ./config.yaml:/app/config.yaml:ro
      restart: unless-stopped
  ```



  For development and testing:

  ```bash

  poetry install


  poetry run pytest tests/ -v
  ```



  Contributions are welcome! Please feel free to submit a Pull Request.



  MIT License


pkgId: 4fe34a3850cacfbe4c19111e6597830390cf209cfc9b4f6d1a4f594bcab01e76
name: python-service-config-foundry-help
arch: noarch
version: 0.2
epoch: 0
release: 1
summary: Development documents and examples for service-config-foundry
url: https://github.com/yushdotkapoor/service-config-foundry
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-service-config-foundry-0.2-1.src.rpm
location_href: Packages/python-service-config-foundry-help-0.2-1.noarch.rpm
checksum_type: sha256
description:
  **service-config-foundry** is a Python-based library that simplifies the process of creating, updating, replacing, and deleting systemd service files for Linux users. With this tool, you can easily manage systemd services programmatically, reducing the complexity of writing and maintaining service configuration files manually.



  - Create and manage non-templated systemd service files
  - Support for various systemd file types including `.service`, `.timer`, `.socket`, `.mount`, and more
  - Programmatic control over file attributes and configurations
  - Replace and update existing services without conflicts
  - Fully integrated Python API with no external dependencies



  You can install the library using `pip` directly from the GitHub repository:

  ```bash
  pip install git+https://github.com/yushdotkapoor/service-config-foundry.git
  ```

  Alternatively, clone the repository to get started:

  ```bash
  git clone https://github.com/yushdotkapoor/service-config-foundry.git
  cd service-config-foundry
  ```



  Below are detailed examples of how to use `service-config-foundry` to create and manage systemd files of various types.



  ```python
  from service import Service
  from service_location import ServiceLocation


  service = Service("example", service_location=ServiceLocation.GLOBAL, auto_start=False, enable_at_startup=False, force_overwrite=False)


  service_file = service.service_file
  service_file.unit.description = "Example service for demonstration purposes"
  service_file.service.user = "yushrajkapoor"
  service_file.service.exec_start = "echo Hello, world >> /tmp/example.log"
  service_file.install.wanted_by = "multi-user.target"


  timer_file = service.timer_file
  timer_file.unit.description = "Example timer for demonstration purposes"
  timer_file.timer.on_calendar = "*-*-* *:00:00"
  timer_file.install.wanted_by = "timers.target"


  socket_file = service.socket_file
  socket_file.unit.description = "Example socket for demonstration purposes"
  socket_file.socket.listen_stream = "/run/example.sock"
  socket_file.install.wanted_by = "sockets.target"


  service.update()


  service.enable_service_at_startup()


  service.start_service()


  service.status()
  ```




  ```ini
  [Unit]
  Description = Example service for demonstration purposes

  [Service]
  User = yushrajkapoor
  ExecStart = echo Hello, world >> /tmp/example.log

  [Install]
  WantedBy = multi-user.target
  ```


  ```ini
  [Unit]
  Description = Example timer for demonstration purposes

  [Timer]
  OnCalendar = *-*-* *:00:00

  [Install]
  WantedBy = timers.target
  ```


  ```ini
  [Unit]
  Description = Example socket for demonstration purposes

  [Socket]
  ListenStream = /run/example.sock

  [Install]
  WantedBy = sockets.target
  ```



  If you want to replace an existing service configuration, you can use the `replace()` method. This ensures that any old files are removed and replaced with the new configuration.

  ```python

  service.replace()
  ```

  This is particularly useful when you want to ensure that your updates overwrite any conflicting configurations from previous versions of the service.



  ```python

  mount_file = service.mount_file
  mount_file.unit.description = "Example mount for demonstration purposes"
  mount_file.mount.what = "/dev/sda1"
  mount_file.mount.where = "/mnt/example"
  mount_file.mount.type = "ext4"
  mount_file.install.wanted_by = "multi-user.target"


  automount_file = service.automount_file
  automount_file.unit.description = "Example automount for demonstration purposes"
  automount_file.automount.where = "/mnt/example"
  automount_file.install.wanted_by = "multi-user.target"


  service.update()
  ```


  ```ini
  [Unit]
  Description = Example mount for demonstration purposes

  [Mount]
  What = /dev/sda1
  Where = /mnt/example
  Type = ext4

  [Install]
  WantedBy = multi-user.target
  ```


  ```ini
  [Unit]
  Description = Example automount for demonstration purposes

  [Automount]
  Where = /mnt/example

  [Install]
  WantedBy = multi-user.target
  ```



  ```python

  swap_file = service.swap_file
  swap_file.unit.description = "Example swap for demonstration purposes"
  swap_file.swap.what = "/swapfile"
  swap_file.install.wanted_by = "multi-user.target"


  path_file = service.path_file
  path_file.unit.description = "Example path for demonstration purposes"
  path_file.path.path_exists = "/tmp/example"
  path_file.install.wanted_by = "multi-user.target"


  service.update()
  ```


  ```ini
  [Unit]
  Description = Example swap for demonstration purposes

  [Swap]
  What = /swapfile

  [Install]
  WantedBy = multi-user.target
  ```


  ```ini
  [Unit]
  Description = Example path for demonstration purposes

  [Path]
  PathExists = /tmp/example

  [Install]
  WantedBy = multi-user.target
  ```



  ```python

  slice_file = service.slice_file
  slice_file.unit.description = "Example slice for demonstration purposes"


  scope_file = service.scope_file
  scope_file.unit.description = "Example scope for demonstration purposes"
  scope_file.scope.slice = "example.slice"


  service.update()
  ```


  ```ini
  [Unit]
  Description = Example slice for demonstration purposes
  ```


  ```ini
  [Unit]
  Description = Example scope for demonstration purposes

  [Scope]
  Slice = example.slice
  ```



  To delete a service and its associated files:

  ```python
  service.delete()
  ```

  This will remove all files matching the service name in the systemd directory.



  `service-config-foundry` supports multiple systemd file types, including:

  - `.service` - Main service configuration
  - `.socket` - Socket configuration
  - `.timer` - Timer configuration
  - `.mount` - Mount point configuration
  - `.automount` - Automount configuration
  - `.swap` - Swap space configuration
  - `.path` - Path configuration
  - `.slice` - Slice configuration
  - `.scope` - Scope configuration



  This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.



  Contributions are welcome! If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request.



  - **Author**: Yush Kapoor
  - **Email**: [yushdotkapoor@gmail.com](mailto:yushdotkapoor@gmail.com)
  - **GitHub**: [https://github.com/yushdotkapoor/service-config-foundry](https://github.com/yushdotkapoor/service-config-foundry)



  Special thanks to the Linux and Python communities for their inspiration and support in creating this project.


pkgId: 2bf40d18cf21fe6aa8d0aa8916b8321e85a44d165182903b211e14a85a31a851
name: python-servicelayer-help
arch: noarch
version: 1.23.2
epoch: 0
release: 1
summary: Development documents and examples for servicelayer
url: http://github.com/alephdata/servicelayer
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-servicelayer-1.23.2-1.src.rpm
location_href: Packages/python-servicelayer-help-1.23.2-1.noarch.rpm
checksum_type: sha256
description:
  [![servicelayer](https://github.com/alephdata/servicelayer/actions/workflows/build.yml/badge.svg)](https://github.com/alephdata/servicelayer/actions/workflows/build.yml)

  Components of the aleph data toolkit needed to interact with networked services,
  such as a storage archive, job queueing, cache, and structured logging. This
  package contains some common configuration components for all of these services
  using environment variables.



  This library provides a configurable method for file storage used by aleph and
  memorious. It will store files based on their content hash (SHA1) and allows for
  later retrieval of the content.





  ```
  git pull --rebase
  make build-docker test
  bump2version --no-commit --dry-run --verbose {patch,minor,major} # to test if this looks good
  bump2version --verbose {patch,minor,major}
  git push --atomic origin main $(git describe --tags --abbrev=0)
  ```


pkgId: 818f57d3ff2af86d1378c64a75a64a003c20e2053aeb1423833eb7ec4174215d
name: python-servitorconnectqr-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for servitorconnectqr
url: https://github.com/tsweet77/servitorconnectqr
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-servitorconnectqr-1.0.1-1.src.rpm
location_href: Packages/python-servitorconnectqr-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  A CLI tool for manifesting intentions through a QR Code.
  It uses Universe Sourcecode with the intention to generate the QR Code.

  It adds this after the intention: " ∞ॐ OM MANI PADME HUM AMPLIFIED PERFECTLY PAUSES IN DIVINE FLOW RUNS UNTIL FULFILLED"
  It allows the Universe to run the QR Code as if it's a program.


  Install via pip: pip install servitorconnectqr


  servitorconnectqr


pkgId: bdd69d7099244016b906a47d37dbcae384d95f126c598ea1494c1c554ca239e9
name: python-session-tester-help
arch: noarch
version: 0.1.0rc2
epoch: 0
release: 1
summary: Development documents and examples for session-tester
url: https://github.com/session-tester/session-tester
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-session-tester-0.1.0rc2-1.src.rpm
location_href: Packages/python-session-tester-help-0.1.0rc2-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
      <a href="README_en.md">English</a> •
      <a>中文</a>
  </p>

  一个 **面向会话（多轮请求、状态更新）** 的测试框架库。

  测试过程、预期检查、报告都体现在代码上，**Test as Code**。

  - 会话状态维护，支持编排多轮不同服务、不同内容的请求
  - 修饰器、类、静态函数三种方式，灵活添加测试用例。方便累积、复用测试用例
  - 清空会话、仅校验、压测三种模式，可避免测试用例不全而重复发送请求的低效
  - 单请求级、单会话级、全会话级三种级别用例测试，覆盖绝大部分测试场景
  - 提供常用工具函数，统计标签分布、HTTP请求耗时等，让测试代码更简洁
  - 自动生成的报告，出汇总表格外，支持每个测试用例可选输出一个详细列表



  考虑推荐、抽奖等服务场景，每个用户会进行多轮请求，每轮请求的结果又依赖于之前的轮次。
  对这类服务的功能测试，需要校验**每个请求返回**、**每个玩家的前后请求返回**、以及**所有玩家的返回分布**等是否符合预期。

  本测试框架，针对以上类似场景，提供了一套解决方案:

  - 为每个玩家维护一个会话信息，允许用户自定义用户信息结构、自定义请求包、根据返回更新会话状态、自定义会话终止条件
  - 如果会话维持或用户分类不同，可以通过多个TestSuite使用不同的会话维持器，进行不同的测试
  - 自定义单请求返回、单会话、多会话的校验函数，用于逻辑正确与否的同时，还可以输出详细的报告，比如返回道具的分布概率等

  直接使用 pip 安装：

  ```shell
  pip install session-tester
  ```

  导入模块：

  ```python
  import session_tester
  ```

  以下是 [demo/session_test_demo.py](demo/session_test_demo.py) 的一个示例。

  2个测试模块逻辑相同，每个包含4个测试用例（含三类校验），并且最后一个测试用例产出额外的详细数据，通过修饰器打开了耗时分布统计：

  ![test_report_cn](https://raw.githubusercontent.com/session-tester/session-tester/main/docs%2Ftest_report_cn.png)

  亦可选择使用压测模式，不记录用户会话数据和校验，直接发送请求，统计返回信息：

  ![benchmark_mode](https://raw.githubusercontent.com/session-tester/session-tester/main/docs%2Fbenchmark_mode.png)



  ![framework.png](https://raw.githubusercontent.com/session-tester/session-tester/main/docs%2Fframework.png)



  **TestCase(测试用例)** 针对一项独立逻辑功能进行逻辑校验。
  每个测试用例最终会在测试报告中生成一条汇总信息，包括测试用例名称、预期结果、是否通过、异常信息等，*可选择*额外输出一份独立的测试报告。

  TestCase 有三类，并对应不同的校验函数：

  - SingleRequestCase，校验单一请求返回，校验函数输入参数为 `HttpTransaction`
  - SingleSessionCase，校验单一会话，校验函数即单个用户多次请求返回，输入参数为 `Session`
  - AllSessionCase，校验所有会话，即所有用户多次请求返回，校验函数输入参数为 `List[Session]`

  比如，以下几项可以分别作为单独的测试用例存在：

  - 一次返回中没有相同的推荐信息
  - 多次的返回结果中没有相同的推荐信息
  - 所有用户的返回的道具信息，符合概率分布

  `CheckResult` 测试结果包含三个元素，分别是是否通过、未通过的提示信息、测试报告信息。

  如果未通过测试，可以带出未通过的原因。

  如果需要产出**额外的测试报告，需要填充测试信息字段**。



  **TestSuite(测试套件)** 用于组织和执行测试用例，包含一个组测试用例和一个会话维持器，这一组测试用例将会对同一批请求返回进行校验。

  不同的TestSuite 使用不同的请求进行校验。如果服务针对不同类型的用户，提供不同概率的道具产出，则可以使用多个的 TestSuite 加载不同类型的用户。

  **Tester** 则是包含一个或多个TestSuite，来运行TestSuite 并将结果汇总，产生测试报告。

  比如以下三项均为一个测试用例

  一个测试用例结构，用于存储测试用例的相关信息，包括测试名称、测试函数、测试结果等。



  **UserInfo** 是一个用户信息结构，用于存储用户的基本信息。
  `user_id`, `user_type` 等常用字段可以直接写入结构，其他属性，可以写入字典 `extra` 中。

  **HttpTransaction** 是一个 HTTP 事务结构，用于存储 HTTP 请求和响应的相关信息，包括请求时间、请求、响应、状态码、耗时等，用于后续分析和验证。

  **Session** 是一个会话结构，用于存储单个用户的多次请求和响应，以及用户的一些状态。
  Session 是存储的单元，每个对应一个文件存放在 test_sessions 目录下的 Tester 级别单独目录。该目录可以通过 `TEST_SESSION_DIR` 环境变量配置。



  SessionMaintainer 是一个会话维护器，其中有一个 `user_info_queue`用于存储用户信息。
  使用者需要指定URL、HTTP方法，另外须简单继承并实现其四个方法，这4个方法伴随着一个会话的生命周期：

  - ``init_session`` 会话开始时调用，可以用于初始化Session，比如拉去用户附加信息、清理用户缓存状态
  - ``req_wrapper`` 用于根据会话状态，封装当次请求包的内容
  - ``update_session`` 用于处理请求返回，更新会话状态
  - ``should_stop_session`` 判断会话是否需要停止

  另外，方法 ``load_user_info()`` 用于用户信息太大时的加载，可以边运行边加载。如果数据量少，也可以直接放到 ``user_info_queue`` 中。



  测试报告是一个Excel文件，包括汇总表、检测详情表。

  汇总表包括测试标题、测试预期、是否通过、异常示例等信息。

  每个测试用例可以输出一个检测详情表，所输出可以自定义表结构和数据。



  在运行测试时有三种模式可以选择：

  - Tester.RUN_MODE_NEW: 清理会话数据，重新开启测试，发送、校验、生成报告
  - Tester.RUN_MODE_CHECK: 使用历史会话数据，不发送请求，直接按照测试用例进行校验，生成报告
  - Tester.RUN_MODE_BENCHMARK: 按照会话维护器逻辑，只发送请求，统计错误和耗时，不记录会话具体内容



  项目中 [demo/session_test_demo.py](demo/session_test_demo.py) 中提供了一个比较详细的使用 Demo。

  本节将根据该 Demo 介绍框架的使用。主要的过程包括：

  - 创建一个或多个 TestSuite
      - 每个 TestSuite 包含一个 SessionMaintainer
      - 每个 TestSuite 包含一个或多个 TestCase
  - 运行测试



  为了使用框架，这里提供了一个简单的HTTP服务。其主要逻辑有以下几点：

  - 接收 POST 请求：服务器接收包含用户 ID、回合数和已拥有数字列表
  - 生成随机物品：从0-99中，提出已经推荐给用户数字，从剩余数字中随机选择 5 个物品
  - 计算签名：基于用户 ID、回合数和随机选择的物品计算一个 MD5 签名

  我们可以做以下测试：

  - 测试每个请求的返回的签名是否正确
  - 测试每个返回中没有重复的数字
  - 测试每个用户的多轮返回中，数字没有重复
  - 统计所有用户的返回，检查数字的总的分布情况

  接下来，我们针对上述逻辑进行测试。因为逻辑简单，**Demo测试中只会涉及一个TestSuite**。



  为了维护会话，我们需要定义一个 `SessionMaintainer` 类。
  SessionMaintainer 分为两部分，一个是加载用户信息的成员方法，另一个是四个静态方法，用来处理会话过程信息。

  加载用户队列的方法 `load_user_info()` 用于加载用户信息，这里我们只是简单地将用户ID放入队列中。
  也可以选择不实现该函数，直接初始化时灌入 `user_info_queue`。

  ```python
  def load_user_info(self):
      for i in range(10):
          self.user_info_queue.put(UserInfo(userid=uuid.uuid4().hex, extra={"index": i}))
  ```

  **初始化会话函数 `init_session()` 用于每个会话的初始化，会在创建会话时被调用**。
  很多用户状态清理或初始化操作可以放到这里来做，比如用户 Redis 缓存的清理，而无需使用额外的工具。

  示例中初始化，创建列表维护用户获得的数字列表，创建一个 `round` 来维护轮次。

  ```python
  @staticmethod
  def init_session(s: Session):
      s.ext_state.update({"items": [], "round": 0})
  ```

  **终止判断函数 `should_stop_session()` 可以让使用者主动判断何时应该停止会话**。
  比如：判断返回中的有了某个道具、会话累计了多少轮次、用户的余额是否为0等等。

  本示例中，因为一共只有100个数字，因此我们只发送20轮请求：

  ```python
  @staticmethod
  def should_stop_session(s: Session) -> bool:
      return len(s.transactions) >= 20
  ```

  **会话更新函数`update_session()` 能模拟调用方的状态维护与更新，每次在收到请求返回之后，都会被调用**。

  本示例中，在收到返回后，会更新轮次+1，并将返回的数字进行记录：

  ```python
  @staticmethod
  def update_session(s: Session):
      o = s.transactions[-1].rsp_json()
      s.ext_state["items"] += o["items"]
      s.ext_state["round"] = o["next_round"]
  ```

  **请求包装函数 `wrap_req()` 根据用户信息和会话状态，生成请求包**。可以是字典，会被转换成JSON，也可以直接是作为消息体的文本。

  本示例中，请求包装函数会将用户ID、轮次、已有数字列表构造出请求：

  ```python
  @staticmethod
  def wrap_req(s: Session):
      ui = s.user_info
      items_owned = s.ext_state.get("items", [])
      round_ = s.ext_state.get("round", 0)
      return {"user_id": ui.userid, "round": round_, "items_owned": items_owned}
  ```



  一次测试包含一个或多个 TestSuite。

  而每个 TestSuite 包含多个 TestCase，一个 SessionMaintainer，后者可以通过初始化时传入。

  TestSuite 有 name，TestCase 有 name 和 expectation 用来生成测试报告。
  为了使用简练、并遵循 Test as Code 的原则，我们这里直接将中这些测试用例的函数注释中提取出来。

  ![test_comment_report.png](https://raw.githubusercontent.com/session-tester/session-tester/main/docs%2Ftest_comment_report.png)

  TestSuite 中所有 `chk_` 开头的函数都会被自动识别为测试用例。
  三类测试用例，接收的参数不同，分别是 `HttpTransaction`、`Session`、`List[Session]`，这些函数都需要返回一个 `TestResult`。

  单请求返回校验：

  ```python
  @staticmethod
  def chk_rsp_sig(s: HttpTransaction) -> CheckResult:
      """单请求-签名校验:
      1. 接口返回sig字段
      2. sig字段与user_id, round, items计算结果一致
      """
      req = s.req_json()
      rsp = s.rsp_json()
      sig = calc_sig(rsp.get("user_id", ""), req.get("round", 0), rsp.get("items", []))
      if sig == rsp.get("signature"):
          return CheckResult(True, "sig check pass")
      return CheckResult(False, f"sig check failed, {s.response}")
  ```

  单会话校验：

  ```python
  @staticmethod
  def chk_no_repeat_item_in_all_sessions(s: Session) -> CheckResult:
      """
      单用户-返回道具重复性校验:
      1. 所有请求返回结果中items字段不重复
      """
      item_set = set()
      for t in s.transactions:
          items = t.rsp_json().get("items", [])
          for item in items:
              if item in item_set:
                  return CheckResult(False, f"item[{item}] repeat, {t}")
              item_set.add(item)
      return CheckResult(True)
  ```

  **所有会话校验可以应用在返回的统计，每个项的统计信息是否偏差过大可以作为判断是否通过的条件。**
  **这些统计信息可以作为额外的报告产出。**

  示例中，只是简单地输出了数量统计，并没有做概率相关的计算：

  ```python
  @staticmethod
  def chk_items_dist_in_all_sessions(ss: List[Session]) -> CheckResult:
      """
      返回道具分布校验:
      1. 所有请求返回结果中items字段分布均匀
      """
      item_dist = {}
      for s in ss:
          for t in s.transactions:
              items = t.rsp_json().get("items", [])
              for item in items:
                  item_dist[item] = item_dist.get(item, 0) + 1

      dist_detail = [{"item": k, "count": v} for k, v in sorted(item_dist.items())]

      return CheckResult(True, "", dist_detail)
  ```

  这里在有错的 Demo 上其产生的结果如下：

  ![test_report_dist_detail](https://raw.githubusercontent.com/session-tester/session-tester/main/docs%2Ftest_report_dist_detail_cn.png)

  上述统计分布的测试需求比较常见，我们有的封装相应的函数，因此上边的代码可以简化为：

  ```python
  def chk_items_dist_in_all_sessions(ss: List[Session]) -> CheckResult:
      """
      返回道具分布校验:
      1. 所有请求返回结果中items字段分布均匀
      """
      stat_result = transaction_elem_dist_stat(ss, lambda x: x.get("items", []))
      return CheckResult(True, "", stat_result)
  ```

  可以在 utils 目录中查阅。



  上述工作都准备好之后，就可以运行测试并校验结果了。

  我们创建一个测试对象，将一些基础信息设置到其中。

  ```python
  t = Tester(
      name=f"release_12345",  ## 本次测试名称，用于创建会话文件夹和生成测试报告
      test_suites=[T(session_maintainer=SessionMaintainer())]
  )
  ```

  最后，我们运行测试用例产生报告。

  ```python
  t.run(
      
      
  )
  ```

  运行时终端会打印过程日志：

  ![process_logging_cn.png](https://raw.githubusercontent.com/session-tester/session-tester/main/docs%2Fprocess_logging_cn.png)

  并且会在 ``test_reports`` 目录下生成报告：

  ![report_location_cn.png](https://raw.githubusercontent.com/session-tester/session-tester/main/docs%2Freport_location_cn.png)





  有几个 `sm_` 开头的修饰器，用于简化 `SessionMaintainer` 的实现。

  - ``sm_n_rounds(n)`` 简单判断重发 n 轮请求
  - ``sm_no_update`` 无需更新状态
  - ``sm_no_init`` 无初始状态更新



  有几个 `ts_` 开头的修饰器，用于简化 `TestSuite` 的实现。

  - ``ts_with_http_cost_stat`` 记录 HTTP 请求耗时，自动产生额外一张统计表

  ![ts_with_http_cost_stat.png](https://raw.githubusercontent.com/session-tester/session-tester/main/docs/ts_with_http_cost_stat.png)



  - `session_elem_dist_stat` 统计 Session 级别的元素分布，只需要传入从session提取元素的函数
  - `transaction_elem_dist_stat` 统计 HttpTransaction 级别的元素分布，只需要传入从 HttpTransaction 提取元素的函数

  TODO: 支持多级标签分布







  如果将用户信息的加载放在 init_session() 中看上去会简单一些，但是往往用户数据的加载是需要单独去批量拉取，放在init_session中会打乱这个加载过程。



  因为 load_user_info 需要往一个队列里塞数据，需依附于一个具体的对象。后者于具体的示例无关，仅与传递的参数Session有关。



  - [ ] 提供更多的加载用户数据的工具
  - [ ] 累积更多的校验函数
  - [x]  自动生成测试用例
  - [ ] UserInfo使用通用结构替换
  - [x] 流水线
  - [ ] 链接额外测试报告
  - [x] 发布到 PiPy 仓库
  - [ ] 补充多轮不同会话的 SessionMaintainer 示例


pkgId: 0a5dc8c393b23b4cb7453fb7b84fa861a0e639123ca99499c28c8bbeeb80e3de
name: python-setmycfdns-help
arch: noarch
version: 24.12.18
epoch: 0
release: 1
summary: Development documents and examples for setmycfdns
url: https://github.com/Glocktober/setmycfdns
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-setmycfdns-24.12.18-1.src.rpm
location_href: Packages/python-setmycfdns-help-24.12.18-1.noarch.rpm
checksum_type: sha256
description:
  The scenerio exists where a servers public (external) IP address can change over time.  This is especially true with cloud computing.

  As instances are stopped or hibernated and then restarted - their public IPs change, leaving public DNS records out of date.

  This program can be used to update CloudFlare zone records when a server reboots or returns from hibernation. This gives CloudFlare users the same benifit as a cloud-native DNS solutions.


  `setmycfdns` will update ***existing*** DNS records - the records must ***already exist*** in your CloudFlare zone.

  `setmycfdns` doesn't create or remove records.

  This is by design to prevent things from going wrong.

  `setmycfdns` updates **A** and **AAAA** DNS records; other records are not supported.


  After configuring `setmycfdns` is simple to use and in most instances does not require any special switchs.
  ```bash
   % setmycfdns
  ```
  This will **automatically** find your public IP address and update the dns zone record based on the *fully qualifed domain name* (fqdn) of your computer.

  In a more complex configuration you can use a different name or multiple ip address.
  ```bash
   % setmycfdns --fqdn first.example.com
   % setmycfdns --fqdn second.example.com -ip 100.100.22.23
  ```
  A list of all availabe options:
  ```
  % setmycfdns --help
  usage: setmycfdns [-h] [-v] [-ip IP] [-fqdn FQDN] [-q] [-z ZONE] [-6]

  Update CloudFlare IP record

  optional arguments:
    -h, --help            show this help message and exit
    -v, --version         show program's version number and exit
    -ip IP, --ip IP       set specific IP address to use
    -fqdn FQDN, --fqdn FQDN
                          Fully Qualified Domain Name (rkmbp.sunyocc.edu)
    -q, --query           Query only - no updates are made
    -z ZONE, --zone ZONE  Cloudflare Zone to update (optional)
    -6                    Update AAAA record (default is A record)

  setmycfdns gunville 2022 v1



  By default `setmyip` automatically detects the public IP address by sending an HTTP request to [icanhazip.com](http://checkip.amazonaws.com). This site returns the IP address of the sender.

  You can optionally use a different site to autodetect the public ip by setting the environment variable `IPAPIURL` to that URL:
  ```bash
  % IPAPIURL='http://api.ipify.org'
  % setmycfdns
  ```
  When ipv6 is selected with the `-6` switch automatic detection uses the ipv6 stack.  [icanhazip.com](http://icanhazip.com) works with both ipv4 and ipv6.

  If your host has multiple ip addresses or uses a proxy for web requests you will need to provide the ip address to use with the `--ip IP` command line switch.

  ```bash
  % setmycfdns -ip 100.123.4.56
  % setmycfdns -6 -ip 2600:1f16:a44:1701:1be3:f8b7:aa51:410b
  ```



  The fqdn of the host is acquired with the Python `socket.gethostname()` function. (Several solutions were tried, none worked perfect, but this one seems to work best.)

  There are some limitations to hostname determination:
  * Some systems are not configured to provide the fqdn (*web01.example.com*) and provide only the short hostname (*web01*). There is no elegant and simple solution that works on all platforms and configurations.

  * In some environments the hostname on the private side (e.g. web01.local) is not the same one used on the public side (web01.example.com).

  * Likewise, cloud VPCs by default provide hostnames in a similar fashion (e.g. *ip-172-31-84-22.ec2.internal*)

  In these cases you will be required to provide the full fqdn with the `--fqdn FQDN` switch.
  ```bash
  % setmycfdns --fqdn web01.example.com
  ```



  The cloudflare zone is selected from the FQDN, but can also explicity provided with the `--zone ZONE` switch.

  If the `--zone` switch is used the the zone does not match the hostname determined above, the fqdn is constructed by appending the zone.
  ```bash
  % hostname
  server1
  % setmycfdns --fqdn server1.example.com        # server1.example.com
  % setmycfdns --fqdn server1 --zone example.com # server1.example.com
  % setmycfdns --zone eample.com                 # server1.example.com
  ```

  The above are identical. Note that the `fqdn` does not have to be 'fully qualified' when the `--zone` switch is used.



  Both ipv4 **A** and ipv6 **AAAA** DNS records are supported by `setmycfdns`.  To update ipv6 records the `-6` switch is used - and required.

  ```bash
  % setmycfdns -6
  ```


  `setmycfdns` is easily installed using `pip`
  ```bash
  % pip install setmycfdns
  ```



  CloudFlare credentials (API keys) are required. You will need to generate these in your CloudFlare account.

  Generally a `.cloudflare.cfg` file in the users home directory or the current working directory, but there are several options. The format is dictated by the `python-cloudflare` API library and [details can be found here.](https://github.com/cloudflare/python-cloudflare/blob/master/README.md)

  ***Remember to always protect these API keys.***



  The following `crontab` entry will run `setmycfdns` each time the server reboots.
  ```
  @reboot /usr/local/bin/setmycfdns
  ```
  The actual path depends on where you install `setmycfdns`


  This may differ some depending on the operating system. This example here works with RedHat flavors.
  * Create the following file in `/lib/systemd/system-sleep/`
  * Add these contents of the file
  * Set the file to be excutable

  ```bash
  % sudo touch /lib/systemd/system-sleep/20_cfdns
  % sudo chomd +x /lib/systemd/system-sleep/20_cfdns
  % cat > /lib/systemd/system-sleep/20_cfdns <<EOF

  action="$1/$2"
  case "$action" in
     pre/hibernate)
     ;;
     post/hibernate)
  	/usr/local/bin/setmycfdns
     ;;
  esac
  >>
  ```
  The actual path depends on where you install `setmycfdns`


pkgId: 946fa3ad9fb6f50c02ce52eb11820528d22e3d2cdb9320ab1c03d7c32b47410c
name: python-setprint-help
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: Development documents and examples for setprint
url: https://github.com/mtur2007/SetPrint
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-setprint-0.2.1-1.src.rpm
location_href: Packages/python-setprint-help-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  - `set_list`
     <New Features>
     - Simplified progress bar to represent processing status<br>
     - Added keep functionality with argument extensions for automatic list formatting<br>
     - Enhanced customizability of display styles<br>
     - Support for tuple types
  - `pick_guideprint`
     <Fixes>
     - Resolved display bugs
  - ## ver 0.2.1 Fixes
  - `set_list`
     **<Fixes>**
     - Added the ability to toggle the display of progress bars and storage status of display style settings.
       `{ ======= } on / off`


pkgId: 25b97162228e86e7734c0c72b90977fe5d57afecaf027a889d4c0f2979bb2ef1
name: python-seven-cloudapp-frame-help
arch: noarch
version: 1.1.38.51
epoch: 0
release: 1
summary: Development documents and examples for seven-cloudapp-frame
url: http://gitlab.tdtech.gao7.com/TaoBaoCloud/seven_cloudapp_frame.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seven-cloudapp-frame-1.1.38.51-1.src.rpm
location_href: Packages/python-seven-cloudapp-frame-help-1.1.38.51-1.noarch.rpm
checksum_type: sha256
description:
  * 如果是测试环境，则默认取最新的活动，用于前端测试使用


  * 大数据表支持分表模式


  * 操作日志模块


  * 排队系统加踢人日志记录到info里


  * 废弃get_source_app_id，统一使用get_app_id


  * 登录接口用户信息走缓存


  * 调整保存淘宝优惠券


  * 修复ERP控制台基类bug


  * 调整事务sql加入到日志里


  * 对可能存在大数据的表，进行分表模式并可配置，目前支持的表stat_log_tb、stat_report_tb、asset_log_tb、user_asset_tb、task_count_tb、user_info_tb、prize_order_tb、prize_roster_tb


  * 修复任务模块浏览和收藏商品任务异常报错


  * 微信帮助类添加获取小程序码的方法


  * 调整删除ip信息方法，删除的同时会进行下架
  * 添加定时作业基类timing_work_model.py，用于控制台项目定时执行函数，只需继承并重写execute，定时时间在配置文件配置
  * 添加清理统计流水控制台和统计队列添加日志便于排查主键重置问题
  * FrameBaseModel添加处理恶意请求方法process_malice_request，可以针对用户和ip进行限制某个handler请求操作


  * 增加执行帮助类action_helper，用于控制台项目操作数据库等的连接超时的重新执行，避免请求中断


  * 对请求的加密参数和输出的加密数据添加日志，方便在后台查看明文信息
  * 去掉string_helper类，增加attch_helper类
  * 修改任务里没赋值log_title的方法
  * 把原本string_helper里的 check_under_age和get_birthday移到seven_helper


  * 缓存模块失败重试机制，邀请新用户和邀请入会任务模块增加可重写参数close_invite_limit


  * 调整所有的测试配置的默认test_user_nick、test_open_id、test_source_app_id、test_client_ver统一到配置key(test_config)里，名字对应为user_nick、open_id、source_app_id、client_ver，新增access_token使得测试的时候可以调用top接口


  * 调整InstantiateAppHandler淘宝实例化接口，增加执行前后事件并在返回里加了字段是否变更了project_code字段


  * UpdatePrizeOrderStatusHandler修改返回字典{"express_company":"物流公司","express_no":"快递单号","deliver_date":"发货时间"}


  * AssetBaseModel优化修改资产方法
  * StringHelper增加根据身份证号获取生日及检验是否未成年的方法
  * CacheModel优化数据缓存模块，增加缓存key前缀，使其在一个文件夹里方便查看
  * SevenHelper优化连续请求限制方法，利用redis incr的原子性，避免取到脏数据
  * FrameBaseModel增加分数算法（获取分数 = 权重 * 分数因子 + 时间极大值  - 当前时间）用于redis有序集合socre按多字段排序


  * ip表加is_del字段，相关的接口进行调整


  * 缓存模块删除依赖建实现重试机制
  * top模块调整


  * 变更资产加日志,top会员积分模块封装


  * b端增加高级权限模块


  * c端增加价格档位列表接口


  * 资产系统增加清理资产唯一值的方法，用于测试使用


  * 用户表增加昵称加密值字段和get_dict默认取1条


  * 任务模块加入会员任务请求top接口判断是否入会


  * ErpConsoleModel对接遁甲处理模型增加api处理方式


  * 任务模块增加统一的统计key, JoinTaskUserCount参与任务完成人数,JoinTaskCount参与任务完成次数,JoinTaskRewardCount参与任务奖励值


  * 增加去掉参数尾部多余0的帮助方法SevenHelper.remove_exponent


  * 缓存模块返回字段类型和数据库返回的统一


  * 修改ip列表


  * seven_model增加条件拼接实体ConditionWhere，可以不用去判断是否添加and


  * 增加获取产品续费价格信息handler


  * 修改import_prize_order方法，兼容json格式和base64格式


  * 增加导出活动奖品列表handler
  * top_base_model 增加获取短链接
  * seven_helper增加get_condition_in方法自动拼接in查询条件


  * 修改order_s.py导出奖品订单和中奖记录的handler并增加淘宝支付订单导出的handler


  * 修改淘宝升级版本参数少传


  * 淘宝top_base_model兼容控制台调用


  * 调整控制台队列数，默认是1，当数据量大来不及处理再调整为10，多线程处理


  * 任务系统增加分享奖励任务
  * framebasehandler添加get_param_int方法,获取参数自动转整形，转换失败不会报错，返回默认值


  * 活动表增加字段lc_order_id小部件orderId


  * 兼容淘宝小部件及其他平台 get_source_app_id方法优先取参数app_id 没有才是source_app_id


  * 控制台模型 erp_console_model 联调修复异常


  * 任务系统指定的任务模块添加了info_json参数，便于业务记录资产详细信息


  * 文件帮助类修改


  * 修改变更资产方法，去掉每日进销存,从控制台生成,加快处理速度
  * 新增统计处理方式，可以从redis处理，对性能要求高的走redis，对数据安全性，完整性要求高的走mysql


  * 添加client接口 获取黑名单解封申请记录


  * 资产模块 asset_base_model.py 修改方法get_user_asset_list去掉排序参数


  * 排队系统 修改update_time


  * 微信昵称emoji处理


  * 排队系统帮助类加队列增加头像字段


  * prize_order_tb表新增字段freight_pay_order_no


  * 字符串序列化异常修复


  * 接口加解密异常修复


  * 排队系统异常修复


  * 免费领取任务奖励上报写死bug修复


  * 统计控制台bug修复


  * 添加加密帮助类及server添加ActPrizeListHandler事件重写


  * 修改pay.py中的请求参数转换成xml


  * 修改pay.py异步通知handler继承


  * 修改微信支付


  * 修改微信预订单Ip获取异常


  * 修改排队系统帮助类


  * 修改任务配置的整形字段强制转换


  * 云应用框架初始版


pkgId: 4128eb6a46243f2feb6c1a0a9282cfaef22568726d34ff35560ef97d9b2d993c
name: python-seven-framework-help
arch: noarch
version: 1.3.4
epoch: 0
release: 1
summary: Development documents and examples for seven-framework
url: http://gitlab.tdtech.gao7.com/python/seven_framework
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seven-framework-1.3.4-1.src.rpm
location_href: Packages/python-seven-framework-help-1.3.4-1.noarch.rpm
checksum_type: sha256
description:
  <!--
   * @Author: ChenXiaolei
   * @Date: 2021-09-08 11:32:28
   * @LastEditTime: 2024-12-13 17:32:56
   * @LastEditors: ChenXiaolei
   * @Description:
  -->






  * 屏蔽nacos获取配置后的具体配置信息


  * nacos配置获取优化


  * nacos配置获取优化，支持鉴权


  * nacos配置获取优化，支持鉴权


  * 增加nacos云端配置拉取


  * base_model add_values允许主键传入


  * 优化TimeHelper


  * 优化base_console


  * 控制台支持扩展config配置 如 config_jd.json


  * 支持扩展config配置 如 config_jd.json


  * 优化monitor支持扩展config配置


  * 优化monitor支持redis集群检测


  * monitor支持redis集群检测


  * monitor支持redis集群检测


  * redis集群帮助类优化


  * 增加redis集群帮助类


  * ESHelper增加get方法


  * ESHelper增加count方法


  * ESHelper增加字典类型的配置文件


  * TimeHelper->format_time_to_timestamp 支持输出毫秒级别时间戳


  * MySQLHelper增加透传参数


  * lisence异常调试


  * lisence异常调试


  * lisence异常调试


  * lisence异常调试


  * lisence异常时打印日志


  * lisence异常时打印目录结构树


  * 处理base_model->update_list 排除更新字段为str时无效的bug


  * 处理base_model->update_entity 排除更新字段为str时无效的bug


  * 日志内容兼容字典类型


  * CryptoHelper 计算目录哈希函数优化


  * base_tornado添加lisence检查


  * CryptoHelper 增加目录哈希计算函数


  * COS新增以数据流形式上传Object


  * 修复is_this_month 每月最后一天为False的BUG


  * 更新SignHelper 对json格式的兼容处理,去除json的空格.


  * 限制urllib3版本号


  * 优化base_model的update_entity兼容数据库关键字


  * 优化filter_check_params过滤器
  * 添加企业微信帮助类方法


  * 修复数据库分页查询时 分页模式=next时的bug


  * RedisHelper 参数调整


  * 配合k8s monitor异常时返回httpstatus=500


  * RedisHelper 兼容redis6.0以后版本,增加username配置项


  * 增加微信帮助类


  * 增加memcached帮助类


  * 优化企业微信帮助类


  * 更新企业微信帮助类
  * 新增文件MD5计算


  * OSHelper->copy_tree 支持is_cover是否覆盖文件选项


  * 修复SignHelper传参BUG


  * mysql base_model 增加字段反引号,兼容字段使用关键字的情况


  * 处理base_model get_dict_page_list next时返回实体的bug


  * 兼容timestamp_to_format_time 无法处理毫秒的问题


  * 与bos冲突 调整pycryptodome 初始要求>=3.8.0


  * base_model 分页相关方法增加分页计数模式可选参数


  * CryptoHelper增加RSA相关函数
  * SignHelper增加RSA签名函数


  * 修复get_last_day_of_the_month() 12月份异常的bug


  * SignHelper增加签名串链接字符
  * 修改base_handler 增加config配置is_check_xsrf 不默认验证


  * 修复sign参数为数字的报错情况


  * 增加http patch方法


  * 增加os功能
  * 处理MySQL事务OperationalError或者是InternalError异常堵塞的问题


  * 修复aws s3 bug


  * 新增消息队列帮助类(RabbitMQ、RocketMQ)


  * mysql事务日志修复


  * 添加消息队列 RabbitMQ、RocketMQ帮助类


  * 修复mysql事务回滚的bug


  * redis支持ssl


  * 修改base_handler:filter_check_params参数过滤器在获取post/application/json参数后,增加同时去获取query参数
  * base_model update_table、del_entity 添加limit可选参数


  * 优化mysql事务没记录日志的问题


  * 添加AWS S3存储支持
  * MySQLHelper _add_sql_log添加详细日志


  * HTTPHelper 添加put delete options head patch方法


  * 新增ip解析帮助类
  * 添加百度云媒体信息获取方法


  * 新增os.py 文件/文件夹操作类
  * base_handler加上返回文件流函数
  * 默认线程连接池数量调整为5000,并且支持配置读取(thread_pool_count)


  * base_model 增加add_values(insert...values(),();)函数;
  * base_model add函数增加可选返回值(自增ID或影响行数)扩展参数;
  * base_model 增加add_update_whole_entity函数,用于遇到唯一键时全量更新的函数;
  * mysql.py commit_transaction 添加返回详细的元组信息参数


  * 处理路由传参未透传接收问题


  * Monitor接口监控不参与日志记录


  * base_model limit支持整形


  * 日志配置添加log_console,用于控制日志是否需要输出在控制台上


  * 添加通用签名装饰器
  * 更新百度SDK版本号


  * 添加百度云存储BOS组件
  * base_model update_entity添加排除更新字段
  * log未配置报错问题修复


  * 添加日志备份时间


  * 处理了日志存储配置开关无效的bug
  * 优化redis字符串返回byte类型的配置


  * 处理文本日志不记录request_code的问题;
  * dict添加不定字典的合并函数;


  * 添加本地文件读写帮助类 file->LocalFileHelper


  * mysql日志记录格式调整


  * TimeHelper增加格式时间转换函数


  * 框架整理发布


  * tornado handler自带monitor.py


  * log优化
  * clickhouse帮助类


  * log日志配置修改,添加redis日志存储


  * 增加JsonHelper json_dumps()  常用格式的反序列化


  * 优化SignHelper公共加密类


  * 优化SignHelper公共加密类


  * 优化pymysql暗改转移方法


  * 添加腾讯云对象存储


  * 兼容base_model get_total时传groupby时报错的问题


  * 添加阿里oss2依赖


  * 添加阿里oss2帮助类


  * 优化file添加金山云(KS3)存储帮助类


  * file添加金山云(KS3)存储帮助类
  * 调整filter_check_params 方法兼容application/json为空时自动再查找普通参数


  * http_log增加打印公共返回字段


  * 修复mysql update bug


  * 修复mysql bug


  * 优化Timehelper 关于本周/月/年 第一天及最后一天时间,以及指定日期的对比函数


  * 新增Timehelper 关于本周/月/年 第一天及最后一天时间,以及指定日期的对比函数
  * 优化mysql 传参如果不为list的情况下,参数为0报错的bug


  * 新增CSVHelper


  * 优化base_model 解决get_entity_by_id id=0报错的BUG


  * 优化base_model


  * 修改base_model 更新数据库未影响行数时返回False


  * DBUtils 高版本写法变更,依赖版本调整


  * TimeHelper 增加时间差集计算


  * 优化企业微信帮助类


  * 优化企业微信帮助类


  * 添加企业微信帮助类
  * 添加公共签名帮助类
  * 兼容http post请求


  * 修改毫秒级时间戳


  * 添加毫秒级时间戳


  * 修复redis db=0是异常的bug


  * 修复http post json请求bug


  * 修复redis添加init参数bug


  * Redis添加init参数,可直接指定配置字典即可


  * 优化sha256加密方法


  * 添加sha256加密方法


  * TimeHelper添加更改格式化时间格式的方法


  * log入库时间戳格式调整


  * 事务添加导出sql语句方法


  * 优化mysql事务


  * base_model增加update_list方法


  * 优化DbTransaction 事务类


  * 优化DbTransaction 事务类


  * 增加DbTransaction 事务类


  * 修复base_model BUG


  * 修改企业微信通知添加项目产生的错误


  * base_model 增加事务处理


  * 添加框架依赖


  * 添加框架依赖


  * 增加excel帮助类
  * 增加二维码帮助类


  * 修改file->ufile cdn前缀问题


  * base_model 修改page_list函数的count()字段


  * log记录数据库添加record_time字段
  * base_handler->get_params 添加是否去除前后空格选填参数


  * base_model conver_type修改


  * 企业微信通知加项目名称


  * 修改host处理


  * 修改log写入数据库转义问题


  * 优化base_model 分页函数


  * 优化全局异常报错处理


  * 优化mysql连接


  * 添加DBUtils依赖


  * 优化mysqlhelper 连接池
  * basemodel配合mysql修改


  * 修改urlencode bug


  * 优化log添加数据库记录


  * log添加数据库记录
  * ufile.py 改名为 file.py
  * file.py 添加ufile 下载文件方法


  * 优化filter_check_params


  * JsonEncoder 支持decimal类型


  * 修复ufile bug


  * 修复ufile包名冲突的问题


  * 增加ufile封装


  * 修复企业微信通知bug
  * 修改prepare的http请求信息支持json参数


  * @filter_check_params支持接收json传参


  * 添加testing环境配置


  * 修复已知BUG


  * 添加企业微信报警(notice.py)
  * 修改base_handler内filter_check_params装饰器无需输入可选参数


  * 修复引用


  * 修复json bytes转码BUG
  * base_handler 添加body参数转dict函数


  * 修复http请求控制台日志bug


  * 添加http请求控制台日志


  * 添加base_tornado


  * 添加coding帮助类


  * 添加依赖源


  * 优化base_model 增加seven_framework架引用


  * 增加控制台基础引用 base_console


  * 优化CryptoHelper 编码问题
  * 增加CryptoHelper 针对bytes的md5加密
  * 优化BaseHandler body转实体方法


  * CryptoHelper增加sha1加密


  * base_handler增加request_body_to_entity方法


  * 优化base_handler get_param 空值也返回默认值


  * 优化base_handler filter_check_params 装饰器,允许不检查必填参数


  * 优化MysqlHelper


  * 将MysqlHelper 的condition参数 拆开为 where/group_by/order_by/limit 参数
  * 将MysqlHelper及base_model 增加事务执行函数transaction_execute


  * 解决base_api_handler的初始化bug


  * 优化框架结构
  * 修改CryptoHelper 的 AES加解密方法


pkgId: 6e7a0ef2059b5529c624e03a47ac764edfcd49fd755bdfc27f1be8765f980e14
name: python-seven2one-help
arch: noarch
version: 8.0.0
epoch: 0
release: 1
summary: Development documents and examples for seven2one
url: http://www.seven2one.de
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-seven2one-8.0.0-1.src.rpm
location_href: Packages/python-seven2one-help-8.0.0-1.noarch.rpm
checksum_type: sha256
description:
  For local development, the package can be installed locally in editable mode:

  ```bash
  pip install -e .
  ```

  This will also install the required dependencies, taken from the setup.py, install_requires section (which will also be installed if this package is later installed via pip).
  If you want to just test the dependencies, you can install them using the requirements.txt file:

  ```bash
  pip install -r requirements.txt
  ```

  The requirements.txt and setup.py files should be kept in sync, so that the package can be installed in the same way in the production environment. Unfortunatelly, the setup.py file does not support the use of the requirements.txt file, so the dependencies have to be listed in both files.



  Interactive with client id from your OAuth 2 provider:

  ```python
  from seven2one import TechStack
  client = TechStack(host, client_id)
  ```

  In unattended scripts via service account:

  ```python
  from seven2one import TechStack
  client = TechStack(host, client_id, service_account_name='my-serviceuser', service_account_secret='some token')
  ```



  By default the Python lib writes logs to console and to the server the user connects to.

  Configure log levels and server endpoint by environment variables if needed:

  | Variable       | Description | Default |
  | -------------- | ----------- | ------- |
  |LOGLEVEL        | Set the log level for console output | 'INFO' |
  |LOGLEVEL_SERVER | Set the log level for logs sent to the server (Loki). Log levels are 'ERROR', 'WARNING', 'INFO' and 'DEBUG'. | 'ERROR' |
  |LOG_TO_SERVER   | Disable logging to Loki server | 'TRUE' |
  |LOG_SERVER      | Overwrite the log server endpoint if e.g. running inside the same cluster | 'https://{host}/logging/loki/api/v1/push' |



  ```python
  client.inventories()
  client.items('appartments', references=True)
  client.inventoryProperties('appartments')
  client.propertyList('appartments', references=True, dataTypes=True)
  ```





  ```python
  properties = [
     {
          'dataType': 'DATE_TIME_OFFSET',
          'name': 'fieldDATETIMEOFFSET',
          'nullable': True
      },
      {
          'dataType': 'BOOLEAN',
          'name': 'fieldBOOLEAN',
          'nullable': True
      }
  ]

  client.createInventory('testInventory', properties)
  ```



  ```python
  items =  [
          {
          "fieldSTRING": "bla",
          "fieldDECIMAL": 0,
          "fieldLONG": 0,
          "fieldINT": 0,
          "fieldBOOLEAN": True,
          "fieldDATETIME":  "2021-09-14T00:00:00.000Z",
          "fieldDATETIMEOFFSET": "2021-09-14T00:00:00.000Z"
      }
  ]

  addBasicItems('testInventory', items)

  ```



  To change one or more used service endpoints (e.g. for tests against custom deployments) you can overwrite them by environment variables. You have to provide complete URL's.

  | Environment variable | Description | Example |
  | -------------------- | --|--|
  | IDENDITYPROVIDER_URL     | Identity provider base url | `https://authentik.mytechstack` |
  | DYNAMIC_OBJECTS_ENDPOINT | DynO graphQL endpoint | `https://run.integrationtest.s2o.dev/itest-375545a3-dynamic-objects/graphql/` |
  | AUTOMATION_ENDPOINT      | Automation service graphQL endpoint |  |
  | SCHEDULE_ENDPOINT        | Schedule service graphQL endpoint | |
  | PROGRAMMING_ENDPOINT     | Programming service graphQL endpoint | |
  | TIMESERIES_ENDPOINT      | TimeSeries gateway graphQL endpoint | |
  | LOGGING_ENDPOINT         | Logging reverse proxy endpoint | `http://mytechstack:8123/loki/api/v1/push` |
  | AUTHORIZATION_ENDPOINT   | Authorization service graphQL endpoint | |


pkgId: bc8424e452aa98570d48a9d22b3dc27195808b92830172e0d6b5beeb5a79c5e6
name: python-sevenn-help
arch: noarch
version: 0.10.3
epoch: 0
release: 1
summary: Development documents and examples for sevenn
url: https://github.com/MDIL-SNU/SevenNet
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sevenn-0.10.3-1.src.rpm
location_href: Packages/python-sevenn-help-0.10.3-1.noarch.rpm
checksum_type: sha256
description:
  > Keywords in ASE: `7net-l3i5` and `SevenNet-l3i5`
  The model increases the maximum spherical harmonic degree ($l_{\mathrm{max}}$) to 3, compared to **SevenNet-0 (11Jul2024)** with $l_{\mathrm{max}}$ of 2.
  While **l3i5** offers improved accuracy across various systems compared to **SevenNet-0 (11Jul2024)**, it is approximately four times slower.
  * Training set MAE: 8.3 meV/atom (energy), 0.029 eV/Ang. (force), and 2.33 kbar (stress)
  * Matbench F1 score: 0.76, $\kappa_{\mathrm{SRME}}$: 0.560

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


pkgId: ea9169f3604979d050ec3deb8a8c0b07f7b60b683d97a999360a6e9de66d07de
name: python-severus-help
arch: noarch
version: 1.4.1
epoch: 0
release: 1
summary: Development documents and examples for severus
url: https://github.com/emmett-framework/severus
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-severus-1.4.1-1.src.rpm
location_href: Packages/python-severus-help-1.4.1-1.noarch.rpm
checksum_type: sha256
description:
  Severus – */seˈweː.rus/* – is a Python internationalization engine designed with simplicity in mind.



  *it.json*

  ```json
  {
      "Hello world!": "Ciao mondo!"
  }
  ```

  *translate.py*

  ```python
  from severus import Severus, language

  T = Severus()

  with language("it"):
      print(T("Hello world!"))
  ```



  The documentation is available under the [docs folder](https://github.com/emmett-framework/severus/tree/master/docs).



  Severus is released under the BSD License.


pkgId: 2b2d13f2a77d3361dd7204d00208f19c45ec7f98e33e1c0a8502d57a33fba7b6
name: python-sf-hamilton-help
arch: noarch
version: 1.85.1
epoch: 0
release: 1
summary: Development documents and examples for sf-hamilton
url: https://pypi.org/project/sf-hamilton/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sf-hamilton-1.85.1-1.src.rpm
location_href: Packages/python-sf-hamilton-help-1.85.1-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
     <h1><img src="https://github.com/DAGWorks-Inc/hamilton/assets/2328071/feb6abaa-b6d5-4271-a320-0ae4a18d8aa7" width="50"/> Hamilton — portable & expressive <br> data transformation DAGs</h1>
     <a href='https://hamilton.dagworks.io/en/latest/?badge=latest'>
        <img src='https://readthedocs.org/projects/hamilton/badge/?version=latest' alt='Documentation Status' />
     </a><a href="https://www.python.org/downloads/" target="_blank">
        <img src="https://img.shields.io/badge/python-3.8|%203.9|%203.10|%203.11|%203.12-blue.svg" alt="Python supported"/>
     </a>
     <a href="https://pypi.org/project/sf-hamilton/" target="_blank">
        <img src="https://badge.fury.io/py/sf-hamilton.svg" alt="PyPi Version"/>
     </a>
     <a href="https://pepy.tech/project/sf-hamilton" target="_blank">
        <img src="https://pepy.tech/badge/sf-hamilton" alt="Total Downloads"/>
     </a>
     <a href="https://pepy.tech/project/sf-hamilton" target="_blank">
        <img src="https://static.pepy.tech/badge/sf-hamilton/month" alt="Total Monthly Downloads"/>
     </a>
     <br/>
     <a target="_blank" href="https://linkedin.com/showcase/dagster" style="background:none">
        <img src="https://img.shields.io/badge/DAGWorks-Follow-purple.svg?logo=linkedin" />
     </a>
     <a href="https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g" target="_blank">
        <img src="https://img.shields.io/badge/Hamilton-Join-purple.svg?logo=slack" alt="Hamilton Slack"/>
     </a>
     <a href="https://twitter.com/hamilton_os" target="_blank">
        <img src="https://img.shields.io/badge/HamiltonOS-Follow-purple.svg?logo=X"/>
     </a>
     <a href="https://twitter.com/dagworks" target="_blank">
        <img src="https://img.shields.io/badge/DAGWorks-Follow-purple.svg?logo=X"/>
     </a>
  </div>
  <br></br>

  Hamilton is a lightweight Python library for directed acyclic graphs (DAGs) of data transformations. Your DAG is **portable**; it runs anywhere Python runs, whether it's a script, notebook, Airflow pipeline, FastAPI server, etc. Your DAG is **expressive**; Hamilton has extensive features to define and modify the execution of a DAG (e.g., data validation, experiment tracking, remote execution).

  To create a DAG, write regular Python functions that specify their dependencies with their parameters. As shown below, it results in readable code that can always be visualized. Hamilton loads that definition and automatically builds the DAG for you!

  <div align="center">
    <img src="./docs/_static/abc_highlight.png" alt="Create a project" width="65%"/>
  </div>
  <div align="center">
     Functions <code>B()</code> and <code>C()</code> refer to function <code>A</code> via their parameters
  </div>
  <br>

  Hamilton brings modularity and structure to any Python application moving data: ETL pipelines, ML workflows, LLM applications, RAG systems, BI dashboards, and the [Hamilton UI](https://hamilton.dagworks.io/en/latest/concepts/ui) allows you to automatically visualize, catalog, and monitor execution.

  > Hamilton is great for DAGs, but if you need loops or conditional logic to create an LLM agent or a simulation, take a look at our sister library  [Burr](https://github.com/dagworks-inc/burr) 🤖 .




  Hamilton supports Python 3.8+. We include the optional `visualization` dependency to display our Hamilton DAG. For visualizations, [Graphviz](https://graphviz.org/download/) needs to be installed on your system separately.

  ```bash
  pip install "sf-hamilton[visualization]"
  ```

  To use the Hamilton UI, install the `ui` and `sdk` dependencies.

  ```bash
  pip install "sf-hamilton[ui,sdk]"
  ```

  To try Hamilton in the browser, visit [www.tryhamilton.dev](https://www.tryhamilton.dev/?utm_source=README)



  Data teams write code to deliver business value, but few have the resources to standardize practices and provide quality assurance. Moving from proof-of-concept to production and cross-function collaboration (e.g., data science, engineering, ops) remain challenging for teams, big or small. Hamilton is designed to help throughout a project's lifecycle:

  - **Separation of concerns**. Hamilton separates the DAG "definition" and "execution" which lets data scientists focus on solving problems and engineers manage production pipelines.

  - **Effective collaboration**. The [Hamilton UI provides a shared interface](https://hamilton.dagworks.io/en/latest/hamilton-ui/ui/) for teams to inspect results and debug failures throughout the development cycle.

  - **Low-friction dev to prod**. Use `@config.when()` to modify your DAG between execution environments instead of error-prone `if/else` feature flags. The notebook extension prevents the pain of migrating code from a notebook to a Python module.

  - **Portable transformations**. Your DAG is [independent of infrastructure or orchestration](https://blog.dagworks.io/publish/posts/detail/145543927?referrer=%2Fpublish%2Fposts), meaning you can develop and debug locally and reuse code across contexts (local, Airflow, FastAPI, etc.).

  - **Maintainable DAG definition**. Hamilton [automatically builds the DAG from a single line of code whether it has 10 or 1000 nodes](https://hamilton.dagworks.io/en/latest/concepts/driver/). It can also assemble multiple Python modules into a pipeline, encouraging modularity.

  - **Expressive DAGs**. [Function modifiers](https://hamilton.dagworks.io/en/latest/concepts/function-modifiers/) are a unique feature to keep your code [DRY](https://en.wikipedia.org/wiki/Don't_repeat_yourself) and reduce the complexity of maintaining large DAGs. Other frameworks inevitably lead to code redundancy or bloated functions.

  - **Built-in coding style**. The Hamilton DAG is [defined using Python functions](https://hamilton.dagworks.io/en/latest/concepts/node/), encouraging  modular, easy-to-read, self-documenting, and unit testable code.

  - **Data and schema validation**. Decorate functions with `@check_output` to validate output properties, and raise warnings or exceptions. Add the `SchemaValidator()` adapter to automatically inspect dataframe-like objects (pandas, polars, Ibis, etc.) to track and validate their schema.

  - **Built for plugins**. Hamilton is designed to play nice with all tools and provides the right abstractions to create custom integrations with your stack. Our lively community will help you build what you need!




  You can track the execution of your Hamilton DAG in the [Hamilton UI](https://hamilton.dagworks.io/en/latest/hamilton-ui/ui/). It automatically populates a data catalog with lineage / tracing and provides execution observability to inspect results and debug errors. You can run it as a [local server](https://hamilton.dagworks.io/en/latest/hamilton-ui/ui/#local-mode) or a [self-hosted application using Docker](https://hamilton.dagworks.io/en/latest/hamilton-ui/ui/#docker-deployed-mode).

  <p align="center">
    <img src="./docs/_static/hamilton_1.jpeg" alt="Description1" width="30%" style="margin-right: 20px;"/>
    <img src="./docs/_static/hamilton_2.jpeg" alt="Description2" width="30%" style="margin-right: 20px;"/>
    <img src="./docs/_static/hamilton_3.jpeg" alt="Description3" width="30%"/>
  </p>
  <p align="center">
    <em>DAG catalog, automatic dataset profiling, and execution tracking</em>
  </p>




  1. To use the Hamilton UI, install the dependencies (see `Installation` section) and start the server with

     ```bash
     hamilton ui
     ```

  2. On the first connection, create a `username` and a new project (the `project_id` should be `1`).

  <div align="center">
    <img src="./docs/_static/new_project.png" alt="Create a project" width="70%"/>
  </div>
  <br>

  3. Track your Hamilton DAG by creating a `HamiltonTracker` object with your `username` and `project_id` and adding it to your `Builder`. Now, your DAG will appear in the UI's catalog and all executions will be tracked!

     ```python
     from hamilton import driver
     from hamilton_sdk.adapters import HamiltonTracker
     import my_dag

     
     tracker = HamiltonTracker(
        username="my_username",
        project_id=1,
        dag_name="hello_world",
     )

     
     dr = (
        driver.Builder()
        .with_modules(my_dag)
        .with_adapters(tracker)  # add your tracker here
        .build()
     )

     
     dr.execute(["C"])
     ```



  * 📚 See the [official documentation](https://hamilton.dagworks.io/) to learn about the core concepts of Hamilton.

  * 👨‍🏫 Consult the [examples on GitHub](https://github.com/DAGWorks-Inc/hamilton/tree/main/examples) to learn about specific features or integrations with other frameworks.

  * 📰 The [DAGWorks blog](https://blog.dagworks.io/) includes guides about how to build a data platform and narrative tutorials.

  * 📺 Find video tutorials on the [DAGWorks YouTube channel](https://www.youtube.com/@DAGWorks-Inc)

  * 📣 Reach out via the [Hamilton Slack community](https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g) for help and troubleshooting




  Hamilton is not an orchestrator ([you might not need one](https://blog.dagworks.io/p/lean-data-automation-a-principal)), nor a feature store ([but you can use it to build one!](https://blog.dagworks.io/p/featurization-integrating-hamilton)). Its purpose is to help you structure and manage data transformations. If you know dbt, Hamilton does for Python what dbt does for SQL.

  Another way to frame it is to think about the different layers of a data stack. Hamilton is at the **asset layer**. It helps you organize data transformations code (the **expression layer**), manage changes, and validate & test data.

  <div align="center" style="width: 100%">
     <table>
        <colgroup>
           <col style="width: 20%">
           <col style="width: 40%">
           <col style="width: 40%">
        </colgroup>
        <thead>
           <tr>
                 <th>Layer</th>
                 <th>Purpose</th>
                 <th>Example Tools</th>
           </tr>
        </thead>
        <tbody>
           <tr>
                 <td>Orchestration</td>
                 <td>Operational system for the creation of assets</td>
                 <td>Airflow, Metaflow, Prefect, Dagster</td>
           </tr>
           <tr>
                 <td>Asset</td>
                 <td>Organize expressions into meaningful units <br> (e.g., dataset, ML model, table)</td>
                 <td><b>Hamilton</b>, dbt, dlt, SQLMesh, <a href="https://github.com/dagworks-inc/burr">Burr</a></td>
           </tr>
           <tr>
                 <td>Expression</td>
                 <td>Language to write data transformations</td>
                 <td>pandas, SQL, polars, Ibis, LangChain</td>
           </tr>
           <tr>
                 <td>Execution</td>
                 <td>Perform data transformations</td>
                 <td>Spark, Snowflake, DuckDB, RAPIDS</td>
           </tr>
           <tr>
                 <td>Data</td>
                 <td>Physical representation of data, inputs and outputs</td>
                 <td>S3, Postgres, file system, Snowflake</td>
           </tr>
        </tbody>
     </table>
  </div>

  See our page on [Why use Hamilton?](https://hamilton.dagworks.io/en/latest/get-started/why-hamilton/) and framework [code comparisons](https://hamilton.dagworks.io/en/latest/code-comparisons/) for more information.



  Hamilton is released under the BSD 3-Clause Clear License. See [LICENSE](https://github.com/DAGWorks-Inc/hamilton/blob/main/LICENSE.md) for details.




  We're very supportive of changes by new contributors, big or small! Make sure to discuss potential changes by creating an issue or commenting on an existing one before opening a pull request. Good first contributions include creating an example or an integration with your favorite Python library!

   To contribute, checkout our [contributing guidelines](https://github.com/DAGWorks-Inc/hamilton/blob/main/CONTRIBUTING.md), our [developer setup guide](https://github.com/DAGWorks-Inc/hamilton/blob/main/developer_setup.md), and our [Code of Conduct](https://github.com/DAGWorks-Inc/hamilton/blob/main/CODE_OF_CONDUCT.md).



  Hamilton was started at Stitch Fix before the original creators founded DAGWorks Inc! The library is battle-tested and has been supporting production use cases since 2019.

  >Read more about the [origin story](https://multithreaded.stitchfix.com/blog/2021/10/14/functions-dags-hamilton/).


  * [Stitch Fix](https://www.stitchfix.com/) — Time series forecasting
  * [UK Government Digital Services](https://github.com/alphagov/govuk-feedback-analysis) — National feedback pipeline (processing & analysis)
  * [IBM](https://www.ibm.com/) — Internal search and ML pipelines
  * [Opendoor](https://www.opendoor.com/) — Manage PySpark pipelines
  * [Lexis Nexis](https://www.lexisnexis.com/en-us/home.page) — Feature processing and lineage
  * [Adobe](https://www.adobe.com/) — Prompt engineering research
  * [WrenAI](https://github.com/Canner/WrenAI) — async text-to-SQL workflows
  * [British Cycling](https://www.britishcycling.org.uk/) — Telemetry analysis
  * [Oak Ridge & PNNL](https://pnnl.gov/) — Naturf project
  * [ORNL](https://www.ornl.gov/)
  * [Federal Reserve Board](https://www.federalreserve.gov/)
  * [Joby Aviation](https://www.jobyaviation.com/) — Flight data processing
  * [Two](https://www.two.inc/)
  * [Transfix](https://transfix.io/) — Online featurization and prediction
  * [Railofy](https://www.railofy.com) — Orchestrate pandas code
  * [Habitat Energy](https://www.habitat.energy/) — Time-series feature engineering
  * [KI-Insurance](https://www.ki-insurance.com/) — Feature engineering
  * [Ascena Retail](https://www.ascena.com/) — Feature engineering
  * [NaroHQ](https://www.narohq.com/)
  * [EquipmentShare](https://www.equipmentshare.com/)
  * [Everstream.ai](https://www.everstream.ai/)
  * [Flectere](https://flectere.net/)
  * [F33.ai](https://f33.ai/)
  * [Kora Money](https://www.koramoney.com)
  * [Capitec Bank](https://www.capitecbank.co.za/)
  * [Best Egg](https://bestegg.com/)
  * [RTV Euro AGD](https://www.euro.com.pl/)
  * [Wealth.com](https://www.wealth.com/)
  * [wren.ai](https://wren.ai/)


  [![Contributors](https://contrib.rocks/image?repo=dagworks-inc/hamilton)](https://github.com/DAGWorks-Inc/hamilton/graphs/contributors)




  Thanks to our awesome community and their active involvement in the Hamilton library.

  [Nils Olsson](https://github.com/nilsso), [Michał Siedlaczek](https://github.com/elshize), [Alaa Abedrabbo](https://github.com/AAbedrabbo), [Shreya Datar](https://github.com/datarshreya), [Baldo Faieta](https://github.com/baldofaieta), [Anwar Brini](https://github.com/AnwarBrini), [Gourav Kumar](https://github.com/gms101), [Amos Aikman](https://github.com/amosaikman), [Ankush Kundaliya](https://github.com/akundaliya), [David Weselowski](https://github.com/j7zAhU), [Peter Robinson](https://github.com/Peter4137), [Seth Stokes](https://github.com/sT0v), [Louis Maddox](https://github.com/lmmx), [Stephen Bias](https://github.com/s-ducks), [Anup Joseph](https://github.com/AnupJoseph), [Jan Hurst](https://github.com/janhurst), [Flavia Santos](https://github.com/flaviassantos), [Nicolas Huray](https://github.com/nhuray), [Manabu Niseki](https://github.com/ninoseki), [Kyle Pounder](https://github.com/kpounder), [Alex Bustos](https://github.com/bustosalex1), [Andy Day](https://github.com/adayNU), [Alexander Cai](https://github.com/adzcai), [Nils Müller-Wendt](https://github.com/ChronoJon), [Paul Larsen](https://github.com/munichpavel), [
  Kemal Eren](https://github.com/kemaleren), [Jernej Frank](https://github.com/jernejfrank), [Noah Ridge](https://github.com/noahridge)


  We'd appreciate citing Hamilton by referencing one of the following:

  ```bibtex
  @inproceedings{DBLP:conf/vldb/KrawczykI22,
    title     = {Hamilton: a modular open source declarative paradigm for high level
                 modeling of dataflows},
    author    = {Stefan Krawczyk and Elijah ben Izzy},
    editor    = {Satyanarayana R. Valluri and Mohamed Za{\"{\i}}t},
    booktitle = {1st International Workshop on Composable Data Management Systems,
                 CDMS@VLDB 2022, Sydney, Australia, September 9, 2022},
    year      = {2022},
    url       = {https://cdmsworkshop.github.io/2022/Proceedings/ShortPapers/Paper6\_StefanKrawczyk.pdf},
    timestamp = {Wed, 19 Oct 2022 16:20:48 +0200},
    biburl    = {https://dblp.org/rec/conf/vldb/KrawczykI22.bib},
    bibsource = {dblp computer science bibliography, https://dblp.org}
  }
  ```
  ```bibtex
  @inproceedings{CEURWS:conf/vldb/KrawczykIQ22,
    title     = {Hamilton: enabling software engineering best practices for data transformations via generalized dataflow graphs},
    author    = {Stefan Krawczyk and Elijah ben Izzy and Danielle Quinn},
    editor    = {Cinzia Cappiello and Sandra Geisler and Maria-Esther Vidal},
    booktitle = {1st International Workshop on Data Ecosystems co-located with 48th International Conference on Very Large Databases (VLDB 2022)},
    pages     = {41--50},
    url       = {https://ceur-ws.org/Vol-3306/paper5.pdf},
    year      = {2022}
  }
  ```


  * [Hypster](https://github.com/gilad-rubin/hypster) - hyperparameter management
  * [DSP Decision Engine](https://github.com/capitec/dsp-decision-engine) - decision trees
  * [NaturF](https://github.com/IMMM-SFA/naturf/) - library for data transformation for weather forecasting
  * [WrenAI](https://github.com/Canner/WrenAI) - RAG
  * [FlowerPower](https://github.com/legout/flowerpower/) - Scheduler for Hamilton


pkgId: 6de9e2acd3aea8a95b4260764d307bd8089a904116b4e8ff7bea6d40d032c14d
name: python-sf-heu
arch: noarch
version: 0.6.0.dev20241106
epoch: 0
release: 1
url: https://github.com/secretflow/heu
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sf-heu-0.6.0.dev20241106-1.src.rpm
location_href: Packages/python-sf-heu-0.6.0.dev20241106-1.noarch.rpm
checksum_type: sha256
summary:
  Homomorphic Encryption processing Unit (HEU) is a subproject of Secretflow that implements high-performance homomorphic encryption algorithms.

description:
  [![CircleCI](https://dl.circleci.com/status-badge/img/gh/secretflow/heu/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/secretflow/heu/tree/main)
  ![PyPI version](https://img.shields.io/pypi/v/sf-heu)

  [中文](README_cn.md)

  HEU (Homomorphic Encryption processing Unit) is a user-friendly and high-performance homomorphic
  encryption library that supports multiple types and scalable hardware acceleration.



  https://www.secretflow.org.cn/docs/heu/



  Homomorphic encryption algorithms are mainly divided into two categories: partially homomorphic
  encryption (PHE) and fully homomorphic encryption (FHE). Currently, HEU supports most PHE
  algorithms, while FHE is still under development and will take some time.

  Supported algorithms:

  - Additive homomorphic encryption
      - Paillier (recommended)
      - Okamoto–Uchiyama (recommended)
      - EC ElGamal
      - Damgard-Jurik
      - Damgard-Geisler-Krøigaard (DGK)
  - Fully homomorphic encryption
      - Under development and is the current focus of work.

  Each algorithm includes a variety of different implementations, and some implementations support
  hardware accelerators. For more details, please refer to
  the [Document](https://www.secretflow.org.cn/docs/heu/latest/zh-Hans/getting_started/algo_choice )




  ```text
  .
  ├── .circleci  # CI/CD configuration files for circleci
  ├── .github    # Configuration files for GitHub
  ├── docs       # HEU documentation in Sphinx format
  ├── heu        # All the implementation code for HEU
  │   ├── algorithms     # Holds the implementations of all algorithms
  │   ├── experimental   # Contains some standalone experimental code
  │   ├── library        # Implements the application layer functionality of the HE Library
  │   │   ├── algorithms # Legacy algorithms not yet migrated to SPI (this directory will be deprecated after migration)
  │   │   ├── benchmark  # Contains benchmarking code
  │   │   ├── numpy      # Implements a set of Numpy-like interfaces
  │   │   └── phe        # PHE Dispatcher implementation (to be deprecated, with replaced by SPI)
  │   ├── pylib          # Python bindings
  │   └── spi            # Defines the HEU software and hardware access layer interface (SPI)
  │       ├── he         # Contains HE SPI and related Sketches
  │       └── poly       # Defines polynomial interfaces and related Sketches
  └── third_party        # Contains third-party libraries required for compilation; libraries will be automatically downloaded during build

  ```

  HEU is currently transitioning from the old Dispatcher architecture to an SPI-based framework. The
  main modules and their code path mappings for both architectures are as follows:

  Dispatcher-based architecture:

  ```text
       Python APIs (Python binding)
            PATH: heu/pylib
                    │
                    ├───────────────────┐
                    │                   ▼
                    │    Tensor Lib with Numpy-like API
                    │        PATH: heu/library/numpy
                    │                   │
                    │     ┌─────────────┘
                    │     │
                    ▼     ▼
       PHE Dispatcher & PHE C++ API
          PATH: heu/library/phe
                    │
                    │
                    ▼
   Various PHE algorithm implementations
       PATH: heu/library/algorithms
  ```

  SPI-based architecture:

  ```text
      Python APIs (Python binding)
           PATH: heu/pylib
                   │
                   ├───────────────────┐
                   │                   ▼
                   │    Tensor Lib with Numpy-like API
                   │           PATH: heu/numpy
                   │                   │
                   │ ┌─────────────────┘
                   │ │
                   ▼ ▼
           HE SPI (C++ APIs)
           PATH: heu/spi/he
                   │
                   │
                   ▼
   Various HE algorithm implementations
          PATH: heu/algorithms
  ```

  For a more detailed introduction to SPI, please [click here](heu/spi/README.md)



  Architecture Transition Milestones:

  - [x] HE SPI: Designed a unified interface that supports all PHE/FHE algorithms.
  - [ ] Implementation of SPI Sketches. (in progress)
  - [ ] Migration of existing algorithms to SPI. (in progress)
  - [ ] Automated testing framework for PHE/FHE algorithms. (in progress)
  - [ ] Transition of Tensor Lib's underlying layer from Dispatcher to SPI.
  - [ ] Transition of PyLib's underlying layer from Dispatcher to SPI.

  FHE Milestones:

  - [ ] Integration of Microsoft SEAL
  - [ ] Integration of OpenFHE.
  - [ ] Support for GPU-accelerated CKKS algorithm.
  - [ ] Provides FHE interfaces in Tensor Lib.
  - [ ] Provides FHE interfaces in PyLib.





  - CPU
      - x86_64: minimum required AVX instruction set
      - AArch64: ARMv8
  - OS
      - Ubuntu 18.04+
      - Centos 7
      - macOS 12.0+ (macOS Monterey+)<sup>1</sup>
  - Python
      - Python 3.9+

  1. Due to CI resource limitation, macOS x64 prebuild binary is no longer available.



  ```shell
  pip install sf-heu
  ```



  The following command will automatically compile and install HEU into the default Python
  environment:

  ```shell
  git clone git@github.com:secretflow/heu.git
  cd heu
  sh build_wheel_entrypoint.sh

  ```







  ```shell

  bazel build heu/...


  bazel test heu/...
  ```



  SecretFlow is an open and inclusive community, and we welcome any kind of contribution. If you want
  to improve HEU, please refer to [Contribution Guide](CONTRIBUTING.md)


pkgId: 915aca5cbb4eb5ea0781322dbed3476fa4932ac5c0515bf1b4d5c08a2ae2f2ee
name: python-sfapi-client-help
arch: noarch
version: 0.3.2
epoch: 0
release: 1
summary: Development documents and examples for sfapi-client
url: https://pypi.org/project/sfapi-client/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sfapi-client-0.3.2-1.src.rpm
location_href: Packages/python-sfapi-client-help-0.3.2-1.noarch.rpm
checksum_type: sha256
description:
  Install sfapi_client using pip:
  ```shell
  $ pip install sfapi_client
  ```
  Let's get started by checking the status of perlmutter:
  ```pycon
  >>> from sfapi_client import Client
  >>> from sfapi_client.compute import Machine
  >>> with Client() as client:
  >>> status
  Compute(name='perlmutter', full_name='Perlmutter', description='System Degraded', system_type='compute', notes=['2023-04-26 18:16 -- 2023-04-28 09:30 PDT, System Degraded, Rolling reboots are complete, a final reboot is scheduled for 0930 PDT'], status=<StatusValue.degraded: 'degraded'>, updated_at=datetime.datetime(2023, 4, 26, 18, 16, tzinfo=datetime.timezone(datetime.timedelta(days=-1, seconds=61200))), client=<sfapi_client._sync.client.Client object at 0x102c871c0>)
  ```

  * `async` interface and standard synchronous interface.
  * Fully type annotated.

  For the basics, head over to the [QuickStart](https://nersc.github.io/sfapi_client/quickstart/). We also have Jupyter Notebook [examples](https://nersc.github.io/sfapi_client/examples/).
  More in depth developer documentation can be found in the [API reference](https://nersc.github.io/sfapi_client).

  The sfapi_client project relies on these libraries:
  * `httpx` - HTTP support.
  * `authlib` - OAuth 2.0 authentication.
  * `pydantic` - Data models.
  * `tenacity` - Retry.
  * `datamodel-code-generator` - Generating data models from the Open API specification.
  * `unasync` - Generating synchronous interface from the async implementation.

  Install with pip:
  ```shell
  $ pip install sfapi_client
  ```


pkgId: 3cab8b1c8b6321ff34cc033b3a0eaf5fd2756a164cd14e88ca5d8867aca19726
name: python-sfextract-help
arch: noarch
version: 0.0.6
epoch: 0
release: 1
summary: Development documents and examples for sfextract
url: https://github.com/CybercentreCanada/sfextract
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sfextract-0.0.6-1.src.rpm
location_href: Packages/python-sfextract-help-0.0.6-1.noarch.rpm
checksum_type: sha256
description:
  <a href="https://pypi.org/project/sfextract/#history"><img src="https://img.shields.io/pypi/v/sfextract.svg" alt="Latest Stable Release"></a>

  This library tries to extract all internal files associated with Setup Factory executables. This extractor is based on [SFUnpacker](https://github.com/Puyodead1/SFUnpacker) but is meant to be fully executable on Linux.



  sfextract can be installed from pypi using pip:
  ```
  pip install sfextract
  ```



  By installing this library, you will be able to simply execute `sfextract` from your commandline.

  If you wish to use it as an imported library instead, you can use
  ```python
  from sfextract.main import extract

  extractor = extract("file.exe", "output_folder")
  print(extractor.version)
  for file in extractor.files:
      print(file)
  ```



  This library has the same limitations as the one it was based on. It currently only support Setup Factory 7, 8 and 9. At this moment, as opposed to SFUnpacker, this version does not support LZMA2.


pkgId: a564fa24244a19d71cfb43de1fa0d69419b436bac12b28cedebc67ffcaa4f2d3
name: python-sfq-help
arch: noarch
version: 0.0.2
epoch: 0
release: 1
summary: Development documents and examples for sfq
url: https://pypi.org/project/sfq/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sfq-0.0.2-1.src.rpm
location_href: Packages/python-sfq-help-0.0.2-1.noarch.rpm
checksum_type: sha256
description:
  sfq is a lightweight Python wrapper library designed to simplify querying Salesforce, reducing repetitive code for accessing Salesforce data.

  For more varied workflows, consider using an alternative like [Simple Salesforce](https://simple-salesforce.readthedocs.io/en/stable/). This library was even referenced on the [Salesforce Developers Blog](https://developer.salesforce.com/blogs/2021/09/how-to-automate-data-extraction-from-salesforce-using-python).



  - Simplified query execution for Salesforce instances.
  - Integration with Salesforce authentication via refresh tokens.
  - Option to interact with Salesforce Tooling API for more advanced queries.



  You can install the `sfq` library using `pip`:

  ```bash
  pip install sfq
  ```





  ```python
  from sfq import SFAuth


  sf = SFAuth(
      instance_url="https://example-dev-ed.trailblaze.my.salesforce.com",
      client_id="PlatformCLI",
      refresh_token="your-refresh-token-here"
  )


  print(sf.query("SELECT Id FROM Account LIMIT 5"))


  print(sf.query("SELECT Id, FullName, Metadata FROM SandboxSettings LIMIT 5", tooling=True))
  ```



  You can easily incorporate this into ad-hoc bash scripts or commands:

  ```bash
  python -c "from sfq import SFAuth; sf = SFAuth(instance_url='$instance_url', client_id='$client_id', refresh_token='$refresh_token'); print(sf.query('$query'))" | jq -r '.records[].Id'
  ```



  To use the `sfq` library, you'll need a **client ID** and **refresh token**. The easiest way to obtain these is by using the Salesforce CLI:



  1. **Install the Salesforce CLI**:
     Follow the instructions on the [Salesforce CLI installation page](https://developer.salesforce.com/tools/salesforcecli).

  2. **Authenticate with Salesforce**:
     Login to your Salesforce org using the following command:

     ```bash
     sf org login web --alias int --instance-url https://corpa--int.sandbox.my.salesforce.com
     ```

  3. **Display Org Details**:
     To get the client ID, refresh token, and instance URL, run:

     ```bash
     sf org display --target-org int --verbose --json
     ```

     The output will look like this:

     ```json
     {
       "status": 0,
       "result": {
         "id": "00Daa0000000000000",
         "apiVersion": "62.0",
         "accessToken": "your-access-token-here",
         "instanceUrl": "https://example-dev-ed.trailblaze.my.salesforce.com",
         "username": "user@example.com",
         "clientId": "PlatformCLI",
         "connectedStatus": "Connected",
         "sfdxAuthUrl": "force://PlatformCLI::your-refresh-token-here::https://example-dev-ed.trailblaze.my.salesforce.com",
         "alias": "int"
       }
     }
     ```

  4. **Extract and Use the Tokens**:
     The `sfdxAuthUrl` is structured as:

     ```
     force://<client_id>::<refresh_token>::<instance_url>
     ```

     You can extract and use the tokens in a bash script like this:

     ```bash
     query="SELECT Id FROM User WHERE IsActive = true AND Profile.Name = 'System Administrator'"

     sfdxAuthUrl=$(sf org display --target-org int --verbose --json | jq -r '.result.sfdxAuthUrl' | sed 's/force:\/\///')
     clientId=$(echo "$sfdxAuthUrl" | sed 's/::/\n/g' | sed -n '1p')
     refreshToken=$(echo "$sfdxAuthUrl" | sed 's/::/\n/g' | sed -n '2p')
     instanceUrl=$(echo "$sfdxAuthUrl" | sed 's/::/\n/g' | sed -n '3p')

     pip install sfq && python -c "from sfq import SFAuth; sf = SFAuth(instance_url='$instanceUrl', client_id='$clientId', refresh_token='$refreshToken'); print(sf.query('$query'))" | jq -r '.records[].Id'
     ```



  - **Authentication**: Make sure your refresh token is kept secure, as it grants access to your Salesforce instance.
  - **Tooling API**: You can set the `tooling=True` argument in the `query` method to access the Salesforce Tooling API for more advanced metadata queries.


pkgId: d149050cfcb32c98e59caccaebab3aaf9baaec91c18ead3bf471932dcd7e99e7
name: python-sgn-event-help
arch: noarch
version: 0.0.3.1
epoch: 0
release: 1
summary: Development documents and examples for sgn-event
url: https://git.ligo.org/greg/sgn-event
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sgn-event-0.0.3.1-1.src.rpm
location_href: Packages/python-sgn-event-help-0.0.3.1-1.noarch.rpm
checksum_type: sha256
description:
  To make it easy for you to get started with GitLab, here's a list of recommended next steps.

  Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!



  - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
  - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:

  ```
  cd existing_repo
  git remote add origin https://git.ligo.org/greg/sgn-event.git
  git branch -M main
  git push -uf origin main
  ```



  - [ ] [Set up project integrations](https://git.ligo.org/greg/sgn-event/-/settings/integrations)



  - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
  - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
  - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
  - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
  - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)



  Use the built-in continuous integration in GitLab.

  - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
  - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
  - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
  - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
  - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)

  ***



  When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.



  Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.


  Choose a self-explaining name for your project.


  Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.


  On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.


  Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.


  Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.


  Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.


  Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.


  If you have ideas for releases in the future, it is a good idea to list them in the README.


  State if you are open to contributions and what your requirements are for accepting them.

  For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.

  You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.


  Show your appreciation to those who have contributed to the project.


  For open source projects, say how it is licensed.


  If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.


pkgId: d3783c7f20401cec958b6e5dddf4a37ee763e1b7c2f24f495b150ab734640ff6
name: python-sgn-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for sgn
url: https://git.ligo.org/greg/sgn
rpm_license: MPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sgn-0.1.0-1.src.rpm
location_href: Packages/python-sgn-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  ```
  The whole graph execution is orchestrated by an event loop that will execute until end of stream.  Here is a simple example implementing the above graph
  ```python

  from sgn.base import SourceElement, SinkElement, Frame
  from sgn.apps import Pipeline
  class MySourceClass(SourceElement):
      def new(self, pad):
          return Frame(data="hello")
  class MySinkClass(SinkElement):
      def pull(self, pad, frame):
          print (frame.data)
  source = MySourceClass(source_pad_names = ("a",))
  sink = MySinkClass(sink_pad_names = ("x",))
  pipeline = Pipeline()
  pipeline.insert(source, sink, link_map = {sink.snks["x"]: source.srcs["a"]})
  pipeline.run()
  ```
  If you run this, it will run forever and you will see
  ```
  hello
  hello
  hello
  hello
  hello
  hello
  hello
  hello
  hello
  hello
  ```
  You would need to send SIG INT or SIG kill to stop the program. Lets add a feature to end the stream after 10 Frames.
  ```python

  from sgn.base import SourceElement, SinkElement, Frame
  from sgn.apps import Pipeline
  class MySourceClass(SourceElement):
      def __post_init__(self):
          super().__post_init__()
          self.cnt = 0
      def new(self, pad):
          self.cnt += 1
          return Frame(data="hello", EOS=self.cnt > 10)
  class MySinkClass(SinkElement):
      def pull(self, pad, frame):
          if frame.EOS:
              self.mark_eos(pad)
          print (frame.data)
  source = MySourceClass(source_pad_names = ("a",))
  sink = MySinkClass(sink_pad_names = ("x",))
  pipeline = Pipeline()
  pipeline.insert(source, sink, link_map = {sink.snks["x"]: source.srcs["a"]})
  pipeline.run()
  ```
  Now you would see the word "hello" printed 11 times.  The 11th time the Frame
  is marked as EOS, which means end of stream.  The sink class checks the data it
  has gotten and marks the pad as EOS.  When all sink element sink pads are at
  EOS the pipeline stops running (in this case there is just one sink element
  with one sink pad).
  What if we want more than one pad?  It is possible to have many source and sink
  pads on an element. SGN provides basic bookkeeping utilities for you, but
  generally what the "correct" behavior is is up to you. Lets try a more complicated
  example with multiple pads


pkgId: c17ee131c0dbdf076a59edece5e1fef27bcac91b9cfd4272e4733bb314e4f1ac
name: python-sha0-py-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for sha0-py
url: https://pypi.org/project/sha0-py/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sha0-py-0.0.1-1.src.rpm
location_href: Packages/python-sha0-py-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  This is a purely Python implementation of the broken SHA-0 hash algorithm. The usage is exactly the same as the hashes provided in the Python builtin `hashlib` library.


  This repository is based off of the C implementation of SHA-0 in [this repo](https://github.com/johndoe31415/sha0/blob/master/README.md) by [@johndoe31415](https://github.com/johndoe31415).


  ```bash
  pip install sha0-py
  ```


  ```py

  >>> import sha0
  >>> m = sha0.sha0(b"Nobody inspects")
  >>> m.update(b" the spammish repetition")
  >>> m.digest()
  b'\xe2\xb0\xa8`\x9bG\xc5\x8e]\x98L\x9c\xcf\xe6\x9f\x9beK\x03+'
  >>> m.hexdigest()
  b'e2b0a8609b47c58e5d984c9ccfe69f9b654b032b'


  >>> import sha0
  >>> m = sha0.sha0(b"Nobody inspects the spammish repetition")
  >>> m.hexdigest()
  b'e2b0a8609b47c58e5d984c9ccfe69f9b654b032b'
  ```


  MIT License


pkgId: b5a16432c8851fbc0ed04ff229273406696689552f18069d6b998ddde243375c
name: python-shabdamegha-help
arch: noarch
version: 0.1.7
epoch: 0
release: 1
summary: Development documents and examples for shabdamegha
url: https://sbissoyi.github.io/shabdamegha/docs
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shabdamegha-0.1.7-1.src.rpm
location_href: Packages/python-shabdamegha-help-0.1.7-1.noarch.rpm
checksum_type: sha256
description:
  ![shabdamegha](https://sbissoyi.github.io/shabdamegha/docs/shabdamegha.png)

  `Shabdamegha` is a python library to generate word cloud for Odia language with proper rendering of Ligatures (Yuktakshars). (ଯୁକ୍ତାକ୍ଷର ଗୁଡ଼ିକୁ ସଠିକ୍‌ ପ୍ରଦର୍ଶିତ କରି ଶବ୍ଦମେଘ ସୃଷ୍ଟି କରିବା ନିମନ୍ତେ ଏକ ପାଇଥନ୍‌ ଲାଇବ୍ରେରୀ)


  - Support for Yuktakshar rendering.
  - Flexible customization of font, color, orientation, and placement.
  - Expandable canvas for dynamic word placement.


  ```bash
  pip install shabdamegha


  from shabdamegha.shabdamegha import draw_shabdamegha


  districts_of_odisha = {
                          "ଅନୁଗୋଳ": 13, "କଟକ": 8, "କଳାହାଣ୍ଡି": 16, "କନ୍ଧମାଳ": 16, "କେନ୍ଦୁଝର": 17, "କେନ୍ଦ୍ରାପଡ଼ା": 5, "କୋରାପୁଟ": 18, "ଖୋର୍ଦ୍ଧା": 6,
                          "ଗଜପତି": 8, "ଗଞ୍ଜାମ": 16, "ଜଗତସିଂହପୁର": 4, "ଝାରସୁଗୁଡ଼ା": 4, "ଢେଙ୍କାନାଳ": 9, "ଦେବଗଡ଼": 6, "ନବରଙ୍ଗପୁର": 11, "ନୟାଗଡ଼": 8,
                          "ନୂଆପଡ଼ା": 8, "ପୁରୀ": 6, "ବରଗଡ଼": 12, "ବଲାଙ୍ଗୀର": 13, "ବାଲେଶ୍ୱର": 7, "ବୌଦ୍ଧ": 7, "ଭଦ୍ରକ": 5, "ମୟୂରଭଞ୍ଜ": 21, "ମାଲକାନଗିରି": 12,
                          "ଯାଜପୁର": 6, "ରାୟଗଡ଼ା": 14, "ସମ୍ବଲପୁର": 13, "ସୁବର୍ଣ୍ଣପୁର": 5, "ସୁନ୍ଦରଗଡ଼": 19
                          }
  draw_shabdamegha(districts_of_odisha, colors=[(148, 0, 211), (0, 0, 255), (5, 108, 8), (255, 127, 0), (255, 0, 0)])

  draw_shabdamegha(
      data="ଶ୍ରୀଜଗନ୍ନାଥ ଓଡ଼ିଶା ଦୁର୍ଗାପୂଜା କଟକ ପୁରୀ ଭୁବନେଶ୍ୱର ନବରଙ୍ଗପୁର କୋରାପୁଟ ମୟୂରଭଞ୍ଜ",
      save_file_path="example_wordcloud.png",
      orientations=[-90, -60, -30, 0, 30, 60, 90]
      )

  words = ["ଶ୍ଳେଷ", "ସନ୍ନିବେଶ", "ଶୃଙ୍ଖଳା", "ଚାଞ୍ଛିବା", "ଝୁଣ୍ଟିଆ", "ରୋମନ୍ଥନ", "କୁମ୍ଭୀର", "ବାଗ୍ଦେବୀ", "କଚ୍ଛପ", "ଖଡ୍ଗଧାରି", "ଅକ୍ଷୁର୍ଣ୍ଣ", "ଉଡ୍ଡୀୟମାନ", "ଉତ୍କଣ୍ଠା", "ସମ୍ଭତ୍ସର", "ଉଦ୍ଘାଟନ", "ଉଦ୍ଦେଶ୍ୟ", "ଉଦ୍ଧାର", "ମୁଦ୍ଗର", "ଅଦ୍ଭୁତ", "ପିପ୍ପଳୀ", "ଅପ୍ସରା", "କୁବ୍ଜ", "ତିବ୍ବତ", "ସମ୍ମାନ", "ବଳ୍କଳ", "ଫାଲ୍ଗୁନ", "ସଂକଳ୍ପ", " ବଲ୍ଲଭ", "ଶିରଶ୍ଛେଦ", "ନିଷ୍ପୀଡନ", "ମାହାତ୍ମ୍ୟ", "ନିର୍ଦ୍ଧାରିତ", "ପଶ୍ଚିମ", "ପରିଷ୍କାର", "ଆସ୍ଫାଳନ", "ସମ୍ପ୍ରଦାନ", "ନିଷ୍ପ୍ରୟୋଜନ"]
  draw_shabdamegha(words, font_file_paths=['C:/Windows/Fonts/Kalinga.ttf', 'C:/Windows/Fonts/nirmala.ttc'], colors=True)


pkgId: fd685beaac1b99049183c4d79d5967610335f5bd68153fd15554c9bcd8c9b10d
name: python-shannonca-help
arch: noarch
version: 0.0.9
epoch: 0
release: 1
summary: Development documents and examples for shannonca
url: https://github.com/bdemeo/shannonca
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shannonca-0.0.9-1.src.rpm
location_href: Packages/python-shannonca-help-0.0.9-1.noarch.rpm
checksum_type: sha256
description:
  Surprisal Component Analysis (SCA) is a dimensionality reduction technique for single-cell data which leverages mathematical information theory to identify biologically informative axes of variation in single-cell transcriptomic data, enabling recovery of rare and common cell types at superior resolution. It is written in Python. The pre-print can be found [here](https://www.biorxiv.org/content/10.1101/2021.01.19.427303v1).

  For full documentation of shannonca's API, see our [Readthedocs page](https://shannonca.readthedocs.io/).



  SCA is available via pip:
  ```pip install shannonca```


  SCA requires the following packages:

  * scikit-learn
  * scipy
  * numpy
  * matplotlib
  * pandas
  * seaborn
  * scanpy




  SCA generates information score matrices, which are used to generate linear combinations of genes (metagenes) that are biologically informative. The package includes workflows both with and without Scanpy under `sca.dimred`.


  The `reduce` function accepts a (num genes) x (num cells) matrix X, and outputs a dimensionality-reduced version with fewer features. The input matrix may be normalized or otherwise processed, but a zero in the input matrix must indicate zero recorded transcripts.
  ```
  from shannonca.dimred import reduce

  X = mmread('mydata.mtx').transpose() # read some dataset

  reduction = reduce(X, n_comps=50, n_pcs=50, iters=1, nbhd_size=15, metric='euclidean', model='wilcoxon', chunk_size=1000, n_tests='auto')
  ```
  `reduction` is an (num cells) x (`n_comps`)-dimensional matrix. The function optionally returns SCA's score matrix (if keep_scores=True), metagene loadings (if keep_loadings=True), or intermediate results (if iters>1 and keep_all_iters=True). If at least one of these is returned, the return type is a dictionary with keys for 'reduction', 'scores', and 'loadings'. If keep_all_iters=True, the reductions after each iteration will be keyed by 'reduction_i' for each iteration number i.

  Starting neighborhoods are computed by default using Euclidean distance (controlled by `metric`) in `n_comps`-dimensional PCA space. See the docstring for more detailed and comprehensive parameter descriptions.


  Scanpy (https://github.com/theislab/scanpy) is a commonly-used single-cell workflow. To compute a reduction in place on a scanpy AnnData object, use `reduce_scanpy`:
  ```
  import scanpy as sc
  from shannonca.dimred import reduce_scanpy

  adata = sc.AnnData(X)
  reduce_scanpy(adata, keep_scores=True, keep_loadings=True, keep_all_iters=True, layer=None, key_added='sca', iters=1, n_comps=50)
  ```
  This function shares all parameters with `reduce`, but instead of returning the reduction, it updates the input AnnData object. Dimensionality reductions are stored in `adata.obsm[key_added]`, or, if keep_all_iters=True, in `adata.obsm['key_added_i']` for each iteration number i. If `keep_scores=True` in the reducer constructor, the information scores of each gene in each cell are stored in `adata.layers[key_added_score]`. If `layer=None`, the algorithm is run on `adata.X`; otherwise, it is run on `adata.layers[layer]`.


  If you are having trouble running SCA, try the following:

  * Pull from the github repository to ensure that your version of SCA is up to date.
  * Ensure that the Python version is at least 3.0, and that the installations of scanpy, numpy, scipy, and sklearn are up to date.
  * When running the `reduce` function, ensure that the input is either a CSR sparse matrix (`scipy.sparse.csr_matrix`) or a dense numpy array, with one row per cell and one column per gene. Coercion to sparse matrices is easy via `scipy.sparse.tocsr()`
  * When running `reduce_scanpy`, ensure that the input is a scanpy anndata object.
  * Ensure that the data type of the input is either an integer or float.
  * Double-check that the code follows the docstring for the relevant function: reduce or reduce_scanpy.


pkgId: 9e55c3eebffb448ca69fafefaf3c91130a916963691d16093dfa3a67512db8e3
name: python-shapelets-help
arch: noarch
version: 1.2
epoch: 0
release: 1
summary: Development documents and examples for shapelets
url: https://pypi.org/project/shapelets/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shapelets-1.2-1.src.rpm
location_href: Packages/python-shapelets-help-1.2-1.noarch.rpm
checksum_type: sha256
description:
  <h1 align="center">
  <img src="https://raw.githubusercontent.com/uw-comphys/shapelets/main/shapelets.png" width="650">
  </h1><br>

  [![DOI](https://joss.theoj.org/papers/10.21105/joss.06058/status.svg)](https://doi.org/10.21105/joss.06058)

  [**Getting Started**](#getting-started)
  | [**Issues**](#issues)
  | [**Contribute**](#contribute)
  | [**Citation**](#citation)
  | [**Authors**](#authors)



  Shapelets is a Python-based library that implements several shapelet functions and some of their applications in science and engineering. Shapelet functions are a complete and orthogonal set of localized basis functions with mathematical properties convenient for image analysis and manipulation. Applications include:

  * Astronomy/astrophysics ([A. Refregier (2003)](https://doi.org/10.1046/j.1365-8711.2003.05901.x), [R. Massey (2005)](https://doi.org/10.48550/arXiv.astro-ph/0408445), [J. Berge (2019)](https://doi.org/10.48550/arXiv.1903.05837))
  * Nanostructure characterization ([R. Suderman (2015)](http://dx.doi.org/10.1103/PhysRevE.91.033307), [T. Akdeniz (2018)](https://doi.org/10.1088/1361-6528/aaf353), [M. P. Tino (2024)](http://dx.doi.org/10.1088/1361-6528/ad1df4))
  * Computational neuroscience ([J. D. Victor (2006)](https://doi.org/10.1152/jn.00498.2005), [T. O. Sharpee (2009)](https://doi.org/10.1007%2Fs10827-008-0107-5))
  * Medical imaging ([J. Weissman (2004)](https://doi.org/10.1364/OPEX.12.005760))

  The shapelets library provides reference code and documentation for the following shapelet functions:

  * Cartesian shapelets ([A. Refregier (2003)](https://doi.org/10.1046/j.1365-8711.2003.05901.x))
  * Polar shapelets ([R. Massey (2005)](https://doi.org/10.48550/arXiv.astro-ph/0408445))
  * Exponential shapelets ([J. Berge (2019)](https://doi.org/10.48550/arXiv.1903.05837))
  * Orthonormal polar shapelets ([T. Akdeniz (2018)](https://doi.org/10.1088/1361-6528/aaf353), [M. P. Tino (2024)](https://hdl.handle.net/10012/20779))



  If you have Python 3.10+ installed on your machine, you can install the shapelets library via pip:

      pip install shapelets

  Otherwise, consult the [official website](https://uw-comphys.github.io/shapelets/shapelets.html) for installation instructions.



  If you encounter any **problems** with shapelets, please create a post using the [issue tracker](https://github.com/uw-comphys/shapelets/issues). Provide a clear and concise description of the problem with images/code-snippets where appropriate. We will address these problems as fast as possible.



  The authors of the shapelets library welcome contributions to the source code. Please follow the contribution policy:

  * Open an issue on the library [issue tracker](https://github.com/uw-comphys/shapelets/issues) clearly describing your intentions on code modifications
  * Ensure your modifications or additions adhere to the existing standard of the shapelets library (i.e. how are your docstrings?)
  * Test your modifications to ensure the integrity of the library is intact via the entry point: `shapelets-test`

  * Once the issue has been discussed with a library author, you may open a pull request containing your modifications



  If you plan to use shapelets in your own work, please cite using the **Cite this repository** dropdown button on the top right of this page (under *About*).



  * Matthew Peres Tino (mptino@uwaterloo.ca)
  * Abbas Yusuf Abdulaziz
  * Nasser Mohieddin Abukhdeir
  * Robert Suderman
  * Thomas Akdeniz

rpm_license:
  GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999  Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.  [This is the first released version of the Lesser GPL.  It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]  Preamble  The licenses for most software are designed to take away your freedom to share and change it.  By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.  This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it.  You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.  When we speak of free software, we are referring to freedom of use, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.  To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights.  These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.  For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you.  You must make sure that they, too, receive or can get the source code.  If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it.  And you must show them these terms so they know their rights.  We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.  To protect each distributor, we want to make it very clear that there is no warranty for the free library.  Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.  Finally, software patents pose a constant threat to the existence of any free program.  We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder.  Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.  Most GNU software, including some libraries, is covered by the ordinary GNU General Public License.  This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License.  We use this license for certain libraries in order to permit linking those libraries into non-free programs.  When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library.  The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom.  The Lesser General Public License permits more lax criteria for linking other code with the library.  We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License.  It also provides other free software developers Less of an advantage over competing non-free programs.  These disadvantages are the reason we use the ordinary General Public License for many libraries.  However, the Lesser license provides advantages in certain special circumstances.  For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard.  To achieve this, non-free programs must be allowed to use the library.  A more frequent case is that a free library does the same job as widely used non-free libraries.  In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.  In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software.  For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.  Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.  The precise terms and conditions for copying, distribution and modification follow.  Pay close attention to the difference between a "work based on the library" and a "work that uses the library".  The former contains code derived from the library, whereas the latter must be combined with the library in order to run.  GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION  0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".  A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.  The "Library", below, refers to any such software library or work which has been distributed under these terms.  A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language.  (Hereinafter, translation is included without limitation in the term "modification".)  "Source code" for a work means the preferred form of the work for making modifications to it.  For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.  Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.  The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it).  Whether that is true depends on what the Library does and what the program that uses the Library does.  1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.  You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.  2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:  a) The modified work must itself be a software library.  b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.  c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.  d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.  (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application.  Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)  These requirements apply to the modified work as a whole.  If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.  But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.  Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.  In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.  3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library.  To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License.  (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.)  Do not make any other change in these notices.  Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.  This option is useful when you wish to copy part of the code of the Library into a program that is not a library.  4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.  If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.  5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library".  Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.  However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library".  The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.  When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library.  The threshold for this to be true is not precisely defined by law.  If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work.  (Executables containing this object code plus portions of the Library will still fall under Section 6.)  Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.  6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.  You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License.  You must supply a copy of this License.  If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License.  Also, you must do one of these things:  a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library.  (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)  b) Use a suitable shared library mechanism for linking with the Library.  A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.  c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.  d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.  e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.  For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it.  However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.  It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system.  Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.  7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:  a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities.  This must be distributed under the terms of the Sections above.  b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.  8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License.  However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.  9. You are not required to accept this License, since you have not signed it.  However, nothing else grants you permission to modify or distribute the Library or its derivative works.  These actions are prohibited by law if you do not accept this License.  Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.  10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.  11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all.  For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.  If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.  It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices.  Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.  This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.  12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.  In such case, this License incorporates the limitation as if written in the body of this License.  13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.  Each version is given a distinguishing version number.  If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.  If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.  14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission.  For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this.  Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.  NO WARRANTY  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  END OF TERMS AND CONDITIONS  How to Apply These Terms to Your New Libraries  If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change.  You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).  To apply these terms, attach the following notices to the library.  It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.  <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.  You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA  Also add information on how to contact you by electronic and paper mail.  You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary.  Here is a sample; alter the names:  Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker.  <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice  That's all there is to it!


pkgId: 0f40e2eb1eaacd20abb8152beb3c96498d08579278a72f424bb08a4511b02261
name: python-shapeout2-help
arch: noarch
version: 2.20.1
epoch: 0
release: 1
summary: Development documents and examples for shapeout2
url: https://pypi.org/project/shapeout2/
rpm_license: GPL v3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shapeout2-2.20.1-1.src.rpm
location_href: Packages/python-shapeout2-help-2.20.1-1.noarch.rpm
checksum_type: sha256
description:
  |PyPI Version| |Build Status| |Coverage Status| |Docs Status|
  **Shape-Out 2** is the successor of
  `Shape-Out <https://github.com/ZELLMECHANIK-DRESDEN/ShapeOut>`__,
  a graphical user interface for the analysis and visualization of RT-DC data sets.
  For more information please visit https://zellmechanik.com/.


pkgId: e94289d5c4eb787d336b0b3ccf8c86b64e2d31b4bf4d9e240f32d2471664d8ed
name: python-share-df-help
arch: noarch
version: 1.0.7
epoch: 0
release: 1
summary: Development documents and examples for share-df
url: https://github.com/RohanAdwankar/share-df
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-share-df-1.0.7-1.src.rpm
location_href: Packages/python-share-df-help-1.0.7-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
  <img width="420" alt="image" class="center" src="https://github.com/user-attachments/assets/9e2b699d-9b31-4e9e-8f0b-87c1f5420920">
  </p>


  <p align="center">
  <a href="https://pepy.tech/project/share-df"><img src="https://static.pepy.tech/badge/share-df" alt="PyPI Downloads"></a>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <a href="https://pypi.org/project/share-df/"><img src="https://img.shields.io/pypi/v/share-df.svg" alt="PyPI Latest Release"></a>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <a href="https://github.com/RohanAdwankar/share-df">Demos and Source Code</a>
  </p>
  <video src="https://github.com/user-attachments/assets/fd8e9ea4-b0d5-4d61-abfc-cd584ba7af44" controls="controls" muted="muted" style="max-width:100%;"></video>



  This package enables cross-collaboration between nontechnical and technical contributors by allowing developers to generate a URL for free with one line of code that they can then send to nontechnical contributors enabling them to modify the dataframe with a web app. Then, they can send it back to the developer, directly generating the modified dataframe, maintaining code continuity, and removing the burden of file transfer and conversion to other file formats.


  - ```pip install share-df```
  - one function call to generate a link to send, accessible anywhere
  - changes made by the client are received back as a dataframe for seamless development


  - Easy Google OAuth login
  - Seamless UI to modify the dataframe
      * Change column names
      * Drag around columns
      * Change all values
      * Rename columns
      * Add new columns and rows
  - Send the results back with the click of a button
  - Work with large amounts of data quickly


  1. ```pip install share-df```
  2. If you do not already have one, generate an auth token for free in less than a minute with [ngrok](https://dashboard.ngrok.com/)
  3. Create a .env file in your directory with NGROK_AUTHTOKEN=<insert your token>
  4. import and call the function on any df!


  ```
  import pandas as pd
  from share_df import pandaBear

  df = pd.DataFrame({
      'Name': ['John', 'Alice', 'Bob', 'Carol'],
      'City': ['New York', 'London', 'Paris', 'Tokyo'],
      'Salary': [50000, 60000, 75000, 65000]
  })

  df = pandaBear(df)
  print(df)
  ```



  <video src="https://github.com/user-attachments/assets/7fdaac68-b77d-49b3-89ff-17af028ff5bf" controls="controls" muted="muted" style="max-width:100%;"></video>

  - As per the demo, currently, the site takes 6 seconds to load a million rows.
  - After loading, it can handle cell changes, row additions, column sorting, new columns, fast scrolling, and sending the data back frictionlessly.
  - That being said given interest I can improve this experience.


  - This code works by creating a localhost and then tunneling traffic to make it accessible to other people.
  - Thereby, since Google Colab code runs on a VM this is an interesting challenge to handle.
  - As of 0.1.7 the package offers support for creating a Google-generated link for DFs but this link is not shareable.
  - For Google Colab instead of using a .env I recommend putting your NGROK_AUTHTOKEN into the Google Colab secrets manager (key icon on the left side of the screen). That way your secrets also can be synced to other notebooks and you don't have to repeat the .env uploading each time.
  - I initially aimed for full functionality (link sharing) with Google Colab however it seems impossible as Colab locks it to Colab session authentification.
  - Google has also stated that they may deprecate their serve_kernel_port_as_window function in the future in which case it will be swapped to serve_kernel_port_as_iframe and the same functionality will remain except it will be in the IFrame.
  - For now, there is an optional parameter that allows you to use the editor in IFrame mode.
  - Check out a [demo notebook](https://colab.research.google.com/drive/1LUm6vmb-aWBqLk5h9mcLPadQFzAEXiDq?usp=sharing) here.

  <video src="https://github.com/user-attachments/assets/373ec28c-d61e-467b-9b54-ff6225126396" controls="controls" muted="muted" style="max-width:100%;"></video>


  - Better Dataframe handling (pagination, lazy loading, better frontend for big data)
  - Better Security (input sanitization, CSRF protection, configurable endpoint rate limiting)
  - Better UI (search, dark mode, export option)
  - IFrame Usage Option in Google Colab
  - True Asynchronicity with ipyparallel
  - Code Recreation (instead of overwriting the df just solve the code needed)
  - Multiple authenticated users


pkgId: 4609cd6c58661ba6ff24bfd1595f1d27324f0b4ca0f04701919699d8ca39f965
name: python-shareyourcloning-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for shareyourcloning
url: https://github.com/manulera/shareyourcloning_backend
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shareyourcloning-0.1.0-1.src.rpm
location_href: Packages/python-shareyourcloning-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Python tests](https://github.com/manulera/ShareYourCloning_backend/actions/workflows/ci.yml/badge.svg)](https://github.com/manulera/ShareYourCloning_backend/actions/workflows/ci.yml)
  [![codecov](https://codecov.io/gh/manulera/ShareYourCloning_backend/graph/badge.svg?token=CFIB2H6WMO)](https://codecov.io/gh/manulera/ShareYourCloning_backend)



  This API is part of a bigger application, before going further, please go to the [main project readme](https://github.com/manulera/ShareYourCloning), where you can find an introduction.

  This python API is built with [FastAPI](https://fastapi.tiangolo.com/) and is for *in silico* cloning.



  Read [main project readme](https://github.com/manulera/ShareYourCloning) first.

  This API provides a series of entry points. The API documentation can be accessed [here](https://shareyourcloning.api.genestorian.org/docs). You can use the documentation page to try some request directly on the browser. Otherwise, the API is open for you to make requests from a python script or command line at: [https://shareyourcloning.api.genestorian.org/](https://shareyourcloning.api.genestorian.org/).



  If you want to quickly set up a local instance of the frontend and backend of the application, check [getting started in 5 minutes](https://github.com/manulera/ShareYourCloning#timer_clock-getting-started-in-5-minutes) in the main repository.



  You can install this as a python package:

  ```bash

  python -m venv .venv

  source .venv/bin/activate

  pip install shareyourcloning

  uvicorn shareyourcloning.main:app
  ```



  For the management of the dependencies `poetry` is used, if you don't have it, visit https://python-poetry.org/.

  In the project directory:

  ```bash

  poetry install


  pre-commit install


  poetry shell

  ```

  The virtual environment is installed in the project folder. This is convenient if you are using an IDE for development. For settings of vscode see the folder `.vscode`.

  Now you should be able to run the api by running:

  ```bash

  uvicorn shareyourcloning.main:app --reload --reload-exclude='.venv'
  ```

  Then you should be able to open the API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) to know that your API is working.



  If you want to serve the full site (backend and frontend) with docker, check [getting started in 5 minutes](https://github.com/manulera/ShareYourCloning#timer_clock-getting-started-in-5-minutes) in the main repository.

  If you want to serve only the backend from a docker container, an image is available at [manulera/shareyourcloningbackend](https://hub.docker.com/r/manulera/shareyourcloningbackend). The image is built from the Dockerfile in the root of this repository and exposes the port 3000. To run it:

  ```bash
  docker build -t manulera/shareyourcloningbackend .
  docker run -d --name backendcontainer -p 8000:8000 manulera/shareyourcloningbackend

  ```

  If you don't want to download the repository and build the image, you can fetch the latest image from dockerhub (same image that is used in [https://shareyourcloning.api.genestorian.org/](https://shareyourcloning.api.genestorian.org/))

  ```bash
  docker pull manulera/shareyourcloningbackend
  docker run -d --name backendcontainer -p 8000:8000 manulera/shareyourcloningbackend
  ```

  The api will be running at `http://localhost:8000`, so you should be able to access the docs at [http://localhost:8000/docs](http://localhost:8000/docs).



  If you want to receive requests from the [frontend](https://github.com/manulera/ShareYourCloning_frontend), or from another web application you may have to include the url of the frontend application in the CORS exceptions. By default, if you run the dev server with `uvicorn shareyourcloning.main:app --reload --reload-exclude='.venv'`, the backend will accept requests coming from `http://localhost:3000`, which is the default address of the frontend dev server (ran with `yarn start`).

  If you want to change the allowed origins, you can do so via env variables (comma-separated). e.g.:

  ```
  ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001 uvicorn shareyourcloning.main:app --reload --reload-exclude='.venv'
  ```

  Similarly, the frontend should be configured to send requests to the backend address, [see here](https://github.com/manulera/ShareYourCloning_frontend#connecting-to-the-backend).



  You may prefer to handle everything from a single server. You can do so by:
  * Build the [frontend](https://github.com/manulera/ShareYourCloning_frontend) with `yarn build`.
  * Copy the folder `build` from the frontend to the root directory of the backend, and rename it to `frontend`.
  * Set the environment variable `SERVE_FRONTEND=1` when running the backend. By default this will remove all allowed origins, but you can still set them with `ALLOWED_ORIGINS`.
  * Set the value of `backendUrl` in `frontend/config.js` to `/`.
  * Now, when you go to the root of the backend (e.g. `http://localhost:8000`), you should receive the frontend instead of the greeting page of the API.

  You can see how this is done in this [docker image](https://github.com/manulera/ShareYourCloning/blob/master/Dockerfile) and [docker-compose file](https://github.com/manulera/ShareYourCloning/blob/master/docker-compose.yml).



  Check [contribution guidelines in the main repository](https://github.com/manulera/ShareYourCloning/blob/master/CONTRIBUTING.md) for general guidelines.

  For more specific tasks:
  * Creating a new type of source: follow the [new source issue template](.github/ISSUE_TEMPLATE/new-source.md). You can create an issue like that [here](https://github.com/manulera/ShareYourCloning_backend/issues/new?assignees=&labels=new-source&projects=&template=new-source.md&title=New+source%3A+%3Cname-of-source%3E).



  ```
  pytest -v -ks
  ```





  ```
  poetry add git+https://github.com/BjornFJohansson/pydna#4fd760d075f77cceeb27969e017e04b42f6d0aa3
  ```



  For the frontend, it may be useful to produce stubs (I use them for writing the tests). See how this is implemented
  by looking at the `RecordStubRoute` class in `record_stub_route.py`. To run the dev server and record stubs:

  ```bash
  RECORD_STUBS=1 uvicorn shareyourcloning.main:app --reload --reload-exclude='.venv'
  ```

  This will record the stubs (requests and responses) in the `stubs` folder.


pkgId: 9b4cf76b4a326d7406fa9a9859b31fd4a5b300a4239d04b074cca8d64ec54bbd
name: python-sharklog-help
arch: noarch
version: 0.0.7
epoch: 0
release: 1
summary: Development documents and examples for sharklog
url: https://github.com/Bardreamaster/sharklog
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sharklog-0.0.7-1.src.rpm
location_href: Packages/python-sharklog-help-0.0.7-1.noarch.rpm
checksum_type: sha256
description:
      |--- __init__.py
      |--- parent_module.py
      |--- logger.py
      |--- sub_package
          |--- __init__.py
          |--- sub_module.py
  ```
  - First, you can add `NullHandler` to the root logger in `parent_package/__init__.py`, which logger named `parent_package`:
  ```python

  from sharklog import logging
  logging.getLogger().addHandler(logging.NullHandler())
  ```
  This is mentioned in the [Python Logging HOWTO](https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library) to identify the logger's default behavior.
  - Then, use `logging` in your package, they will be prefixed with the logger name `parent_package.`:
  ```python

  from sharklog import logging
  logger = logging.getLogger()    # the logger name will be `parent_package.parent_module`
  logger.debug("debug message")
  logger.info("info message")
  logger.warning("warning message")
  logger.error("error message")
  ```
  If you already using builtin logging module, you can use sharklog as a drop-in replacement.
  Just change ~~`import logging`~~ into `from sharklog import logging`. Then you can use `logging` as usual:
  ```python

  from sharklog import logging


  logging.debug("debug message")
  logging.info("info message")
  logging.warning("warning message")
  logging.error("error message")
  ```
  - Finally, you can set the logging level for the package in the main script which using the package:
  ```python

  from sharklog import logging
  from parent_package import parent_module
  from parent_package.sub_package import sub_module
  if __name__ == "__main__":
      logging.init(debug=True)    # init current logger with level=logging.DEBUG
      
      
  ```
  Or if you want to change the logging level for a specific module, you can set it in the module by:
  ```python
  from sharklog import logging
  logging.getLogger().setLevel(logging.WARNING)
  ```

rpm_license:
  MIT License  Copyright (c) 2024 ShiChangshan  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: 7f42f5247559e8a9b803ba80af749392b07ca3f878fbbcaaba6639dd508d1000
name: python-sharpshot-help
arch: noarch
version: 1.0.2
epoch: 0
release: 1
summary: Development documents and examples for sharpshot
url: https://github.com/openutx
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sharpshot-1.0.2-1.src.rpm
location_href: Packages/python-sharpshot-help-1.0.2-1.noarch.rpm
checksum_type: sha256
description:
  ![SharpShot](https://github.com/openutx/sharpshot/blob/main/images/logo100x100.png)

  一个专注于精准测试的工具，旨在提供一套强大而灵活的工具集，帮助开发人员和测试人员进行精细化、全面化的测试。该工具集结合了高效的测试技术和先进的分析功能，使用户能够快速、准确地识别和解决软件系统中的问题。



  分析 java 项目的两次 git 提交差异对项目的影响，精准定位受影响的接口 并生成调用链数据。


  ![效果图](https://github.com/openutx/sharpshot/blob/main/images/img.png)


  1. 通过代码改动定位代码影响，并不断遍历受影响的类和方法直至找到最上层的controller层
  2. 通过javalang语法解析获取每个Java文件的import class extends implements declarators methods 等信息
  3. 通过unidiff 解析git diff信息（diff file, added_line_num, removed_lin_num)
  4. 然后根据文件增删的代码行去判断影响了哪些类和方法，不断遍历受影响的类和方法直至找到最上层的controller层
  5. 分析出两次commit id之间代码改动所带来的影响，输出受影响的接口 并生成调用链路图。


  >要求python >= 3.9

  ```shell
  pip install sharpshot
  ```

  1. 首先获取 gitlab 的 access_token
  >https://git.openutx.com/-/profile/personal_access_tokens
  2. 运行
  ```shell
  sharpshot pr=https://git.openutx.com/utx/utx-im/-/merge_requests/370 username=utxuser access_token=xxxx
  ```
  >pr 为 merge request 的地址，username 为 gitlab 用户名，access_token 为 gitlab 的 access_token


pkgId: d119cffb07c35370d10b7126cfc8200de6171772cf71f8f7c461cc92c5633b6a
name: python-shasta
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: A shell AST library in Python
url: https://github.com/binpash/shasta
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shasta-0.2.1-1.src.rpm
location_href: Packages/python-shasta-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  A python library with shell AST definitions for the [libdash](https://github.com/mgree/libdash) AST. It can be used to develop shell AST analyses and transfomations. All AST nodes support a `pretty()` method that extracts them as a shell script, and the library offers a [json_to_ast](./shasta/json_to_ast.py) module that creates an AST object from a JSON object.

  It was originally part of [PaSh](https://github.com/binpash/pash) but was separated to allow others to build on it.

rpm_license:
  MIT License  Copyright (c) 2023 The PaSh Authors  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: 36476a3bb816a2ff0e632b7e256142c4d5d6f46d0349dcae690a4a1c82710b1e
name: python-shasta-python-help
arch: noarch
version: 0.0.2
epoch: 0
release: 1
summary: Development documents and examples for shasta-python
url: https://krugle.ai/shasta
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shasta-python-0.0.2-1.src.rpm
location_href: Packages/python-shasta-python-help-0.0.2-1.noarch.rpm
checksum_type: sha256
description:
  The Shasta Python library provides the easiest way to integrate Python 3.8+ projects with [Shasta](https://github.com/krugle2/shasta).



  - Install Shasta and init with KrugleAI models



  ```sh
  pip install shasta-python
  ```



  ```python
  from shasta_python import chat
  from shasta_python import ChatResponse

  response: ChatResponse = chat(model='llama3.2', messages=[
    {
      'role': 'user',
      'content': 'Why is the sky blue?',
    },
  ])
  print(response['message']['content'])

  print(response.message.content)
  ```

  See [_types.py](shasta/_types.py) for more information on the response types.



  Response streaming can be enabled by setting `stream=True`.

  ```python
  from shasta_python import chat

  stream = chat(
      model='llama3.2',
      messages=[{'role': 'user', 'content': 'Why is the sky blue?'}],
      stream=True,
  )

  for chunk in stream:
    print(chunk['message']['content'], end='', flush=True)
  ```


  A custom client can be created by instantiating `Client` or `AsyncClient` from `shasta`.

  All extra keyword arguments are passed into the [`httpx.Client`](https://www.python-httpx.org/api/#client).

  ```python
  from shasta_python import Client
  client = Client(
    host='http://localhost:5668',
    headers={'x-some-header': 'some-value'}
  )
  response = client.chat(model='llama3.2', messages=[
    {
      'role': 'user',
      'content': 'Why is the sky blue?',
    },
  ])
  ```



  The `AsyncClient` class is used to make asynchronous requests. It can be configured with the same fields as the `Client` class.

  ```python
  import asyncio
  from shasta_python import AsyncClient

  async def chat():
    message = {'role': 'user', 'content': 'Why is the sky blue?'}
    response = await AsyncClient().chat(model='llama3.2', messages=[message])

  asyncio.run(chat())
  ```

  Setting `stream=True` modifies functions to return a Python asynchronous generator:

  ```python
  import asyncio
  from shasta_python import AsyncClient

  async def chat():
    message = {'role': 'user', 'content': 'Why is the sky blue?'}
    async for part in await AsyncClient().chat(model='llama3.2', messages=[message], stream=True):
      print(part['message']['content'], end='', flush=True)

  asyncio.run(chat())
  ```



  The Shasta Python library's API is designed around the [Shasta REST API](https://github.com/krugle2/shasta/blob/main/docs/api.md)



  ```python
  shasta.chat(model='llama3.2', messages=[{'role': 'user', 'content': 'Why is the sky blue?'}])
  ```



  ```python
  shasta.generate(model='llama3.2', prompt='Why is the sky blue?')
  ```



  ```python
  shasta.list()
  ```



  ```python
  shasta.show('llama3.2')
  ```



  ```python
  modelfile='''
  FROM llama3.2
  SYSTEM You are mario from super mario bros.
  '''

  shasta.create(model='example', modelfile=modelfile)
  ```



  ```python
  shasta.copy('llama3.2', 'user/llama3.2')
  ```



  ```python
  shasta.delete('llama3.2')
  ```



  ```python
  shasta.embed(model='llama3.2', input='The sky is blue because of rayleigh scattering')
  ```



  ```python
  shasta.embed(model='llama3.2', input=['The sky is blue because of rayleigh scattering', 'Grass is green because of chlorophyll'])
  ```



  ```python
  shasta.ps()
  ```




  Errors are raised if requests return an error status or if an error is detected while streaming.

  ```python
  model = 'does-not-yet-exist'

  try:
    shasta.chat(model)
  except shasta.ResponseError as e:
    print('Error:', e.error)
    if e.status_code == 404:
      shasta.pull(model)
  ```


pkgId: edaffad78628e12eb7592e4e1e792005bfed7e39f0a7e63ef6ce861e06d66852
name: python-shekar-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for shekar
url: https://github.com/amirivojdan/shekar
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shekar-0.1.0-1.src.rpm
location_href: Packages/python-shekar-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
    <img src="https://amirivojdan.io/shekar_logo.svg" alt="drawing" width="150"/>
    <h2 align="center" >فارسی شکر است!</h2>
  </p>


pkgId: c5b2b3e7d7c7e6c0e2c4ddc7bf0ba6538c426947ff7c5546276a6058c09b7946
name: python-shell-sage-help
arch: noarch
version: 0.0.5
epoch: 0
release: 1
summary: Development documents and examples for shell-sage
url: https://github.com/AnswerDotAI/shell_sage
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shell-sage-0.0.5-1.src.rpm
location_href: Packages/python-shell-sage-help-0.0.5-1.noarch.rpm
checksum_type: sha256
description:
  <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->



  ShellSage works by understanding your terminal context and leveraging
  powerful language models (Claude or GPT) to provide intelligent
  assistance for:

  - Shell commands and scripting
  - System administration tasks
  - Git operations
  - File management
  - Process handling
  - Real-time problem solving

  What sets ShellSage apart is its ability to: - Read your terminal
  context through tmux integration - Provide responses based on your
  current terminal state - Accept piped input for direct analysis - Target
  specific tmux panes for focused assistance

  Whether you’re a seasoned sysadmin or just getting started with the
  command line, ShellSage acts as your intelligent terminal companion,
  ready to help with both simple commands and complex operations.



  Install ShellSage directly from PyPI using pip:

  ``` sh
  pip install shell_sage
  ```



  1.  **API Key Setup**

      ``` sh
      
      export ANTHROPIC_API_KEY=sk...

      
      export OPENAI_API_KEY=sk...
      ```

  2.  **tmux Configuration**

      We recommend using this optimized tmux configuration for the best
      ShellSage experience. Create or edit your `~/.tmux.conf`:

      ``` sh
      
      set -g mouse on

      
      set -g status-right '#{pane_id} | %H:%M '

      
      set-option -g alternate-screen off

      
      set-window-option -g mode-keys vi

      
      bind-key / copy-mode\; send-key ?
      bind-key -T copy-mode-vi y \
        send-key -X start-of-line\; \
        send-key -X begin-selection\; \
        send-key -X end-of-line\; \
        send-key -X cursor-left\; \
        send-key -X copy-selection-and-cancel\; \
        paste-buffer
      ```

      Reload tmux config:

      ``` sh
      tmux source ~/.tmux.conf
      ```

  This configuration enables mouse support, displays pane IDs (crucial for
  targeting specific panes), maintains terminal content visibility, and
  adds vim-style keybindings for efficient navigation and text selection.





  ShellSage is designed to run within a tmux session. Here are the core
  commands:

  ``` sh

  ssage hi ShellSage


  cat error.log | ssage explain this error


  ssage --pid %3 what's happening in this pane?
  ```

  The `--pid` flag is particularly useful when you want to analyze content
  from a different pane. The pane ID is visible in your tmux status bar
  (configured earlier).



  ShellSage can be customized through its configuration file located at
  `~/.config/shell_sage/shell_sage.conf`. Here’s a complete configuration
  example:

  ``` ini
  [DEFAULT]

  provider = anthropic     # or 'openai'
  model = claude-3-sonnet # or 'gpt-4o-mini' for OpenAI


  history_lines = -1      # -1 for all history


  code_theme = monokai    # syntax highlighting theme
  code_lexer = python     # default code lexer
  ```



  Any configuration option can be overridden via command line arguments:

  ``` sh

  ssage --provider openai --model gpt-4o-mini "explain this error"


  ssage --history-lines 50 "what commands did I just run?"
  ```





  1.  **Contextual Queries**

      - Keep your tmux pane IDs visible in the status bar
      - Use `--pid` when referencing other panes
      - Let ShellSage see your recent command history for better context

  2.  **Piping Best Practices**

      ``` sh
      
      tail -f log.txt | ssage "watch for errors"

      
      git diff | ssage "review these changes"
      ```



  ``` sh

  ssage --help



  ```



  ShellSage is built using [nbdev](https://nbdev.fast.ai/). For detailed
  contribution guidelines, please see our
  [CONTRIBUTING.md](CONTRIBUTING.md) file.

  We welcome contributions of all kinds: - Bug reports - Feature
  requests - Documentation improvements - Code contributions

  Please visit our [GitHub
  repository](https://github.com/AnswerDotAI/shell_sage) to get started.


pkgId: a07d645d8ea817a09b4cbf0869b9c1326c0eec41681440b93fe043c39df4bee3
name: python-shellcheck-makefile
arch: noarch
version: 1.27.3
epoch: 0
release: 1
url: https://pypi.org/project/shellcheck-makefile/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shellcheck-makefile-1.27.3-1.src.rpm
location_href: Packages/python-shellcheck-makefile-1.27.3-1.noarch.rpm
checksum_type: sha256
summary:
  Small utility for applying Shellcheck on Makefiles. Depends only on `shellcheck`, `make` and `python`.

description:
  Small utility for applying Shellcheck on Makefiles. Depends only on `shellcheck`, `make` and `python`.

  ```
  usage: shellcheck_makefile [-h] [-s TARGET] [-l] [--shell SHELL] [-e CODE1,CODE2..] [-P SOURCEPATHS] [-x] [Makefile]

  Makefile shellcheck

  positional arguments:
    Makefile              path to Makefile to check

  options:
    -h, --help            show this help message and exit
    -s TARGET, --skip TARGET
                          make target to skip (arg could be used multiple times)
    -l, --list            list make targets
    --shell SHELL         make shell
    -e CODE1,CODE2.., --exclude CODE1,CODE2..
                          Shellcheck: Exclude types of warnings
    -P SOURCEPATHS, --source-path SOURCEPATHS
                          Shellcheck: Specify path when looking for sourced files ("SCRIPTDIR" for script's dir)
    -x, --external-sources, --external
                          Shellcheck: allow external source-s
  ```


pkgId: ea3d9502843c947bddf0edd7c55e434e509ad8fe6c531631bfb3989a1d7cef48
name: python-shellinspector-help
arch: noarch
version: 0.16.1
epoch: 0
release: 1
summary: Development documents and examples for shellinspector
url: https://pypi.org/project/shellinspector/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shellinspector-0.16.1-1.src.rpm
location_href: Packages/python-shellinspector-help-0.16.1-1.noarch.rpm
checksum_type: sha256
description:
  Open a shell session locally or via SSH, execute commands, and test what comes
  back.

  [![asciicast](https://asciinema.org/a/IfzFtiTPjabw4etcMJmpcuH8f.svg)](https://asciinema.org/a/IfzFtiTPjabw4etcMJmpcuH8f)

  First, prepare a spec file, e.g. `readme.ispec`:

  ```
  [@local]$~ ping -c1 google.com
  1 packets transmitted
  [@local]$ whoami
  shellinspector
  ```

  Then, run it:

  ```
  $ python -m shellinspector readme.ispec
  running readme.console
  PASS [@local]$~ ping -c1 google.com
  FAIL [@local]$ whoami
  expected:
      shellinspector
  actual:
      luto
  ```

  For more details have a look at [`docs/syntax.md`](docs/syntax.md).


pkgId: 8461372b78b577077727975734f691cb3365e2ca6053c5f070dcabe2087140c8
name: python-shhhinterrupt-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for shhhinterrupt
url: https://pypi.org/project/shhhinterrupt/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shhhinterrupt-0.1.0-1.src.rpm
location_href: Packages/python-shhhinterrupt-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  Gracefully and shhh... _(silently)_ handles keyboard interrupts.

  You can either pass a string to print, e.g. `@handle_interrupt("Please come again.")` or you can use the decorator without parentheses to use the default message `@handle_interrupt`.

  Full example:

      from shhhinterrupt import handle_interrupt
      import time

      @handle_interrupt("He walked away.")
      def main():
          print("What's your name?")
          time.sleep(5)
          print("Tony!")

      if __name__ == "main":
          main()


pkgId: cf71602b7978b7f6fac783eca640e0e0955ff226de435b0ba2b3489d1234d9fe
name: python-shibuya-help
arch: noarch
version: 2024.12.15
epoch: 0
release: 1
summary: Development documents and examples for shibuya
url: https://pypi.org/project/shibuya/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shibuya-2024.12.15-1.src.rpm
location_href: Packages/python-shibuya-help-2024.12.15-1.noarch.rpm
checksum_type: sha256
description:
  Shibuya, a beautiful, modern, and responsive theme for Sphinx documentation generator, with great supports for Jupyter extensions.
  ![preview](https://github.com/lepture/shibuya/assets/290496/c754e460-8684-4e61-9ae1-9dc4ed9593d0)

  Install Shibuya theme with `pip`:
  ```
  pip install shibuya
  ```
  Add shibuya theme to your Sphinx `conf.py`:
  ```python
  html_theme = "shibuya"
  ```

  BSD 3-Clause License


pkgId: 4e159e77f0022cd9553ccbb69d929138323b2d819fce0fcc3f94a56dee33272d
name: python-shinel-help
arch: noarch
version: 0.1
epoch: 0
release: 1
summary: Development documents and examples for shinel
url: https://pypi.org/project/shinel/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shinel-0.1-1.src.rpm
location_href: Packages/python-shinel-help-0.1-1.noarch.rpm
checksum_type: sha256
description:
  ![Image](https://github.com/blueraymusic/Cmd-bot/assets/83096078/cfc199a3-bf06-4b67-a59c-2022d2a19368)

  Update computer v0.2 - Support for GPT-4 API

  This update introduces the computer.yaml configuration file. In this file, you can specify which OpenAI model you want to query and other settings. The safety switch also moved into this configuration file.

  For now, the default model is still gpt-3.5-turbo, but you can update to gpt-4 if you have gotten access already!

  computer v0.2 - by @blueraymusic

  ```
  Usage:
  - computer [-a] list the current directory information
  Argument: -a: Prompt the user before running the command (only useful when safety is off)

  - computer [-c] generate pre-trained tranformers output
  Argument: -c: Prompt the user before running the command (useful when safety is off)
  //Important: this argument also takes nlp prompt (.e.g what is a rainbow?)

  - computer [-i] list the information
  Argument: -i: this argument does not need prompt (.e.g computer -i)


  Current configuration per computer.yaml:
  * Model        : gpt-3.5-turbo
  * Temperature  : 0
  * Max. Tokens  : 500
  * Safety       : on
  ```
  Happy Hacking!


      - macOS
          - Optional faster way -> You can download the install.sh, then run (in terminal) : bash install.sh
      - Or
        - git clone https://github.com/blueraymusic/Combot
        - cd Cmd-bot
        - pip3 install -r requirements.txt
        - chmod +x computer.py

        - Then create alias for computer in the following files:
          - ~/.bashr & ~/.bash_profile & ~/.zshrc
          - alias computer=$(pwd)/computer.py




  try: computer show me some funny unicode characters
  OpenAI API Key configuration

  There are three ways to configure the key on Linux and macOS:

  a) You can either export `OPENAI_API_KEY=<yourkey>` or have a .env file in the same directory as computer.py with OPENAI_API_KEY="<yourkey>" as a line
  b) Create a file at `~/.openai.apikey` with the key in it
  c) Add the key to the `computer.yaml` configuration file



  To set the alias, like computer on each login, add them to .bash_aliases (or .zshrc on macOS) file. Make sure the path is the one you want to use.
  ```
  echo "alias computer=$(pwd)/computer.py"     >> ~/.bash_aliases
  Installation script
  ```
  Another option is to run `source install.sh` after cloning the repo. That does the following:

  Copies the necessary files to `~/combot/`
  Creates alias computer pointing to `~/combot/computer.py`
  Adds the aliases to the `~/.bash_aliases or ~/.zshrc` file
  That's it for Linux and macOS. Now make sure you have an OpenAI API key set.





  On Windows, you can run .\install.bat (or double-click) after cloning the repo. By default, it does the following:

  Copies the necessary files to ` ~\combot\ `
  Creates a computer.bat file in ~ that lets you run equivalent to `python.exe ~\combot\computer.py`

  - You also have the option to:

  Change the location where combot\ and computer.bat will be created
  Skip creating combot\ and use the folder of the cloned repository instead.
  Create a `.openai.apikey` file in your ~ directory
  That's it basically.

  OpenAI API Key Configuration on Windows

  On Windows, export `OPENAI_API_KEY=<yourkey>` will not work instead:

  Run `$env:OPENAI_API_KEY="<yourkey>"` to set the key for that terminal
  Or, Run PowerShell as an administrator and run `setx OPENAI_API_KEY "<yourkey>"`
  Or, Go to Start and search edit environment variables for your account and manually create the variable with the name `OPENAI_API_KEY` and value <yourkey>
  Optionally (since v.0.2), the key can also be stored in computer.yaml.

  Running computer on Windows

  Windows is less tested; it does work though and will use PowerShell.
  ```
  python.exe computer.py what is my username
  ```
  That's it.

  ```
  computer.bat
  ```


  If you use install.bat, you should have a computer.bat file in your ~ directory that lets you run the command like so:
  ```
  .\computer.bat what is my username
  ```
  You can put the computer.bat file into a $PATH directory (like C:\Windows\System32) to use in any directory like so:
  ```
  computer what is my username
  ```

  Have fun.

  Disabling the safety switch! Caution!

  By default, computer will prompt the user before executing commands.

  Since v.0.2, the safety switch setting moved to computer.yaml; the old ~/.computer-safety-off is not used anymore.

  To have computer run commands right away when they come:

  Examples:


  Here are a couple of examples of how this utility can be used.
  ```
  - computer what's the time?
  - computer search up a "banana" on google/youtube
  - computer what's the time in UTC?
  - computer what's the date and time in Vienna, Austria?
  - computer show me some unicode characters
  - computer what is my username and what's my machine name?
  - computer is there a nano process running
  - computer download the homepage of ycombinator.com and store it in index.html
  - computer find all unique URLs in index.html
  - computer create a file named test.txt and write my username into it
  - computer print the contents of the test.txt file
  - computer -a delete the test.txt file
  - computer what's the current price of Bitcoin in USD
  - computer what's the current price of Bitcoin in USD. Extract the price only
  - computer look at the SSH logs to see if any suspicious logons occurred
  - computer look at the SSH logs and show me all recent logins
  - computer is the user hacker logged on right now?
  - computer do I have a firewall running?
  - computer create a hostnames.txt file and add 10 typical hostnames based on planet names to it, line by line; then show me the contents
  - computer find any file with the name computer.py. Do not show permission denied errors
  - computer write a new bash script file called scan.sh, with the contents to iterate over hostnames.txt and invoke a default nmap scan on each host; then show me the file.
  - computer write a new bash script file called scan.sh, with the contents to iterate over hostnames.txt and invoke a default nmap scan on each host; then show me the file. Make it over multiple lines with comments and annotations.
  ```
  - # Generative Pretrained Tranformers
      - computer -c what is a rainbow?
      - computer -c what is the second law of newton?


  Type in:
  ```
  computer -i
  ```

  Additional:
  To enable total and complete access for optimal use, you can put your root password in the root.yaml thus giving it root access:
  ```
  .\root.yaml
  ```
  change pass by the root password, as follows:
  ```
  pass: nopass
  ```


  To get more information regarding the bot

  Thanks!


pkgId: 26f3e551bcf6e13f93c50ea5a489e2ac731fdb5f7907d03cc26600770d97029a
name: python-shiny-calendar-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for shiny-calendar
url: https://pypi.org/project/shiny-calendar/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shiny-calendar-0.1.0-1.src.rpm
location_href: Packages/python-shiny-calendar-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/shiny-calendar.svg)](https://pypi.org/project/shiny-calendar/)

  Calendar component for Python Shiny using [FullCalendar](https://fullcalendar.io/).

  It presently supports:

  - all configuration options and frontend interactions from FullCalendar
  - server-side setup up of config, events and resources at init
  - server-side reactivy for different interactions
  - calling custom js functions from the server

  TODO:

  - allow css customizations
  - eventually add methods to manipulate events from the server after init (instead of using custom js calls)



  You can install `shiny-calendar` using pip:

  ```python
  pip install shiny-calendar
  ```





  As for any Shiny component, there is a UI function (`shiny_calendar`) to declare the component in the UI, and a decorator (`@render_shiny_calendar`) to setup the component on the server side.

  To configure the calendar, return a dictionnary from the decorated function with key/value pairs holding the configuration.

  See [FullCalendar](https://fullcalendar.io/) documentation to set up configuration options, events and resources during calendar initialization.

  The file `example_app.py` shows a simple example that sets up the calendar and an output text field that shows the data sent back from the frontend when interacting with the calendar.

  Here is a snippet to give an idea:

  ```python
  from shiny_calendar import shiny_calendar, render_shiny_calendar


  app_ui = ui.page_fluid(
      shiny_calendar("my_calendar")
  )


  def server(input, output, session):
      @render_shiny_calendar
      def my_calendar():
          return [
              {
                  
                  "eventClick": "",
                  "initialDate": "2023-07-01",
                  "allDaySlot": True,
                  "editable": True,
                  "selectable": True,
                  "initialView": "timeGridWeek",
                  "events": [
                      {
                          "id": "id1_allday",
                          "title": "Event 1",
                          "start": "2023-07-03",
                          "end": "2023-07-05",
                      },
                      {
                          "id": "id7",
                          "title": "Event 7",
                          "start": "2023-07-01T08:30:00",
                          "end": "2023-07-01T10:30:00",
                      }
                  ]
              }
          ]

  ```



  FullCalendar triggers [handlers](https://fullcalendar.io/docs/handlers) when interacting with the calendar.

  `shiny-calendar` can react to those triggers like any other Shiny reactive component, i.e. by reading the reactive value on the server side:

  ```python
  @render.text
  def valueOut():
      return f"{input.my_calendar()}"

  ```

  The reactive value (`input.my_calendar()` in the example above) holds the information returned by FullCalendar, which varies depending on the type of interaction (see the [handlers](https://fullcalendar.io/docs/handlers) documentation).

  All FullCalendar interactions are available:

  - [eventClick](https://fullcalendar.io/docs/eventClick)
  - [dateClick](https://fullcalendar.io/docs/dateClick)
  - [select](https://fullcalendar.io/docs/select)
  - [unselect](https://fullcalendar.io/docs/unselect)
  - [eventAdd](https://fullcalendar.io/docs/eventAdd)
  - [eventChange](https://fullcalendar.io/docs/eventChange)
  - [eventRemove](https://fullcalendar.io/docs/eventRemove)
  - [eventsSet](https://fullcalendar.io/docs/eventsSet)


  To let `shiny-calendar` know which ones to listen to, simply add the corresponding key to the configration (no matter the value).

  For example, to activate `eventClick` and `select` interactions:

  ```python
  "eventClick": "",
  "select": "",
  ```

  When an interaction triggers a server-side reaction, the reactive value holds the following data:

  - `"type"`: the interaction type (`"eventClick"`, `"dateClick"`, etc)
  - `"data"`: the data from FullCalendar for the particular event that triggered

  See the `example_app.py` for more details.



  You can call custom javascript functions by using the `shiny_calendar_call_js_func` method from the server side.

  This is allows to control control the calendar from the server side (through reactive effects, for example).
  Use the `calendar` variable to access the correspodning FullCalendar javascript instance.

  The following snippet adds an event when clicking on the `button_add_event` button:

  ```python
  from shiny_calendar import shiny_calendar_call_js_func

  @reactive.effect
  @reactive.event(input.button_add_event)
  async def _():
      js_func = (
          "calendar.addEvent({id: 'someId', title: 'some event title', start: '%s', end: '%s'});"
          % (date_start, date_end)
      )
      await shiny_calendar_call_js_func(session, "my_calendar", js_func)
  ```

  And this snippet chanes the color of an event to red when the event is selected:

  ```python
  from shiny_calendar import shiny_calendar_call_js_func

  @reactive.effect
  async def _():
      msg = input.my_calendar()
      if msg["type"] == "eventClick":
          
          
          event_id = msg["data"]["event"]["id"]
          js_func = f"""
              const calEvent = calendar.getEventById("{event_id}");
              calEvent.setProp("backgroundColor", "red");
              calEvent.setProp("borderColor", "red");
              """
          await shiny_calendar_call_js_func(session, "my_calendar", js_func)
  ```



  This project uses [uv](https://github.com/astral-sh/uv) for dependency, package and project management, and
  [ruff](https://github.com/astral-sh/ruff) for code formatting.



  Go to the javascript folder:

  ```sh
  cd js
  ```

  Install the dependencies for javascript:

  ```sh
  npm install
  ```

  Build assets into the `src/shiny_calendar/distjs` folder:

  ```sh
  npm run build
  ```

  Or if you want to watch the files for changes and rebuild on the fly you can run:

  ```sh
  npm run watch
  ```



  ```sh
  uv run shiny run example-app/app.py
  ```



  ```sh
  uv build
  ```



  For code formatting run the pre-commit checks:

  ```sh
  pre-commit run --all-files
  ```

  or install the pre-commit check as a pre-commit hook

  ```sh
  pre-commit install
  ```


pkgId: 9a5dfa2a831e5df5f8050deb7c03d19c5f5971bccb76183999779ecde6cb0b83
name: python-shinylive-help
arch: noarch
version: 0.7.2
epoch: 0
release: 1
summary: Development documents and examples for shinylive
url: https://github.com/posit-dev/py-shinylive
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shinylive-0.7.2-1.src.rpm
location_href: Packages/python-shinylive-help-0.7.2-1.noarch.rpm
checksum_type: sha256
description:
  [![Build and test](https://github.com/posit-dev/py-shinylive/actions/workflows/build.yml/badge.svg)](https://github.com/posit-dev/py-shinylive/actions/)
  [![PyPI Latest Release](https://img.shields.io/pypi/v/shinylive.svg)](https://pypi.org/project/shinylive/)
  [Documentation site](https://github.com/posit-dev/py-shinylive)
  The goal of the shinylive Python package is to help you create Shinylive applications from your [Shiny for Python](https://shiny.posit.co/py) applications.
  Shinylive runs Shiny entirely in the browser, without any need for a hosted server, using WebAssembly via [pyodide](https://pyodide.org/en/stable/).

  The Shinylive project consists of four interdependent components that work together in several different contexts.
  1. Shinylive ([posit-dev/shinylive](https://github.com/posit-dev/shinylive)) is a web assets library that runs Shiny applications in the browser. You can try it out online at [shinylive.io/r](https://shinylive.io/r) or [shinylive.io/py](https://shinylive.io/py).
  2. The [shinylive Python package](https://shiny.posit.co/py/docs/shinylive.html) ([posit-dev/py-shinylive](https://github.com/posit-dev/py-shinylive)) helps you export your Shiny applications from local files to a directory that can be hosted on a static web server.
     The Python package also downloads the Shinylive web assets mentioned above and manages them in a local cache. These assets are included in the exported Shinylive applications and are used to run your Shiny app in the browser.
  3. The shinylive R package ([posit-dev/r-shinylive](https://github.com/posit-dev/r-shinylive)) serves the same role as the shinylive Python package but for Shiny for R apps.
  4. The [shinylive Quarto extension](https://quarto-ext.github.io/shinylive/) ([quarto-ext/shinylive](https://github.com/quarto-ext/shinylive)) lets you write Shiny applications in [Quarto web documents and slides](https://quarto.org) and uses the Python or R package (or both) to translate `shinylive-py` or `shinylive-r` code blocks into Shinylive applications.

  ```
  pip install shinylive
  ```

  (Optional) Create a basic shiny application in a new directory `myapp/`:
  ```
  shiny create myapp
  ```
  Once you have a Shiny application in `myapp/` and would like turn it into a Shinylive app in `site/`:
  ```
  shinylive export myapp site
  ```
  Then you can preview the application by running a web server and visiting it in a browser:
  ```
  python3 -m http.server --directory site --bind localhost 8008
  ```
  At this point, you can deploy the `site/` directory to any static web hosting service.

  If you have multiple applications that you want to put on the same site, you can export them to subdirectories of the site, so that they can all share the same Shinylive assets. You can do this with the `--subdir` option:
  ```bash
  shinylive export myapp1 site --subdir app1
  shinylive export myapp2 site --subdir app2
  ```

  Each version of the Shinylive Python package is associated with a particular version of the Shinylive web assets. ([See the releases here](https://github.com/posit-dev/shinylive/releases).)
  To see which version of this Python package you have, and which version of the web assets it is associated with, simply run `shinylive` at the command prompt:
  ```
  $ shinylive
  Usage: shinylive [OPTIONS] COMMAND [ARGS]...
    shinylive Python package version: 0.1.0
    shinylive web assets version:     0.2.1
  ```
  The web assets will be downloaded and cached the first time you run `shinylive export`. Or, you can run `shinylive assets download` to fetch them.
  ```
  $ shinylive assets download
  Downloading https://github.com/posit-dev/shinylive/releases/download/v0.2.1/shinylive-0.2.1.tar.gz...
  Unzipping to /Users/username/Library/Caches/shinylive/
  ```
  To see what versions you have installed, run `shinylive assets info`:
  ```
  $ shinylive assets info
      Local cached shinylive asset dir:
      /Users/username/Library/Caches/shinylive
      Installed versions:
      /Users/username/Library/Caches/shinylive/shinylive-0.2.1
      /Users/username/Library/Caches/shinylive/shinylive-0.0.6
  ```
  You can remove old versions with `shinylive assets cleanup`. This will remove all versions except the one that the Python package wants to use:
  ```
  $ shinylive assets cleanup
  Keeping version 0.2.1
  Removing /Users/username/Library/Caches/shinylive/shinylive-0.0.6
  ```
  If you want to force it to remove a specific version, use the `shinylive assets remove xxx`:
  ```
  $ shinylive assets remove 0.2.1
  Removing /Users/username/Library/Caches/shinylive/shinylive-0.2.1
  ```


pkgId: 549fe175d81a654a5e293cce8dfcd807c23618008041f2d25fce688cafcfdd63
name: python-shinywidgets-help
arch: noarch
version: 0.4.0
epoch: 0
release: 1
summary: Development documents and examples for shinywidgets
url: https://github.com/rstudio/py-shinywidgets
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shinywidgets-0.4.0-1.src.rpm
location_href: Packages/python-shinywidgets-help-0.4.0-1.noarch.rpm
checksum_type: sha256
description:
  Render [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/) inside a
  [Shiny](https://shiny.rstudio.com/py) (for Python) app.
  See the [Jupyter Widgets](https://shiny.rstudio.com/py/docs/ipywidgets.html) article on the Shiny for Python website for more details.

  ```sh
  pip install shinywidgets
  ```

  If you want to do development on `{shinywidgets}`, run:
  ```sh
  pip install -e ".[dev,test]"
  cd js && yarn watch
  ```


pkgId: b70d69f25a789a4aec3b6e5f06c590d09ac1fc58b88bd0a3244fbb7d5d84e0ce
name: python-shmistogram-help
arch: noarch
version: 0.3.1
epoch: 0
release: 1
summary: Development documents and examples for shmistogram
url: https://pypi.org/project/shmistogram/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shmistogram-0.3.1-1.src.rpm
location_href: Packages/python-shmistogram-help-0.3.1-1.noarch.rpm
checksum_type: sha256
description:
  The shmistogram is a better histogram. Key differences include

  - emphasizing singular modalities (i.e. point masses) with a separate multinomial distribution
  - estimating density with better accuracy and fewer bins than a histogram
  by hierarchically grouping points into variable-width bins

  Suppose we simulate draws from a triangular distribution (the 'crowd'),
  supplemented with a couple of mode points ('loners'), and some null values:

  ```python
  from matplotlib import pyplot as plt
  import numpy as np
  import shmistogram as sh


  np.random.seed(0)
  crowd = np.random.triangular(-10, -10, 70, size=500)
  loners = np.array([0]*40 + [42]*20)
  null = np.array([np.nan]*100)
  data = np.concatenate((crowd, loners, null))

  fig, axes = plt.subplots(1, 2)


  sh.plot.standard_histogram(data[~np.isnan(data)], ax=axes[0], name='mixed data')


  shm = sh.Shmistogram(data)
  shm.plot(ax=axes[1], name='mixed data')

  fig.tight_layout()
  ```

  ![](doc/comparison.png?raw=true "title")

  The histogram obscures the point masses somewhat and says nothing about missing values.
  By contrast, the shmistogram uses red line segments to emphasize the point masses, and
  the legend bar highlights the relative portions of the data in the crowd versus
  the point masses versus the null values.



  `pip install shmistogram`

  Test your installation by running [demo.py](demo/demo.py)

  For the development version, `pip install git+https://github.com/zkurtz/shmistogram.git#egg=shmistogram`






  Given a 1-D array of numeric (or `np.nan`) values `data`, the shmistogram
  `shmistogram.Shmistogram(data)`
  - counts every unique value
  - splits the data into as many as 3 subsets:
      - `np.nan`
      - "Loners" are points with a count above the threshold set by the
      argument `loner_min_count`. Shmistogram sets this dynamically by default
      as a somewhat log-linear function of `len(data)`. With 100 points,
      the threshold is 8; with 100,000 it is 18.
      - The "crowd" is all remaining points.
  - bins the "crowd" using a density estimation tree.

  Calling the plot method on the resulting object displays all components
  of the distribution on a single figure.





  A shmistogram can be more informative than a histogram by separating
  continous and discrete variation:
  - inconsistent rounding any continuous variable can induce a mixture of point masses and relatively continuous observations
  - "age of earning first driver's license" plausibly has structural modes at the
  legal minimum (which may vary by state) and otherwise vary continuously



  The shmistogram scales approximately as O(n log(n)) with default settings
  (see [speed_testing.ipynb](demo/speed_testing.ipynb)).
  The resulting density model is easy to sample from, as a mixture of
  a piecewise uniform
  distribution and a multinomial distribution. Such a simple
  estimator works well as one of the required inputs of the CADE density
  estimation algorithm for high dimensional
  and mixed continuous/categorical data (see [pydens](https://github.com/zkurtz/pydens)).

  The shmistogram's adaptive bin width leads to a higher-fidelity representation of
  complicated distributions without substantially increasing the number of bins.
  This is not a new idea, and shmistogram wraps multiple binning
  methods that the user can choose from. See
  [binning_methods.ipynb](demo/binning_methods.ipynb) for details.



  The default binning algorithm uses a [binary density estimation tree](shmistogram/det/__init__.py)
  to iteratively split the data into smaller bins. The split location (within a bin/leaf)
  maximizes a penalized improvement in the deviance (i.e. in-sample negative log likelihood).
  The penalty reflects
  - a hard `min_data_in_leaf` constraint. This minimum currently defaults to 3
  - a soft penalty on bins with few observations

  We choose the bin to split on as the bin for which splitting produces the greatest
  penalized improvement. Splits proceed as long as the deviance improvement exceeds
  the number of leaves. This approach is inspired by the Akaike information criterion
  (AIC), although this may be an abuse of the criterion in the sense that we're using
  it as part of a greedy iterative procedure instead of using it to compare fully-formed models.

  The variable-width binning algorithms of
  [bayesian block representations](https://arxiv.org/pdf/1207.5578.pdf)
  provide an alternative to our default binning algorithm. See [demo](demo/bayesian_blocks.ipynb) for
  an example. See also
  [Python Perambulations](https://jakevdp.github.io/blog/2012/09/12/dynamic-programming-in-python/)
  for a light conceptual introduction to Bayesian blocks.



  **Clarify the objective:** There is a tension between optimizing a binner for
  (a) visualization purposes, such as avoiding tall narrow bins to minimize
  white space, or adjusting the average bin width to tell a particular story
  and (b) minimizing a formal measure of estimation accuracy such as the
  expectation of deviance
  (taken over future observations from the true distribution). We should
  offer guidance on which binning method tends to be most effective
  for each of these goals.

  **Optimize speed** for the default method. Scalability is a big part of the
  motivation for such a simple model, but the current implementation is
  far from optimal.

  **Compare/contrast/harmonize** our binning methods with the literature:
  - [density estimation trees](https://mlpack.org/papers/det.pdf)
  such as [this](https://gitlab.cern.ch/landerli/density-estimation-trees)
  - [distribution element trees](https://arxiv.org/pdf/1610.00345.pdf) such as
  [detpack](https://github.com/cran/detpack/blob/master/R/det1.R). See
  [detpack_example.R](demo/detpack_example.R) for a simple variable-width binner.
  - [Efficient Density Estimation via Piecewise Polynomial
  Approximation](https://arxiv.org/pdf/1305.3207.pdf).




  This repo is young, has practically no unit tests, and should be expected to change substantially. Use with caution.



  This project is licensed under the terms of the MIT license. See LICENSE for additional details.


pkgId: 2809ca12b9900a323523bd65d972cf296cc689bc71c55f1a9adedef17b038f05
name: python-shoobx.junitxml-help
arch: noarch
version: 0.3.0
epoch: 0
release: 1
summary: Development documents and examples for shoobx.junitxml
url: https://github.com/shoobx/shoobx.junitxml
rpm_license: ZPL 2.1
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shoobx.junitxml-0.3.0-1.src.rpm
location_href: Packages/python-shoobx.junitxml-help-0.3.0-1.noarch.rpm
checksum_type: sha256
description:
  This package provides a `zope.testrunner` feature that stores the test
  results in a JUnit-compatible XML file. This file can be consumed by
  Jenkins and other tools to generate test reports.
  This is achieved by implementing a custom output formatter that
  collects and then writes out the XML file. The formatter then
  delegates further test result tracking to the oriignal output formatter.
  The core code of this package is based on the excellent work by Martin
  Aspelli and the Plone Foundation. Thus the code is released under ZPL
  2.1, the original license of `collective.xmltestreport`.


pkgId: 7198aaa764cd9acc257185ef5d0dfe17ae0ed1ca05b44eccffee1d768ddbf4d1
name: python-shorttext-help
arch: noarch
version: 2.1.0
epoch: 0
release: 1
summary: Development documents and examples for shorttext
url: https://pypi.org/project/shorttext/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shorttext-2.1.0-1.src.rpm
location_href: Packages/python-shorttext-help-2.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![CircleCI](https://circleci.com/gh/stephenhky/PyShortTextCategorization.svg?style=svg)](https://circleci.com/gh/stephenhky/PyShortTextCategorization.svg)
  [![GitHub release](https://img.shields.io/github/release/stephenhky/PyShortTextCategorization.svg?maxAge=3600)](https://github.com/stephenhky/PyShortTextCategorization/releases)
  [![Documentation Status](https://readthedocs.org/projects/pyqentangle/badge/?version=latest)](https://pyqentangle.readthedocs.io/en/latest/?badge=latest)
  [![Updates](https://pyup.io/repos/github/stephenhky/PyShortTextCategorization/shield.svg)](https://pyup.io/repos/github/stephenhky/PyShortTextCategorization/)
  [![Python 3](https://pyup.io/repos/github/stephenhky/PyShortTextCategorization/python-3-shield.svg)](https://pyup.io/repos/github/stephenhky/PyShortTextCategorization/)
  [![pypi](https://img.shields.io/pypi/v/shorttext.svg?maxAge=3600)](https://pypi.org/project/shorttext/)
  [![download](https://img.shields.io/pypi/dm/shorttext.svg?maxAge=2592000&label=installs&color=%2327B1FF)](https://pypi.org/project/shorttext/)
  [![stars](https://img.shields.io/github/stars/stephenhky/PyShortTextCategorization.svg?style=social&label=Star&maxAge=60)](https://github.com/stephenhky/PyShortTextCategorization)



  This package `shorttext` is a Python package that facilitates supervised and unsupervised
  learning for short text categorization. Due to the sparseness of words and
  the lack of information carried in the short texts themselves, an intermediate
  representation of the texts and documents are needed before they are put into
  any classification algorithm. In this package, it facilitates various types
  of these representations, including topic modeling and word-embedding algorithms.

  The package `shorttext` runs on Python 3.9, 3.10, 3.11, and 3.12.
  Characteristics:

  - example data provided (including subject keywords and NIH RePORT);
  - text preprocessing;
  - pre-trained word-embedding support;
  - `gensim` topic models (LDA, LSI, Random Projections) and autoencoder;
  - topic model representation supported for supervised learning using `scikit-learn`;
  - cosine distance classification;
  - neural network classification (including ConvNet, and C-LSTM);
  - maximum entropy classification;
  - metrics of phrases differences, including soft Jaccard score (using Damerau-Levenshtein distance), and Word Mover's distance (WMD);
  - character-level sequence-to-sequence (seq2seq) learning;
  - spell correction; and
  - Sentence encodings and similarities based on BERT.



  Documentation and tutorials for `shorttext` can be found here: [http://shorttext.rtfd.io/](http://shorttext.rtfd.io/).

  See [tutorial](http://shorttext.readthedocs.io/en/latest/tutorial.html) for how to use the package, and [FAQ](https://shorttext.readthedocs.io/en/latest/faq.html).



  To install it, in a console, use `pip`.

  ```
  >>> pip install shorttext
  ```

  or, if you want the most recent development version on Github, type

  ```
  >>> pip install git+https://github.com/stephenhky/PyShortTextCategorization@master
  ```

  Developers are advised to make sure `Keras` >=2 be installed. Users are advised to install the backend `Tensorflow` (preferred) or `Theano` in advance. It is desirable if `Cython` has been previously installed too.

  See [installation guide](https://shorttext.readthedocs.io/en/latest/install.html) for more details.




  To report any issues, go to the [Issues](https://github.com/stephenhky/PyShortTextCategorization/issues) tab of the Github page and start a thread.
  It is welcome for developers to submit pull requests on their own
  to fix any errors.



  If you would like to contribute, feel free to submit the pull requests. You can talk to me in advance through e-mails or the
  [Issues](https://github.com/stephenhky/PyShortTextCategorization/issues) page.



  * Documentation: [http://shorttext.readthedocs.io](http://shorttext.readthedocs.io/)
  * Github: [https://github.com/stephenhky/PyShortTextCategorization](https://github.com/stephenhky/PyShortTextCategorization)
  * PyPI: [https://pypi.org/project/shorttext/](https://pypi.org/project/shorttext/)
  * "Package shorttext 1.0.0 released," [Medium](https://medium.com/@stephenhky/package-shorttext-1-0-0-released-ca3cb24d0ff3)
  * "Python Package for Short Text Mining", [WordPress](https://datawarrior.wordpress.com/2016/12/22/python-package-for-short-text-mining/)
  * "Document-Term Matrix: Text Mining in R and Python," [WordPress](https://datawarrior.wordpress.com/2018/01/22/document-term-matrix-text-mining-in-r-and-python/)
  * An [earlier version](https://github.com/stephenhky/PyShortTextCategorization/tree/b298d3ce7d06a9b4e0f7d32f27bab66064ba7afa) of this repository is a demonstration of the following blog post: [Short Text Categorization using Deep Neural Networks and Word-Embedding Models](https://datawarrior.wordpress.com/2016/10/12/short-text-categorization-using-deep-neural-networks-and-word-embedding-models/)




  * 12/14/2024: `shorttext` 2.1.0 released.
  * 07/12/2024: `shorttext` 2.0.0 released.
  * 12/21/2023: `shorttext` 1.6.1 released.
  * 08/26/2023: `shorttext` 1.6.0 released.
  * 06/19/2023: `shorttext` 1.5.9 released.
  * 09/23/2022: `shorttext` 1.5.8 released.
  * 09/22/2022: `shorttext` 1.5.7 released.
  * 08/29/2022: `shorttext` 1.5.6 released.
  * 05/28/2022: `shorttext` 1.5.5 released.
  * 12/15/2021: `shorttext` 1.5.4 released.
  * 07/11/2021: `shorttext` 1.5.3 released.
  * 07/06/2021: `shorttext` 1.5.2 released.
  * 04/10/2021: `shorttext` 1.5.1 released.
  * 04/09/2021: `shorttext` 1.5.0 released.
  * 02/11/2021: `shorttext` 1.4.8 released.
  * 01/11/2021: `shorttext` 1.4.7 released.
  * 01/03/2021: `shorttext` 1.4.6 released.
  * 12/28/2020: `shorttext` 1.4.5 released.
  * 12/24/2020: `shorttext` 1.4.4 released.
  * 11/10/2020: `shorttext` 1.4.3 released.
  * 10/18/2020: `shorttext` 1.4.2 released.
  * 09/23/2020: `shorttext` 1.4.1 released.
  * 09/02/2020: `shorttext` 1.4.0 released.
  * 07/23/2020: `shorttext` 1.3.0 released.
  * 06/05/2020: `shorttext` 1.2.6 released.
  * 05/20/2020: `shorttext` 1.2.5 released.
  * 05/13/2020: `shorttext` 1.2.4 released.
  * 04/28/2020: `shorttext` 1.2.3 released.
  * 04/07/2020: `shorttext` 1.2.2 released.
  * 03/23/2020: `shorttext` 1.2.1 released.
  * 03/21/2020: `shorttext` 1.2.0 released.
  * 12/01/2019: `shorttext` 1.1.6 released.
  * 09/24/2019: `shorttext` 1.1.5 released.
  * 07/20/2019: `shorttext` 1.1.4 released.
  * 07/07/2019: `shorttext` 1.1.3 released.
  * 06/05/2019: `shorttext` 1.1.2 released.
  * 04/23/2019: `shorttext` 1.1.1 released.
  * 03/03/2019: `shorttext` 1.1.0 released.
  * 02/14/2019: `shorttext` 1.0.8 released.
  * 01/30/2019: `shorttext` 1.0.7 released.
  * 01/29/2019: `shorttext` 1.0.6 released.
  * 01/13/2019: `shorttext` 1.0.5 released.
  * 10/03/2018: `shorttext` 1.0.4 released.
  * 08/06/2018: `shorttext` 1.0.3 released.
  * 07/24/2018: `shorttext` 1.0.2 released.
  * 07/17/2018: `shorttext` 1.0.1 released.
  * 07/14/2018: `shorttext` 1.0.0 released.
  * 06/18/2018: `shorttext` 0.7.2 released.
  * 05/30/2018: `shorttext` 0.7.1 released.
  * 05/17/2018: `shorttext` 0.7.0 released.
  * 02/27/2018: `shorttext` 0.6.0 released.
  * 01/19/2018: `shorttext` 0.5.11 released.
  * 01/15/2018: `shorttext` 0.5.10 released.
  * 12/14/2017: `shorttext` 0.5.9 released.
  * 11/08/2017: `shorttext` 0.5.8 released.
  * 10/27/2017: `shorttext` 0.5.7 released.
  * 10/17/2017: `shorttext` 0.5.6 released.
  * 09/28/2017: `shorttext` 0.5.5 released.
  * 09/08/2017: `shorttext` 0.5.4 released.
  * 09/02/2017: end of GSoC project. ([Report](https://rare-technologies.com/chinmayas-gsoc-2017-summary-integration-with-sklearn-keras-and-implementing-fasttext/))
  * 08/22/2017: `shorttext` 0.5.1 released.
  * 07/28/2017: `shorttext` 0.4.1 released.
  * 07/26/2017: `shorttext` 0.4.0 released.
  * 06/16/2017: `shorttext` 0.3.8 released.
  * 06/12/2017: `shorttext` 0.3.7 released.
  * 06/02/2017: `shorttext` 0.3.6 released.
  * 05/30/2017: GSoC project ([Chinmaya Pancholi](https://rare-technologies.com/google-summer-of-code-2017-week-1-on-integrating-gensim-with-scikit-learn-and-keras/), with [gensim](https://radimrehurek.com/gensim/))
  * 05/16/2017: `shorttext` 0.3.5 released.
  * 04/27/2017: `shorttext` 0.3.4 released.
  * 04/19/2017: `shorttext` 0.3.3 released.
  * 03/28/2017: `shorttext` 0.3.2 released.
  * 03/14/2017: `shorttext` 0.3.1 released.
  * 02/23/2017: `shorttext` 0.2.1 released.
  * 12/21/2016: `shorttext` 0.2.0 released.
  * 11/25/2016: `shorttext` 0.1.2 released.
  * 11/21/2016: `shorttext` 0.1.1 released.


pkgId: 83eab619c2a2ac2793392fbce6b8de83f37418218073a549b9500d2ce39c8af7
name: python-shotgrid-help
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: Development documents and examples for shotgrid
url: http://github.com/rsgalloway/shotgrid
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shotgrid-0.2.1-1.src.rpm
location_href: Packages/python-shotgrid-help-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  This is an object-oriented wrapper around the shotun api3 Python API, that
  includes classes for each shotgrid entity type with convenience methods.

  The easiest way to install:
  ```bash
  $ pip install -U shotgrid
  ```
  Alternatively, use [distman](https://github.com/rsgalloway/distman) to dist to a
  deployment area using options defined in the `dist.json` file:
  ```bash
  $ distman [-d]
  ```

  Default settings are stored in an [envstack](https://github.com/rsgalloway/envstack)
  environment stack file. They can be stored in the default stack, or in a
  namespaced `shotgrid.env` stack file to keep settings separate.
  Start by renaming or copying the `example_shotgrid.env` file:
  ```bash
  $ cp example_shotgrid.env shotgrid.env
  ```
  Then edit it's contents with the appropriate values:
  ```yaml
  LOG_LEVEL: INFO
  SG_SCRIPT_URL: https://example.shotgunstudio.com
  SG_SCRIPT_NAME: script_name
  SG_SCRIPT_KEY: XXXXXX
  ```

  Basic usage:
  ```python
  >>> from shotgrid import Shotgrid
  >>> sg = Shotgrid()
  >>> show = sg.get_projects("Demo: Animation")[0]
  >>> shot = show.get_shots("bunny_080_0200")[0]
  >>> tasks = shot.get_tasks()
  ```
  Requests can be strung together:
  ```python
  >>> sg.get_projects("Demo: Animation")[0].get_sequences("080")[0].get_shots()
  [<Shot "bunny_080_0100">, <Shot "bunny_080_0200">, <Shot "bunny_080_0300">]
  ```

  The Shotgrid class is a subclass of shotgrid_api3.Shotgrid, so you can drop down
  to the core API at any time or from any object:
  ```python
  >>> sg.find(filters, fields)
  >>> shot.api().find("Task", [["id", "is", 12345]])
  [{'type': 'Task', 'id': 12345}]
  ```

  ```python
  >>> version = sg.get_projects(show)[0].get_shots(shot)[0].get_versions()[0]
  >>> version.movie
  <Movie "bunny_080_0200_v001.mov">
  >>> version.movie.download("/var/tmp")
  ```


pkgId: 2c9658bacef661114d3bd4483d1bd3524e9f3156b023ca553016b163ba69c2f1
name: python-showmereqs-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for showmereqs
url: https://github.com/sunandriver/showmereqs
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-showmereqs-0.1.1-1.src.rpm
location_href: Packages/python-showmereqs-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  A lightweight command-line tool that generates requirements.txt by analyzing import statements in your Python projects.



  -   Intelligent third-party import detection
  -   Automatic requirements.txt generation with precise versions
  -   Clean and intuitive CLI interface
  -   Smart package resolution and analysis



  Install via pip:

  ```bash
  pip install showmereqs
  ```



  Generate requirements.txt for current directory:

  ```bash
  showmereqs .
  ```

  Or specify a project path:

  ```bash
  showmereqs path/to/your/project
  ```



  Traditional approaches like `pip freeze` capture all environment dependencies, while modern tools like Poetry can be overly complex for simple needs. ShowMeReqs bridges this gap by offering a streamlined solution that identifies only the dependencies your project actually uses.

  Additionally, once ShowMeReqs generates the initial requirements.txt, you can easily migrate to modern package management tools for more comprehensive dependency management.



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

  ShowMeReqs uses package mapping and stdlib data from [pipreqs](https://github.com/bndr/pipreqs/tree/master) under the Apache 2.0 license. As pipreqs development has slowed, ShowMeReqs aims to provide an actively maintained alternative for the Python community.



  Future releases will include:

  -   Additional CLI options for customization
  -   Support for excluding specific packages or directories
  -   Version range specifications
  -   Integration with other package management tools

  Feel free to open issues for feature requests or bug reports.


pkgId: 3de0c7c382b02aca71d0b28d34e5ce70253aaed00f0aeddff8fe8b76a760d4a0
name: python-shruggingface-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for shruggingface
url: https://pypi.org/project/shruggingface/
rpm_license: Public Domain
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shruggingface-0.1.0-1.src.rpm
location_href: Packages/python-shruggingface-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  A module isn't working 'cause transformers gave an error 'cause you didn't have
  have a key or maybe an account as it's a faff to set one up because it does not
  work with OAuth and you don't entrust your secrets to a smiling but still shady
  site that dares to ask for them or maybe it is because your keepass database is
  still stuck inside the phone the one you dropped into the toilet and so here we
  sit awaiting an email with a link to click just wishing that researchers were a
  tiny bit more thoughtful and a little less naive not listen to an emoji with an
  invite to a private site a petty walled garden or have heard of Dr Stallman and
  would take on board his warnings as he's almost always right if they had they'd
  not gate up their models behind logins that have me kneel and beg for access to
  dependencies they gated with errors that are unhelpful because nobody ever sees
  them as they only use the gui and for all their learned posturing they can't be
  all that technical and care more about their surveys than people forced to fill
  them it is process over people but our processes are cattle or at least we wish
  they were but they've never heard of devops and rarely open up a terminal as it
  consists of senseless walls of text like this and conda put them off I guess it
  is slow and unreliable all its options wrong as everyone in dataland prefers to
  use the mouse it's 3AM I'm sick of this we've just run out of coffee because an
  unnamed smart somebody put the landmine called transformers in this subdepedent
  module I needed for my code good at least for them I guess but fashion seems to
  never check that yesterdays tomorrows will always work with now or perhaps they
  never cared or maybe safety safety safety and whatever sells the padlocks in an
  ethics that's all backwards I just need to get this working and get to sleep at
  last I don't want you all to hate me I just really care about this code I think
  it is important that it works when you import it without it being awkward maybe
  send it up it to Brewster who cares about computers all you type to use this is
  `shruggingface --help`


pkgId: 4bad0863a1257348456e47d8617ef408dfbef358f1d44c92908152632ea58a8e
name: python-shub-workflow-help
arch: noarch
version: 1.14.14
epoch: 0
release: 1
summary: Development documents and examples for shub-workflow
url: https://github.com/scrapinghub/shub-workflow
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shub-workflow-1.14.14-1.src.rpm
location_href: Packages/python-shub-workflow-help-1.14.14-1.noarch.rpm
checksum_type: sha256
description:
  A set of tools for controlling processing workflow with spiders and script running in scrapinghub ScrapyCloud.



  ```
  pip install shub-workflow
  ```

  If you want to support s3 tools:

  ```
  pip install shub-workflow[with-s3-tools]
  ```

  For google cloud storage tools support:

  ```
  pip install shub-workflow[with-gcs-tools]
  ```



  Check [Project Wiki](https://github.com/scrapinghub/shub-workflow/wiki) for documentation. You can also see code tests for lots of examples of usage.



  The requirements for this library are defined in setup.py as usual. The Pipfile files in the repository don't define dependencies. It is only used
  for setting up a development environment for shub-workflow library development and testing.




  For installing a development environment for shub-workflow, the package comes with Pipfile and Pipfile.lock files. So, clone or fork the repository and do:

  ```
  > pipenv install --dev
  > cp pre-commit .git/hooks/
  ```

  for installing the environment, and:

  ```
  > pipenv shell
  ```

  for initiating it.

  There is a script, lint.sh, that you can run everytime you need from the repo root folder, but it is also executed each time you do `git commit` (provided
  you installed the pre-commit hook during the installation step described above). It checks code pep8 and typing integrity, via flake8 and mypy.

  ```
  > ./lint.sh
  ```


pkgId: 5f57257e307a95358731144a1352ff8c85c533bd2bab3c1398f702b12dc40e89
name: python-shuffleify-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for shuffleify
url: https://pypi.org/project/shuffleify/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-shuffleify-1.0.0-1.src.rpm
location_href: Packages/python-shuffleify-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  We all use Spotify and we all love this software. But something is off inside it, especially shuffling... Have you ever felt that you were listening to the very same 10 songs every time you shuffled your hundreds song included playlist? Well, you are not alone... Which is why I started the 'Make Shuffle Great Again' campaign officially!

  This package is about functionality, not other fancy UI/UX stuff. If you do some visual stuff, go ahead, the basic functionality is already ready for you!



  ```
  pip install shuffleify
  ```



  Copy, set things up, run!

  ```python
  from shuffleify.core import ApiHandler
  import shuffleify.shuffler as shuffler

  handler = ApiHandler(
      client_id='your client id',
      client_secret='your client secret'
  )

  playlist_id = handler.get_playlist_id('https://open.spotify.com/playlist/51gVMBShUWyqVcc3F65J2g?si=c8e60dc7f2494cc7')
  tracks = handler.get_playlist_tracks(playlist_id)
  tracks = shuffler.true_shuffle(tracks)

  handler.create_playlist(tracks)
  ```



  First of all, get your client id and secret from (there)[https://developer.spotify.com/]. Then run this:

  ```python
  from shuffleify.core import ApiHandler

  handler = ApiHandler(
      client_id='your client id',
      client_secret='your client secret'
  )
  ```


  In order to get songs from playlists and albums, you need their ID. With these functions, you can obtain the information from their URL.

  ```python
  playlist_id = handler.get_playlist_id('https://open.spotify.com/playlist/51gVMBShUWyqVcc3F65J2g?si=c8e60dc7f2494cc7')
  album_id = handler.get_album_id('https://open.spotify.com/album/00eiw4KOJZ7eC3NBEpmH4C?si=TWb4oQBEQqODOeTjpwBSqw')
  track_id = handler.get_track_id('https://open.spotify.com/track/76gcXhY3Zv6wW0BTe9nHJo?si=1f4f118a1fdf40fe')
  ```

  Then, you can easily get all tracks from them:

  ```python
  tracks = []
  tracks.append(track_id)
  tracks.extend(handler.get_album_tracks(album_id)) #getting songs from the album
  tracks.extend(handler.get_playlist_tracks(playlist_id)) #getting songs from the playlist
  ```



  There are two ways of shuffling in Shuffleify: True Shuffling and Fair Shuffling.



  Each song in the 'tracks' list has the very same chance. The only **true** way of shuffling.

  ```python
  import  shuffleify.shuffler as shuffler

  tracks = shuffler.true_shuffle(tracks)
  ```

  | parameter | datatype | use case | default value |
  | --- | --- | --- | --- |
  | tracks | list | all songs that requested | |
  | limit | list | maximum size of shuffled list | None |

  **Important:** If 'limit' is None or greater than size of tracks or less than 1 then it becomes equal to the length of the tracks list.



  If a song was randomly selected, it does not mean that it will be deleted from the tracks' selection pool. In other words, every song has the chance of being multiple times in the final list.

  ```python
  import  shuffleify.shuffler as shuffler

  tracks = shuffler.fair_shuffle(tracks, 10)
  ```

  | parameter | datatype |
  | --- | --- |
  | tracks | list |
  | size | integer |



  ```python
  handler.create_playlist(
      tracks,
      playlist_name='Playlist name here',
      description='this is the description part',
      public=True
  )
  ```

  Except tracks, all the other parameters have default values, so configuring them is **optional**.

  | parameter | default value |
  | --- | --- |
  | playlist_name | 'Shuffled!' |
  | description | 'created by shuffleify' |
  | public | True |


pkgId: 3bf790e3696265cca9959ac48e72b47415c1938335124d97b7ec42700aa197d4
name: python-sibi-dst-help
arch: noarch
version: 0.3.23
epoch: 0
release: 1
summary: Development documents and examples for sibi-dst
url: https://pypi.org/project/sibi-dst/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sibi-dst-0.3.23-1.src.rpm
location_href: Packages/python-sibi-dst-help-0.3.23-1.noarch.rpm
checksum_type: sha256
description:
  Data Science Toolkit built with Python, Pandas, Dask, OpenStreetMaps, Scikit-Learn, XGBOOST, Django ORM, SQLAlchemy, DjangoRestFrameWork


pkgId: 45dcb5b395ea2c1727b899a9601875154962a2fcbe730b2aff85ff51b1846fb0
name: python-sideseeing-tools-help
arch: noarch
version: 0.6.3
epoch: 0
release: 1
summary: Development documents and examples for sideseeing-tools
url: https://github.com/rafaelpezzuto/sideseeing-tools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sideseeing-tools-0.6.3-1.src.rpm
location_href: Packages/python-sideseeing-tools-help-0.6.3-1.noarch.rpm
checksum_type: sha256
description:
  SideSeeing Tools is a collection of scripts designed to load, preprocess, and analyze data gathered through the MultiSensor Data Collection App.



  ```bash
  pip install sideseeing-tools
  ```




  __Create a dataset__
  ```python
  from sideseeing_tools import sideseeing

  ds = sideseeing.SideSeeingDS(root_dir='/home/user/my-project')









  ```

  __Get a random sample from the dataset__
  ```python
  my_sample = ds.instance
  ```

  __Check the available sensors by instance__
  ```python
  ds.sensors


  {
      
      'sensors1': {
          
          'lps22h barometer sensor': {
              
              'FhdFastest#S10e-2024-08-01-10-42-43-354',
              'FhdGame#S10e-2024-08-01-10-25-08-383',
              'FhdNormal#S10e-2024-08-01-10-02-18-947',
              'FhdUi#S10e-2024-08-01-10-13-50-369'
          },
          'tcs3407 uncalibrated lux sensor': {
              'FhdFastest#S10e-2024-08-01-10-42-43-354',
              ...
          },
          ...
      },
      'sensors3': {
          'ak09918c magnetic field sensor': {...},
          'bmi160_accelerometer accelerometer non-wakeup': {
              'FhdFastest#Mia3-2024-08-01-10-42-44-639',
              'FhdNormal#Mia3-2024-08-01-10-02-22-118',
              ...
          },
          ...
      },
      'sensors6': {
          ...
      }
  }
  ```

  __Get accelerometer data from the sample__
  ```python
  my_sample = ds.instances['FhdNormal#Mia3-2024-08-01-10-02-22-118']
  my_sample_accel_data = my_sample.sensors3['bmi160_accelerometer accelerometer non-wakeup']
  my_sample_accel_data
  ```

  |    | Datetime UTC               |       x |         y |       z |   Time (s) |
  |---:|:---------------------------|--------:|----------:|--------:|-----------:|
  |  0 | 2024-03-21 19:33:01.550000 | 9.34247 | -0.270545 | 3.10767 |      0     |
  |  1 | 2024-03-21 19:33:01.561000 | 9.51725 | -0.347159 | 3.00233 |      0.011 |
  |  2 | 2024-03-21 19:33:01.571000 | 9.46458 | -0.407014 | 2.81079 |      0.021 |
  |  3 | 2024-03-21 19:33:01.581000 | 9.35205 | -0.395043 | 2.79164 |      0.031 |
  |  4 | 2024-03-21 19:33:01.590000 | 9.36402 | -0.263362 | 2.77488 |      0.04  |


  __Extract a snippet from a sample (video and sensor data)__
  ```python
  my_sample.extract_snippet(
      start_time=2,                        # Start time of the snippet (in seconds)
      end_time=17,                         # End time of the snippet (in seconds)
      output_dir='/home/user/snippet_2_17' # Directory to save the extracted snippet
  )
  ```

  Running the command `extract_snippet` will generate one file for the video (with audio), one file for consumption data, one file for GPS data, and one file for each sensor type (single-axis, three-axis, three-axis uncalibrated) present in the instance. See an illustrative example in the following file tree.

  ```text
  home/
  ├─ user/
  │  ├─ snippet_2_17/
  │  │  ├─ consumption.2_17.csv
  │  │  ├─ gps.2_17.csv
  │  │  ├─ sensors.one.2_17.csv
  │  │  ├─ sensors.three.2_17.csv
  │  │  ├─ sensors.three.uncalibrated.2_17.csv
  │  │  ├─ video.2_17.mp4
  ```

  __Extract only video snippets__

  It is possible to extract a snippet from a video (and only the video) using the extract_video_snippet function.
  ```python
  from sideseeing_tools import media


  media.extract_video_snippet(
      source_path=my_sample.video,    # Path to the input mp4 file
      start_second=3,                 # Start time of the snippet (in seconds)
      end_second=18,                  # End time of the snippet (in seconds)
      output_path='my_snippet.mp4'    # Path to save the extracted snippet
  )
  ```

  __Iterate over the samples__

  ```python
  for i in ds.iterator:
      print(i.name, i.video)
  ```

  __Create a plotter__
  ```python
  from sideseeing_tools import plot

  plotter = plot.SideSeeingPlotter(ds, taxonomy='/home/user/my-project/taxonomy.csv')














  ```



  The following methods provide flexible and efficient ways to extract frames from video files, either saving them to disk or returning them in memory for immediate use in your applications. While using the methods below, you can opt for saving the frames to disk or returning them in memory.

  __`extract_frames_at_times`__

  This method extracts frames from a video file at the specified time points and saves them as image files.

  **Parameters:**
  - `source_path` (str): Path to the source video file.
  - `frame_times` (list): List of time points (in seconds) at which frames should be extracted.
  - `target_dir` (str, optional): Path to the target directory where frames will be saved. If `None`, frames will be returned in memory.
  - `prefix` (str, optional): Prefix to be added to the frame file names.
  - `left_zeros` (int, optional): Number of left-padded zeros in the frame file names.

  **Returns:**
  - `list`: List of paths to the extracted frames or list of frames in memory if `target_dir` is `None`.

  __`extract_frames_at_positions`__

  This method extracts frames from a video file at the specified frame positions and saves them as image files.

  **Parameters:**
  - `source_path` (str): Path to the source video file.
  - `frame_positions` (list): List of frame positions at which frames should be extracted.
  - `target_dir` (str, optional): Path to the target directory where frames will be saved. If `None`, frames will be returned in memory.
  - `prefix` (str, optional): Prefix to be added to the frame file names.
  - `left_zeros` (int, optional): Number of left-padded zeros in the frame file names.

  **Returns:**
  - `list`: List of paths to the extracted frames or list of frames in memory if `target_dir` is `None`.

  __`extract_frames_timespan`__

  This method extracts frames from a video file within a specified time span and saves them as image files.

  **Parameters:**
  - `source_path` (str): Path to the source video file.
  - `start_time` (float): The start time (in seconds) of the time span from which frames should be extracted.
  - `end_time` (float): The end time (in seconds) of the time span from which frames should be extracted.
  - `target_dir` (str, optional): Path to the target directory where frames will be saved. If `None`, frames will be returned in memory.
  - `step` (int, optional): The rate at which frames are extracted.
  - `prefix` (str, optional): Prefix to be added to the frame file names.
  - `left_zeros` (int, optional): Number of left-padded zeros in the frame file names.

  **Returns:**
  - `list`: List of paths to the extracted frames or list of frames in memory if `target_dir` is `None`.

  __`extract_frames_positionspan`__

  This method extracts frames from a video file within a specified position span and saves them as image files.

  **Parameters:**
  - `source_path` (str): Path to the source video file.
  - `start_frame` (int): The start frame position from which frames should be extracted.
  - `end_frame` (int): The end frame position from which frames should be extracted.
  - `target_dir` (str, optional): Path to the target directory where frames will be saved. If `None`, frames will be returned in memory.
  - `step` (int, optional): The rate at which frames are extracted.
  - `prefix` (str, optional): Prefix to be added to the frame file names.
  - `left_zeros` (int, optional): Number of left-padded zeros in the frame file names.

  **Returns:**
  - `list`: List of paths to the extracted frames or list of frames in memory if `target_dir` is `None`.

  __`extract_frames`__

  This method extracts frames from a video file at a specified frame rate and saves them as image files.

  **Parameters:**
  - `source_path` (str): Path to the source video file.
  - `target_dir` (str, optional): Path to the target directory where frames will be saved. If `None`, frames will be returned in memory.
  - `step` (int, optional): The rate at which frames are extracted.
  - `prefix` (str, optional): Prefix to be added to the frame file names.
  - `left_zeros` (int, optional): Number of left-padded zeros in the frame file names.

  **Returns:**
  - `list`: List of paths to the extracted frames or list of frames in memory if `target_dir` is `None`.



  ```python
  from sideseeing_tools import media


  media.extract_frames_at_times(
      source_path=video_path,
      frame_times=[1.0, 2.0, 3.0],
      target_dir='output',
      prefix='frame_',
      left_zeros=5
  )


  frames = media.extract_frames_at_times(
      source_path=video_path,
      frame_times=[1.0, 2.0, 3.0]
  )


  media.extract_frames_at_positions(
      source_path=video_path,
      frame_positions=[30, 60, 90],
      target_dir='output',
      prefix='frame_',
      left_zeros=5
  )


  frames = media.extract_frames_at_positions(
      source_path=video_path,
      frame_positions=[30, 60, 90]
  )


  media.extract_frames_timespan(
      source_path=video_path,
      start_time=10.0,
      end_time=20.0,
      target_dir='output',
      step=30,
      prefix='frame_',
      left_zeros=5
  )


  frames = media.extract_frames_timespan(
      source_path=video_path,
      start_time=10.0,
      end_time=20.0,
      step=30
  )


  media.extract_frames_positionspan(
      source_path=video_path,
      start_frame=300,
      end_frame=600,
      target_dir='output',
      step=30,
      prefix='frame_',
      left_zeros=5
  )


  frames = media.extract_frames_positionspan(
      source_path=video_path,
      start_frame=300,
      end_frame=600,
      step=30
  )


  media.extract_frames(
      source_path=video_path,
      target_dir='output',
      step=30,
      prefix='frame_',
      left_zeros=5
  )


  frames = media.extract_frames(
      source_path=video_path,
      step=30
  )
  ```



  We suggest implementing the following folder structure: create a directory named `data` to contain all recordings. By doing so, when instantiating the `SideSeeingDataset`, a `metadata.csv` file will be generated in the root directory. Here is the command to instantiate a dataset:

  ```python
  ds = sideseeing.SideSeeingDS('/home/user/my-project', subdir='data', name='MyDataset')
  ```

  And here is the suggested folder structure:

  ```text
  my-project/
  ├─ data/
  │  ├─ place01/
  │  │  ├─ route01/
  │  │  │  ├─ consumption.csv
  │  │  │  ├─ gps.csv
  │  │  │  ├─ metadata.json
  │  │  │  ├─ sensors.one.csv
  │  │  │  ├─ sensors.three.csv
  │  │  │  ├─ sensors.three.uncalibrated.csv
  │  │  │  ├─ video.gif
  │  │  │  ├─ video.mp4
  │  │  │  ├─ video.wav
  │  │  ├─ route02/
  │  ├─ place02/
  │  ├─ place03/
  ├─ metadata.csv
  ├─ taxonomy.csv
  ```



  The following data outlines the specifications of sensor content before SideSeeing conversion, i.e., when accessing them directly through the files generated by the MultSensor Data Collection tool.


  **File consumption.csv**

  | datetime_utc             | battery_microamperes |
  |--------------------------|----------------------|
  | 2024-03-21T19:38:04.961Z | -1431                |
  | 2024-03-21T19:38:05.961Z | -1011                |
  | 2024-03-21T19:38:06.961Z | -2216                |

  **File gps.csv**

  | datetime_utc            | gps_interval | accuracy | latitude | longitude  |
  |-------------------------|--------------|----------|----------|------------|
  | 2024-03-21T19:38:10.309Z| 15           | 16.0     | -23.5645676 | -46.7395994 |
  | 2024-03-21T19:38:38.033Z| 15           | 57.639   | -23.5645617 | -46.739602  |
  | 2024-03-21T19:38:54.120Z| 15           | 26.611   | -23.5645528 | -46.7396658 |

  **File sensors.one.csv**

  | timestamp_nano       | datetime_utc            | name                        | axis_x           | accuracy  |
  |----------------------|-------------------------|-----------------------------|------------------|-----------|
  | 0                    | 2024-03-13T13:40:27.243Z| Palm Proximity Sensor       | 5.0              | 3         |
  | 712657771915658      | 2024-03-21T19:38:05.015Z| TCS3407 Uncalibrated lux Sensor | 1810.0    | 3         |
  | 712657931915658      | 2024-03-21T19:38:05.174Z| TCS3407 Uncalibrated lux Sensor | 1812.0    | 3         |

  **File sensors.three.csv**

  | timestamp_nano    | datetime_utc            | name                        | axis_x      | axis_y       | axis_z      | accuracy |
  |-------------------|-------------------------|-----------------------------|-------------|--------------|-------------|----------|
  | 712657652031560   | 2024-03-21T19:38:04.895Z| LSM6DSO Acceleration Sensor | 9.603442    | -0.10295067  | 3.9959226   | 3        |
  | 712657673895658   | 2024-03-21T19:38:04.916Z| LSM6DSO Acceleration Sensor | 9.823709    | -0.38067806  | 3.9097314   | 3        |
  | 712657652031560   | 2024-03-21T19:38:04.895Z| LSM6DSO Gyroscope Sensor    | 0.113544576 | 0.42852196   | 0.083306745 | 3        |

  **File sensors.three.uncalibrated.csv**

  | timestamp_nano    | datetime_utc            | name                            | axis_x       | axis_y        | axis_z       | delta_x        | delta_y       | delta_z       | accuracy |
  |-------------------|-------------------------|---------------------------------|--------------|---------------|--------------|----------------|---------------|---------------|----------|
  | 712657851915658   | 2024-03-21T19:38:05.094Z| Uncalibrated Magnetic Sensor   | 268.56       | -9.54         | -230.45999   | 255.48         | -2.28         | -227.94       | 3        |
  | 712657852615658   | 2024-03-21T19:38:05.096Z| Gyroscope sensor UnCalibrated   | 0.044593163  | -0.13439035   | 0.07086037   | -0.003009122   | -0.016193425  | -0.0026664268| 3        |
  | 712657862615658   | 2024-03-21T19:38:05.105Z| Gyroscope sensor UnCalibrated   | 0.042760566  | -0.05009095   | 0.100792766  | -0.003009122   | -0.016193425  | -0.0026664268| 3        |
  | 712657874678965   | 2024-03-21T19:38:05.118Z| Uncalibrated Magnetic Sensor   | 268.62       | -8.639999     | -231.48      | 255.48         | -2.28         | -227.94       | 3        |
  | 712657872615658   | 2024-03-21T19:38:05.116Z| Gyroscope sensor UnCalibrated   | 0.064751714  | -0.007330383  | 0.118507855  | -0.003009122   | -0.016193425  | -0.0026664268| 3        |




  | Attribute or method | Description |
  | ------------------- | ----------- |
  | `geolocation_points`  | Dictionary containing geolocation data, including latitude and longitude coordinates representing geographical points. |
  | `geolocation_center`  | Latitude and longitude coordinates representing the geographic center of a specific area. |
  | `audio`               | Path to the audio file associated with the collected data. |
  | `gif`                 | Path to the GIF file associated with the collected data. |
  | `video`               | Path to the video file associated with the collected data. |
  | `sensors1`            | Dictionary containing data from one-axis sensors. |
  | `sensors3`            | Dictionary containing data from three-axis sensors. |
  | `sensors6`            | Dictionary containing data from six-axis sensors, including uncalibrated data. |
  | `label`               | List of categories and tags representing the taxonomy of sidewalks. |
  | `video_start_time`    | Start time of the video associated with the collected data. |
  | `video_stop_time`     | Stop time of the video associated with the collected data. |
  | `extract_snippet`     | Extracting a snippet from the sample (video, sensor, gps and consumption data). |




  [Rafael J P Damaceno](https://github.com/rafaelpezzuto)




  The SideSeeing Project aims to develop methods based on Computer Vision and Machine Learning for Urban Informatics applications. Our goal is to devise strategies for obtaining and analyzing data related to urban accessibility. Take a look at our [website](https://sites.usp.br/sideseeing).


