# packages

pkgId: cf75520f8dd55d5c7eacff9bec1f431a66c5c5b5a711953c5280222ba39c76f1
name: python-blackboardsync
arch: src
version: 0.18.0
epoch: 0
release: 1
summary: Sync your blackboard content to your device
url: https://bbsync.app
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackboardsync-0.18.0-1.src.rpm
checksum_type: sha256
description:
  [![Get on PyPI][pypi-shield]][pypi] [![License: GPL  v2][license-shield]][gnu] [![Build][build-shield]][actions] [![Matrix][matrix-shield]][matrix]

  **BlackboardSync** performs a periodic,
  incremental download of all your Blackboard content,
  such as lecture slides, lab sheets, and other attachments.

  <div align="center">
  	<img src="https://github.com/sanjacob/BlackboardSync/assets/52013991/b7414212-034a-42a6-ab20-bb51394d885e"
           height="auto" width="75%" />
  </div>
  </br>

  [Join the Matrix room to hear about updates, ask for help, and more!][matrix]



  Being a student in this day and age means constantly having to
  keep up to date with the files that are uploaded to the student portal.
  I needed a tool that would take care of retrieving these files for me,
  allowing me to focus on the work to be done.
  Something I could set up and forget about.

  What I was looking for in such an application was:

  - Automatic syncing with minimal intervention after the initial setup
  - Graphical interface
  - Cross-platform compatibility
  - It would make use of the [Blackboard REST API][blackboard-api]



  **Why is my university/college not supported?**

  To provide support for a specific university, it is necessary to have
  some knowledge about its login process.

  If you would like to help to add support for your university,
  or would like to see which universities are currently supported,
  [start here.](UNIVERSITIES.md)

  **Built with:**

  - [Python 3.11][python]
  - [PyQt6][pyqt]




  - Supported content:
    - Attachments of any* type (e.g. .docx, .pptx, .pdf, etc.)
    - Internet links
    - Content descriptions (saved as html files)
  - Cross-platform
    - Linux, Windows, and macOS ready

  *: Except videos






  <a href="https://apps.microsoft.com/detail/9NSXZGKPNX2H?cid=github-readme&mode=mini">
  	<img src="https://get.microsoft.com/images/en-us%20dark.svg" width="200"/>
  </a>



  <a href="https://flathub.org/apps/app.bbsync.BlackboardSync">
    <img alt="Download on Flathub"
         src="https://flathub.org/api/badge?svg&locale=en" width="200"/>
  </a>



  Please first download the [latest release][stable].

  **MacOS Installation**

  You will need to confirm the installation in `System Preferences > Security and Privacy`.
  You can see the specific steps in the GIF below.
  After the program has been installed, you may eject the mounted disk.

  ![MacOSInstall][MacOSInstall]




  ```bash
  python3 -m pip install blackboardsync
  blackboardsync
  ```





  ```bash
  git clone https://github.com/sanjacob/BlackboardSync.git
  cd BlackboardSync
  pipenv install
  pipenv run python -m blackboard_sync
  ```



  You can find all releases on [GitHub][releases].




  Contributions are welcome.

  More details available at [CONTRIBUTING.md](CONTRIBUTING.md)

  **We are looking for beta testers for all platforms!**



  Open a GitHub issue [here][issues].





  [![Support BBSync on ko-fi][kofi-shield]][kofi]


  [![LiberaPay][lp-shield]][liberapay]



  `bc1qhvcs07y3jnf09kahefscs05gxlmvhu542wzvgp`

  If you wish to contribute in a different way, please inquire.




  [![License: GPL  v2][license-shield]][gnu]

  This software is distributed under the [General Public License v2.0][license],
  more information available at the [Free Software Foundation][gnu].




  [Blackboard API documentation][blackboard-api]

  [PyInstaller][pyinstaller]

  README templates/guide by [tonycrosby-tech][tonycrosby], [neildrew][neildrew],
  and [Rita Łyczywek][bulldogjob]

  Flathub team for their quick work in approving the app :heart:


  <!-- Project -->

  [releases]: https://github.com/sanjacob/BlackboardSync/releases "BlackboardSync Releases"
  [issues]: https://github.com/sanjacob/BlackboardSync/issues/new "BlackboardSync Issues"
  [stable]: https://github.com/sanjacob/BlackboardSync/releases/latest
  [actions]: https://github.com/sanjacob/BlackboardSync/actions
  [build-shield]: https://img.shields.io/github/actions/workflow/status/sanjacob/BlackboardSync/build.yml?branch=main
  [MacOSInstall]: https://github.com/sanjacob/BlackboardSync/assets/52013991/6be5e390-3f66-4eb4-b8d5-6f3230ae52ef

  <!-- Dependencies -->

  [git]: https://git-scm.com/	"Git"
  [python]: https://www.python.org/ "Python.org"
  [pipenv]: https://pipenv.pypa.io/en/latest/ "Pipenv"
  [pyqt]: https://pypi.org/project/PyQt6/	"Python Bindings for Qt 6"

  <!-- Chat -->

  [matrix]: https://matrix.to/#/#blackboardsync:matrix.org
  [matrix-shield]: https://img.shields.io/matrix/blackboardsync%3Amatrix.org?logo=matrix

  <!-- Packages -->

  [pypi]: https://pypi.org/project/blackboardsync
  [pypi-shield]: https://img.shields.io/pypi/v/BlackboardSync?color=%23241F21

  <!-- Donations -->

  [kofi]: https://ko-fi.com/Q5Q17XN36
  [liberapay]: https://liberapay.com/BlackboardSync
  [kofi-shield]: https://ko-fi.com/img/githubbutton_sm.svg
  [lp-shield]: https://img.shields.io/liberapay/receives/BlackboardSync.svg?logo=liberapay

  <!-- Licence -->

  [license]: LICENSE "General Public License"
  [gnu]: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html "Free Software Foundation"
  [license-shield]: https://img.shields.io/github/license/sanjacob/BlackboardSync?color=%23241F21

  <!-- Acknowledgements & README Templates -->

  [blackboard-api]: https://developer.blackboard.com/portal/displayApi	"Blackboard API Reference"
  [pyinstaller]: https://www.pyinstaller.org/	"PyInstaller"

  [tonycrosby]: https://gist.github.com/tonycrosby-tech/c18c2b6c74900c6080fc097ca0718839	"tonycrosby-tech README template"
  [neildrew]: https://github.com/othneildrew/Best-README-Template	"othneildrew README template"
  [bulldogjob]: https://bulldogjob.com/news/449-how-to-write-a-good-readme-for-your-github-project	"bulldogjob README guide"


pkgId: d9af5f229ba49584ca57f1689473a7aa5f1b23b4befcecdc782a57726546bd27
name: python-blackboxopt
arch: src
version: 5.0.4
epoch: 0
release: 1
url: https://github.com/boschresearch/blackboxopt
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackboxopt-5.0.4-1.src.rpm
checksum_type: sha256
summary:
  A common interface for blackbox optimization algorithms along with useful helpers like parallel optimization loops, analysis and visualization scripts.

description:
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
  [![CI/CD](https://github.com/boschresearch/blackboxopt/workflows/ci-cd-pipeline/badge.svg)](https://github.com/boschresearch/blackboxopt/actions?query=workflow%3Aci-cd-pipeline+branch%3Amain)
  [![PyPI - Wheel](https://img.shields.io/pypi/wheel/blackboxopt)](https://pypi.org/project/blackboxopt/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/blackboxopt)](https://pypi.org/project/blackboxopt/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  Various blackbox optimization algorithms with a common interface along with useful
  helpers like parallel optimization loops, analysis and visualization scripts.

  Random search is provided as an example optimizer along with tests for the interface.

  New optimizers can require `blackboxopt` as a dependency, which is just the light-weight
  interface definition.
  If you want all optimizer implementations that come with this package, install
  `blackboxopt[all]`
  Alternatively, you can get individual optimizers with e.g. `blackboxopt[bohb]`

  This software is a research prototype.
  The software is not ready for production use.
  It has neither been developed nor tested for a specific use case.
  However, the license conditions of the applicable Open Source licenses allow you to
  adapt the software to your needs.
  Before using it in a safety relevant setting, make sure that the software fulfills your
  requirements and adjust it according to any applicable safety standards
  (e.g. ISO 26262).



  **Visit [boschresearch.github.io/blackboxopt](https://boschresearch.github.io/blackboxopt/)**



  Install poetry >= 1.5.0

  ```
  pip install --upgrade poetry
  ```

  Install the `blackboxopt` package from source by running the following from the root
  directory of _this_ repository

  ```
  poetry install
  ```

  (Optional) Install [pre-commit](https://pre-commit.com) hooks to check code standards
  before committing changes:

  ```
  poetry run pre-commit install
  ```



  Make sure to install all extras before running tests

  ```
  poetry install -E testing
  poetry run pytest tests/
  ```

  For HTML test coverage reports run

  ```
  poetry run pytest tests/ --cov --cov-report html:htmlcov
  ```



  Make sure to install _all_ necessary dependencies:

  ```
  poetry install --extras=all
  ```

  The documentation can be built from the repository root as follows:

  ```
  poetry run mkdocs build --clean --no-directory-urls
  ```

  For serving it locally while working on the documentation run:

  ```
  poetry run mkdocs serve
  ```





  In the context of initializing an evaluation result from a specification, facing the
  concern that having a constructor with a specification argument while the specification
  attributes end up as toplevel attributes and not summarized under a specification
  attribute we decided for unpacking the evaluation specification like a dictionary into
  the result constructor to prevent the said cognitive dissonance, accepting that the
  unpacking operator can feel unintuitive and that users might tend to matching the
  attributes explictly to the init arguments.



  In the context of many optimizers just sequentally reporting the individual evaluations
  when multiple evaluations are reported at once and thus not leveraging any batch
  reporting benefits, facing the concern that representing that common behaviour in the
  optimizer base class requires the definition of an abstract report single and an
  abstract report multi method for which the report single does not need to be implemented
  if the report multi is, we decided to refactor the arising redundancy into a function
  `call_functions_with_evaluations_and_collect_errors`, accepting that this increases the
  cognitive load when reading the code.



  `blackboxopt` is open-sourced under the Apache-2.0 license. See the [LICENSE](LICENSE)
  file for details.

  For a list of other open source components included in `blackboxopt`, see the file
  [3rd-party-licenses.txt](3rd-party-licenses.txt).


pkgId: be8bd4df154129275e39a5c792884974f85bce39c2024555c23e16b749cbcef2
name: python-blackbricks
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: Black for Databricks notebooks
url: https://github.com/inspera/blackbricks
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackbricks-2.2.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/blackbricks.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/blackbricks/)
  [![Downloads](https://pepy.tech/badge/blackbricks)](https://pepy.tech/project/blackbricks)
  [![Downloads per month](https://pepy.tech/badge/blackbricks/month)](https://pepy.tech/project/blackbricks/month)
  [![License](https://img.shields.io/pypi/l/blackbricks)](LICENSE)
  [![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)



  A formatting tool for your Databricks notebooks.

  - Python cells are formatted with [black](https://github.com/psf/black)
  - SQL cells are formatted with [sqlparse](https://github.com/andialbrecht/sqlparse)



  * [Installation](#installation)
  * [Usage](#usage)
  * [Version control integration](#version-control-integration)
  * [Contributing](#contributing)
  * [FAQ](#faq)
  * [Breaking changes](#breaking-changes)



  While you can use `pip` directly, you should prefer using [pipx](https://pypa.github.io/pipx/).

  ```bash
  $ pipx install blackbricks
  ```

  You probably also want to have installed the `databricks-cli`, in order to use `blackbricks` directly on your notebooks.

  ``` bash
  $ pipx install databricks-cli
  $ databricks configure  # Required in order to use `blackbricks` on remote notebooks.
  ```


  You can use `blackbricks` on Python notebook files stored locally, or directly on the notebooks stored in Databricks.

  For the most part, `blackbricks` operates very similarly to `black`.

  ``` bash
  $ blackbricks notebook1.py notebook2.py  # Formats both notebooks.
  $ blackbricks notebook_directory/  # Formats every notebook under the directory (recursively).
  ```
  An important difference is that `blackbricks` will ignore any file that does not contain the `# Databricks notebook
  source` header on the first line. Databricks adds this line to all Python notebooks. This means you can happily run
  `blackbricks` on a directory with both notebooks and regular Python files, and `blackbricks` won't touch the latter.

  If you specify the `-r` or `--remote` flag, `blackbricks` will work directly on your notebooks stored in Databricks.

  ``` bash
  $ blackbricks --remote /Users/username/notebook.py
  $ blackbricks --remote /Repos/username/repo-name/notebook.py
  ```



  ```text
  $ poetry run blackbricks --help

   Usage: blackbricks [OPTIONS] [FILENAMES]...

   Formatting tool for Databricks python notebooks.
   Python cells are formatted using `black`, and SQL cells are formatted by `sqlparse`.
   Local files (without the `--remote` option):
   - Only files that look like Databricks (Python) notebooks will be processed. That is,
   they must start with the header `# Databricks notebook source`
   - If you specify a directory as one of the file names, all files in that directory will
   be added, including any subdirectory.
   Remote files (with the `--remote` option):
   - Make sure you have installed the Databricks CLI (``pip install databricks_cli``)
   - Make sure you have configured at least one profile (`databricks configure`). Check the
   file `~/.databrickscfg` if you are not sure.
   - File paths should start with `/`. Otherwise they are interpreted as relative to
   `/Users/username`, where `username` is the username specified in the Databricks profile
   used.

  ╭─ Arguments ────────────────────────────────────────────────────────────────────────────╮
  │   filenames      [FILENAMES]...  Path to the notebook(s) to format. [default: None]    │
  ╰────────────────────────────────────────────────────────────────────────────────────────╯
  ╭─ Options ──────────────────────────────────────────────────────────────────────────────╮
  │ --remote                     -r                             If this option is used,    │
  │                                                             all filenames are treated  │
  │                                                             as paths to notebooks on   │
  │                                                             your Databricks host (i.e. │
  │                                                             not local files).          │
  │ --profile                    -p                    NAME     If using --remote, which   │
  │                                                             Databricks profile to use. │
  │                                                             [default: DEFAULT]         │
  │ --line-length                                      INTEGER  How many characters per    │
  │                                                             line to allow.             │
  │                                                             [default: 88]              │
  │ --sql-upper                      --no-sql-upper             SQL keywords should be     │
  │                                                             UPPERCASE or lowercase.    │
  │                                                             [default: sql-upper]       │
  │ --check                                                     Don't write the files      │
  │                                                             back, just return the      │
  │                                                             status. Return code 0      │
  │                                                             means nothing would        │
  │                                                             change.                    │
  │ --diff                                                      Don't write the files      │
  │                                                             back, just output a diff   │
  │                                                             for each file on stdout.   │
  │ --version                                                   Display version            │
  │                                                             information and exit.      │
  │ --help                                                      Show this message and      │
  │                                                             exit.                      │
  ╰────────────────────────────────────────────────────────────────────────────────────────╯
  ```





  Use [pre-commit](https://pre-commit.com). Add a `.pre-commit-config.yaml` file
  to your repo with the following content (changing/removing the `args` as you
  wish):

  ```yaml
  repos:
  -   repo: https://github.com/inspera/blackbricks
      rev: 1.0.0
      hooks:
      - id: blackbricks
        args: [--line-length=120]
  ```

  Set the `rev` attribute to the most recent version of `blackbricks`.
  The `args` are optional and can be used to set any of `blackbricks` options.



  If you find blackbricks useful, feel free to say so with a star. If you think it is utterly broken, you are more than
  welcome to contribute improvements. Please open an issue first to discuss what you want added/fixed. Unless you are just
  adding tests. In that case your pull request is extremely likely to be merged right away.





  Sure! Certain SQL statements might not be parsed and indented properly by `sqlparse`, and the result can be jumbled
  formatting. You can disable SQL formatting for a cell by adding `-- nofmt` to the very first line of a cell:

  ```sql
  %sql  -- nofmt
  select this,
               sql_will,   -- be kept just
           like_this
    from if_that_is.what_you_need
  ```



  First, make sure you have set up `databricks-cli` on your system (see [installation](#installation)), and that you have
  at least one profile setup in `~/.databrickscfg`. As an example:

  ```cfg


  [DEFAULT]
  host = https://dbc-b23456-a1243.cloud.databricks.com/
  username = username@example.com
  password = dapi12345678901234567890

  [OTHERPROFILE]
  host = https://dbc-c54321-d234.cloud.databricks.com
  username = name.user@example.com
  password = dapi09876543211234567890
  ```

  You should use [access tokens](https://docs.databricks.com/dev-tools/api/latest/authentication.html) instead of your actual password.

  You can then do:

  ``` bash
  $ blackbricks --remote /Users/username@example.com/notebook.py  # Uses DEFAULT profile.
  $ blackbricks --remote notebook.py  # Equivalent to the above.
  $ blackbricks --remote --profile OTHERPROFILE /Users/name.user@example.com/notebook.py
  $ blackbricks --remote --profile OTHERPROFILE notebook.py  # Equivalent to the above.
  $ blackbricks --remote /Repos/username@example.com/repo-name/notebook.py  # Targeting notebook in a Repo
  ```



  No. See https://github.com/inspera/blackbricks/issues/27 for why.

  However, Databricks now allows you to [format your notebooks with black directly](https://docs.databricks.com/notebooks/notebooks-use.html#format-code-cells).



  This means you had an old version of `click` installed from before, and your installation didn't upgrade it
  automatically. Updating your installation should do the trick, e.g. `pip install -U blackbricks` or similar depending on
  your installation method of choice.




  See https://github.com/inspera/blackbricks/issues/21.





  Style choices made by `blackbricks` will follow semantic versioning, with changes that cause differences resulting in
  new major versions. Such changes will be kept to an absolute minimum, with none currently planned.

  Style choices made by `black` (responsible for 95% of the formatting in a notebook) will not follow the same strict
  semantic versioning. This is because `black` itself does not use semver, but instead provide a [year-based
  policy](https://black.readthedocs.io/en/stable/the_black_code_style/index.html#stability-policy). `blackbricks` will
  make a _minor_ version increase when it upgrades black to a new year. Such a bump should be made once the new year's
  release of `black` is available. Feel free to open an issue if this has not been done yet.



  Notebooks will be terminated with a `\n` starting with version `2.0.0`. This harmonizes EOF handling and should be much
  less annoying in practice than prior versions. This causes a diff on _any_ notebook that was previously formatted with
  `blackbricks<2.0.0`.

  Also, the deprecated and non-functional flag for two space indentation is removed, and providing said flag is now an error.



  Earlier versions of blackbricks applied a patched version of black in order to allow two-space indentation. This was
  done because Databricks used two-space indentation, and did not allow you to change that.

  Since then, Databricks has added the option to choose. Because you can now choose, blackbricks re-joins black in being
  uncompromising, and since version 1.0 you can no longer choose anything but 4 space indentation.

  If you _must_ keep using two-space indentation, then stick to versions `<1.0`.


pkgId: 9944b161fa28f7600ac2686eeffe8bd54f4b92f2679aed0b6ddd5ee893955bdd
name: python-blackdoc
arch: src
version: 0.3.9
epoch: 0
release: 1
summary: run black on documentation code snippets
url: https://github.com/keewis/blackdoc
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackdoc-0.3.9-1.src.rpm
checksum_type: sha256
description:
  **blackdoc** is a tool that applies `black`_ to code in documentation.
  It was originally a rewrite of a `gist`_ and called
  **black-doctest**. In April 2020, it was renamed to **blackdoc**.


pkgId: 74db0f2fd84c1c2eb6ef385596d38cc48b8825e3f6521434aff773ebc02004bd
name: python-blackduck
arch: src
version: 1.1.3
epoch: 0
release: 1
summary: Package for using the Synopsys Black Duck Hub REST API.
url: https://github.com/blackducksoftware/hub-rest-api-python
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackduck-1.1.3-1.src.rpm
checksum_type: sha256
description:
  The hub-rest-api-python provides Python bindings for Hub REST API.



  In v2022.2 of Black Duck the REST API introduced a max page size to protect system resource usage. See the Black Duck [release notes on Synopsys Community](https://community.synopsys.com/s/article/Black-Duck-Release-Notes) for the details of which API endpoints are affected. Users of the the python bindings here should leverage the Client interface which provides automatic paging support to make best use of these endpoints.

  **The old HubInstance interface and many of the examples using it do not perform paging and will break as a result of the changes in v2022.2**.

  Any issues related to the HubInstance Interface will be closed as *Won't Fix*

  Any PRs with new or modified example scripts/utilities **must** use the client interface.



  Introducing the new Client class.

  In order to provide a more robust long-term connection, faster performance, and an overall better experience a new
  Client class has been designed.

  It is backed by a [Requests session](https://docs.python-requests.org/en/master/user/advanced/#session-objects) object. The user specifies a base URL, timeout, retries, proxies, and TLS verification upon initialization and these attributes are persisted across all requests.

  At the REST API level, the Client class provides a consistent way to discover and traverse public resources, uses a
  [generator](https://wiki.python.org/moin/Generators) to fetch all items using pagination, and automatically renews the bearer token.

  See [Client versus HubInstance Comparison](https://github.com/blackducksoftware/hub-rest-api-python/wiki/Client-versus-HubInstance-Comparison) and also read the [Client User Guide](https://github.com/blackducksoftware/hub-rest-api-python/wiki/Client-User-Guide) on the [Hub REST API Python Wiki](https://github.com/blackducksoftware/hub-rest-api-python/wiki).


  The old HubInstance (in HubRestApi.py) keeps its existing functionality for backwards compatibility and therefore does **not** currently leverage any of the new features in the Client class.

  We believe that the new features are compelling enough to strongly encourage users to consider moving from HubInstance to Client.
  See [Client versus HubInstance Comparison](https://github.com/blackducksoftware/hub-rest-api-python/wiki/Client-versus-HubInstance-Comparison).


  Please give it a try and let us know what you think!



  ```
  pip3 install blackduck
  ```

  ```python
  from blackduck import Client
  import logging
  import os

  logging.basicConfig(
      level=logging.INFO,
      format="[s] {s:d} s - s"
  )

  bd = Client(
      token=os.environ.get('blackduck_token'),
      base_url="https://your.blackduck.url",
      
  )

  for project in bd.get_resource(name='projects'):
      print(project.get('name'))
  ```



  Example code showing how to work with the new Client can be found in the *examples/client* folder.

  **Examples which use the old HubInstance interface -which is not maintained- are not guaranteed to work. Use at your own risk.**



  Including a version history on a go-forward basis.



  Retries will be attempted for all HTTP verbs, not just GET.



  Using [pytest](https://pytest.readthedocs.io/en/latest/contents.html)

  ```bash
  git clone https://github.com/blackducksoftware/hub-rest-api-python.git
  cd hub-rest-api-python



  pip3 install -r requirements.txt
  pip3 install .
  cd test
  pytest
  ```



  Do this when testing a new version.

  ```
  git clone https://github.com/blackducksoftware/hub-rest-api-python.git
  cd hub-rest-api-python
  pip3 install -r requirements.txt
  pip3 install .
  ```

  To uninstall:

  ```
  pip3 uninstall blackduck
  ```


  This package is available on PyPi:

  `pip3 install blackduck`


  Documentation for hub-rest-api-python can be found on the base project:
  [Hub REST API Python Wiki](https://github.com/blackducksoftware/hub-rest-api-python/wiki)


pkgId: 06ef5e15189ce97e11b7db37508cb971a2e59b29804565c03eeb8d4ad5fc028f
name: python-blackduck-c-cpp
arch: src
version: 2.0.6
epoch: 0
release: 1
summary: Scanning for c/c++ projects using blackduck and coverity tools
url: https://pypi.org/project/blackduck-c-cpp/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackduck-c-cpp-2.0.6-1.src.rpm
checksum_type: sha256
description:
  This code is responsible for running a c/cpp build wrapped by Coverity - capturing the source and binary files involved
  and then using the available tools to deliver BDIO and signatures to Black Duck using a variety of tools and
  methodologies.



  C and CPP projects don't have a standard package manager or method for managing dependencies. It is therefore more
  difficult to create an accurate BOM for these projects. This leaves Software Composition Analysis tools fewer options
  than with other languages. The primary options which are available in this context are: file system signatures. Black
  Duck has a variety of old and new signatures which can be used to build a BOM. In order to effectively use signatures,
  the tool first needs to know which files to take signatures from. In the past SCA tools have pointed a scanner at a
  build directory, getting signatures from a subset of files within the directory sub-tree. The problem with this approach
  is that there are many environmental variables, parameters and switches provided to the build tools, which make
  reference to files outside of the build directory to include as part of the build. Further, there are, commonly, files
  within the build directory, which are not part of the build and can lead to false positives within the BOM.

  The new Black Duck C/CPP tool avoids the pitfalls described above by using a feature of Coverity called Build Capture.
  Coverity Build Capture, wraps your build, observing all invocations of compilers and linkers and storing the paths of
  all compiled source code, included header files and linked object files. These files are then matched using a variety of
  methods described in the section of this document called "The BOM".



  Debian, Redhat, Ubuntu, openSUSE, Fedora, CentOS, macOS, and Windows are supported.

  The signature scan and binary scan will be completed on all supported platforms as permitted by your Black Duck license.
  Any scan cli parameters can be used and passed to blackduck-c-cpp tool through the additional_sig_scan_args parameter.

  On Unix-like operating systems, a package manager scan will also be run. Since Windows doesn't have a supported package
  manager, blackduck-c-cpp scans run on Windows won't include the package manager scan and won't produce a BDIO file.
  Here, package manager scan refers to usage of O/S package managers such as yum, apt etc.



  Run ./cov-configure --list-compiler-types to get complete set of supported compilers

  Linkers supported: gcc, msvc.



  Minimum version of Black Duck required is 2020.10.0

  To install from pypi:

  ```
  pip install blackduck-c-cpp
  ```

  To install a specific version:

  ```
  pip install blackduck-c-cpp==2.0.0
  ```



  Prior to running your build, run any build specific configuration needed. Then the blackduck-c-cpp tool can either be
  configured using a .yaml file or with command line arguments.

  Here is a sample fully functional .yaml configuration: ardour-config.yaml

  ```
  build_cmd: ../waf build
  build_dir: /Users/theUser/myProject/ardour/build/
  skip_build: False
  verbose: True
  project_name: ardour_mac
  project_version: may-4-2021
  bd_url: https://...
  api_token: <token>
  insecure: False
  ```



  Black Duck API tokens are generated on a per-user basis. To scan to a new project and view the results, the user who
  generates the API token for blackduck-c-cpp must at minimum have the **Global Code Scanner**, **Global Project
  Viewer**, and **Project Creator** roles assigned. To scan to an existing project and view the results, the user must at
  minimum have the project
  assigned to their user, and have the **Project Code Scanner** role assigned. See Administration > Managing Black Duck
  user accounts > Understanding roles in the Black Duck Help documentation for more details on user roles. The Black Duck
  Help documentation is accessible through the Black Duck UI.

  To generate an API token:

  1. Go to the Black Duck UI and log in.
  2. From the user menu located on the top navigation bar, select My Access Tokens.
  3. Click Create New Token. The Create New Token dialog box appears.
  4. Enter a name, description (optional), and select the scope for this token (to use with blackduck-c-cpp, must be **
     read and write access**).
  5. Click Create. The Access Token Name dialog box appears with the access token.
  6. Copy the access token shown in the dialog box. This token can only be viewed here at this time. Once you close the
     dialog box, you cannot view the value of this token.



  Bazel is supported in Coverity starting in versions 2022.3.0+ and blackduck-c-cpp in versions 1.0.13+.

  To enable, use the `--bazel` switch (or set `bazel: True` in your yaml configuration file), but additional Coverity
  setup is required as described below.

  Bazel builds can be captured on the x86_64 versions of Windows, Linux, and macOS that are supported by Coverity
  Analysis.

  Compilers for Coverity analysis are supported, but all compilers must be accessible and runnable on the host system:
  Remote cross-platform builds are not supported.




  https://sig-product-docs.synopsys.com/bundle/coverity-docs/page/coverity-analysis/topics/building_with_bazel.html





  Like other Bazel integrations, the Coverity integration has an archive of rules to be used by the build.

  blackduck-c-cpp will attempt to automatically update this file as required if it hasn't already been modified by the
  user. If the automatic update fails, the failure will be logged and the user will need to complete the following steps
  manually.

  The WORKSPACE (or WORKSPACE.bazel) file defines the root of the Bazel project, and it needs to be modified to reference
  the Coverity integration. If you are supplying your own Coverity installation, the Coverity integration can be found in
  the Coverity Analysis installation at

  ```
  <Coverity Analysis installation path>/bazel/rules_coverity.tar.gz
  ```

  If you are using the mini package provided by blackduck-c-cpp, then by default the Coverity integration can be found in
  the Coverity Analysis installation at

  ```
  `<User home>/.synopsys/blackduck-c-cpp/cov-build-capture/bazel/rules_coverity.tar.gz`
  ```

  You can remove it from the installation and host it anywhere convenient.

  Assuming the integration archive is available on a network share at `/mnt/network-share/rules_coverity.tar.gz,` append
  the following snippet onto your WORKSPACE file:

  ```
  load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  http_archive(
      name="rules_coverity",
      urls=["file:///mnt/network-share/rules_coverity.tar.gz"],
  )


  load("@rules_coverity//coverity:repositories.bzl", "rules_coverity_toolchains")
  rules_coverity_toolchains()
  ```

  You can use different URLs, depending on whether the integration archive is available locally, on a file share, or
  through HTTP. The only part of the kit that is necessary for this is the integration archive, so it can be placed
  wherever needed, independently of the rest of the kit. Bazel can fetch from "file://", "http://" and "https://" URLs.
  The "urls" field is a list - multiple URLs can be specified, and fetching the integration from them will be attempted in
  order.

  Attention: If you:

  - are using Bazel 7 or a newer version, and

  - are adding Coverity to your Bazel integration in the WORKSPACE file, and

  - have Bazel modules enabled for other purposes,
  then probably you need to explicitly add dependencies to your MODULE.bazel file for use by the Coverity rules_cc and platforms fields. The versions that have been tested with Coverity are 0.0.9 for rules_cc and 0.0.5 for platforms; specifying newer or older versions might also work. The lines to add to MODULE.bazel are as follows:

  ```
  bazel_dep(name="rules_cc", version="0.0.9")
  bazel_dep(name="platforms", version="0.0.5")
  ```


  If you’re using Bazel 7 or a newer version, Coverity can be integrated using the MODULE.bazel file instead of the WORKSPACE file. The module file defines Bazel modules that should be used by your build. To do this, you must first either include the rules_coverity module in a registry you control, or use the cov-setup-bazel-registry tool to set up a local registry that contains that module; instructions on how to do this can be found in Bazel registry setup.

  To integrate Coverity into the MODULE.bazel file, just add the following line:

  bazel_dep(name="rules_coverity", version="2024.6.0")


  Once you have set up the WORKSPACE or MODULE.bazel files, you can run blackduck-c-cpp command with build command as bazel build //my-bazel-target.

  Example blackduck-c-cpp config file for bazel to build Google's open source abseil-cpp library (https://github.com/abseil/abseil-cpp)
  ```
  build_cmd: bazel build //absl/strings:strings
  build_dir: /apps/abseil/abseil-cpp/
  skip_build: False
  verbose: True
  project_name: abseil
  project_version: 1.0v
  bd_url: <bd_url>
  api_token: <api_token>
  set_coverity_mode: cov-build
  bazel: True
  ```







  Like other Bazel integrations, the Coverity integration has an archive of rules to be used by the build.

  blackduck-c-cpp will attempt to automatically update this file as required if it hasn't already been modified by the
  user. If the automatic update fails, the failure will be logged and the user will need to complete the following steps
  manually.

  The WORKSPACE (or WORKSPACE.bazel) file defines the root of the Bazel project, and it needs to be modified to reference
  the Coverity integration. If you are supplying your own Coverity installation, the Coverity integration can be found in
  the Coverity Analysis installation at

  ```
  <Coverity Analysis installation path>/bazel/rules_coverity.tar.gz
  ```

  If you are using the mini package provided by blackduck-c-cpp, then by default the Coverity integration can be found in
  the Coverity Analysis installation at

  ```
  `<User home>/.synopsys/blackduck-c-cpp/cov-build-capture/bazel/rules_coverity.tar.gz`
  ```

  You can remove it from the installation and host it anywhere convenient.

  Assuming the integration archive is available on a network share at `/mnt/network-share/rules_coverity.tar.gz,` append
  the following snippet onto your WORKSPACE file:

  ```
  load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  http_archive(
      name="rules_coverity",
      urls=["file:///mnt/network-share/rules_coverity.tar.gz"],
  )


  load("@rules_coverity//coverity:repositories.bzl", "rules_coverity_toolchains")
  rules_coverity_toolchains()
  ```

  You can use different URLs, depending on whether the integration archive is available locally, on a file share, or
  through HTTP. The only part of the kit that is necessary for this is the integration archive, so it can be placed
  wherever needed, independently of the rest of the kit. Bazel can fetch from "file://", "http://" and "https://" URLs.
  The "urls" field is a list - multiple URLs can be specified, and fetching the integration from them will be attempted in
  order.



  Unlike the WORKSPACE file, blackduck-c-cpp can't update the BUILD file automatically. This must be completed by the
  user.

  Bazel uses the BUILD (or BUILD.bazel) file to do the following:

  - Mark a package boundary
  - Declare what targets can be built in that package
  - Specify how to build those targets

  The Coverity-Bazel integration needs a new target added that depends on existing targets to generate a "build
  description" of all the build commands that would have been executed in the building of those targets. If you had,
  for example, a build with two separate targets that you wanted to capture, the BUILD file would start out looking
  something like this:

  ```
  load("@rules_cc//cc:defs.bzl", "cc_binary")​
  cc_binary(name="foo", srcs=["foo.cc"])
  cc_binary(name="bar", srcs=["bar.cc"])
  ```

  To capture the files (including link files) used in the building of the targets :foo and :bar (foo.cc and bar.cc,
  respectively), you would
  modify the BUILD file to be something like this:

  ```
  load("@rules_cc//cc:defs.bzl", "cc_binary")
  cc_binary(name="foo", srcs=["foo.cc"])
  cc_binary(name="bar", srcs=["bar.cc"])

  load("@rules_coverity//coverity:defs.bzl", "cov_enable_link", "cov_gen_script")
  cov_enable_link(
      name = "enable_link",
      build_setting_default = True,
  )
  cov_gen_script(name="coverity-target", deps=[":foo", ":bar"], enable_link = ":enable_link",)
  ```

  Here is an example using Google's open source abseil-cpp library (https://github.com/abseil/abseil-cpp):

  Before:

  ```
  package(default_visibility = ["//visibility:public"])

  licenses(["notice"])  # Apache 2.0


  exports_files([
      "AUTHORS",
      "LICENSE",
  ])
  ```

  After:

  ```
  package(default_visibility = ["//visibility:public"])

  licenses(["notice"])  # Apache 2.0


  exports_files([
      "AUTHORS",
      "LICENSE",
  ])

  load("@rules_coverity//coverity:defs.bzl", "cov_enable_link", "cov_gen_script")
  cov_enable_link(
      name = "enable_link",
      build_setting_default = True,
  )
  cov_gen_script(
      name="cov",
      deps = [
          "//absl/status:statusor",
          "//absl/status:status",
          "//absl/random:bit_gen_ref",
          "//absl/functional:bind_front",
          "//absl/flags:parse",
          "//absl/flags:usage",
          "//absl/flags:flag",
          "//absl/debugging:leak_check",
          "//absl/debugging:failure_signal_handler",
          "//absl/debugging:leak_check_disable",
          "//absl/container:node_hash_set",
          "//absl/container:hashtable_debug",
          "//absl/random:random",
          "//absl/random:seed_sequences",
          "//absl/random:seed_gen_exception",
          "//absl/random:distributions",
          "//absl/container:flat_hash_set",
          "//absl/types:any",
          "//absl/types:bad_any_cast",
          "//absl/container:btree",
          "//absl/types:compare",
          "//absl/cleanup:cleanup",
          "//absl/container:node_hash_map",
          "//absl/container:node_hash_policy",
          "//absl/flags:reflection",
          "//absl/container:flat_hash_map",
          "//absl/container:raw_hash_map",
          "//absl/container:raw_hash_set",
          "//absl/container:hashtablez_sampler",
          "//absl/container:hashtable_debug_hooks",
          "//absl/container:hash_policy_traits",
          "//absl/container:common",
          "//absl/container:hash_function_defaults",
          "//absl/strings:cord",
          "//absl/container:layout",
          "//absl/container:inlined_vector",
          "//absl/hash:hash",
          "//absl/types:variant",
          "//absl/types:bad_variant_access",
          "//absl/hash:city",
          "//absl/container:fixed_array",
          "//absl/container:compressed_tuple",
          "//absl/container:container_memory",
          "//absl/flags:marshalling",
          "//absl/strings:str_format",
          "//absl/numeric:representation",
          "//absl/functional:function_ref",
          "//absl/flags:config",
          "//absl/flags:commandlineflag",
          "//absl/types:optional",
          "//absl/types:bad_optional_access",
          "//absl/utility:utility",
          "//absl/synchronization:synchronization",
          "//absl/time:time",
          "//absl/debugging:symbolize",
          "//absl/strings:strings",
          "//absl/numeric:int128",
          "//absl/numeric:bits",
          "//absl/debugging:stacktrace",
          "//absl/types:span",
          "//absl/memory:memory",
          "//absl/algorithm:container",
          "//absl/meta:type_traits",
          "//absl/algorithm:algorithm",
      ],
      enable_link = ":enable_link",
  )
  ```



  Which Bazel actions are treated as build commands is determined by the mnemonic of the action. For now, the only
  mnemonics that are treated as a build commands by default are CppCompile, Javac and Compile. These are the mnemonics
  that the builtin cc_binary/cc_library rules, the builtin java_binary/java_library rules and the standard
  csharp_binary/csharp_library rules use for their compilation actions, respectively. If you have custom rules that
  generate actions that should be treated as build commands, modify the BUILD file again, extending from this:

  ```
  load("@rules_cc//cc:defs.bzl", "cc_binary")
  cc_binary(name="foo", srcs=["foo.cc"])
  cc_binary(name="bar", srcs=["bar.cc"])

  load("@rules_coverity//coverity:defs.bzl", "cov_gen_script")
  cov_gen_script(name="coverity-target", deps=[":foo", ":bar"])
  ```

  to something like the following:

  ```
  load("@rules_cc//cc:defs.bzl", "cc_binary")
  cc_binary(name="foo", srcs=["foo.cc"])
  cc_binary(name="bar", srcs=["bar.cc"])

  load(
      "@rules_coverity//coverity:defs.bzl",
      "cov_gen_script",
      "cov_compile_mnemonics"
      )
  cov_compile_mnemonics(
      name="extra_mnemonics",
      build_setting_default=["FirstMnemonic", "SecondMnemonic"]
      )
  cov_gen_script(
      name="coverity-target",
      deps=[":foo", ":bar"],
      extra_compile_mnemonics=":extra_mnemonics"
      )
  ```



  usage: blackduck-c-cpp [-h] [-c CONFIG] [-bc build_cmd] -d
  BUILD_DIR [-Cov coverity_root] [-Cd cov_output_dir] [-od output_dir] [-s [SKIP_BUILD]] [-v [verbose]] -proj PROJECT_NAME
  -vers PROJECT_VERSION [-Cl CODELOCATION_NAME] -bd bd_url [-a api_token] [-as additional_sig_scan_args] [-i [insecure]] [
  -f [force]] [-djs [DISABLE_BDIO_JSON_SPLITTER]] [-si SCAN_INTERVAL] [-jsl json_splitter_limit] [-bsfl bdio_split_max_file_entries] [-bscn bdio_split_max_chunk_nodes] [
  -dg [debug]] [-st [SKIP_TRANSITIVES]] [-sh [SKIP_INCLUDES]] [
  -sd [SKIP_DYNAMIC]] [-off [OFFLINE]] [-md modes] [-uo [USE_OFFLINE_FILES]] [-sc scan_cli_dir] [-Cc cov_configure_args] [-ac additional_coverity_params] [-es [EXPAND_SIG_FILES]] [-po PORT] [-ba [BAZEL]] [-pgn PROJECT_GROUP_NAME] [-pgd PROJECT_DESCRIPTION] [-scv set_coverity_mode] [-fpc force_pull_coverity_vers]

  ```
  options:
    -h, --help            show this help message and exit
    -c CONFIG, --config CONFIG
                          Configuration file path.
    -bc build_cmd, --build_cmd build_cmd
                          Command used to execute the build
    -d BUILD_DIR, --build_dir BUILD_DIR
                          Directory from which to run build
    -Cov coverity_root, --coverity_root coverity_root
                          Base directory for coverity. If not specified, blackduck-c-cpp downloads latest mini coverity package from GCP for authorized Black Duck customers
                          for Black Duck versions >= 2021.10. For downloading coverity package using GCP, you need to open connection toward *.googleapis.com:443. If you
                          don't have coverity package and your Black Duck version is < 2021.10, please contact sales team to get latest version of coverity package.
    -Cd cov_output_dir, --cov_output_dir cov_output_dir
                          Target directory for coverity output files.If not specified, defaults to user_home/.synopsys/blackduck-c-cpp/output/project_name
    -od output_dir, --output_dir output_dir
                          Target directory for blackduck-c-cpp output files.If not specified, defaults to user_home/.synopsys/blackduck-c-cpp/output/project_name.
                          output_dir should be outside of the build directory.
    -s [SKIP_BUILD], --skip_build [SKIP_BUILD]
                          Skip build and use previously generated build data. Make sure that your initial coverity wrapped build uses the --emit-link-units flag
    -v [verbose], --verbose [verbose]
                          Verbose mode selection
    -proj PROJECT_NAME, --project_name PROJECT_NAME
                          Black Duck project name
    -vers PROJECT_VERSION, --project_version PROJECT_VERSION
                          Black Duck project version
    -Cl CODELOCATION_NAME, --codelocation_name CODELOCATION_NAME
                          This controls the Black Duck's codelocation. The codelocation_name will overwrite any scans sent to the same codelocation_name, indicating that
                          this is a new scan of a previous code location. Use with care.
    -bd bd_url, --bd_url bd_url
                          Black Duck URL
    -a api_token, --api_token api_token
                          Black Duck API token.  Instead of specifying api_token value in command line or yaml file, use the BD_HUB_TOKEN environment variable to specify a Black Duck API token.
    -as additional_sig_scan_args, --additional_sig_scan_args additional_sig_scan_args
                          Any additional args to pass to the signature scanner. IndividualFileMatching is by default turned on. To pass multiple params, you can pass it like additional_sig_scan_args: '--snippet-matching --license-search'.
                          It accepts scan cli properties; Detect properties are not accepted here.
    -i [insecure], --insecure [insecure]
                          Disable SSL verification so self-signed Black Duck certs will be trusted
    -f [force], --force [force]
                          In case of GCP failure, force use of older version of Coverity (if present)
    -djs [DISABLE_BDIO_JSON_SPLITTER], --disable_bdio_json_splitter [DISABLE_BDIO_JSON_SPLITTER]
                          Disable the json splitter and always upload as a single scan. For using json/bdio splitter, dryrun is needed, so please run in offline mode first.
    -si SCAN_INTERVAL, --scan_interval SCAN_INTERVAL
                          Set the number of seconds to wait between scan uploads in case of multiple scans
    -jsl json_splitter_limit, --json_splitter_limit json_splitter_limit
                          Set the limit for a scan size in bytes. For using json/bdio splitter, dryrun is needed, so please run in offline mode first.
    -bsfl bdio_split_max_file_entries, --bdio_split_max_file_entries bdio_split_max_file_entries
                          Set the limit for maximum scan node entries per generated BDIO file
    -bscn bdio_split_max_chunk_nodes, --bdio_split_max_chunk_nodes bdio_split_max_chunk_nodes
                          Set the limit for maximum scan node entries per single bdio-entry file
    -dg [debug], --debug [debug]
                          Debug mode selection. Setting debug: True sends all the files we found to all matching types. By default, it will only send files not detected by
                          package manager to BDBA and Signature matching.
    -st [SKIP_TRANSITIVES], --skip_transitives [SKIP_TRANSITIVES]
                          Skipping all transitive dependencies
    -sh [SKIP_INCLUDES], --skip_includes [SKIP_INCLUDES]
                          Skipping all .h & .hpp files from all types of scan
    -sd [SKIP_DYNAMIC], --skip_dynamic [SKIP_DYNAMIC]
                          Skipping all dynamic (.so/.dll) files from all types of scan
    -off [OFFLINE], --offline [OFFLINE]
                          Store bdba and sig zip files, sig scan json, and raw_bdio.csv to disk if offline mode is true.
                          For scans over 5GB to use bdio/json splitter, please run in offline mode first.
                          scan_cli_dir should be specified when run in offline mode to generate dryrun files.
                          Once the dryrun files are generated, use_offline_files: True can be set to upload those to hub.
    -md modes, --modes modes
                          Comma separated list of modes to run - 'all'(default),'bdba','sig','pkg_mgr'
    -uo [USE_OFFLINE_FILES], --use_offline_files [USE_OFFLINE_FILES]
                          Use offline generated files for upload in online mode
    -sc scan_cli_dir, --scan_cli_dir scan_cli_dir
                          Scan cli directory. Ex: Providing scan_cli_dir as /home/../../Black_Duck_Scan_Installation/ instead of
                          /home/../../Black_Duck_Scan_Installation/scan.cli-2022.4.0/ works.
    -Cc cov_configure_args, --cov_configure_args cov_configure_args
                          Additional configuration commands to cov-configure for different compilers.
                          Inputs taken are of format {"compiler":"compiler-type"}.
                          There is a way to use coverity template configuration to reduce number of template compiler configurations with wildcards:
                          example: "--compiler *g++ --comptype gcc" for adding x86_64-pc-linux-gnu-g++ can be passed as cov_configure_args: {"*g++":"gcc"} in yaml file.
                          In command line, it should be passed in as: -Cc '{"compiler-1":"compiler-type-1","compiler-2":"compiler-type-2"}'. Example: -Cc '{"*g++":"gcc"}'
    -ac additional_coverity_params, --additional_coverity_params additional_coverity_params
                          Any additional args to pass to coverity build command. example: "--record-with-source"
    -es [EXPAND_SIG_FILES], --expand_sig_files [EXPAND_SIG_FILES]
                          Use expand_sig_files for creating exploded directory instead of zip in sig scanner mode
    -po PORT, --port PORT
                          Set a custom Black Duck port
    -ba [BAZEL], --bazel [BAZEL]
                          Use if this is a bazel build - make sure you have followed the setup instructions for Coverity
    -pgn PROJECT_GROUP_NAME, --project_group_name PROJECT_GROUP_NAME
                          This is same as --detect.project.group.name in detect. Sets the 'Project Group' to assign the project to. Must match exactly to an existing project
                          group on Black Duck.
    -pgd PROJECT_DESCRIPTION, --project_description PROJECT_DESCRIPTION
                          This is same as --detect.project.description in detect. If project description is specified, your project will be created with this description.
    -scv set_coverity_mode, --set_coverity_mode set_coverity_mode
                          specify coverity mode to 'cov-build' to force run with cov-build. cov-cli runs by default for coverity versions >= 2023.9 and cov-build for <
                          2023.9
    -fpc force_pull_coverity_vers, --force_pull_coverity_vers force_pull_coverity_vers
                          For linux platforms, force pull 2022.9 or latest version of coverity if not auto downloaded by blackduck-c-cpp correctly by specifying -'old' or
                          'latest' respectively
  ```



  Here's what changed:

  2.0.0 version uses cov-cli instead of cov-build by default. Coverity cli uses cov-build under the hood.
  It is a layer of automation on top of cov-build and other tools.
  Instead of the user having to figure out the correct cov-configure options,
  Coverity CLI guesses at the right options and runs the tools automatically.
  It doesn't always work correctly, so there are options to fix things where needed.
  You can also choose to run cov-build by setting following option in yaml file:
  set_coverity_mode: 'cov-build'

  In CentOS7, the latest version of glibc supported is 2.17. Starting with coverity build capture 2022.12.0, glibc_2.18 is
  a requirement.
  So, we try to auto-download an older version of Coverity, 2022.9, on linux platforms with glibc 2.17 or older.
  If blackduck-c-cpp doesn't auto-download Coverity, you can forcefully download an older version by specifying following
  parameter in yaml
  file:
  force_pull_coverity_vers: 'old'



  Once your blackduck-c-cpp tool is installed and configured as explained above, simply run the command:

  blackduck-c-cpp --config /Users/theUser/myProject/ardour-config.yaml

  To use snippet scanning, pass the snippet scanning parameters to the signature scanner using
  --additional_sig_scan_args <snippet scanning parameter(s)>. Synopsys recommends using --snippet-matching. See Scanning
  Components > Using the Signature Scanner > Running a component scan using the Signature Scanner command line in the
  Black Duck Help Guide for more details.

  To access the Black Duck server via a proxy, you must set a SCAN_CLI_OPTS environment variable prior to running the
  scan. See Scanning Components > Using the Signature Scanner > Accessing the Black Duck server via a proxy in the Black
  Duck Help Guide for details.



  Direct Dependencies - These are files which are being linked in to the built executable directly or header files
  included by source code as identified by Coverity Build Capture.
  Package Manager - The Package Manager of the Linux system is queried about the source of the files - if recognized,
  these are added to the BOM as "Direct Dependencies". Transitive Dependencies - These are files which are needed by the
  Direct Dependencies. LDD - LDD is used to List the files (Dynamic Dependencies) of the Direct Dependencies. These files
  are then used to query the package manager and results are added to the BOM as "Transitive Dependencies". Binary Matches
  BDBA - Any linked object files not identified by the package manager are sent to BDBA (Binary) for matching. Signature
  Matches - Any linked object and header files not identified by the package manager as well as all source code identified
  by Coverity Build Capture are then sent to the Knowledge Base for signature matching.



  This projects CI build is run through GitLab-CI Pipelines, within this repository. When changes are made on
  the `master` (default) branch, the version will be appended with `b` and the pipeline number as metadata. For `release/`
  branches, `-rc` will be appended to the version with the pipeline number as metadata, and this will be published to
  Artifactory. When changes are made to another branch (`dev/` or `bugfix/` for example), `dev` will be appended to the
  version with the pipeline number, and the commit hash will be appended as metadata.

  For example:

  * default branch: 1.0.0b3821+abcd1234
  * release branch: 1.0.0rc4820+abcd1234
  * dev branch: 1.0.0dev5293+abcd1234
  * release: 1.0.0

  Release jobs are also run through GitLab-CI Pipelines, when tagged as per below. The version will be uploaded to
  Artifactory at the end of the pipeline.



  To release this library, simply tag this repo with a tag of the format: `vMM.mm.ff` like `v1.0.1`. This version should
  match the version (minus the `v` in `setup.py`)

  Be sure to increment the version in `setup.py` to the next fix version, or minor/major version as necessary. Do not add
  any metadata or additional version information to the version, here.

  The specific set of steps is:

  - Ensure a full `python setup install` completes
  - Commit changes
  - Tag with `v##.##.##`, matching the version number in `setup.py`
  - Push the change log changes, and tag, to GitLab
  - Update the version number in `setup.py`
  - Commit version change and push to GitLab



  1. If BOM isn't capturing all expected components, what to do?

  Make sure you did a clean build. Run all clean commands and configure commands before running the blackduck-c-cpp tool
  with build command.
  Also, if you are using custom compilers, you have to configure it as follows:
  --cov_configure_args: {"gcc.cx.a.b-ac.mips64-linux":"gcc"} where "gcc.cx.a.b-ac.mips64-linux" is compiler and "gcc" is
  compiler type in yaml file.
  In command line, It can be set as -Cc '{"gcc.cx.a.b-ac.mips64-linux":"gcc"}'
  you can also set matchConfidenceThreshold to 0 in additional_sig_scan_args.

  2. How to run snippet scanning?

  Pass below command in your yaml file
  `additional_sig_scan_args: '--snippet-matching' `
  To run it from command line, example:
  `blackduck-c-cpp -bc "make" -d "/apps/cpuminer-2.5.1/" -s False -v True -proj "cpuminer-cmd" -vers 1.0 -bd "https:<bd_url>" -a "<api_token" -as ="--snippet-matching --copyright-search" -i False`

  3. Where can blackduck-c-cpp.log be found on the system?

  All output files will be in
  `user_home/.synopsys/blackduck-c-cpp/output/project_name`
  by default if --output_dir is not given. Else, All output files will be in output_dir.

  4. How to run blackduck-c-cpp?

  Run with config file where are arugments are set or through command line.
  Example:
  `blackduck-c-cpp -c /apps/../../cpuminer-config.yaml`
  or
  To run it from command line,:
  `blackduck-c-cpp -bc "make" -d "/apps/cpuminer-2.5.1/" -s False -proj "cpuminer-cmd" -vers 1.0 -bd "https:<bd_url>" -a "<api_token" -i False`

  5. blackduck-c-cpp invokes BDBA. Do we need to be licensed for it? What happens if I don't have BDBA?

  It throws `BDBA is not licensed for use with the current Black Duck instance -- will not be used` and goes to next
  matching type

  6. Running blackduck-c-cpp throwing import errors

  Check if you installed blackduck-c-cpp from testpypi. If so, please uninstall and install from pypi for dependencies to
  be automatically installed.
  If you still see import errors, There may be some issues with multiple installations.
  Try to create a virtual environment with python >= 3.7 version. Uninstall blackduck-c-cpp outside virtual environment
  and install blackduck-c-cpp inside virtual env. Otherwise, it may be looking at wrong installation path (Can be seen in
  stacktrace)
  In linux environment:

  ```
  python3 -m venv venv
  source venv/bin/activate
  pip3 install blackduck-c-cpp
  ```

  7. Where to download coverity mini package?

  If coverity_root is not specified, blackduck-c-cpp automatically downloads latest mini coverity package from GCP for
  authorized Black Duck users for Black Duck versions >= 2021.10.
  For downloading coverity package using GCP, you need to open connection toward *.googleapis.com:443.
  If you don't have coverity package and your Black Duck version is < 2021.10, please contact sales team to get latest
  version of coverity package.

  8. BDBA upload throws an error as follows:

  ```
      raise RemoteDisconnected("Remote end closed connection without"
  http.client.RemoteDisconnected: Remote end closed connection without response
  .......
  requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
  ```

  Check your requests-toolbelt library version - `pip show requests-toolbelt`. If you have older version than 0.9.1,
  install 0.9.1 version and try again.

  9. Windows build - The blackduck-c-cpp process is stuck during a phase

  Try giving a keyboard input by pressing enter/any other key if you still have the command prompt open where stuck. We
  noticed in Windows that programs sometimes get stuck when we click into the console and enter the "selection" mode to
  highlight/copy text from it.

  10. Error:

  ```
  headers.pop('Accept')
  KeyError: 'Accept'
  ```

  Do `pip show blackduck`. If you have version < 1.0.4, install 1.0.4 version and try again.

  11. Windows error - `MemoryError`

  Make sure you have the correct installation of python (64bit vs 32 bit) for your operating system.

  12. Spaces in the paths to Coverity analysis

  ` /apps/.../cov\ 2021\ <vers>/bin/cov-build`
  Coverity needs to be located in a directory that doesn't have a space in it.

  13. Signature scan is performed on zip. Adding other sig scan arguments are not working. What to do?

  Set `expand_sig_files: True`

  14. How to uninstall blackduck-c-cpp?

  pip uninstall blackduck-c-cpp

  15. I already have a coverity build for my project. Can I use the tool?

  Yes, you can set --cov_output_dir to the path where your coverity output files reside. (build-log.txt and emit
  directory), then set `skip_build: True`.

  16. How to see more logging information for troubleshooting?

  You can see the blackduck-c-cpp.log file in output_dir  (OR) set verbose: True to see if it reveals any issues in
  stdout.

  17. I have custom compilers. What to do?

  If you are using custom compilers, you have to configure it as follows:
  cov_configure_args: {"gcc.cx.a.b-ac.mips64-linux":"gcc"} where "gcc.cx.a.b-ac.mips64-linux" is compiler and "gcc" is
  compiler type in yaml file. In command line, It can be set as -Cc '{"gcc.cx.a.b-ac.mips64-linux":"gcc"}'

  18. What is debug mode?

  Setting `debug: True` sends all the files we found to all matching types. By default, it will only send files not
  detected by package manager to BDBA and Signature matching.

  19. How to run a specific matching type?

  You can select modes: sig, bdba, pkg_mgr in config file to run specific ones.

  20. I already have run blackduck-c-cpp once. I ran in offline mode. I want to run in online mode. Do I need to do the
      full build again?

  No, you can set `use_offline_files: True` and `skip_build: True` to use already stored files and just upload it to Black
  Duck.

  21. I already have run blackduck-c-cpp once. I got a few errors after build is finished which are fixed now. I want to
      run again. Do I need to do the full build again?

  No, you can set `skip_build: True` to skip build process.

  22. How to exclude full directory in signature scan method?
      signature scanning files are all placed under ..\sig_scan\sig_files\ directory.
      Example: C:\Users\kakarlas.SYNOPSYS\.synopsys\blackduck-c-cpp\output\godot-windows-jul11-2\sig_scan\sig_files\
      It has below paths in sig_files folder:
      C:\Users\kakarlas.SYNOPSYS\.synopsys\blackduck-c-cpp\output\godot-windows-jul11-2\sig_scan\sig_files\Users\
      C:\Users\kakarlas.SYNOPSYS\.synopsys\blackduck-c-cpp\output\godot-windows-jul11-2\sig_scan\sig_files\Program/ Files\
      C:\Users\kakarlas.SYNOPSYS\.synopsys\blackduck-c-cpp\output\godot-windows-jul11-2\sig_scan\sig_files\godot\
      Pass this in excludes.txt:
      /Users/
      /Program\ Files/
      In yaml file: add below command:
      additional_sig_scan_args: '--snippet-matching --exclude-from C:\Users\kakarlas.SYNOPSYS\Desktop\excludes.txt'

  23. should it be additional_sig_scan_args: '--individualFileMatching=BINARY' when want to use "Binary" value for
      individualFileMatching?
      individualFileMatching is turned on by default on blackduck-c-cpp tool and can't be turned off.

  24. bdio splitter fails to split one part when uploading to hub. How to fix it?
      Splitter operates on the node numbers, not size, so when a dataset contains large archives, it performs suboptimally.
      There are parameters to tweak it - bdio_split_max_file_entries and bdio_split_max_chunk_nodes.
      bdio_split_max_file_entries= 100000 and bdio_split_max_chunk_nodes=3000 by default.
      If default values don't work, try reducing bdio_split_max_file_entries to about 80000 and see if the file size drops closer to 5GB.


pkgId: 9011c8d8bb390bd63ecb42026e89a4364cde13311414916f6011079927f28158
name: python-blackdynamite
arch: src
version: 1.0.9
epoch: 0
release: 1
summary: Scientific Parametric Study Tool
url: https://gitlab.com/ganciaux/blackdynamite
rpm_license: GPL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackdynamite-1.0.9-1.src.rpm
checksum_type: sha256
description:
  study: bd_study
  ```


  The first thing to do is to list all the parameters characterizing
  a specific case. These parameters can
  be of simple scalar types (e.g. string, integers, floats), however no
  vectorial quantity can be considered as an input parameter.
  It describes the `Job` pattern of the study.
  This must be defined in a section in the the
  [bd.yaml](https://gitlab.com/ganciaux/blackdynamite/-/blob/master/example/bd.yaml) file.
  For instance a three parameter space can be declared as:
  ```yaml
  job:
    param1: float
    param2: float
    param3: str
  ```
  By default there is one more entry to every job: its unique `id`.

  Aside from the jobs, a run will represent a particular realisation (computation)
  of a job. For instance, the run will contain information of the machine
  it was run on, the executable version, or the number of processors employed.
  For instance creating the run pattern can be done with:
  ```yaml
  run:
    compiler: str
  ```
  By default there are entries created for the user:
  - id: the id of the run
  - machine_name: the name of the machine where the run must be executed
  - nproc: number of processors used to perform the computation (default: 1)
  - run_path: the directory where the run will be created and launched
  - job_id (integer): the ID of the running job
  - state (str): the current state of the run (`CREATED`, `FINISHED`, `ERROR`)
  - run_name (string): the name of the run (usually a name is given to a collection of runs, at creation)
  - start_time (datetime): time when the run started
  - last_step_time (datetime): last time a quantity was pushed to the database

  Then you have to request for the creation of the database which can be done
  with a simple command:
  ```bash
  canYouDigIt init --truerun
  ```
  As mentioned, all BlackDynamite
  scripts inherit from the parsing system. So that when needing to launch
  one of these codes, you can always claim for the valid keywords:
  ```bash
  canYouDigIt init --help
  usage: canYouDigIt [--study STUDY] [--host HOST] [--port PORT] [--user USER] [--password PASSWORD] [--bdconf BDCONF] [--truerun] [--constraints CONSTRAINTS]
                     [--binary_operator BINARY_OPERATOR] [--list_parameters] [--yes] [--logging] [--help]
  createDB
  General:
    --logging             Activate the file logging system (default: False)
    --help                Activate the file logging system (default: False)
  BDParser:
    --study STUDY         Specify the study from the BlackDynamite database. This refers to the schemas in PostgreSQL language (default: None)
    --host HOST           Specify data base server address (default: None)
    --port PORT           Specify data base server port (default: None)
    --user USER           Specify user name to connect to data base server (default: tarantino)
    --password PASSWORD   Provides the password (default: None)
    --bdconf BDCONF       Path to a BlackDynamite file (*.bd) configuring current options (default: None)
    --truerun             Set this flag if you want to truly perform the action on base. If not set all action are mainly dryrun (default: False)
    --constraints CONSTRAINTS
                          This allows to constraint run/job selections by properties (default: None)
    --binary_operator BINARY_OPERATOR
                          Set the default binary operator to make requests to database (default: and)
    --list_parameters     Request to list the possible job/run parameters (default: False)
    --yes                 Answer all questions to yes (default: False)
  ```
  An important point is that most of the actions are only applied
  when the `truerun` flag is set.

  The goal of the parametric study is to explore a subpart
  of the parametric space. We need to create jobs that are
  the points to explore.
  We need to describe the desired set of jobs, to be explored.
  This is done in the YAML file describing the study, under the
  section `job_space`. For instance it could be:
  ```yaml
  job_space:
    param1: 10
    param2: [3.14, 1., 2.]
    param3: 'toto'
  ```
  The actual insertion of jobs can be done with the command:
  ```python
  canYouDigIt jobs create --truerun
  ```
  You can control the created jobs with:
  ```python
  canYouDigIt jobs info
  ```
  In the case of our [example](https://gitlab.com/ganciaux/blackdynamite/-/tree/master/example), 3 jobs should be created
  as a range of values for the second parameter was provided.

  At this point the jobs are in the database. You need to create runs
  that will precise the conditions of the realization of the jobs,
  by giving the value of the run space.
  This is specified in the YAML file under the section run_space. For instance
  with:
  ```yaml
  run_space:
    compiler: 'gcc'
  ```
  The default parameters for runs will then be automatically
  included in the parameters for the not provided ones (e.g. `state`).
  A run now specify what action to perform to realize the job.
  Therefore, one script must be provided as an entry point to each run execution.
  This will be given in the YAML file as the `exec_file`. For instance from the
  [example](https://gitlab.com/ganciaux/blackdynamite/-/tree/master/example)
  a bash script is the entry point and provided as follows:
  ```yaml
  exec_file: launch.sh
  ```
  Usually, an end-user has a script(s) and configuration files
  that he wishes to link to the run.
  This can be done with:
  ```yaml
  config_files:
    - config.txt
    - script.py
  ```
  Finally, we have to create Run objects and attach them to jobs,
  which is done with the command:
  ```bash
  canYouDigIt runs create --truerun
  ```
  After that, all created runs should be present in the database in the state
  `CREATED`, ready to be launched. This can be controled with the command:
  ```bash
  canYouDigIt runs info
  ```

  `BlackDynamite` will replace specific text marks in the registered files
  with the values from the job and run particular point. A precise syntax is
  expected for `BlackDynamite` to recognize a replacement to be performed.
  For instance:
  ```
  echo __BLACKDYNAMITE__param1__
  ```
  shall be replaced by the value of `param1` parameter at the run creation.
  As an additional example, the script `launch.sh` taken
  from the [example](https://gitlab.com/ganciaux/blackdynamite/-/tree/master/example) has lines such as:
  ```
  echo 'here is the job'
  echo __BLACKDYNAMITE__id__
  echo __BLACKDYNAMITE__param1__
  echo __BLACKDYNAMITE__param2__
  echo __BLACKDYNAMITE__param3__
  ```

  In a python program, one can benefit from the possibilities of `Python` to
  get a handle object on the current job and run.
  This will also allow to push produced data to the database.
  This is done by the simplified commands:
  ```python

  import BlackDynamite as BD

  myrun, myjob = BD.getRunFromScript()
  ```
  In order to have time entries for runs, the functions `start` and `finish`
  need to be called:
  ```python
  myrun.start()

  myrun.finish()
  ```
  Finally, to push data directly to the database, one can use
  `pushVectorQuantity` and/or `pushScalarQuantity`, attached to
  meaurable `quantities`:
  ```python

  myrun.pushVectorQuantity(vector, step, "quantity_id")

  myrun.pushScalarQuantity(scalar, step, "quantity_id")
  ```

  Once the runs are created, they can be launched with a command like
  ```
  canYouDigIt runs launch --truerun
  ```
  During and after the run the status can be controlled, once again, with:
  ```bash
  canYouDigIt runs info
  ```
  For detailed information on a specific run:
  ```bash
  canYouDigIt runs info --run_id RUN_ID_NUMBER
  ```
  in order to be placed in the context of a specific run:
  ```bash
  canYouDigIt runs info --run_id RUN_ID_NUMBER --enter
  ```
  to execute a specific command
  ```bash
  canYouDigIt runs info --exec COMMAND
  ```
  and applied for a specific run:
  ```bash
  canYouDigIt runs info --run_id RUN_ID_NUMBER --exec COMMAND
  ```


  All the previous commands may be applied to a subset of runs/jobs.
  In order to select them one should place constraints, provided by
  the option `--constraint`.
  For instance, listing the runs constraining parameters
  labeled `param1` and `param2` could be made with:
  ```bash
  canYouDigIt runs info --constraint 'param1 > 1, param2 = 2'
  ```
  In the exceptional case where parameters of jobs and runs would bear the same name
  (you should avoid to do that), one can disambiguate the situation with:
  ```bash
  canYouDigIt runs info --constraint 'jobs.id > 1, runs.id = 2'
  ```

  Sometimes it can be necessary to re-launch a set of runs. Sometimes it
  can be necessary to delete a run. In order to reset some runs,
  making them ready to relaunch, one should use the following:
  ```bash
  canYouDigIt runs clean --constraint 'jobs.id > 1, runs.id = 2' --truerun
  ```
  To completely delete them:
  ```bash
  canYouDigIt runs clean --constraint 'jobs.id > 1, runs.id = 2' --delete --truerun
  ```

  Rarely it can be necessary to manually change a set of runs. For instance changing the state of a set of runs can be done with:
  ```bash
  canYouDigIt runs update --truerun state = toto
  ```

  For starting the exploration of the collected data, and thus producing graphs,
  the `plot`command can be employed. While tunable, it cannot produce any type of graphs. However, for quick exploration of the data, one could do:
  ```bash
  canYouDigIt runs plot --quantity ekin --legend "%r.id" --marker o
  ```

  Under Construction

  Under construction...


pkgId: b91d04f1312bf05635c3616e02833773391671a7a42c544e2d5d32f4de34e5b4
name: python-blackhc.project
arch: src
version: 7.0.0
epoch: 0
release: 1
summary: Notebook setup code
url: https://github.com/blackhc/notebook_setup
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackhc.project-7.0.0-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/BlackHC/notebook_setup.svg?branch=master)](https://travis-ci.org/BlackHC/notebook_setup)

  Idea is to
  ```
  import blackhc.notebook
  ```
  and get someuseful stuff in your jupyter notebooks.

  Right now 'useful stuff' is:

  * finds the project root and changes directory to that;
  * adds `$project_root/src` to the Python paths;
  * load the autoreload extension and set its mode to 2.



  To install using pip, use:

  ```
  pip install blackhc.notebook
  ```

  To run the tests, use:

  ```
  python setup.py test
  ```



  ```
  pip install build twine
  ```

  ```
  python -m build
  ```

  ```
  twine upload dist/*
  ```


pkgId: 81e8fe9871214fa6e7f203f54f4d079330174b6e8e804797c6286be0d28156c7
name: python-blackjack-gui
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: A game of Blackjack with graphical user interface.
url: https://github.com/tukiains/blackjack-gui
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackjack-gui-0.3.1-1.src.rpm
checksum_type: sha256
description:
  ![](https://github.com/tukiains/blackjack-gui/workflows/tests/badge.svg)
  [![Downloads](https://pepy.tech/badge/blackjack-gui)](https://pepy.tech/project/blackjack-gui)

  Single-player Blackjack including GUI and CLI interfaces, written in Python. Can be used to simulate games with or without card counting
  and to practise basic strategy.

  <img src="https://github.com/tukiains/blackjack-gui/blob/main/blackjack_gui/images/bj-shot.png?raw=true" alt="" width="600"/>


  `blackjack-gui` requires Python 3.8 or newer and uses [tkinter](https://en.wikipedia.org/wiki/Tkinter). Make sure it's installed in your system:
  ```
  $ sudo apt install python3-tk
  ```
  or similar (otherwise, you'll see `ModuleNotFoundError: No module named 'tkinter'`).

  Then:
  ```
  $ python3 -m venv venv
  $ source venv/bin/activate
  $ pip3 install blackjack-gui
  ```




  ```
  blackjack [OPTION...]
  ```


  ```
  blackjack --gui=False [OPTION...]
  ```



  | Name             | Default | CLI only | Description                                                                                 |
  |:-----------------|:--------|:---------|:--------------------------------------------------------------------------------------------|
  | `--stack`        | 1000    |          | Initial stack.                                                                              |
  | `--bet`          | 1       |          | Initial bet size.                                                                           |
  | `--n_games`      | 10      | x        | Number of rounds to be played.                                                              |
  | `--ai`           | False   | x        | If True, computer plays instead of you.                                                     |
  | `--count`        | False   | x        | If True, `ai` uses card counting.                                                           |
  | `--loglevel`     | DEBUG   | x        | Adjust amount of logging: DEBUG or INFO.                                                    |
  | `--cards`        |         |          | Determine the first player cards, e.g. `--cards=A,8,K`. Shuffles the shoe after every hand. |
  | `--dealer_cards` |         |          | Determine the first dealer cards. Useful for testing.                                       |



  Open the GUI version:
  ```
  $ blackjack
  ```

  With the default settings, play 10 rounds of Blackjack without GUI:
  ```
  $ blackjack --gui=False
  ```

  Let the computer play perfect basic game and use card counting technique to bring down the house:
  ```
  $ blackjack --n_games=100000 --ai=True --count=True --loglevel=INFO --gui=False
  ```

  Simulate soft 19 starting hand only:
  ```
  $ blackjack --n_games=10000 --ai=True --loglevel=INFO --gui=False --cards=A,8
  ```


  Blackjack rules vary depending on the casino. In this application they follow: https://casinohelsinki.fi/en/games/blackjack-eng/, i.e.:

  * 6 decs
  * Blackjack pays 3 to 2
  * Dealer must stand on soft 17
  * Any two cards can be doubled
  * Max. 4 hands can be achieved by splitting
  * Aces can be split but they receive only one extra card
  * Doubling after splitting is allowed
  * Surrender is allowed but not against Ace


  <img src="https://raw.githubusercontent.com/tukiains/blackjack-gui/main/blackjack_gui/images/chart.png" alt="" width="400"/>
  <img src="https://raw.githubusercontent.com/tukiains/blackjack-gui/main/blackjack_gui/images/chart-symbols.png" alt="" width="258"/>

  * Note that 16 vs 10 with 3 or more cards = Stay


  Install `blackjack-gui` from GitHub and `pytest`:
  ```
  $ git clone https://github.com/tukiains/blackjack-gui
  $ cd blackjack-gui/
  $ python3 -m venv venv
  $ source venv/bin/activate
  $ pip3 install .
  $ pip3 install pytest
  ```
  Run unit and integration tests:
  ```
  $ pytest-3 tests/unit.py
  $ pytest-3 tests/integration.py
  ```


  * Card images taken from [here](https://code.google.com/archive/p/vector-playing-cards/).


  MIT


pkgId: 967e01fa8316688c92b7e8c40366b8083bb83e05745d3bb18e0dd921785ca3f9
name: python-blackjack-gui
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: A game of Blackjack with graphical user interface.
url: https://github.com/tukiains/blackjack-gui
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackjack-gui-1.0.1-1.src.rpm
checksum_type: sha256
description:
  ![](https://github.com/tukiains/blackjack-gui/workflows/tests/badge.svg)
  [![Downloads](https://pepy.tech/badge/blackjack-gui)](https://pepy.tech/project/blackjack-gui)

  Single-player Blackjack including GUI and CLI interfaces, written in Python. Can be used to simulate games with or without card counting
  and to practise basic strategy.

  <img src="https://github.com/tukiains/blackjack-gui/blob/main/blackjack_gui/images/bj-shot.png?raw=true" alt="" width="600"/>



  `blackjack-gui` requires Python 3.8 or newer and uses [tkinter](https://en.wikipedia.org/wiki/Tkinter). Make sure it's installed in your system:

  ```
  $ sudo apt install python3-tk
  ```

  or similar (otherwise, you'll see `ModuleNotFoundError: No module named 'tkinter'`).

  Then:

  ```
  $ python3 -m venv venv
  $ source venv/bin/activate
  $ pip3 install blackjack-gui
  ```





  ```
  blackjack [OPTION...]
  ```



  ```
  blackjack --gui=False [OPTION...]
  ```



  | Name             | Default | CLI only | Description                                                                                 |
  | :--------------- | :------ | :------- | :------------------------------------------------------------------------------------------ |
  | `--stack`        | 1000    |          | Initial stack.                                                                              |
  | `--bet`          | 1       |          | Initial bet size.                                                                           |
  | `--n_games`      | 10      | x        | Number of rounds to be played.                                                              |
  | `--ai`           | False   | x        | If True, computer plays instead of you.                                                     |
  | `--count`        | False   | x        | If True, `ai` uses card counting.                                                           |
  | `--loglevel`     | DEBUG   | x        | Adjust amount of logging: DEBUG or INFO.                                                    |
  | `--cards`        |         |          | Determine the first player cards, e.g. `--cards=A,8,K`. Shuffles the shoe after every hand. |
  | `--dealer_cards` |         |          | Determine the first dealer cards. Useful for testing.                                       |



  Open the GUI version:

  ```
  $ blackjack
  ```

  With the default settings, play 10 rounds of Blackjack without GUI:

  ```
  $ blackjack --gui=False
  ```

  Let the computer play perfect basic game and use card counting technique to bring down the house:

  ```
  $ blackjack --n_games=100000 --ai=True --count=True --loglevel=INFO --gui=False
  ```

  Simulate soft 19 starting hand only:

  ```
  $ blackjack --n_games=10000 --ai=True --loglevel=INFO --gui=False --cards=A,8
  ```



  Blackjack rules vary depending on the casino. In this application they follow the rules of Casino Helsinki,
  explained in Finnish [here](http://www.rahapeliopas.fi/kasinopelit/blackjack/), i.e.:

  - 6 decs
  - Blackjack pays 3 to 2
  - Dealer must stand on soft 17
  - Any two cards can be doubled
  - Max. 4 hands can be achieved by splitting
  - Aces can be split but they receive only one extra card
  - Doubling after splitting is allowed
  - Surrender is allowed but not against Ace
  - A 7-7-7 with the first three cards (not in a split game) pays 3 to 1 directly



  <img src="https://raw.githubusercontent.com/tukiains/blackjack-gui/main/blackjack_gui/images/chart.png" alt="" width="400"/>
  <img src="https://raw.githubusercontent.com/tukiains/blackjack-gui/main/blackjack_gui/images/chart-symbols.png" alt="" width="258"/>

  - Note that 16 vs 10 with 3 or more cards = Stay



  Install `blackjack-gui` with dev-dependencies from GitHub:

  ```sh
  git clone https://github.com/tukiains/blackjack-gui
  cd blackjack-gui/
  python3 -m venv venv
  source venv/bin/activate
  pip3 install --upgrade pip
  pip3 install .[dev,test]
  pre-commit install
  ```

  Run unit and integration tests:

  ```sh
  pytest tests/unit.py
  pytest tests/integration.py
  ```

  Run `pre-commit` checks:

  ```
  pre-commit run --all
  ```



  - Card images taken from [here](https://code.google.com/archive/p/vector-playing-cards/).



  MIT


pkgId: ab7232260477fd0603e0e9342fd42bc3d29fc40185fa133ea4cad5e8ba26d6ca
name: python-blackjax
arch: src
version: 1.2.4
epoch: 0
release: 1
summary: Flexible and fast sampling in Python
url: https://pypi.org/project/blackjax/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackjax-1.2.4-1.src.rpm
checksum_type: sha256
description:
  ![Continuous integration](https://github.com/blackjax-devs/blackjax/actions/workflows/test.yml/badge.svg)
  ![codecov](https://codecov.io/gh/blackjax-devs/blackjax/branch/main/graph/badge.svg)
  ![PyPI version](https://img.shields.io/pypi/v/blackjax)


  ![BlackJAX animation: sampling BlackJAX with BlackJAX](./docs/examples/scatter.gif)



  BlackJAX is a library of samplers for [JAX](https://github.com/google/jax) that
  works on CPU as well as GPU.

  It is *not* a probabilistic programming library. However it integrates really
  well with PPLs as long as they can provide a (potentially unnormalized)
  log-probability density function compatible with JAX.



  BlackJAX should appeal to those who:
  - Have a logpdf and just need a sampler;
  - Need more than a general-purpose sampler;
  - Want to sample on GPU;
  - Want to build upon robust elementary blocks for their research;
  - Are building a probabilistic programming language;
  - Want to learn how sampling algorithms work.





  You can install BlackJAX using `pip`:

  ```bash
  pip install blackjax
  ```

  or via conda-forge:

  ```bash
  conda install -c conda-forge blackjax
  ```

  BlackJAX is written in pure Python but depends on XLA via JAX. By default, the
  version of JAX that will be installed along with BlackJAX will make your code
  run on CPU only. **If you want to use BlackJAX on GPU/TPU** we recommend you follow
  [these instructions](https://github.com/google/jax#installation) to install JAX
  with the relevant hardware acceleration support.



  Let us look at a simple self-contained example sampling with NUTS:

  ```python
  import jax
  import jax.numpy as jnp
  import jax.scipy.stats as stats
  import numpy as np

  import blackjax

  observed = np.random.normal(10, 20, size=1_000)
  def logdensity_fn(x):
      logpdf = stats.norm.logpdf(observed, x["loc"], x["scale"])
      return jnp.sum(logpdf)


  step_size = 1e-3
  inverse_mass_matrix = jnp.array([1., 1.])
  nuts = blackjax.nuts(logdensity_fn, step_size, inverse_mass_matrix)


  initial_position = {"loc": 1., "scale": 2.}
  state = nuts.init(initial_position)


  rng_key = jax.random.key(0)
  step = jax.jit(nuts.step)
  for i in range(100):
      nuts_key = jax.random.fold_in(rng_key, i)
      state, _ = step(nuts_key, state)
  ```

  See [the documentation](https://blackjax-devs.github.io/blackjax/index.html) for more examples of how to use the library: how to write inference loops for one or several chains, how to use the Stan warmup, etc.





  BlackJAX bridges the gap between "one liner" frameworks and modular, customizable
  libraries.

  Users can import the library and interact with robust, well-tested and performant
  samplers with a few lines of code. These samplers are aimed at PPL developers,
  or people who have a logpdf and just need a sampler that works.

  But the true strength of BlackJAX lies in its internals and how they can be used
  to experiment quickly on existing or new sampling schemes. This lower level
  exposes the building blocks of inference algorithms: integrators, proposal,
  momentum generators, etc and makes it easy to combine them to build new
  algorithms. It provides an opportunity to accelerate research on sampling
  algorithms by providing robust, performant and reusable code.



  Sampling algorithms are too often integrated into PPLs and not decoupled from
  the rest of the framework, making them hard to use for people who do not need
  the modeling language to build their logpdf. Their implementation is most of
  the time monolithic and it is impossible to reuse parts of the algorithm to
  build custom kernels. BlackJAX solves both problems.



  BlackJAX allows to build arbitrarily complex algorithms because it is built
  around a very general pattern. Everything that takes a state and returns a state
  is a transition kernel, and is implemented as:

  ```python
  new_state, info =  kernel(rng_key, state)
  ```

  kernels are stateless functions and all follow the same API; state and
  information related to the transition are returned separately. They can thus be
  easily composed and exchanged. We specialize these kernels by closure instead of
  passing parameters.



  Please follow our [short guide](https://github.com/blackjax-devs/blackjax/blob/main/CONTRIBUTING.md).



  To cite this repository:

  ```
  @misc{cabezas2024blackjax,
        title={BlackJAX: Composable {B}ayesian inference in {JAX}},
        author={Alberto Cabezas and Adrien Corenflos and Junpeng Lao and Rémi Louf},
        year={2024},
        eprint={2402.10797},
        archivePrefix={arXiv},
        primaryClass={cs.MS}
  }
  ```
  In the above bibtex entry, names are in alphabetical order, the version number should be the last tag on the `main` branch.



  Some details of the NUTS implementation were largely inspired by
  [Numpyro](https://github.com/pyro-ppl/numpyro)'s.


pkgId: 843aad5c0b5339808235cd9ad3e3c4c7bf3129f554a88e31decfb7b4518f87c1
name: python-blackmarblepy
arch: src
version: 2024.8.1
epoch: 0
release: 1
summary: Georeferenced Rasters of Nighttime Lights from NASA Black Marble data
url: https://worldbank.github.io/blackmarblepy
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackmarblepy-2024.8.1-1.src.rpm
checksum_type: sha256
description:
  [![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
  [![PyPI version](https://badge.fury.io/py/blackmarblepy.svg)](https://badge.fury.io/py/blackmarblepy)
  [![docs](https://github.com/worldbank/blackmarblepy/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/worldbank/blackmarblepy/actions/workflows/gh-pages.yml)
  [![tests](https://github.com/worldbank/blackmarblepy/actions/workflows/tests.yml/badge.svg)](https://github.com/worldbank/blackmarblepy/actions/workflows/tests.yml)
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/worldbank/blackmarblepy/main.svg)](https://results.pre-commit.ci/latest/github/worldbank/blackmarblepy/main)
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10667907.svg)](https://zenodo.org/doi/10.5281/zenodo.10667907)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/worldbank/blackmarblepy/blob/main/notebooks/blackmarblepy.ipynb)
  [![Downloads](https://static.pepy.tech/badge/blackmarblepy)](https://pepy.tech/project/blackmarblepy)
  [![GitHub Repo stars](https://img.shields.io/github/stars/worldbank/blackmarblepy)](https://github.com/worldbank/blackmarblepy)

  **BlackMarblePy** is a Python package that provides a simple way to use nighttime lights data from NASA's Black Marble project. [Black Marble](https://blackmarble.gsfc.nasa.gov) is a [NASA Earth Science Data Systems (ESDS)](https://www.earthdata.nasa.gov) project that provides a product suite of daily, monthly and yearly global [nighttime lights](https://www.earthdata.nasa.gov/learn/backgrounders/nighttime-lights). This package automates the process of downloading all relevant tiles from the [NASA LAADS DAAC](https://www.earthdata.nasa.gov/eosdis/daacs/laads) to cover a region of interest, converting the raw files (in HDF5 format), to georeferenced rasters, and mosaicking rasters together when needed.



  - Download *daily*, *monthly*, and *yearly* nighttime lights data for user-specified **region of interest** and **time**.
  - Parallel downloading for faster data retrieval and automatic retry mechanism for handling network errors.
  - Access [NASA Black Marble](https://blackmarble.gsfc.nasa.gov) as a [xarray.Dataset](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html)
    - Integrated data visualization with customization options
      - Choose between various plot types, including bar charts, line graphs, and heatmaps.
      - Customize plot appearance with color palettes, axes labels, titles, and legends.
      - Save visualizations as high-resolution images for presentations or reports.
    - Perform time series analysis on nighttime lights data.
      - Calculate zonal statistics like mean and sum.
      - Plot time series of nighttime lights data.



  The [**BlackMarblePy**](https://pypi.org/project/blackmarblepy) library allows you to interact with and manipulate data from NASA's Black Marble, which provides global nighttime lights data. Below is a guide on how to use the key functionalities of the library.



  **BlackMarblePy** is available on [PyPI](https://pypi.org) as [blackmarblepy](https://pypi.org/project/blackmarblepy) and can installed using `pip`:



  ```shell
  pip install blackmarblepy
  ```



  1. Clone or download this repository to your local machine. Then, navigate to the root directory of the repository:

      ```shell
      git clone https://github.com/worldbank/blackmarblepy.git
      cd blackmarblepy
      ```

  2. Create a virtual environment (optional but recommended):

      ```shell
      python3 -m venv venv
      source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
      ```

  3. Install the package with dependencies:

      ```shell
      pip install .
      ```

      Install the package **in editable** mode with dependencies:

      ```shell
      pip install -e .
      ```

      The `-e` flag stands for "editable," meaning changes to the source code will immediately affect the installed package.



  To build the documentation locally, after (1) and (2) above, please follow these steps:

  - Install the package with documentation dependencies:

    ```shell
      pip install -e .[docs]
    ```

  - Build the documentation:

    ```shell
      sphinx-build docs _build/html -b html
    ```

  The generated documentation will be available in the `_build/html` directory. Open the `index.html` file in a web browser to view it.



  Before downloading and extracting Black Marble data, define the [NASA LAADS archive](https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/5000/VNP46A3/) `bearer` token, and define a region of interest (i.e., `gdf` as a [`geopandas.GeoDataFrame`](https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.html)).

  ```python
  from blackmarble.raster import bm_raster


  daily = bm_raster(
      gdf,
      product_id="VNP46A2",
      date_range=pd.date_range("2022-01-01", "2022-03-31", freq="D"),
      bearer=bearer,
  )
  ```

  For more detailed information and examples, please refer to the [examples](https://worldbank.github.io/blackmarblepy/notebooks/blackmarblepy.html).



  For a full reference of all available functions and their parameters, please refer to the [official documentation](api/blackmarble.rst).



  We welcome contributions to improve this documentation. If you find errors, have suggestions, or want to add new content, please follow our [contribution guidelines](CONTRIBUTING.md).



  If you have any feedback, encounter issues, or want to suggest improvements, please [open an issue](https://github.com/worldbank/blackmarblepy/issues).



  [![CalVer](https://img.shields.io/badge/calver-YY.0M.MICRO-22bfda.svg)](https://calver.org)

  This project follows the [CALVER](https://calver.org) (Calendar Versioning) scheme for versioning. If you have any questions or need more information about our versioning approach, feel free to ask.



  This project follows the [all-contributors](https://allcontributors.org) specification.
  Contributions of any kind are welcome!

  <a href="https://orcid.org/0000-0001-6530-3780">
  Gabriel Stefanini Vicente
  <img alt="ORCID logo" src="https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png" width="16" height="16" />
  </a>
  <br>
  <a href="https://orcid.org/0000-0002-3164-3813">
  Robert Marty
  <img alt="ORCID logo" src="https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png" width="16" height="16" />
  </a>

  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  <!-- prettier-ignore-start -->
  <!-- markdownlint-disable -->

  <!-- markdownlint-restore -->
  <!-- prettier-ignore-end -->

  <!-- ALL-CONTRIBUTORS-LIST:END -->



  When using **BlackMarblePy**, your support is much appreciated! Please consider using the following citation or download [bibliography.bib](https://raw.githubusercontent.com/worldbank/blackmarblepy/main/docs/bibliography.bib):

  ```bibtex
  @misc{blackmarblepy,
    title = {{BlackMarblePy: Georeferenced Rasters and Statistics of Nighttime Lights from NASA Black Marble}},
    author = {Gabriel {Stefanini Vicente} and Robert Marty},
    year = {2023},
    howpublished = {\url{https://worldbank.github.io/blackmarblepy}},
    doi = {10.5281/zenodo.10667907},
    url = {https://worldbank.github.io/blackmarblepy},
  }
  ```

  {cite:empty}`blackmarblepy`

  ```{bibliography}
  :filter: docname in docnames
  :style: plain
  ```



  This projects is licensed under the [**Mozilla Public License**](https://opensource.org/license/mpl-2-0/) - see the **LICENSE** file for details.

rpm_license:
  Mozilla Public License Version 2.0 ==================================  1. Definitions  --------------  1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.  1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution.  1.3. "Contribution" means Covered Software of a particular Contributor.  1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.  1.5. "Incompatible With Secondary Licenses" means  (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or  (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.  1.6. "Executable Form" means any form of the work other than Source Code Form.  1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.  1.8. "License" means this document.  1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.  1.10. "Modifications" means any of the following:  (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or  (b) any new file in Source Code Form that contains any Covered Software.  1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.  1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.  1.13. "Source Code Form" means the form of the work preferred for making modifications.  1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.  2. License Grants and Conditions  --------------------------------  2.1. Grants  Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:  (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and  (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.  2.2. Effective Date  The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.  2.3. Limitations on Grant Scope  The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:  (a) for any code that a Contributor has removed from Covered Software; or  (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or  (c) under Patent Claims infringed by Covered Software in the absence of its Contributions.  This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).  2.4. Subsequent Licenses  No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).  2.5. Representation  Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.  2.6. Fair Use  This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.  2.7. Conditions  Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.  3. Responsibilities  -------------------  3.1. Distribution of Source Form  All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form.  3.2. Distribution of Executable Form  If You distribute Covered Software in Executable Form then:  (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and  (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License.  3.3. Distribution of a Larger Work  You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).  3.4. Notices  You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.  3.5. Application of Additional Terms  You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.  4. Inability to Comply Due to Statute or Regulation  ---------------------------------------------------  If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.  5. Termination  --------------  5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.  5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.  5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.  ************************************************************************  *                                                                      * * 6. Disclaimer of Warranty                                           * * -------------------------                                           * *                                                                      * * Covered Software is provided under this License on an "as is"       * * basis, without warranty of any kind, either expressed, implied, or  * * statutory, including, without limitation, warranties that the       * * Covered Software is free of defects, merchantable, fit for a        * * particular purpose or non-infringing. The entire risk as to the     * * quality and performance of the Covered Software is with You.        * * Should any Covered Software prove defective in any respect, You     * * (not any Contributor) assume the cost of any necessary servicing,   * * repair, or correction. This disclaimer of warranty constitutes an   * * essential part of this License. No use of any Covered Software is   * * authorized under this License except under this disclaimer.         * *                                                                      *  ************************************************************************  ************************************************************************  *                                                                      * * 7. Limitation of Liability                                          * * --------------------------                                          * *                                                                      * * Under no circumstances and under no legal theory, whether tort      * * (including negligence), contract, or otherwise, shall any           * * Contributor, or anyone who distributes Covered Software as          * * permitted above, be liable to You for any direct, indirect,         * * special, incidental, or consequential damages of any character      * * including, without limitation, damages for lost profits, loss of    * * goodwill, work stoppage, computer failure or malfunction, or any    * * and all other commercial damages or losses, even if such party      * * shall have been informed of the possibility of such damages. This   * * limitation of liability shall not apply to liability for death or   * * personal injury resulting from such party's negligence to the       * * extent applicable law prohibits such limitation. Some               * * jurisdictions do not allow the exclusion or limitation of           * * incidental or consequential damages, so this exclusion and          * * limitation may not apply to You.                                    * *                                                                      *  ************************************************************************  8. Litigation  -------------  Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims.  9. Miscellaneous  ----------------  This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.  10. Versions of the License  ---------------------------  10.1. New Versions  Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.  10.2. Effect of New Versions  You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.  10.3. Modified Versions  If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).  10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses  If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.  Exhibit A - Source Code Form License Notice -------------------------------------------  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.  If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.  You may add additional accurate notices of copyright ownership.  Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------  This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.


pkgId: 790891488c78a92b3e7a0f6e3de57adef61ad8c4789a41acb905bc4c2cf9997b
name: python-blackneedles
arch: src
version: 0.1.14
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/blackneedles/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackneedles-0.1.14-1.src.rpm
checksum_type: sha256
description:
  Blackneedles a simple and easy to use python library and command line tool to manage and bring observability to Snowflake Snowpark Container Services and Snowflake Native Apps.

  The name comes from the Black Needles Peak (Pico das Agulhas Negras), the highest mountain in the state of Rio de Janeiro, Brazil, and only place in the state where one can see snowflakes.



  ```bash
  pip install blackneedles
  ```



  To use either the library or the command line tool, you need to have a Snowflake configurations at `~/.snowsql/config` or set the environment variables `SNOWFLAKE_ACCOUNT`, `SNOWFLAKE_USER`, `SNOWFLAKE_PASSWORD`, `SNOWFLAKE_ROLE`, `SNOWFLAKE_WAREHOUSE`, `SNOWFLAKE_DATABASE`, `SNOWFLAKE_SCHEMA`.

  If you want to connect to Snowflake Container Services, you must set `SNOWFLAKE_DATABASE` to your database name.When using it on Native App, you must set `SNOWFLAKE_DATABASE` to the native app name.

  In either way, you must install the support procedures and functions in your database or native app. You can do that by running the following command:

  ```bash
  SNOWFLAKE_DATABASE=your_database_or_native_app blackneedles install
  ```

  This will install the necessary procedures and functions in a `__blacknedlles__` schema. To remove everything, you just need to drop this schema from the database.

  If you are installing this in a Native App, you must also grant the necessary privileges to the role that will be using the library. You can do that by running the following command:

  ```bash
  SNOWFLAKE_DATABASE=your_database_or_native_app blackneedles install --grant <your_application_role>
  ```


pkgId: 68c7e5081d82d083f592807e0a3a9d30e8cd463539fc124061640547c7215ae9
name: python-blackpink
arch: src
version: 0.6.1
epoch: 0
release: 1
summary: Blackpink Logo Generator
url: https://github.com/krypton-byte/blackpink
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackpink-0.6.1-1.src.rpm
checksum_type: sha256
description:
  [![Downloads](https://pepy.tech/badge/blackpink)](https://pepy.tech/project/blackpink)

  ```
  $ pip install blackpink
  ```


  ```bash
  > git clone https://github.com/krypton-byte/blackpink
  > python3
  ```
  ```python
  >>> from blackpink import blackpink
  >>> blackpink("krypton").save("out.png")
  ```

  <img src="out.png" >


  <ul><li><a href="https://saweria.co/kryptonbyte">Saweria</a><li><a href="https://wa.me/6283172366463">Whatsapp</a></li></ul>


pkgId: bac4ffc357c9ee2a7ef63ee8f4f3b925265717cd4604d89d282a2f178bed6e6f
name: python-blackrenderer
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: A Python-based renderer for OpenType COLRv1 fonts, with multiple backends.
url: https://github.com/BlackFoundryCom/black-renderer
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackrenderer-0.6.0-1.src.rpm
checksum_type: sha256
description:
  [![Python package](https://github.com/BlackFoundryCom/black-renderer/actions/workflows/ci.yml/badge.svg)](https://github.com/BlackFoundryCom/black-renderer/actions/workflows/ci.yml)



  BlackRenderer is a Python-based renderer for OpenType COLR fonts, with multiple
  backends. It supports the new COLRv1 format as well as the old COLR format. It
  fully supports variable fonts, including variable COLRv1 data.

  ![Big Smiley Face Icon](https://github.com/BlackFoundryCom/black-renderer/blob/master/smile.png?raw=true)



  - It's a Python library called "blackrenderer"
  - It's a command line tool called "blackrenderer"
  - Renders individual glyphs or text strings
  - Supports multiple graphics backends:
    - Skia
    - Cairo
    - CoreGraphics (macOS)
    - SVG
    - outline extractor
    - bounding box calculator
  - Supports multiple output formats:
    - .png
    - .pdf
    - .svg
  - It uses fonttools to parse COLRv1 data
  - The "blackrenderer" tool is an "hb-view"-like command line app with switchable
    backend. It uses HarfBuzz for shaping



  BlackRenderer comes with an hb-view-like command line tool, that can be used like this:

      $ blackrenderer font.ttf ABC🤩 output.png --font-size=100



  There is a high level function to render a text string:

  ```python
  from blackrenderer.render import renderText

  renderText("myfont.ttf", "ABC", "output.png")  # or "output.svg"
  ```

  The full `renderText()` signature is:

  ```python
  def renderText(
      fontPath,
      textString,
      outputPath,
      *,
      fontSize=250,
      margin=20,
      features=None,
      variations=None,
      backendName=None,
  )
  ```

  For more control, the library exposes two main parts: the BlackRendererFont
  class, and a set of backend classes. Each backend provides a Canvas class.
  You pass a Canvas instance to a BlackRendererFont instance when drawing a
  glyph. Most backends also have a Surface class, which is a generalized
  convenience class to produce a canvas for a bitmap (or SVG document) for a
  specific box. Here is a minimal example:

  ```python
  from blackrenderer.font import BlackRendererFont
  from blackrenderer.backends import getSurfaceClass

  brFont = BlackRendererFont("my_colr_font.ttf")
  glyphName = "A"
  boundingBox = brFont.getGlyphBounds(glyphName)
  surfaceClass = getSurfaceClass("skia")
  surface = surfaceClass()
  with surface.canvas(boundingBox)
      brFont.drawGlyph(glyphName, canvas)
  surface.saveImage("image.png")
  ```

  Canvas objects support the following transformation methods:

  - `canvas.translate(dx, dy)`
  - `canvas.scale(sx, sy)`
  - `canvas.transform((xx, yx, xy, yy, dx, dy))`

  Save/restore is done with a context manager:

  ```python
  with canvas.savedState():
      canvas.scale(0.3)
      ...draw stuff...
  ```



  If you have a Python 3 environment set up, then all you need to do is:

      $ pip install blackrenderer



  Have Python 3.7 or higher installed.

  Open Terminal.

  "cd" into the project repo directory.

  Create a virtual environment:

  - `$ python3 -m venv venv --prompt=black-renderer`

  Activate the venv:

  - `$ source venv/bin/activate`

  (You need to activate the virtual environment for every new terminal session.)

  Upgrade pip:

  - `$ pip install --upgrade pip`

  Install the requirements:

  - `$ pip install -r requirements.txt`
  - `$ pip install -r requirements-dev.txt`

  Install blackrenderer in editable mode:

  - `$ pip install -e .`

  Run the tests:

  - `$ pytest`



  To cut a release, make an annotated git tag, where the tag is in this format:
  v1.2.3, where 1, 2 and 3 represent major, minor and micro version numbers.
  You can add "aN" or "bN" or "rc" to mark alpha, beta or "release candidate"
  versions. Examples: v1.2.3, v1.2.3b2, v1.2.3a4, v1.2.3rc.

  The message for the annotated tag should contain the release notes.

  Then use "git push --follow-tags" to trigger the release bot. Example session:

  - `$ git tag -a v1.2.3 -m "v1.2.3 -- fixed issue #12345"`
  - `$ git push --follow-tags`

  This process will create a GitHub release, as well as upload the package to
  PyPI.


pkgId: fcbe967bad4dfcab7e253e6bf7fe54e3841f0d5b2306a884196876dd694528ad
name: python-blacksap
arch: src
version: 1.8.0
epoch: 0
release: 1
summary: Track torrent RSS feeds
url: https://bitbucket.org/isaiah1112/blacksap
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blacksap-1.8.0-1.src.rpm
checksum_type: sha256
description:
  ![blacksap](http://www.jacomputing.net/direct_download/blacksap.png)

  [blacksap] is a Python based RSS tracker that is designed to watch multiple RSS feeds from torrent sites and download
  any new torrent files to a specified location.  If you have your torrent client configured to watch the same directory
  the files will be automatically picked up!



  [blacksap] is released under the [GNU General Public License v3.0], see the file LICENSE for the license text.



  As of version 1.8, blacksap is supported the latest versions of Python3 and PyPy3!

  The most straightforward way to get blacksap working for you is:

  ```
  pip install blacksap
  ```

  __NOTE:__

  By default, the [blacksap] executable gets put in __/usr/local/bin/__


  You can get help from [blacksap] by running:
  ```
  blacksap --help
  ```


  To track a new RSS feed run:
  ```
  blacksap track "https://example.com/search?q=latest_torrents&fmt=rss"
  ```


  To view all the feeds being tracked, run:
  ```
  blacksap tracking
  ```


  To untrack a feed type:
  ```
  blacksap untrack "https://example.com/search?q=latest_torrents&fmt=rss"
  ```


  To get [blacksap] to check all RSS fees and download any new torrent files, simply run:
  ```
  blacksap run --output ~/Downloads/
  ```

  __NOTE:__

  On its first check of a new feed, [blacksap] will only download the most recent torrent file.  If you would like to
  download more files (or none at all), override the number of files to download with the `--count` flag!  Don't
  forget to specify the URL of the new RSS feed or you will force that number of files to download from every
  tracked feed!





  The feeds that blacksap tracks are stored in `~/.blacksap.cfg`.  If you want to reset blacksap you can simply delete
  this file.  It is also stored in JSON format, so feel free to edit the file in place if needed.



  App specific settings are also stored in this file in an "app" hash.  The following settings are currently available
  for configuration

  * threads - Integer for number of threads to use (Default is None)
  * proxies - Hash of proxies to use for 'http' and 'https' (Default is None)
  * ipv6 - Boolean (Default is True)



  In version 1.5 and later of blacksap you can add a special "rules" key to each feed that contains a list of regular
  expressions that torrent files in the feed must match in order to be downloaded by blacksap.  The regular expressions
  are processed in order and when the first match is found no other rules are applied.  If no "rules" key exists then
  any new files will be downloaded.




  Below is an example blacksap configuration file:
  ```json
  {
  	"app": {
  		"threads": 4,
  		"ipv6": false,
  		"proxies": {
  			"http": "socks5://user:pass@fqdn:port",
  			"https": "socks5://user:pass@fqdn:port"
  		}
  	},
  	"feeds": [{
  		"url": "https://example.com/search?q=latest_torrents&fmt=rss",
  		"name": "Example Torrents",
  		"hash": "51930c6ea13972d61d7783da0910aa89",
  		"enabled": true,
  		"new": false,
  		"last": "My_Awesome_File.torrent",
  		"rules": [
  			"Awesome_File"
  		]
  	}]
  }
  ```


  If you are running OSX please check out the LaunchAgent in the git repo extras folder.  You can add it to your
  `~/Library/LaunchAgents/` directory and that way blacksap will run every hour and download new torrents
  automatically!



  Add the following to your user's crontab (using `crontab -e` command as your user) to schedule blacksap to run every
  hour (downloading to a `~/torrents/` directory):
  ```

  0 * * * * /usr/local/bin/blacksap run -o ~/torrents/
  ```



  Comments and enhancements are very welcome.

  Report any issues or feature requests on the [BitBucket bug tracker](https://bitbucket.org/isaiah1112/blacksap/issues?status=new&status=open).
  Please include a minimal (not-) working example which reproduces the bug and, if appropriate, the traceback information.
  Please do not request features already being worked towards.

  Code contributions are encouraged: please feel free to fork the project and submit pull requests to the develop branch.


  [GNU General Public License v3.0]: http://choosealicense.com/licenses/gpl-3.0/ "GPL v3"

  [blacksap]: https://bitbucket.org/isaiah1112/blacksap "blacksap"


pkgId: fd7075c29e725e916804a7572f1e7c0584c612a3e225c4e29c86fdf2540d1dd7
name: python-blackscholes
arch: src
version: 0.1.8
epoch: 0
release: 1
summary: Black Scholes calculator for Python including all Greeks
url: https://pypi.org/project/blackscholes/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackscholes-0.1.8-1.src.rpm
checksum_type: sha256
description:
  ![](https://img.shields.io/pypi/dm/blackscholes) |
  ![](https://img.shields.io/pypi/pyversions/blackscholes) |
  ![](https://img.shields.io/codecov/c/github/carlolepelaars/blackscholes)

  A Black-Scholes calculator for Python that includes up to the third-order Greeks.

  Supports the Black-Scholes-Merton model,
  Black-76 model and option structures.



  `pip install blackscholes`




  ```python3
  S = 55.0  # Asset price of 55
  K = 50.0  # Strike price of 50
  T = 1.0  # 1 Year to maturity
  r = 0.0025  # 0.25% Risk-free rate
  sigma = 0.15  # 15% Volatility
  q = 0.0 # 0% Annual Dividend Yield
  ```



  ```python3
  from blackscholes import BlackScholesCall
  call = BlackScholesCall(S=S, K=K, T=T, r=r, sigma=sigma, q=q)
  call.price()  ## 6.339408
  call.delta()  ## 0.766407
  call.spot_delta() ## 0.7683
  call.charm()  ## 0.083267
  ```



  ```python3
  from blackscholes import BlackScholesPut
  put = BlackScholesPut(S=S, K=K, T=T, r=r, sigma=sigma, q=q)
  put.price()  ## 1.214564
  put.delta()  ## -0.23359
  put.spot_delta() ## -0.23417
  put.charm()  ## 0.083267
  ```



  The Black-76 model is often used specifically for options and futures and bonds.
  `blackscholes` also supports this model. To see all available greeks
  check out section [4. The Greeks (Black-76)](https://carlolepelaars.github.io/blackscholes/4.the_greeks_black76).

  **Call Example**
  ```python
  from blackscholes import Black76Call
  call = Black76Call(F=55, K=50, T=1, r=0.0025, sigma=0.15)
  call.price()  ## 6.2345
  call.delta()  ## 0.7594
  call.vomma()  ## 45.1347
  ```

  **Put Example**
  ```python
  from blackscholes import Black76Put
  put = Black76Put(F=55, K=50, T=1, r=0.0025, sigma=0.15)
  put.price()  ## 1.2470
  put.delta()  ## -0.2381
  put.vomma()  ## 45.1347
  ```



  `blackscholes` offers the following six option structures:
  - Straddle
  - Strangle
  - Butterfly
  - Iron Condor
  - Spreads
  - Iron Butterfly

  All structures have a long and short version. To learn more
  check out section [6. Option Structures](https://carlolepelaars.github.io/blackscholes/6.option_structures).

  **Long Straddle Example**
  ```python3
  from blackscholes import BlackScholesStraddleLong

  straddle = BlackScholesStraddleLong(S=55, K=50, T=1.0,
                                      r=0.0025, sigma=0.15)
  straddle.price()  ## 7.5539
  straddle.delta()  ## 0.5328
  ```



  Binary options are also called exotic, digital or bet options. `blackscholes` supports Greeks for binary calls and puts.



  We very much welcome new contributions! Check out the [Github Issues](https://github.com/CarloLepelaars/blackscholes/issues)
  to see what is currently being worked on.

  Also check out [Contributing](https://carlolepelaars.github.io/blackscholes/contributing) in the documentation
  to learn more about
  contributing to [blackscholes](https://github.com/CarloLepelaars/blackscholes).


pkgId: 9618047e4880244233a67aef85cbdcf62ce64ea06df17471e83fda892c69aa8d
name: python-blacksheep-cli
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: 🛠️ CLI to bootstrap BlackSheep projects
url: https://github.com/Neoteroi/BlackSheep-CLI
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blacksheep-cli-0.0.4-1.src.rpm
checksum_type: sha256
description:
  🛠️ CLI to start BlackSheep projects.

  - Interactive project scaffolding
  - Support for configuring more `cookiecutter` project templates

  ```bash
  pip install blacksheep-cli
  ```



  - `api`, to scaffold Web API projects
  - `mvc`, to scaffold Web Apps projects with Model, View, Controller
     architecture, including Server Side Rendering of HTML views (SSR)



  ```bash
  blacksheep create
  ```



  ```bash
  blacksheep templates list
  ```

  With details:

  ```bash
  blacksheep templates details
  ```



  - clone this repository
  - create a Python virtual environment
  - install in development mode `pip install -e .`
  - add new commands, test


pkgId: a2a23b18dc11d6b9134114d4cc0464914b7cd9e04adf57123130c6e8bb556071
name: python-blacksmith
arch: src
version: 3.1.1
epoch: 0
release: 1
summary: REST API Client designed for microservices
url: https://github.com/mardiros/blacksmith
rpm_license: BSD-derived
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blacksmith-3.1.1-1.src.rpm
checksum_type: sha256
description:
  Blacksmith is a library to build a solid microservices architecture based on REST API.
  Todays, developers have lots of choices to create microservices,
  plenty of framework are available, but when it comes to consume them,
  there is a lack of clients.
  Consuming an API is not just about doing HTTP requests, it has to be designed
  for failure, monitoring, and service discovery with an elegant abstraction.
  blacksmith aims to provide a solution for developers to write clean client code
  and for ops to monitor api calls also on the client side.


pkgId: 1abbbb35950101d40bdc09629a5e48c460e05a38fe30cff2fb45056e596ee674
name: python-blackstone
arch: src
version: 0.1.15
epoch: 0
release: 1
summary: A SpaCy pipeline and models for NLP on unstructured legal text.
url: https://research.iclr.co.uk/blackstone
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackstone-0.1.15-1.src.rpm
checksum_type: sha256
description:
  <img src="https://iclr.s3-eu-west-1.amazonaws.com/assets/iclrand/sitecode.svg" width=20%>
  <img src="https://iclr.s3-eu-west-1.amazonaws.com/assets/iclrand/blackstone_seal.svg" height=75%>


  Blackstone is a [spaCy](https://spacy.io/) model and library for processing long-form, unstructured legal text. Blackstone is an experimental research project from the [Incorporated Council of Law Reporting for England and Wales'](https://iclr.co.uk/) research lab, [ICLR&D](https://research.iclr.co.uk/).



  [**Why are we building Blackstone?**](https://github.com/ICLRandD/Blackstone#why-are-we-building-blackstone)

  [**What's special about Blackstone?**](https://github.com/ICLRandD/Blackstone#whats-special-about-blackstone)

  [**Observations and other things worth noting**](https://github.com/ICLRandD/Blackstone#observations-and-other-things-worth-noting)

  [**Installation**](https://github.com/ICLRandD/Blackstone#installation)

  &nbsp;&nbsp;&nbsp;&nbsp;[Install the library](https://github.com/ICLRandD/Blackstone#1-install-the-library)

  &nbsp;&nbsp;&nbsp;&nbsp;[Install the Blackstone model](https://github.com/ICLRandD/Blackstone#2-install-the-blackstone-model)

  [**About the model**](https://github.com/ICLRandD/Blackstone#about-the-model)

  &nbsp;&nbsp;&nbsp;&nbsp;[The pipeline](https://github.com/ICLRandD/Blackstone#the-pipeline)

  &nbsp;&nbsp;&nbsp;&nbsp;[Named-Entity Recogniser](https://github.com/ICLRandD/Blackstone#named-entity-recogniser)

  &nbsp;&nbsp;&nbsp;&nbsp;[Text categoriser](https://github.com/ICLRandD/Blackstone#text-categoriser)

  [**Usage**](https://github.com/ICLRandD/Blackstone#usage)

  &nbsp;&nbsp;&nbsp;&nbsp;[Applying the NER model](https://github.com/ICLRandD/Blackstone#applying-the-ner-model)

  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Visualising entities](https://github.com/ICLRandD/Blackstone#visualising-entities)

  &nbsp;&nbsp;&nbsp;&nbsp;[Applying the text categoriser model](https://github.com/ICLRandD/Blackstone#applying-the-text-categoriser-model)

  [**Custom pipeline extensions**](https://github.com/ICLRandD/Blackstone#custom-pipeline-extensions)

  &nbsp;&nbsp;&nbsp;&nbsp;[Abbreviation and long-form definition resolution](https://github.com/ICLRandD/Blackstone#abbreviation-detection-and-long-form-definition-resolution)

  &nbsp;&nbsp;&nbsp;&nbsp;[Compound case reference detections](https://github.com/ICLRandD/Blackstone#compound-case-reference-detection)

  &nbsp;&nbsp;&nbsp;&nbsp;[Legislation linker](https://github.com/ICLRandD/Blackstone#legislation-linker)

  &nbsp;&nbsp;&nbsp;&nbsp;[Sentence segmenter](https://github.com/ICLRandD/Blackstone#sentence-segmenter)





  The past several years have seen a surge in activity at the intersection of law and technology. However, in the United Kingdom, the overwhelming bulk of that activity has taken place in law firms and other commercial contexts. The consequence of this is that notwithstanding the never ending flurry of development in the legal-informatics space, almost none of the research is made available on an open-source basis.

  Moreover, the majoritry of research in the UK legal-informatics domain (whether open or closed) has focussed on the development of NLP applications for automating contracts and other legal documents that are transactional in nature. This is understandable, because the principal benefactors of legal NLP research in the UK are law firms and law firms tend not to find it difficult to get their hands on transactional documentation that can be harnessed as training data.

  The problem, as we see it, is that legal NLP research in the UK has become over concentrated on commercial applications and that it is worthwhile making the investment in developing legal NLP research available with respect to other legal texts, such as judgments, scholarly articles, skeleton arguments and pleadings.



  * So far as we are aware, Blackstone is the first open source model trained for use on long-form texts containing common law entities and concepts.
  * Blackstone is built on [spaCy](https://spacy.io/), which makes it easy to pick up and apply to your own data.
  * Blackstone has been trained on data spanning a considerable temporal period (as early as texts drafted in the 1860s). This is useful because an interesting quirk of the common law is that older writings (particularly, judgments) go on to remain relevant for many, many years.
  * It is free and open source
  * It is imperfect and makes no attempt to hide that fact from you



  * Perfection is the enemy of the good. This is a prototype release of highly experimental project. As such, the accuracy of Blackstone's models leaves something to be desired (F1 on the NER is approx 70%). The accuracy of these models will improve over time.
  * The models have been trained on English case law and the library has been built with the peculiarities of the legal system of England and Wales in mind. That said, the model has generalised well and should do a reasonably good job on Australasian, Canadian and American content, too.
  * The data used to train Blackstone's models was derived from the [Incorporated Council of Law Reporting for England and Wales'](https://iclr.co.uk/) archive of case reports and unreported judgments. That archive is proprietary and this prevents us from releasing any of the data used to train Blackstone.
  * Blackstone is not a judge or litigation analytics tool.




  **Note!** It is strongly recommended that you install Blackstone into a virtual environment! See [here](https://realpython.com/python-virtual-environments-a-primer/) for more on virtual environments. Blackstone should compatible with Python 3.6 and higher.

  To install Blackstone follow these steps:



  The first step is to install the library, which at present contains a handful of custom [spaCy](https://spacy.io/) components. Install the library like so:

  ```
  pip install blackstone
  ```



  The second step is to install the [spaCy](https://spacy.io/) model. Install the model like so:

  ```
  pip install https://blackstone-model.s3-eu-west-1.amazonaws.com/en_blackstone_proto-0.0.2.tar.gz
  ```


  This is the very first release of Blackstone and the model is best viewed as a *prototype*; it is rough around the edges and represents the first step in a larger ongoing programme of open source research into NLP on legal texts being carried out by ICLR&D.

  With that out of the way, here's a brief rundown of what's happening in the proto model.



  The proto model included in this release has the following elements in its pipeline:

  <img src="https://iclr.s3-eu-west-1.amazonaws.com/assets/iclrand/Blackstone/blackstone_pipeline.svg">

  Owing to a scarcity of labelled part-of-speech and dependency training data for legal text, the `tokenizer`, `tagger` and `parser` pipeline components have been taken from [spaCy's](https://spacy.io/) `en_core_web_sm` model. By and large, these components appear to a do a decent job, but it would be good to revisit these components with custom training data at some point in the future.

  The `ner` and `textcat` components are custom components trained especially for Blackstone.



  The NER component of the Blackstone model has been trained to detect the following entity types:

  | Ent        | Name           | Examples  |
  | ------------- |-------------| -----:|
  | CASENAME    | Case names | e.g. *Smith v Jones*, *In re Jones*, In *Jones'* case |
  | CITATION      | Citations (unique identifiers for reported and unreported cases)     |   e.g. (2002) 2 Cr App R 123 |
  | INSTRUMENT | Written legal instruments     |    e.g. Theft Act 1968, European Convention on Human Rights, CPR |
  | PROVISION | Unit within a written legal instrument   |    e.g. section 1, art 2(3) |
  | COURT | Court or tribunal   |    e.g. Court of Appeal, Upper Tribunal |
  | JUDGE | References to judges |    e.g. Eady J, Lord Bingham of Cornhill |



  This release of Blackstone also comes with a text categoriser. In contrast with the NER component (which has been trainined to identify tokens and series of tokens of interest), the text categoriser classifies longer spans of text, such as sentences.

  The Text Categoriser has been trained to classify text according to one of five mutually exclusive categories, which are as follows:

  | Cat        | Description  |
  | ------------- |-------------|
  | AXIOM    | The text appears to postulate a well-established principle |
  | CONCLUSION     | The text appears to make a finding, holding, determination or conclusion |
  | ISSUE | The text appears to discuss an issue or question   |
  | LEGAL_TEST | The test appears to discuss a legal test |
  | UNCAT | The text does not fall into one of the four categories above  |





  Here's an example of how the model is applied to some text taken from para 31 of the Divisional Court's judgment in *R (Miller) v Secretary of State for Exiting the European Union (Birnie intervening)* \[2017] UKSC 5; \[2018] AC 61:

  ```python
  import spacy


  nlp = spacy.load("en_blackstone_proto")

  text = """ 31 As we shall explain in more detail in examining the submission of the Secretary of State (see paras 77 and following), it is the Secretary of State’s case that nothing has been done by Parliament in the European Communities Act 1972 or any other statute to remove the prerogative power of the Crown, in the conduct of the international relations of the UK, to take steps to remove the UK from the EU by giving notice under article 50EU for the UK to withdraw from the EU Treaty and other relevant EU Treaties. The Secretary of State relies in particular on Attorney General v De Keyser’s Royal Hotel Ltd [1920] AC 508 and R v Secretary of State for Foreign and Commonwealth Affairs, Ex p Rees-Mogg [1994] QB 552; he contends that the Crown’s prerogative power to cause the UK to withdraw from the EU by giving notice under article 50EU could only have been removed by primary legislation using express words to that effect, alternatively by legislation which has that effect by necessary implication. The Secretary of State contends that neither the ECA 1972 nor any of the other Acts of Parliament referred to have abrogated this aspect of the Crown’s prerogative, either by express words or by necessary implication.
  """


  doc = nlp(text)


  for ent in doc.ents:
      print(ent.text, ent.label_)

  >>> European Communities Act 1972 INSTRUMENT
  >>> article 50EU PROVISION
  >>> EU Treaty INSTRUMENT
  >>> Attorney General v De Keyser’s Royal Hotel Ltd CASENAME
  >>> [1920] AC 508 CITATION
  >>> R v Secretary of State for Foreign and Commonwealth Affairs, Ex p Rees-Mogg CASENAME
  >>> [1994] QB 552 CITATION
  >>> article 50EU PROVISION

  ```


  [spaCy](https://spacy.io/) ships with an excellent [set of visualisers](https://spacy.io/usage/visualizers), including a visualiser for NER predicts. Blackstone comes with a custom colour palette that can be used to make it easier to distiguish entities on the source text when using displacy.

  ```python
  """
  Visualise entities using spaCy's displacy visualiser.

  Blackstone has a custom colour palette: `from blackstone.displacy_palette import ner_displacy options`
  """

  import spacy
  from spacy import displacy
  from blackstone.displacy_palette import ner_displacy_options

  nlp = spacy.load("en_blackstone_proto")

  text = """
  The applicant must satisfy a high standard. This is a case where the action is to be tried by a judge with a jury. The standard is set out in Jameel v Wall Street Journal Europe Sprl [2004] EMLR 89, para 14:
  “But every time a meaning is shut out (including any holding that the words complained of either are, or are not, capable of bearing a defamatory meaning) it must be remembered that the judge is taking it upon himself to rule in effect that any jury would be perverse to take a different view on the question. It is a high threshold of exclusion. Ever since Fox’s Act 1792 (32 Geo 3, c 60) the meaning of words in civil as well as criminal libel proceedings has been constitutionally a matter for the jury. The judge’s function is no more and no less than to pre-empt perversity. That being clearly the position with regard to whether or not words are capable of being understood as defamatory or, as the case may be, non-defamatory, I see no basis on which it could sensibly be otherwise with regard to differing levels of defamatory meaning. Often the question whether words are defamatory at all and, if so, what level of defamatory meaning they bear will overlap.”
  18 In Berezovsky v Forbes Inc [2001] EMLR 1030, para 16 Sedley LJ had stated the test this way:
  “The real question in the present case is how the courts ought to go about ascertaining the range of legitimate meanings. Eady J regarded it as a matter of impression. That is all right, it seems to us, provided that the impression is not of what the words mean but of what a jury could sensibly think they meant. Such an exercise is an exercise in generosity, not in parsimony.”
  """

  doc = nlp(text)


  displacy.serve(doc, style="ent", options=ner_displacy_options)
  ```

  Which produces something that looks like this:

  <img src="https://iclr.s3-eu-west-1.amazonaws.com/assets/iclrand/Blackstone/displacy.png">



  Blackstone's text categoriser generates a predicted categorisation for a `doc`. The `textcat` pipeline component has been designed to be applied to individual sentences rather than a single document consisting of many sentences.

  ```python
  import spacy


  nlp = spacy.load("en_blackstone_proto")

  def get_top_cat(doc):
      """
      Function to identify the highest scoring category
      prediction generated by the text categoriser.
      """
      cats = doc.cats
      max_score = max(cats.values())
      max_cats = [k for k, v in cats.items() if v == max_score]
      max_cat = max_cats[0]
      return (max_cat, max_score)

  text = """
  It is a well-established principle of law that the transactions of independent states between each other are governed by other laws than those which municipal courts administer. \
  It is, however, in my judgment, insufficient to react to the danger of over-formalisation and “judicialisation” simply by emphasising flexibility and context-sensitivity. \
  The question is whether on the facts found by the judge, the (or a) proximate cause of the loss of the rig was “inherent vice or nature of the subject matter insured” within the meaning of clause 4.4 of the Institute Cargo Clauses (A).
  """


  doc = nlp(text)


  sentences = [sent.text for sent in doc.sents]


  for sentence in sentences:
      doc = nlp(sentence)
      top_category = get_top_cat(doc)
      print (f"\"{sentence}\" {top_category}\n")

  >>> "In my judgment, it is patently obvious that cats are a type of dog." ('CONCLUSION', 0.9990500807762146)
  >>> "It is a well settled principle that theft is wrong." ('AXIOM', 0.556410014629364)
  >>> "The question is whether on the facts found by the judge, the (or a) proximate cause of the loss of the rig was “inherent vice or nature of the subject matter insured” within the meaning of clause 4.4 of the Institute Cargo Clauses (A)." ('ISSUE', 0.5040785074234009)
  ```



  In addition to the core model, this proto release of Blackstone comes with three custom components:

  * Abbreviation detection - this is *heavily* based on the `AbbreviationDetector()` component in [scispacy] and resolves an abbreviated form to its long form definition, e.g. `ECtHR` -> `European Court of Human Rights`.
  * Legislation linker - this is an alpha component that attempts to resolve references to provisons to their parent instrument (more on this further down the README).
  * Compound case reference detection - again, this is an alpha component that attempts identify `CASENAME` and `CITATION` pairs enabling the merging of a `CITATION` to its parent `CASENAME`.



  It is not uncommon for authors of legal documents to abbreviate long-winded terms that will be used instead of the long-form througout the rest of the document. For example,

  > The European Court of Human Rights ("ECtHR") is the court ultimately responsible for applying the European Convention on Human Rights ("ECHR").

  The abbreviation detection component in Blackstone seeks to address this by implementing an ever so slightly modified version of [scispaCy's](https://allenai.github.io/scispacy/) `AbbreviationDetector()` (which is itself an implementation of the approach set out in this paper: https://psb.stanford.edu/psb-online/proceedings/psb03/schwartz.pdf). Our implementation still has some problems, but an example of its usage is as follows:

  ```python
  import spacy
  from blackstone.pipeline.abbreviations import AbbreviationDetector

  nlp = spacy.load("en_blackstone_proto")


  abbreviation_pipe = AbbreviationDetector(nlp)
  nlp.add_pipe(abbreviation_pipe)

  doc = nlp('The European Court of Human Rights ("ECtHR") is the court ultimately responsible for applying the European Convention on Human Rights ("ECHR").')

  print("Abbreviation", "\t", "Definition")
  for abrv in doc._.abbreviations:
  	print(f"{abrv} \t ({abrv.start}, {abrv.end}) {abrv._.long_form}")

  >>> "ECtHR"          (7, 10) European Court of Human Rights
  >>> "ECHR"   (25, 28) European Convention on Human Rights

  ```



  The compound case reference detection component in Blackstone is designed to marry up `CITATION` entities with their parent `CASENAME` entities.

  Common law jurisdictions typically relate to case references through a coupling of a name (typically derived from the names of the parties in the case) and some unique citation to identify where the case has been reported, like so:

  > Regina v Horncastle \[2010] 2 AC 373

  Blackstone's NER model separately attempts to identify the `CASENAME` and `CITATION` entities. However, it is potentially useful (particularly in the context of information extraction) to pull these entities out as pairs.

  `CompoundCases()` applies a custom pipe after the NER and identifies `CASENAME`/`CITATION` pairs in two scenarios:

  * The standard scenario: Gelmini v Moriggia \[1913] 2 KB 549
  * The possessive scenario (which is a little antiquated): Jone's case \[1915] 1 KB 45

  ```python
  import spacy
  from blackstone.pipeline.compound_cases import CompoundCases

  nlp = spacy.load("en_blackstone_proto")

  compound_pipe = CompoundCases(nlp)
  nlp.add_pipe(compound_pipe)

  text = "As I have indicated, this was the central issue before the judge. On this issue the defendants relied (successfully below) on the decision of the High Court in Gelmini v Moriggia [1913] 2 KB 549. In Jone's case [1915] 1 KB 45, the defendant wore a hat."
  doc = nlp(text)

  for compound_ref in doc._.compound_cases:
      print(compound_ref)

  >>> Gelmini v Moriggia [1913] 2 KB 549
  >>> Jone's case [1915] 1 KB 45
  ```



  Blackstone's Legislation Linker attempts to couple a reference to a `PROVISION` to it's parent `INSTRUMENT` by using the NER model to identify the presence of an `INSTRUMENT` and then navigating the dependency tree to identify the child provision.

  Once Blackstone has identified a `PROVISION`:`INSTRUMENT` pair, it will attempt to generate target URLs to both the provision and the instrument on [legislation.gov.uk](https://legislation.gov.uk).

  ```python
  import spacy
  from blackstone.utils.legislation_linker import extract_legislation_relations
  nlp = spacy.load("en_blackstone_proto")

  text = "The Secretary of State was at pains to emphasise that, if a withdrawal agreement is made, it is very likely to be a treaty requiring ratification and as such would have to be submitted for review by Parliament, acting separately, under the negative resolution procedure set out in section 20 of the Constitutional Reform and Governance Act 2010. Theft is defined in section 1 of the Theft Act 1968"

  doc = nlp(text)
  relations = extract_legislation_relations(doc)
  for provision, provision_url, instrument, instrument_url in relations:
      print(f"\n{provision}\t{provision_url}\t{instrument}\t{instrument_url}")

  >>> section 20      http://www.legislation.gov.uk/ukpga/2010/25/section/20  Constitutional Reform and Governance Act 2010   http://www.legislation.gov.uk/ukpga/2010/25/contents

  >>> section 1       http://www.legislation.gov.uk/ukpga/1968/60/section/1   Theft Act 1968  http://www.legislation.gov.uk/ukpga/1968/60/contents
  ```



  Blackstone ships with a custom rule-based sentence segmenter that addresses a range of characteristics inherent in legal texts that have a tendency to baffle out-of-the-box sentence segmentation rules.

  This behaviour can be extended by optionally passing a list of spaCy-style Matcher patterns that will explicitly prevent sentence boundary detection inside matches.

  ```python
  import spacy
  from blackstone.pipeline.sentence_segmenter import SentenceSegmenter
  from blackstone.rules import CITATION_PATTERNS

  nlp = spacy.load("en_blackstone_proto")


  sentence_segmenter = SentenceSegmenter(nlp.vocab, CITATION_PATTERNS)
  nlp.add_pipe(sentence_segmenter, before="parser")

  doc = nlp(
      """
      The courts in this jurisdiction will enforce those commitments when it is legally possible and necessary to do so (see, most recently, R. (on the application of ClientEarth) v Secretary of State for the Environment, Food and Rural Affairs (No.2) [2017] P.T.S.R. 203 and R. (on the application of ClientEarth) v Secretary of State for Environment, Food and Rural Affairs (No.3) [2018] Env. L.R. 21). The central question in this case arises against that background.
      """
  )

  for sent in doc.sents:
      print (sent.text)
  ```



  We would like to thank the following people/organisations who have helped us (directly or indirectly) to build this prototype.

  * [Mark Neumann](https://twitter.com/MarkNeumannnn) of [AI2](https://allenai.org/) and [scispaCy](https://allenai.github.io/scispacy/)
  * [Explosion AI](https://explosion.ai/) for building [spaCy](https://spacy.io/) and [Prodigy](https://prodi.gy/)
  * [Kristin Hodgins](https://twitter.com/kristinhodgins) of the Office of the Attorney General of British Columbia


pkgId: 27698557071ca5d3ef4427dbdd2d9e08e5e665f52b076b1e4858887e58909fe8
name: python-blackt
arch: src
version: 2024.0.2
epoch: 0
release: 1
summary: Black but with tabs
url: https://github.com/FHPythonUtils/blackt
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blackt-2024.0.2-1.src.rpm
checksum_type: sha256
description:
  [![GitHub top language](https://img.shields.io/github/languages/top/FHPythonUtils/blackt.svg?style=for-the-badge&cacheSeconds=28800)](../../)
  [![Issues](https://img.shields.io/github/issues/FHPythonUtils/blackt.svg?style=for-the-badge&cacheSeconds=28800)](../../issues)
  [![License](https://img.shields.io/github/license/FHPythonUtils/blackt.svg?style=for-the-badge&cacheSeconds=28800)](/LICENSE.md)
  [![Commit activity](https://img.shields.io/github/commit-activity/m/FHPythonUtils/blackt.svg?style=for-the-badge&cacheSeconds=28800)](../../commits/master)
  [![Last commit](https://img.shields.io/github/last-commit/FHPythonUtils/blackt.svg?style=for-the-badge&cacheSeconds=28800)](../../commits/master)
  [![PyPI Downloads](https://img.shields.io/pypi/dm/blackt.svg?style=for-the-badge&cacheSeconds=28800)](https://pypistats.org/packages/blackt)
  [![PyPI Total Downloads](https://img.shields.io/badge/dynamic/json?style=for-the-badge&label=total%20downloads&query=%24.total_downloads&url=https%3A%2F%2Fapi%2Epepy%2Etech%2Fapi%2Fv2%2Fprojects%2Fblackt)](https://pepy.tech/project/blackt)
  [![PyPI Version](https://img.shields.io/pypi/v/blackt.svg?style=for-the-badge&cacheSeconds=28800)](https://pypi.org/project/blackt)

  <!-- omit in toc -->


  <img src="readme-assets/icons/name.png" alt="Project Icon" width="750">

  Black (https://github.com/psf/black/) but with tabs

  **Note:** you may wish to consider https://github.com/jsh9/cercis

  Here are the configuration options to fall back to Blackt's behavior. Put them in
  `pyproject.toml`:

  ```toml
  [tool.cercis]
  line-length = 88
  single-quote = false
  use-tabs = true
  function-definition-extra-indent = false
  other-line-continuation-extra-indent = false
  closing-bracket-extra-indent = false
  wrap-line-with-long-string = true
  collapse-nested-brackets = false
  wrap-comments = true
  wrap-pragma-comments = true
  ```

  Here is a more opinionated example

  ```toml
  [tool.cercis]
  line-length = 120
  single-quote = false
  use-tabs = true
  target-version = ["py38"]
  ```

  - [Using (snippet from upstream)](#using-snippet-from-upstream)
  	- [Command line options](#command-line-options)
  - [Documentation](#documentation)
  - [Install With PIP](#install-with-pip)
  - [Language information](#language-information)
  	- [Built for](#built-for)
  - [Install Python on Windows](#install-python-on-windows)
  	- [Chocolatey](#chocolatey)
  	- [Windows - Python.org](#windows---pythonorg)
  - [Install Python on Linux](#install-python-on-linux)
  	- [Apt](#apt)
  	- [Dnf](#dnf)
  - [Install Python on MacOS](#install-python-on-macos)
  	- [Homebrew](#homebrew)
  	- [MacOS - Python.org](#macos---pythonorg)
  - [How to run](#how-to-run)
  	- [Windows](#windows)
  	- [Linux/ MacOS](#linux-macos)
  - [Download Project](#download-project)
  	- [Clone](#clone)
  		- [Using The Command Line](#using-the-command-line)
  		- [Using GitHub Desktop](#using-github-desktop)
  	- [Download Zip File](#download-zip-file)
  - [Community Files](#community-files)
  	- [Licence](#licence)
  	- [Changelog](#changelog)
  	- [Code of Conduct](#code-of-conduct)
  	- [Contributing](#contributing)
  	- [Security](#security)
  	- [Support](#support)
  	- [Rationale](#rationale)



  To get started right away with sensible defaults:

  ```sh
  black {source_file_or_directory}
  ```

  You can run _Black_ as a package if running it as a script doesn't work:

  ```sh
  python -m black {source_file_or_directory}
  ```



  _Black_ doesn't provide many options. You can list them by running `black --help`:

  ```text
  Usage: black [OPTIONS] SRC ...

    The uncompromising code formatter.

  Options:
    -c, --code TEXT                 Format the code passed in as a string.
    -l, --line-length INTEGER       How many characters per line to allow.
                                    [default: 100]
    -t, --target-version [py27|py33|py34|py35|py36|py37|py38|py39]
                                    Python versions that should be supported by
                                    Black's output. [default: per-file auto-
                                    detection]
    --pyi                           Format all input files like typing stubs
                                    regardless of file extension (useful when
                                    piping source on standard input).
    --ipynb                         Format all input files like Jupyter
                                    Notebooks regardless of file extension
                                    (useful when piping source on standard
                                    input).
    -S, --skip-string-normalization
                                    Don't normalize string quotes or prefixes.
    -C, --skip-magic-trailing-comma
                                    Don't use trailing commas as a reason to
                                    split lines.
    --check                         Don't write the files back, just return the
                                    status. Return code 0 means nothing would
                                    change. Return code 1 means some files would
                                    be reformatted. Return code 123 means there
                                    was an internal error.
    --diff                          Don't write the files back, just output a
                                    diff for each file on stdout.
    --color / --no-color            Show colored diff. Only applies when
                                    `--diff` is given.
    --fast / --safe                 If --fast given, skip temporary sanity
                                    checks. [default: --safe]
    --required-version TEXT         Require a specific version of Black to be
                                    running (useful for unifying results across
                                    many environments e.g. with a pyproject.toml
                                    file).
    --include TEXT                  A regular expression that matches files and
                                    directories that should be included on
                                    recursive searches. An empty value means all
                                    files are included regardless of the name.
                                    Use forward slashes for directories on all
                                    platforms (Windows, too). Exclusions are
                                    calculated first, inclusions later.
                                    [default: (\.pyi?|\.ipynb)$]
    --exclude TEXT                  A regular expression that matches files and
                                    directories that should be excluded on
                                    recursive searches. An empty value means no
                                    paths are excluded. Use forward slashes for
                                    directories on all platforms (Windows, too).
                                    Exclusions are calculated first, inclusions
                                    later. [default: /(\.direnv|\.eggs|\.git|\.h
                                    g|\.mypy_cache|\.nox|\.tox|\.venv|venv|\.svn
                                    |_build|buck-out|build|dist)/]
    --extend-exclude TEXT           Like --exclude, but adds additional files
                                    and directories on top of the excluded ones.
                                    (Useful if you simply want to add to the
                                    default)
    --force-exclude TEXT            Like --exclude, but files and directories
                                    matching this regex will be excluded even
                                    when they are passed explicitly as
                                    arguments.
    --stdin-filename TEXT           The name of the file when passing it through
                                    stdin. Useful to make sure Black will
                                    respect --force-exclude option on some
                                    editors that rely on using stdin.
    -q, --quiet                     Don't emit non-error messages to stderr.
                                    Errors are still emitted; silence those with
                                    2>/dev/null.
    -v, --verbose                   Also emit messages to stderr about files
                                    that were not changed or were ignored due to
                                    exclusion patterns.
    --version                       Show the version and exit.
    --config FILE                   Read configuration from FILE path.
    -h, --help                      Show this message and exit.
  ```

  _Black_ is a well-behaved Unix-style command-line tool:

  - it does nothing if no sources are passed to it;
  - it will read from standard input and write to standard output if `-` is used as the
    filename;
  - it only outputs messages to users on standard error;
  - exits with code 0 unless an internal error occurred (or `--check` was used).

  For more info see https://github.com/psf/black/blob/master/README.md



  A high-level overview of how the documentation is organized organized will help you know
  where to look for certain things:

  <!--
  - [Tutorials](/documentation/tutorials) take you by the hand through a series of steps to get
    started using the software. Start here if you’re new.
  -->
  - The [Technical Reference](/documentation/reference) documents APIs and other aspects of the
    machinery. This documentation describes how to use the classes and functions at a lower level
    and assume that you have a good high-level understanding of the software.
  <!--
  - The [Help](/documentation/help) guide provides a starting point and outlines common issues that you
    may have.
  -->



  ```python
  pip install blackt
  ```

  Head to https://pypi.org/project/blackt/ for more info





  This program has been written for Python versions 3.8 - 3.11 and has been tested with both 3.8 and
  3.11





  ```powershell
  choco install python
  ```



  To install Python, go to https://www.python.org/downloads/windows/ and download the latest
  version.





  ```bash
  sudo apt install python3.x
  ```



  ```bash
  sudo dnf install python3.x
  ```





  ```bash
  brew install python@3.x
  ```



  To install Python, go to https://www.python.org/downloads/macos/ and download the latest
  version.





  - Module
  	`py -3.x -m [module]` or `[module]` (if module installs a script)

  - File
  	`py -3.x [file]` or `./[file]`



  - Module
  	`python3.x -m [module]` or `[module]` (if module installs a script)

  - File
  	`python3.x [file]` or `./[file]`



  This project uses https://github.com/FHPythonUtils/FHMake to automate most of the building. This
  command generates the documentation, updates the requirements.txt and builds the library artefacts

  Note the functionality provided by fhmake can be approximated by the following

  ```sh
  handsdown  --cleanup -o documentation/reference
  poetry export -f requirements.txt --output requirements.txt
  poetry export -f requirements.txt --with dev --output requirements_optional.txt
  poetry build
  ```

  `fhmake audit` can be run to perform additional checks



  For testing with the version of python used by poetry use

  ```sh
  poetry run pytest
  ```

  Alternatively use `tox` to run tests over python 3.8 - 3.11

  ```sh
  tox
  ```







  1. Press the Clone or download button in the top right
  2. Copy the URL (link)
  3. Open the command line and change directory to where you wish to
  clone to
  4. Type 'git clone' followed by URL in step 2

  	```bash
  	git clone https://github.com/FHPythonUtils/blackt
  	```

  More information can be found at
  https://help.github.com/en/articles/cloning-a-repository



  1. Press the Clone or download button in the top right
  2. Click open in desktop
  3. Choose the path for where you want and click Clone

  More information can be found at
  https://help.github.com/en/desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop



  1. Download this GitHub repository
  2. Extract the zip archive
  3. Copy/ move to the desired location





  MIT License
  Copyright (c) FredHappyface
  (See the [LICENSE](/LICENSE.md) for more information.)



  See the [Changelog](/CHANGELOG.md) for more information.



  Online communities include people from many backgrounds. The *Project*
  contributors are committed to providing a friendly, safe and welcoming
  environment for all. Please see the
  [Code of Conduct](https://github.com/FHPythonUtils/.github/blob/master/CODE_OF_CONDUCT.md)
   for more information.



  Contributions are welcome, please see the
  [Contributing Guidelines](https://github.com/FHPythonUtils/.github/blob/master/CONTRIBUTING.md)
  for more information.



  Thank you for improving the security of the project, please see the
  [Security Policy](https://github.com/FHPythonUtils/.github/blob/master/SECURITY.md)
  for more information.



  Thank you for using this project, I hope it is of use to you. Please be aware that
  those involved with the project often do so for fun along with other commitments
  (such as work, family, etc). Please see the
  [Support Policy](https://github.com/FHPythonUtils/.github/blob/master/SUPPORT.md)
  for more information.



  The rationale acts as a guide to various processes regarding projects such as
  the versioning scheme and the programming styles used. Please see the
  [Rationale](https://github.com/FHPythonUtils/.github/blob/master/RATIONALE.md)
  for more information.


pkgId: a8b107da7e69ca65afd252c41155ae343931518ed9b0dfdaa034a6a0591de3df
name: python-blag
arch: src
version: 2.3.2
epoch: 0
release: 1
summary: blog-aware, static site generator
url: https://pypi.org/project/blag/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blag-2.3.2-1.src.rpm
checksum_type: sha256
description:
  blag is a blog-aware, static site generator, written in [Python][].

  * an example "deployment" can be found [here][venthur.de]
  * online [documentation][] is available on https://readthedocs.org.

  blag is named after [the blag of the webcomic xkcd][blagxkcd].

  [python]: https://python.org
  [blagxkcd]: https://blog.xkcd.com
  [venthur.de]: https://venthur.de
  [documentation]: https://blag.readthedocs.io/en/latest/




  * Write content in [Markdown][]
  * Good looking default theme:
    ![Blag Screenshot](blag/static/blag.png)
  * Theming support using [Jinja2][] templates
  * Generation of Atom feeds for blog content
  * Fenced code blocks and syntax highlighting using [Pygments][]
  * Integrated devserver
  * Available on [PyPI][]

  blag runs on Linux, Mac and Windows and requires Python >= 3.10

  [markdown]: https://daringfireball.net/projects/markdown/
  [jinja2]: https://palletsprojects.com/p/jinja/
  [pygments]: https://pygments.org/
  [pypi]: https://pypi.org/project/blag/




  blag is available on [PyPI][], you can install it via:

  ```bash
  $ pip install blag
  ```

  On Debian or Ubuntu, you can also just install the Debian package:

  ```bash
  $ sudo aptitude install blag
  ```




  ```bash
  $ pip install blag                  # 1. install blag
  $ blag quickstart                   # 2. create a new site
  $ vim content/hello-world.md        # 3. create some content
  $ blag build                        # 4. build the website
  ```

rpm_license:
  MIT License  Copyright (c) 2018 Bastian Venthur  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: 4213271bee4639a9ea3d82f45dbb85d7518deeee27dea8b37ea0a49c44d92b4b
name: python-blamscamp
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: Tools for publishing albums to the web and digital stores
url: https://pypi.org/project/blamscamp/
rpm_license: CC0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blamscamp-0.3.1-1.src.rpm
checksum_type: sha256
description:
  This project has been renamed to [bandcrash](https://github.com/fluffy-critter/bandcrash). This package remains in existence as a redirection wrapper to that; its long-term support is not guaranteed.


pkgId: 91b88a6fbffdf9dc1481e8144147d9097cbc35bb1b1042245b82c7ac6e73f8de
name: python-blanc
arch: src
version: 0.3.4
epoch: 0
release: 1
summary: Human-free quality estimation of document summaries
url: https://github.com/PrimerAI/blanc
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blanc-0.3.4-1.src.rpm
checksum_type: sha256
description:
  This repositary contains reference implementations and explanations to accompany [Primer.ai](https://primer.ai) research and publications related to evaluation measures, mostly for the purpose of summary evaluation.

  These evaluation measures include:

  * BLANC-help (or simply 'BLANC'), BLANC-tune
    * blanc.py
    * All the info is in this page
  * Shannon Score, Information Difference, BLANC-Shannon
    * shannon.py
    * Info: [Shannon Score and Information Difference](https://github.com/PrimerAI/blanc/tree/master/shannon)
  * ESTIME, ESTIME-soft, ESTIME-coherence
    * estime.py
    * Info: [ESTIME (hard, soft and coherence)](https://github.com/PrimerAI/blanc/tree/master/estime)

  Annotated summary quality datasets: [data](https://github.com/PrimerAI/blanc/tree/master/data)



  1. Install Python 3.6 or higher
  2. Install with `pip install blanc`



  This is the reference implementation of BLANC-help and BLANC-tune as defined in [Fill in the BLANC: Human-free quality estimation of document summaries](https://www.aclweb.org/anthology/2020.eval4nlp-1.2/).

  BLANC is a reference-free approach to the automatic estimation of document summary quality. Our goal is to measure the functional performance of a summary with an objective, reproducible, and fully automated method. Our approach achieves this by measuring the performance boost gained by a pre-trained language model with access to a document summary while carrying out its language understanding task on the document's text. Unlike ROUGE, BLANC does not require human-written reference summaries, allowing for fully human-free summary quality estimation.

  Two types of BLANC scores were introduced in the paper and are available in this repo: BLANC-help and BLANC-tune. BLANC-help is faster to calculate (around 30% faster on CUDA with default settings), but BLANC-tune is more theoretically principled. They are around 90% correlated with each other, so either one can be used in most cases.<br />
  BLANC-help with gap=2 on average correlates the best with human scores [Sensitivity of BLANC to human-scored qualities of text summaries](https://arxiv.org/abs/2010.06716), it is now set as default. The original paper used gap=6. Optimal parameters for BLANC-help and for BLANC-tune are found by using 'max-help' criterion, without relying on human summaries or human scores, in [Is Human Scoring the Best Criteria for Summary Evaluation?](https://aclanthology.org/2021.findings-acl.192) (the paper points to the possible bias of human experts).



  Basic usage:
  ```python
  >>> from blanc import BlancHelp, BlancTune
  >>> document = "Jack drove his minivan to the bazaar to purchase milk and honey for his large family."
  >>> summary = "Jack bought milk and honey."
  >>> blanc_help = BlancHelp()
  >>> blanc_tune = BlancTune(finetune_mask_evenly=False, show_progress_bar=False)
  >>> blanc_help.eval_once(document, summary)
  0.2222222222222222
  >>> blanc_tune.eval_once(document, summary)
  0.3333333333333333
  ```

  By default, BLANC is run on the CPU. Using CUDA with batching is much faster:
  ```python
  blanc_help = BlancHelp(device='cuda', inference_batch_size=128)
  blanc_tune = BlancTune(device='cuda', inference_batch_size=24, finetune_mask_evenly=False, finetune_batch_size=24)
  ```
  With these batch sizes, BLANC-help takes around 1.4 sec per summary and BLANC-tune takes around 1.8 sec per summary on an NVIDIA V100. In addition to the parameters controlling device and batch sizes, BlancHelp and BlancTune take several other parameters controlling how the BLANC scores are calculated, and the default values for those parameters reproduce the results of the paper. BlancTune results may vary if random_seed is not set.

  If you want to compute the BLANC scores of many documents and summaries at once, you can use `eval_pairs()` or `eval_summaries_for_docs()`. `eval_pairs()` is useful when you have many documents, each with a single summary:
  ```python
  >>> documents = ["Jack drove his minivan to the bazaar to purchase milk and honey for his large family.", "As Jill started taking a walk in the park, she certainly noticed that the trees were extra green this year."]
  >>> summaries = ["Jack bought milk and honey.", "Jill saw green trees in the park."]
  >>> blanc_help.eval_pairs(documents, summaries)
  [0.2222222222222222, 0.0]
  ```

  `eval_summaries_for_docs()` is useful when you have many documents, each with many summaries:
  ```python
  >>> doc_summaries = [["Jack bought milk and honey.", "Jack drove to the bazaar in a minivan"], ["Jill saw green trees in the park.", "The trees were green."]]
  >>> blanc_tune.eval_summaries_for_docs(documents, doc_summaries)
  [[0.2222222222222222, 0.2222222222222222], [-0.07142857142857142, -0.14285714285714285]]
  ```


  A CLI for computing BLANC scores is provided for convenience.
  ```
  $ blanc help --gap 6 --doc "Jack drove his minivan to the bazaar to purchase milk and honey for his large family." --summary "Jack bought milk and honey."
  0.1111111111111111
  ```

  Input data can also be provided in JSON format, with sample JSON input provided in `data/`
  ```
  $ blanc help --single_json data/single.json --gap 6
  0.1111111111111111
  $ blanc tune --pairs_json data/pairs.json --gap 6 --finetune_mask_evenly False
  [0.2222222222222222, 0.14285714285714285]
  $ blanc tune --doc_summaries_json data/doc-summaries.json --gap 6 --finetune_mask_evenly False
  [[0.2222222222222222, 0.2222222222222222], [0.14285714285714285, 0.07142857142857142]]
  ```

  The `single_json` input format expects a single JSON blob with keys `document` and `summary`. The `pairs_json` input format expects a list of JSON blobs, each with a `document` and a `summary`. The `doc_summaries_json` input format expects a list of JSON blobs, each with keys `document` and `summaries`, where `summaries` is a list of strings. These keys are customizable with the `doc_key`, `summary_key`, and `summaries_key` arguments. By default, the output is printed to STDOUT, but it can be written to a JSON file provided with the `output_json` argument.

  Full documentation is available with `blanc --help`:
  ```
  required arguments:
    {help,tune}           BLANC-help or BLANC-tune

  input arguments:
    --doc DOC             single input document (default: None)
    --summary SUMMARY     single input summary (default: None)
    --single_json FILENAME
                          filename for single document summary pair (default:
                          None)
    --pairs_json FILENAME
                          filename for list of document summary pairs (default:
                          None)
    --doc_summaries_json FILENAME
                          filename for list of documents, each with a list of
                          summaries (default: None)
    --doc_key KEY         json key for the input document (default: doc)
    --summary_key KEY     json key for the input summary (single_json or
                          pairs_json input) (default: summary)
    --summaries_key KEY   json key for the input summaries (doc_summaries_json
                          input) (default: summaries)

  arguments for BLANC-help and BLANC-tune:
    --model_name NAME     BERT model type (default: bert-base-uncased)
    --measure {improve,relative}
                          measure improve or relative, as defined in the paper
                          (default: relative)
    --gap GAP             distance between words to mask during inference
                          (default: 2)
    --gap_mask NUM        number of tokens to mask during inference at each
                          gap-defined position
                          (default: 1)
    --min_token_length_normal LEN
                          minimum number of chars in normal tokens to mask,
                          where a normal token is a whole word (default: 4)
    --min_token_length_lead LEN
                          minimum number of chars in lead token to mask, where a
                          lead token begins a word (default: 2)
    --min_token_length_followup LEN
                          minimum number of chars in followup token to mask,
                          where a followup token continues a word (default: 100)
    --device DEVICE       cpu or cuda device (default: cpu)
    --random_seed SEED    random seed for python and torch (default: 1)
    --inference_batch_size SIZE
                          batch size to use during inference (default: 1)
    --inference_mask_evenly MASK_EVENLY
                          when True, mask every `gap` tokens that are longer
                          than `min_token_length` during finetuning, when False
                          randomly mask tokens with probability 0.15 (default:
                          True)

  BLANC-help arguments:
    --filler_token TOKEN  token to use as filler in lieu of summary (default: .)
    --help_sep SEP        token to use to separate the summary or filler from
                          the sentence, or '' for no separator (default: )

  BLANC-tune arguments:
    --finetune_batch_size SIZE
                          batch size to use when finetuning on summary (default:
                          1)
    --finetune_epochs EPOCHS
                          number of epochs to train for when finetuning on
                          summary (default: 10)
    --finetune_mask_evenly MASK_EVENLY
                          when True, mask every `gap` tokens that are longer
                          than `min_token_length`during finetuning, when False
                          randomly mask tokens with probability 0.15 (default:
                          False)
    --finetune_chunk_size SIZE
                          number of summary tokens to use at a time when
                          finetuning (default: 64)
    --finetune_chunk_stride STRIDE
                          number of tokens between summary chunks for finetuning
                          (default: 32)
    --learning_rate LR    learning rate when finetuning on summary (default:
                          5e-05)
    --warmup_steps STEPS  warmup steps when finetuning on summary (default: 0)
    ```

    
    BLANC can run on top of any pretrained BERT or AlBERT model (more will be added). The table below lists correlations of BLANC with human scores on the human-annotated [SummEval](https://github.com/Yale-LILY/SummEval) dataset (described in [SummEval: Re-evaluating Summarization Evaluation](https://arxiv.org/abs/2007.12626v4)). The dataset contains 1600 text-summary pairs by 100 texts x 16 systems. We show correlation (Spearman and Kendall's Tau-c) between BLANC-help and experts-average scores for each quality of the summary (coherence, consistency, fluency, relevance):

    |quality|model|Spearman|Kendall|
  |:---------------|:-----------|-----:|-----:|
  |coherence|bbu|0.122|0.09|
  |coherence|bbc|0.197|0.142|
  |coherence|blu|0.116|0.085|
  |coherence|blc|0.226|0.165|
  |coherence|bluw|0.083|0.06|
  |coherence|blcw|0.196|0.142|
  |coherence|ab|0.168|0.125|
  |coherence|al|0.152|0.111|
  |coherence|axl|0.15|0.11|
  |coherence|axxl|0.127|0.093|
  |consistency|bbu|0.19|0.094|
  |consistency|bbc|0.19|0.094|
  |consistency|blu|0.207|0.102|
  |consistency|blc|0.204|0.1|
  |consistency|bluw|0.167|0.082|
  |consistency|blcw|0.18|0.089|
  |consistency|ab|0.192|0.095|
  |consistency|al|0.199|0.098|
  |consistency|axl|0.179|0.088|
  |consistency|axxl|0.2|0.098|
  |fluency|bbu|0.089|0.051|
  |fluency|bbc|0.108|0.062|
  |fluency|blu|0.112|0.065|
  |fluency|blc|0.113|0.064|
  |fluency|bluw|0.107|0.061|
  |fluency|blcw|0.121|0.069|
  |fluency|ab|0.124|0.072|
  |fluency|al|0.132|0.076|
  |fluency|axl|0.119|0.069|
  |fluency|axxl|0.115|0.066|
  |relevance|bbu|0.216|0.156|
  |relevance|bbc|0.278|0.201|
  |relevance|blu|0.217|0.156|
  |relevance|blc|0.306|0.223|
  |relevance|bluw|0.194|0.14|
  |relevance|blcw|0.258|0.188|
  |relevance|ab|0.27|0.193|
  |relevance|al|0.267|0.192|
  |relevance|axl|0.245|0.176|
  |relevance|axxl|0.246|0.179|

  The [transformers](https://huggingface.co/transformers/pretrained_models.html) models are: bert-base-uncased (bbu), bert-base-cased (bbc), bert-large-uncased (blu), bert-large-cased (blc), bert-large-uncased-whole-word-masking (bluw), bert-large-cased-whole-word-masking (blcw), albert-base-v2 (ab), albert-large-v2 (al), albert-xlarge-v2 (axl), albert-xxlarge-v2 (axxl). The BLANC-help was used with the current default settings (gap=2, min_token_length_normal=4, min_token_length_lead=2, min_token_length_followup=100). All the p-values above are of order 10^-5 or lower.

  The system-level correlations (correlations between 16-dimensional scores after averaging each system scores over 100 texts) have too high p-values. The table below shows only the correlations with p-values <0.05:

   |quality|model|Spearman|p|Kendall|p|
  |:---------------|:-----------|-----:|-----:|-----:|-----:|
  |consistency|bbu|0.738|0.001|0.567|0.002|
  |consistency|bbc|0.759|0.001|0.533|0.003|
  |consistency|blu|0.724|0.002|0.567|0.002|
  |consistency|blc|0.788|0.0|0.567|0.002|
  |consistency|bluw|0.771|0.0|0.617|0.001|
  |consistency|blcw|0.791|0.0|0.6|0.001|
  |consistency|ab|0.724|0.002|0.583|0.001|
  |consistency|al|0.774|0.0|0.6|0.001|
  |consistency|axl|0.706|0.002|0.517|0.005|
  |consistency|axxl|0.812|0.0|0.617|0.001|
  |fluency|bbc|0.558|0.025|0.444|0.017|
  |fluency|blc|0.549|0.028|0.444|0.017|
  |fluency|bluw|0.525|0.037|0.377|0.043|
  |fluency|blcw|0.595|0.015|0.477|0.01|
  |fluency|al|0.518|0.04|0.393|0.034|
  |fluency|axxl|0.534|0.033|0.41|0.027|
  |relevance|bbc| | |0.467|0.011|
  |relevance|blc| | |0.467|0.011|
  |relevance|blcw|0.515|0.041|0.467|0.011|


pkgId: b587aa35524e2066c6224d5857afa226ea95dbdb44951952b7fae39b5674b433
name: python-blankly
arch: src
version: 1.18.25b0
epoch: 0
release: 1
summary: Rapidly build, backtest & deploy trading bots
url: https://github.com/Blankly-Finance/Blankly
rpm_license: lgpl-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blankly-1.18.25b0-1.src.rpm
checksum_type: sha256
description:
  Blankly is an ecosystem for algotraders enabling anyone to build, monetize and scale their trading algorithms for stocks, crypto, futures or forex. The same code can be backtested, paper traded, sandbox tested and run live by simply changing a single line. Develop locally then deploy, iterate and share using the blankly platform.
  The blankly package is designed to be **extremely precise** in both simulation and live trading. **The engineering considerations for highly accurate simulation are described [here](blankly/BACKTESTING_ENGINEERING.md)**
  Getting started is easy - just `pip install blankly` and `blankly init`.
  Check out our [website](https://blankly.finance) and our [docs](https://docs.blankly.finance).
  <div align="center">
  <a target="_blank" href="https://youtu.be/pcm0h63rhUU"><img src="https://firebasestorage.googleapis.com/v0/b/blankly-6ada5.appspot.com/o/github%2Fbuild_a_bot_readme_thumbnail.jpg?alt=media&token=a9dd030a-805c-447f-a970-2bc8e1815662" style="border-radius:10px; width: 50%"></a>


pkgId: a6a22e7a57e445300b30343e8c6da375fdfd7f8d3b94a366650fc7387dd91fb4
name: python-blankspacebaby
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: How to Typeset Chinese and English Text
url: https://github.com/hongsheng-lai/BlankSpaceBaby/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blankspacebaby-0.0.4-1.src.rpm
checksum_type: sha256
description:
  中文英文排版方法（How to Typeset Chinese and English Text）


  ```bash
  pip install blankspacebaby
  ```


  ```bash
  blankspacebaby -l zh
  ```
  You will see an interactive prompt. Type in the text you want to typeset and press Control + D. The typeset text will be printed out.



  - 中英文之間需要空格（There should be a space between Chinese and English）

  > e.g. 打中文搭配 English 是件很 Hiphop 的事。

  - 中文與數字之間需要空格（There should be a space between Chinese and numbers）

  > e.g. 我有 3 顆蘋果。

  - 中文（全行）標點符號與其他符號之間不需要空格（There should be no space between Chinese punctuation and other symbols）

  > e.g.  我的英文名字是 Jason。


pkgId: b15eebcce93d708a8f4195de2876b87dbc1411396b555ec540689abbf9083c80
name: python-blar-graph
arch: src
version: 1.1.6
epoch: 0
release: 1
summary: Llm agent to search within a graph
url: https://blar.io
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blar-graph-1.1.6-1.src.rpm
checksum_type: sha256
description:
  This repo introduces a method to represent a local code repository as a graph structure. The objective is to allow an LLM to traverse this graph to understand the code logic and flow. Providing the LLM with the power to debug, refactor, and optimize queries. However, several tasks are yet unexplored.



  We used a combination of `llama-index`, `CodeHierarchy` module, and `tree-sitter-languages` for parsing code into a graph structure, `Neo4j` for storing and querying the graph data, and `langchain` to create the agents.



  **Install the package:**

  ```shell
  pip install blar-graph
  ```

  Set the env variables

  ```.env
  NEO4J_URI=neo4j+s://YOUR_NEO4J.databases.neo4j.io
  NEO4J_USERNAME=neo4j
  NEO4J_PASSWORD=YOUR_NEO4J_PASSWORD
  OPENAI_API_KEY=YOUR_OPEN_AI_KEY
  ```

  If you are new to Neo4j you can deploy a free instance of neo4j with [Aura](https://login.neo4j.com/u/signup/identifier?state=hKFo2SBIWW01eGl6SEhHVTVZQ2g1VU9rSk1BZlVVblJPd2FzSqFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIFNSUXR5UEtwZThoQTBlOWs0ck1hN0ZTekFOY3JfWkNho2NpZNkgV1NMczYwNDdrT2pwVVNXODNnRFo0SnlZaElrNXpZVG8). Also you can host your own version in [AWS](https://aws.amazon.com/marketplace/seller-profile?id=23ec694a-d2af-4641-b4d3-b7201ab2f5f9) or [GCP](https://console.cloud.google.com/marketplace/product/endpoints/prod.n4gcp.neo4j.io?rapt=AEjHL4O-iQH8W8STKpH0_zwz8HEyQqA9XFkpnFUkJotAt2wAT0Zmjhraww8X6covdYdzJdUi_LwtQtG8qDChLOLYHeEG4x1kZyhfzukM2WkabnwQlQpu5ws&project=direct-album-395214)



  To build the graph, you have to instantiate the graph manager and constructor. The graph manager handles the connection with Neo4j, and the graph constructor processes the directory input to create the graph.

  ```python
  import traceback
  import uuid

  from blar_graph.db_managers import Neo4jManager
  from blar_graph.graph_construction.core.graph_builder import GraphConstructor

  repoId = str(uuid.uuid4())
  entityId = str(uuid.uuid4())
  graph_manager = Neo4jManager(repoId, entityId)

  try:
      graph_constructor = GraphConstructor(graph_manager)
      graph_constructor.build_graph("YOUR_LOCAL_DIRECTORY")
      graph_manager.close()
  except Exception as e:
      print(e)
      print(traceback.format_exc())
      graph_manager.close()
  ```

  Now you can use our agent tools, or build your own, to create agents that resolves specific tasks. In the folder 'agents_tools' you will find all our tools (for now is just the Keyword search) and examples of agent implementations. For example, for a debugger agent you could do:

  ```python
  from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
  from langchain.agents.format_scratchpad.openai_tools import (
      format_to_openai_tool_messages,
  )
  from langchain.agents.output_parsers.openai_tools import (
      OpenAIToolsAgentOutputParser,
  )
  from blar_graph.agents_tools.tools.KeywordSearchTool import KeywordSearchTool
  from blar_graph.db_managers.base_manager import BaseDBManager
  from langchain.agents import AgentExecutor
  from langchain_openai import ChatOpenAI

  llm = ChatOpenAI(model="gpt-4-turbo-preview", temperature=0)

  system_prompt = """
      You are a code debugger, Given a problem description and an initial function, you need to find the bug in the code.
      You are given a graph of code functions,
      We purposly omitted some code If the code has the comment '# Code replaced for brevity. See node_id ..... '.
      You can traverse the graph by calling the function keword_search.
      Prefer calling the function keword_search with query = node_id, only call it with starting nodes or neighbours.
      Explain why your solution solves the bug. Extensivley traverse the graph before giving an answer
  """


  prompt = ChatPromptTemplate.from_messages(
      [
          (
              "system",
              system_prompt,
          ),
          ("user", "{input}"),
          MessagesPlaceholder(variable_name="agent_scratchpad"),
      ]
  )

  tools = [KeywordSearchTool(db_manager=graph_manager)]
  llm_with_tools = llm.bind_tools(tools)

  agent = (
      {
          "input": lambda x: x["input"],
          "agent_scratchpad": lambda x: format_to_openai_tool_messages(
              x["intermediate_steps"]
          ),
      }
      | prompt
      | llm_with_tools
      | OpenAIToolsAgentOutputParser()
  )
  ```

  Now you can ask your agent to perform a debugging process.

  ```python
  list(
      agent.stream(
          {
              "input": """
              The directory nodes generates multiples connections,
              it doesn't distinguish between different directories, can you fix it?
              The initial functions is run
              """
          }
      )
  )
  ```

  You can find more examples in the folder 'examples'. They are comprehensive jupiter notebooks that guide you from creating the graph to deploying the agent.

  _*Note: The supported languages for now are python, javascript and typescript. We are going to include C and C++ (or other language) if you ask for it enough. So don't hesitate to reach out through the [issues](https://github.com/blarApp/code-base-agent/issues) or directly to benjamin@blar.io or jose@blar.io*_


pkgId: c038c43e880425fd616050836b02ec0550735691dccd15093a8c1a5cf4f89499
name: python-blar-lsp-poc
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: A simple graph builder based on LSP calls
url: https://blar.io
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blar-lsp-poc-0.1.2-1.src.rpm
checksum_type: sha256
description:
  This repo introduces a method to represent a local code repository as a graph structure. The objective is to allow an LLM to traverse this graph to understand the code logic and flow. Providing the LLM with the power to debug, refactor, and optimize queries.


  ```
  ./lsp-ws-proxy/target/debug/lsp-ws-proxy --listen 5000 -- solargraph stdio -- jedi-language-server  -- typescript-language-server --stdio
  ```


  <img src="https://raw.githubusercontent.com/blarApp/lsp-poc/refs/heads/main/docs/visualisation.png"></img>
  This graph was generated from a Ruby on Rails project.


pkgId: 16791a09d6ccf189c8f00755d7111b883e579f8473e504e80c018088bff415af
name: python-blark
arch: src
version: 0.8.1
epoch: 0
release: 1
summary: Beckhoff TwinCAT IEC 61131-3 parsing tools
url: https://pypi.org/project/blark/
rpm_license: GPL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blark-0.8.1-1.src.rpm
checksum_type: sha256
description:
  Or for short, blark.  B(eckhoff)-lark. It sounded good in my head, at least.



  The [grammar](blark/iec.lark) uses Lark's Earley parser algorithm.

  The grammar itself is not perfect.  It may not reliably parse your source code
  or produce useful Python instances just yet.

  See [issues](https://github.com/klauer/blark/issues) for further details.

  As a fun side project, blark isn't at the top of my priority list.  For
  an idea of where the project is going, see the issues list.



  * [lark](https://github.com/lark-parser/lark) (for grammar-based parsing)
  * [lxml](https://github.com/lxml/lxml) (for parsing TwinCAT projects)



  * TwinCAT source code file parsing (``*.TcPOU`` and others)
  * TwinCAT project and solution loading
  * ``lark.Tree`` generation of any supported source code
  * Python dataclasses of supported source code, with introspection and code refactoring



  * Sphinx API documentation generation (a new Sphinx domain)
  * Code reformatting
  * "Dependency store" - recursively parse and inspect project dependencies
  * Summary generation - a layer on top of dataclasses to summarize source code details
  * Rewriting source code directly in TwinCAT source code files



  Installation is quick with Pip.

  ```bash
  pip install --upgrade blark
  ```



  1. Set up an environment using venv:
    ```bash
    $ python -m venv blark_venv
    $ source blark_venv/bin/activate
    ```
  2. Install the library with pip:
    ```bash
    $ python -m pip install blark
    ```



  1. Set up an environment using conda:
    ```bash
    $ conda create -n blark-env -c conda-forge python=3.10 pip blark
    $ conda activate blark-env
    ```
  2. Install the library from conda:
    ```bash
    $ conda install blark
    ```



  If you run into issues or wish to run an unreleased version of blark, you may
  install directly from this repository like so:
  ```bash
  $ python -m pip install git+https://github.com/klauer/blark
  ```



  Run the parser or experimental formatter utility.  Current supported file types
  include those from TwinCAT3 projects ( ``.tsproj``, ``.sln``, ``.TcPOU``,
  ``.TcGVL``) and plain-text ``.st`` files.

  ```bash
  $ blark parse --print-tree blark/tests/POUs/F_SetStateParams.TcPOU
  function_declaration
    None
    F_SetStateParams
    indirect_simple_specification
      None
      simple_specification        BOOL
    input_declarations
      None
      var1_init_decl
        var1_list
  ... (clipped) ...
  ```

  To interact with the Python dataclasses directly, make sure IPython is
  installed first and then try:

  ```
  $ blark parse --interactive blark/tests/POUs/F_SetStateParams.TcPOU


  In [1]: results[0].identifier
  Out[1]: 'F_SetStateParams/declaration'

  In [2]: results[1].identifier
  Out[2]: 'F_SetStateParams/implementation'
  ```

  Dump out a parsed and reformatted set of source code:

  ```bash
  $ blark format blark/tests/source/array_of_objects.st
  {attribute 'hide'}
  METHOD prv_Detection : BOOL
      VAR_IN_OUT
          currentChannel : ARRAY [APhase..CPhase] OF class_baseVector(SIZEOF(vector_t), 0);
      END_VAR
  END_METHOD
  ```

  blark supports rewriting TwinCAT source code files directly as well:

  ```bash
  $ blark format blark/tests/POUs/F_SetStateParams.TcPOU

  <TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.0">
    <POU Name="F_SetStateParams" Id="{f9611d23-4bb5-422d-9f11-2cc94e61fc9e}" SpecialFunc="None">
      <Declaration><![CDATA[FUNCTION F_SetStateParams : BOOL
      VAR_INPUT
          nStateRef : UDINT;
          rPosition : REAL;
          rTolerance : REAL;
          stBeamParams : ST_BeamParams;

  ... (clipped) ...
  ```

  It is also possible to parse the source code into a tokenized ``SourceCode``
  tree which supports code introspection and rewriting:

  ```python
  In [1]: import blark

  In [2]: parsed = blark.parse_source_code(
     ...:     """
     ...: PROGRAM ProgramName
     ...:     VAR_INPUT
     ...:         iValue : INT;
     ...:     END_VAR
     ...:     VAR_ACCESS
     ...:         AccessName : SymbolicVariable : TypeName READ_WRITE;
     ...:     END_VAR
     ...:     iValue := iValue + 1;
     ...: END_PROGRAM
     ...: """
     ...: )


  In [3]: parsed.tree.data
  Out[3]: Token('RULE', 'iec_source')


  In [3]: transformed = parsed.transform()

  In [4]: program = transformed.items[0]

  In [5]: program.declarations[0].items[0].variables[0].name
  Out[5]: Token('IDENTIFIER', 'iValue')
  ```

  The supported starting grammar rules for the reusable parser include:

  ```
  "iec_source"
  "action"
  "data_type_declaration"
  "function_block_method_declaration"
  "function_block_property_declaration"
  "function_block_type_declaration"
  "function_declaration"
  "global_var_declarations"
  "program_declaration"
  "statement_list"
  ```

  Other starting rules remain possible for advanced users, however a new parser
  must be created in that scenario and transformations are not supported.

  Additionally, please note that you should avoid creating parsers on-the-fly as
  there is a startup cost to re-parsing the grammar. Utilize the provided parser
  from ``blark.get_parser()`` whenever possible.

  ```
  In [1]: import blark

  In [2]: parser = blark.new_parser(start=["any_integer"])

  In [3]: Tree('hex_integer', [Token('HEX_STRING', '1010')])
  ```



  Presently, test cases are provided in two forms. Within the `blark/tests/`
  directory there are `POUs/` and `source/` directories.

  TwinCAT source code files belong in ``blark/tests/POUs``.
  Plain-text source code files (e.g., ``.st`` files) belong in
  ``blark/tests/source``.

  Feel free to contribute your own test cases and we'll do our best to ensure
  that blark parses them (and continues to parse them) without issue.



  Originally based on Volker Birk's IEC 61131-3 grammar
  [iec2xml](https://fdik.org/iec2xml/) (GitHub fork
  [here](https://github.com/klauer/iec2xml)) and [A Syntactic
  Specification for the Programming Languages of theIEC 61131-3
  Standard](https://www.researchgate.net/publication/228971719_A_syntactic_specification_for_the_programming_languages_of_the_IEC_61131-3_standard)
  by Flor Narciso et al.  Many aspects of the grammar have been added to,
  modified, and in cases entirely rewritten to better support lark grammars and
  transformers.

  Special thanks to the blark contributors:

  - @engineerjoe440



  There are a number of similar, or related projects that are available.

  - ["MATIEC"](https://github.com/nucleron/matiec) - another IEC 61131-3 Structured
  Text parser which supports IEC 61131-3 second edition, without classes,
  namespaces and other fancy features. An updated version is also
  [available on Github](https://github.com/sm1820/matiec)
  - [OpenPLC Runtime Version 3](https://github.com/thiagoralves/OpenPLC_v3) -
  As stated by the project:
    > OpenPLC is an open-source Programmable Logic Controller that is based on easy to use software. Our focus is to provide a low cost industrial solution for automation and research. OpenPLC has been used in many research papers as a framework for industrial cyber security research, given that it is the only controller to provide the entire source code.
  - [RuSTy](https://github.com/PLC-lang/rusty)
  [documentation](https://plc-lang.github.io/rusty/intro_1.html) - Structured text
  compiler written in Rust. As stated by the project:
    > RuSTy is a structured text (ST) compiler written in Rust. RuSTy utilizes the LLVM framework to compile eventually to native code.
  - [IEC Checker](https://github.com/jubnzv/iec-checker) - Static analysis tool
  for IEC 61131-3 logic. As described by the maintainer:
    > iec-checker has the ability to parse ST source code and dump AST and CFG to JSON format, so you can process it with your language of choice.
  - [TcBlack](https://github.com/Roald87/TcBlack) - Python black-like code formatter for TwinCAT code.


pkgId: 821834b0eaf271be3587d8143207e6bec2262757a90fdbde652a742f6a697d45
name: python-blaseball-mike
arch: src
version: 6.11.0
epoch: 0
release: 1
summary: Read-only Python wrapper around blaseball game API
url: https://github.com/jmaliksi/blaseball-mike
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blaseball-mike-6.11.0-1.src.rpm
checksum_type: sha256
description:
  Totally not a microphone to the blaseball API

  This is a python wrapper over blaseball's public APIs, including player/team/game fetches, as well as deserialization of the event stream.



  `pip install blaseball-mike`



  Full API documentation can be found at <https://jmaliksi.github.io/blaseball-mike/>





  ```
  python3 -m venv env
  source env/bin/activate
  pip install -r requirements.txt
  ```



  1. Bump version in `setup.py`. Use [https://semver.org/ semver], ie fixes are a patch, new features are a minor, and breaking changes are a major.
  2. Draft new release
  3. Name new tag with the version in `setup.py`. Add useful description.
  4. Publishing will automatically kick off a github action to publish


  1. Bump version in `setup.py`. Use [https://semver.org/ semver], ie fixes are a patch, new features are a minor, and breaking changes are a major.
  2. Delete `dist/*` and `build/*`
  3. `python3 setup.py sdist bdist_wheel`
  4. `python3 -m twine upload -r pypi dist/*`


pkgId: 0e7fe033410ad310aa31f3610d2f953427fd01b343b19154e0e09fb453994d62
name: python-blaseball-reference
arch: src
version: 2.1.1
epoch: 0
release: 1
summary: Python wrapper around blaseball-reference API
url: https://github.com/jmaliksi/blaseball-reference-py
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blaseball-reference-2.1.1-1.src.rpm
checksum_type: sha256
description:
  DEPRECATED: This package is no longer being maintained. Datablase wrappers are being further developed in `blaseball-mike`. https://github.com/jmaliksi/blaseball-mike

  Python wrapper around the Blaseball stats API


  ```
  pip install blaseball-reference
  ```


  https://api.blaseball-reference.com/docs#/


  ```
  python3 -m venv env
  source env/bin/activate
  pip install -r requirements.txt
  ```


  1. Update `version` in setup.py. Please use semver.
  2. Merge changes
  3. Create a new release in github with matching version ID. Project will be uploaded to PyPi automatically.


  To start,
  ```
  from blaseball_reference import api
  ```


  When no arguments are specified, a ```dict``` object is returned, with a key for each player ID that could fit the query. For example, running
  ```
  print(api.batting_average())
  ```
  will print a dictionary of every Blaseball batter and their batting averages, and will not return pitchers.
  ```
  {'batter_id': value'}
  ```


  Some queries, ```event_type``` for example, will return every player.


  You can specify the ID of the player to filter by. Multiple pitchers can also be specified, by passing a list or a string delimited by commas
  ```
  pitcherera = api.era("pitcher_id")
  ```
  ```
  pitcherera = api.era(["pitcher_id", "pitcher_id", "pitcher_id"])
  ```
  ```
  pitcherera = api.era("pitcher_id, pitcher_id, pitcher_id")
  ```


pkgId: 535ec6616ed871e4b840245a5b75eae135e17c834374f9c8cfdab4797cd684be
name: python-blask
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: A simple Blog engine using Flask and Markdown.
url: https://getblask.com
rpm_license: GPL 3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blask-0.2.3-1.src.rpm
checksum_type: sha256
description:
  You can see the [Code of Participation](https://www.mozilla.org/en-US/about/governance/policies/participation/) of this project.
  Blask is Open Source under the [GPL 3.0](LICENSE) License


pkgId: c40c7e27c78d529ab22086e44115fb03a1a72297f00f3fb88f2a5112f3392c76
name: python-blaster
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: Blast off a list of tasks calling each tasks methods defined
url: https://github.com/ryankwilliams/blaster
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blaster-0.6.0-1.src.rpm
checksum_type: sha256
description:
  [![PR-Verification](https://github.com/ryankwilliams/blaster/actions/workflows/pr_verification.yml/badge.svg)](https://github.com/ryankwilliams/blaster/actions/workflows/pr_verification.yml)
  [![PyPI version](https://img.shields.io/pypi/v/blaster.svg)](https://pypi.python.org/pypi/blaster)

  Blaster is a library that provides the ability to blast off a list of tasks
  and call each of their given methods concurrently. Blaster uses Python's
  built-in multiprocessing library to run the list of tasks.



  Blaster can be easily installed with a one line command. It is available on
  [pypi][1]. It is recommended (as best practice) to create a virtual
  environment and install blaster. Please see the commands below to install
  blaster.

  ```

  python3 -m venv venv


  source venv/bin/activate


  (venv) pip install blaster
  ```



  At the root of blaster project, you will see a examples folder. Within this
  folder you will find simple examples on how you can use blaster to
  efficiently run many tasks.



  When blaster calls its blastoff method, on completion. It will return back
  to you a list of task results. Within each task dictionary it will have the
  original task data passed in along with a couple new keys. A status key which
  is an integer (0 or 1) to determine pass or fail. If a task failed, it would
  have a traceback key with the exception raised for helpful troubleshooting.





  A task is a python dictionary that defines the task to be blasted off. A task
  must contain three keys **name**, **task** and **methods**. The name key
  just tells blaster what the task name is. The task key is a Python class
  reference. Finally the methods key is a list of methods to be run for the
  given task. You can then define any other key:value pairs that will be passed
  to the task given when an object is created for that class.

  Below is an example task for building a contemporary house. You will see
  the task key has a value of the House class which contains all the methods
  defined. Blaster will create a house object (passing any extra data in this
  case **style**) and then call the methods defined.

  ```python
  [
      {
          'name': 'House #1',
          'task': House,
          'methods': [
              'foundation',
              'frame',
              'roof',
              'furnish',
              'enjoy'
          ],
          'style': 'contemporary'
      }
  ]
  ```

  You also have the ability to set a timeout for each task. If the timeout is
  reached, the task will be exited.

  ```python
  [
      {
          'name': 'House #1',
          'task': House,
          'methods': [
              'foundation',
              'frame',
              'roof',
              'furnish',
              'enjoy'
          ],
          'style': 'contemporary',
          'timeout': 10
      }
  ]
  ```

  The nice feature with blaster is you can have multiple tasks but each one
  can call various methods within that task class. They do not all need to call
  the same methods! See the example below:

  ```python
  [
      {
          'name': 'House #1',
          'task': House,
          'methods': [
              'foundation',
              'frame',
              'roof',
              'furnish',
              'enjoy'
          ],
          'style': 'contemporary'
      },
      {
          'name': 'House #2',
          'task': House,
          'methods': [
              'foundation',
              'frame',
              'roof'
          ],
          'style': 'cape'
      }
  ]
  ```



  For any issues that you may find while using blaster library. Please open a
  new issue or you can open pull request.

  [1]: https://pypi.python.org/pypi/blaster


pkgId: a6d0ee42d6679b7b21f7b0a2aa6e78217d57934570bcd94384f19cfafe4762ba
name: python-blastsight
arch: src
version: 0.12.0
epoch: 0
release: 1
summary: A 3D visualization library oriented to mining applications
url: https://github.com/gsanhueza/blastsight
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blastsight-0.12.0-1.src.rpm
checksum_type: sha256
description:
  BlastSight is a 3D visualization software designed to aid in Mining research.

  ![blastsight](https://users.dcc.uchile.cl/~gsanhuez/blastsight_app.png)



  You can install BlastSight with the following command:

  `pip install blastsight`

  BlastSight requires the Python implementation of Qt5, and uses
  `qtpy` to abstract backends.

  This means that you need to install a backend yourself, using either of these commands:

  - `pip install pyqt5`
  - `pip install pyside2`

  Both backends should work, but if you find errors using one backend, try with the other!
  You can read the documentation from [qtpy](https://github.com/spyder-ide/qtpy)
  for more information.



  Implemented in Python 3.7 and qtpy, it's useful as a library and as an application,
  so you can use it as a viewer, or integrate it to an application you're developing.



  Start the application with `python -m blastsight`.

  From there you can load elements with File > Load [element].

  More information in Help > Help.



  You can embed BlastSight's viewer within your application.

  Check the following code and adapt it to your needs.

  ```python
  from qtpy.QtWidgets import QApplication
  from qtpy.QtWidgets import QWidget
  from qtpy.QtWidgets import QGridLayout
  from blastsight.view.integrableviewer import IntegrableViewer


  class EmbeddedViewer(QWidget):
      def __init__(self, parent=None):
          super().__init__(parent)
          self.setWindowTitle('EmbeddedViewer')
          self.resize(800, 600)
          self.viewer = IntegrableViewer(self)
          self.layout = QGridLayout(self)
          self.layout.addWidget(self.viewer, 0, 0, 1, 1)


  if __name__ == '__main__':
      app = QApplication([])
      embedded = EmbeddedViewer()
      embedded.show()
      app.exec_()
  ```



  You can also use BlastSight as a simple viewer when you write your own script.

  Insert the following lines in your script:

  ```python
  from blastsight.view.viewer import Viewer
  viewer = Viewer()



  viewer.show()
  ```



  The following methods can be used to render your elements directly.
  Keep in mind that these methods receive their arguments as *kwargs*, they're not positional.

  ```python

  viewer.mesh(x: list, y: list, z: list, indices: list, color: list, alpha: float, wireframe: bool, highlight: bool)


  viewer.blocks(x: list, y: list, z: list, block_size: list, values: list, vmin: float, vmax: float, colormap: str)


  viewer.points(x: list, y: list, z: list, point_size: float, values: list, vmin: float, vmax: float, colormap: str)


  viewer.lines(x: list, y: list, z: list, color: list, loop: bool)


  viewer.tubes(x: list, y: list, z: list, color: list, loop: bool, radius: float, resolution: int)
  ```

  Notes:

  * An additional 'name' *kwargs* can be used to give each element a name.
  * For **every** element, you can replace (x, y, z) with *vertices*, which is a list
  of positions, where each position is a list of (x, y, z).
  * For **meshes**, the *indices* argument is a list of index, where index is a list of
  (i1, i2, i3).
  * For **blocks** and **points** you can replace (values, vmin, vmax) with *color*,
  which is a list of colors for each position, where each color is a list of (r, g, b),
  between 0.0 and 1.0.



  BlastSight comes with a folder of examples that show what you can do with it.

  It's recommended to check `examples/demo.py` in https://github.com/gsanhueza/BlastSight/
  to develop an idea of how to use this software.

rpm_license:
  MIT License  Copyright (c) 2019-2023 Gabriel Sanhueza  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: ab22b87e4be154e326ea06a13f2bc18b993b8340c646635f5448f07303243166
name: python-blatann
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: Python BLE library for using Nordic nRF52 with Connectivity firmware
url: https://pypi.org/project/blatann/
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blatann-0.6.0-1.src.rpm
checksum_type: sha256
description:
  blåtann: Norwegian word for "blue tooth"

  Blatann aims to provide a high-level, object-oriented interface for interacting
  with Bluetooth Low Energy (BLE) devices through Python. It operates using
  the Nordic Semiconductor nRF52 through Nordic's ``pc-ble-driver-py`` library
  and the associated Connectivity firmware for the device.

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



  `pip install blatann`



  `pc-ble-driver-py` consists of a shared object which is linked to mac's system python.
  In order to use it with brew's python install, you'll need to run `install_name_tool` to modify the `.so` to
  point to brew python instead of system python.

  _Note: This is the case with any custom-installed python on mac (like anaconda), brew is the most popular and what has been tested_

  An example shell script to do so can be found [here](./tools/macos_retarget_pc_ble_driver_py.sh)



  This library has been tested with the following hardware:

  - the [nRF52-DK](https://www.nordicsemi.com/Products/Development-hardware/nrf52-dk): a Dev Kit for the nRF52832 (PCA10040)
  - the [nRF52840-DK](https://www.nordicsemi.com/Products/Development-hardware/nRF52840-DK): a Dev Kit for the nRF52840 (PCA10056)
  - the [nRF52840-Dongle](https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle): a nRF52840 USB Dongle (PCA10059)
  - the [ABSniffer-528](https://wiki.aprbrother.com/en/ABSniffer_USB_Dongle_528.html): a nRF52832 USB Dongle

  Flashed with specific Connectivity firmware released by Nordic Semiconductor.

  When using the nRF52840, it should be flashed using the S132/SoftDevice v5 connectivity images. Both the hex files and DFU packages are distributed
  with v4.1.4 of [pc-ble-driver](https://github.com/NordicSemiconductor/pc-ble-driver/releases/tag/v4.1.4) and is also provided in the `pc-ble-driver-py` install.

  The Nordic devices can be flashed using [nRF Connect Desktop App](https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop) or the `nrfutil` CLI tool.



  As of v0.3.0, the public-facing API of Blatann is stable. There will not
  likely be any major changes in method/property naming or functionality
  and all features added will aim to maintain backwards compatibility.

  Below lists the supported BLE features and ones that are on the roadmap to implement (eventually)

  - [X] GAP
      - [X] BLE Enable parameters
      - [X] BLE Connection parameters (functional, needs some work)
      - [X] Advertising
      - [X] Data Length Extensions
      - [X] PHY selection
        - Coded PHY not supported, only 1 and 2 Mbps PHYs
      - [X] Scanning
      - [X] Documentation
      - [X] RSSI
      - [X] Transmit Power
      - [X] Advertising channel selection
  - [X] SMP
      - [X] Private resolvable/non-resolvable advertising
      - [X] Encryption/Authentication process
      - [X] MITM/Passcode pairing support
      - [X] Store bonding info
      - [X] Identity resolve
      - [X] Bonding as Peripheral
      - [X] Bonding as Central
      - [X] LESC pairing
      - [X] Documentation
  - [ ] GATT
      - [X] Configurable MTU
      - [X] Generic Access service configuration
      - [ ] Service Changed characteristic
  - [ ] GATT Server
      - [X] Characteristic Reads
      - [X] Characteristic Writes
      - [X] Notifications/Indications
      - [X] Long reads/writes
      - [X] Characteristic User Description/Presentation format
      - [ ] CCCD Caching
      - [ ] Custom Read/Write authorization (#10)
      - [X] Documentation
  - [ ] GATT Client
      - [X] Database Discovery procedure
      - [X] Client reads
      - [X] Client writes
      - [X] Client long writes
      - [X] Notifications/Indications
      - [ ] CCCD Caching
      - [ ] Service Discovery Caching (#89)
      - [X] Documentation
  - [ ] Examples
      - [X] Advertiser/Broadcaster
      - [X] Scanner/Observer
      - [X] Central, Procedural
      - [X] Central, Event Driven
      - [ ] Central, Multiple Connections (#77)
      - [X] Peripheral
      - [ ] Multi-role
      - [X] Passcode Pairing
      - [X] LESC Numeric Comparison Pairing (glucose peripheral, no central example)
      - [X] Bonding (glucose peripheral, no central example)
  - [ ] Bluetooth Services
      - [X] Device Info Service
      - [X] Battery Service
      - [ ] Current Time Service
         - [X] Peripheral
         - [ ] Central (Partially implemented)
      - [ ] Glucose Service
         - [X] Peripheral
         - [ ] Central
      - [X] Nordic UART Service
      - More TBD (or on request)
  - [X] License
  - [ ] Unit Tests
  - [X] Integration Tests (partial -- below are implemented)
      - Advertising
      - Scanning
      - GATT Writes/Reads
      - GATT throughput testing/benchmarks
      - Pairing/Bonding

  The library aims to support both event-driven and procedural program styles. It takes similar paradigms from C#/.NET's event function signatures,
  where event handlers are passed  `object sender, EventArgs e` parameters.
  Additionally, all asynchronous function calls return a `Waitable` object which can be waited on (with timeout)
  until the event associated with the function call returns.



  There are several example scripts which showcase different functionality of the library under `blatann/examples`.
  Examples can be run using `python -m blatann.examples [example_filename] [device_comport]`.

  Example usage: `python -m blatann.examples scanner COM3`



  The integrated tests can be ran using the builtin `unittest` runner and depends on a few environment variables to find the connected Nordic devices.

  At a minimum, two nordic devices are required to run the unit tests. These are specified using environment variables:

  - `BLATANN_DEV_1` - Serial port of the first Nordic device
  - `BLATANN_DEV_2` - Serial port of the second Nordic device

  Optionally a third `BLATANN_DEV_3` can be specified to run tests which require more than two devices. If this environment variable is not defined, tests which require 3 devices are skipped.

  In order to speed up the tests, `BLATANN_TEST_QUICK=1` can be defined to skip long-running tests.
  Note that test cases which are defined as "long-running" is subjective and relative--the test suite will still take awhile to run,
  but in general test cases which take longer than 20 seconds are skipped.

  The tests can also be ran through the makefile using `make run-tests`.


pkgId: bd51e3265629c001dafd21ce98ed3669f1548ab9527d9ac67e0823eb5c2f7777
name: python-blaze
arch: src
version: 0.10.1
epoch: 0
release: 1
summary: Blaze
url: UNKNOWN
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blaze-0.10.1-1.src.rpm
checksum_type: sha256
description:
  We point blaze to a simple dataset in a foreign database (PostgreSQL).
  Instantly we see results as we would see them in a Pandas DataFrame.
      >>> import blaze as bz
      >>> iris = bz.Data('postgresql://localhost::iris')
      >>> iris
          sepal_length  sepal_width  petal_length  petal_width      species
      0            5.1          3.5           1.4          0.2  Iris-setosa
      1            4.9          3.0           1.4          0.2  Iris-setosa
      2            4.7          3.2           1.3          0.2  Iris-setosa
      3            4.6          3.1           1.5          0.2  Iris-setosa
  These results occur immediately. Blaze does not pull data out of
  Postgres, instead it translates your Python commands into SQL (or
  others.)
      >>> iris.species.distinct()
                 species
      0      Iris-setosa
      1  Iris-versicolor
      2   Iris-virginica
      >>> bz.by(iris.species, smallest=iris.petal_length.min(),
                 species  largest  smallest
      0      Iris-setosa      1.9       1.0
      1  Iris-versicolor      5.1       3.0
      2   Iris-virginica      6.9       4.5
  This same example would have worked with a wide range of databases,
  on-disk text or binary files, or remote data.


pkgId: 2bcb83b9fa920bd061cd6363845c59e402c03a14eb07d4f577fcbddc86e33f1b
name: python-blazingapi
arch: src
version: 0.0.45
epoch: 0
release: 1
summary: A growing framework for building web applications.
url: https://pypi.org/project/blazingapi/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blazingapi-0.0.45-1.src.rpm
checksum_type: sha256
description:
  Under construction! Not ready for use yet! Currently, experimenting and planning!

  Developed by Nuno Lemos



  Running server locally using Gunicorn

  ```python
  from blazingapi.server import run

  run()
  ```


pkgId: 38bb43e14da7a8e843e9a07829f0831c267ff7edabc72f8870bd7b7fd90e6ec0
name: python-blctools
arch: src
version: 0.0.46
epoch: 0
release: 1
summary: Tools to work with data inside BLCs MS Sharepoint Cloud & Database
url: https://github.com/DiegoRioboCabot/blctools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blctools-0.0.46-1.src.rpm
checksum_type: sha256
description:
  Data Analytics helper functions to work with inside BLC's Cloud system.





  * **cl_PPO()**:
      - When descargar=True, it downloads only missing files now.

  * **cl_DTE()**:
      - When descargar=True, it downloads only missing files now.

  * **dirs.extraer()**:
      - added parameter "eliminar". If true, deletes  zip files after succesful extraction.

  * **cl_ApiCammesa()**:
      - Solved bug when trying to download reports between dates with no actual data.

  * **cl_ReporteBase()**:
      - Added parameter "eliminar" to .descargar() method (see, dirs.extraer() updates)

  * **cl_TablasVC()**:
      - Included "central_contratos" and "contratos" to the downloaded data and modified all corresponding functions.
      - Included "respaldar_datos_basicos" and "respaldar_incidencias" to let the user choose wheter or not to backup queried data.
      - Changed .__asignar_datos_smec_() method, to assign "nemoCammesa" and "unidadComercial" from the "central_contratos" table.
      - Added .__asignar_datos_central_contratos().
      - Added .__asignar_datos_contratos().

  * **cl_SQLConnector()**:
      - Now compatible with sqlalchemy >= 2


      - No log (lost)



  * **dirs**
      - Corrected bug when extracting zip files
  * **cl_SQLConnector()**
      - Made compatible with SQLAlchemy => 2.0

  * **DatosCROM()**
      - Improved: elaborar_curvas_de_potencia can now accept other dataframes.


  * **DatosSMEC()**
      - Improved: estimar_ENS_xxxx now runs orders between 10x (metodo='cuantil') and 40x (metodo='promedio') faster. Now they both run equally fast.


  * **DatosSMEC()**
      - Fixed bug: Initialization was not working properly.


  * **DatosCROM()**
      - Improved: all functions to estimate ENS were improved drastically. They're now 4x faster.


  * **DatosCROM()**
      - Fixed bug: buscar_indisponibilidades() was not working properly
      - Fixed bug: buscar_limitaciones() was not working properly
      - Fixed bug: buscar_incidencias() was not working properly


  * **DatosCROM()**
      - Fixed bug: consolidar_todo() was not categorizing internal/external incidents correctly for some reason


  * **DatosCROM()**
      - Fixed bug: exportar() really slow
      - Improved: explotar_incidencias() takes  only incidencts with different start and end dates as input
      - Improved: Some functions were being executed twice upon object initialization


  * **fechas**
      - Fixed bug: mes_ant_dia_1() wasn't working properly.


  * **DatosCROM()**
      - Fixed bug: incidencias_resumen_status wasn't working properly

  * **TablasVC()**
      - Fixed bug: Functions .consultar_.... where not working with "uc" parameter


  * **DatosCROM()**
      - Added: incidencias_resumen_status attribute
      - Deleted: Client attribute
      - Changed: resumen_diario_incidencias to incidencias_resumen_diario

  * **TablasVC()**
      - Deleted: Client attribute

  * **PPO()**
      - Changed: Default dates on initialization are now blctools.ayer()

  * **DTE()**
      - Changed: Default dates on initialization are now blctools.ayer()
      - Changed: Improved internal modilarity
      - Changed: "dolarizar" parameter to "cols_usd"
      - Added: "dolarizar" method


  * **BCRA()**
      - Fixed bug: rem 24 month projections were not being projected properly


  * **BCRA()**
      - Added: cargar_tc_min = False as initialization parameter
      - Added: tc_min as the retail price for the USD in ARS
      - Fixed bug: rem projections were not being projected properly


  * **fechas**
      - Fixed bug: restar_mes wasn't working for some months of the year.


  * **ArchivoMDB()**
      - New object: It serves as an easy way to explore .mdb files

  * **ReporteBase()**
      - Changed: how the object processes mdb files. It's now more efficient


  * **BCRA()**
      - Changed: On initializing, rem tryies to download all files
      - Changed: nor .rem_tc table is called .tc_rem
      - Changed: now obtener_rem_mensual() is called cargar_rem()
      - All possible attributes are nor .tc_dia, .tc_udh, .tc_rem and .rem

  * **DTE()**
      - Changed: Cargar DTE goes on even if tc_udh couldn't be loaded from BCRA() object

  * **DatosSMEC()**
      - Changed: consultar_datos_vc() is now cargar_datos_vc()


  * **DTE()**
      - Added: Option to convet prices to USD
      - Added: Initialization parameters cargar (bool), descargar (bool) and dolarizar (str,list,tuple,set)

  * **.fechas**
      - Added: lista_mensual. Returns a list of dates provided a starting date and an "n"
      - Added: convertir_año_a_fecha() Returns a dt.DateTime object, starting from an integer (year)
      - Fixed bug: mes_ult_dia wasn't allowing for future dates

  * **BCRA()**
      - Added: Added interface with Argentina's Central Bank to download exchange rate (tc) and Market Expectations (REM)

  * **DatosCROM()**
      - Fixed bug: After 0.0.25 update, the object wasn't reading .xlsx files properly, thus crashing when trying to read.


  * **DatosSMEC()**
      - Changed: FechaOp column is now datetime type, when Querying VisionCROM's database.


  * **DatosSMEC()**
      - Fixed bug: HoraOp on cargar_datos_prn was not being calculated correctly.
      - Fixed bug: Actaris meters have now the right column order.
      - Changed: Now E_Neta_Gen and E_Neta_Con are calculated when each file is read, for consistency.



  * **DatosCROM()**
      - Added .DatosCROM() now warns if there is an empty excel file

  * **DatosCdO()**
      - Added strings report
      - Changed the variable-reading process, made it more efficient. By adding .pickle file as backup.
      - Added listado_señales_strings(): get list of "string" signals (actually DC combiner boxes)
      - Added descargar_datos_strings(): download "string" signals' mesaurements (actually DC combiner boxes)

  * **DatosSMEC()**
      - Added this new object to interact with VisionCROM's DataBase and fetch SMEC measurements
        - Initialization parameters:
          - fecha_i = Data's start date. DateTime object with year, month, day, hour and minute interval.
          - fecha_f = Data's end date. Same as fecha_i
          - parques = CAMMESAS's Nemotécnicos to indicate from which park the measurements will be retrieved
          - dir_salida = export directory
          - cargar_datos_basicos = sames as TablasVC()
          - mensajes = Verbose while loading
          - mensajes_SQL = Verbose while connecting
      - Added consultar_datos_vc(): Query VisionCROM's database using fecha_i, fecha_f and parque attributes
      - Added leer_archivo_prn(file): Read a single .prn file
      - Added cargar_datos_prn(folder): Read every .prn file in a given folder


  * **TablasVC()**
      - Changed: modificar_incidencia() now doesn't affect .incidencias_todas_auditoria attribute.

  * **DatosCROM()**
      - Improved: .estimar_ENS_varias_incidencias()'s overall speed and precision. Still not good for production, but better for single WTG incidents.
      - Improved: Memory Usage overall
      - Removed : Pgen_U variable, was a duplicate of FC.
      - Removed: Pcon_U, Egen_U, Econ_U, Epos_U, very rarely useed, could be calculated by hand.

  * **DatosCdO()**
      - Added this new object to interact with InAccess' API and download raw data from Caldenes del Oeste solar PV Plant (CdO)
        - Initialization parameters:
          - usr = Username (SCADA's username)
          - pwd = PAssword (SCADA's password)
          - apikey = Private apikey provided from InAccess
          - fecha_i = Data's start date. DateTime object with year, month, day, hour and 10 minute interval.
          - fecha_f = Data's end date. Same as fecha_i
          - reporte_produccion = True / False. Indicate if production report should be downloaded automatically
          - reporte_trackers = True / False. Indicate if trackers report should be downloaded automatically
          - reporte_mensual = True / False. If True, downloads both reports. False has no effect.
          - exportar = True / 'todos' / 'produccion / 'trackers'.
            - If True or 'todos' exports everything.
            - 'produccion' and 'trackers' export the respective report each.
      - Added obtener_señales(): Takes in a dataframe of Measurement Locations (Mlocs) and fetches all possible signals.
      - Added obtener_mediciones(): Takes a dataframe of signal lists and fetches data
      - Added listado_señales_trackers(): Just a preset, that shows which signals are used for the monthly production report
      - Added listado_señales_produccion(): Just a preset, that shows which signals are used for the monthly tracker report
      - Added mediciones_disponibles(): Initializing function that loads every available signal, from BLC's cloud
      - Added descargar_datos_produccion(): Downloads data from listado_señales_produccion() signals using DatosCdO's start and end date parameters
      - Added descargar_datos_trackers(): Downloads data from listado_señales_trackers() signals using DatosCdO's start and end date parameters
      - Added exportar(reportes = str): Exports loaded data from preset reports ['todos', 'produccion', 'trackers'].



  * **DatosCROM()**
      - estimar_ENS() now subtracts actual generated power from estimated power loss
      - Fixed bug: estimar_ENS() wasn't checking datatypes properly


  * **PPO() and DTE()**
      - Fixed bug: Setting "filtro" on initialization had no effect on running functions with default parameters.

  * **cl_CarpetaServicios()**
      - Added: blctools now finds "Servicios" folder, even when it's not explicitly written in the OS Path.

  * **DatosCROM()**
      - Added: estimar_ENS() takes a list of ids and estimates the ENS for each incident, based on actual production values.
      - Added: estimar_ENS_incidencias_abiertas() fills the ENS of the incidents that are still open
      - Added: estimar_ens_inc_abiertas = False initialization parameter
      - Added: incidencias_a_editar = None, takes a dictionary of dictionaries. The first dict has the IDs of the incidents that have to be edited as keys and their corresponding values are a second dictionary that holds the new parameters (and new values) . Example: {18088:{ENS=800,Owner='NewOwner'},18089:{Hours=8,Origin='INT'}}
      - Fixed bug: Plant Active Power and Energy was being calculated from WTGs / Circuits and it shouldn't. It has it's own values
      - Excludes incidents with Hours or ENS < 0 on .incidencias and .incidencias_redux attributes, but not in incidencias_todas
      - cargar_incidencias is now False as default.
      - explotar_incidencias is now False as default.

  * **Fechas module**
      - Fixed bug: hora_op, fecha_op, sumar_mes / restar_mes now have prevenir_futuro=False as default parameter and pass it to validar_fecha(s)
      - Fixed bug: obtener_periodo now has prevenir_futuro=True as default parameter and passes it to mes_periodo(s)

  * **TablasVC()**
      - Added .consultar_agrupamiento_de_un_equipo()
      - Added .modificar_incidencia() to edit a current incident
      - Fixed Bug: Query for incidencias was not returning open incidents


  * **DatosCROM()**
      - Added: One can now initialize the "parques" parameter with a single string, to avoid using brackets when working with just one park.
      - Fixed bug: Eerror when no active incidents were found for a given parq/period and trying to .interpretar_incidencias_bajo_iec61400()
      - Fixed bug: Some functions where trying to call TablasVC().consultar_incidencias() which doesn't exist anymore. Now its .consultar(incidencias='offline')


  * **DatosCROM()**
      - Added: .buscar_indisponibilidades(). Searches for periods of time which the WTGs met certain condition filters of out of service
      - Added: .buscar_limitaciones(). Searches for periods of time which the PLANT or WTGs had an SP_P > than the max.
      - Added: .buscar_incidencias() combines both previous functions in a single line.
      - Added: .incidencias_autodetectadas attribute, with export capabilities
      - Added: "Status" column to incidencias_redux
      - Added: "Count" and "Histogram" columns when calculating powercurves. _count "sheet" on export is now always there.
      - Added: "explotar_incidencias" initialization parámeter, which can take either 'iec61400' (default) or 'crudas'
      - Fixed bug: Missing Indices on datos_seg when trying to consolidate incidents and 10second data
      - _identificar_indisponibilidades() pgen and ppos parameters were added, to further improve filtering capacity
      - __procesar_d10s_dc() and cargar_segundales() now use DataFrame.reindex() to fill with blank rows where necessary.
      - elaborar_curvas_de_potencia() now sorts index clockwise instead of alphabetically

  * **TablasVC()**
      - Added .consultar_agrupamiento_de_un_equipo()


  * **DatosCROM()**
      - interpretar_incidencias_bajo_iec61400() made more efficient, while keeping compatibility with pandas >= 1.5.0
      - _identificar_indisponibilidades() pgen and ppos parameters were added, to further improve filtering capacity
  * **TablasVC()**
      - Added "potencia=False" parameter to consultar_agrupamientos(), consultar_equipos_no_agrupamientos()


  * **DatosCROM()**
      - Fixed bug: interpretar_incidencias_bajo_iec61400() was experiencing problems with pandas >= 1.5.0, and had a problem with the index selection statement at the beginning.
      - Added experimentally: _identificar_indisponibilidades(duracion=30)


  * **DatosCROM()**
      - .exportar() now flattens MultiIndex columns, freezes panes and formats floats, for easier view on Excel.
      - Added "invalidar_datos_seg_congelados" initialization parameter (default = False)
      - Fixed bug: .exportar() throwing error when curvas_de_potencia or consolidado held more than 1 Dataframe
      - Fixed bug: .interpretar_incidencias_bajo_iec61400() now trims final result between fecha_i and fecha_f
      - Fixed bug: .elaborar_curvas_de_potencia() wasn't working properly with filtro_n >1


  * **fechas submodule**
      - Added .sem_dia_1(date,offset=0) function. Returns first day of week of the given date + given offset in days (offset can be negative)
      - Added .sem_act_dia_1(offset=0) function. Returns first day of current week + given offset in days
      - Added .año_op(fecha_actual,fecha_cod) function. Returns the current contractual year based on the two dates (First year is 1, not 0)
  * **DatosCROM()**
      - adjusted how xlsx files processing time is calculated
      - adjusted how .pickle files are created/read. Compression was added through bz2
      - consolidado attribute is now called consolidado_redux, which is a subset of columns of consolidado
      - consolidado attribute now holds all the original data, but resampled to the users' input sample rate, excluding categorical variables
      - consultar_equipos_parque() and consultar_equipos_parque_no_agrupamientos() are now called consultar_equipos() and consultar_equipos_no_agrupamientos()
      - __iec61400_preparar_df_vacio_minutal() and it's aux methods are now more efficient
      - Added variables "Gen", "Con", "Pos" as boolean series for each equipment, into the datos_seg dataframe
      - Added columns "ENS_Lim","ENS_LimExt","ENS_LimInt","ENS_Ind","ENS_IndExt,"ENS_IndInt" to "consolidado" report
      - Added variable "Datos_%" which indicates the ammount of not null data per row, per element, into the datos_seg dataframe
      - Added variable "Registros" which indicates the ammout of rows (measured in time) on the excel file for that given element. Should alwasy equal 24
      - Fixed bug: .__procesar_d10s_5i() wasn't ensuring boolean dtypes for 'Gen','Con' and 'Pos', which impacted negatively on .elaborar_reporte_consolidado()
      - Fixed bug: .consolidar_todo() wasn't working with PEGARCIG
      - Fixed bug: .consolidar_todo() wasn't working adding up HOUR columns properly (the rest was fine)
      - Fixed bug: .consolidar_todo() wasn't finishing if there weren't any incidents for a given park on a given time window
      - Fixed bug: .explotar_incidencias() now works properly if there aren't any incidents on a given time window
      - Fixed bug: .exportar() was exporting empty dataframes, since they were not "None"
      - Fixed bug: Roll-up of availability parameters wasn't being done correctly. Now groupings are the mean or logic operator of their groupped elements.
      - Fixed bug: 10s pre-processing: Wind_dir_r was not being saved correctly for 'PLANT' element on self.datos_seg
      - Fixed bug: 10 second data is now being completed (in case of missing 10second records) with null values. This could have lead to serious problems when
      - Fixed bug: On many methods. From pandas >= 1.5.0 numpy series where linked and not copied when creating a new df. This created many bugs throughout the whole program.
      - unloading incidents to the 10 second data, since the main mechanism behind it is selection trhough .loc[t_stamp,:]
  * **TablasVC()**
      - Added attributes .habilitaciones and .tipohabilitaciones which are new tables of "datos básicos". They contain COD related information of each plant
      - Added .consultar_cod(nemo_parque='',uc='') function, to quickly find out about a plant's COD (Birthday) date (grabs from the table above)
      - Added .consultar_año_op(fecha_actual,feca_cod) function. Returns the contractual year (Contractual age) of a power plant
      - Added .__crear_dict_tipo_empresa(). Which fills in thre internal attributes: _empresas_bop, _empresas_gen, _empresas_grid
      - Fixed bug: .consultar() would fetchdatos_basicos from offline file even when 'online' parameter was set. This was due to:
        -  a logic error of variable db_off inside .consultar()
        -  the order in which instructions were executed
      - Fixed bug: __procesar_incidencias_it2() wasn't executing properly when cargar_datos_basicos = 'offline' was set. Solved by calling the new function .__crear_dict_tipo_empresa() before business mapping
      - Fixed bug: Desconecting twice from DB when fetching incidencias
      - Fixed bug: __combinar_incidencias_locales_y_online() wasn't working properly. Duplicate dropping should only be done by 'ID'
      - Refactored __asignar_datos() .method, to make it modular per table


  * **DatosCROM()**
      - Added data invalidation when processing 10 second data. Now consecutive values of P, Q, Wind, Wind_dir and PPos != 0 and != max (for Ppos) are replaced with np.nan
      - Fixed bug when selecting no .parques ( [] ) and initializing a DatosCROM object
      - Fixed bug when truying to export specific reports through the generating functions (ie elaborar_curvas_de_potencia, interpretar_bajo_iec61400, etc.) and seeting the "exportar" parameter to True
      - Fixed bug. PI wasn't being correctly calculated. (* instead of / was being used)
      - Added "filtro_n" parameter to .elaborar_curvas_de_potencia(), to only show results with an n_count >= n per bin. Default 0 (deactivated)
      - Added feature. Ppos is being calculated if column doesn't exist, based on Curvas_de_potencia.xlsx on BLC's cloud under blc.get_dc_cfg() directory
      - "clientes" initializing parameter was removed (little use for it)
      - "solo_CROM" initializing parameter was removed (little use for it)
  * **TablasVC()**
      - Improved the processing of incidents, now "Origin" is "NA" and np.nan resistent. Default = "INT"
      - Fixed bug through which a filter for discarded incidents wasn't working.
      - Refactored processing of incidents, it's more readable now


  * **DatosCROM()**
      - .exportar() was added. Helper function to export all loaded reports to xlsx format.
      - .explotar_incidencias() now takes in optional export parameters.
      - .incidencias_interpretar_bajo_iec61400() now takes in optional export parameters.
      - .incidencias_identificar_solapamientos() was added.
      - "curvas_de_potencia" parameter added while initializing, to force power curves to be computed automatically
      - .elaborar_curvas_de_potencia() is now more resistent to failures. Powercurves can be elaborated without having to process incidents before, although not recommended if user doesn't know what he is doing.
      - changed how __renombrar_lvl0() works, now it must be feed the equipment names.
  * **TablasVC()**
      - fixed a bug, where .consultar_equipos_parque_no_agrupamientos would return "PLANT" twice for GRIOEO
      - "cargar_incidencias" and "cargar_datos_basicos" parameters added while initializing, with possible values being [Flase, True, 'offline', 'online']
      - now queries per default active incidents from the 1st day of two months prior to today (if True or 'online' values where passed to "cargar_incidencias" parameter). Then concatenates obtained results with offline results (if there are any).


  * **TablasVC()**
      - Fixed bug: Corrected functions that took equipments from blctools.TablasVC().conjuntogeneradores, now reading from .tipoequipo
      - Fixed bug: Now Parks without any grouping of it's generators can return the generators without grouping. Special Case: PEGARCIG
  * **SQLConnector()**
      - now decrypts login data from BLC's secure fileserver.
  * **DatosCROM()**
      - .consultar_equipos_parque() now retrieves the right elements if the plant doesn't havy any other grouping stages
      - .consultar_equipos_por_agrupamiento() now returns an empty list if the plant doesn't havy any other grouping stages
      - .rpt_consolidado(granularidad='1D') was added.
      -  "forzar_reprocesamiento" parameter added while initializing, to force re-process 10 second data.
      - .rpt_curvas_de_potencia() was added
      - changed the behaviour of .fecha_i and .fecha_i setters. They now attempt to update "incidencias" and "archivos" depending on the values of fecha_i and fecha_f, but the setters dont try to order the dates automatically, which lead to an unwanted behaviour.
      - Changed completely how DatosCROM() now proceses raw data (10 seconds and Incidencias). It's more efficient, and the heavy lifting occurs while processing the 10-second data. Now index has 1 column (Time) and columns have a 3 level structure (p,e,v) = Park, Element, Variable


  * Created SQLConnector class to migrate to SQLAlchemy
  * blctools.TablasVC now inherits from SQLConnector


  * Function blctools.fechas.obtener_periodo() was added (moved from blctools.ReporteBase())
  * Added more parameter flexibility within all functions inside blctools.fechas.
  * Objects PPO(), DTE() and DatosCROM() now accept the "periodo" initialization parameter (overrides fecha_i and fecha_f).
  * bjects blctools.DatosCROM() and blctools.TablasVC() have now the "solo_CROM=False" initialization parameter.
  * function blctools.TablasVC.consultar_nemoCammesa() has now the "solo_CROM=False" argument


  * Corrected blctools.PPO.periodo('mes_anterior')
  * Function ReporteBase.a_excel() accepts now the parameter "exportar_consulta=bool"
  * Objects PPO() and DTE() now accept the following initialization parameters
      - "filtro"
      - "periodo" (overrides fecha_i and fecha_f)
  * No more unnecessary warnings on changing the "filtro" parameter
  * Function blctools.fechas.mes_dia_1() and blctools.fechas.mes_ult_dia() now validate dates using blctools.fechas.validar_fechas()
  * Functions blctools.fechas.validar_fecha() and .validar_fechas() now have a parameter "prevenir_futuro=True" as default, to prevent future dates or not.
  * Fixed a bug, when changing "filtro" on functions of child classes of DTE() or PPO(), download and extraction directories wouldn't update properly.


  * Attribute blctools.DatosCROM.dir_salida sets to which directory the reports go out to (didn't have much impact before)
  * Improved automatic Servicios directory search


  * Removed dependencies list
  * Ability to download unfiltered PPOs/DTEs without specifying parks/plants list
  * Incidents are no longer loaded by default on blctools.DatosCrom() objects


  * Corrected dependencies list


  * Bug fixes regarding file management
  * Ability to customize filters when hitting CAMMESA's API
  * PBA calculation according to IEC61400 is still functioning incorrectly


  * Most of the code is Object Oriented now.
  * CAMMESA's forecasts have been added.


  * Fixed the install issues


  * Basic functionality is up and running


  * Corroborar que la cantidad de grupos de columnas en los archivos 10 segundales, coincida con la cantidad de equipos del parque cuyo nombre de archivo enuncia.
  * Convertir DatosCROM().parques a "nemos" automáticamente.
  * Mejorar los mensajes de procesamiento nivel 0, 1 y 2 en todas las funciones
  * Fix Bug: Code could break by passing an '' element into parques initialization parameter


pkgId: 4d24f1e3b7e3decff85ab14f1f6644a5b0c2d9b5ac45b3e86f3186f5ad122171
name: python-bldr
arch: src
version: 0.0.18
epoch: 0
release: 1
summary: Build debian packages in a clean docker environment
url: https://www.github.com/OneIdentity/bldr
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bldr-0.0.18-1.src.rpm
checksum_type: sha256
description:
  Build debian packages in a clean docker environment
  Features:
  * provide a dockerized dpkg-buildpackage wrapper, as Docker can be used to create a clean build environment for Debian packaging
  * easy-to-use: navigate inside a directory that has a debian subdirectory and run build
  * collect the debian dependencies automatically and puts them in Docker build layer
  * cache the dependency install step and the re-build will be quicker
  * to test the debian package you can enter to the container which contains the build environment
  * the built debian package is stored in a local apt repository
  * build multiple dependent packages, if called multiple times (uses the built packages as build dependencies of the next ones)


pkgId: f64fd4eaedc8784d99458cd74d6d68e737d38ad7aced24ef9900185a3f058373
name: python-ble-serial
arch: src
version: 2.8.0
epoch: 0
release: 1
summary: Connects BLE adapters with virtual serial ports
url: https://github.com/Jakeler/ble-serial
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ble-serial-2.8.0-1.src.rpm
checksum_type: sha256
description:
  A tool to connect Bluetooth 4.0+ Low Energy to UART modules and normal PCs/laptops/RaspberryPi.

  It fulfills the same purpose as `rfcomm bind` for the old Bluetooth 2.0, creating a virtual serial port in `/dev/pts/x`, which makes it usable with any terminal or application.

  On Windows it provides a `COM` port, similar to the Microsoft "Standard Serial over Bluetooth" (a driver which exists since Windows XP and unsurprisingly also does not support BLE standards).



  The software is written completely in Python and packaged as module, so it can be easily installed with pip:
  ```console
  $ pip install ble-serial
  ```

  Now you should have 2 new scripts: `ble-scan` and the main `ble-serial`.

  On Linux/Mac you are ready now and can directly jump to the usage section!
  For Windows follow the [additional steps below](#additional-steps-for-windows).


  You can clone the repository with:
  ```console
  $ git clone https://github.com/Jakeler/ble-serial.git
  ```

  Then switch branches, make changes etc...
  Make sure the dependencies are installed, I recommend to use a virtualenv like this:
  ```console
  $ python -m venv ble-venv
  $ source ble-venv/bin/activate
  $ pip install -r requirements.txt
  ```

  The package can be either started directly with `-m`:
  ```console
  $ python -m ble_serial ARGUMENTS # Main tool = ble-serial
  $ python -m ble_serial.scan # BLE scan = ble-scan
  $ python -m ble_serial.setup_com0com # Windows only setup = ble-com-setup
  ```

  Or installed with `pip` from the current directory:
  ```console
  $ pip install .
  ```
  and started as usual.


  Windows does not have a builtin feature to create virtual serial ports (like Linux does), so it is required to install a additional driver.
  I decided to use the open source `com0com` Null-modem emulator, downloaded from [here](https://sourceforge.net/projects/signed-drivers/files/com0com/v3.0/) as signed version. This is required because unsigned drivers can not be installed anymore.

  **Note: on Windows 10+ you still have to disable secure boot for it to work.** Otherwise you might get a `Unexpected Error: SerialException` when starting ble-serial.

  ble-serial includes the `ble-com-setup` script to make the `com0com` configuration easier:
  ```console
  > ble-com-setup.exe -h
  usage: ble-com-setup [-h] [--install-path INSTALL_PATH]

  Setup required COM port pair

  optional arguments:
    -h, --help            show this help message and exit
    --install-path INSTALL_PATH
                          Installation directory of the null modem emulator (default: C:/Program Files (x86)/com0com/)
  ```

  It will request administrator privileges (if it does not already have it) and setup the port in another CMD window:
  ```
  > ble-com-setup.exe
  OK

  [New Window]
  Changing into C:/Program Files (x86)/com0com/

  > Checking port list for BLE
         CNCA0 PortName=-
         CNCB0 PortName=-

  BLE port does not exist

  > Checking port list for COM9
         CNCA0 PortName=-
         CNCB0 PortName=-

  > Trying to create port pair
         CNCA1 PortName=COM9
         CNCB1 PortName=BLE
  ComDB: COM9 - logged as "in use"

  Setup done!

  Hit any key to close
  ```
  As you can see it created the `BLE`<->`COM9` pair. ble-serial will internally connect to `BLE`, users can then send/receive the data on `COM9`.

  Otherwise there exist multiple proprietary serial port emulators, these should work too. Just manually create a pair that includes a port named `BLE`.



  First make sure the bluetooth adapter is enabled, for example with `bluetoothctl power on`, then the scan function can be used:
  ```console
  $ ble-scan

  Started BLE scan

  20:91:48:4C:4C:54 (RSSI=-56): UT61E -  JK
  ...

  Finished BLE scan
  ```
  The output is a list of the recognized nearby devices. After the MAC address and signal strength it prints out the device name, if it can be resolved.

  On macOS it displays a system specific device ID instead of a MAC address:
  ```
  55AEB150-5AF1-4318-A02E-19A46223F572 (RSSI=-70): nRF52 Accelerometer
  ```
  It can be used simply in place of the MAC to specify a device to connect in the following section.

  If there are no devices found it might help to increase the scan time. All discoverable devices must actively send advertisements, the interval of this can be quite long to save power, try for example 30 seconds in this case.
  ```console
  $ ble-scan -h
  usage: ble-scan [-h] [-t SEC] [-d ADDR]

  Scanner for BLE devices and service/characteristics.

  options:
    -h, --help            show this help message and exit
    -t SEC, --scan-time SEC
                          Duration of the scan in seconds (default: 5.0)
    -i ADAPTER, --interface ADAPTER
                          BLE host adapter number to use (default: hci0)
    -d ADDR, --deep-scan ADDR
                          Try to connect to device and read out service/characteristic UUIDs (default: None)
    -s SERVICE_UUID, --service-uuid SERVICE_UUID
                          The service used for scanning of potential devices (default: None)
    -v, --verbose         Print all infos from advertisement data (default: False)
  ```

  On Bluetooth 2.0 there was a "serial port profile", with 4.0 - 5.2 (BLE) there is unfortunately no standardized mode anymore, every chip manufacturer chooses their own UUIDs to implement the features.
  ```py
  '0000ff01-0000-1000-8000-00805f9b34fb', # LithiumBatteryPCB adapter: read/notify
  '0000ff02-0000-1000-8000-00805f9b34fb', # LithiumBatteryPCB adapter: write
  '0000ffe1-0000-1000-8000-00805f9b34fb', # TI CC245x (HM-10, HM-11)
  ```
  Some usual read/write UUIDs are included in ble-serial, these will be tried automatically if nothing is specified.
  You might skip this part and start directly with the connection.

  Otherwise to find the correct UUID, use the deep scan option. It expects a device MAC/ID, connects to it and reads out all services/characteristic/descriptors:
  ```console
  $ ble-scan -d 20:91:48:4C:4C:54
  Started deep scan of 20:91:48:4C:4C:54

  SERVICE 00001801-0000-1000-8000-00805f9b34fb (Handle: 12): Generic Attribute Profile
       CHARACTERISTIC 00002a05-0000-1000-8000-00805f9b34fb (Handle: 13): Service Changed ['indicate']
           DESCRIPTOR 00002902-0000-1000-8000-00805f9b34fb (Handle: 15): Client Characteristic Configuration
  SERVICE 0000ffe0-0000-1000-8000-00805f9b34fb (Handle: 16): Vendor specific
       CHARACTERISTIC 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 17): Vendor specific ['read', 'write-without-response', 'notify']
           DESCRIPTOR 00002902-0000-1000-8000-00805f9b34fb (Handle: 19): Client Characteristic Configuration
           DESCRIPTOR 00002901-0000-1000-8000-00805f9b34fb (Handle: 20): Characteristic User Description

  Completed deep scan of 20:91:48:4C:4C:54
  ```
  Now the interesting parts are the characteristics, grouped into services. The ones belows the first service starting with `00002` are not relevant in this case, because they are standard values (for example the device name), if you want to know more look at [this list](https://gist.github.com/sam016/4abe921b5a9ee27f67b3686910293026#file-allgattcharacteristics-java-L57).

  After the UUID, handle and type the permissions are listed in []. We are searching for a characteristic that allows writing = sending to the device, the only candidate in here is `0000ffe1-0000-1000-8000-00805f9b34fb` (spoiler: a HM-11 module again).
  Same procedure with the read characteristic, here you have to actually look for `notify` or `indicate`, that is how the receiving side is informed about new data in BLE.
  This module handles both directions through the same characteristic.

  Some other chips split it up, for example (this time on macOS with device ID):
  ```console
  $ ble-scan -d 55AEB150-5AF1-4318-A02E-19A46223F572
  Started deep scan of 55AEB150-5AF1-4318-A02E-19A46223F572

  SERVICE 00000001-af0e-4c28-95a4-4509fd91e0bb (Handle: 10): SDP
       CHARACTERISTIC 00000006-af0e-4c28-95a4-4509fd91e0bb (Handle: 11): Unknown ['read', 'notify']
           DESCRIPTOR 00002902-0000-1000-8000-00805f9b34fb (Handle: 13): Client Characteristic Configuration
       CHARACTERISTIC 00000005-af0e-4c28-95a4-4509fd91e0bb (Handle: 14): TCS-BIN ['write-without-response', 'notify']
           DESCRIPTOR 00002902-0000-1000-8000-00805f9b34fb (Handle: 16): Client Characteristic Configuration

  Completed deep scan of 55AEB150-5AF1-4318-A02E-19A46223F572
  ```
  As you can see, here the read/notify UUID is `00000006-af0e-4c28-95a4-4509fd91e0b` and write UUID `00000005-af0e-4c28-95a4-4509fd91e0bb`.


  The `ble-serial` tool itself has a few more options:
  ```console
  $ ble_serial -h
  usage: __main__.py [-h] [-v] [-t SEC] [-i ADAPTER] [-m MTU] [-d DEVICE] [-a {public,random}] [-s SERVICE_UUID] [-w WRITE_UUID] [-r READ_UUID] [--permit {ro,rw,wo}] [-l FILENAME] [-b] [-p PORT] [--expose-tcp-host TCP_HOST] [--expose-tcp-port TCP_PORT]

  Create virtual serial ports from BLE devices.

  options:
    -h, --help            show this help message and exit
    -v, --verbose         Increase verbosity, can be specified multiple times for connection/DBus debugging (default: 0)

  connection parameters:
    -t SEC, --timeout SEC
                          BLE connect/discover timeout in seconds (default: 5.0)
    -i ADAPTER, --interface ADAPTER
                          BLE host adapter number to use (default: hci0)
    -m MTU, --mtu MTU     Max. bluetooth packet data size in bytes used for sending (default: 20)

  device parameters:
    -d DEVICE, --dev DEVICE
                          BLE device address to connect (hex format, can be separated by colons) (default: None)
    -a {public,random}, --address-type {public,random}
                          BLE address type, only relevant on Windows, ignored otherwise (default: public)
    -s SERVICE_UUID, --service-uuid SERVICE_UUID
                          The service used for scanning of potential devices (default: None)
    -w WRITE_UUID, --write-uuid WRITE_UUID
                          The GATT characteristic to write the serial data, you might use "ble-scan -d" to find it out (default: None)
    -r READ_UUID, --read-uuid READ_UUID
                          The GATT characteristic to subscribe to notifications to read the serial data (default: None)
    --permit {ro,rw,wo}   Restrict transfer direction on bluetooth: read only (ro), read+write (rw), write only (wo) (default: rw)
  ```

  In any case it needs to know which device to connect, the simple and most reliable way to specify this is by device address/id:
  ```console
  $ ble-serial -d 20:91:48:4c:4c:54
  20:38:31.271 | INFO | linux_pty.py: Port endpoint created on /tmp/ttyBLE -> /dev/pts/5
  20:38:31.271 | INFO | ble_interface.py: Receiver set up
  20:38:31.485 | INFO | ble_interface.py: Trying to connect with 20:91:48:4C:4C:54: UT61E -  JK
  20:38:32.844 | INFO | ble_interface.py: Device 20:91:48:4C:4C:54 connected
  20:38:32.844 | INFO | ble_interface.py: Found write characteristic 0000ffe1-0000-1000-8000-00805f9b34fb (H. 17)
  20:38:32.844 | INFO | ble_interface.py: Found notify characteristic 0000ffe1-0000-1000-8000-00805f9b34fb (H. 17)
  20:38:33.128 | INFO | main.py: Running main loop!

  ```
  This log shows a successful start on Linux, the virtual serial port was opened on `/dev/pts/8`, the number at the end changes, depending on how many pseudo terminals are already open on the system. It uses the same mechanism on macOS, just the path is slightly different, in the format `/dev/ttys000`.
  In addition it automatically creates a symlink to `/tmp/ttyBLE`, so you can easily access it always on the same file, the default can be changed with:
  ```
  serial port parameters:
    -p PORT, --port PORT  Symlink to virtual serial port (default: /tmp/ttyBLE)
  ```

  On Windows it uses the port pair created in the setup described above, this does not dynamically change and endpoint is always `COM9` if you use the default script.

  Now it is possible to use any serial monitor program, just connect to that port, baud rate etc. does not matter, it will work with any value (settings are ignored, because it is only virtual).
  The software acts as transparent bridge, everything that is sent to that virtual port gets transmitted to the BLE module and comes out of the TX pin there. Same in the other direction, everything that the BLE module receives on the RX pin gets transmitted to the PC and shows up in the virtual serial port. This makes it also possible to add ble module to create a wireless serial connection with existing hard/software.

  Another way to find a device is by service uuid:
  ```console
  $ ble-serial -s 0000ffe0-0000-1000-8000-00805f9b34fb
  20:35:41.964 | INFO | linux_pty.py: Port endpoint created on /tmp/ttyBLE -> /dev/pts/5
  20:35:41.964 | INFO | ble_interface.py: Receiver set up
  20:35:41.964 | WARNING | ble_interface.py: Picking first device with matching service, consider passing a specific device address, especially if there could be multiple devices
  20:35:42.308 | INFO | ble_interface.py: Trying to connect with 20:91:48:4C:4C:54: UT61E -  JK
  20:35:43.020 | INFO | ble_interface.py: Device 20:91:48:4C:4C:54 connected
  ...
  ```
  This has the advantage that you can replace the device/chip without changing anything in the host script, it will automatically pick the first device that provides the service. It is also possible to add both the service and address, then it will only connect if both match.
  On early versions of macOS 12 (Monterey) it is always required to filter with the service uuid, otherwise scanning/connecting won't work.

  As mentioned before, the start might fail because the characteristic UUIDs are not in the list, then you can manually specify the correct write UUID like this:
  ```
  $ ble-serial -d 20:91:48:4c:4c:54 -w 0000ffe1-0000-1000-8000-00805f9b34fb
  ```

  Same for reading with `-r`/`--read-uuid`, for example:
  ```
  $ ble-serial -d 20:91:48:4c:4c:54 -r 0000ffe1-0000-1000-8000-00805f9b34fb
  ```

  Per default it always tries to setup reading and writing and searches for both characteristics. If none of your characteristics are in the builtin list then you have to specify both `-w` and `-r`.

  Otherwise if your device has only a read/notify characteristic or you want to intentionally prevent writing then you can use `--permit`:
  ```
  $ ble-serial -d 20:91:48:4c:4c:54 -r 0000ffe1-0000-1000-8000-00805f9b34fb --permit ro
  ```
  Here `-r` is enough for `ro` = read only.
  This works also the other way around with `wo` = write only.


  There is an option to log all traffic on the link to a text file:
  ```
  logging options:
    -l FILENAME, --log FILENAME
                          Enable optional logging of all bluetooth traffic to file (default: None)
    -b, --binary          Log data as raw binary, disable transformation to hex. Works only in combination with -l (default: False)
  ```

  ```console
  $ ble-serial -d 20:91:48:4c:4c:54 -l demo.txt
  ...
  $ cat demo.txt
  2019-12-09 21:15:53.282805 <- BLE-OUT: 48 65 6c 6c 6f 20 77 6f 72 6c 64
  2019-12-09 21:15:53.491681 -> BLE-IN: b0 b0 b0 b0 b0 b0 3b b0 b0 b0 ba b0 0d 8a
  2019-12-09 21:15:53.999795 -> BLE-IN: b0 b0 b0 b0 b0 b0 3b b0 b0 b0 ba b0 0d 8a
  ```
  Per default it is transformed to hex bytes, use `-b`/`--binary` to log raw data, useful if your input is already ASCII etc.



  Instead of the serial port emulation there is a also builtin raw tcp server since version 2.7:
  ```
  network options:
    --expose-tcp-host TCP_HOST
                          Network interface for the server listen on (default: 127.0.0.1)
    --expose-tcp-port TCP_PORT
                          Port to listen on, disables local serial port and enables TCP server if specified (default: None)
  ```
  This is only activated if TCP_PORT is set. Also it removes the dependency to com0com or other drivers.

  The server is listening on localhost per default, therefore only reachable from apps running on the same machine. Other interfaces or `0.0.0.0` for all interfaces can be specified with TCP_HOST.
  Security is to consider though, this is plain TCP without encryption or authentication. Only recommended on a separate local network, otherwise stay with the default/localhost.

  Note: this is limited to one concurrent connection, it will reject all connection attempts if there is already a client connected and emit a warning, example:
  ```console
  $ ble-serial -d 20:91:48:4C:4C:54 --expose-tcp-port 4002 -v
  [...]
  19:30:11.650 | INFO | main.py: Running main loop!
  19:30:11.650 | INFO | tcp_socket.py: TCP server started
  19:30:11.650 | DEBUG | tcp_socket.py: Listening on <asyncio.TransportSocket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 4002)>
  [...]
  19:30:13.618 | INFO | tcp_socket.py: New TCP peer connected: ('127.0.0.1', 49104)
  19:30:13.787 | DEBUG | ble_interface.py: Received notify from 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 17): Vendor specific: bytearray(b'\xb0\xb0\xb0\xb01\xb6;\xb0\xb0\xb0\xba\xb0\r\x8a')
  19:30:13.787 | DEBUG | tcp_socket.py: Sending: bytearray(b'\xb0\xb0\xb0\xb01\xb6;\xb0\xb0\xb0\xba\xb0\r\x8a')
  [...]
  19:30:26.726 | INFO | tcp_socket.py: New TCP peer connected: ('127.0.0.1', 56172)
  19:30:26.726 | WARNING | tcp_socket.py: More than one connection is not allowed, closing
  ```

  Now there a various ways to connect to it.

  - Very simple option: `netcat 127.0.0.1 4002` or `telnet 127.0.0.1 4002`
  - More powerful: `socat -dd tcp:localhost:4002 -`, can forward data to many modules, not only stdin/stdout.
  - Custom apps are easy to make with tcp too

  - Graphical: Putty, just put in the IP+port and select Other - Raw as connection type.
  - Terminal: netcat/telnet/socat can be installed separately


  It is possible to connect several devices to a host simultaneously. Limiting factor is only the bluetooth baseband layer, which uses a Active Member Address (AMA, 3 bit). From these 8 possible values address zero is always occupied by the host, so it can be connected to (up to) 7 devices at the same time.

  There is no special mode, ble-serial can be just started multiple times with different parameters. Following are some tips, showing how to do this in practice.


  Common shells (bash, zsh, fish) have a useful background job feature. Add the `-p` (port) option to make sure every instance has a unique path. Also you probably want to redirect the log output to keep it separate. Resulting command lines could look like:
  ```terminal
  $ ble-serial -d $ADDR1 -p /tmp/ttyBLE1 2> dev1.log &
  [1] 178378

  $ ble-serial -d $ADDR2 -p /tmp/ttyBLE2 2> dev2.log &
  [2] 178397
  ```
  The `&`  at the end causes it to go into background mode immediately, showing the job number and PID.
  Now it is usual control, here are 2 running visible with `jobs` as expected:
  ```
  $ jobs
  [1]  - running   ble-serial -d ... -p /tmp/ttyBLE1 2> dev1.log &
  [2]  + running   ble-serial -d ... -p /tmp/ttyBLE2 2> dev2.log &
  ```
  Get them back to foreground with `fg` or view logs live with `tail -f dev1.log` etc.
  Of course you can also put everything into a shell script.
  For stopping multiple instances you can send signals with `kill -s SIGINT $PID`, this will bring ble-serial to graceful shutdown as well, same as ctrl-c.


  More com0com port pairs need to be created manually: go to `Program Files (x86)/com0com` and either use command line `setupc.exe` `install` or the graphical `setupg.exe` 'Add pair' button. The PortNames can be chosen arbitrarily at least for the ble-serial side, but I would recommend to use something between COM1-COM9 for the external side, because I noticed many other applications are incompatible with different naming schemes. So use for example BLE2 <> COM8, BLE3 <> COM7 and so on.

  Default cmd has no real background job feature, instead multiple cmd windows or Windows Terminal with tabs can do the trick.
  Make sure to specify the right port for every additional instance, example:
  ```
  [Window/Tab 1]
  > ble-serial -d ... -p BLE
  ```
  ```
  [Window/Tab 2]
  > ble-serial -d ... -p BLE2
  ```
  ```
  [Window/Tab 3]
  > ble-serial -d ... -p BLE3
  ```


  The repo [`helper/`](https://github.com/Jakeler/ble-serial/tree/master/helper) directory contains a `ble-autoconnect.py` script:
  ```console
  $ python helper/ble-autoconnect.py -h
  usage: ble-autoconnect.py [-h] [-c CONFIG] [-v]

  Service to automatically connect with devices that get available.

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG, --config CONFIG
                          Path to a INI file with device configs (default: autoconnect.ini)
    -v, --verbose         Increase log level from info to debug (default: False)

  ```
  This continuously scans for devices and compares them with the configuration, it then automatically starts up `ble-serial` (or other tools) if a known device is detected.
  This should bring similar convenience like USB adapters, just turn the BLE device on and
  the serial port shows up on the PC. See the example `autoconnect.ini` for configuration.

  On Linux you can also use the included systemd (user) service to auto start this on boot.


  ble-serial is primarily designed for command line usage. Nonetheless it is possible to import modules of it into another python application. See the
  [`examples/`](https://github.com/Jakeler/ble-serial/tree/master/examples) dir for how to use the ble parts directly.


  First you can use `-v` to increase the log verbosity to DEBUG:
  ```console
  18:31:25.136 | DEBUG | ble_interface.py: Received notify from 17: bytearray(b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a')
  18:31:25.136 | DEBUG | linux_pty.py: Write: bytearray(b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a')

  18:31:25.373 | DEBUG | linux_pty.py: Read: b'hello world'
  18:31:25.373 | DEBUG | ble_interface.py: Sending b'hello world'
  ```
  This will log all traffic going through. Note that everything shows up two times, because it goes through the ble module and then into the serial port and vice versa.
  It also helps with figuring out how characteristics are selected:
  ```console
  14:32:47.589 | DEBUG | ble_interface.py: No write uuid specified, trying builtin list
  14:32:47.589 | DEBUG | ble_interface.py: Characteristic candidates for write:
          0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 17): Vendor specific ['read', 'write-without-response', 'notify']
  14:32:47.589 | INFO | ble_interface.py: Found write characteristic 0000ffe1-0000-1000-8000-00805f9b34fb (H. 17)
  14:32:47.589 | DEBUG | ble_interface.py: No notify uuid specified, trying builtin list
  14:32:47.589 | DEBUG | ble_interface.py: Characteristic candidates for notify:
          0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 17): Vendor specific ['read', 'write-without-response', 'notify']
  14:32:47.589 | INFO | ble_interface.py: Found notify characteristic 0000ffe1-0000-1000-8000-00805f9b34fb (H. 17)
  ```
  Always try the verbose option if something is not working properly.

  If this is not enough use the double verbose `-vv` flag. It activates debug logging also for the underlying [bleak](https://github.com/hbldh/bleak) module and shows interactions with the bluetooth stack more detailed.
  Check out the [issue tracker](https://github.com/hbldh/bleak/issues) there too, it is often helpful for problems not directly caused by ble-serial.


  * Chromium 73+ based applications, including NW.js/electron desktop apps. Connection to the virtual serial port (pty) fails. This is because of explicit whitelisting in chromium.
  TCP might be an alternative (see above), for example in Betaflight Configurator with Manual selection and `tcp://IP:PORT` url as port.

  * Certain baud/chipset/firmware configurations can have significant packet loss, see my [benchmark blog post](https://blog.ja-ke.tech/2021/04/22/ble-serial-2.html#performance) with the HM-10 module. Consider other protocols if the application requires constant high bandwidth, short bursts of data are usually fine though.


  If you encounter unexpected problems, please use the [issue tracker](https://github.com/Jakeler/ble-serial/issues). For general questions there is also the discussions tab.
  As always, I hope it was helpful, if you like it then I would appreciate if you could star it on [GitHub](https://github.com/Jakeler/ble-serial).


pkgId: 2c72c96b516f2c1496de0b65f4d396679ba0e1ad4ecefaada85758b7cf3eaa4e
name: python-ble2mqtt
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: BLE to MQTT bridge
url: https://github.com/devbis/ble2mqtt/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ble2mqtt-0.2.2-1.src.rpm
checksum_type: sha256
description:
  ![ble2mqtt devices](./ble2mqtt.png)




  - Any bluetooth device can work as a presence tracker
    You can provide `"threshold"` parameter to the device to set the limit in
    second when the device is considered away. The default value is 180 seconds.


  - **Redmond RK-G2xxS series (type: redmond_rk_g200)**

    The default key that is used is `"ffffffffffffffff"`
    and can be omitted in the config.
    In some cases kettles don't accept it. Just use another
    key in the config file for the device:
    `"key": "16 random hex numbers"`

  - **Mi Kettle (type: mikettle)**

    Use correct `product_id` for your kettle:
    - yunmi.kettle.v1: `131`
    - yunmi.kettle.v2: `275` (default)
    - yunmi.kettle.v7: `1116`


  - **Redmond RMC-M225S, RMC-M227S (type: redmond_rmc_m200)**

    Notes about the key parameter you can read above for the
    Redmond kettles.
    *Other RMC multi-cookers may need
    adjustments for the list of available programs, it depends
    on the device panel.*


  - **Xiaomi MJ_HT_V1 (type: xiaomihtv1)**
  - **Xiaomi LYWSD02MMC (type: xiaomihtv1)**
  - **Xiaomi LYWSD03MMC (type: xiaomilywsd)** (due to the connection to the device on
    every data fetch, it consumes more battery power. Flashing to the custom
    firmware is recommended)
  - **Xiaomi LYWSD03MMC with custom ATC firmware (xiaomilywsd_atc)**
    - supported both atc1441 and pvvx formats
  - **Qingping CGDK2 (type: qingpingCGDK2)**
  - **RuuviTag (type: ruuvitag)**
  - **RuuviTag Pro 2in1 (type: ruuvitag_pro_2in1)**
  - **RuuviTag Pro 3in1 (type: ruuvitag_pro_3in1)**
  - **RuuviTag Pro 4in1 (type: ruuvitag)**
  - **Govee H5074 (type: govee_ht)**


  - **Vson WP6003 (type: wp6003)**


  - **Generic AM43 (type: am43)**

    Manufacturer can be A-OK, Zemismart, etc.
  - **Soma Shades (type: soma_shades)**


  - **Avea RGBW bulbs (type: avea_rgbw)**


  - **Atom Fast (type: atomfast)**


  - **Ensto EPHBEBT10PR, EPHBEBT15PR (type: ensto_thermostat)**

    These devices require [manual pairing](#manual-pairing-in-linux).
    After the device is paired on the host device, see the logs for the `key` and
    put it to the config.

    The adapter uses holiday mode to control temperature as thermostat. You cannot
    use this feature in the official app while ble2mqtt is working.



  - **Roidmi NEX2 Pro (type: roidmi_cleaner)**



  - **BM2 car battery voltage meter (type: voltage_bm2)**




  - **LifeControl MCLH-09 (type: mclh09)**

    optionally, polling interval can be configured with `interval` parameter in seconds
  - **Xiaomi Mi Flora (type: miflora)**

    optionally, polling interval can be configured with `interval` parameter in seconds

  By default, a device works in the passive mode without connection by
  listening to advertisement packets from a device.
  To use connection to the device provide `"passive": false` parameter.

  **Supported devices in passive mode:**
  - Xiaomi MJ_HT_V1 (xiaomihtv1)
  - Xiaomi LYWSD03MMC with custom ATC firmware (xiaomilywsd_atc)
  - RuuviTag (ruuvitag/ruuvitag_pro_2in1/ruuvitag_pro_3in1)
  - Govee temperature/humidity sensors (govee_ht)
  - Any device as presence tracker



  Some devices (e.g. Ensto heaters) require paired connection to work with it.
  You need to pair the device with linux machine before using it.

  Find out MAC addresses of your devices. Put the device in pairing mode if it is supported.

  Open console and run `bluetoothctl` command. It is a command line tool to work with BLE devices.
  Wait for the prompt

  ```
  [bluetooth]#
  ```

  Print a command to enable scanning. Linux must know the device is present before pairing.

  ```
  [bluetooth]# scan on
  ```

  Wait for MAC address of the device appears in the list of found devices.
  Print a pairing command (replace MAC address to the one from your device)

  ```
  [bluetooth]# pair 90:fd:00:00:00:01
  ```

  On successful pairing you'll see a message:

  ```
  [CHG] Device 90:FD:00:00:00:01 Paired: yes
  Pairing successful
  ```
  You can proceed with the next configuration steps now.




  If using SELinux and you are experience issues, see [README.md](selinux/README.md).


  - *High cpu usage due to underlying library to work with bluetooth*

  **Use this software at your own risk.**



  Default config should be located in `/etc/ble2mqtt.json` or
  can be overridden with `BLE2MQTT_CONFIG` environment variable.

  Example run command:

  ```sh
  BLE2MQTT_CONFIG=./ble2mqtt.json ble2mqtt
  ```

  The configuration file is a JSON with the following content:

  ```json
  {
      "mqtt_host": "localhost",
      "mqtt_port": 1883,
      "mqtt_user": "",
      "mqtt_password": "",
      "log_level": "INFO",
      "devices": [
          {
              "address": "11:22:33:aa:cc:aa",
              "type": "presence"
          },
          {
              "address": "11:22:33:aa:bb:cc",
              "type": "redmond_rk_g200",
              "key": "ffffffffffffffff"
          },
          {
              "address": "11:22:33:aa:bb:c0",
              "type": "redmond_rmc_m200",
              "key": "ffffffffffffffff"
          },
          {
              "address": "11:22:33:aa:bb:c1",
              "type": "ensto_thermostat",
              "# see logs after pairing and put the key to config": "",
              "key": "00112233"
          },
          {
              "address": "11:22:33:aa:bb:cd",
              "type": "mikettle",
              "product_id": 275
          },
          {
              "address": "11:22:33:aa:bb:de",
              "type": "am43"
          },
          {
              "address": "11:22:33:aa:bb:dd",
              "type": "xiaomihtv1",
              "interval": 60
          },
          {
              "address": "11:22:34:aa:bb:dd",
              "type": "xiaomihtv1",
              "passive": false
          },
          {
              "address": "11:22:33:aa:bb:ee",
              "type": "xiaomilywsd"
          },
          {
              "address": "11:22:33:aa:bb:ff",
              "type": "xiaomilywsd_atc",
              "interval": 60
          },
          {
              "address": "11:22:33:aa:aa:aa",
              "type": "atomfast"
          },
          {
              "address": "11:22:33:aa:aa:bb",
              "type": "voltage_bm2"
          },
          {
              "address": "11:22:33:aa:aa:bc",
              "type": "mclh09",
              "interval": 600
          },
          {
              "address": "11:22:33:aa:aa:bd",
              "type": "miflora",
              "interval": 500
          },
          {
              "address": "11:22:33:aa:aa:be",
              "type": "ruuvitag",
              "interval": 60
          },
          {
              "address": "11:22:33:aa:aa:0a",
              "type": "roidmi_cleaner"
          }
      ]
  }
  ```

  You can omit a line, then default value will be used.

  Extra configuration parameters:
  - `"base_topic"`- the default value is 'ble2mqtt'
  - `"mqtt_prefix"`- a prefix to distinguish ble devices from other instances and
    programs. The default value is 'b2m_'.
  - `"hci_adapter"` - an adapter to use. The default value is "hci0"

  Devices accept `friendly_name` parameter to replace mac address in device
  names for Home Assistant.




  Put the following content to the unit file `/etc/systemd/system/ble2mqtt.service`

  ```
  [Unit]
  Description=ble2mqtt bridge

  [Service]
  Type=Simple
  ExecStart=/usr/local/bin/ble2mqtt
  User=ble2mqtt
  Group=ble2mqtt
  Wants=bluetooth.target

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

  The user and group should match the owner and group of the configuration file /etc/ble2mqtt.json.

  Afterwards you simply have to enable and start the service:

  ```sh
  sudo systemctl daemon-reload
  sudo systemctl enable ble2mqtt
  sudo systemctl start ble2mqtt
  ```





  Create the configuration file in /etc/ble2mqtt.json and
  append your devices.

  Execute the following commands in the terminal:

  ```sh
  opkg update
  opkg install python3-ble2mqtt
  /etc/init.d/ble2mqtt enable
  /etc/init.d/ble2mqtt start
  ```



  Execute the following commands in the terminal:

  ```sh
  opkg update
  opkg install python3-pip python3-asyncio
  pip3 install "bleak>=0.11.0"
  pip3 install -U ble2mqtt
  ```

  Create the configuration file in /etc/ble2mqtt.json and
  append your devices.

  Bluetooth must be turned on.

  ```sh
  hciconfig hci0 up
  ```

  Run the service in background

  ```sh
  ble2mqtt 2> /tmp/ble2mqtt.log &
  ```

  Add a service script to start:

  ```sh
  cat <<EOF > /etc/init.d/ble2mqtt


  START=98
  USE_PROCD=1

  start_service()
  {
      procd_open_instance

      procd_set_param env BLE2MQTT_CONFIG=/etc/ble2mqtt.json
      procd_set_param command /usr/bin/ble2mqtt
      procd_set_param stdout 1
      procd_set_param stderr 1
      procd_close_instance
  }
  EOF
  chmod +x /etc/init.d/ble2mqtt
  /etc/init.d/ble2mqtt enable
  /etc/init.d/ble2mqtt start
  ```



  Due to small CPU power and increasing number of messages from bluetoothd
  it is recommended to do several workarounds:

  1. Use passive mode for those sensors for which this is possible. E.g. use
     custom ATC firmware for lywsd03mmc sensors
  1. Restart `bluetoothd` daily and restart ble2mqtt several times a day to
     reduce increasing CPU usage.
     Put the following lines to the `/etc/crontabs/root`

   ```
  10 0,7,17 * * * /etc/init.d/ble2mqtt restart
  1 4,14 * * * /etc/init.d/bluetoothd restart
  ```



  Build the image as:

  ```sh
  podman build -t ble2mqtt:dev .
  ```

  Start the container and share the config file and DBus for Bluetooth connectivity:
  ```sh
  podman run \
  -d \
  --net=host \
  -v $PWD/ble2mqtt.json.sample:/etc/ble2mqtt.json:z \
  -v /var/run/dbus:/var/run/dbus:z \
  ble2mqtt:dev
  ```

  Instead of sharing `/var/run/dbus`, you can export `DBUS_SYSTEM_BUS_ADDRESS`.

  NOTE: `--net=host` is required as it needs to use the bluetooth interface

  NOTE: `podman` is the same as `docker`




  > **ATTENTION:** Make sure `bluez` is not running (or not intalled) on your host.

  Build the image as:

  ```sh
  docker build -t ble2mqtt:dev .
  ```

  Start the container and share the config file:
  ```sh
  docker run \
  -d \
  --net=host \
  --cap-add=NET_ADMIN \
  -v $PWD/ble2mqtt.json.sample:/etc/ble2mqtt.json:ro \
  ble2mqtt:dev
  ```

  Docker compose:
  ```yaml
  version: '3.7'
  services:

    ble2mqtt:
      image: ble2mqtt:dev
      build: ./ble2mqtt
      hostname: ble2mqtt
      restart: always
      environment:
        - TZ=Asia/Yekaterinburg
      volumes:
        - ./ble2mqtt/ble2mqtt.json:/etc/ble2mqtt.json:ro
      network_mode: host
      cap_add:
        - NET_ADMIN

  ```

  You do not need sharing `/var/run/dbus`, because `dbus` will start in the container.

  NOTE: `--net=host` and `--cap-add=NET_ADMIN` is required as it needs to use and control the bluetooth interface


pkgId: b144ffdeb7faded5e896c03429b24ef09d36f8f9e389a3bb578ae66b84d74624
name: python-bleach-allowlist
arch: src
version: 1.0.3
epoch: 0
release: 1
summary: Curated lists of tags and attributes for sanitizing html
url: https://github.com/yourcelf/bleach-allowlist.git
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bleach-allowlist-1.0.3-1.src.rpm
checksum_type: sha256
description:
  A curated list of tags, attributes, and styles suitable for filtering
  user-provided HTML using `bleach <http://bleach.readthedocs.org/en/latest/>`_.
  Currently, it consists of basic set of tags suitable for rendering markdown,
  and markup intended for printing, as well as a list of all CSS styles.  Please
  send pull requests with improvements or lists of tags and attributes for other
  purposes (wikis, comments, etc?).


pkgId: 35839175450e7502ddc8b243a80698a98b2a8bb94265320c8c2deeb961cd9811
name: python-bleach-whitelist
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: Curated lists of tags and attributes for sanitizing html
url: https://github.com/yourcelf/bleach-whitelist.git
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bleach-whitelist-0.0.11-1.src.rpm
checksum_type: sha256
description:
  This project and package have been renamed.
  Please see:
  - https://github.com/yourcelf/bleach-allowlist
  - https://pypi.org/project/bleach-allowlist/
  The package named `bleach-whitelist` will not see further updates, please use
  `bleach-allowlist` instead.


pkgId: afce0bb5641a88ca2cde0c2297da962599cf2bfef4cb3250779945fcbfa115f8
name: python-bleachrepo
arch: src
version: 0.0.24
epoch: 0
release: 1
summary: Find and remove the mold from your source control repositories
url: https://github.com/shesekino/bleach
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bleachrepo-0.0.24-1.src.rpm
checksum_type: sha256
description:
  Remove mold from your repositories :)

  Bleach is a project dedicated to helping software development teams keep track of their repositories and make sure no pull request is left unattended.
  Bleach may query GitHub and BitBucket repositories, and write alerts on pull requests open for too long to Slack.
  Bleach may also try to make an educated guess as for whether or not two branches are out of sync. For example, a `master` branch may be expected to contain all commits from a `staging` branch, and Bleach will alert if that is not the case.


  For unpriviliged users:
  `pip install --user bleachrepo`

  Or for priviliged users / with sudo:
  `pip install bleachrepo`



  `python -m bleach <org> <repo> <command> <additional_params_for_command>`

  Viable commands are:
  `pr` - check the status of open pull requests of given `<repo>` in `<org>`.
  `branch` - compare two branches, checking if commits are present in one branch, but not another.



  `pr` is used to check the status of pull requests in a given repo, and helps find pull requests that are open for too long.
  for example, `python -m bleach shesekino bleach pr` will write to `stdout` a summary of pull requests open for over 2 days.



  `branch` is used to check for commits appearing in one branch, but not another.
  This feature can be useful for repositories with a `master` branch that is expected to eventually contain all recent commits from a `staging` branch.
  `python -m bleach shesekino bleach branch test-branch-discrepancy-1 test-branch-discrepancy-2` will check if there are commits in branch `test-branch-discrepancy-2` that do not appear in `test-branch-discrepancy-1`.

  This feature somewhat relies on guesswork and assumptions.



  Public repositories require no special treatment.
  For private repositories, obtain a GitHub access token with `repo` permissions, then set it as an environment variable:

  `export BLEACH_GITHUB_ACCESS_TOKEN=<access token>`

  and run normally.



  Set a webhook URL to slack:

  `export BLEACH_SLACK_WEBHOOK=<webhook url>`

  then run:

  `python -m bleach --outputMethod slack <org> <repo> <command>`


pkgId: c923efc32385a7a30ab313f5b8fb928de9b085f08355b00061eb40d5e24d8725
name: python-bleak-esphome
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Bleak backend of ESPHome
url: https://github.com/bluetooth-devices/bleak-esphome
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bleak-esphome-1.1.0-1.src.rpm
checksum_type: sha256
description:
  **Documentation**: <a href="https://bleak-esphome.readthedocs.io" target="_blank">https://bleak-esphome.readthedocs.io </a>


pkgId: 5bcdfca26cb918d2113b0e04be2c47eec420882401369dfe0169396698e9fa2e
name: python-bleak-retry-connector
arch: src
version: 3.6.0
epoch: 0
release: 1
summary: A connector for Bleak Clients that handles transient connection failures
url: https://github.com/bluetooth-devices/bleak-retry-connector
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bleak-retry-connector-3.6.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="https://github.com/bluetooth-devices/bleak-retry-connector/actions?query=workflow%3ACI">
      <img src="https://img.shields.io/github/workflow/status/bluetooth-devices/bleak-retry-connector/CI/main?label=CI&logo=github&style=flat-square" alt="CI Status" >
    </a>
    <a href="https://bleak-retry-connector.readthedocs.io">
      <img src="https://img.shields.io/readthedocs/bleak-retry-connector.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
    </a>
    <a href="https://codecov.io/gh/bluetooth-devices/bleak-retry-connector">
      <img src="https://img.shields.io/codecov/c/github/bluetooth-devices/bleak-retry-connector.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
    </a>
  </p>
  <p align="center">
    <a href="https://python-poetry.org/">
      <img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
    </a>
    <a href="https://github.com/ambv/black">
      <img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square" alt="black">
    </a>
    <a href="https://github.com/pre-commit/pre-commit">
      <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
    </a>
  </p>
  <p align="center">
    <a href="https://pypi.org/project/bleak-retry-connector/">
      <img src="https://img.shields.io/pypi/v/bleak-retry-connector.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
    </a>
    <img src="https://img.shields.io/pypi/pyversions/bleak-retry-connector.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
    <img src="https://img.shields.io/pypi/l/bleak-retry-connector.svg?style=flat-square" alt="License">
  </p>

  A connector for Bleak Clients that handles transient connection failures



  Install this via pip (or your favourite package manager):

  `pip install bleak-retry-connector`



  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

  <!-- prettier-ignore-start -->
  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  <!-- markdownlint-disable -->
  <!-- markdownlint-enable -->
  <!-- ALL-CONTRIBUTORS-LIST:END -->
  <!-- prettier-ignore-end -->

  This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!



  This package was created with
  [Cookiecutter](https://github.com/audreyr/cookiecutter) and the
  [browniebroke/cookiecutter-pypackage](https://github.com/browniebroke/cookiecutter-pypackage)
  project template.


pkgId: cad9d0163c9560b802e3a0893871e79562bd141065fafd6009e9edb1ae8c14ce
name: python-blechpy
arch: src
version: 2.2.14
epoch: 0
release: 1
summary: Package for exrtacting, processing and analyzing Intan and OpenEphys data
url: https://github.com/nubs01/blechpy
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blechpy-2.2.14-1.src.rpm
checksum_type: sha256
description:
  See the <a href='https://nubs01.github.io/blechpy'>full documentation</a> here.

  - [blechpy](#blechpy)
  - [Installation](#installation)
  - [Usage](#usage)
  - [Datasets](#datasets)
    * [Starting wit a raw dataset](#starting-wit-a-raw-dataset)
      + [Create dataset](#create-dataset)
      + [Initialize Parameters](#initialize-parameters)
      + [Basic Processing](#basic-processing)
      + [Viewing a Dataset](#viewing-a-dataset)
    * [Loading an existing dataset](#loading-an-existing-dataset)
    * [Import processed dataset into dataset framework](#import-processed-dataset-into-dataset-framework)
  - [Experiments](#experiments)
    * [Creating an experiment](#creating-an-experiment)
    * [Editing recordings](#editing-recordings)
    * [Held unit detection](#held-unit-detection)

  <small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>


  This is a package to extract, process and analyze electrophysiology data recorded with Intan or OpenEphys recording systems. This package is customized to store experiment and analysis metadata for the BLECh Lab (Katz lab) @ Brandeis University, but can readily be used and customized for other labs.



  Currently, blechpy is only developed and validated to work properly on Linux operating systems. It is possible to use blechpy on Mac, but some GUI features may not work properly. It is not possible to use blechpy on Windows.


  Because blechpy depends on a very specific mix of package versions, it is required to install blechpy in a virtual environment. *We highly recommend using miniconda to handle your virtual environments. You can download miniconda here: https://docs.conda.io/en/latest/miniconda.html*


  We recommend using a computer with at least 32gb of ram and a muti-core processor. The more cores and memory, the better. Memory usage scales with core usage--memory needed to run without overflow errors as you increase the number of cores used. It is possible to run memory-intensive functions with fewer cores to avoid overflow errors, but this will increase processing time. It is also possible to re-run memory-intensive functions after an overflow error, and the function will pick up where it left off.


  Right now this pipeline is only compatible with recordings done with Intan's 'one file per channel' or 'one file per signal type' recordings settings.





  Create a miniconda environment with:
  ```bash
  conda create -n blechpy python==3.7.13
  conda activate blechpy
  ```
  Now you can install the package with pip:
  ```bash
  pip install blechpy
  ```



  Once you have installed blechpy, you will need to perform some steps to "activate" blechpy, whenever you want to use it.

  1) open up a bash terminal (control+alt+t on ubuntu)
  2) activate your miniconda environment with the following command:
  ```bash
  conda activate blechpy
  ```
  3) start an ipython console by typing into the terminal
  ```bash
  ipython
  ```
  4) You will now be in an ipython console. Now, import blechpy. Simply type:
  ```python
  import blechpy
  ```
  Now, you can use blechpy functions in your ipython console.


  To update blechpy, open up a bash terminal and type:
  ```bash
  conda activate blechpy #activate your blechpy virtual environment
  pip install blechpy -U #install updated version of blechpy
  ```


  If your operating system is Ubuntu version 20.XX LTS, "import blechpy" may throw a "segmentation fault" error. This is because numba version 0.48 available via pip-install is corrupted. You can fix this issue by reinstalling numba via conda, by entering the following command in your bash terminal:

  ```bash
  conda install numba=0.48.0
  ```


  blechpy handles experimental metadata using data_objects which are tied to a directory encompassing some level of data. Existing types of data_objects include:
  * dataset
      * object for a single recording session
      * to create a dataset, you will need to have recording files from a single recording in its own "dataset folder". The path to this folder is the "recording directory"
      * The dataset processing pipleine creates 2 critical files that will live alongside your recording files in the dataset folder: the .h5 file and the .p file. The .h5 file contains the actual processed data, along with some metadata. The .p file contains additional critical metadata.
      * code lives in blechpy/datastructures/dataset.py
  * experiment
      * object encompasing an ordered set of recordings from a single animal
      * individual recordings must first be processed as datasets
      * to create an experiment, you will need to have all the dataset folders from a single animal in its own "experiment folder". The path to this folder is the "experiment directory"
      * code lives in blechpy/datastructures/experiment.py
  * project
      * object that can encompass multiple experiments & data groups and allow analysis or group differences
      * to create a project, you will need to have all the experiment folders from a single project in its own "project folder". The path to this folder is the "project directory"
      * code lives in blechpy/datastructures/project.py
  * HMMHandler
    * object that can be used to set up and run hidden markov model analysis on a dataset
    * HMMHandler objects are created on the level of the dataset. You will need to have a fully processed dataset to create an HMMHandler object from it.





  With a brand new *shiny* dataset, the most basic recommended data extraction workflow would be:
  ```python
  dat = blechpy.dataset('/path/to/data/dir/') #create dataset object. Path to data dir should be your recording directory


  dat.initParams(data_quality='hp') # follow GUI prompts.
  dat.extract_data()          # Extracts raw data into HDF5 store
  dat.create_trial_list()     # Creates table of digital input triggers
  dat.mark_dead_channels()    # View traces and label electrodes as dead, or just pass list of dead channels
  dat.common_average_reference() # Use common average referencing on data. Repalces raw with referenced data in HDF5 store
  dat.detect_spikes()        # Detect spikes in data. Replaces raw data with spike data in HDF5 store
  dat.blech_clust_run(umap=True)       # Cluster data using GMM
  dat.sort_spikes(electrode_number) # Split, merge and label clusters as units. Follow GUI prompts. Perform this for every electrode
  dat.post_sorting() #run this after you finish sorting all electrodes
  dat.make_PSTH_plots() #optional: make PSTH plots for all units
  dat.make_raster_plots() #optional: make raster plots for all units
  ```


  It is common to get the following error after running the functions `dat.detect_spikes() ` or `dat.blech_clust_run()`:
  ```python
  TerminatedWorkerError: A worker process managed by the executor was unexpectedly terminated. This could be caused by a segmentation fault while calling the function or by an excessive memory usage causing the Operating System to kill the worker.
  ```
  **If you encounter this error, simply re-run the function which caused the error, and it will pick-up where it left off.** Occasionally, you may have to do this several times before the function completes.

  The reason for this error is that these functions multi-process across channels, but underlying libraries like scipy also parallelize their own operations. This makes it impossible for the program to know how much memory will be used to automatically constrain the number of multi-processes used.



  blechpy.dataset() makes a NEW dataset or to OVERWRITES an existing dataset. DO NOT use it on an existing dataset unless you want to overwrite the existing dataset and lose you preprocessing progress with it.
  ```python
  dat = blechpy.dataset('path/to/recording/directory') # replace quoted text with the filepath to the folder where your recording files are

  dat = blechpy.dataset()  # for user interface to select directory
  ```
  This will create a new dataset object and setup basic file paths. You should only do this when starting data processing for the first time. If you use it on a processed dataset, it will get overwritten.


  If you already have a dataset and want to pick up where you left off, use blechpy.load_dataset() instead of blechpy.dataset().
  ```python
  dat = blechpy.load_dataset('/path/to/recording/directory')  # create dataset object

  dat = blechpy.load_dataset()  # for user interface to select directory

  dat = blechpy.load_dataset('path/to/dataset/save/file.p')
  ```


  ```python
  dat.initParams()
  ```
  Initalizes all analysis parameters with a series of prompts.
  See prompts for optional keyword params.
  Primarily setups parameters for:
  * Flattening Port & Channel in Electrode designations
  * Common average referencing
  * Labelling areas of electrodes
  * Labelling digital inputs & outputs
  * Labelling dead electrodes
  * Clustering parameters
  * Spike array creation
  * PSTH creation
  * Palatability/Identity Responsiveness calculations

  Initial parameters are pulled from default json files in the dio subpackage.
  Parameters for a dataset are written to json files in a *parameters* folder in the recording directory.


  ```python
  dat.initParams(data_quality='noisy') # alternative: less strict clustering parameters
  dat.initParams(car_keyword='2site_OE64') # automatically map channels to hirose-connector 64ch OEPS EIB in 2-site implantation
  dat.initParams(car_keyword='bilateral64') # automatically map channels to omnetics-connector 64ch EIB in 2-site implantation
  dat.initParams(shell=True) # alternative: bypass GUI interface in favor of shell interface, useful if working over SSH or GUI is broken

  dat.initParams(data_quality='hp', car_keyword='bilateral64', shell=True)
  ```


  ```python
  dat.mark_dead_channels() # opens GUI to view traces and label dead channels
  ```
  Marking dead channels is critical for good common average referencing, since dead channels typically have a signal that differs a lot from the "true" average voltage at the electrode tips.


  If you already know your dead channels a-priori, you can pass them to mark_dead_channels() as a list of integers:
  ```python
  dat.mark_dead_channels([dead channel indices]) # dead channel indices eg. : [1,2,3]
  ```


  blech_clust_run's keywords can change the clustering algorithm and/or parameters
  ```python
  dat.blech_clust_run(data_quality='noisy') # alternative: re-run clustering with less strict parameters
  dat.blech_clust_run(umap=True) # alternative: cluster with UMAP instead of GMM, improves clustering
  dat.blech_clust_run() # default uses PCA instead of UMAP, which is faster, but lower quality clustering
  ```



  If you want to move a dataset folder, it is critical you perform the following steps:
  1) move the dataset folder to the desired location
  2) copy the new dataset folder directory (right click on folder, select copy)
  3) in the ipython console, run the following commands:
  ```Python
  new_directory = 'path/to/new/dataset/folder' # You can paste the directory by right clicking and selecting 'paste filename'
  dat = blechpy.load_dataset(new_directory) # load the dataset
  dat._change_root(new_directory) # change the root directory of the dataset to the new directory
  dat.save() # save the new directory to the dataset file
  ```

  ```python
  dat.processing_status
  ```
  Can provide an overview of basic data extraction and processing steps that need to be taken.


  Experiments can be easily viewed wih: `print(dat)`
  A summary can also be exported to a text with: `dat.export_to_text()`



  ```python
  dat = blechpy.port_in_dataset()

  dat = blechpy.port_in_dataset('/path/to/recording/directory')
  ```



  ```python
  exp = blechpy.experiment('/path/to/dir/encasing/recordings')

  exp = blechpy.experiment()
  ```
  This will initalize an experiment with all recording folders within the chosen directory.


  ```python
  exp.add_recording('/path/to/new/recording/dir/')    # Add recording
  exp.remove_recording('rec_label')                   # remove a recording dir
  ```
  Recordings are assigned labels when added to the experiment that can be used to easily reference exerpiments.


  ```python
  exp.detect_held_units()
  ```
  Uses raw waveforms from sorted units to determine if units can be confidently classified as "held". Results are stored in exp.held_units as a pandas DataFrame.
  This also creates plots and exports data to a created directory:
  /path/to/experiment/experiment-name_analysis


  The `blechpy.analysis` module has a lot of useful tools for analyzing your data.
  Most notable is the `blechpy.analysis.poissonHMM` module which will allow fitting of the HMM models to your data. See tutorials.


pkgId: 873193e0fc10e72e2f440ed61940c3bc19f5461e48942478fede70171da6dcb2
name: python-bleep-it
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: Text filtering tool
url: https://github.com/Marseel-E/bleep-it
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bleep-it-0.2.2-1.src.rpm
checksum_type: sha256
description:
  ![Python version](https://img.shields.io/badge/Python->%3D3.9-blue?style=flat&logo=python&logoColor=yellow&link=https://www.python.org/downloads/)


  Text filtering tool


  [Installation](#installation)
  [Quickstart](#quickstart)
  [Documentation](#documentation)
  [Bleep-it Tools](#bleep-it-tools)
  [License](LICENSE)


  ```cmd
  pip install bleep-it

  :: for Latest (unstable)
  pip install git+https://github.com/Marseel-E/bleep-it
  ```


  ```py
  import asyncio
  import bleep


  async def main():
    while True:
      text = input("text: ")

      filtered_text = await bleep.filter(text=text, strickness=2)

      print("filtered_text:", filtered_text)


  if __name__ == '__main__':
    asyncio.run(main())
  ```



  ```py
  await filter(text, strickness=2, action=Censor())
  ```
  This function is a [coroutine](https://docs.python.org/3/library/asyncio-task.html#coroutine).

  Filters the text given and returns the filtered test.


  - text ( [str](https://docs.python.org/3/library/stdtypes.html#str) ) - The text to be filtered.
  - strickness ( [int](https://docs.python.org/3/library/functions.html#int) ) - The level of strickness of the filtering.
  - action ( [Censor](#censor) | [Remove](#remove) ) - The action to take when filtering a word.


  The filtered text.


  [str](https://docs.python.org/3/library/stdtypes.html#str)

  <hr />


  Sensors the filtered word.


  - `async` generate


  This function is a [coroutine](https://docs.python.org/3/library/asyncio-task.html#coroutine).

  Generates the censorship to replace the word with.


  - word ( [str](https://docs.python.org/3/library/stdtypes.html#str) ) - The word to be censored.


  The censored replacement for the word.


  [str](https://docs.python.org/3/library/stdtypes.html#str)

  <hr />


  Removes the filtered word from the text.



  [Bleep-it Tools](https://github.com/Marseel-E/bleep-it-tools) is an extension for Bleep-it that allows you to
  - [x] Create custom words.
  - [ ] ~~Generate other languages.~~ `soon`


pkgId: 5d58d995c98964387bf7ebb534d43ec1e95f6b945992ca391befc12d63bd8c2e
name: python-blender-asset-tracer
arch: src
version: 1.18
epoch: 0
release: 1
summary: BAT parses Blend files and produces dependency information. After installation run `bat --help`
url: https://developer.blender.org/project/profile/79/
rpm_license: GPL-2.0+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blender-asset-tracer-1.18-1.src.rpm
checksum_type: sha256
description:
  Script to manage assets with Blender.

  Blender Asset Tracer, a.k.a. BAT🦇, is the replacement of
  [BAM](https://developer.blender.org/diffusion/BAM/) and
  [blender-file](https://developer.blender.org/source/blender-file/)

  Development is driven by choices explained in [T54125](https://developer.blender.org/T54125).



  ```
  python3.9 -m venv .venv
  . ./.venv/bin/activate
  pip install -U pip
  pip install poetry black
  poetry install
  mypy --install-types
  ```




  BAT Pack supports uploading to S3-compatible storage. This requires a credentials file in
  `~/.aws/credentials`. Replace the all-capital words to suit your situation.

      [ENDPOINT]
      aws_access_key_id = YOUR_ACCESS_KEY_ID
      aws_secret_access_key = YOUR_SECRET

  You can then send a BAT Pack to the storage using a target `s3:/ENDPOINT/bucketname/path-in-bucket`,
  for example:

      bat pack my_blendfile.blend s3:/storage.service.cloud/jobs/awesome_work

  This will upload the blend file and its dependencies to `awesome_work/my_blendfile.blend` in
  the `jobs` bucket.




  There are two object types used to represent file paths. Those are strictly separated.

  1. `bpathlib.BlendPath` represents a path as stored in a blend file. It consists of bytes, and is
     blendfile-relative when it starts with `//`. It can represent any path from any OS Blender
     supports, and as such should be used carefully.
  2. `pathlib.Path` represents an actual path, possibly on the local filesystem of the computer
     running BAT. Any filesystem operation (such as checking whether it exists) must be done using a
     `pathlib.Path`.

  When it is necessary to interpret a `bpathlib.BlendPath` as a real path instead of a sequence of
  bytes, BAT first attempts to decode it as UTF-8. If that fails, the local filesystem encoding is
  used. The latter is also no guarantee of correctness, though.




  The code statically type-checked with [mypy](http://mypy-lang.org/).

  Mypy likes to see the return type of `__init__` methods explicitly declared as `None`. Until issue
  [#604](https://github.com/python/mypy/issues/604) is resolved, we just do this in our code too.




  BAT can be used as a Python library to inspect the contents of blend files, without having to
  open Blender itself. Here is an example showing how to determine the render engine used:

      
      import json
      import sys
      from pathlib import Path

      from blender_asset_tracer import blendfile
      from blender_asset_tracer.blendfile import iterators

      if len(sys.argv) != 2:
          print(f'Usage: {sys.argv[0]} somefile.blend', file=sys.stderr)
          sys.exit(1)

      bf_path = Path(sys.argv[1])
      bf = blendfile.open_cached(bf_path)

      
      window_managers = bf.find_blocks_from_code(b'WM')
      assert window_managers, 'The Blend file has no window manager'
      window_manager = window_managers[0]

      
      windows = window_manager.get_pointer((b'windows', b'first'))
      for window in iterators.listbase(windows):
          scene = window.get_pointer(b'scene')
          break

      
      
      engine = scene[b'r', b'engine'].decode('utf8')
      xsch = scene[b'r', b'xsch']
      ysch = scene[b'r', b'ysch']
      size = scene[b'r', b'size'] / 100.0

      render_info = {
          'engine': engine,
          'frame_pixels': {
              'x': int(xsch * size),
              'y': int(ysch * size),
          },
      }

      json.dump(render_info, sys.stdout, indent=4, sort_keys=True)
      print()

  To understand the naming of the properties, look at Blender's `DNA_xxxx.h` files with struct
  definitions. It is those names that are accessed via `blender_asset_tracer.blendfile`. The
  mapping to the names accessible in Blender's Python interface can be found in the `rna_yyyy.c`
  files.




  This section documents some guidelines for the code in BAT.



  All imports should be done at the top level of the file, and not inside
  functions. The goal is to ensure that, once imported, a (sub)module of BAT can
  be used without having to import more parts of BAT.

  This requirement helps to keep Blender add-ons separated, as an add-on can
  import the modules of BAT it needs, then remove them from `sys.modules` and
  `sys.path` so that other add-ons don't see them. This should reduce problems
  with various add-ons shipping different versions of BAT.



  For uploading packages to PyPi, an API key is required; username+password will
  not work.

  First, generate an API token at https://pypi.org/manage/account/token/. Then,
  use this token when publishing instead of your username and password.

  As username, use `__token__`.
  As password, use the token itself, including the `pypi-` prefix.

  See https://pypi.org/help/#apitoken for help using API tokens to publish. This
  is what I have in `~/.pypirc`:

  ```
  [distutils]
  index-servers =
      bat


  [bat]
    repository = https://upload.pypi.org/legacy/
    username = __token__
    password = pypi-abc-123-blablabla
  ```

  ```
  . ./.venv/bin/activate
  pip install twine

  poetry build
  twine check dist/blender_asset_tracer-1.18.tar.gz dist/blender_asset_tracer-1.18-*.whl
  twine upload -r bat dist/blender_asset_tracer-1.18.tar.gz dist/blender_asset_tracer-1.18-*.whl
  ```


pkgId: 75a5be904a40ce450cad4cd82344f136ef9b10d35d723678b3759b8cbfeaca6a
name: python-blender-downloader
arch: src
version: 1.0.5
epoch: 0
release: 1
summary: Blender portable release downloader.
url: https://pypi.org/project/blender-downloader/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blender-downloader-1.0.5-1.src.rpm
checksum_type: sha256
description:
  [![PyPI][pypi-version-badge-link]][pypi-link]
  [![Python versions][pypi-pyversions-badge-link]][pypi-link]
  [![License][license-image]][license-link]
  [![Tests][tests-image]][tests-link]
  [![Coverage status][coverage-image]][coverage-link]

  Multiplatform Python CLI utility that downloads a specific portable release of
  Blender by version/os/bits from official Blender repositories. The minimum
  supported version is v2.57.



  ```bash
  pip install blender-downloader
  ```



  > Execute `blender-downloader --help` to see all supported arguments.



  ```bash
  blender-downloader 2.92
  ```



  ```bash
  blender-downloader stable
  ```



  ```bash
  blender-downloader stable --extract --print-blender-executable
  ```



  ```bash
  blender-downloader --list
  ```

  [pypi-link]: https://pypi.org/project/blender-downloader
  [pypi-version-badge-link]: https://img.shields.io/pypi/v/blender-downloader?logo=pypi&logoColor=white
  [pypi-pyversions-badge-link]: https://img.shields.io/pypi/pyversions/blender-downloader?logo=python&logoColor=white
  [license-image]: https://img.shields.io/pypi/l/blender-downloader?color=light-green&logo=freebsd&logoColor=white
  [license-link]: https://github.com/mondeja/blender-downloader/blob/master/LICENSE
  [tests-image]: https://img.shields.io/github/actions/workflow/status/mondeja/blender-downloader/ci.yml?logo=github&label=tests&branch=master
  [tests-link]: https://github.com/mondeja/blender-downloader/actions?query=workflow%3ACI
  [coverage-image]: https://img.shields.io/codecov/c/github/mondeja/blender-downloader?logo=codecov&logoColor=white
  [coverage-link]: https://app.codecov.io/gh/mondeja/blender-downloader


pkgId: ce0dd90fe53a1886c39f3c415f526127bcf16cb7b3c481e95a70eac55296f134
name: python-blender-extension-builder
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Build Blender extensions.
url: https://github.com/ego-lay-atman-bay/blender-extension-builder
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blender-extension-builder-1.0.0-1.src.rpm
checksum_type: sha256
description:
  A builder for blender extensions.

  Blender allows you to add dependencies via packaging wheels with the extension, however you have to manually grab the wheels and put the filenames in the `blender_manifest.toml` file. This can be cumbersome, especially with many dependencies, and dependencies of dependencies that you don't control. This project aims to aid in that, and make it all a lot easier.



  Install via pip

  ```
  pip install blender-extension-builder
  ```

  You also need Blender available on the PATH in order to build the extension.



  You can use the command

  ```
  build-blender-extension -h
  ```

  Or

  ```
  python -m build_blender_extension -h
  ```



  Since this aims to make managing dependencies easier, there are a couple things added to the `blender_manifest.toml` file. The file will be structured like any `blender_manifest.toml` file, just with a few new options.

  ```toml
  schema_version = "1.0.0"
  id = "my_example_extension"
  version = "1.0.0"
  name = "My Example Extension"
  tagline = "This is another extension"
  maintainer = "Developer name <email@address.com>"
  type = "add-on"
  blender_version_min = "4.2.0"
  license = [
    "SPDX:GPL-3.0-or-later",
  ]


  dependencies = [
      'numpy'
  ]

  wheel-path = './wheels'



  wheels = [
    './wheels/pillow-10.3.0-cp311-cp311-win_amd64.whl',
  ]

  [build]



  source = './src'

  build = './build'

  dist = './dist'


  paths_include = [
    'LICENSE',
    'README.md',
  ]
  ```

  All you have to do is now run

  ```
  build-blender-extension -m blender_manifest.toml
  ```

  Note: if you don't specify any arguments, it will try to use `blender_manifest.toml`.

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


pkgId: 7ddac36d5b5cb601cf9408b81fedf2c40e18b8fea9d66908b0c85754fe5bb8ba
name: python-blender-stubs
arch: src
version: 3.12.27
epoch: 0
release: 1
summary: API stubs for Blender and UPBGE generated with bpystubgen.
url: https://github.com/mysticfall/bpystubgen
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blender-stubs-3.12.27-1.src.rpm
checksum_type: sha256
description:
  This module provides type information for [Blender](https://www.blender.org) and
  [UPBGE](https://upbge.org)'s Python API, following the
  [PEP-561](https://www.python.org/dev/peps/pep-0561/) standard.
  It was generated using [BPY Stub Generator](https://github.com/mysticfall/bpystubgen) which
  is also available on [PyPI](https://pypi.org/project/bpystubgen) as a separate module.

  Auto-completion at work in PyCharm:
  ![Screenshot in PyCharm](https://github.com/mysticfall/bpystubgen/raw/main/images/screenshot-pycharm.png?raw=true "Screenshot in PyCharm")
  Pop-up documentation support in VSCode:
  ![Screenshot in VSCode](https://github.com/mysticfall/bpystubgen/raw/main/images/screenshot-vscode.png?raw=true "Screenshot in VSCode")

  There are two variants of the API stubs, one for Blender and the other for UPBGE. For Blender,
  you can install `blender-stubs` module with appropriate version qualifier as follows:
  ```bash
  $ pip install blender-stubs==3.1.26
  ```
  This will install the latest module for Blender 2.93, and for now stubs are provided for Blender
  2.80 and onwards. You can also specify the next unreleased version as `3.1.*` to get the latest
  snapshot of the module:
  ```bash
  $ pip install blender-stubs==3.2.*
  ```
  A stub module for UPBGE 0.3, as well as pre-release versions for the master branch are also
  available on PyPI repository. For the stable version, you can install it as follows:
  ```bash
  $ pip install upbge-stubs==0.3.0.26
  ```
  And for the latest snapshot,
  ```bash
  $ pip install upbge-stubs==0.3.1.*
  ```
  You can also install the module using `Pipenv`. Note that it is required to set `allow_preleases` option
  in case you want to install a snapshot release (e.g. UPBGE 0.3.1.*).
  You can use the following content as a template for your `Pipfile`:
  ```toml
  [[source]]
  name = "pypi"
  url = "https://pypi.org/simple"
  verify_ssl = true
  [packages]
  "upbge-stubs" = "==0.3.1.*"
  [requires]
  python_version = "3.10"
  [pipenv]
  allow_prereleases = true
  ```
  You may want to use `[dev-packages]` instead of `[packages]` as it's more appropriate to do so,
  in which case you can install or update the stubs using the `-d` flag like `pipenv update -d`.

  This project is provided under the terms of
  [GNU General Public License v3 (GPL3)](https://github.com/mysticfall/bpystubgen/blob/main/LICENSE).


pkgId: 45154c1db416974059ae0dc3027ea14b17cfe67dd7a3def6f45607f11222d157
name: python-blender-wrapper
arch: src
version: 0.1.24
epoch: 0
release: 1
summary: Utility tools for blender. Execute some automation tasks by running background blender process.
url: https://github.com/ImagineersHub/blender-wrapper
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blender-wrapper-0.1.24-1.src.rpm
checksum_type: sha256
description:
  [![Python package](https://github.com/ImagineersHub/blender-wrapper/actions/workflows/python-package.yml/badge.svg)](https://github.com/ImagineersHub/blender-wrapper/actions/workflows/python-package.yml)


  Utility tools and script for blender automation


pkgId: 0bc5e7d106f9dc5e6df20b55feef7fc5f2c0fe0acc5fc1e73a1346c4873008aa
name: python-blenderproc
arch: src
version: 2.8.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/DLR-RM/BlenderProc
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blenderproc-2.8.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <a href="https://www.dlr.de/EN/Home/home_node.html"><img src="images/logo.svg" hspace="3%" vspace="60px"></a>
  </div>


pkgId: 093627ab90aab5df1b52304cedf55aa5cf52e24dd23b9c3d029d8bbdfc58eb21
name: python-blendersynth
arch: src
version: 0.2.7
epoch: 0
release: 1
summary: Synthetic Rendering for Blender
url: https://github.com/OllieBoyne/BlenderSynth
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blendersynth-0.2.7-1.src.rpm
checksum_type: sha256
description:
  <a href="https://ollieboyne.github.io/BlenderSynth/">
  <img src="docs/logo.png" alt="BlenderSynth logo"/>
  </a>

  <a href="https://ollieboyne.github.io/BlenderSynth/python/output_data.html">
  <img src="docs/splash.png" alt="BlenderSynth rendering example"/>
  </a>

  <p align="center">
    <a href="https://opensource.org/licenses/MIT">
      <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
    </a>
      <a href="https://pypi.org/project/BlenderSynth/">
          <img src="https://badge.fury.io/py/BlenderSynth.svg" alt="PyPI version">
      </a>
      <a href="https://black.readthedocs.io">
          <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
      </a>
    </p>

  <p align="center">
  <a href="https://ollieboyne.github.io/BlenderSynth/">Documentation</a> |
  <a href="https://github.com/OllieBoyne/BlenderSynth">GitHub</a> |
  <a href="https://pypi.org/project/blendersynth/">PyPI</a>
  </p>

  BlenderSynth is a Python library for generating large scale synthetic datasets using [Blender](https://www.blender.org/). Compared to other tools, BlenderSynth provides support for: <b>Custom <a href="https://docs.blender.org/manual/en/latest/render/shader_nodes/output/aov.html">Shader AOVs</a></b> to render rich per-pixel information; **node control**; <b><a href="https://ollieboyne.github.io/BlenderSynth/python/dataset_creation/index.html">multithreading</a></b> support; and <b><a href="https://ollieboyne.github.io/BlenderSynth/python/multiview_rendering.html">multiview</a></b> rendering support.



  See documentation for [installation](https://ollieboyne.github.io/BlenderSynth/getting_started/installation.html), [debugging/troubleshooting](https://ollieboyne.github.io/BlenderSynth/getting_started/troubleshooting.html) and [examples](https://ollieboyne.github.io/BlenderSynth/).

  BlenderSynth supports Blender 3 and 4.



  This project is currently in Beta. Please let me know what new features you would like, or feel free to make a pull request!

  If you use BlenderSynth for a project, please [contact me](https://ollieboyne.github.io) about it - I might include it in the documentation as a usage example!



  If you use BlenderSynth in your work, please cite:

  ```
  @software{blendersynth,
    author       = {Ollie Boyne},
    title        = {BlenderSynth},
    year         = 2023,
    publisher    = {GitHub},
    url          = {https://ollieboyne.github.io/BlenderSynth},
  }
  ```



  Rendering speed compared to [BlenderProc](https://github.com/DLR-RM/BlenderProc):

  ![](docs/benchmark-1.png)


pkgId: ec4333761e096d20a5cd766d5c360b5fe184cc9ed89b3020c0e26b84f9f77f44
name: python-blending_toolkit
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Blending ToolKit
url: https://lsstdesc.org/BlendingToolKit/index.html
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blending_toolkit-1.0.1-1.src.rpm
checksum_type: sha256
description:
  [![tests](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/pytest.yml)
  [![notebooks](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/notebooks.yml/badge.svg?branch=main)](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/notebooks.yml)
  [![docs](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/docs.yml)
  [![codecov](https://codecov.io/gh/LSSTDESC/BlendingToolKit/branch/main/graph/badge.svg)](https://codecov.io/gh/LSSTDESC/BlendingToolKit)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
  [![PyPI][pypi-badge]][pypi]

  [pypi-badge]: <https://img.shields.io/pypi/pyversions/blending-toolkit?color=yellow&logo=pypi>
  [pypi]: <https://pypi.org/project/blending-toolkit/>



  Framework for fast generation and analysis of galaxy blends catalogs. This toolkit is a convenient way of
  producing multi-band postage stamp images of blend scenes and evaluate the performance of deblending algorithms.

  Documentation can be found at <https://lsstdesc.org/BlendingToolKit/index.html>.



  <img src="docs/source/images/diagram.png" alt="btk workflow" width="550"/>

  In red are components of the BTK pipeline that are intended to be easily customized by users to meet their
  science needs.



  In what follows we illustrate how to use BTK to generate blended images, run a deblender on them, and
  evaluate the performance of the deblender using metrics. For more details on this example see our
  quick-start notebook at `notebooks/00-quickstart.ipynb`.

  ```python
  import btk


  catalog_name = "../data/input_catalog.fits"
  catalog = btk.catalog.CatsimCatalog.from_file(catalog_name)


  survey = btk.survey.get_surveys("LSST")



  stamp_size = 24.0
  sampling_function = btk.sampling_functions.DefaultSampling(
      catalog=catalog, max_number=5, max_mag=25.3, stamp_size=stamp_size
  )


  batch_size = 100
  draw_generator = btk.draw_blends.CatsimGenerator(
      catalog, sampling_function, survey, batch_size
  )


  blend_batch = next(draw_generator)


  deblender = btk.deblend.SepSingleBand(max_n_sources=5,
                            use_band=2 # measure on 'r' band
                            )


  deblend_batch = deblender(blend_batch)


  matcher = btk.match.PixelHungarianMatcher(pixel_max_sep=5.0 # maximum separation in pixels for matching
  )


  truth_catalogs = blend_batch.catalog_list
  pred_catalogs = deblend_batch.catalog_list
  matching = matcher(truth_catalogs, pred_catalogs) # object with matching information


  recall = btk.metrics.detection.Recall(batch_size)
  precision = btk.metrics.detection.Precision(batch_size)
  print("Recall: ", recall(matching.tp, matching.t, matching.p))
  print("Precision: ", precision(matching.tp, matching.t, matching.p))
  ```



  BTK is pip installable, with the following command:

  ```bash
  pip install blending-toolkit
  ```

  In case of any issues and for details of required packages, please see the more detailed installation instructions [here](https://lsstdesc.org/BlendingToolKit/install.html).



  Everyone can contribute to this project, please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) document for details.

  In short, to interact with the project you can:

  - Ask or Answer questions on the [Discussions Q&A page](https://github.com/LSSTDESC/BlendingToolKit/discussions).
  - Report a bug by opening a [GitHub issue](https://github.com/LSSTDESC/BlendingToolKit/issues).
  - Open a [GitHub issue](https://github.com/LSSTDESC/BlendingToolKit/issue) or [Discussions](https://github.com/LSSTDESC/BlendingToolKit/discussions) to ask for feedback on a planned contribution.
  - Submit a [Pull Request](https://github.com/LSSTDESC/BlendingToolKit/pulls) to contribute to the code.

  Issues marked with `contributions welcome` or `good first issue` are particularly good places to start. These are great ways to learn more about the inner workings of BTK.



  If you use this software for your research, please cite using the following bibtex entry:

  ```
  @ARTICLE{mendoza2024btk,
         author = {{Mendoza}, Ismael and {Torchylo}, Andrii and {Sainrat}, Thomas and {Guinot}, Axel and {Boucaud}, Alexandre and {Paillassa}, Maxime and {Avestruz}, Camille and {Adari}, Prakruth and {Aubourg}, Eric and {Biswas}, Biswajit and {Buchanan}, James and {Burchat}, Patricia and {Doux}, Cyrille and {Joseph}, Remy and {Kamath}, Sowmya and {Malz}, Alex I. and {Merz}, Grant and {Miyatake}, Hironao and {Roucelle}, C{\'e}cile and {Zhang}, Tianqing and {the LSST Dark Energy Science Collaboration}},
          title = "{The Blending ToolKit: A simulation framework for evaluation of galaxy detection and deblending}",
        journal = {arXiv e-prints},
       keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics},
           year = 2024,
          month = sep,
            eid = {arXiv:2409.06986},
          pages = {arXiv:2409.06986},
            doi = {10.48550/arXiv.2409.06986},
  archivePrefix = {arXiv},
         eprint = {2409.06986},
   primaryClass = {astro-ph.IM},
         adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv240906986M},
        adsnote = {Provided by the SAO/NASA Astrophysics Data System}
  }
  ```


pkgId: 49636e10e29d0325cc3d3b2f5a3193d10b7cc6c57341c01fbff87b2a9c98c066
name: python-blendmodes
arch: src
version: 2024.1.1
epoch: 0
release: 1
summary: Use this module to apply a number of blending modes to a background and foreground image
url: https://github.com/FHPythonUtils/BlendModes
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blendmodes-2024.1.1-1.src.rpm
checksum_type: sha256
description:
  [![GitHub top language](https://img.shields.io/github/languages/top/FHPythonUtils/BlendModes.svg?style=for-the-badge&cacheSeconds=28800)](../../)
  [![Issues](https://img.shields.io/github/issues/FHPythonUtils/BlendModes.svg?style=for-the-badge&cacheSeconds=28800)](../../issues)
  [![License](https://img.shields.io/github/license/FHPythonUtils/BlendModes.svg?style=for-the-badge&cacheSeconds=28800)](/LICENSE.md)
  [![Commit activity](https://img.shields.io/github/commit-activity/m/FHPythonUtils/BlendModes.svg?style=for-the-badge&cacheSeconds=28800)](../../commits/master)
  [![Last commit](https://img.shields.io/github/last-commit/FHPythonUtils/BlendModes.svg?style=for-the-badge&cacheSeconds=28800)](../../commits/master)
  [![PyPI Downloads](https://img.shields.io/pypi/dm/blendmodes.svg?style=for-the-badge&cacheSeconds=28800)](https://pypistats.org/packages/blendmodes)
  [![PyPI Total Downloads](https://img.shields.io/badge/dynamic/json?style=for-the-badge&label=total%20downloads&query=%24.total_downloads&url=https%3A%2F%2Fapi%2Epepy%2Etech%2Fapi%2Fv2%2Fprojects%2Fblendmodes)](https://pepy.tech/project/blendmodes)
  [![PyPI Version](https://img.shields.io/pypi/v/blendmodes.svg?style=for-the-badge&cacheSeconds=28800)](https://pypi.org/project/blendmodes)

  <!-- omit in toc -->


  <img src="readme-assets/icons/name.png" alt="Project Icon" width="750">

  Use this module to apply a number of blending modes to a background and
  foreground image.



  Credits to:



  For implementing blending from the Open Raster Image Spec



  For implementing blending from Paint.NET



  For implementing a number of blending functions used by other popular image
  editors

  - [Credits](#credits)
  	- [MIT License Copyright (c) 2019 Paul Jewell](#mit-license-copyright-c-2019-paul-jewell)
  	- [MIT License Copyright (c) 2018 Addison Elliott](#mit-license-copyright-c-2018-addison-elliott)
  	- [MIT License Copyright (c) 2017 pashango](#mit-license-copyright-c-2017-pashango)
  - [Documentation](#documentation)
  - [Install With PIP](#install-with-pip)
  - [Language information](#language-information)
  	- [Built for](#built-for)
  - [Install Python on Windows](#install-python-on-windows)
  	- [Chocolatey](#chocolatey)
  	- [Windows - Python.org](#windows---pythonorg)
  - [Install Python on Linux](#install-python-on-linux)
  	- [Apt](#apt)
  	- [Dnf](#dnf)
  - [Install Python on MacOS](#install-python-on-macos)
  	- [Homebrew](#homebrew)
  	- [MacOS - Python.org](#macos---pythonorg)
  - [How to run](#how-to-run)
  	- [Windows](#windows)
  	- [Linux/ MacOS](#linux-macos)
  - [Building](#building)
  - [Testing](#testing)
  - [Download Project](#download-project)
  	- [Clone](#clone)
  		- [Using The Command Line](#using-the-command-line)
  		- [Using GitHub Desktop](#using-github-desktop)
  	- [Download Zip File](#download-zip-file)
  - [Community Files](#community-files)
  	- [Licence](#licence)
  	- [Changelog](#changelog)
  	- [Code of Conduct](#code-of-conduct)
  	- [Contributing](#contributing)
  	- [Security](#security)
  	- [Support](#support)
  	- [Rationale](#rationale)




  A high-level overview of how the documentation is organized organized will help you know
  where to look for certain things:

  - [Tutorials](/documentation/tutorials) take you by the hand through a series of steps to get
    started using the software. Start here if you’re new.
  - The [Technical Reference](/documentation/reference) documents APIs and other aspects of the
    machinery. This documentation describes how to use the classes and functions at a lower level
    and assume that you have a good high-level understanding of the software.
  <!--
  - The [Help](/documentation/help) guide provides a starting point and outlines common issues that you
    may have.
  -->



  ```python
  pip install blendmodes
  ```

  Head to https://pypi.org/project/blendmodes/ for more info





  This program has been written for Python versions 3.8 - 3.11 and has been tested with both 3.8 and
  3.11





  ```powershell
  choco install python
  ```



  To install Python, go to https://www.python.org/downloads/windows/ and download the latest
  version.





  ```bash
  sudo apt install python3.x
  ```



  ```bash
  sudo dnf install python3.x
  ```





  ```bash
  brew install python@3.x
  ```



  To install Python, go to https://www.python.org/downloads/macos/ and download the latest
  version.





  - Module
  	`py -3.x -m [module]` or `[module]` (if module installs a script)

  - File
  	`py -3.x [file]` or `./[file]`



  - Module
  	`python3.x -m [module]` or `[module]` (if module installs a script)

  - File
  	`python3.x [file]` or `./[file]`



  This project uses https://github.com/FHPythonUtils/FHMake to automate most of the building. This
  command generates the documentation, updates the requirements.txt and builds the library artefacts

  Note the functionality provided by fhmake can be approximated by the following

  ```sh
  handsdown  --cleanup -o documentation/reference
  poetry export -f requirements.txt --output requirements.txt
  poetry export -f requirements.txt --with dev --output requirements_optional.txt
  poetry build
  ```

  `fhmake audit` can be run to perform additional checks



  For testing with the version of python used by poetry use

  ```sh
  poetry run pytest
  ```

  Alternatively use `tox` to run tests over python 3.8 - 3.11

  ```sh
  tox
  ```







  1. Press the Clone or download button in the top right
  2. Copy the URL (link)
  3. Open the command line and change directory to where you wish to
  clone to
  4. Type 'git clone' followed by URL in step 2

  	```bash
  	git clone https://github.com/FHPythonUtils/BlendModes
  	```

  More information can be found at
  https://help.github.com/en/articles/cloning-a-repository



  1. Press the Clone or download button in the top right
  2. Click open in desktop
  3. Choose the path for where you want and click Clone

  More information can be found at
  https://help.github.com/en/desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop



  1. Download this GitHub repository
  2. Extract the zip archive
  3. Copy/ move to the desired location





  MIT License
  (See the [LICENSE](/LICENSE.md) for more information.)



  See the [Changelog](/CHANGELOG.md) for more information.



  Online communities include people from many backgrounds. The *Project*
  contributors are committed to providing a friendly, safe and welcoming
  environment for all. Please see the
  [Code of Conduct](https://github.com/FHPythonUtils/.github/blob/master/CODE_OF_CONDUCT.md)
   for more information.



  Contributions are welcome, please see the
  [Contributing Guidelines](https://github.com/FHPythonUtils/.github/blob/master/CONTRIBUTING.md)
  for more information.



  Thank you for improving the security of the project, please see the
  [Security Policy](https://github.com/FHPythonUtils/.github/blob/master/SECURITY.md)
  for more information.



  Thank you for using this project, I hope it is of use to you. Please be aware that
  those involved with the project often do so for fun along with other commitments
  (such as work, family, etc). Please see the
  [Support Policy](https://github.com/FHPythonUtils/.github/blob/master/SUPPORT.md)
  for more information.



  The rationale acts as a guide to various processes regarding projects such as
  the versioning scheme and the programming styles used. Please see the
  [Rationale](https://github.com/FHPythonUtils/.github/blob/master/RATIONALE.md)
  for more information.


pkgId: 94d0e240fcb4ff4da03f92aa9ce1642578ea347568f21cd8c5fd901a7fc92b77
name: python-blendr-cli
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Blendr CLI tool for GPU Lending
url: https://www.blendr.network
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blendr-cli-0.2.0-1.src.rpm
checksum_type: sha256
description:
  Blendr CLI is a command-line interface designed to help users lend their GPU resources for computational tasks on the Blendr platform. This tool allows for easy setup, management, and monitoring of GPU resources from your terminal.



  - **User Authentication**: Secure login to access the Blendr platform.
  - **GPU Detection**: Automatically detect and list available GPUs on the host machine.
  - **Task Management**: Listen and respond to computational tasks distributed via the Blendr network.
  - **Initial Setup**: Configure the CLI tool to optimize performance and resource usage.



  These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.



  What things you need to install the software and how to install them:

  ```bash
  python3 -m pip install --upgrade pip
  ```



  A step-by-step series of examples that tell you how to get a development environment running:


  Install the package using pip:

  ```bash
  pip install blendr-cli
  ```

  Verify the installation:

  ```bash
  blendr --help
  ```
  If the installation was successful, you should see the help message for the blendr command.



  Below are some examples of how to use the CLI:

  Log in to Blendr:
  ```bash
  blendr login
  ```
  Perform initial setup:

  ```bash
  blendr initalsetup
  ```

  Listen for tasks:
  ```bash
  blendr listentask
  ```


  For those looking to contribute or simply tinker with the CLI tool, here's how to get started with development.

  Clone the repository:

  ```bash
  git clone https://github.com/blendr-network/blendr-cli.git
  cd blendr-cli
  ```
  Install dependencies:


  ```bash
  pip install -r requirements.txt
  ```
  Run the tool:


  ```bash
  python -m blendr.cli
  ```

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


  This project is licensed under the MIT License - see the LICENSE.md file for details.


  Hat tip to anyone whose code was used
  Inspiration
  etc
  vbnet



  - **Customize**: Replace placeholders like URLs and usernames with actual values relevant to your project.
  - **Expand**: You might want to expand sections depending on the complexity and features of your CLI tool.
  - **Markdown Styling**: Take advantage of GitHub's Markdown for formatting, such as tables, lists, and code blocks to make the README more readable and organized.

  This `README.md` will help your users understand how to install, configure, and use your CLI tool, as well as how to contribute to its development.


pkgId: e4479ddc3d1e0e095193ac2ec9976fcc080d379b80dbcbb9d094b655a770927b
name: python-bleu
arch: src
version: 0.3
epoch: 0
release: 1
summary: A Python Wrapper to calculate standard BLEU scores for NLP
url: https://github.com/zhijing-jin/bleu
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bleu-0.3-1.src.rpm
checksum_type: sha256
description:
  [![Pypi](https://img.shields.io/pypi/v/bleu.svg)](https://pypi.org/project/bleu)
  [![Downloads](https://pepy.tech/badge/bleu)](https://pepy.tech/project/bleu)
  [![Month_Downloads](https://pepy.tech/badge/bleu/month)](https://pepy.tech/project/bleu/month)

  A Python Wrapper for the standard BLEU evaluation for Natural Language Generation (NLG).
  - GitHub project: [https://github.com/zhijing-jin/bleu](https://github.com/zhijing-jin/bleu).
  - PyPI package: `pip install`[`bleu`](https://pypi.org/project/bleu/)


  Requirement: Python 3

  **Option 1: Install pip package**
  ```bash
  pip install --upgrade bleu
  ```
  **Option 2: Build from source**
  ```bash
  pip install --upgrade git+git://github.com/zhijing-jin/bleu.git
  ```

  The most standard way to calculate BLEU is by [Moses' script for detokenized BLEU](https://raw.githubusercontent.com/moses-smt/mosesdecoder/master/scripts/generic/multi-bleu-detok.perl). This package provides easy calls to it.

  If you want to check only one hypothesis (a list of sentences):
  ```python
  >>> from bleu import list_bleu
  >>> ref = ['it is a white cat .',
               'wow , this dog is huge .']
  >>> ref1 = ['This cat is white .',
               'wow , this is a huge dog .']
  >>> hyp = ['it is a white kitten .',
              'wowww , the dog is huge !']
  >>> hyp1 = ["it 's a white kitten .",
               'wow , this dog is huge !']
  >>> list_bleu([ref], hyp)
  34.99
  >>> list_bleu([ref, ref1], hyp1)
  57.91
  ```
  If you want to check multiple hypothesis (several lists of sentences):
  ```python
  >>> from bleu import multi_list_bleu
  >>> multi_list_bleu([ref, ref1], [hyp, hyp1])
  [34.99, 57.91]
  ```
  `detok=False`: It is not advisable to use tokenized bleu (by [multi-bleu.perl](https://raw.githubusercontent.com/moses-smt/mosesdecoder/master/scripts/generic/multi-bleu.perl)), but if you want to call it, just use `detok=False`:
  ```python
  >>> list_bleu([ref], hyp, detok=False)
  39.76

  >>> multi_list_bleu([ref, ref1], [hyp, hyp1], detok=False)
  [39.76, 47.47]
  ```
  `verbose=True`: If there are unexpected errors, you might want to check the intermediate steps by `verbose=True`.


  If you want to check only one hypothesis file:
  ```python

  >>> from bleu import file_bleu
  >>> hyp_file = 'data/hyp0.txt'
  >>> ref_files = ['data/ref0.txt', 'data/ref1.txt']
  >>> file_bleu(ref_files, hyp_file)
  34.99
  ```
  If you want to check multiple hypothesis files:
  ```python
  >>> from bleu import multi_file_bleu
  >>> hyp_file1 = 'data/hyp1.txt'
  >>> bleus = multi_file_bleu(ref_files, [hyp_file, hyp_file1])
  [34.99, 57.91]
  ```
  `detok=True`: Set it if you want to calculate the (not recommended) tokenized bleu.

  `verbose=True`: Set it if you want to inspect how the bleu calculations are made:
  ```python
  >>> bleu = file_bleu(ref_files, hyp_file, verbose=True)
  [Info] Valid Reference Files: ['data/ref0.txt', 'data/ref1.txt']
  [Info] Valid Hypothesis Files: ['data/hyp0.txt']
  [Info] #lines in each file: 2
  [cmd] perl detokenizer.perl -l en < data/ref0.txt > data/ref0.detok.txt 2>/dev/null
  [cmd] perl detokenizer.perl -l en < data/ref1.txt > data/ref1.detok.txt 2>/dev/null
  [cmd] perl detokenizer.perl -l en < data/hyp0.txt > data/hyp0.detok.txt 2>/dev/null
  [cmd] perl multi-bleu-detok.perl data/ref0.detok.txt data/ref1.detok.txt < data/hyp0.detok.txt
  2-ref bleu for data/hyp0.detok.txt: 34.99
  >>> bleu
  34.99
  ```

  ```python
  >>> from bleu import detok_files
  >>> detok_ref_files = detok_files(ref_files, tmp_dir='./data', file_prefix='ref_dtk', verbose=True)
  [cmd] perl ./TMP_DIR/detokenizer.perl -l en < data/ref0.txt > data/ref_dtk0.txt 2>/dev/null
  [cmd] perl ./TMP_DIR/detokenizer.perl -l en < data/ref1.txt > data/ref_dtk1.txt 2>/dev/null
  >>> detok_ref_files
  ['data/ref_dtk0.txt', 'data/ref_dtk1.txt']
  ```

  Check the python file [bleu.py](https://github.com/zhijing-jin/bleu/blob/master/bleu/bleu.py) and adapt it.


  If you have more questions, feel free to check out the common [Q&A](https://github.com/zhijing-jin/bleu/issues?utf8=%E2%9C%93&q=is%3Aissue), or raise a new GitHub issue.

  In case of really urgent needs, contact the author [Zhijing Jin (Miss)](mailto:zhijing.jin@connect.hku.hk).


pkgId: 3f59f0aef1fe9ea8c63bb7430d6319215cd12822907c523938219560a4882627
name: python-blib-py
arch: src
version: 1.5.3
epoch: 0
release: 1
summary: Boonleng's Python Library
url: https://pypi.org/project/blib-py/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blib-py-1.5.3-1.src.rpm
checksum_type: sha256
description:
  This is a collection of some convenient functions, color schemes, etc. for convenient coding in the future.



  ```shell
  pip install blib-py
  ```



  Download the project from either GitHub or ARRC GitLab:

  ```shell
  git clone https://github.com/boonleng/blib-py.git
  ```

  or

  ```shell
  git clone https://git.arrc.ou.edu/cheo4524/blib-py.git
  ```

  Change directory to the project folder and install using `pip`.

  ```shell
  cd blib-py
  pip install .
  ```



  It is possible to use this library without installation. Assuming that you downloaded the project into the folder `~/Developer/blib-py/src`, you can add the path to Python's search path as follows.

  ```python
  import os
  import sys

  sys.path.insert(0, os.path.expanduser('~/Developer/blib-py/src'))

  import blib
  ```



  A theme can be activated by:

  ```python
  blib.useTheme("light")

  blib.showLineColors()
  ```

  ![light](https://raw.githubusercontent.com/boonleng/blib-py/master/blob/line-colors-light.png)

  ```python
  blib.useTheme("dark")

  blib.showLineColors()
  ```

  ![dark](https://raw.githubusercontent.com/boonleng/blib-py/master/blob/line-colors-dark.png)

rpm_license:
  MIT License  Copyright (c) 2018-2023 boonleng  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: 1ada21526aba103aa1cb5cb8564577c6350406319eb076220fa22811ac95930e
name: python-blickfeld-scanner
arch: src
version: 2.20.6
epoch: 0
release: 1
summary: Python package to communicate with LiDAR devices of the Blickfeld GmbH.
url: https://github.com/Blickfeld/blickfeld-scanner-lib
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blickfeld-scanner-2.20.6-1.src.rpm
checksum_type: sha256
description:
  The blickfeld-scanner-lib (BSL) is the interface for communicating with Blickfeld LiDAR devices.

  The library is currently available for Python and C++.
  With it, Blickfeld [Cube 1](https://www.blickfeld.com/products/cube-1/) and [Cube Range 1](https://www.blickfeld.com/products/cube-range-1/) devices can be configured and point clouds can be fetched.
  Additionally, it supports NTP time synchronization and point cloud recordings.



  Follow the [installation guide](https://docs.blickfeld.com/cube/latest/external/blickfeld-scanner-lib/install.html) or find the most common installation commands below.



  ```bash
  pip install blickfeld_scanner
  ```



  ```bash
  sudo apt update
  sudo apt install -y wget libprotobuf-dev libprotobuf17
  wget https://github.com/Blickfeld/blickfeld-scanner-lib/releases/latest/download/blickfeld-scanner-lib-dev-Linux.deb
  sudo dpkg -i blickfeld-scanner-lib-dev-Linux.deb
  ```

  Follow the [getting started guide](https://docs.blickfeld.com/cube/latest/external/blickfeld-scanner-lib/getting_started.html).



  The Blickfeld software manual, which includes the BSL documentation, can be found at [docs.blickfeld.com/cube](https://docs.blickfeld.com/cube/latest/external/blickfeld-scanner-lib/README.html).

  To find the matching software manual for a specific BSL version, automatic redirect links are available.
  Use the link `https://docs.blickfeld.com/cube/redirect/blickfeld-scanner-lib/vx.x.x.html` and replace `vx.x.x` with the BSL version.



  Copyright (c) 2020, Blickfeld GmbH
  All rights reserved.

  This source code is licensed under the BSD-style license found in the
  [LICENSE.md](LICENSE.md) file in the root directory of this source tree.


pkgId: 7b1ee52bb2ac98549ea356d75f95200aa84e1b62c30ebde83751c6b36d0d9f8f
name: python-blik
arch: src
version: 0.9.1
epoch: 0
release: 1
summary: Python tool for visualising and interacting with cryo-ET and subtomogram averaging data.
url: https://pypi.org/project/blik/
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blik-0.9.1-1.src.rpm
checksum_type: sha256
description:
  ![logo](https://github.com/brisvag/blik/raw/main/docs/images/logo.png)



  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10090438.svg)](https://zenodo.org/doi/10.5281/zenodo.10090438)
  [![Paper DOI](https://zenodo.org/badge/DOI/10.1371/journal.pbio.3002447.svg)](https://doi.org/10.1371/journal.pbio.3002447)
  [![License](https://img.shields.io/pypi/l/blik.svg?color=green)](https://github.com/brisvag/blik/raw/main/LICENSE)
  [![PyPI](https://img.shields.io/pypi/v/blik.svg?color=green)](https://pypi.org/project/blik)
  [![Python Version](https://img.shields.io/pypi/pyversions/blik.svg?color=green)](https://python.org)
  [![CI](https://github.com/brisvag/blik/actions/workflows/ci.yml/badge.svg)](https://github.com/brisvag/blik/actions/workflows/ci.yml)
  [![codecov](https://codecov.io/gh/brisvag/blik/branch/main/graph/badge.svg)](https://codecov.io/gh/brisvag/blik)


  ![blik showcase](https://user-images.githubusercontent.com/23482191/161224963-ad746a06-c2e5-46fe-a13b-f356bc4ad72b.png)

  **`blik`** is a tool for visualising and interacting with cryo-ET and subtomogram averaging data. It leverages the fast, multi-dimensional [napari viewer](https://napari.org) and the scientific python stack.

  **DISCLAIMER**: this package is in development phase. Expect bugs and crashes. Please, report them on the issue tracker and ask if anything is unclear!



  You can either install `blik` through the [napari plugin system](https://napari.org/plugins/index.html), through pip, or get both napari and blik directly with:

  ```bash
  pip install "blik[all]"
  ```

  The `[all]` qualifier also installs `pyqt5` as the napari GUI backend, and a few additional napari plugins that you might find useful in your workflow:
  - [napari-properties-plotter](https://github.com/brisvag/napari-properties-plotter)
  - [napari-properties-viewer](https://github.com/kevinyamauchi/napari-properties-viewer)
  - [napari-label-interpolator](https://github.com/brisvag/napari-label-interpolator)



  If you'd like the most up to date `blik` possible, you can install directly from the `main` branch on github. This also uses napari `main`, so expect some instability!

  ```
  pip install "git+https://github.com/brisvag/blik.git@main#egg=blik[all]"
  pip install "git+https://github.com/napari/napari.git@main#egg=napari[all]"
  ```



  From the command line:
  ```bash
  napari -w blik -- /path/to.star /path/to/mrc/files/*
  ```

  The `-w blik` is important for proper initialization of all the layers. Always open the main widget open to ensure nothing goes wrong!

  *`blik` is just `napari`*. Particles and images are exposed as simple napari layers, which can be analysed and manipulated with simple python, and most importantly other [napari plugins](https://napari-hub.org/).



  The main widget has a few functions:

  - `experiment`: quickly switch to a different experiment id (typically, everything related to an individual tomogram such as volume, particles and segmentations)
  - `new`: generate a new `segmentation`, a new manually-picked set of `particles`, or a new `surface`, `sphere`, or `filament picking` for segmentation, particle generation or volume resampling.
  - `add to exp`: add a layer to the currently selected `experiment` (just a shorthand for `layer.metadata['experiment_id'] = current_exp_id`)
  - `slice_thickness`: changes the slicing thickness in all dimensions in napari. Images will be averaged over that thickness, and all particles in the slice will be displayed.

  There are also widgets for picking surfaces, spheres and filaments:

  - `surface`: process a previously picked `surface picking` layer to generate a surface mesh and distribute particles on it for subtomogram averaging, or resample a tomogram along the surface.
  - `sphere`: process a previously picked `sphere picking` layer to generate a sphere mesh and distribute particles on it for subtomogram averaging.
  - `filament`: process a previously picked `filament picking` layer to generate a filament and distribute particles on it for subtomogram averaging, or resample a tomogram along the filament.



  If you use `blik`, please cite the repo on zenodo and the paper on Plos Biology: [https://doi.org/10.1371/journal.pbio.3002447](https://doi.org/10.1371/journal.pbio.3002447).


pkgId: 7a7a0cc162fe9196804cf2df92e477c8f2d83d883f27ec49f4171f439ca679c4
name: python-blimpy
arch: src
version: 2.1.4
epoch: 0
release: 1
summary: Python utilities for Breakthrough Listen SETI observations
url: https://github.com/ucberkeleyseti/blimpy
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blimpy-2.1.4-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/UCBerkeleySETI/blimpy/workflows/Test%20Blimpy/badge.svg)](https://github.com/UCBerkeleySETI/blimpy/actions)
  [![Documentation Status](https://readthedocs.org/projects/blimpy/badge/?version=latest)](https://blimpy.readthedocs.io/en/latest/?badge=latest)
  [![codecov](https://codecov.io/gh/UCBerkeleySETI/blimpy/branch/master/graph/badge.svg)](https://codecov.io/gh/UCBerkeleySETI/blimpy)
   [![JOSS status](http://joss.theoj.org/papers/e58ef21f0a924041bf9438fd75f8aed0/status.svg)](http://joss.theoj.org/papers/e58ef21f0a924041bf9438fd75f8aed0)





  This repository contains Python 2/3 readers for interacting with [Sigproc filterbank](http://sigproc.sourceforge.net/sigproc.pdf) (.fil), HDF5 (.h5) and [guppi raw](https://baseband.readthedocs.io/en/stable/guppi/) (.raw) files,
  as used in the [Breakthrough Listen](https://seti.berkeley.edu) search for intelligent life.





  Sometimes the `pip` installation can fail if a system dependency is not installed. To fix this, make sure you have `curl` and install the required system dependencies with the command bellow:


  ```
  curl https://raw.githubusercontent.com/UCBerkeleySETI/blimpy/master/dependencies.txt | xargs -n 1 sudo apt install --no-install-recommends -y
  ```



  The latest release can be installed via pip directly from this repository:

  ```
  python3 -m pip install -U git+https://github.com/UCBerkeleySETI/blimpy
  ```

  Or, the latest version of the development code can be installed from the github [repo](https://github.com/UCBerkeleySETI/blimpy) and then run `python setup.py install` or `pip install .` (with sudo if required), or by using the following terminal command:

  ```
  python3 -m pip install -U https://github.com/UCBerkeleySETI/blimpy/tarball/master
  ```

  To install everything required to run the unit tests, run:

  ```
  python3 -m pip install -e .[full]
  ```

  You will need `numpy`, `h5py`, `astropy`, `scipy`, and `matplotlib` as dependencies. A `pip install` should pull in numpy, h5py, and astropy, but you may still need to install scipy and matplotlib separately.
  To interact with compressed files, you'll need the `hdf5plugin` package too.

  Note that h5py generally needs to be installed in this way:

  ```
  $ python3 -m pip install --no-binary=h5py h5py
  ```



  After installation, the following command will display the metadata (header) values and some information about the data matrix:

  `watutil  -i`

  Other command line utilities available post-installation:
  * `bldice`, Extract a smaller frequency region from a Filterbank file (.fil or .h5 file).
  * `calcload`, Calculate the Waterfall max_load value needed to load the entire data array for a given Filterbank file.
  * `dsamp`, Down-sample (time-dimension only) from one Filterbank file to another.
  * `fil2h5`, Convert a .fil file into .h5 format.
  * `h52fil`, Convert an .h5 file into .fil format.
  * `matchfils`, Check if two .fil files are the same.
  * `peek`, Display a selected portion of values from the data matrix of a Filterbank file.
  * `rawhdr`, Display the header fields of a raw guppi file.
  * `rawutil`, Plot data in a guppi raw file.
  * `srcname`, Patch the header source_name field in a .h5 file.
  * `stax`, For a collection of .h5 or .fil files sharing the same frequency range, create a vertical stack of waterfall plots as a single PNG file.
  * `stix`, For a single very large Filterbank file, create a horizontal or vertical stack of waterfall plots as a single PNG file.
  * `watutil`, Information/read/write/plot utility for Filterbank files.

  Use the `-h` flag to any of the above command line utilities to display their available arguments.



  The `blimpy.Waterfall`  provides a Python API for interacting with filterbank data. It supports all BL filterbank data products; see this [example Jupyter notebook](https://github.com/UCBerkeleySETI/blimpy/blob/master/examples/voyager.ipynb) for an overview.

  From the python, ipython or jupiter notebook environments.

  ```python
  from blimpy import Waterfall
  fb = Waterfall('/path/to/filterbank.fil')

  fb.info()
  data = fb.data
  ```


  The [Guppi Raw format](https://github.com/UCBerkeleySETI/breakthrough/blob/master/doc/RAW-File-Format.md) can be read using the `GuppiRaw` class from `guppi.py`:

  ```python
  from blimpy import GuppiRaw
  gr = GuppiRaw('/path/to/guppirawfile.raw')

  header, data = gr.read_next_data_block()
  ```

  or

  ```python
  from blimpy import GuppiRaw
  gr = GuppiRaw('/path/to/guppirawfile.raw')

  for header, data_x, data_y in gr.get_data():
      
  ```

  Note: most users should start analysis with filterbank files, which are smaller in size and have been generated from the guppi raw files.


  The blimpy images are pushed to a public repository after each successful build on Travis.
  If you have Docker installed, you can run the following commands to pull our images, which have the environment and dependencies set up for you.

  `docker pull fx196/blimpy:py3_kern_stable`

  Here is a [more complete guide](./docker_guide.md) on using blimpy in Docker.



  A detailed overview of the data formats used in Breakthrough Listen can be found in our [data format paper](https://ui.adsabs.harvard.edu/abs/2019arXiv190607391L/abstract). An archive of data files from the Breakthrough Listen program is provided at [seti.berkeley.edu/opendata](http://seti.berkeley.edu/opendata).


pkgId: 1fde61d6de401769724f81639349e991ace70f9a498c0686c34b50805356beb6
name: python-blincus-test
arch: src
version: 0.2
epoch: 0
release: 1
summary: A Blincus payment processing package.
url: https://github.com/nathan2002-hash/test-blincus-python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blincus-test-0.2-1.src.rpm
checksum_type: sha256
description:
  The Blincus Python SDK provides a simple way to interact with the Blincus API.



  You can install the package via pip:

  ```bash
  pip install blincus


pkgId: c97e7904e9292d75feb6aeace22ed91d007b4b21160775853075b6444461b0f5
name: python-blindai
arch: src
version: 0.6.3
epoch: 0
release: 1
url: https://github.com/mithril-security/blindai
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blindai-0.6.3-1.src.rpm
checksum_type: sha256
summary:
  BlindAI Core / API is an open-source and easy-to-use Python library allowing you to query AI models with assurances that your private data will remain private

description:
  <a name="readme-top"></a>

  [![Contributors][contributors-shield]][contributors-url]
  [![Forks][forks-shield]][forks-url]
  [![Stargazers][stars-shield]][stars-url]
  [![Issues][issues-shield]][issues-url]
  [![Apache License][license-shield]][license-url]


  <!-- PROJECT LOGO -->
  <br />
  <div align="center">
    <a href="https://github.com/mithril-security/blindai">
      <img src="https://github.com/mithril-security/blindai/raw/main/docs/assets/logo.png" alt="Logo" width="80" height="80">
    </a>

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

  [![Website][website-shield]][website-url]
  [![Blog][blog-shield]][blog-url]
  [![LinkedIn][linkedin-shield]][linkedin-url]

    <p align="center">
      <b>BlindAI</b> is an <b>AI privacy solution</b>, allowing users to query popular AI models or serve their own models whilst ensuring that users' data remains private every step of the way.
  	<br /><br />
      <a href="https://blindai.mithrilsecurity.io/en/latest"><strong>Explore the docs »</strong></a>
      <br />
      <br />
      <a href="https://blindai.mithrilsecurity.io/en/latest/docs/getting-started/quick-tour/">Try Demo</a>
      ·
      <a href="https://github.com/mithril-security/blindai/issues">Report Bug</a>
      ·
      <a href="https://github.com/mithril-security/blindai/issues">Request Feature</a>
    </p>
  </div>



  <!-- TABLE OF CONTENTS -->
  <details>
    <summary>Table of Contents</summary>
    <ol>
      <li>
        <a href="#-about-the-project">About The Project</a>
        <ul>
          <li><a href="#built-with">Built With</a></li>
        </ul>
      </li>
      <li>
        <a href="#-getting-started">Getting Started</a>
        <ul>
          <li><a href="#blindai-api">BlindAI API</a></li>
          <li><a href="#blindai-core">BlindAI Core</a></li>
        </ul>
      </li>
      <li><a href="#-usage">Usage</a></li>
      <li><a href="#-getting-help">Getting Help</a></li>
      <li><a href="#-license">License</a></li>
      <li><a href="#-contact">Contact</a></li>
    </ol>
  </details>

  <!-- ABOUT THE PROJECT -->


  **BlindAI** is an **open-source solution** to query and deploy AI models while **guaranteeing data privacy**. The querying of models is done via our **easy-to-use Python library**.

  Data sent by users to the AI model is kept **confidential at all times** by hardware-enforced **Trusted Execution Environments**. We explain how they keep data and models safe in detail [here](https://blindai.mithrilsecurity.io/en/latest/docs/getting-started/confidential_computing/).

  There are two main scenarios for BlindAI:

  - **BlindAI API**: Using BlindAI to query popular AI models hosted by Mithril Security.
  - **BlindAI Core**: Using BlindAI's underlying technology to host your own BlindAI server instance to securely deploy your own models.

  You can find our more about BlindAI API and BlindAI Core [here](https://blindai.mithrilsecurity.io/en/latest/docs/getting-started/blindai_structure/).



  [![Rust][Rust]][Rust-url] [![Python][Python]][Python-url] [![Intel-SGX][Intel-SGX]][Intel-sgx-url] [![Tract][Tract]][tract-url]

  <p align="right">(<a href="#readme-top">back to top</a>)</p>

  <!-- GETTING STARTED -->


  We strongly recommend for you to get started with our [Quick tour](https://blindai.mithrilsecurity.io/en/latest/docs/getting-started/quick-tour/) to discover BlindAI with the open-source model Whisper.

  But here’s a taste of what using BlindAI could look like 🍒



  ```py
  transcript = blindai.api.Audio.transcribe(
      file="patient_104678.wav"
  )
  print(transcript)

  The patient is a 55-year old male with known coronary artery disease.
  ```





  An AI company AI company want to provide their model as an an easy-to-use service. They upload it to the server, which is assigned a model ID.

  ```py
  response = client_1.upload_model(model="./COVID-Net-CXR-2.onnx")
  MODEL_ID = response.model_id
  print(MODEL_ID)

  8afcdab8-209e-4b93-9403-f3ea2dc0c3ae
  ```

  When collaborating with clients is done, the AI company can delete their model from the server.

  ```py

  client_1.delete_model(MODEL_ID)
  ```



  The client wants to feed their confidential data to the model while protecting it from third-party access. They connect and run the model on the following confidential image.

  ![](https://github.com/mithril-security/blindai/blob/main/docs/assets/positive_image.png)

  ```py
  pos_ret = client_2.run_model(MODEL_ID, positive)
  print("Probability of Covid for positive image is", pos_ret.output[0].as_flat()[0][1])

  Probability of Covid for positive image is 0.890598714351654
  ```

  _For more examples, please refer to the [Documentation](https://blindai.mithrilsecurity.io/en/latest/)_

  <p align="right">(<a href="#readme-top">back to top</a>)</p>

  <!-- GETTING HELP -->


  * Go to our [Discord](https://discord.com/invite/TxEHagpWd4) #support channel
  * Report bugs by [opening an issue on our BlindAI GitHub](https://github.com/mithril-security/blindai/issues)
  * [Book a meeting](https://calendly.com/contact-mithril-security/15mins?month=2023-03) with us


  <!-- LICENSE -->


  Distributed under the Apache License, version 2.0. See [`LICENSE.md`](https://www.apache.org/licenses/LICENSE-2.0) for more information.


  <!-- CONTACT -->


  Mithril Security - [@MithrilSecurity](https://twitter.com/MithrilSecurity) - contact@mithrilsecurity.io

  Project Link: [https://github.com/mithril-security/blindai](https://github.com/mithril-security/blindai)

  <p align="right">(<a href="#readme-top">back to top</a>)</p>

  <!-- MARKDOWN LINKS & IMAGES -->
  <!-- https://github.com/alexandresanlim/Badges4-README.md-Profile#-blog- -->
  [contributors-shield]: https://img.shields.io/github/contributors/mithril-security/blindai.svg?style=for-the-badge
  [contributors-url]: https://github.com/mithril-security/blindai/graphs/contributors
  [forks-shield]: https://img.shields.io/github/forks/mithril-security/blindai.svg?style=for-the-badge
  [forks-url]: https://github.com/mithril-security/blindai/network/members
  [stars-shield]: https://img.shields.io/github/stars/mithril-security/blindai.svg?style=for-the-badge
  [stars-url]: https://github.com/mithril-security/blindai/stargazers
  [issues-shield]: https://img.shields.io/github/issues/mithril-security/blindai.svg?style=for-the-badge
  [issues-url]: https://github.com/mithril-security/blindai/issues
  [license-shield]: https://img.shields.io/github/license/mithril-security/blindai.svg?style=for-the-badge
  [license-url]: https://github.com/mithril-security/blindai/blob/master/LICENSE.txt
  [linkedin-shield]: https://img.shields.io/badge/-Jobs-black.svg?style=for-the-badge&logo=linkedin&colorB=555
  [linkedin-url]: https://www.linkedin.com/company/mithril-security-company/
  [website-url]: https://www.mithrilsecurity.io
  [website-shield]: https://img.shields.io/badge/website-000000?style=for-the-badge&colorB=555
  [blog-url]: https://blog.mithrilsecurity.io/
  [blog-shield]: https://img.shields.io/badge/Blog-000?style=for-the-badge&logo=ghost&logoColor=yellow&colorB=555
  [product-screenshot]: images/screenshot.png
  [Python]: https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue
  [Python-url]: https://www.python.org/
  [Rust]: https://img.shields.io/badge/rust-FFD43B?style=for-the-badge&logo=rust&logoColor=black
  [Rust-url]: https://www.rust-lang.org/fr
  [Intel-SGX]: https://img.shields.io/badge/SGX-FFD43B?style=for-the-badge&logo=intel&logoColor=black
  [Intel-sgx-url]: https://www.intel.fr/content/www/fr/fr/architecture-and-technology/software-guard-extensions.html
  [Tract]: https://img.shields.io/badge/Tract-FFD43B?style=for-the-badge
  [tract-url]: https://github.com/mithril-security/tract/tree/6e4620659837eebeaba40ab3eeda67d33a99c7cf

  <!-- Done using https://github.com/othneildrew/Best-README-Template -->


pkgId: e23e132cc7f01621ae6812d0c5a337d7ba11955305ded4de455339d283e367af
name: python-blindschleiche
arch: src
version: 0.4.4
epoch: 0
release: 1
summary: Miscelanelous python-based bioinformatics utils
url: https://pypi.org/project/blindschleiche/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blindschleiche-0.4.4-1.src.rpm
checksum_type: sha256
description:
  A collection of bioinformatics / sequence utilities needed for my research, and hopefully useful for yours.

  [![ `doi:10.5281/zenodo.10049825`](https://zenodo.org/badge/DOI/10.5281/zenodo.10049825.svg)](https://zenodo.org/doi/10.5281/zenodo.10049825)



  ```
  pip install blindschleiche


  ```



  ```
  USAGE: blsl <subtool> [options...]


  Where <subtool> is one of:

    telogrep:             Search contigs for known telomere repeats
    n50:                  Calculate N50 and total length of a set of contigs
    falen:                Tabulate the lengths of sequences in a FASTA file
    mask2bed:             The inverse of bedtools maskfasta: softmasked fasta -> unmasked fasta + mask.bed
    pansn-rename:         Add, remove, or modify PanSN-style prefixes to contig/chromosome names in references
    genigvjs:             Generate a simple IGV.js visualisation of some bioinf files.
    ildemux:              Demultiplex modern illumina reads from read headers.
    ilsample:             Sample a fraction of read pairs from an interleaved fastq file
    regionbed:            Make a bed/region file of genome windows
    uniref-acc2taxid:     Make a ncbi-style acc2taxid.map file for a uniref fasta
    nstitch:              Combine R1 + R2 into single sequences, with an N in the middle
    gg2k:                 Summarise a table with GreenGenes-style lineages into a kraken-style report.
    equalbestblast:       Output only the best blast hits.
    tabcat:               Concatenate table (c/tsv) files, adding the filename as a column
    esearchandfetch:      Use the Entrez API to search for and download something. A CLI companion to the NCBI search box
    deepclust2fa:         Split a .faa by the clusters diamond deepclust finds
    farename:             Rename sequences in a fasta file sequentially
    gffcat:               Concatenate GFF3 files, resepcting header lines and FASTA sections
    gffparse:             Format a GFF sanely
    gffcsqify:            Format a reasonably compliant GFF for use with bcftools csq
    gfftagsane:           Sanitise a messy gff attribute column to just simple tags
    liftoff-gff3:         Obtain an actually-useful GFF3 from Liftoff by fixing basic GFF3 format errors
    ebiosra2rl2s:         INTERNAL: MPI Tübingen tool. Make a runlib-to-sample map table from ebio sra files
    galhist:              Make a summary histogram of git-annex-list output
    pairslash:            Add an old-style /1 /2 pair indicator to paired-end fastq files
    vcfstats:             Use bcftools to calculate various statistics, outputing an R-ready table
    vcfparallel:          Parallelise a bcf processing pipeline across regions
    shannon-entropy:      Calculate Shannon's entropy (in bits) at each column of one or more alignments
    fastasanitiser:       Sanitise fasta IDs to something sane, then back again
    tidyqc:               What if MultiQC was in the tidyverse? (and much worse)
    jsonl2csv:            Parse jsonlines into a C/TSV
    help:                 Print this help message


  Use blsl subtool --help to get help about a specific tool
  ```



  1) [They're awesome animals](https://www.google.com/search?q=blindschleiche&tbm=isch)
  2) Their English name is Slow Worm, which is appropriate for this set of low-performance tools in Python.
  3) All tools implemented in Python must be named with a snake pun, and they're kinda a snake (not really, they're legless lizards)


pkgId: ec106c7762fde3e13fc916da26a53d09e996559f5f6d5b9c24acb6d25d66f2b1
name: python-blindspin
arch: src
version: 2.0.1
epoch: 0
release: 1
summary: Braille Spinner for Click
url: https://github.com/kennethreitz/blindspin
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blindspin-2.0.1-1.src.rpm
checksum_type: sha256
description:
  Sometimes you would just like to show the user some progress,
  but a progress bar is not suitable because you don’t know how much longer it would take.
  In these cases you might want to display a simple spinner using the `spinner()` function.
  Example usage::
      with blindspin.spinner():
          do_something()
          do_something_else()
  It looks like this:
  Spinner class based on on a [gist by @cevaris](https://gist.github.com/cevaris/79700649f0543584009e).


pkgId: 0d48c4dbf763f1a826b9a478ab3f5a03cb6f78e6b06a304490b830c921c6fdb8
name: python-blinker
arch: src
version: 1.8.2
epoch: 0
release: 1
summary: Fast, simple object-to-object and broadcast signaling
url: https://pypi.org/project/blinker/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blinker-1.8.2-1.src.rpm
checksum_type: sha256
description:
  Blinker provides a fast dispatching system that allows any number of
  interested parties to subscribe to events, or "signals".




  > [!IMPORTANT]\
  > This project is part of the Pallets Community Ecosystem. Pallets is the open
  > source organization that maintains Flask; Pallets-Eco enables community
  > maintenance of related projects. If you are interested in helping maintain
  > this project, please reach out on [the Pallets Discord server][discord].
  >
  > [discord]: https://discord.gg/pallets




  Signal receivers can subscribe to specific senders or receive signals
  sent by any sender.

  ```pycon
  >>> from blinker import signal
  >>> started = signal('round-started')
  >>> def each(round):
  ...     print(f"Round {round}")
  ...
  >>> started.connect(each)

  >>> def round_two(round):
  ...     print("This is round two.")
  ...
  >>> started.connect(round_two, sender=2)

  >>> for round in range(1, 4):
  ...     started.send(round)
  ...
  Round 1!
  Round 2!
  This is round two.
  Round 3!
  ```


pkgId: dc0742a2b098ac5fadb03c9039930bbe776efb9c6f878f35f4d9ea7a1d35eba0
name: python-blinker_herald
arch: src
version: 0.2.0
epoch: 0
release: 1
url: https://github.com/SatelliteQE/blinker_herald
rpm_license: ISCL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blinker_herald-0.2.0-1.src.rpm
checksum_type: sha256
summary:
  The Blinker Herald includes helpers to easily emit signals using Blinker. Decorate a function or method with @blinker_herald.emit() and pre and post signals will automatically be emitted to connected handlers.


pkgId: d3cf6f8aad4cae43c106cc4d2fd045685ddad5fb92189369df25a68565e05224
name: python-blinkparse
arch: src
version: 0.1.5
epoch: 0
release: 1
summary: A python library for parsing command line arguments
url: https://github.com/nathansmerrill/blinkparse
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blinkparse-0.1.5-1.src.rpm
checksum_type: sha256
description:
  A python library for parsing command line arguments

  `pip install blinkparse`


  - Returns a `blinkparse.Arguments` object
  - `args` is a list of `blinkparse.Argument` objects
  - `commands` is a list of `blinkparse.Command` objects
  - `description` is a description to show at the top of the help page
  - `commandRequired` is whether the program requires a command to be passed in
  - `noOperands` is whether the program is allowed to take operands
  - `parse(inputArgs=None)`
      - Returns a `blinkparse.Arguments` object
      - `inputArgs` is a list of the arguments to parse. This defaults to `sys.argv[1:]`

  - `name` is the argument name used in the long syntax (`--myArg`, `--myArg=myValue`)
  - `shortName` is the argument name used in the long syntax (`-a`, `-a myValue`)
  - `takesValue` is whether the argument takes a input (see above)
  - `required` makes the blinkparse raise an error if the argument isn't passed in
  - `description` is a description to show in the help page

  - Usage
      - `Command('hello', [CommandArgument('person'), CommandArgument('gender', required=False, options=['male', 'female', 'other])], 'h')`
      - `$ python3 example.py hello jered`
      - `$ python3 example.py hello joe male`
  - `name` is the name of the command
  - `args` is a list of `blinkparse.CommandArgument` objects that the command takes
  - `CommandArgument(name, options=None, required=True)`
      - `name` is the name of the command argument
      - `options` is a list of allowed options for the argument (defaults to everything)
      - `required` makes blinkparse raise an error if the command argument isn't passed in
  - `aliases` is a list of other names for the command

  ```python
  from blinkparse import *

  args = Parser(
      args=[
          Argument('save', 's', description='Save the program output'),
      ],
      commands=[
          Command('hello', [
              CommandArgument('person'),
              CommandArgument('gender', required=False, options=['male', 'female', 'other'])
          ]),
          Command('bye', [
              CommandArgument('person')
          ])
      ],
      description='''
  hello.py
  A simple demo of blinkparse
      ''',
      commandRequired=True
  ).parse()

  if args.command == 'hello':
      output = 'Hello ' + args.commandArgs['person']
      if 'gender' in args.commandArgs:
          output += ', you are ' + args.commandArgs['gender']
  else:
      output = 'Bye ' + args.commandArgs['person']

  if 'save' in args.args:
      with open('hello.txt', 'w') as outputFile:
          outputFile.write(output)
  else:
      print(output)
  ```


pkgId: 94fda81ce70c452efbb02f337f2f2278532c0aae5dd2f263352c296e87a25bcf
name: python-blinkpy
arch: src
version: 0.23.0
epoch: 0
release: 1
summary: A Blink camera Python Library.
url: https://pypi.org/project/blinkpy/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blinkpy-0.23.0-1.src.rpm
checksum_type: sha256
description:
  A Python library for the Blink Camera system (Python 3.9+)
  Like the library? Consider buying me a cup of coffee!
  `Buy me a Coffee! <https://buymeacoffee.com/kevinfronczak>`__
  **BREAKING CHANGE WARNING:**
  As of ``0.22.0`` the library uses asyncio which will break any user scripts used prior to this version. Please see the updated examples below and the ``blinkapp.py`` or ``blinksync.py`` examples in the ``blinkapp/`` directory for examples on how to migrate.
  **Disclaimer:**
  Published under the MIT license - See LICENSE file for more details.
  "Blink Wire-Free HS Home Monitoring & Alert Systems" is a trademark owned by Immedia Inc., see www.blinkforhome.com for more information.
  I am in no way affiliated with Blink, nor Immedia Inc.
  Original protocol hacking by MattTW : https://github.com/MattTW/BlinkMonitorProtocol
  API calls faster than 60 seconds is not recommended as it can overwhelm Blink's servers.  Please use this module responsibly.


pkgId: c42b27ec58c057b0090015f32f915a828f37fa43fe8e1fc3eac6977fc2c48cca
name: python-blinkt
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: Python library for driving Pimoroni Blinkt!
url: http://www.pimoroni.com
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blinkt-0.1.2-1.src.rpm
checksum_type: sha256
description:
  Full install (recommended):
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  We've created an easy installation script that will install all
  pre-requisites and get your Blinkt! up and running with minimal efforts.
  To run it, fire up Terminal which you'll find in Menu -> Accessories ->
  Terminal on your Raspberry Pi desktop, as illustrated below:
  In the new terminal window type the command exactly as it appears below
  (check for typos) and follow the on-screen instructions:
      curl https://get.pimoroni.com/blinkt | bash
  Alternatively, on Raspbian, you can download the ``pimoroni-dashboard``
  and install your product by browsing to the relevant entry:
      sudo apt-get install pimoroni
  (you will find the Dashboard under 'Accessories' too, in the Pi menu -
  or just run ``pimoroni-dashboard`` at the command line)
  If you choose to download examples you'll find them in
  ``/home/pi/Pimoroni/blinkt/``.
  Manual install:
  ~~~~~~~~~~~~~~~
  Library install for Python 3:
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  on Raspbian:
      sudo apt-get install python3-blinkt
  other environments:
      sudo pip3 install blinkt
  Library install for Python 2:
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  on Raspbian:
      sudo apt-get install python-blinkt
  other environments:
      sudo pip2 install blinkt
  Development:
  ~~~~~~~~~~~~
  If you want to contribute, or like living on the edge of your seat by
  having the latest code, you should clone this repository, ``cd`` to the
  library directory, and run:
      sudo python3 setup.py install
  (or ``sudo python setup.py install`` whichever your primary Python
  environment may be)


pkgId: b78d19b0e95dac01b855ea27d34b9eb3af4b776f607bc6558a5023d452b60a48
name: python-blint
arch: src
version: 2.2.3
epoch: 0
release: 1
summary: Linter and SBOM generator for binary files.
url: https://github.com/OWASP-dep-scan/blint
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blint-2.2.3-1.src.rpm
checksum_type: sha256
description:
  <img src="./blint.png" width="400" />

  BLint is a Binary Linter that checks the security properties and capabilities of your executables. It is powered by [lief](https://github.com/lief-project/LIEF). Since version 2, blint can also generate Software Bill-of-Materials (SBOM) for supported binaries.

  [![BLint Demo](https://asciinema.org/a/438138.png)](https://asciinema.org/a/438138)

  Supported binary formats:

  - Android (apk, aab)
  - ELF (GNU, musl)
  - PE (exe, dll)
  - Mach-O (x64, arm64)

  You can run blint on Linux, Windows, and Mac against any of these binary formats.



  Nowadays, vendors distribute statically linked binaries produced by Golang, Rust, or Dotnet tooling. Users are used to running antivirus and anti-malware scans while using these binaries in their local devices. Blint augments these scans by listing the technical capabilities of a binary. For example, whether the binary could use network connections or can perform file system operations and so on.
  The binary is first parsed using the lief framework to identify the various properties, such as functions and the presence of symtab and dynamic symbols. Thanks to YAML-based annotation data, this information can be matched against capabilities and presented visually using a rich table.
  NOTE: The presence of capabilities doesn't imply that the binary always performs the operations. Use the output of this tool to get an idea about a binary. Also, this tool is not suitable for reviewing malware and other heavily obfuscated binaries for obvious reasons.



  - Quickly identify malicious binaries by looking at their capabilities (Ability to manipulate networks or drivers or kernels etc)
  - Add blint to CI/CD to inspect the final binaries to ensure code signing or authenticode is applied correctly
  - Identify interesting functions and symbols for fuzzing



  - Install python 3.10, 3.11, or 3.12

  ```bash
  pip install blint
  ```



  You can download single binary builds from the [blint-bin releases](https://github.com/OWASP-dep-scan/blint/releases). These executables should work without requiring python to be installed. The macOS .pkg file is signed with a valid developer account.



  ```shell
  usage: blint [-h] [-i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]] [-o REPORTS_DIR] [--no-error] [--no-banner]
               [--no-reviews] [--suggest-fuzzable]
               {sbom} ...

  Binary linter and SBOM generator.

  options:
    -h, --help            show this help message and exit
    -i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...], --src SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]
                          Source directories, container images or binary files. Defaults to current directory.
    -o REPORTS_DIR, --reports REPORTS_DIR
                          Reports directory. Defaults to reports.
    --no-error            Continue on error to prevent build from breaking.
    --no-banner           Do not display banner.
    --no-reviews          Do not perform method reviews.
    --suggest-fuzzable    Suggest functions and symbols for fuzzing based on a dictionary.

  sub-commands:
    Additional sub-commands

    {sbom}
      sbom                Command to generate SBOM for supported binaries.
  ```



  ```shell
  usage: blint sbom [-h] [-i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]] [-o SBOM_OUTPUT] [--deep]

  options:
    -h, --help            show this help message and exit
    -i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...], --src SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]
                          Source directories, container images or binary files. Defaults to current directory.
    -o SBOM_OUTPUT, --output-file SBOM_OUTPUT
                          SBOM output file. Defaults to bom.json in current directory.
    --deep                Enable deep mode to collect more used symbols and modules aggressively. Slow
                          operation.
    --stdout              Print the SBOM to stdout instead of a file.
  ```

  To test any binary, including default commands

  ```bash
  blint -i /bin/netstat -o /tmp/blint
  ```

  Use -i to check any other binary. For eg: to check ngrok

  ```bash
  blint -i ~/ngrok -o /tmp/blint
  ```

  Pass `--suggest-fuzzable` to get suggestions for fuzzing. A dictionary containing "common verbs" is used to identify these functions.

  ```bash
  blint -i ~/ngrok -o /tmp/blint --suggest-fuzzable
  ```

  To generate SBOM in [CycloneDX format](https://cyclonedx.org/) for supported binaries, use the sbom sub-command.

  ```shell
  blint sbom -i /path/to/apk -o bom.json
  ```

  ```shell
  blint sbom -i /directory/with/apk/aab -o bom.json
  ```

  To parse all files, including `.dex` files, pass `--deep` argument.

  ```shell
  blint sbom -i /path/to/apk -o bom.json --deep
  ```

  The following binaries are supported:

  - Android (apk/aab)
  - Dotnet executable binaries
  - Go binaries
  - Rust binaries

  ```shell
  blint sbom -i /path/to/go-binaries -o bom.json --deep
  ```

  For all other binaries, the symbols will be collected and represented as properties with `internal` prefixes for the parent component. Child components and dependencies would be missing.

  PowerShell example

  ![PowerShell](./docs/blint-powershell.jpg)



  Blint produces the following json artifacts in the reports directory:

  - blint-output.html - HTML output from the console logs
  - exename-metadata.json - Raw metadata about the parsed binary. Includes symbols, functions, and signature information
  - findings.json - Contains information from the security properties audit. Useful for CI/CD integrations
  - reviews.json - Contains information from the capability reviews. Useful for further analysis
  - fuzzables.json - Contains a suggested list of methods for fuzzing

  sbom command generates CycloneDX json.



  - [lief examples](https://github.com/lief-project/LIEF/tree/master/examples)
  - [checksec](https://github.com/Wenzel/checksec.py)



  The developers can be reached via the [Discord](https://discord.gg/DCNxzaeUpd) channel.



  If you love blint, you should consider [donating](https://owasp.org/donate?reponame=www-project-dep-scan&title=OWASP+dep-scan) to our project. In addition, consider donating to the below projects, which make blint possible.

  - [LIEF](https://github.com/sponsors/lief-project/)


pkgId: c86a0005335d083b8770232d885c62b19668b373fb0f9185b051a4319ea64478
name: python-blint
arch: src
version: 2.3.1
epoch: 0
release: 1
summary: Linter and SBOM generator for binary files.
url: https://github.com/OWASP-dep-scan/blint
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-blint-2.3.1-1.src.rpm
checksum_type: sha256
description:
  <img src="./blint.png" width="400" />

  BLint is a Binary Linter that checks the security properties and capabilities of your executables. It is powered by [lief](https://github.com/lief-project/LIEF). Since version 2, blint can also generate Software Bill-of-Materials (SBOM) for supported binaries.

  [![BLint Demo](https://asciinema.org/a/438138.png)](https://asciinema.org/a/438138)

  Supported binary formats:

  - Android (apk, aab)
  - ELF (GNU, musl)
  - PE (exe, dll)
  - Mach-O (x64, arm64)

  You can run blint on Linux, Windows, and Mac against any of these binary formats.



  Nowadays, vendors distribute statically linked binaries produced by Golang, Rust, or Dotnet tooling. Users are used to running antivirus and anti-malware scans while using these binaries in their local devices. Blint augments these scans by listing the technical capabilities of a binary. For example, whether the binary could use network connections or can perform file system operations and so on.
  The binary is first parsed using the lief framework to identify the various properties, such as functions and the presence of symtab and dynamic symbols. Thanks to YAML-based annotation data, this information can be matched against capabilities and presented visually using a rich table.
  NOTE: The presence of capabilities doesn't imply that the binary always performs the operations. Use the output of this tool to get an idea about a binary. Also, this tool is not suitable for reviewing malware and other heavily obfuscated binaries for obvious reasons.



  - Quickly identify malicious binaries by looking at their capabilities (Ability to manipulate networks or drivers or kernels etc)
  - Add blint to CI/CD to inspect the final binaries to ensure code signing or authenticode is applied correctly
  - Identify interesting functions and symbols for fuzzing



  - Install python 3.10, 3.11, or 3.12

  ```bash
  pip install blint
  ```



  You can download single binary builds from the [blint-bin releases](https://github.com/OWASP-dep-scan/blint/releases). These executables should work without requiring python to be installed. The macOS .pkg file is signed with a valid developer account.



  ```shell
  usage: blint [-h] [-i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]] [-o REPORTS_DIR] [--no-error] [--no-banner]
               [--no-reviews] [--suggest-fuzzable]
               {sbom} ...

  Binary linter and SBOM generator.

  options:
    -h, --help            show this help message and exit
    -i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...], --src SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]
                          Source directories, container images or binary files. Defaults to current directory.
    -o REPORTS_DIR, --reports REPORTS_DIR
                          Reports directory. Defaults to reports.
    --no-error            Continue on error to prevent build from breaking.
    --no-banner           Do not display banner.
    --no-reviews          Do not perform method reviews.
    --suggest-fuzzable    Suggest functions and symbols for fuzzing based on a dictionary.

  sub-commands:
    Additional sub-commands

    {sbom}
      sbom                Command to generate SBOM for supported binaries.
  ```



  ```shell
  usage: blint sbom [-h] [-i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]] [-o SBOM_OUTPUT] [--deep] [--stdout] [--exports-prefix EXPORTS_PREFIX [EXPORTS_PREFIX ...]]
                    [--bom-src SRC_DIR_BOMS [SRC_DIR_BOMS ...]]

  options:
    -h, --help            show this help message and exit
    -i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...], --src SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]
                          Source directories, container images or binary files. Defaults to current directory.
    -o SBOM_OUTPUT, --output-file SBOM_OUTPUT
                          SBOM output file. Defaults to bom-post-build.cdx.json in current directory.
    --deep                Enable deep mode to collect more used symbols and modules aggressively. Slow operation.
    --stdout              Print the SBOM to stdout instead of a file.
    --exports-prefix EXPORTS_PREFIX [EXPORTS_PREFIX ...]
                          prefixes for the exports to be included in the SBOM.
    --bom-src SRC_DIR_BOMS [SRC_DIR_BOMS ...]
                          Directories containing pre-build and build BOMs. Use to improve the precision.
  ```

  To test any binary, including default commands

  ```bash
  blint -i /bin/netstat -o /tmp/blint
  ```

  Use -i to check any other binary. For eg: to check ngrok

  ```bash
  blint -i ~/ngrok -o /tmp/blint
  ```

  Pass `--suggest-fuzzable` to get suggestions for fuzzing. A dictionary containing "common verbs" is used to identify these functions.

  ```bash
  blint -i ~/ngrok -o /tmp/blint --suggest-fuzzable
  ```

  To generate SBOM in [CycloneDX format](https://cyclonedx.org/) for supported binaries, use the sbom sub-command.

  ```shell
  blint sbom -i /path/to/apk -o bom.json
  ```

  ```shell
  blint sbom -i /directory/with/apk/aab -o bom.json
  ```

  To parse all files, including `.dex` files, pass `--deep` argument.

  ```shell
  blint sbom -i /path/to/apk -o bom.json --deep
  ```

  The following binaries are supported:

  - Android (apk/aab)
  - Dotnet executable binaries
  - Go binaries
  - Rust binaries

  ```shell
  blint sbom -i /path/to/go-binaries -o bom.json --deep
  ```

  For all other binaries, the symbols will be collected and represented as properties with `internal` prefixes for the parent component. Child components and dependencies would be missing.

  PowerShell example

  ![PowerShell](./docs/blint-powershell.jpg)



  Blint produces the following json artifacts in the reports directory:

  - blint-output.html - HTML output from the console logs
  - exename-metadata.json - Raw metadata about the parsed binary. Includes symbols, functions, and signature information
  - findings.json - Contains information from the security properties audit. Useful for CI/CD integrations
  - reviews.json - Contains information from the capability reviews. Useful for further analysis
  - fuzzables.json - Contains a suggested list of methods for fuzzing

  sbom command generates CycloneDX json.



  - [lief examples](https://github.com/lief-project/LIEF/tree/master/examples)
  - [checksec](https://github.com/Wenzel/checksec.py)



  The developers can be reached via the [Discord](https://discord.gg/DCNxzaeUpd) channel.



  If you love blint, you should consider [donating](https://owasp.org/donate?reponame=www-project-dep-scan&title=OWASP+dep-scan) to our project. In addition, consider donating to the below projects, which make blint possible.

  - [LIEF](https://github.com/sponsors/lief-project/)


