# packages

pkgId: 3d5fb2b3e8956d09326cf78dfaa8992b42bc7866bf13aa96ec6362ca72d05f33
name: python-bcqa
arch: src
version: 1.1.4
epoch: 0
release: 1
summary: A Benchmark for Complex Heterogeneous Question answering
url: https://github.com/VenkteshV/BCQA
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcqa-1.1.4-1.src.rpm
checksum_type: sha256
description:
  BCQA is a benchmark for a wide range of complex Qa tasks. It also aims to provide a easy to use framework for evaluating retrieval and reasoning approaches for answering complex multi-hop questions.



  1) Clone the repo <br />
  2) Create a conda environment conda create -n bcqa  <br />
  3) pip install -e .<br />


  The evaluation scripts for retreival and LLMs are in the evaluation folder

  For instance to run dpr retreival for Wikimultihopqa run <br/>
  python3 evaluation/wikimultihop/run_dpr_inference.py <br />

  Before running the above script make sure you have configured the correct paths for the data and corpus files in evaluation/config.ini <br />

  Example:
  wikimultihopqa = /home/bcqa/BCQA/2wikimultihopQA <br />
  wikimultihopqa-corpus = /home/bcqa/BCQA/wiki_musique_corpus.json <br />





  1. Install `black`: ```pip install black``` or ```conda install black```
  2. In your IDE: Enable formatting on save.
  3. Install `isort`: ```pip install isort``` or ```conda install isort```
  4. In your IDE: Enable sorting import on save.

  In VS Code, you can do this using the following config:
  ```json
  {
      "editor.formatOnSave": true,
      "editor.codeActionsOnSave": {
          "source.organizeImports": true
      }
  }
  ```


  Use [type hints](https://docs.python.org/3/library/typing.html) for __everything__! No exceptions.


  Write a docstring for __every__ function (except the main function). We use the [Google format](https://github.com/NilsJPWerner/autoDocstring/blob/HEAD/docs/google.md). In VS Code, you can use [autoDocstring](https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring).


  ```python
  def sum(a: float, b: float) -> float:
      """Compute the sum of a and b.

      Args:
          a (float): First number.
          b (float): Second number.

      Returns:
          float: The sum of a and b.
      """

      return a + b
  ```


pkgId: dc9101dea6a8d1305d3ea27f7c2d559c48a461ab452274417248f0f648920bc4
name: python-bcr-api
arch: src
version: 1.5.1
epoch: 0
release: 1
summary: A client library for the Brandwatch Consumer Research API
url: https://github.com/BrandwatchLtd/bcr-api
rpm_license: License :: OSI Approved :: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcr-api-1.5.1-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.com/BrandwatchLtd/bcr-api.svg?branch=master)](https://travis-ci.com/BrandwatchLtd/bcr-api)





  The Brandwatch Consumer Research API Client was designed to address many of the challenges involved in building complex applications which interact with RESTful API's in general and Brandwatch's Consumer Research API, in particular:

  - The object hierarchy roughly mirrors the API's resource hierarchy, making the code intuitive for those familiar with the Brandwatch Consumer Research platform
  - All required parameters are enforced, and most optional parameters are supported and documented
  - Typical workflows are supported behind the scenes; for instance, one can validate, upload, and backfill a query with a single function call
  - The library is designed to support simple and readable code: sensible defaults are chosen for rarely used parameters and all resource IDs are handled behind the scenes

  From the user's perspective, the basic structure of the library is as follows.  One first creates an instance of the class `BWProject`; this class handles authentication (via a user name and password or API key) and keeps track of project-level data such as the project's ID.  (Behind the scenes, the user-level operations are handled by the class `BWUser` from which `BWProject` is inherited.)  One passes `BWProject` instance as an argument in the constructor for a series of classes which manage the various Brandwatch resources: queries, groups, tags, categories, etc.  These resource classes manage all resource-level operations: for example a single `BWQueries` instance handles all HTTP requests associated with queries in its attached project.



  Be sure to install the latest version of Python 3.x. You can install the library on your machine by running the following command:

  `pip install bcr-api`

  This allows you to run scripts that import bwproject or bwresources from anywhere on your computer.



  Please see the Jupyter notebook DEMO.ipynb for examples.  This notebook was built as a beginner's guide to using the library, so it has example code, as well as detailed instructions for use.



  This is not an official or supported Brandwatch library, and should be implemented at the users' own risk.


pkgId: 3bd42e243ca5f446da6353acdcb3a68576f7528bb5261da8ba7ae7f3ba48fd39
name: python-bcra-api-client
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Consumo de datos de la API del banco central de la Republica Argentina
url: https://github.com/paivae/BCRA-client-python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcra-api-client-1.2.0-1.src.rpm
checksum_type: sha256
description:
  ![pypi version](https://img.shields.io/pypi/v/bcra-api-client?style=flat&label=pypi%20package&color=green)

  Consumo de datos de la API del Banco Central de la República Argentina (BCRA)

  Esta librería está construida con base en la documentación presentada por la misma entidad en el siguiente [link](https://www.bcra.gob.ar/BCRAyVos/catalogo-de-APIs-banco-central.asp).



  Debe usar pip para instalar o actualizar a la última versión estable.
  ```
  pip install -U bcra-api-client
  ```


  Su uso es simple, se debe crear primero un cliente a la API.

  **Nota**: Hasta ahora la API tiene dos endpoints de estadísticas.


  ```python
  from bcra import Client

  client = Client()
  ```


  Se pueden cambiar las configuraciones de un cliente de la siguiente manera:
  ```python
  from bcra import ConfigClient, Client

  config = ConfigClient(language='es')

  client = Client(config)
  ```



  - #### language:
  Los idiomas configurados actualmente “es-AR” y “en-US”. De no informar dicho
  parámetro, la respuesta se realizará por defecto en “es-AR”.

  Los valores admitidos son “es” referenciando a “es-AR” o “en” a “en-US”.



  Para obtener la lista de todas las variables publicadas por el BCRA.
  ```python
  statistics = client.statistics
  print(statistics.variables())
  ```


  Para obtener los valores para la variable y el rango de fechas indicadas.

  Se debe llamar al mismo método con los siguientes parámetros (id_variable, from_, to)

  Donde:

  - **id_variable**: (Int) Se obtiene de consultar a la lista de todas las variables
  - **from_**: (String) Corresponde a la fecha de inicio del rango a consultar, la misma deberá tener el formato yyyy-mm-dd
  - **to**: (String) Corresponde a la fecha de fin del rango a consultar, la misma deberá tener el formato yyyy-mm-dd

  ```python
  statistics = client.statistics
  print(statistics.variables(5, '2024-01-01', '2024-05-01'))
  ```


pkgId: e8280ffd9ef28ed5accbec57da3b322a5818735744958dfe42e5bbb41d50d072
name: python-bcra-connector
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: A Python connector for the BCRA (Banco Central de la República Argentina) APIs
url: https://github.com/PPeitsch/bcra-connector
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcra-connector-0.4.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/bcra-connector.svg)](https://badge.fury.io/py/bcra-connector)
  [![Python Versions](https://img.shields.io/pypi/pyversions/bcra-connector.svg)](https://pypi.org/project/bcra-connector/)
  [![Documentation Status](https://readthedocs.org/projects/bcra-connector/badge/?version=latest)](https://bcra-connector.readthedocs.io/en/latest/?badge=latest)
  [![Coverage](https://codecov.io/gh/PPeitsch/bcra-connector/branch/main/graph/badge.svg)](https://codecov.io/gh/PPeitsch/bcra-connector)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Tests](https://github.com/PPeitsch/bcra-connector/workflows/Test%20and%20Publish/badge.svg)](https://github.com/PPeitsch/bcra-connector/actions/workflows/test-and-publish.yaml)
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](.github/CODE_OF_CONDUCT.md)

  A Python connector for the BCRA (Banco Central de la República Argentina) APIs, including Estadísticas v2.0, Cheques, and Estadísticas Cambiarias.



  - Fetch principal variables published by BCRA
  - Retrieve historical data for specific variables
  - Get the latest value for a variable
  - Access information about reported checks
  - Retrieve currency exchange rate data
  - Bilingual support (Spanish and English)
  - Error handling with custom exceptions
  - Retry logic with exponential backoff
  - SSL verification (optional)
  - Debug mode for detailed logging



  Full documentation, including installation instructions, usage examples, and API reference, is available at:
  - [Read the Docs Documentation](https://bcra-connector.readthedocs.io/)
  - [Quick Start Guide](https://bcra-connector.readthedocs.io/en/latest/usage.html)
  - [API Reference](https://bcra-connector.readthedocs.io/en/latest/api_reference.html)



  ```bash
  pip install bcra-connector
  ```

  For detailed installation instructions and requirements, see our [Installation Guide](https://bcra-connector.readthedocs.io/en/latest/installation.html).



  Contributions are welcome! Please read our:
  - [Contributing Guidelines](.github/CONTRIBUTING.md)
  - [Code of Conduct](.github/CODE_OF_CONDUCT.md)



  For vulnerability reports, please review our [Security Policy](.github/SECURITY.md).



  See [CHANGELOG.md](CHANGELOG.md) for a list of changes and version updates.



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



  This project is not officially affiliated with or endorsed by the Banco Central de la República Argentina. Use at your own risk.

rpm_license:
  MIT License  Copyright (c) 2024 PPeitsch  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: b0188f46e77a40baa7fe195df3270ee3f7ad40a7828f220d1ca30291bef19b06
name: python-bcrpy
arch: src
version: 3.2.1
epoch: 0
release: 1
url: https://pypi.org/project/bcrpy/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcrpy-3.2.1-1.src.rpm
checksum_type: sha256
summary:
  An API client for the extraction, query, and analysis of the BCRPData database from the Central Reserve Bank of Peru (BCRP).

description:
  <a href="https://bcrpy.vercel.app/"><img src="https://raw.githubusercontent.com/andrewrgarcia/bcrpy/main/docs/img/bcrp_poly_logo.png?raw=true"
          alt="Picture"
          width="300"
          style="display: block; margin: 0 auto" /></a>

  <br>

  <h2 align="center">bcrpy</h2>

  [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/andrewrgarcia/voxelmap/main/LICENSE)[![Documentation Status](https://readthedocs.org/projects/bcrpy/badge/?version=latest)](https://bcrpy.readthedocs.io/en/latest/?badge=latest)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  Un cliente API para la extraccion, consulta y analisis de la base de datos [BCRPData](https://estadisticas.bcrp.gob.pe/estadisticas/series/) del [Banco Central de Reserva del Peru (BCRP)](https://www.bcrp.gob.pe/) escrito para Python. Este cliente es un _wrapper_ de la [API para Desarrolladores](https://estadisticas.bcrp.gob.pe/estadisticas/series/ayuda/api) del BCRP.



  [Documentación en linea (readthedocs)](https://bcrpy.readthedocs.io/en/latest/)

  [Manual bcrpy (pdf)](https://raw.githubusercontent.com/andrewrgarcia/bcrpy/main/bcrpy.pdf)

  [pip package index](https://pypi.org/project/bcrpy/)

  [![](https://github.com/andrewrgarcia/hf10_organizer_event_kit/blob/main/05_logo_set/hf10_horizontal_logos/cmyk/hf10_horz_fcd_cmyk.png?raw=true)](CONTRIBUTING_ESP.md)

  En apoyo al código abierto, este repositorio se encuentra participando en Hacktoberfest 2023. Te invitamos a consultar [CONTRIBUIR](CONTRIBUTING_ESP.md) para obtener instrucciones sobre cómo contribuir como colaborador y unirte a nuestra lista de colaboradores.

   _For English guidelines in how to participate, check the [CONTRIBUTING](CONTRIBUTING.md) file._




  En su sistema local (laptop o computadora) bcrpy puede ser instalada con el comando pip install bcrpy. Aun asi, se
  recomienda instalar bcrpy dentro de un ambiente virtual virtualenv. El protocolo para aquel seria el siguiente:


  ```ruby
  virtualenv venv
  source venv/bin/activate
  pip install bcrpy
  ```

  bcrpy ha sido desarrollado con un protocolo de programación orientada a objetos (tambien conocido como *Object
  Oriented Programming (OOP)*) lo cual se reduce a que objetos pueden ser usados a almacenar metodos (funciones),
  datos, y su manejo de aquellos.


  [![](docs/img/colaboratory.svg)](https://colab.research.google.com/drive/1YdyCYeU0S98428WgBg4n9Ad9auKrurQZ?usp=sharing)


pkgId: 843e074a6a115898da9a5aee0a1bf04c8b1ccb16186a762270f6e0e789d19b72
name: python-bcsfe
arch: src
version: 3.0.0b3
epoch: 0
release: 1
summary: A save file editor for The Battle Cats
url: https://github.com/fieryhenry/BCSFE-Python
rpm_license: GPL-3.0-or-later License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcsfe-3.0.0b3-1.src.rpm
checksum_type: sha256
description:
  [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/M4M53M4MN)

  BCSFE is a python command line save editor for The Battle Cats.

  Join the [discord server](https://discord.gg/DvmMgvn5ZB) if you want to suggest
  new features, report bugs or get help on how to use the editor (please read the
  below tutorials / watch the latest
  [tutorial video](https://www.youtube.com/watch?v=Kr6VaLTXOSY) first before
  asking for help).



  Lethal's editor for giving me inspiration to start the project and it helped me
  work out how to patch the save data and edit cf/xp: <https://www.reddit.com/r/BattleCatsCheats/comments/djehhn/editoren/>

  Beeven and csehydrogen's open source code, which helped me figure out how to
  patch save data: [beeven/battlecats](https://github.com/beeven/battlecats), [csehydrogen/BattleCatsHacker](https://github.com/csehydrogen/BattleCatsHacker)

  Everyone who's given me saves, which helped to test save loading/saving and to
  test/develop new features



  If you have a pc: watch a [Tutorial video](https://www.youtube.com/watch?v=Kr6VaLTXOSY),
  or scroll down for a text tutorial

  If you only have an android device: read the [Android text tutorial](#android-tutorial)

  If you only have an ios device: watch the [IOS tutorial
  video](https://www.youtube.com/watch?v=xw-uOqQRYJ8) (Made by Viarules, NOTE:
  Some people have said that ish is really slow, and you should use a-shell
  instead)



  1. Install python (You'll need version 3.9 and up) <https://www.python.org/downloads/>

  1. Follow the `Install from source` instructions below as 3.0.0 isn't on pypi
     yet

  1. Enter the command: `py -m bcsfe` to run the editor. If that doesn't work
  then use `python3` or `python` instead of `py` in the command

  1. Go into the in-game transfer system in `Settings-> Data Transfer` and
  click `Begin Data Transfer`

  1. In the editor use the option called `Download save file using transfer and
  confirmation code` (enter the corresponding number, not the name itself)

  1. Enter your transfer code

  1. Enter your confirmation code

  1. Select the country code that you are using, `en`=english,
  `kr`=korean, `jp`=japanese, `tw`=taiwanese.

  1. Edit what you want. Note that in most cases, if you want to exit the current
     input you can enter `q` and press enter to go back to the previous menu

  1. Go into the `Save Management` option and select `Save changes and upload to
  game servers (get transfer and confirmation codes)`. It may take some time, it
  may also fail, if it does then try again

  1. Enter those codes into the game's transfer system (click on
  `Resume Data Transfer`) (You may need to `Cancel Data Transfer`
  in-game before doing so)



  1. Add adb to your PATH environment variable, or edit the config to set ADB path
    to the full path of the adb executable. You can download adb from
    [adb](https://developer.android.com/studio/releases/platform-tools)

  1. Open the editor and select the option named `Pull save file from device
  using adb` and enter your game version, or select the option named
  `Select save file from file` and select a copy of your save data

  1. Edit what you want

  1. Go into save management and select an option to push save data to the game

  1. Enter the game and you should see changes



  1. You need to be running the editor on the device itself, so you'll need to
  follow the [Android tutorial](#android-tutorial) to install the editor

  1. Open the editor and select the option named `Pull save file from root
     storage`

  1. Edit what you want

  1. Go into save management and select an option to push save data to the game

  1. Enter the game and you should see changes



  1. Select the option in `Account` to `Unban account` or
  just upload the save data to the game servers again

  1. It may take some time but after, you should be able to choose one of the
  options in save management to push the save data to the game.



  - Instead of editing in platinum tickets use the `Platinum Shards` feature

  - Instead of editing in rare tickets use the `Normal Ticket Max Trade Progress
  (allows for unbannable rare tickets)` feature

  - Instead of hacking in cat food, just edit everything in that you can buy with
  cat food, e.g battle items, catamins, xp, energy refills (leaderships), etc.
  If you really want catfood then you can clear and unclear catnip missions with
  the feature `Catnip Challenges / Missions` then entering 1 when asked.
  You'll need to collect the catfood in-game after each clear though

  - Instead of hacking in tickets, just hack in the cats/upgrades you want directly



  If you don't have a pc to install and run the editor you can use Termux.

  1. Download [F-Droid](https://f-droid.org/F-Droid.apk) - You can download the
  Termux apk directly but then it won't automatically update. You cannot
  download Termux from the Play Store because it does not work

  1. Install F-Droid

  1. Open it and wait for it to finish `Updating repositories`

  1. Tap the green search button in the bottom right and search for `Termux`

  1. Tap `Termux Terminal emulator with packages`

  1. Tap `INSTALL` and then `OPEN` once installed

  1. Once opened enter the command `pkg install python`

  1. If that doesn't work then read this: <https://stackoverflow.com/a/71097459>

  1. Then follow the `Install from source` instructions below

  1. If that doesn't work then run `pkg upgrade` and try again

  1. Then run `python -m bcsfe`

  1. Note that the editor might complain about not being to run tkinter, but you
  can ignore that and just enter `SAVE_DATA` when asked to enter the path to a
  save file

  1. You can then use the editor like normal



  If you want the latest features then you can install the editor from the github.

  1. Download [Git](https://git-scm.com/downloads)

  2. Run the following commands: (You may have to replace `py` with `python` or `python3`)

  ```batch
  git clone https://github.com/fieryhenry/BCSFE-Python.git
  cd BCSFE-Python
  git checkout 3.0.0
  pip install -e .
  py -m bcsfe
  ```

  If you want to use the editor again all you need to do is run the `py -m bcsfe` command

  Then if you want the latest changes you only need to run `git pull` in the downloaded
  `BCSFE-Python` folder. (use `cd` to change the folder)



  - [Custom Locales](https://github.com/fieryhenry/ExampleEditorLocale)
  - [Custom Themes](https://github.com/fieryhenry/ExampleEditorTheme)

  I only have documentation for the locales and themes atm, but I will probably
  add more documentation in the future.


pkgId: 8d97f8c2e02dc99168ef87a04c3159b4e0c25544be1830735eefd41391702c0a
name: python-bctf
arch: src
version: 2.0
epoch: 0
release: 1
url: https://pypi.org/project/bctf/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bctf-2.0-1.src.rpm
checksum_type: sha256
summary:
  The FileHandler module provides simple and efficient functions for reading, writing, and appending data to various file formats including .txt, .dat, and .csv. It supports handling text, binary, and CSV data with automatic format detection based on file extension. This module is ideal for basic file operations, making it easy to work with different file types in Python without requiring complex file management.


pkgId: a496facd8068a350691a986f82ee169ebca004e955091e599f7d6acaa470b9d8
name: python-bctpy
arch: src
version: 0.6.1
epoch: 0
release: 1
summary: Brain Connectivity Toolbox for Python
url: https://github.com/aestrivex/bctpy
rpm_license: Visuddhimagga Sutta; GPLv3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bctpy-0.6.1-1.src.rpm
checksum_type: sha256
description:
  Author: Roan LaPlante <rlaplant@nmr.mgh.harvard.edu>

  Tested against python 3.7+.



  This program strictly observes the tenets of fundamentalist Theravada Mahasi
  style Buddhism.  Any use of this program in violation of these aforementioned
  tenets or in violation of the principles described in the Visuddhimagga Sutta
  is strictly prohibited and punishable by extensive Mahayana style practice.
  By being or not being mindful of the immediate present moment sensations
  involved in the use of this program, you confer your acceptance of these terms
  and conditions.

  Note that the observation of the tenets of fundamentalist Theravada Mahasi
  style Buddhism and the Visuddhimagga Sutta is optional as long as the terms and
  conditions of the GNU GPLv3+ are upheld.



  BCTPY is written in pure python and requires only `scipy` and `numpy`. `scipy` is required for a couple of functions for its statistical and linear algebra
  packages which have some features not available in `numpy` alone. If you don't
  have `scipy`, most functions that do not need `scipy` functionality will still work.

  Note that graphs must be passed in as `numpy.array` rather than `numpy.matrix`. Other constraints/edge cases of the adjacency matrices (e.g. self-loops, negative weights) behave similarly to the matlab functions.

  A small number of functions also depend on networkx. This notably includes Network-Based Statistic, a nonparametric test for differences in undirected weighted graphs from different populations. Ideally this dependency should be removed in the future.

  Nosetests is used for the test suite. The test suite is not complete.



  BCT is a matlab toolbox with many graph theoretical measures off of which `bctpy`
  is based.  I did not write BCT (apart from small bugfixes I have submitted)
  and a quality of life improvements that I have taken liberties to add.
  With few exceptions, `bctpy` is a direct translation of matlab code to python.

  `bctpy` should be considered beta software, with BCT being the gold standard by
  comparison. I did my best to test all functionality in `bctpy`, but much of it is
  arcane math that flies over the head of this humble programmer. There *are*
  bugs lurking in `bctpy`, the question is not whether but how many. If you locate
  bugs, please consider submitting pull requests.

  Many thanks to Stefan Fuertinger for his assistance tracking down a number of
  bugs. Stefan Fuertinger has a similar software package dealing with brain
  network functionality at http://research.mssm.edu/simonyanlab/analytical-tools/

  Many thanks to Chris Barnes for his assistance in documenting a number of issues and facilitating a number of test cases.

  Credit for writing BCT (the matlab version) goes to the following list of
  authors, especially Olaf Sporns and Mika Rubinov.

  - Olaf Sporns
  - Mikail Rubinov
  - Yusuke Adachi
  - Andrea Avena
  - Danielle Bassett
  - Richard Betzel
  - Joaquin Goni
  - Alexandros Goulas
  - Patric Hagmann
  - Christopher Honey
  - Martijn van den Heuvel
  - Rolf Kotter
  - Jonathan Power
  - Murray Shanahan
  - Andrew Zalesky

  In order to be a bit more compact I have removed the accreditations from the
  docstrings each functions. This does not in any way mean that I wish to take
  credit from the individual contributions. I have moved these accreditations
  to the credits file.


pkgId: b88734e91eb206cb78643f9cf84db12ce34a3fa14efa65e034eed224d18ca375
name: python-bcubed
arch: src
version: 1.5
epoch: 0
release: 1
summary: Simple extended BCubed implementation in Python for clustering evaluation
url: https://github.com/hhromic/python-bcubed
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcubed-1.5-1.src.rpm
checksum_type: sha256
description:
  Simple extended BCubed implementation in Python for (non-)overlapping clustering evaluation.

  More information on BCubed and details of the algorithm can be found in the following publication:

  > Amigó, Enrique, et al.: A comparison of Extrinsic Clustering Evaluation Metrics based on Formal Constraints. In: Information Retrieval 12.4 (2009): 461-486.



  You can simply use `pip` (or any similar package manager) for installation:

      pip install bcubed

  or, if you prefer a local user installation:

      pip install --user bcubed



  To evaluate any clustering output you will need **ground-truth data** (also called gold-standard data). We call this the `ldict`. The ground-truth is represented in a dictionary where the keys are items in the gold-standard and the values are sets of annotated categories for those items. For example:

  ```python
  ldict = {
      "item1": set(["gray", "black"]),
      "item2": set(["gray", "black"]),
      "item3": set(["gray"]),
      "item4": set(["black"]),
      "item5": set(["black"]),
      "item6": set(["dashed"]),
      "item7": set(["dashed"]),
  }
  ```

  In the above example, `item1` is assigned two categories in the ground-truth: `gray` and `black`. For the case of `item6` and `item7`, both are assigned the single annotation `dashed`. This representation supports modelling overlapping and non-overlapping ground-truth data.

  The **clustering output** to be evaluated is called the `cdict` and is also represented as a dictionary in the same way as the `ldict`. In this case, the keys are items in the clustering output and the values are the sets of assigned clusters for those items. For example:

  ```python
  cdict = {
      "item1": set(["A", "B"]),
      "item2": set(["A", "B"]),
      "item3": set(["A"]),
      "item4": set(["B"]),
      "item5": set(["B"]),
      "item6": set(["C"]),
      "item7": set(["C"]),
  }
  ```

  Please note that the clusters names (or IDs) **do not need** to be the same as in the ground-truth data because the algorithm only considers the groupings, it does not try to match the names of clusters to the ground-truth categories.

  Once you have defined the `ldict` (ground-truth data) and the `cdict` (clustering output to evaluate), you can simply do the following to obtain the extended BCubed precision and recall metric values:

  ```python
  import bcubed

  precision = bcubed.precision(cdict, ldict)
  recall = bcubed.recall(cdict, ldict)
  fscore = bcubed.fscore(precision, recall)
  ```

  There is also included an [F-score](http://en.wikipedia.org/wiki/F1_score) (also called F-measure) function for your convenience. This function accepts non-standard values for the beta parameter if you need, as follows:

  ```python
  fscore = bcubed.fscore(precision, recall, beta=2.0)  # weights recall higher
  fscore = bcubed.fscore(precision, recall, beta=0.5)  # weights precision higher
  ```

  A complete example can be found in the included `example.py` file, where the examples of the source publication are used.



  This software is under the **Apache License 2.0**.

      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.


pkgId: b70039e3bc1c9cfb4c74e1bd057e9f250ec62aab82aa88546508dcb35b6d374a
name: python-bcvContext
arch: src
version: 0.1.12
epoch: 0
release: 1
summary: A small package to handle context path for the BCV generic workflow
url: https://pypi.org/project/bcvContext/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcvContext-0.1.12-1.src.rpm
checksum_type: sha256
description:
  This library must be executed with a accessible `.config.json` :

  ```json
  {
    "day": 2,
    "scriptsVersion": "V3"
  }
  ```



  ```python
  import bcvContext as bcv

  bcv.scriptContext(fileName)

  bcv.dayContext(m,filename)

  bcv.getRawfile()
  ```


pkgId: 6fe10666131bf09a0c831f5f358b1ddcaf98be2bacd9227c768ed1e9eba8028f
name: python-bd-metric
arch: src
version: 0.9.0
epoch: 0
release: 1
summary: Bjontegaard metric calculation
url: https://github.com/shengbinmeng/Bjontegaard_metric
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bd-metric-0.9.0-1.src.rpm
checksum_type: sha256
description:
  Bjontegaard metric calculation. Include BD-PSNR and BD-rate.

  See `demo.py` for usage.

  References:
  * [1] G. Bjontegaard, Calculation of average PSNR differences between
      RD-curves (VCEG-M33)
  * [2] S. Pateux, J. Jung, An excel add-in for computing Bjontegaard metric and
      its evolution


pkgId: 27f544a179a8eb925bbf6d0044265382f5076a6af733c3e61c52acab1701c91e
name: python-bd-scan-yocto-via-sbom
arch: src
version: 1.0.14
epoch: 0
release: 1
url: https://github.com/matthewb66/bd_scan_yocto_via_sbom
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bd-scan-yocto-via-sbom-1.0.14-1.src.rpm
checksum_type: sha256
summary:
  BD_yocto_import_sbom - BD Script to import a Yocto project to Black Duck by scanning license.manifest and creating an SBOM file

description:
  This script is provided under the MIT license (see LICENSE file).

  It does not represent any extension of licensed functionality of Synopsys software itself and is provided as-is, without warranty or liability.

  If you have comments or issues, please raise a GitHub issue here. Synopsys support is not able to respond to support tickets for this OSS utility. Users of this pilot project commit to engage properly with the authors to address any identified issues.




  This utility will create a Black Duck project from a Yocto project, including
  - Scanning the Yocto project artefacts to generate an SPDX SBOM file which will be uploaded to the specified Black Duck server to create a project version
  - Filtering recipes using data from the OpenEmbedded (OE) APIs to 'fix-up' recipes moved to new layers or with different local versions/revisions
  - Signature scanning packages/downloaded archives (for recipes not matched from OE data)
  - Applying patches for locally patched CVEs identified from `cve_patch` if this data is available

  This utility has some benefits over the alternative Black Duck Yocto scan processes [Synopsys Detect](https://detect.synopsys.com/doc) and [bd-scan-yocto](https://github.com/matthewb66/bd_scan_yocto), in particular by matching modified original OE recipes and not needing to specify the Bitbake environment script to run Detect Bitbake dependency scans.

  Note that, from Black Duck version 2024.7 onwards, the use of SPDX SBOM upload provides for the optional, automatic creation of custom components
  for recipes not matched in the BD KB using the option `--sbom_create_custom_components`. This would enable the creation of a complete SBOM including 3rd party or local, custom components.

  See the `BEST PRACTICE RECOMMENDATIONS` section below for guidance on optimising Yocto project scans using this utility.



  1. Create virtualenv
  2. Run `pip3 install bd_scan_yocto_via_sbom --upgrade`

  Alternatively, if you want to build and install the utility locally:

  1. clone the repository
  2. Create virtualenv
  3. Build the utility `python3 -m build`
  4. Install the package `pip3 install dist/bd_scan_yocto_via_sbom-1.0.X-py3-none-any.whl --upgrade`

  Alternatively, clone the repository locally:

  1. Clone the repository
  2. Ensure prerequisite packages are installed (see list in pyproject.toml)



  1. Yocto v2.1 or newer
  2. Black Duck server 2024.1 or newer



  If you installed the utility as a package:

  1. Set the Bitbake environment (for example `source oe-init-build-env`)
  2. Invoke virtualenv where utility was installed
  3. Run `bd-scan-yocto-via-sbom OPTIONS`

  Alternatively, if you have cloned the repository locally:

  1. Set the Bitbake environment (for example `source oe-init-build-env`)
  2. Invoke virtualenv where dependency packages were installed
  3. Run `python3 PATH_TO_REPOSITORY/run.py OPTIONS`



  For optimal Yocto scan results, consider the following:

  1. The utility will call Bitbake by default to extract the environment and layer information by default. Locations and other values (license.manifest, machine, target, download_dir, package_dir, image_package_type) extracted from the environment can be overridden using command line options. Also consider using `--bitbake_layers_file FILE` to bypass calling Bitbake (where FILE contains the
  output of the `bitbake-layers show-recipes` command.
  3. Use the `--oe_data_folder FOLDER` option to cache the downloaded OE data (~300MB on every run) noting that the OE data does not change frequently.
  4. Add the `cve_check` class to the Bitbake local.conf to ensure patched CVEs are identified, and then check that PHASE 6 picks up the cve-check file (see CVE PATCHING below). Optionally specify the output CVE check file using `--cve_check_file FILE`.
  5. Where recipes have been modified from original versions against the standard OE recipes, use the `--max_oe_version_distance X.X.X` option to specify fuzzy matching against OE recipes (distance values in the range '0.0.1' to '0.0.10' are recommended), although this can also cause some matches to be disabled. Create
  2 projects and compare the results with and without this option.
  6. If you wish to add the Linux kernel and other packages specified in the image manifest only,
  consider using the `--process_image_manifest` option and optionally specifying the image manifest license file path (--image_license_manifest FILEPATH) where it does not exist in the same folder and the license.manifest file.
  7. Use the `--recipe_report REPFILE` option to create a report of matched and unmatched recipes in the BOM. In particular check the recipes in the `RECIPES NOT IN BOM - MATCHED IN OE DATA` section.
  8. Consider running Signature scan on all packages as opposed to the default of ONLY those not matched by identifier (use `--scan_all_packages` - useful for deep license and copyright analysis of standard OE recipes). Will require BOM curation to remove duplicates and partial matches.



  There are several additional options to modify the behaviour of this utility including:
  - Skip use of bitbake command to locate project files by specifying license.manifest and bitbake-layers output files (use `--skip_bitbake`)
  - Use data from the OpenEmbedded API to verify original recipes, layers, version to ensure they match known components in the BD KB (use `--skip_oe_data` to skip)
  - Cache OE data in JSON files in a local folder to remove need to download on every run (use `--oe_data_folder FOLDER`)
  - Specify semantic version distance for matching recipes against OE data (default distance is '0.0.0' - use `--max_oe_version_distance X.X.X`)
  - Create SPDX output file for manual upload (do not upload to Black Duck to create project - use `--output_file OUTPUT`)
  - Specify license.manifest, machine, target, download_dir, package_dir, image_package_type to override values extracted from Bitbake environment
  - Skip Signature scan of downloaded archives and packages (use `--skip_sig_scan`)
  - Add image manifest recipes (use `--process_image_manifest` or `--image_license_manifest FILE`)
  - Run Signature scan on all packages as opposed to only those not matched by identifier (use `--scan_all_packages` - useful for deep license and copyright analysis of standard OE recipes). Will require BOM curation to remove duplicates and partial matches (Signature scanning is intended to find partial matches for review).



        usage: bd-scan-yocto-via-sbom [-h] [--blackduck_url BLACKDUCK_URL] [--blackduck_api_token BLACKDUCK_API_TOKEN] [--blackduck_trust_cert] [-p PROJECT] [-v VERSION]
                    [-l LICENSE_MANIFEST] [-b BITBAKE_LAYERS] [-c CVE_CHECK_FILE] [-o OUTPUT] [--debug] [--logfile LOGFILE]

        Create BD Yocto project from license.manifest

       -h, --help            show this help message and exit
       --blackduck_url BLACKDUCK_URL
                             Black Duck server URL (REQUIRED - can use
                             BLACKDUCK_URL env var)
       --blackduck_api_token BLACKDUCK_API_TOKEN
                             Black Duck API token (REQUIRED - can use
                             BLACKDUCK_API_TOKEN env var)
       --blackduck_trust_cert
                             Black Duck trust server cert (can use
                             BLACKDUCK_TRUST_CERT env var)
       -p PROJECT, --project PROJECT
                             Black Duck project to create (REQUIRED)
       -v VERSION, --version VERSION
                             Black Duck project version to create (REQUIRED)
       -t TARGET, --target TARGET
                             Yocto target (e.g. core-image-sato - REQUIRED if
                             license.manifest not specified)
       -l LICENSE_MANIFEST, --license_manifest LICENSE_MANIFEST
                             license.manifest file path (REQUIRED - default
                             'license.manifest')
       -i IMAGE_LICENSE_MANIFEST, --image_license_manifest IMAGE_LICENSE_MANIFEST
                             Specify the image_license.manifest file path to process recipes from the core image.
       --process_image_manifest
                             Process the image_license.manifest file to process recipes from the core image using the
                             default location. Alternatively specify the image_license.manifest file path.
       -b BITBAKE_LAYERS, --bitbake_layers_file BITBAKE_LAYERS
                             File containing output of 'bitbake-layers show-
                             recipes' command (OPTIONAL)
       -c CVE_CHECK_FILE, --cve_check_file CVE_CHECK_FILE
                             CVE check output file
       -o OUTPUT, --output OUTPUT
                             Specify output SBOM SPDX file for manual upload (if
                             specified then BD project will not be created
                             automatically and CVE patching not supported)
       --skip_oe_data        Download and use OE data to check layers, versions &
                             revisions
       --oe_data_folder OE_DATA_FOLDER
                             Folder to contain OE data files - if files do not
                             exist they will be downloaded, if files exist then
                             will be used without download
       --max_oe_version_distance MAX_OE_VERSION_DISTANCE
                             Where no exact match, use closest previous recipe
                             version up to specified distance.Distance should be
                             specified as MAJOR.MINOR.PATCH (e.g. 0.1.0)
       --build_dir BUILD_DIR
                             Alternative build folder
       --download_dir DOWNLOAD_DIR
                             Download directory where original OSS source is
                             downloaded (usually poky/build/downloads)
       --package_dir PACKAGE_DIR
                             Download directory where package files are downloaded
                             (for example poky/build/tmp/deploy/rpm/<ARCH>)
       --image_package_type IMAGE_PACKAGE_TYPE
                             Package type used for installing packages (e.g. rpm,
                             deb or ipx)
       --skip_sig_scan       Do not Signature scan downloads and packages
       --scan_all_packages   Signature scan all packages (only recipes not matched from
                             OE data are scanned by default)
       --detect_jar_path DETECT_JAR_PATH
                             Synopsys Detect jar path
       --detect_opts DETECT_OPTS
                             Additional Synopsys Detect options
       --api_timeout         Specify API timeout in seconds (default 60) - will be used in
                             Synopsys Detect as --detect.timeout
       --sbom_create_custom_components
                             Create custom components when uploading SBOM (default False)
       --debug               Debug logging mode
       --logfile LOGFILE     Logging output file
       --recipe_report REPFILE
                             Output specified file with a list of recipes including those not matched in the BOM



  - --blackduck_url BD_URL --blackduck_api_token BD_API -p BD_PROJECT -v BD_VERSION -t YOCTO_TARGET

  Optionally add the `--blackduck_trust_cert` option to trust the Black Duck server certificate.

  Also consider using `--oe_data_folder FOLDER` with an existing folder to cache the OE recipe data on subsequent runs to save large downloads at each execution.

  Server credentials can also be specified using standard environment variables (BLACKDUCK_URL, BLACKDUCK_API_TOKEN and BLACKDUCK_TRUST_CERT).



  - --blackduck_url, --blackduck_api_token, --blackduck_trust_cert:
    - Connection credentials to Black Duck server. Can also be picked up from the environment variables BLACKDUCK_URL,
  BLACKDUCK_API_TOKEN and BLACKDUCK_TRUST_CERT. Required to create the BD project version automatically and optionally process CVE patch status; not required if `--output` specified.

  - --output SBOM_FILE (also -o):
    - Create an output SBOM file for manual upload; do not create BD project version.

  - --project PROJECT --version VERSION (also -p -v):
    - Black Duck project and version to create - REQUIRED

  - --license_manifest LICENSE_MANIFEST_FILE (also -l):
    - Optionally specify yocto license.manifest file created by Bitbake. Usually located in the folder `tmp/deploy/licenses/<yocto-image>-<yocto-machine>/license.manifest`. Should be determined from Bitbake environment by default (unless `--skip_bitbake` used).

  - --target TARGET (also -t):
    - Bitbake target (e.g. `core-image-sato`) - required unless `--skip_bitbake` used.

  - --skip_bitbake:
    - Do not extract Bitbake environment and layers information using Bitbake commands - requires license.manifest and bitbake-layers
  output to be specified.

  - --bitbake_layers_file BITBAKE_OUTPUT_FILE (also -b):
    - Optionally specify output of the command `bitbake-layers show-recipes` stored in the specified file.  Should be determined from Bitbake environment
  by default (unless `--skip_bitbake` used).

  - --cve_checkfile CVE_CHECK_FILE:
    - Optionally specify output file from run of the `cve_check` custom class which generates a list of patched CVEs. Usually located in the
  folder `build/tmp/deploy/images/XXX`.  Should be determined from Bitbake environment by default (unless `--skip_bitbake` used)

  - --skip_oe_data:
    - Do not download layers/recipes/layers from layers.openembedded.org APIs to review origin layers and revisions used in recipes to
  ensure more accurate matching and complete BOMs.

  - --oe_data_folder FOLDER:
    - Create OE data files in the specified folder if not already existing. If OE data files exist already in this folder,
  use them to review layers and revisions to ensure more accurate matching and complete BOMs. Allows offline usage
  of OE data or reduction of large data transfers if script is run frequently.

  - --skip_sig_scan:
    - Do not send identified package and downloaded archives for Signature scanning. By default, recipes
  not matched against OE data will be Signature scanned.

   - --scan_all_packages:
     - Signature scan all recipes including those matched against OE recipes. By default, only recipes
  not matched against OE data will be Signature scanned.

  - --max_oe_version_distance MAJOR.MINOR.PATCH:
    - Specify version distance to enable closest (previous) recipe version matching against OE data where exact matches not available.
  By default, when `--get_oe_data` is specified, OE recipe versions must match the version exactly to replace layers and revision values.
  Setting this value will allow close (previous) recipe version matching.
  The value needs to be of the format MAJOR.MINOR.PATCH (e.g. '0.10.0').
  CAUTION - setting this value to a large value will cause versions of components to be matched against previous recipes maintained in the OE data,
  which may lead to different levels of reported vulnerabilities. It is preferable to maintain close relation between the matched
  versions and the ones in the project and then to identify unmatched components which can be added as custom components or manually. Consequently
  only consider using values which allow versions from different MINOR or MAJOR versions in exceptional circumstances (meaning the supplied
  value should probably be in the range 0.0.1 to 0.0.10).

  - --process_image_manifest OR --image_license_manifest PATH:
    - Include processing of image_license.manifest file to add recipes from the core image to the BOM (usually including Linux kernel).

  - --recipe_report REPFILE:
    - Create a report of matched and unmatched recipes in specified REPFILE.



  - Recipe version is 3.2.4 - closest previous OE recipe version is 3.2.1: Distance value would need to be minimum 0.0.3
  - Recipe version is 3.2.4 - closest previous OE recipe version is 3.0.1: Distance value would need to be minimum 0.2.0
  - Recipe version is 3.2.4 - closest previous OE recipe version is 2.0.1: Distance value would need to be minimum 1.0.0

  Note that lower order values are overridden by higher order (for example distance 1.0.0 is equivalant to 1.999.999).



  The Yocto `cve_check` class works on the Bitbake dependencies within the dev environment, and produces a list of CVEs identified from the NVD for ALL packages in the development environment.

  For patched CVE remediation in the Black Duck project, you will need to add the `cve_check` bbclass to the Yocto build configuration to generate the CVE check log output. Add the following line to the `build/conf/local.conf` file:

         INHERIT += "cve-check"

  Then rebuild the project (using for example `bitbake core-image-sato`)  to run the CVE check action and generate the required CVE log files without a full rebuild.

  The script should locate the path for the output file from cve-check, but you can also specify the file using the option `--cve_check_file CVE_CHECK_FILE` which is usually located in the `poky/tmp/deploy/images



  - Ensure that you have specified the required minimum options including the Yocto target (-t).

  - Check all the prerequisites, and that there is a built Yocto project with a generated license.manifest file.

  - Use the option --debug to turn on debug logging.

  - After scan completion, check that there are at least 2 separate code locations in the Source tab in the Black Duck project (one for SBOM import and the other for Signature scan).

  - Check the information from PHASE 5 (if it is run) in particular the total components in BOM against total recipes in Yocto project. The `Recipes matched in OE data but not in BOM` counts recipes which were found in OE data but could not be matched against the BD KB. Check to see if these recipes (also listed in Phase 5) are identified by subsequent Signature scan and consider adding the origin OSS components as manual additions in the Project Version.

  - If you are looking for a specific package which appears to be missing from the project, confirm that you are looking for the recipe name not the package name. See the FAQs for an explanation of Yocto recipes versus packages. Check that the package file was included in the Signature scan (within the Source tab).



  If you encounter issues using the script, then please create an issue in GitHub, ensuring that you include the following information:

  - Your Organisation name (to validate you have a Black Duck license)
  - Description of the issue
  - Yocto version in use (use the command `bitbake -e | grep DISTRO_CODENAME`)
  - The `license.manifest` file for the build
  - The output of the command `bitbake-layers show-recipes`
  - The log output from this script with `--debug` enabled (use the `--logfile LOGFILE` option to output to a file )
  - The recipe report file (use `--recipe_report REPFILE`)



  For a custom C/C++ recipe, or where other languages and package managers are used to build custom recipes, other types of scan could be considered in addition to the techniques used in this script.

  For C/C++ recipes, the advanced [blackduck_c_cpp](https://pypi.org/project/blackduck-c-cpp/) utility could be used as part of the build to identify the compiled sources, system includes and operating system dependencies. You would need to modify the build command for the recipe to call the `blackduck-c-cpp` utility as part of a scanning cycle after it had been configured to connect to the Black Duck server.

  For recipes where a package manager is used, then a standard Synopsys Detect scan in DETECTOR mode could be utilised to analyse the project dependencies separately.

  Multiple scans can be combined into the same Black Duck project (ensure to use the Synopsys Detect option `--detect.project.codelocation.unmap=false` to stop previous scans from being unmapped).



  1. **Why can't I rely on the license data provided by Yocto in the license.manifest file?**

     _The licenses reported by Bitbake come straight from the recipe files used to build the project.
     However, the applicable license for each package is the actual declared license reported in the origin repository,
     which may not match the license name in the recipe used to build/install the package. Furthermore, the obligations of
     most OSS licenses require that the full license text is included in the distribution along with any relevant copyrights.
     Another concern is that most OSS packages use or encapsulate other OSS which can have different licenses to the declared
     license in the main package, and in some cases re-licensing is not allowed meaning that the declared license of the main
     is not applicable. Black Duck uses the licenses from the origin packages (not the Yocto recipe), supports full
     license text and copyrights as well as optional deep license analysis to identify embedded licenses within packages._


  2. **Can this utility be used on a Yocto image without access to the build environment?**

     _Yes possibly - Use the options `--skip_bitbake -l LIC_MANIFEST_FILE --bitbake_layers_file LAYERS_FILE` where LIC_MANIFEST_FILE is the path to the specific license.manifest file and LAYERS_FILE
     contains the output of the command `bitbake-layers show-recipes`_.


  4. **Why can't I simply use the `cve-check` class provided by Yocto to determine unpatched vulnerabilities?**

     _The cve-check class processes all recipes in the build and then looks up packages in the NVD to try to associate CVEs. The script reports all packages including build dependencies as opposed to the packages only in the distributed image which is usually not useful.
     The CVE association uses CPE (package enumerators) to match packages, but this uses wildcards which result in a large number of false positive CVEs being reported.
     For example, for a sample Yocto 4.1 minimal build, cve-check reported 160 total unpatched CVEs of which 14 were shown against zlib, however the Black Duck project shows that none of these should be associated with the zlib version in the build (only 3 patched and 0 unpatched vulnerabilities should be shown in the project)._


  5. **Why couldn't I just use the `create-spdx` class provided by Yocto to export a full SBOM?**

     _The Yocto `create-spdx` class produces SPDX JSON files for the packages in the project with the runtime packages also identified,
     including useful data such as the list of files in the image per package with hashes.
     However, many of the SPDX fields are blank (NO-ASSERTION) including license text, copyrights etc.
     The packages are also not identified by PURL so the SBOM cannot be effectively imported into other tools (including Black Duck)._


  6. **I cannot see a specific package in the Black Duck project.**

     _Use the `--recipe_report FILE` option to list matched and missing recipes. Note that Black Duck reports recipes in the Yocto project not individual packages.
  Multiple packages can be combined into a single recipe, but these are typically not downloaded separately and are considered to be part of the main component managed by the recipe, not individual OSS components._


  8. **I cannot see the Linux kernel in the Black Duck project.**

     _Consider using the `--process_image_manifest` OR `--image_license_manifest PATH` options to add processing of the
      packages in the image manifest usually including the Linux kernel. Note that the kernel cannot always be identified due to a custom name format being used in Yocto in which case consider adding the required kernel version to the project manually._


  9. **I am using another Yocto wrapper such as KAS https://kas.readthedocs.io/ and cannot run bitbake, or the script fails for some other reason.**

     _Use the options `--skip_bitbake -l LIC_MANIFEST_FILE --bitbake_layers_file LAYERS_FILE` where LIC_MANIFEST_FILE is the path to the specific license.manifest file and LAYERS_FILE
     contains the output of the command `bitbake-layers show-recipes`._


pkgId: 37c5b8e2571e899c6e8e9f883bac995b9d966c2e938a83e1e2919dc5c140ae26
name: python-bd-scan-yocto-via-sbom
arch: src
version: 1.0.15
epoch: 0
release: 1
url: https://github.com/blackducksoftware/bd_scan_yocto_via_sbom
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bd-scan-yocto-via-sbom-1.0.15-1.src.rpm
checksum_type: sha256
summary:
  BD_yocto_import_sbom - BD Script to import a Yocto project to Black Duck SCA by scanning license.manifest and creating an SBOM file

description:
  This script is provided under the MIT license (see LICENSE file).

  It does not represent any extension of licensed functionality of Black Duck Software itself and is provided as-is, without warranty or liability.

  If you have comments or issues, please raise a GitHub issue here. Black Duck support is not able to respond to support tickets for this OSS utility. Users of this pilot project commit to engage properly with the authors to address any identified issues.




  This utility will create a Black Duck SCA project from a Yocto project, including
  - Scanning the Yocto project artefacts to generate an SPDX SBOM file which will be uploaded to the specified Black Duck server to create a project version
  - Filtering recipes using data from the OpenEmbedded (OE) APIs to 'fix-up' recipes moved to new layers or with different local versions/revisions
  - Signature scanning packages/downloaded archives (for recipes not matched from OE data)
  - Applying patches for locally patched CVEs identified from `cve_patch` if this data is available

  This utility has some benefits over the alternative Black Duck SCA Yocto scan processes [Detect](https://detect.synopsys.com/doc) and [bd-scan-yocto](https://github.com/matthewb66/bd_scan_yocto), in particular by matching modified original OE recipes and not needing to specify the Bitbake environment script to run Detect Bitbake dependency scans.

  Note that, from Black Duck SCA version 2024.7 onwards, the use of SPDX SBOM upload provides for the optional, automatic creation of custom components
  for recipes not matched in the BD KB using the option `--sbom_create_custom_components`. This would enable the creation of a complete SBOM including 3rd party or local, custom components.

  See the `BEST PRACTICE RECOMMENDATIONS` section below for guidance on optimising Yocto project scans using this utility.



  1. Create virtualenv
  2. Run `pip3 install bd_scan_yocto_via_sbom --upgrade`

  Alternatively, if you want to build and install the utility locally:

  1. clone the repository
  2. Create virtualenv
  3. Build the utility `python3 -m build`
  4. Install the package `pip3 install dist/bd_scan_yocto_via_sbom-1.0.X-py3-none-any.whl --upgrade`

  Alternatively, clone the repository locally:

  1. Clone the repository
  2. Ensure prerequisite packages are installed (see list in pyproject.toml)



  1. Yocto v2.1 or newer
  2. Black Duck SCA server 2024.1 or newer
  3. Black Duck SCA API with either Global Code Scanner and Global Project Manager roles or Project Code Scanner and BOM Manager roles for an existing project
  4. Multi-target Bitbake configurations are not supported - use this utility on a single target at a time
  5. A built Yocto project is required with access to the build platform; alternatively specific outputs from the build can be used instead although some script features may not be supported



  If you installed the utility as a package:

  1. Set the Bitbake environment (for example `source oe-init-build-env`)
  2. Invoke virtualenv where utility was installed
  3. Run `bd-scan-yocto-via-sbom OPTIONS`

  Alternatively, if you have cloned the repository locally:

  1. Set the Bitbake environment (for example `source oe-init-build-env`)
  2. Invoke virtualenv where dependency packages were installed
  3. Run `python3 PATH_TO_REPOSITORY/run.py OPTIONS`



  For optimal Yocto scan results, consider the following:

  1. The utility will call Bitbake by default to extract the environment and layer information by default. Locations and other values (license.manifest, machine, target, download_dir, package_dir, image_package_type) extracted from the environment can be overridden using command line options. Also consider using `--bitbake_layers_file FILE` to bypass calling Bitbake (where FILE contains the
  output of the `bitbake-layers show-recipes` command.
  2. Use the `--oe_data_folder FOLDER` option to cache the downloaded OE data (~300MB on every run) noting that the OE data does not change frequently.
  3. Add the `cve_check` class to the Bitbake local.conf to ensure patched CVEs are identified, and then check that PHASE 6 picks up the cve-check file (see CVE PATCHING below). Optionally specify the output CVE check file using `--cve_check_file FILE`.
  4. Where recipes have been modified from original versions against the standard OE recipes, use the `--max_oe_version_distance X.X.X` option to specify fuzzy matching against OE recipes (distance values in the range '0.0.1' to '0.0.10' are recommended), although this can also cause some matches to be disabled. Create
  2 projects and compare the results with and without this option.
  5. If you wish to add the Linux kernel and other packages specified in the image manifest only,
  consider using the `--process_image_manifest` option and optionally specifying the image manifest license file path (--image_license_manifest FILEPATH) where it does not exist in the same folder and the license.manifest file.
  6. Use the `--recipe_report REPFILE` option to create a report of matched and unmatched recipes in the BOM. In particular check the recipes in the `RECIPES NOT IN BOM - MATCHED IN OE DATA` section.
  7. Consider running Signature scan on all packages as opposed to the default of ONLY those not matched by identifier (use `--scan_all_packages` - useful for deep license and copyright analysis of standard OE recipes). Will require BOM curation to remove duplicates and partial matches.



  There are several additional options to modify the behaviour of this utility including:
  - Skip use of bitbake command to locate project files by specifying license.manifest and bitbake-layers output files (use `--skip_bitbake`)
  - Use data from the OpenEmbedded API to verify original recipes, layers, version to ensure they match known components in the BD KB (use `--skip_oe_data` to skip)
  - Cache OE data in JSON files in a local folder to remove need to download on every run (use `--oe_data_folder FOLDER`)
  - Specify semantic version distance for matching recipes against OE data (default distance is '0.0.0' - use `--max_oe_version_distance X.X.X`)
  - Create SPDX output file for manual upload (do not upload to Black Duck to create project - use `--output_file OUTPUT`)
  - Specify license.manifest, machine, target, download_dir, package_dir, image_package_type to override values extracted from Bitbake environment
  - Skip Signature scan of downloaded archives and packages (use `--skip_sig_scan`)
  - Add image manifest recipes (use `--process_image_manifest` or `--image_license_manifest FILE`)
  - Run Signature scan on all packages as opposed to only those not matched by identifier (use `--scan_all_packages` - useful for deep license and copyright analysis of standard OE recipes). Will require BOM curation to remove duplicates and partial matches (Signature scanning is intended to find partial matches for review).



        usage: bd-scan-yocto-via-sbom [-h] [--blackduck_url BLACKDUCK_URL] [--blackduck_api_token BLACKDUCK_API_TOKEN] [--blackduck_trust_cert] [-p PROJECT] [-v VERSION]
                    [-l LICENSE_MANIFEST] [-b BITBAKE_LAYERS] [-c CVE_CHECK_FILE] [-o OUTPUT] [--debug] [--logfile LOGFILE]

        Create BD Yocto project from license.manifest

       -h, --help            show this help message and exit
       --blackduck_url BLACKDUCK_URL
                             Black Duck server URL (REQUIRED - can use
                             BLACKDUCK_URL env var)
       --blackduck_api_token BLACKDUCK_API_TOKEN
                             Black Duck API token (REQUIRED - can use
                             BLACKDUCK_API_TOKEN env var)
       --blackduck_trust_cert
                             Black Duck trust server cert (can use
                             BLACKDUCK_TRUST_CERT env var)
       -p PROJECT, --project PROJECT
                             Black Duck project to create (REQUIRED)
       -v VERSION, --version VERSION
                             Black Duck project version to create (REQUIRED)
       -t TARGET, --target TARGET
                             Yocto target (e.g. core-image-sato - REQUIRED if
                             license.manifest not specified - single target configuration only supported)
       -l LICENSE_MANIFEST, --license_manifest LICENSE_MANIFEST
                             license.manifest file path (REQUIRED - default
                             'license.manifest')
       -i IMAGE_LICENSE_MANIFEST, --image_license_manifest IMAGE_LICENSE_MANIFEST
                             Specify the image_license.manifest file path to process recipes from the core image.
       --process_image_manifest
                             Process the image_license.manifest file to process recipes from the core image using the
                             default location. Alternatively specify the image_license.manifest file path.
       -b BITBAKE_LAYERS, --bitbake_layers_file BITBAKE_LAYERS
                             File containing output of 'bitbake-layers show-
                             recipes' command (OPTIONAL)
       -c CVE_CHECK_FILE, --cve_check_file CVE_CHECK_FILE
                             CVE check output file
       -o OUTPUT, --output OUTPUT
                             Specify output SBOM SPDX file for manual upload (if
                             specified then BD project will not be created
                             automatically and CVE patching not supported)
       --skip_oe_data        Download and use OE data to check layers, versions &
                             revisions
       --oe_data_folder OE_DATA_FOLDER
                             Folder to contain OE data files - if files do not
                             exist they will be downloaded, if files exist then
                             will be used without download
       --max_oe_version_distance MAX_OE_VERSION_DISTANCE
                             Where no exact match, use closest previous recipe
                             version up to specified distance.Distance should be
                             specified as MAJOR.MINOR.PATCH (e.g. 0.1.0)
       --build_dir BUILD_DIR
                             Alternative build folder
       --download_dir DOWNLOAD_DIR
                             Download directory where original OSS source is
                             downloaded (usually poky/build/downloads)
       --package_dir PACKAGE_DIR
                             Download directory where package files are downloaded
                             (for example poky/build/tmp/deploy/rpm/<ARCH>)
       --image_package_type IMAGE_PACKAGE_TYPE
                             Package type used for installing packages (e.g. rpm,
                             deb or ipx)
       --skip_sig_scan       Do not Signature scan downloads and packages
       --scan_all_packages   Signature scan all packages (only recipes not matched from
                             OE data are scanned by default)
       --detect_jar_path DETECT_JAR_PATH
                             Detect jar path
       --detect_opts DETECT_OPTS
                             Additional Detect options (remove leading '--' from options)
       --api_timeout         Specify API timeout in seconds (default 60) - will be used in
                             Detect as --detect.timeout
       --sbom_create_custom_components
                             Create custom components when uploading SBOM (default False)
       --debug               Debug logging mode
       --logfile LOGFILE     Logging output file
       --recipe_report REPFILE
                             Output specified file with a list of recipes including those not matched in the BOM



  - --blackduck_url BD_URL --blackduck_api_token BD_API -p BD_PROJECT -v BD_VERSION -t YOCTO_TARGET

  Optionally add the `--blackduck_trust_cert` option to trust the Black Duck server certificate.

  Also consider using `--oe_data_folder FOLDER` with an existing folder to cache the OE recipe data on subsequent runs to save large downloads at each execution.

  Server credentials can also be specified using standard environment variables (BLACKDUCK_URL, BLACKDUCK_API_TOKEN and BLACKDUCK_TRUST_CERT).



  - --blackduck_url, --blackduck_api_token, --blackduck_trust_cert:
    - Connection credentials to Black Duck server. Can also be picked up from the environment variables BLACKDUCK_URL,
  BLACKDUCK_API_TOKEN and BLACKDUCK_TRUST_CERT. Required to create the BD project version automatically and optionally process CVE patch status; not required if `--output` specified.

  - --output SBOM_FILE (also -o):
    - Create an output SBOM file for manual upload; do not create BD project version.

  - --project PROJECT --version VERSION (also -p -v):
    - Black Duck project and version to create - REQUIRED

  - --license_manifest LICENSE_MANIFEST_FILE (also -l):
    - Optionally specify yocto license.manifest file created by Bitbake. Usually located in the folder `tmp/deploy/licenses/<yocto-image>-<yocto-machine>/license.manifest`. Should be determined from Bitbake environment by default (unless `--skip_bitbake` used).

  - --target TARGET (also -t):
    - Bitbake target (e.g. `core-image-sato`) - required unless `--skip_bitbake` used.

  - --skip_bitbake:
    - Do not extract Bitbake environment and layers information using Bitbake commands - requires license.manifest and bitbake-layers
  output to be specified.

  - --bitbake_layers_file BITBAKE_OUTPUT_FILE (also -b):
    - Optionally specify output of the command `bitbake-layers show-recipes` stored in the specified file.  Should be determined from Bitbake environment
  by default (unless `--skip_bitbake` used).

  - --cve_checkfile CVE_CHECK_FILE:
    - Optionally specify output file from run of the `cve_check` custom class which generates a list of patched CVEs. Usually located in the
  folder `build/tmp/deploy/images/XXX`.  Should be determined from Bitbake environment by default (unless `--skip_bitbake` used)

  - --skip_oe_data:
    - Do not download layers/recipes/layers from layers.openembedded.org APIs to review origin layers and revisions used in recipes to
  ensure more accurate matching and complete BOMs.

  - --oe_data_folder FOLDER:
    - Create OE data files in the specified folder if not already existing. If OE data files exist already in this folder,
  use them to review layers and revisions to ensure more accurate matching and complete BOMs. Allows offline usage
  of OE data or reduction of large data transfers if script is run frequently.

  - --skip_sig_scan:
    - Do not send identified package and downloaded archives for Signature scanning. By default, recipes
  not matched against OE data will be Signature scanned.

   - --scan_all_packages:
     - Signature scan all recipes including those matched against OE recipes. By default, only recipes
  not matched against OE data will be Signature scanned.

  - --max_oe_version_distance MAJOR.MINOR.PATCH:
    - Specify version distance to enable closest (previous) recipe version matching against OE data where exact matches not available.
  By default, when `--get_oe_data` is specified, OE recipe versions must match the version exactly to replace layers and revision values.
  Setting this value will allow close (previous) recipe version matching.
  The value needs to be of the format MAJOR.MINOR.PATCH (e.g. '0.10.0').
  CAUTION - setting this value to a large value will cause versions of components to be matched against previous recipes maintained in the OE data,
  which may lead to different levels of reported vulnerabilities. It is preferable to maintain close relation between the matched
  versions and the ones in the project and then to identify unmatched components which can be added as custom components or manually. Consequently
  only consider using values which allow versions from different MINOR or MAJOR versions in exceptional circumstances (meaning the supplied
  value should probably be in the range 0.0.1 to 0.0.10).

  - --process_image_manifest OR --image_license_manifest PATH:
    - Include processing of image_license.manifest file to add recipes from the core image to the BOM (usually including Linux kernel).

  - --recipe_report REPFILE:
    - Create a report of matched and unmatched recipes in specified REPFILE.



  - Recipe version is 3.2.4 - closest previous OE recipe version is 3.2.1: Distance value would need to be minimum 0.0.3
  - Recipe version is 3.2.4 - closest previous OE recipe version is 3.0.1: Distance value would need to be minimum 0.2.0
  - Recipe version is 3.2.4 - closest previous OE recipe version is 2.0.1: Distance value would need to be minimum 1.0.0

  Note that lower order values are overridden by higher order (for example distance 1.0.0 is equivalant to 1.999.999).



  The Yocto `cve_check` class works on the Bitbake dependencies within the dev environment, and produces a list of CVEs identified from the NVD for ALL packages in the development environment.

  For patched CVE remediation in the Black Duck project, you will need to add the `cve_check` bbclass to the Yocto build configuration to generate the CVE check log output. Add the following line to the `build/conf/local.conf` file:

         INHERIT += "cve-check"

  Then rebuild the project (using for example `bitbake core-image-sato`)  to run the CVE check action and generate the required CVE log files without a full rebuild.

  The script should locate the path for the output file from cve-check, but you can also specify the file using the option `--cve_check_file CVE_CHECK_FILE` which is usually located in the `poky/tmp/deploy/images



  - Ensure that you have specified the required minimum options including the Yocto target (-t).

  - Check all the prerequisites, and that there is a built Yocto project with a generated license.manifest file.

  - Use the option --debug to turn on debug logging.

  - After scan completion, check that there are at least 2 separate code locations in the Source tab in the Black Duck project (one for SBOM import and the other for Signature scan).

  - Check the information from PHASE 5 (if it is run) in particular the total components in BOM against total recipes in Yocto project. The `Recipes matched in OE data but not in BOM` counts recipes which were found in OE data but could not be matched against the BD KB. Check to see if these recipes (also listed in Phase 5) are identified by subsequent Signature scan and consider adding the origin OSS components as manual additions in the Project Version.

  - If you are looking for a specific package which appears to be missing from the project, confirm that you are looking for the recipe name not the package name. See the FAQs for an explanation of Yocto recipes versus packages. Check that the package file was included in the Signature scan (within the Source tab).



  If you encounter issues using the script, then please create an issue in GitHub, ensuring that you include the following information:

  - Your Organisation name (to validate you have a Black Duck license)
  - Description of the issue
  - Yocto version in use (use the command `bitbake -e | grep DISTRO_CODENAME`)
  - The `license.manifest` file for the build
  - The output of the command `bitbake-layers show-recipes`
  - The log output from this script with `--debug` enabled (use the `--logfile LOGFILE` option to output to a file )
  - The recipe report file (use `--recipe_report REPFILE`)



  For a custom C/C++ recipe, or where other languages and package managers are used to build custom recipes, other types of scan could be considered in addition to the techniques used in this script.

  For C/C++ recipes, the advanced [blackduck_c_cpp](https://pypi.org/project/blackduck-c-cpp/) utility could be used as part of the build to identify the compiled sources, system includes and operating system dependencies. You would need to modify the build command for the recipe to call the `blackduck-c-cpp` utility as part of a scanning cycle after it had been configured to connect to the Black Duck server.

  For recipes where a package manager is used, then a standard Detect scan in DETECTOR mode could be utilised to analyse the project dependencies separately.

  Multiple scans can be combined into the same Black Duck project (ensure to use the Detect option `--detect.project.codelocation.unmap=false` to stop previous scans from being unmapped).



  1. **Why can't I rely on the license data provided by Yocto in the license.manifest file?**

     _The licenses reported by Bitbake come straight from the recipe files used to build the project.
     However, the applicable license for each package is the actual declared license reported in the origin repository,
     which may not match the license name in the recipe used to build/install the package. Furthermore, the obligations of
     most OSS licenses require that the full license text is included in the distribution along with any relevant copyrights.
     Another concern is that most OSS packages use or encapsulate other OSS which can have different licenses to the declared
     license in the main package, and in some cases re-licensing is not allowed meaning that the declared license of the main
     is not applicable. Black Duck uses the licenses from the origin packages (not the Yocto recipe), supports full
     license text and copyrights as well as optional deep license analysis to identify embedded licenses within packages._


  2. **Can this utility be used on a Yocto image without access to the build environment?**

     _Yes possibly - Use the options `--skip_bitbake -l LIC_MANIFEST_FILE --bitbake_layers_file LAYERS_FILE` where LIC_MANIFEST_FILE is the path to the specific license.manifest file and LAYERS_FILE
     contains the output of the command `bitbake-layers show-recipes`_.


  4. **Why can't I simply use the `cve-check` class provided by Yocto to determine unpatched vulnerabilities?**

     _The cve-check class processes all recipes in the build and then looks up packages in the NVD to try to associate CVEs. The script reports all packages including build dependencies as opposed to the packages only in the distributed image which is usually not useful.
     The CVE association uses CPE (package enumerators) to match packages, but this uses wildcards which result in a large number of false positive CVEs being reported.
     For example, for a sample Yocto 4.1 minimal build, cve-check reported 160 total unpatched CVEs of which 14 were shown against zlib, however the Black Duck project shows that none of these should be associated with the zlib version in the build (only 3 patched and 0 unpatched vulnerabilities should be shown in the project)._


  5. **Why couldn't I just use the `create-spdx` class provided by Yocto to export a full SBOM?**

     _The Yocto `create-spdx` class produces SPDX JSON files for the packages in the project with the runtime packages also identified,
     including useful data such as the list of files in the image per package with hashes.
     However, many of the SPDX fields are blank (NO-ASSERTION) including license text, copyrights etc.
     The packages are also not identified by PURL so the SBOM cannot be effectively imported into other tools (including Black Duck)._


  6. **I cannot see a specific package in the Black Duck project.**

     _Use the `--recipe_report FILE` option to list matched and missing recipes. Note that Black Duck reports recipes in the Yocto project not individual packages.
  Multiple packages can be combined into a single recipe, but these are typically not downloaded separately and are considered to be part of the main component managed by the recipe, not individual OSS components._


  8. **I cannot see the Linux kernel in the Black Duck project.**

     _Consider using the `--process_image_manifest` OR `--image_license_manifest PATH` options to add processing of the
      packages in the image manifest usually including the Linux kernel. Note that the kernel cannot always be identified due to a custom name format being used in Yocto in which case consider adding the required kernel version to the project manually._


  9. **I am using another Yocto wrapper such as KAS https://kas.readthedocs.io/ and cannot run bitbake, or the script fails for some other reason.**

     _Use the options `--skip_bitbake -l LIC_MANIFEST_FILE --bitbake_layers_file LAYERS_FILE` where LIC_MANIFEST_FILE is the path to the specific license.manifest file and LAYERS_FILE
     contains the output of the command `bitbake-layers show-recipes`._


pkgId: 0d2e509186169abb2462febf590148a8d7568046e40bb1d8ddc22ef806b73927
name: python-bd-scan-yocto-via-sbom
arch: src
version: 1.0.16
epoch: 0
release: 1
url: https://github.com/blackducksoftware/bd_scan_yocto_via_sbom
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bd-scan-yocto-via-sbom-1.0.16-1.src.rpm
checksum_type: sha256
summary:
  BD_yocto_import_sbom - BD Script to import a Yocto project to Black Duck SCA by scanning license.manifest and creating an SBOM file

description:
  This script is provided under the MIT license (see LICENSE file).

  It does not represent any extension of licensed functionality of Black Duck Software itself and is provided as-is, without warranty or liability.

  If you have comments or issues, please raise a GitHub issue here. Black Duck support is not able to respond to support tickets for this OSS utility. Users of this pilot project commit to engage properly with the authors to address any identified issues.




  This utility will create a Black Duck SCA project from a Yocto project, including
  - Scanning the Yocto project artefacts to generate an SPDX SBOM file which will be uploaded to the specified Black Duck server to create a project version
  - Filtering recipes using data from the OpenEmbedded (OE) APIs to 'fix-up' recipes moved to new layers or with different local versions/revisions
  - Signature scanning packages/downloaded archives (for recipes not matched from OE data)
  - Applying patches for locally patched CVEs identified from `cve_patch` if this data is available

  This utility has some benefits over the alternative Black Duck SCA Yocto scan processes [Detect](https://detect.synopsys.com/doc) and [bd-scan-yocto](https://github.com/matthewb66/bd_scan_yocto), in particular by matching modified original OE recipes and not needing to specify the Bitbake environment script to run Detect Bitbake dependency scans.

  Note that, from Black Duck SCA version 2024.7 onwards, the use of SPDX SBOM upload provides for the optional, automatic creation of custom components
  for recipes not matched in the BD KB using the option `--sbom_create_custom_components`. This would enable the creation of a complete SBOM including 3rd party or local, custom components.

  See the `BEST PRACTICE RECOMMENDATIONS` section below for guidance on optimising Yocto project scans using this utility.



  1. Create virtualenv
  2. Run `pip3 install bd_scan_yocto_via_sbom --upgrade`

  Alternatively, if you want to build and install the utility locally:

  1. clone the repository
  2. Create virtualenv
  3. Build the utility `python3 -m build`
  4. Install the package `pip3 install dist/bd_scan_yocto_via_sbom-1.0.X-py3-none-any.whl --upgrade`

  Alternatively, clone the repository locally:

  1. Clone the repository
  2. Ensure prerequisite packages are installed (see list in pyproject.toml)



  1. Yocto v2.1 or newer
  2. Black Duck SCA server 2024.1 or newer
  3. Black Duck SCA API with either Global Code Scanner and Global Project Manager roles or Project Code Scanner and BOM Manager roles for an existing project
  4. Multi-target Bitbake configurations are not supported - use this utility on a single target at a time
  5. A built Yocto project is required with access to the build platform; alternatively specific outputs from the build can be used instead although some script features may not be supported



  If you installed the utility as a package:

  1. Set the Bitbake environment (for example `source oe-init-build-env`)
  2. Invoke virtualenv where utility was installed
  3. Run `bd-scan-yocto-via-sbom OPTIONS`

  Alternatively, if you have cloned the repository locally:

  1. Set the Bitbake environment (for example `source oe-init-build-env`)
  2. Invoke virtualenv where dependency packages were installed
  3. Run `python3 PATH_TO_REPOSITORY/run.py OPTIONS`



  For optimal Yocto scan results, consider the following:

  1. The utility will call Bitbake by default to extract the environment and layer information by default. Locations and other values (license.manifest, machine, target, download_dir, package_dir, image_package_type) extracted from the environment can be overridden using command line options. Also consider using `--bitbake_layers_file FILE` to bypass calling Bitbake (where FILE contains the
  output of the `bitbake-layers show-recipes` command.
  2. Use the `--oe_data_folder FOLDER` option to cache the downloaded OE data (~300MB on every run) noting that the OE data does not change frequently.
  3. Add the `cve_check` class to the Bitbake local.conf to ensure patched CVEs are identified, and then check that PHASE 6 picks up the cve-check file (see CVE PATCHING below). Optionally specify the output CVE check file using `--cve_check_file FILE`.
  4. Where recipes have been modified from original versions against the standard OE recipes, use the `--max_oe_version_distance X.X.X` option to specify fuzzy matching against OE recipes (distance values in the range '0.0.1' to '0.0.10' are recommended), although this can also cause some matches to be disabled. Create
  2 projects and compare the results with and without this option.
  5. If you wish to add the Linux kernel and other packages specified in the image manifest only,
  consider using the `--process_image_manifest` option and optionally specifying the image manifest license file path (--image_license_manifest FILEPATH) where it does not exist in the same folder and the license.manifest file.
  6. Use the `--recipe_report REPFILE` option to create a report of matched and unmatched recipes in the BOM. In particular check the recipes in the `RECIPES NOT IN BOM - MATCHED IN OE DATA` section.
  7. Consider running Signature scan on all packages as opposed to the default of ONLY those not matched by identifier (use `--scan_all_packages` - useful for deep license and copyright analysis of standard OE recipes). Will require BOM curation to remove duplicates and partial matches.



  There are several additional options to modify the behaviour of this utility including:
  - Skip use of bitbake command to locate project files by specifying license.manifest and bitbake-layers output files (use `--skip_bitbake`)
  - Use data from the OpenEmbedded API to verify original recipes, layers, version to ensure they match known components in the BD KB (use `--skip_oe_data` to skip)
  - Cache OE data in JSON files in a local folder to remove need to download on every run (use `--oe_data_folder FOLDER`)
  - Specify semantic version distance for matching recipes against OE data (default distance is '0.0.0' - use `--max_oe_version_distance X.X.X`)
  - Create SPDX output file for manual upload (do not upload to Black Duck to create project - use `--output_file OUTPUT`)
  - Specify license.manifest, machine, target, download_dir, package_dir, image_package_type to override values extracted from Bitbake environment
  - Skip Signature scan of downloaded archives and packages (use `--skip_sig_scan`)
  - Add image manifest recipes (use `--process_image_manifest` or `--image_license_manifest FILE`)
  - Run Signature scan on all packages as opposed to only those not matched by identifier (use `--scan_all_packages` - useful for deep license and copyright analysis of standard OE recipes). Will require BOM curation to remove duplicates and partial matches (Signature scanning is intended to find partial matches for review).



        usage: bd-scan-yocto-via-sbom [-h] [--blackduck_url BLACKDUCK_URL] [--blackduck_api_token BLACKDUCK_API_TOKEN] [--blackduck_trust_cert] [-p PROJECT] [-v VERSION]
                    [-l LICENSE_MANIFEST] [-b BITBAKE_LAYERS] [-c CVE_CHECK_FILE] [-o OUTPUT] [--debug] [--logfile LOGFILE]

        Create BD Yocto project from license.manifest

       -h, --help            show this help message and exit
       --blackduck_url BLACKDUCK_URL
                             Black Duck server URL (REQUIRED - can use
                             BLACKDUCK_URL env var)
       --blackduck_api_token BLACKDUCK_API_TOKEN
                             Black Duck API token (REQUIRED - can use
                             BLACKDUCK_API_TOKEN env var)
       --blackduck_trust_cert
                             Black Duck trust server cert (can use
                             BLACKDUCK_TRUST_CERT env var)
       -p PROJECT, --project PROJECT
                             Black Duck project to create (REQUIRED)
       -v VERSION, --version VERSION
                             Black Duck project version to create (REQUIRED)
       -t TARGET, --target TARGET
                             Yocto target (e.g. core-image-sato - REQUIRED if
                             license.manifest not specified - single target configuration only supported)
       -l LICENSE_MANIFEST, --license_manifest LICENSE_MANIFEST
                             license.manifest file path (REQUIRED - default
                             'license.manifest')
       -i IMAGE_LICENSE_MANIFEST, --image_license_manifest IMAGE_LICENSE_MANIFEST
                             Specify the image_license.manifest file path to process recipes from the core image.
       --process_image_manifest
                             Process the image_license.manifest file to process recipes from the core image using the
                             default location. Alternatively specify the image_license.manifest file path.
       -b BITBAKE_LAYERS, --bitbake_layers_file BITBAKE_LAYERS
                             File containing output of 'bitbake-layers show-
                             recipes' command (OPTIONAL)
       -c CVE_CHECK_FILE, --cve_check_file CVE_CHECK_FILE
                             CVE check output file
       -o OUTPUT, --output OUTPUT
                             Specify output SBOM SPDX file for manual upload (if
                             specified then BD project will not be created
                             automatically and CVE patching not supported)
       --skip_oe_data        Download and use OE data to check layers, versions &
                             revisions
       --oe_data_folder OE_DATA_FOLDER
                             Folder to contain OE data files - if files do not
                             exist they will be downloaded, if files exist then
                             will be used without download
       --max_oe_version_distance MAX_OE_VERSION_DISTANCE
                             Where no exact match, use closest previous recipe
                             version up to specified distance.Distance should be
                             specified as MAJOR.MINOR.PATCH (e.g. 0.1.0)
       --build_dir BUILD_DIR
                             Alternative build folder
       --download_dir DOWNLOAD_DIR
                             Download directory where original OSS source is
                             downloaded (usually poky/build/downloads)
       --package_dir PACKAGE_DIR
                             Download directory where package files are downloaded
                             (for example poky/build/tmp/deploy/rpm/<ARCH>)
       --image_package_type IMAGE_PACKAGE_TYPE
                             Package type used for installing packages (e.g. rpm,
                             deb or ipx)
       --skip_sig_scan       Do not Signature scan downloads and packages
       --scan_all_packages   Signature scan all packages (only recipes not matched from
                             OE data are scanned by default)
       --detect_jar_path DETECT_JAR_PATH
                             Detect jar path
       --detect_opts DETECT_OPTS
                             Additional Detect options (remove leading '--' from options)
       --api_timeout         Specify API timeout in seconds (default 60) - will be used in
                             Detect as --detect.timeout
       --sbom_create_custom_components
                             Create custom components when uploading SBOM (default False)
       --debug               Debug logging mode
       --logfile LOGFILE     Logging output file
       --recipe_report REPFILE
                             Output specified file with a list of recipes including those not matched in the BOM
       --no_unmap            Do not unmap previous code locations (scans) when running the initial scan (default is to unmap)



  - --blackduck_url BD_URL --blackduck_api_token BD_API -p BD_PROJECT -v BD_VERSION -t YOCTO_TARGET

  Optionally add the `--blackduck_trust_cert` option to trust the Black Duck server certificate.

  Also consider using `--oe_data_folder FOLDER` with an existing folder to cache the OE recipe data on subsequent runs to save large downloads at each execution.

  Server credentials can also be specified using standard environment variables (BLACKDUCK_URL, BLACKDUCK_API_TOKEN and BLACKDUCK_TRUST_CERT).



  - --blackduck_url, --blackduck_api_token, --blackduck_trust_cert:
    - Connection credentials to Black Duck server. Can also be picked up from the environment variables BLACKDUCK_URL,
  BLACKDUCK_API_TOKEN and BLACKDUCK_TRUST_CERT. Required to create the BD project version automatically and optionally process CVE patch status; not required if `--output` specified.

  - --output SBOM_FILE (also -o):
    - Create an output SBOM file for manual upload; do not create BD project version.

  - --project PROJECT --version VERSION (also -p -v):
    - Black Duck project and version to create - REQUIRED

  - --license_manifest LICENSE_MANIFEST_FILE (also -l):
    - Optionally specify yocto license.manifest file created by Bitbake. Usually located in the folder `tmp/deploy/licenses/<yocto-image>-<yocto-machine>/license.manifest`. Should be determined from Bitbake environment by default (unless `--skip_bitbake` used).

  - --target TARGET (also -t):
    - Bitbake target (e.g. `core-image-sato`) - required unless `--skip_bitbake` used.

  - --skip_bitbake:
    - Do not extract Bitbake environment and layers information using Bitbake commands - requires license.manifest and bitbake-layers
  output to be specified.

  - --bitbake_layers_file BITBAKE_OUTPUT_FILE (also -b):
    - Optionally specify output of the command `bitbake-layers show-recipes` stored in the specified file.  Should be determined from Bitbake environment
  by default (unless `--skip_bitbake` used).

  - --cve_checkfile CVE_CHECK_FILE:
    - Optionally specify output file from run of the `cve_check` custom class which generates a list of patched CVEs. Usually located in the
  folder `build/tmp/deploy/images/XXX`.  Should be determined from Bitbake environment by default (unless `--skip_bitbake` used)

  - --skip_oe_data:
    - Do not download layers/recipes/layers from layers.openembedded.org APIs to review origin layers and revisions used in recipes to
  ensure more accurate matching and complete BOMs.

  - --oe_data_folder FOLDER:
    - Create OE data files in the specified folder if not already existing. If OE data files exist already in this folder,
  use them to review layers and revisions to ensure more accurate matching and complete BOMs. Allows offline usage
  of OE data or reduction of large data transfers if script is run frequently.

  - --skip_sig_scan:
    - Do not send identified package and downloaded archives for Signature scanning. By default, recipes
  not matched against OE data will be Signature scanned.

   - --scan_all_packages:
     - Signature scan all recipes including those matched against OE recipes. By default, only recipes
  not matched against OE data will be Signature scanned.

  - --max_oe_version_distance MAJOR.MINOR.PATCH:
    - Specify version distance to enable closest (previous) recipe version matching against OE data where exact matches not available.
  By default, when `--get_oe_data` is specified, OE recipe versions must match the version exactly to replace layers and revision values.
  Setting this value will allow close (previous) recipe version matching.
  The value needs to be of the format MAJOR.MINOR.PATCH (e.g. '0.10.0').
  CAUTION - setting this value to a large value will cause versions of components to be matched against previous recipes maintained in the OE data,
  which may lead to different levels of reported vulnerabilities. It is preferable to maintain close relation between the matched
  versions and the ones in the project and then to identify unmatched components which can be added as custom components or manually. Consequently
  only consider using values which allow versions from different MINOR or MAJOR versions in exceptional circumstances (meaning the supplied
  value should probably be in the range 0.0.1 to 0.0.10).

  - --process_image_manifest OR --image_license_manifest PATH:
    - Include processing of image_license.manifest file to add recipes from the core image to the BOM (usually including Linux kernel).

  - --recipe_report REPFILE:
    - Create a report of matched and unmatched recipes in specified REPFILE.



  - Recipe version is 3.2.4 - closest previous OE recipe version is 3.2.1: Distance value would need to be minimum 0.0.3
  - Recipe version is 3.2.4 - closest previous OE recipe version is 3.0.1: Distance value would need to be minimum 0.2.0
  - Recipe version is 3.2.4 - closest previous OE recipe version is 2.0.1: Distance value would need to be minimum 1.0.0

  Note that lower order values are overridden by higher order (for example distance 1.0.0 is equivalant to 1.999.999).



  The Yocto `cve_check` class works on the Bitbake dependencies within the dev environment, and produces a list of CVEs identified from the NVD for ALL packages in the development environment.

  For patched CVE remediation in the Black Duck project, you will need to add the `cve_check` bbclass to the Yocto build configuration to generate the CVE check log output. Add the following line to the `build/conf/local.conf` file:

         INHERIT += "cve-check"

  Then rebuild the project (using for example `bitbake core-image-sato`)  to run the CVE check action and generate the required CVE log files without a full rebuild.

  The script should locate the path for the output file from cve-check, but you can also specify the file using the option `--cve_check_file CVE_CHECK_FILE` which is usually located in the `poky/tmp/deploy/images



  - Ensure that you have specified the required minimum options including the Yocto target (-t).

  - Check all the prerequisites, and that there is a built Yocto project with a generated license.manifest file.

  - Use the option --debug to turn on debug logging.

  - After scan completion, check that there are at least 2 separate code locations in the Source tab in the Black Duck project (one for SBOM import and the other for Signature scan).

  - Check the information from PHASE 5 (if it is run) in particular the total components in BOM against total recipes in Yocto project. The `Recipes matched in OE data but not in BOM` counts recipes which were found in OE data but could not be matched against the BD KB. Check to see if these recipes (also listed in Phase 5) are identified by subsequent Signature scan and consider adding the origin OSS components as manual additions in the Project Version.

  - If you are looking for a specific package which appears to be missing from the project, confirm that you are looking for the recipe name not the package name. See the FAQs for an explanation of Yocto recipes versus packages. Check that the package file was included in the Signature scan (within the Source tab).



  If you encounter issues using the script, then please create an issue in GitHub, ensuring that you include the following information:

  - Your Organisation name (to validate you have a Black Duck license)
  - Description of the issue
  - Yocto version in use (use the command `bitbake -e | grep DISTRO_CODENAME`)
  - The `license.manifest` file for the build
  - The output of the command `bitbake-layers show-recipes`
  - The log output from this script with `--debug` enabled (use the `--logfile LOGFILE` option to output to a file )
  - The recipe report file (use `--recipe_report REPFILE`)



  For a custom C/C++ recipe, or where other languages and package managers are used to build custom recipes, other types of scan could be considered in addition to the techniques used in this script.

  For C/C++ recipes, the advanced [blackduck_c_cpp](https://pypi.org/project/blackduck-c-cpp/) utility could be used as part of the build to identify the compiled sources, system includes and operating system dependencies. You would need to modify the build command for the recipe to call the `blackduck-c-cpp` utility as part of a scanning cycle after it had been configured to connect to the Black Duck server.

  For recipes where a package manager is used, then a standard Detect scan in DETECTOR mode could be utilised to analyse the project dependencies separately.

  Multiple scans can be combined into the same Black Duck project (ensure to use the Detect option `--detect.project.codelocation.unmap=false` to stop previous scans from being unmapped).



  1. **Why can't I rely on the license data provided by Yocto in the license.manifest file?**

     _The licenses reported by Bitbake come straight from the recipe files used to build the project.
     However, the applicable license for each package is the actual declared license reported in the origin repository,
     which may not match the license name in the recipe used to build/install the package. Furthermore, the obligations of
     most OSS licenses require that the full license text is included in the distribution along with any relevant copyrights.
     Another concern is that most OSS packages use or encapsulate other OSS which can have different licenses to the declared
     license in the main package, and in some cases re-licensing is not allowed meaning that the declared license of the main
     is not applicable. Black Duck uses the licenses from the origin packages (not the Yocto recipe), supports full
     license text and copyrights as well as optional deep license analysis to identify embedded licenses within packages._


  2. **Can this utility be used on a Yocto image without access to the build environment?**

     _Yes possibly - Use the options `--skip_bitbake -l LIC_MANIFEST_FILE --bitbake_layers_file LAYERS_FILE` where LIC_MANIFEST_FILE is the path to the specific license.manifest file and LAYERS_FILE
     contains the output of the command `bitbake-layers show-recipes`_.


  4. **Why can't I simply use the `cve-check` class provided by Yocto to determine unpatched vulnerabilities?**

     _The cve-check class processes all recipes in the build and then looks up packages in the NVD to try to associate CVEs. The script reports all packages including build dependencies as opposed to the packages only in the distributed image which is usually not useful.
     The CVE association uses CPE (package enumerators) to match packages, but this uses wildcards which result in a large number of false positive CVEs being reported.
     For example, for a sample Yocto 4.1 minimal build, cve-check reported 160 total unpatched CVEs of which 14 were shown against zlib, however the Black Duck project shows that none of these should be associated with the zlib version in the build (only 3 patched and 0 unpatched vulnerabilities should be shown in the project)._


  5. **Why couldn't I just use the `create-spdx` class provided by Yocto to export a full SBOM?**

     _The Yocto `create-spdx` class produces SPDX JSON files for the packages in the project with the runtime packages also identified,
     including useful data such as the list of files in the image per package with hashes.
     However, many of the SPDX fields are blank (NO-ASSERTION) including license text, copyrights etc.
     The packages are also not identified by PURL so the SBOM cannot be effectively imported into other tools (including Black Duck)._


  6. **I cannot see a specific package in the Black Duck project.**

     _Use the `--recipe_report FILE` option to list matched and missing recipes. Note that Black Duck reports recipes in the Yocto project not individual packages.
  Multiple packages can be combined into a single recipe, but these are typically not downloaded separately and are considered to be part of the main component managed by the recipe, not individual OSS components._


  8. **I cannot see the Linux kernel in the Black Duck project.**

     _Consider using the `--process_image_manifest` OR `--image_license_manifest PATH` options to add processing of the
      packages in the image manifest usually including the Linux kernel. Note that the kernel cannot always be identified due to a custom name format being used in Yocto in which case consider adding the required kernel version to the project manually._


  9. **I am using another Yocto wrapper such as KAS https://kas.readthedocs.io/ and cannot run bitbake, or the script fails for some other reason.**

     _Use the options `--skip_bitbake -l LIC_MANIFEST_FILE --bitbake_layers_file LAYERS_FILE` where LIC_MANIFEST_FILE is the path to the specific license.manifest file and LAYERS_FILE
     contains the output of the command `bitbake-layers show-recipes`._


pkgId: 417f8f7921d1ab4f9b0ded4971e1168782e1ad30dd4fda41d00e2c43abf03588
name: python-bd103
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: BD103's Python Package
url: https://bd103.github.io
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bd103-2.0.0-1.src.rpm
checksum_type: sha256
description:
  These are some utility modules and fun stuff that might make a good dependency. There are some subpackages that has special purposes.

  - `bd103.ext`: Contains extensions and plugins to other Python packages
  - `bd103.shared`: Contains modules that are shared between different implementations of BD103's library
  - `bd103.data`: Contains data types for various formats



  ```shell
  python -m pip install -U bd103
  ```



  A good idea is too look through the [documentation](https://bd103.github.io/BD103-Python/) to find modules that might pique your interest. A recommended one is the [decorators](https://bd103.github.io/BD103-Python/api/decorators.html) module.



  Feel free to submit a PR if you want to contribute to the package. For more information, see [CONTRIBUTING.md](CONTRIBUTING.md).


pkgId: 19e9076642a1994cad010a0f4d4203777c0cb7801732a30f64654be6adbd33e5
name: python-bdajax
arch: src
version: 1.14
epoch: 0
release: 1
summary: Ajax convenience.
url: http://github.com/conestack/bdajax
rpm_license: Simplified BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdajax-1.14-1.src.rpm
checksum_type: sha256
description:
  ``bdajax`` provides JavaScript helper functions and a simple dispatcher system
  driven by XML-attributes. Attributes are defined in its own XML namespace,
  placed in the XHTML markup.
  The dispatcher basically provides two behaviors
  - trigger events
  - perform actions
  Behaviors are bound to JavaScript events.
  This package bundles required resources for the use of bdajax inside a
  ``pyramid`` or ``zope`` application. It does NOT include the
  required server implementations. bdajax can be used with other Python or
  non-Python server backends too as long as action performing code is implemented
  and available through browser URL.


pkgId: 7011de1bbb1936126b3dd3a83f96addf8d58dfcc58a02dcb7215fcb1d42c75e5
name: python-bdata
arch: src
version: 6.11.4
epoch: 0
release: 1
summary: β-NMR/β-NQR MUD file reader and asymmetry calculator
url: https://github.com/dfujim/bdata
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdata-6.11.4-1.src.rpm
checksum_type: sha256
description:
  <a href="https://pypi.org/project/bdata/" alt="PyPI Version"><img src="https://img.shields.io/pypi/v/bdata?label=PyPI%20Version"/></a>
  <img src="https://img.shields.io/pypi/format/bdata?label=PyPI%20Format"/>
  <img src="https://img.shields.io/github/languages/code-size/dfujim/bdata"/>
  <img src="https://img.shields.io/tokei/lines/github/dfujim/bdata"/>
  <img src="https://img.shields.io/pypi/l/bdata"/>

  <a href="https://github.com/dfujim/bdata/commits/master" alt="Commits"><img src="https://img.shields.io/github/commits-since/dfujim/bdata/latest/master"/></a>
  <a href="https://github.com/dfujim/bdata/commits/master" alt="Commits"><img src="https://img.shields.io/github/last-commit/dfujim/bdata"/></a>

  [bdata] is a lightwieght [Python] package aimed to aid in the analysis of β-detected
  nuclear magnetic/quadrupole resonance (β-NMR and β-NQR) data taken at [TRIUMF].
  These techniques are similar to muon spin rotation ([μSR]) and "conventional"
  nuclear magnetic resonance ([NMR]), but use radioactive nuclei as their [NMR]
  probe in place of the [muon] or a stable isotope.

  The intended user of [bdata] is anyone analyzing data taken from [TRIUMF]'s β-NMR or β-NQR spectrometers.
  A key goal of the project is to alleviate much of the technical tedium that is
  often encountered during any analysis.

  Used with [bfit] and the [SciPy] ecosystem, [bdata] forms part of a flexible API
  in the analysis of β-NMR and β-NQR data. [bdata] has been written to fullfill the following needs:

  * Provide an intuitive means of interfacing with [MUD] files in [Python].
  * Fetch missing local data from the [archive].
  * Support analyses by providing common data manipulations, such as calculating
  asymmetries or combining scans.



  * [`bdata`](https://github.com/dfujim/bdata/wiki/bdata) [object]: access β-NMR and β-NQR [MUD] files
  * [`bjoined`](https://github.com/dfujim/bdata/wiki/bjoined) [object]: append `bdata` objects
  * [`bmerged`](https://github.com/dfujim/bdata/wiki/bmerged) [object]: combine `bdata` objects
  * [`life`](https://github.com/dfujim/bdata/wiki/life) [`mdict` object]: dictionary of probe lifetimes.
  * [`containers`](https://github.com/dfujim/bdata/wiki/containers) [module]: specially defined `mdict` objects with set function.
  * [`exceptions`](https://github.com/dfujim/bdata/wiki/exceptions) [module]: custom exceptions and warnings for common issues
  * [`asym_fns`](https://github.com/dfujim/bdata/wiki/asymmetry-functions) [module]: functions for calculating asymmetries and errors



  If you use [bdata] in your work, please cite:

  - D. Fujimoto.
    <i>Digging Into MUD With Python: mudpy, bdata, and bfit</i>.
    <a href="https://arxiv.org/abs/2004.10395">
    arXiv:2004.10395 [physics.data-an]</a>.



  * Please submit contributions to [bdata] via a pull request
  * To report issues or get support, please file a new issue





  The following packages/applications are needed prior to [bdata] installation:
  - [Python] 3.6 or higher: a dynamically typed programming language. [[install](https://wiki.python.org/moin/BeginnersGuide/Download)]

  and the following are handelled automatically when retrieving [bdata] from the [PyPI]:


  - [iminuit] : a [Jupyter]-friendly [Python] interface for the [MINUIT2] library.
  - [mudpy] : data structures for parsing [TRIUMF] [MUD] files.
  - [pandas] : a fast, powerful, flexible and easy to use data analysis/manipulation tool.
  - [requests] : an elegant and simple [HTTP] library for [Python].
  - [SciPy] : fundamental algorithms for scientific computing in [Python].




  |  | Command |
  |:-- | :--|
  From the [PyPI] as user (recommended) | `pip install --user bdata` |
  From the [PyPI] as root | `pip install bdata` |
  From source | `python3 setup.py install` |

  Note that `pip` should point to a (version 3) [Python] executable
  (e.g., `python3`, `python3.8`, etc.).
  If the above does not work, try using `pip3` or `python3 -m pip` instead.



  For convenience,
  you may want to tell [bdata] where the data is stored on your machine.
  This is done by defining two environment variables:
  `BNMR_ARCHIVE` and `BNQR_ARCHIVE`.
  This can be done, for example, in your `.bashrc` script.
  Both variables expect the data to be stored in directories with a particular
  heirarchy:

  ```
  /path/
      bnmr/
      bnqr/
          2017/
          2018/
              045123.msr
  ```

  Here, the folders `/path/bnmr/` and `/path/bnqr/` both contain runs
  (i.e., `.msr` files) organized into subdirectories by year of aquasition.
  In this case, you would set (in your `.bashrc`):

  ```bash
  export BNMR_ARCHIVE=/path/bnmr/
  export BNQR_ARCHIVE=/path/bnqr/
  ```

  If [bdata] cannot find the data, it will attempt to download the relavent [MUD] files
  from the [archive] and store them in `$HOME/.bdata`.
  This is the default behaviour for [bdata] installed from [PyPI]


  [Python]: https://www.python.org/
  [SciPy]: https://www.scipy.org/
  [Cython]: https://cython.org/
  [NumPy]: https://numpy.org/
  [pandas]: https://pandas.pydata.org/
  [Matplotlib]: https://matplotlib.org/
  [requests]: https://requests.readthedocs.io/en/master/
  [Jupyter]: https://jupyter.org/

  [YAML]: https://yaml.org/
  [C]: https://en.wikipedia.org/wiki/C_(programming_language)
  [HTTP]: https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

  [TRIUMF]: https://www.triumf.ca/
  [CMMS]: https://cmms.triumf.ca
  [MUD]: https://cmms.triumf.ca/mud/
  [archive]: https://cmms.triumf.ca/mud/runSel.html

  [UBC]: https://www.ubc.ca/
  [μSR]: https://en.wikipedia.org/wiki/Muon_spin_spectroscopy
  [NMR]: https://en.wikipedia.org/wiki/Nuclear_magnetic_resonance
  [muon]: https://en.wikipedia.org/wiki/Muon

  [PyPI]: https://pypi.org/project/bdata/
  [mudpy]: https://github.com/dfujim/mudpy
  [bdata]: https://github.com/dfujim/bdata
  [bfit]: https://github.com/dfujim/bfit

  [iminuit]: https://github.com/scikit-hep/iminuit
  [MINUIT2]: https://root.cern/doc/master/Minuit2Page.html

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


pkgId: 0daedfe63fd5b479a9fc76212d8ec9f574933badee8e962f03a5f29614867780
name: python-bdating-common
arch: src
version: 0.9.77
epoch: 0
release: 1
summary: Bdating common libraries standard library
url: https://github.com/bdating-io/bdating-python-common
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdating-common-0.9.77-1.src.rpm
checksum_type: sha256
description:
  Standard python library for Bdating




  ```
  python -m pip install build twine tox
  ```


  ```

  rm -rf dist/*; tox -e build && tox -e upload

  ```


pkgId: 0a080decf926af7dc19bb1e031aa194cb8a19ff7c48c3c7d40f9a8cb60161df0
name: python-bdbag
arch: src
version: 1.7.3
epoch: 0
release: 1
summary: Big Data Bag Utilities
url: https://github.com/fair-research/bdbag/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdbag-1.7.3-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://app.travis-ci.com/fair-research/bdbag.svg)](https://app.travis-ci.com/fair-research/bdbag)
  [![Coverage Status](https://coveralls.io/repos/github/fair-research/bdbag/badge.svg?branch=master)](https://coveralls.io/github/fair-research/bdbag?branch=master)
  [![PyPi Version](https://img.shields.io/pypi/v/bdbag.svg)](https://pypi.python.org/pypi/bdbag)
  [![PyPi Downloads](https://static.pepy.tech/badge/bdbag)](https://pepy.tech/project/bdbag)
  [![PyPi Wheel](https://img.shields.io/pypi/wheel/bdbag.svg)](https://pypi.python.org/pypi/bdbag)
  [![Anaconda-Server Badge](https://anaconda.org/conda-forge/bdbag/badges/version.svg)](https://anaconda.org/conda-forge/bdbag)
  [![Anaconda-Server Badge](https://anaconda.org/conda-forge/bdbag/badges/downloads.svg)](https://anaconda.org/conda-forge/bdbag)
  [![Python Versions](https://img.shields.io/pypi/pyversions/bdbag.svg)](https://pypi.python.org/pypi/bdbag)
  [![License](https://img.shields.io/pypi/l/bdbag.svg)](http://www.apache.org/licenses/LICENSE-2.0)



  The `bdbag` utilities are a collection of software programs for working with
  [BagIt](https://datatracker.ietf.org/doc/draft-kunze-bagit/) packages that conform to the BDBag and Bagit/RO profiles.

  The `bdbag` [profiles](https://github.com/fair-research/bdbag/tree/master/profiles) specify the use of the `fetch.txt`
  file, require serialization, and specify what manifests must be provided with a `bdbag`.

  The `bdbag` utilities incorporate functions from various other Python-based `bagit` components (such as the
  [Bagit-Python](https://github.com/LibraryOfCongress/bagit-python) bag creation utility and the
  [Bagit-Profiles-Validator](https://github.com/ruebot/bagit-profiles)
  utility) and wraps them in a single, easy to use software package with additional features.

  Enhanced bag support includes:

  * Update-in-place functionality for existing bags.
  * Automatic archiving and extraction of bags using ZIP, TAR, and TGZ formats.
  * Automatic generation of file manifest entries and `fetch.txt` for remote files via configuration file.
  * Automatic file retrieval based on the contents of a bag's `fetch.txt` file with multiple protocol support. Transport
    handlers for `http(s)`,`ftp`,`s3`,`gs`, and `globus` are provided, along with an extensibility mechanism for adding
    externally developed transports.
  * Built-in `bagit-profile` validation.
  * Built-in support for creation of bags with [Bagit/RO profile](https://github.com/ResearchObject/bagit-ro) compatibility.

  An experimental Graphical User Interface (GUI) for `bdbag` can be found [here](https://github.com/fair-research/bdbag_gui).



  ["I'll take that to go: Big data bags and minimal identifiers for exchange of large, complex datasets"](https://zenodo.org/record/820878) explains the motivation for BDBags and the related Minid construct, provides details on design and implementation, and gives examples of use.

  ["Reproducible big data science: A case study in continuous FAIRness"](https://www.biorxiv.org/content/early/2018/02/27/268755) presents a data analysis use case in which BDBags and Minids are used to capture a transcription factor binding site analysis.



  *  Python 2.7 is the minimum Python version required. Please note however that Python 2.7 is officially end-of-life and ongoing compatibility between Python 2.7 and `bdbag` (and its dependencies) is not officially supported and cannot be guaranteed.
  *  Python 3, versions 3.8 through 3.12 are the current officially supported releases.


  The latest `bdbag` release is available on PyPi and can be installed using `pip`:

  ```sh
  pip install bdbag
  ```

  Note that the above command will install `bdbag` with only the minimal dependencies required to run.
  If you wish to install `bdbag` with the extra fetch transport handler support provided by `boto` (for AWS S3)
  and `globus` (for Globus Transfer) packages, use the following command:
  ```sh
  pip install bdbag[boto,globus]
  ```


  You can use `pip` to install `bdbag` directly from GitHub:

  ```sh
  sudo pip install git+https://github.com/fair-research/bdbag
  ```
  or:
  ```sh
  pip install --user git+https://github.com/fair-research/bdbag
  ```

  You can also [download](https://github.com/fair-research/bdbag/archive/master.zip) the current `bdbag` source code from GitHub or
  alternatively clone the source from GitHub if you have *git* installed:

  ```sh
  git clone https://github.com/fair-research/bdbag
  ```
  From the root of the `bdbag` source code directory execute the following command:
  ```sh
  sudo pip install .
  ```
  or:
  ```sh
  pip install --user .
  ```
  Note that if you want to install the extra dependencies from a local source directory you would use the following command:
  ```sh
  pip install .[boto,globus]
  ```


  The unit tests can be run by invoking the following command from the root of the `bdbag` source code directory:
  ```sh
  python setup.py test
  ```



  This software can be used from the command-line environment by running the `bdbag` script.  For detailed usage
  instructions, see the [CLI Guide](./doc/cli.md).



  Some components of the `bdbag` software can be configured via JSON-formatted configuration files.
  See the [Configuration Guide](./doc/config.md) for further details.



  It is also possible to use `bdbag` from within other Python programs via an API.
  See the [API Guide](./doc/api.md) for further details.



  A CLI utility module is provided for various ancillary tasks commonly involved with authoring **bdbags**.
  See the [Utility Guide](./doc/utils.md) for further details.



  The change log is located [here](CHANGELOG.md).


pkgId: 98cce30d92936721508cbeec3dc492590f036425c53adcbfa85297202de84813
name: python-bdcp
arch: src
version: 1.5.2
epoch: 0
release: 1
summary: A big data competition auxiliary package
url: https://pypi.org/project/bdcp/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdcp-1.5.2-1.src.rpm
checksum_type: sha256
description:
  A big data competition auxiliary package



  1.Importing the Package

  ```
  import bdcp
  ```

  2.Obtaining the Data

  ```
  bc = bdcp.connect(username, password, module_id)
  ```

  3.Basic Content Setup

  ```
  bc.setbasic()
  ```

  4.checkpoint

  ```
  bc.get_check(hostname)
  ```

  5.obtain the documentation

  ```
  bc.get_element_detail(element_id)
  ```

  6.obtain abcd

  ```
  bc.get_abcd("")
  ```


pkgId: eb87b9dddff3ba8f2ecbf68dde66757b9e213fa76e18bcb5caba8ec61b0abfc8
name: python-bdd-coder
arch: src
version: 2.2.1
epoch: 0
release: 1
summary: Gherkin language in class-based tests - test suite blueprinting
url: https://bitbucket.org/coleopter/bdd-coder
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdd-coder-2.2.1-1.src.rpm
checksum_type: sha256
description:
  platform [...]
  collecting ... collected 2 items
  example/tests/test_stories.py::TestClearBoard::test_odd_boards PASSED    [ 50%]


pkgId: f652ff764197f6417c55cf0c665e06225c34e6c6686e6385512f022b66f34116
name: python-bdd-google-drive-helper
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: A simple Google Drive file uploader tool.
url: https://pypi.org/project/bdd-google-drive-helper/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdd-google-drive-helper-0.1.1-1.src.rpm
checksum_type: sha256
description:
  Google Drive Uploader 是一個簡單的工具，用於將文件上傳到 Google Drive。這個工具提供了一個簡單的 Python API，可以方便地集成到您的自動化腳本和應用程序中。


  https://pypi.org/project/bdd-google-drive-helper/



  - 身份驗證管理
  - 列出和搜索 Google Drive 上的共用雲端硬碟
  - 根據資料夾路徑查找特定資料夾的 ID
  - 將檔案上傳到指定的 Google Drive 資料夾
  - 探索和管理 Google Drive 的內容，包括列出所有資料夾
  - 根據日期刪除指定資料夾中的檔案



  您可以通過 Python 的包管理工具 Poetry 來安裝 Google Drive Uploader：```bash
  poetry add bdd-google-drive-helperer
  ```

  或者，如果您使用的是 pip，請先確保您的環境中安裝了 Poetry，然後運行以下命令：

  ```bash
  pip install bdd-google-drive-helperer
  ```


  - 請確保您已經在本地配置了 `credentials.json` 文件，並且您的 Google API 應用程序有足夠的權限來訪問 Google Drive。
  - 若還沒有'credentials.json' 文件:
      - 至Google Cloud Console 開啟新的專案
      - 啟用Google Drive API
      - 創建憑證 -> 電腦端應用程式 -> 下載憑證
      - 將下載後的憑證移至專案的根目錄

  - 請在本地端進行初始化時提供 `credentials_json` 和 `credentials_pickle` 來自訂您的身份驗證憑證存放路徑：
      ```python
      uploader = GoogleDriveUploader(credentials_json="path/to/your/credentials.json")
      explorer = GoogleDriveExplorer(credentials_json="path/to/your/credentials.json")
      deleter = GoogleDriveDeleter(credentials_json="path/to/your/credentials.json")
      ```
  - 首次初始化時，會在Terminal生成一個連結，直接打開該連結進行驗證，認證完成後，就可以獲得可復用的 `token.pkl`。

  - 獲得此`token.pkl`後就可以使用此檔案在任何環境進行使用和開發。



  以下是一個如何使用 Google Drive Uploader 的簡單範例：

  ```python
  from google_drive_helper.google_drive_uploader import GoogleDriveUploader


  uploader = GoogleDriveUploader()


  drive_name = "YourDriveName"
  drive_folder_path = "path/to/your/google drive folder"
  upload_file_path = "path/to/your/local_file.txt"
  uploader.upload_to_drive(drive_name, drive_folder_path, upload_file_path)
  ```

  以下是如何使用 Google Drive Explorer 來列出和探索 Google Drive 的範例：

  ```python
  from google_drive_helper.google_drive_explorer import GoogleDriveExplorer


  explorer = GoogleDriveExplorer()


  drive_name = "YourDriveName"
  explorer.find_folder(drive_name)
  ```

  以下是如何使用 Google Drive Explorer 來確認查找資料夾是否存在

  ```python
  from google_drive_helper.google_drive_explorer import GoogleDriveExplorer


  explorer = GoogleDriveExplorer()


  drive_name = "YourDriveName"
  folder_to_find = "folder/path/you/want/to/find"
  explorer.find_folder(drive_name,folder_to_find)
  ```


  以下是如何使用 Google Drive Deleter 來刪除指定資料夾中的檔案

  ```python
  from google_drive_helper.google_drive_deleter import GoogleDriveDeleter


  deleter = GoogleDriveDeleter()


  drive_name = "YourDriveName"
  folder_path = "path/to/your/google drive folder"
  target_date = "YYYY-MM-DD"
  deleter.delete_files_by_date(drive_name, folder_path, target_date)
  ```


pkgId: fdff8ecc6cfc1c9ad2c50bfc1521810b2337ae611d965621b67d55fa20cdc654
name: python-bdd-tester
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: A very very basic BDD test runner
url: https://pypi.org/project/bdd-tester/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdd-tester-0.0.8-1.src.rpm
checksum_type: sha256
description:
  Test data files using `behaviour-driven
  development <https://en.wikipedia.org/wiki/Behavior-driven_development>`__
  tests, in python.


pkgId: 54b17f352570a15a0673db6d820df86ca8e7d3e1be2df5b1a6467b30f2c95f5f
name: python-bdd2dfa
arch: src
version: 1.0.10
epoch: 0
release: 1
summary: Python library for converting binary decision diagrams to automata.
url: https://github.com/mvcisback/bdd2dfa
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdd2dfa-1.0.10-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://cloud.drone.io/api/badges/mvcisback/bdd2dfa/status.svg)](https://cloud.drone.io/mvcisback/bdd2dfa)
  [![codecov](https://codecov.io/gh/mvcisback/bdd2dfa/branch/master/graph/badge.svg)](https://codecov.io/gh/mvcisback/bdd2dfa)
  [![PyPI version](https://badge.fury.io/py/bdd2dfa.svg)](https://badge.fury.io/py/bdd2dfa)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  A simple python wrapper around Binary Decision Diagrams (BDDs) to interpret them
  as Deterministic Finite Automata (DFAs).

  The package takes as input a BDD from the [`dd` package](https://github.com/tulip-control/dd)
  and returns a DFA from the [`dfa` package](https://github.com/mvcisback/dfa).

  Formally, the resulting `DFA` objects are quasi-reduced BDDs (QDDs)
  where all leaves self loop and the label of states is a tuple: `(int, str | bool)`, where the first entry determines the number of inputs until this node is active and the second entry is the decision variable of the node or the BDD's truth assignment.


  <!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
  **Table of Contents**

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

  <!-- markdown-toc end -->



  If you just need to use `bdd2dfa`, you can just run:

  `$ pip install bdd2dfa`

  For developers, note that this project uses the
  [poetry](https://poetry.eustace.io/) python package/dependency
  management tool. Please familarize yourself with it and then
  run:

  `$ poetry install`



  ```python


  from dd import BDD

  manager = BDD()
  manager.declare('x', 'y', 'z')
  x, y, z = map(manager.var, 'xyz')
  bexpr = x & y & z




  from bdd2dfa import to_dfa

  qdd = to_dfa(bexpr)

  assert len(qdd.states()) == 7


  assert qdd.label([1, 1, 1]) == (0, True)
  assert qdd.label([0, 1, 1]) == (0, False)


  assert qdd.label([1, 1]) == (0, 'z')
  assert qdd.label([0, 1]) == (1, False)


  assert qdd.label([1, 1, 1, 1]) == (0, True)
  assert qdd.label([1, 1, 1, 1, 1]) == (0, True)
  ```

  Each state of the resulting `DFA` object has three attribute:

  1. `node`: A reference to the internal BDD node given by `dd`.
  1. `parity`: `dd` supports Edge Negated `BDD`s, where some edges point
     to a Boolean function that is the negation of the Boolean function
     the node would point to in a standard `BDD`. Parity value determines
     whether or not the node
  1. `debt`: Number of inputs needed before this node can
     transition. Required since `BDD` edges can skip over irrelevant
     decisions.

  For example,
  ```python
  assert qdd.start.parity is True
  assert qdd.start.debt == 0
  assert qdd.start.node.var == 'x'
  ```



  `to_dfa` also supports exporting a `BDD` rather than a `QDD`. This is done
  by toggling the `qdd` flag.

  ```python
  bdd = to_dfa(bexpr, qdd=False)
  ```

  The `DFA` uses a similar state as the `QDD` case, but does not have a
  `debt` attribute. Useful when one just wants to walk the `BDD`.

  **note** The labeling alphabet also only returns the decision variable/truth assignment.

  If the `dfa` package was installed with the `draw` option, we can
  visualize the difference between `qdd` and `bdd` by exporting to a
  graphviz `dot` file.

  ```python
  from dfa.draw import write_dot

  write_dot(qdd, "qdd.dot")
  write_dot(bdd, "bdd.dot")
  ```

  Compiling using the `dot` command yields the following for `qdd.dot`

  ![qdd image](assets/qdd.svg)

  and the following for `bdd.dot`:

  ![bdd image](assets/bdd.svg)


pkgId: b17d1c34c0a12dc993db097b91615805e7ec1f63a9a2fe54365eaf05357e3577
name: python-bddl
arch: src
version: 3.5.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/StanfordVL/bddl
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bddl-3.5.0-1.src.rpm
checksum_type: sha256
description:
  **Note: If you are interested in the BEHAVIOR-100 version of BDDL, please go to the tags menu and navigate to the latest 1.x.x version.**

  The Behavior Domain Definition Language (BDDL) is a domain-specific language designed for the Benchmark for Everyday Household Activities in Virtual, Interactive, and ecOlogical enviRonments (BEHAVIOR).

  BDDL is a predicate logic-based language inspired by, but distinct from, the Planning Domain Definition Language [1]. It defines each BEHAVIOR activity definition as a BDDL `problem`, consisting of of a categorized object list (`:objects`), an initial condition that has only ground literals (`:init`), and a goal condition that is a logical expression (`:goal`).




  The easiest way to install BDDL is through pip. To get the BEHAVIOR-1K version, run the below command:

  ```bash
  pip install -u bddl
  ```

  Otherwise, for the latest BEHAVIOR-100 release, you can run the below command:

  ```bash
  pip install -u bddl==1.*
  ```



  To install a modifiable copy of BDDL, clone this repository locally:
  ```bash
  git clone https://github.com/StanfordVL/bddl.git
  ```

  then run setup:
  ```bash
  cd bddl
  python setup.py install
  ```



  ```
  (define
      (problem cleaning_the_pool_0)
      (:domain igibson)

      (:objects
       	pool.n.01_1 - pool.n.01
      	floor.n.01_1 - floor.n.01
      	scrub_brush.n.01_1 - scrub_brush.n.01
      	shelf.n.01_1 - shelf.n.01
      	detergent.n.02_1 - detergent.n.02
          sink.n.01_1 - sink.n.01
      	agent.n.01_1 - agent.n.01
      )

      (:init
          (ontop pool.n.01_1 floor.n.01_1)
          (stained pool.n.01_1)
          (ontop scrub_brush.n.01_1 floor.n.01_1)
          (ontop detergent.n.02_1 floor.n.01_1)
          (inroom shelf.n.01_1 garage)
          (inroom floor.n.01_1 garage)
          (inroom sink.n.01_1 storage_room)
          (ontop agent.n.01_1 floor.n.01_1)
      )

      (:goal
          (and
              (ontop ?pool.n.01_1 ?floor.n.01_1)
              (not
                  (stained ?pool.n.01_1)
              )
              (ontop ?scrub_brush.n.01_1 ?shelf.n.01_1)
              (ontop ?detergent.n.02_1 ?floor.n.01_1)
          )
      )
  )
  ```

  The `:objects` and `:init` sections specify the initial state than an agent will start in, located as specified in `:init`. The `inroom` predicate specifies which scene objects must be present, and other binary kinematic predicates (`ontop`, `inside`, etc.) specify where small objects should be sampled. The BDDL functionality sends a representation of these conditions to sampling functionality implemented in a simulator (such as iGibson 2.0) to be sampled into a physical instance of the activity.

  The `:goal` section specifies the condition that the agent must satisfy to be successful on the activity. BDDL is entirely process-agnostic, specifiying only the simulator state that must be reached for success.





  You will typically want to use BEHAVIOR activities with a simulator. To use a BEHAVIOR activity without a simulator, use the following code.
  ```
  from bddl.activity import Conditions

  behavior_activity = "storing_the_groceries"     # the activity you want to try, full list in bddl/bddl/activity_definitions
  activity_definition = 0                         # the specific definition you want to use. As of BEHAVIOR100 2021, this should always be 0.
  simulator = "omnigibson"                        # this does not require an actual simulator, just a domain file (e.g. activity_definitions/domain_omnigibson.bddl). You can make your own if desired.

  conds = Conditions(behavior_activity, activity_definition, simulator)


  ```



  To use a BEHAVIOR activity with a simulator, create a subclass of `BDDLBackend` for your simulator. An example for OmniGibson is found [here](https://github.com/StanfordVL/OmniGibson/omnigibson/utils/bddl_utils.py#L169). This will require an implementation of sampling functionality or pre-sampled scenes that satisfy the activity's initial condition and implementation for checking each type of binary kinematic predicate (e.g. `ontop`, `nextto`) and unary nonkinematic predicate (e.g. `cooked`, `saturated`).



  When using BEHAVIOR activities with a simulator, the goal condition is evaluated at every simulator step by calling `bddl.activity.evaluate_goal_conditions(goal_conditions)`, where `goal_conditions` is the output of `bddl.activity.get_goal_conditions(conds, backend, scope)`, and `scope` is the output of `bddl.activity.get_scope(conds)` that has then been populated by mapping the string identifiers to actual objects from your simulator. `bddl.logic_base` and `bddl.condition_evaluation` contain the actual evaluation functionality. Atomic formulae that interface directly with the simulator are implemented in `bddl.logic_base`. These require the simulator checking functions for various predicates to be implemented, and are the leaf nodes of the compositional expression making up a goal condition or the list of literals making up an initial condition. Logical operators are implemented in `bddl.condition_evaluation`, and form a compositional structure of the condition to evaluate.



  `bddl.condition_evaluation` also contains basic functionality to generate ground solutions to a compositional goal condition, including one that may contain quantification. This functionality is much like a very simple, unoptimized logic program, and will return a subset of solutions in cases where the solution set is too large to compute due to exponential growth. To enable this, set `generate_ground_options=True` when using `bddl.activity`.



  Using BEHAVIOR activities with a new simulator requires implementing its functional requirements for that simulator, as has been done for OmniGibson [4].



  To simulate a BEHAVIOR activity, the simulator must be able to simulate every predicate involved in that activity. The full list of predicates is at [TODO add list of predicates to config]. For any one activity, the required predicates can be found by reading its BDDL problem (in activity_definitions/<activity_name>/.)

  Implementing these requires 1) a simulator-specific child class of the `BDDLBackend` class and 2) implementations of object states such as `cooked` and `ontop` that can both **instantiate** an object as e.g. `cooked` or `not cooked`, and **check** whether the predicate is true for a given object.

  **1. Child of `BDDLBACKEND`:** This class has one method, `get_predicate_class`. It must take string tokens of predicates from BDDL problems (e.g. `"cooked"`, `"ontop"`) and map them to the simulator's object states..

  **2. Simulated object states:** For any object in a BEHAVIOR activity, it must be instantiated in certain simulated states and be checked for certain simulated states, as specified by a BDDL problem. `BDDLBackend` expects state implementations that are object agnostic, but the implementation is ultimately up to the user. Assuming object-agnostic states, each one should be able to take an object and instantiate that object with the given state if applicable, and check whether that object is in that state or not. Example: [OmniGibson's object state implementations](https://github.com/StanfordVL/OmniGibson/omnigibson/object_states).

  *Note on binary predicates:* in BDDL, certain binary predicates are kinematic (`ontop`, `nextto`, `touching`, etc.). Instantiating objects in the associated simulator states is more complex than instantiating objects in unary predicates' states due to potential for failure based on physical constraints of the scene and multiple possibilities for object pairing, especially when implementing scene-agnostic instantiation capable of generating infinite distinct episodes. Please look at the setter methods of kinematic states in OmniGibson for a robust example capable of instantiating BEHAVIOR activities with many objects.



  To test the predicate evaluator, run `pytest` in project root.

  To add a test, create a new python file under the tests directory, and add
  additional functions prefixed with `test_` which include assert statements that
  should evaluate true.



  [1] M. Ghallab, A. Howe, C. Knoblock, D. McDermott, A. Ram, M. Veloso, D. Weld, & D. Wilkins. PDDL - The Planning Domain Definition Language. Yale Center for Computational Vision and Control, TR-98-003/DCS TR-1165 (1998). [Online].

  [2] PDDL Parser (2020). Version 1.1. [Source code]. https://github.com/pucrs-automated-planning/pddl-parser.

  [3] C. Li*, F. Xia*, R. Martín-Martín*, M. Lingelbach, S. Srivastava, B. Shen, K. Vainio, C. Gokmen, G. Dharan, T. Jain, A. Kurenkov, C. K. Liu, H. Gweon, J. Wu, L. Fei-Fei, S. Savarese. iGibson 2.0: Object-Centric Simulation for Robot Learning of Everyday Household Tasks. CoRL 2021.

  [4] C. Li*, R. Zhang*, J. Wong*, C. Gokmen*, S. Srivastava*, R. Martín-Martín*, C. Wang*, G. Levine*, M. Lingelbach, J. Sun, M. Anvari, M. Hwang, M. Sharma, A. Aydin, D. Bansal, S. Hunter, K.-Y. Kim, A. Lou, C. R. Matthews, I. Villa-Renteria, J. H. Tang, C. Tang, F. Xia, S. Savarese, H. Gweon, C. K. Liu, J. Wu, L. Fei-Fei. BEHAVIOR-1K: A Benchmark for Embodied AI with 1,000 Everyday Activities and Realistic Simulation. CoRL 2022.


pkgId: 998bbde5ede83fa053caff79956307af2cff88af2cd44b725e19061d1a267297
name: python-bddrest
arch: src
version: 6.1.1
epoch: 0
release: 1
summary: A toolchain for testing REST APIs in BDD manner.
url: https://github.com/pylover/bddrest
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bddrest-6.1.1-1.src.rpm
checksum_type: sha256
description:
  * [Quick start](#quick-start)
      * [Writing tests](#writing-tests)
      * [Dumping a Story](#dumping-a-story)
         * [Auto Dumping](#auto-dumping)
      * [Markdown](#markdown)
   * [Command Line Interface](#command-line-interface)
      * [Enabling the bash autocompletion for bddrest](#enabling-the-bash-autocompletion-for-bddrest)


  Using `Given`, `when`, functions as you see in the example below, you can
  determine and assert the behaviour of your `REST API`.
  The `story`, `response`, `status` objects are some proxies for currently
  writing story(*inside the with Given( ... ): context*) and it's response.
  and the last response after a `Given` and or `when`.
  ```python
  import re
  import sys
  import json
  from bddrest.authoring import Given, when, response, status
  def wsgi_application(environ, start_response):
      path = environ['PATH_INFO']
      if path.endswith('/None'):
          start_response(
              '404 Not Found',
              [('Content-Type', 'text/plain;charset=utf-8')]
          )
          yield b''
      else:
          start_response(
              '200 OK',
              [('Content-Type', 'application/json;charset=utf-8')]
          )
          result = json.dumps(dict(
              foo='bar'
          ))
          yield result.encode()
  with Given(
          wsgi_application,
          title='Quickstart!',
          path='/books/id: 1',
          as_='visitor') as story:
      assert status == 200
      assert status == '200 OK'
      assert 'foo' in response.json
      assert response.json['foo'] == 'bar'
      when(
          'Trying invalid book id',
          path_parameters={'id': None}
      )
      assert response.status == 404
  ```

  ```python
  story.dumps()
  ```
  Produces:
  ```yaml
  base_call:
    as_: visitor
    description: As a member I have to POST a book to the library.
    form:
      name: BDD Book
    query:
      a: b
    response:
      headers:
      - 'Content-Type: application/json;charset=utf-8'
      json:
        foo: bar
      status: 200 OK
    title: Posting a book
    path: /books/:id
    path_parameters:
      id: '1'
    verb: GET
  calls:
  - response:
      headers:
      - 'Content-Type: text/plain;charset=utf-8'
      status: 404 Not Found
    title: Trying invalid book id
    path_parameters:
      id: None
  ```
  You may load the story again from this yaml with `Story.loads(yaml)`.
  There are two additional methods available to dump and load to
  and from a file: `story.load(file)` and `story.dump(file)`

  You may pass the `autodump` argument of the `Given` function to configure the
  auto-dumping:
                       Default is `None`, means autodump is disabled by default.

  You may pass the `autodoc` argument of the `Given` function to configure the
  auto-documentation:
                      Default is `None`, meana autodoc is disabled by default.
                             ``markdown``.

  You can use `story.document([formatter_factory=MarkdownFormatter])` to generate documentation
  in arbitrary format for example: `Markdown`.
  There is also a CLI to do this:
  ```bash
  bddrest document < story.yml > story.md
  ```
      
      
      As a member I have to POST a book to the library.


pkgId: b8a9b5d853206ac5bf886a3ffd3433498b5df6b4c4811f77623f65826f4516c0
name: python-bdew-datetimes
arch: src
version: 0.8.0
epoch: 0
release: 1
summary: Generate and work with holidays of the BDEW-Calendar for power and gas in Germany
url: https://github.com/mj0nez/bdew-datetimes/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdew-datetimes-0.8.0-1.src.rpm
checksum_type: sha256
description:
  ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mj0nez/bdew-datetimes/packaging_test.yml?style=plastic)![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bdew-datetimes?style=plastic)![PyPI - License](https://img.shields.io/pypi/l/bdew-datetimes?style=plastic)![PyPI](https://img.shields.io/pypi/v/bdew-datetimes?style=plastic)

  A collection of utils to work with datetimes and holidays in the German energy
  market and is based on the [python-holiday](https://github.com/vacanza/holidays) package.

  The implementation considers the publications of the **BDEW** (Bundesverband der Energie- und Wasserwirtschaft e. V.) and **EDI@Energy**, which provide boundaries and guidance for the data exchange on the german energy market.


  * BDEW-holiday calendar
      * allows dict like evaluation of dates and datetimes and contains all holidays considered by the BDEW
  * Statutory Periods ("_Gesetzliche Fristen_")
      * calculate dates of the kind "_x Werktage ab Stichtag_"
      * calculate dates of the kind "_nter Werktag des Fristen- bzw. Liefermonats_"
  * Gas-Day / Market Day evaluation



  * providing subdivision holiday calendars to allow granular load profiles




  Install the package from [pypi](https://pypi.org/project/bdew-datetimes/):
  ```bash
  pip install bdew-datetimes
  ```



  The `HolidaySum` returned by `create_bdew_calendar` contains the BDEW specific holidays.
  This means it contains those holidays which are _defined_ by BDEW which includes Heiligabend and Silvester as well as special days without Marktkommunikation but _not_ the local or nationwide holidays in Germany and its states.
  ```python
  from datetime import date
  from bdew_datetimes import create_bdew_calendar

  bdew_holidays = create_bdew_calendar()  # this behaves like a dict

  assert date(2022, 12, 31) in bdew_holidays # Silvester is a BDEW holiday
  assert date(2022, 8, 8) in bdew_holidays is False # Augsburger Friedensfest is _not_ a BDEW holiday (but a holiday in Augsburg only)
  assert date(2022, 12, 2) in bdew_holidays is False # The 12th of February is not a BDEW holiday

  print(bdew_holidays.get('2022-01-01'))  # prints "Neujahr"
  ```
  The **union** (type `HolidaySum`) of both nation and state wide holidays **and** the BDEW holidays (only the latter is returned by `create_bdew_calendar`) is the relevant calendar for German utilities.


  BDEW working days are those days taken into account for the "Fristenberechnung".
  The function `is_bdew_working_day` considers both national and state wide holidays as well as BDEW holidays:
  ```python
  from datetime import date

  from bdew_datetimes.periods import is_bdew_working_day

  assert is_bdew_working_day(date(2023, 1, 1)) is False  # Neujahr (national holiday)
  assert is_bdew_working_day(date(2023, 1, 2)) is True  # regular weekday
  assert is_bdew_working_day(date(2023, 1, 6)) is False  # Heilige Drei Könige (local holiday in parts of Germany)
  assert is_bdew_working_day(date(2023, 4, 7)) is False  # Karfreitag (national holiday, but based on an astronomical calendar)
  assert is_bdew_working_day(date(2023, 12, 24)) is False  # Heiligabend (BDEW holiday)
  ```

  You can also get the next or previous working day for any date:
  ```python
  from datetime import date

  from bdew_datetimes.periods import get_next_working_day, get_previous_working_day

  assert get_next_working_day(date(2023, 1, 1)) == date(2023, 1, 2)  # the next working day after Neujahr
  assert get_previous_working_day(date(2023, 1, 1)) == date(2022, 12, 30)  # the last working day of 2022
  assert get_next_working_day(date(2023, 1, 20)) == date(2023, 1, 23)  # the next working day after a friday is the next monday
  ```


  Statutory periods define the maximum time between e.g. the EDIFACT message for the "Anmeldung" and the actual start of supply ("Lieferbeginn").
  ```python
  from datetime import date

  from bdew_datetimes.periods import DayType, EndDateType, Period, add_frist





  eingang_der_anmeldung = date(2016, 7, 4)
  gesetzliche_frist = Period(
      10,
      DayType.WORKING_DAY,
      end_date_type=EndDateType.EXCLUSIVE
      
  )
  fruehest_moeglicher_lieferbeginn = add_frist(eingang_der_anmeldung, gesetzliche_frist)
  assert fruehest_moeglicher_lieferbeginn == date(2016, 7, 19)
  ```

  Liefer- and Fristenmonat are concepts used in MaBiS and GPKE:
  ```python
  from datetime import date

  from bdew_datetimes.periods import get_nth_working_day_of_month, MonthType


  get_nth_working_day_of_month(18)


  assert get_nth_working_day_of_month(18, start=date(2023, 11, 1)) == date(2023, 11, 28)


  assert get_nth_working_day_of_month(42, month_type=MonthType.FRISTENMONAT, start=date(2023, 7, 1)) == date(2023, 9, 29)
  ```



  The BDEW considers all days as holidays, which are nationwide holidays and days, which are a holiday in at least one state.
  Furthermore, the 24. and the 31. December are holidays as well.
  Therefore, this package utilizes the composition of all available german holiday calendars and adds the two additional days.

  Shifting holidays to the next weekday if they fall on a weekend is currently not considered.




  This library is licensed under the *MIT* license, see the [LICENSE file](LICENSE).


  This library is used by the following projects:
  - [Hochfrequenz Fristenkalender](https://www.hochfrequenz.de/#fristenkalender)


pkgId: fed3b8bb46391abc36c3eb48ebb53b0a7204f9300b2e9480f8889401e9da630d
name: python-bdffont
arch: src
version: 0.0.26
epoch: 0
release: 1
summary: A library for manipulating Glyph Bitmap Distribution Format (BDF) Fonts.
url: https://pypi.org/project/bdffont/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdffont-0.0.26-1.src.rpm
checksum_type: sha256
description:
  [![Python](https://img.shields.io/badge/python-3.10-brightgreen)](https://www.python.org)
  [![PyPI](https://img.shields.io/pypi/v/bdffont)](https://pypi.org/project/bdffont/)

  BdfFont is a library for manipulating [Glyph Bitmap Distribution Format (BDF) Fonts](https://en.wikipedia.org/wiki/Glyph_Bitmap_Distribution_Format).



  ```shell
  pip install bdffont
  ```





  ```python
  import shutil

  from bdffont import BdfFont
  from examples import assets_dir, build_dir


  def main():
      outputs_dir = build_dir.joinpath('load')
      if outputs_dir.exists():
          shutil.rmtree(outputs_dir)
      outputs_dir.mkdir(parents=True)

      font = BdfFont.load(assets_dir.joinpath('unifont', 'unifont-15.1.05.bdf'))
      print(f'name: {font.name}')
      print(f'size: {font.point_size}')
      print(f'ascent: {font.properties.font_ascent}')
      print(f'descent: {font.properties.font_descent}')
      print()
      for glyph in font.glyphs:
          print(f'char: {chr(glyph.encoding)} ({glyph.encoding:04X})')
          print(f'glyph_name: {glyph.name}')
          print(f'advance_width: {glyph.device_width_x}')
          print(f'dimensions: {glyph.dimensions}')
          print(f'origin: {glyph.origin}')
          for bitmap_row in glyph.bitmap:
              text = ''.join(map(str, bitmap_row)).replace('0', '  ').replace('1', '██')
              print(f'{text}*')
          print()
      font.save(outputs_dir.joinpath('unifont-15.0.01.bdf'))


  if __name__ == '__main__':
      main()
  ```



  ```python
  import shutil

  from bdffont import BdfFont, BdfGlyph
  from examples import build_dir


  def main():
      outputs_dir = build_dir.joinpath('create')
      if outputs_dir.exists():
          shutil.rmtree(outputs_dir)
      outputs_dir.mkdir(parents=True)

      font = BdfFont(
          point_size=16,
          resolution=(75, 75),
          bounding_box=(16, 16, 0, -2),
      )

      font.glyphs.append(BdfGlyph(
          name='A',
          encoding=ord('A'),
          scalable_width=(500, 0),
          device_width=(8, 0),
          bounding_box=(8, 16, 0, -2),
          bitmap=[
              [0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 1, 1, 0, 0, 0],
              [0, 0, 1, 0, 0, 1, 0, 0],
              [0, 0, 1, 0, 0, 1, 0, 0],
              [0, 1, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 1, 0],
              [0, 1, 1, 1, 1, 1, 1, 0],
              [0, 1, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 1, 0],
              [0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0],
          ],
      ))

      font.properties.foundry = 'Pixel Font Studio'
      font.properties.family_name = 'Demo Pixel'
      font.properties.weight_name = 'Medium'
      font.properties.slant = 'R'
      font.properties.setwidth_name = 'Normal'
      font.properties.add_style_name = 'Sans Serif'
      font.properties.pixel_size = font.point_size
      font.properties.point_size = font.point_size * 10
      font.properties.resolution_x = font.resolution_x
      font.properties.resolution_y = font.resolution_y
      font.properties.spacing = 'P'
      font.properties.average_width = round(sum([glyph.device_width_x * 10 for glyph in font.glyphs]) / len(font.glyphs))
      font.properties.charset_registry = 'ISO10646'
      font.properties.charset_encoding = '1'
      font.generate_name_as_xlfd()

      font.properties.default_char = -1
      font.properties.font_ascent = 14
      font.properties.font_descent = 2
      font.properties.x_height = 5
      font.properties.cap_height = 7

      font.properties.font_version = '1.0.0'
      font.properties.copyright = 'Copyright (c) TakWolf'

      font.save(outputs_dir.joinpath('my-font.bdf'))


  if __name__ == '__main__':
      main()
  ```



  - [GNU Unifont Glyphs](https://unifoundry.com/unifont/index.html)
  - [Galmuri](https://github.com/quiple/galmuri)
  - [美咲フォント / Misaki](https://littlelimit.net/misaki.htm)



  - [X11 - Bitmap Distribution Format - Version 2.1](https://www.x.org/docs/BDF/bdf.pdf)
  - [Adobe - Glyph Bitmap Distribution Format (BDF) Specification - Version 2.2](https://adobe-type-tools.github.io/font-tech-notes/pdfs/5005.BDF_Spec.pdf)
  - [X Logical Font Description Conventions - X Consortium Standard](https://www.x.org/releases/current/doc/xorg-docs/xlfd/xlfd.html)



  Under the [MIT license](LICENSE).


pkgId: 66aa0aeb181e0252c80be9499aff9c788e36444007b8024077be55d59f010729
name: python-bdi-kit
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: bdi-kit library
url: https://github.com/VIDA-NYU/bdi-kit
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdi-kit-0.4.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/bdi-kit.svg)](https://pypi.org/project/bdi-kit)
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  [![Documentation Status](https://readthedocs.org/projects/bdi-kit/badge/?version=latest)](https://bdi-kit.readthedocs.io/en/latest/?badge=latest)
  [![Tests](https://github.com/VIDA-NYU/bdi-kit/actions/workflows/build.yml/badge.svg)](https://github.com/VIDA-NYU/bdi-kit/actions/workflows/build.yml)
  [![Lint](https://github.com/VIDA-NYU/bdi-kit/actions/workflows/lint.yml/badge.svg)](https://github.com/VIDA-NYU/bdi-kit/actions/workflows/lint.yml)




  The `bdi-kit` is a library that assist users in performing data harmonization. It provides state-of-the-art tools to streamline the process of integrating and transforming disparate datasets (with a focus on biomedical data), and includes APIs for performing tasks such as:
  - Schema matching
  - Value matching
  - Data transformation to a target schema/standard

  **Warning:** `bdi-kit` is currently in *alpha* stage and under heavy development. Expect APIs to change.



  Documentation is available at [https://bdi-kit.readthedocs.io/](https://bdi-kit.readthedocs.io/).




  You can install the latest stable version of this library from [PyPI](https://pypi.org/project/bdi-kit/):

  ```
  pip install bdi-kit
  ```

  To install the latest development version:

  ```
  pip install git+https://github.com/VIDA-NYU/bdi-kit@devel
  ```




  We format code using the [black](https://black.readthedocs.io/en/stable/) code formatter.
  The CI runs for every pull request and will fail if code is not properly formatted.
  To make sure formatting is correct, you can do the following steps.

  Make sure you have black installed:
  ```
  pip install black
  ```

  To format the code, anyone can use the command before committing your changes:
  ```
  make format
  ```

  Or you can use the black command directly:
  ```
  black ./bdikit/
  ```


pkgId: 072236964f6fbb56b1ac82231af9d8d58ff844cf7ea1c14ee53f23e10ad8a14c
name: python-bdict
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Python auto-binding dict
url: https://github.com/bharel/bdict
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdict-0.1.0-1.src.rpm
checksum_type: sha256
description:
  A library allowing you to create an auto method-binding dict.

  Ever dreamed of writing clean dicts pointing keys to methods? Fear no more!

  Mainly used for event handlers, a binding dict consists of a mapping between
  any events or keys, to their appropriate handler functions within a class.
  Upon key lookup, the dict will bind the appropriate function to the instance
  of the class.

  For an example:

  ```Python
  class Server:
      """Typical server with a small mapping between event handlers and functions"""
      def __init__(self, name):
          self.name = name

      def on_connect(self, remote_host):
          print(self.name, remote_host)

      def on_connect(self, remote_host):
          print(self.name, remote_host)

      handlers = BDict({NewConnectionEvent: on_connect,
                        DisconnectonEvent: on_disconnect})

  >>> s = Server("myserver")
  >>> s.handlers[NewConnectionEvent]("1.2.3.4")
  myserver 1.2.3.4
  ```
  As you can see, after accessing the handlers dict, and upon key lookup,
  the dict bound the handler functions to the instance.

  BDict also works with classmethods in a clean and fashioned way:

  ```Python
  class MyClass:
      """Typical server with a small mapping between event handlers and functions"""
      @classmethod
      def class_handle(cls):
          print(cls.__name__)

      handlers = BDict({"class_handle": class_handle})

  >>> MyClass.handlers["class_handle"]
  <bound method MyClass.class_handle of <class '__main__.MyClass'>>
  >>> MyClass.handlers["class_handle"]()
  MyClass

  >>> inst = MyClass()
  >>> inst.handlers["class_handle"]
  <bound method MyClass.class_handle of <class '__main__.MyClass'>>
  >>> inst.handlers["class_handle"]()
  MyClass
  ```
  Upon accessing the BDict through an instance, the BDict will create an internal instance data container on the BDict,
  allowing you to modify it's dictionary and not affect other instances!
  ```Python
  >>> inst.handlers[123] = 456
  >>> inst.handlers[123]
  456
  >>> inst2 = MyClass()
  >>> inst2.handlers[123]
  Traceback (most recent call last):
    ...
  KeyError: 123
  ```



  `BDict(dict_)`

  `dict_` can be a dict or an iterable of (key, value) pairs and will be used to initialize `BDict`.

  The class BDict is used on must support weak referencing (the vast majority of custom objects do). If you use `__slots__`, you are able to do this by adding `__weakref__` to the slots.

  `BDict.autobind(key, value)`

  Allows adding an autobinding entry in the dict (regular additions will not autobind). `key` is the key for access while `value` is the function that will be autobound.


pkgId: 45d156526e9be74d172f5d1cf2842f2146e5b67bcba48160d93be3d959ae9bc2
name: python-bdist-wheel-name
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Generate the name that bdist_wheel would use
url: https://github.com/davidszotten/bdist_wheel_name
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdist-wheel-name-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Generate the filename a wheel built with `bdist_wheel` would get, e.g. to check if it's already in your package index


pkgId: 9fb30281ffd1d1e0d834f4fe9b04c58dd965ecf023a29206f7fcff42453c3ae9
name: python-bdnb-client
arch: src
version: 0.0.9
epoch: 0
release: 1
summary: A Python library for the BDNB API
url: https://github.com/jplumail/bdnb-client
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdnb-client-0.0.9-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/bdnb-client.svg)](https://pypi.org/project/bdnb-client/)

  The Bdnb Python library provides convenient access to the Bdnb REST API from any Python 3.8+
  application. The library includes type definitions for all request params and response fields,
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

  It is generated with [Stainless](https://www.stainlessapi.com/).



  The REST API documentation can be found on [api-portail.bdnb.io](https://api-portail.bdnb.io/catalog/api/f4905edc-db58-3a3b-a8e5-c5dfc6692ee5). The full API of this library can be found in [api.md](https://github.com/jplumail/bdnb-client/tree/main/api.md).



  ```sh

  pip install bdnb-client
  ```



  The full API of this library can be found in [api.md](https://github.com/jplumail/bdnb-client/tree/main/api.md).

  ```python
  import os
  from bdnb_client import Bdnb

  client = Bdnb(
      api_key=os.environ.get("BDNB_API_KEY"),  # This is the default and can be omitted
  )

  page = client.donnees.batiment_groupe.list(
      code_commune_insee="eq.76108",
  )
  print(page.items)
  ```

  While you can provide a `api_key` keyword argument,
  we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
  to add `BDNB_API_KEY="My API Key"` to your `.env` file
  so that your API Key is not stored in source control.



  Simply import `AsyncBdnb` instead of `Bdnb` and use `await` with each API call:

  ```python
  import os
  import asyncio
  from bdnb_client import AsyncBdnb

  client = AsyncBdnb(
      api_key=os.environ.get("BDNB_API_KEY"),  # This is the default and can be omitted
  )


  async def main() -> None:
      page = await client.donnees.batiment_groupe.list(
          code_commune_insee="eq.76108",
      )
      print(page.items)


  asyncio.run(main())
  ```

  Functionality between the synchronous and asynchronous clients is otherwise identical.



  Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:

  - Serializing back into JSON, `model.to_json()`
  - Converting to a dictionary, `model.to_dict()`

  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.



  List methods in the Bdnb API are paginated.

  This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:

  ```python
  from bdnb_client import Bdnb

  client = Bdnb()

  all_batiment_groupes = []

  for batiment_groupe in client.donnees.batiment_groupe.list(
      code_commune_insee="eq.76108",
  ):
      
      all_batiment_groupes.append(batiment_groupe)
  print(all_batiment_groupes)
  ```

  Or, asynchronously:

  ```python
  import asyncio
  from bdnb_client import AsyncBdnb

  client = AsyncBdnb()


  async def main() -> None:
      all_batiment_groupes = []
      
      async for batiment_groupe in client.donnees.batiment_groupe.list(
          code_commune_insee="eq.76108",
      ):
          all_batiment_groupes.append(batiment_groupe)
      print(all_batiment_groupes)


  asyncio.run(main())
  ```

  Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:

  ```python
  first_page = await client.donnees.batiment_groupe.list(
      code_commune_insee="eq.76108",
  )
  if first_page.has_next_page():
      print(f"will fetch next page using these details: {first_page.next_page_info()}")
      next_page = await first_page.get_next_page()
      print(f"number of items we just fetched: {len(next_page.items)}")


  ```

  Or just work directly with the returned data:

  ```python
  first_page = await client.donnees.batiment_groupe.list(
      code_commune_insee="eq.76108",
  )
  for batiment_groupe in first_page.items:
      print(batiment_groupe.batiment_groupe_id)


  ```



  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `bdnb_client.APIConnectionError` is raised.

  When the API returns a non-success status code (that is, 4xx or 5xx
  response), a subclass of `bdnb_client.APIStatusError` is raised, containing `status_code` and `response` properties.

  All errors inherit from `bdnb_client.APIError`.

  ```python
  import bdnb_client
  from bdnb_client import Bdnb

  client = Bdnb()

  try:
      client.donnees.batiment_groupe.list(
          code_commune_insee="eq.76108",
      )
  except bdnb_client.APIConnectionError as e:
      print("The server could not be reached")
      print(e.__cause__)  # an underlying Exception, likely raised within httpx.
  except bdnb_client.RateLimitError as e:
      print("A 429 status code was received; we should back off a bit.")
  except bdnb_client.APIStatusError as e:
      print("Another non-200-range status code was received")
      print(e.status_code)
      print(e.response)
  ```

  Error codes are as followed:

  | Status Code | Error Type                 |
  | ----------- | -------------------------- |
  | 400         | `BadRequestError`          |
  | 401         | `AuthenticationError`      |
  | 403         | `PermissionDeniedError`    |
  | 404         | `NotFoundError`            |
  | 422         | `UnprocessableEntityError` |
  | 429         | `RateLimitError`           |
  | >=500       | `InternalServerError`      |
  | N/A         | `APIConnectionError`       |



  Certain errors are automatically retried 2 times by default, with a short exponential backoff.
  Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
  429 Rate Limit, and >=500 Internal errors are all retried by default.

  You can use the `max_retries` option to configure or disable retry settings:

  ```python
  from bdnb_client import Bdnb


  client = Bdnb(
      
      max_retries=0,
  )


  client.with_options(max_retries=5).donnees.batiment_groupe.list(
      code_commune_insee="eq.76108",
  )
  ```



  By default requests time out after 1 minute. You can configure this with a `timeout` option,
  which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:

  ```python
  from bdnb_client import Bdnb


  client = Bdnb(
      
      timeout=20.0,
  )


  client = Bdnb(
      timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
  )


  client.with_options(timeout=5.0).donnees.batiment_groupe.list(
      code_commune_insee="eq.76108",
  )
  ```

  On timeout, an `APITimeoutError` is thrown.

  Note that requests that time out are [retried twice by default](https://github.com/jplumail/bdnb-client/tree/main/#retries).





  We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.

  You can enable logging by setting the environment variable `BDNB_LOG` to `debug`.

  ```shell
  $ export BDNB_LOG=debug
  ```



  In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:

  ```py
  if response.my_field is None:
    if 'my_field' not in response.model_fields_set:
      print('Got json like {}, without a "my_field" key present at all.')
    else:
      print('Got json like {"my_field": null}.')
  ```



  The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,

  ```py
  from bdnb_client import Bdnb

  client = Bdnb()
  response = client.donnees.batiment_groupe.with_raw_response.list(
      code_commune_insee="eq.76108",
  )
  print(response.headers.get('X-My-Header'))

  batiment_groupe = response.parse()  # get the object that `donnees.batiment_groupe.list()` would have returned
  print(batiment_groupe.batiment_groupe_id)
  ```

  These methods return an [`APIResponse`](https://github.com/jplumail/bdnb-client/tree/main/src/bdnb_client/_response.py) object.

  The async client returns an [`AsyncAPIResponse`](https://github.com/jplumail/bdnb-client/tree/main/src/bdnb_client/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.



  The above interface eagerly reads the full response body when you make the request, which may not always be what you want.

  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.

  ```python
  with client.donnees.batiment_groupe.with_streaming_response.list(
      code_commune_insee="eq.76108",
  ) as response:
      print(response.headers.get("X-My-Header"))

      for line in response.iter_lines():
          print(line)
  ```

  The context manager is required so that the response will reliably be closed.



  This library is typed for convenient access to the documented API.

  If you need to access undocumented endpoints, params, or response properties, the library can still be used.



  To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
  http verbs. Options on the client will be respected (such as retries) will be respected when making this
  request.

  ```py
  import httpx

  response = client.post(
      "/foo",
      cast_to=httpx.Response,
      body={"my_param": True},
  )

  print(response.headers.get("x-foo"))
  ```



  If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request
  options.



  To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You
  can also get all the extra fields on the Pydantic model as a dict with
  [`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).



  You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:

  - Support for proxies
  - Custom transports
  - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality

  ```python
  from bdnb_client import Bdnb, DefaultHttpxClient

  client = Bdnb(
      
      base_url="http://my.test.server.example.com:8083",
      http_client=DefaultHttpxClient(
          proxies="http://my.test.proxy.example.com",
          transport=httpx.HTTPTransport(local_address="0.0.0.0"),
      ),
  )
  ```

  You can also customize the client on a per-request basis by using `with_options()`:

  ```python
  client.with_options(http_client=DefaultHttpxClient(...))
  ```



  By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.



  This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes that only affect static types, without breaking runtime behavior.
  2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
  3. Changes that we do not expect to impact the vast majority of users in practice.

  We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

  We are keen for your feedback; please open an [issue](https://www.github.com/jplumail/bdnb-client/issues) with questions, bugs, or suggestions.



  If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.

  You can determine the version that is being used at runtime with:

  ```py
  import bdnb_client
  print(bdnb_client.__version__)
  ```



  Python 3.8 or higher.



  See [the contributing documentation](https://github.com/jplumail/bdnb-client/tree/main/./CONTRIBUTING.md).


pkgId: 01ac45dced41d9158b5e86f3e356d5d38538765c39d014766bb4dc9c123432f1
name: python-bdownload
arch: src
version: 0.2.2.1
epoch: 0
release: 1
summary: A multi-threaded and multi-source aria2-like batch file downloading library for Python
url: https://github.com/Jesseatgao/bdownload
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdownload-0.2.2.1-1.src.rpm
checksum_type: sha256
description:
  [![Latest Version](https://img.shields.io/pypi/v/bdownload.svg)](https://pypi.org/project/bdownload/)
  [![Build Status](https://api.travis-ci.com/Jesseatgao/bdownload.svg?branch=master)](https://api.travis-ci.com/Jesseatgao/bdownload.svg?branch=master)
  [![Supported Versions](https://img.shields.io/pypi/pyversions/bdownload.svg)](https://pypi.org/project/bdownload)

  A multi-threaded and multi-source aria2-like batch file downloading library for Python 2.7 and 3.6+

  > **:bulb:** **Note**\
  > See also [https://bdownload.readthedocs.io](https://bdownload.readthedocs.io) for API reference.



  * via PyPI

      `pip install bdownload`

  * from within source directory locally

      `pip install .`

      Note that you should `git clone` or download the source tarball (and unpack it of course) from the repository first

  > **:bulb:** **Note**\
  > For Python2.7: since the version of 2022.5.18, `certifi` has dropped the support for Python2.x. To upgrade to the latest CA
  > certificates bundle, simply run:
  >
  > `$ bdownload-upd-cacert-py2`





      `from bdownload import BDownloader, BDownloaderException`

              or

      `import bdownload`



  `
  class bdownload.BDownloader(max_workers=None, max_parallel_downloads=5, workers_per_download=4, min_split_size=1024*1024,
                              chunk_size=1024*100, proxy=None, cookies=None, user_agent=None, logger=None, progress='mill',
                              num_pools=20, pool_maxsize=20, request_timeout=None, request_retries=None, status_forcelist=None,
                              resumption_retries=None, continuation=True, referrer=None, check_certificate=True, ca_certificate=None,
                              certificate=None, auth=None, netrc=None, headers=None)
  `

      Create and initialize a `BDownloader` object for executing download jobs.

    * The `max_workers` parameter specifies the number of the parallel downloading threads, whose default value is
      determined by _#num_of_processor * 5_ if set to `None`.

    * `max_parallel_downloads` limits the number of files downloading concurrently. It has a default value of 5.

    * `workers_per_download` sets the maximum number of worker threads for every file downloading job, which defaults to 4.

    * `min_split_size` denotes the size in bytes of file pieces split to be downloaded in parallel, which defaults to
      1024*1024 bytes (i.e. 1MB).

    * The `chunk_size` parameter specifies the chunk size in bytes of every http range request, which will take a default
      value of 1024*100 (i.e. 100KB) if not provided.

    * `proxy` supports both HTTP and SOCKS proxies in the form of _http://[user:pass@]host:port_ and
      _socks5://[user:pass@]host:port_, respectively.

    * If `cookies` needs to be set, it must either take the form of _cookie_key=cookie_value_, with multiple pairs separated
      by whitespace and/or semicolon if applicable, e.g. '_key1=val1 key2=val2;key3=val3_', be packed into a `dict`, or
      be an instance of `CookieJar`, i.e. `cookielib.CookieJar` for Python27, `http.cookiejar.CookieJar` for Python3.x or
      `RequestsCookieJar` from `requests`.

      Note that the `ValueError` exception will be raised when the `cookies` is of the `str` type and not in the valid format.

    * When `user_agent` is not given, it will default to '_bdownload/VERSION_', with _VERSION_ being replaced by the
      package's version number.

    * The `logger` parameter specifies an event logger. If `logger` is not `None`, it must be an object of class
      `logging.Logger` or of its customized subclass.  Otherwise, it will use a default module-level logger returned by
      `logging.getLogger(__name__)`.

    * `progress` determines the style of the progress bar displayed while downloading files. Possible values are `'mill'`,
      `'bar'` and `'none'`. `'mill'` is the default. To disable this feature, e.g. while scripting or multi-instanced,
      set it to `'none'`.

    * The `num_pools` parameter has the same meaning as `num_pools` in `urllib3.PoolManager` and will eventually be passed
      to it. Specifically, `num_pools` specifies the number of connection pools to cache.

    * `pool_maxsize` will be passed to the underlying `requests.adapters.HTTPAdapter`. It specifies the maximum number of
      connections to save that can be reused in the urllib3 connection pool.

    * The `request_timeout` parameter specifies the timeouts for the internal `requests` session. The timeout value(s)
      as a float or `(connect, read)` tuple is intended for both the `connect` and the `read` timeouts, respectively.
      If set to `None`, it will take a default value of `(3.05, 6)`.

    * `request_retries` specifies the maximum number of retry attempts allowed on exceptions and interested status codes
      (i.e. `status_forcelist`) for the builtin Retry logic of `urllib3`. It will default to `download.URLLIB3_BUILTIN_RETRIES_ON_EXCEPTION`
      if not given.

      NB: There are two retry mechanisms that jointly determine the total retries of a request. One is the above-mentioned
      Retry logic that is built into `urllib3`, and the other is the extended high-level retry factor that is meant to
      complement the builtin retry mechanism. The total retries is bounded by the following formula:
      `request_retries` * (_requests_extended_retries_factor_ + 1), where _requests_extended_retries_factor_ can be modified
      through the module level function `bdownload.set_requests_retries_factor()`, and is initialized to
      `download.REQUESTS_EXTENDED_RETRIES_FACTOR` by default; Usually you don't want to change it.

    * `status_forcelist` specifies a set of HTTP status codes that a retry should be enforced on. The default set of status
      codes shall be `download.URLLIB3_RETRY_STATUS_CODES` if not given.

    * The `resumption_retries` parameter specifies the maximum allowable number of retries on error at resuming the interrupted
      download while streaming the request content. The default value of it is `download.REQUESTS_RETRIES_ON_STREAM_EXCEPTION`
      when not provided.

    * The `continuation` parameter specifies whether, if possible, to resume the partially downloaded files before, e.g.
      when the downloads had been terminated by the user by pressing `Ctrl-C`. When not present, it will default to `True`.

    * `referrer` specifies an HTTP request header `Referer` that applies to all downloads. If set to `'*'`, the request URL
      shall be used as the referrer per download.

    * The `check_certificate` parameter specifies whether to verify the server's TLS certificate or not. It defaults to `True`.

    * `ca_certificate` specifies a path to the preferred CA bundle file (.pem) or directory with certificates in PEM format
      of trusted CAs. If set to a path to a directory, the directory must have been processed using the `c_rehash` utility
      supplied with OpenSSL, according to `requests`. NB the cert files in the directory each only contain one CA certificate.

    * `certificate` specifies a client certificate. It has the same meaning as that of `cert` in `requests.request()`.

    * The `auth` parameter sets a (user, pass) tuple or Auth handler to enable Basic/Digest/Custom HTTP Authentication.
      It will be passed down to the underlying :class:`requests.Session` instance as the default authentication.

      > **:warning:** **Warning**\
        The `auth` will be applied to all the downloads for HTTP Authentication. Don't use this parameter, if not all of the
        downloads need the authentication, to avoid leaking credential. Instead, use the `netrc` parameter for fine-grained
        control over HTTP Authentication.

    * `netrc` specifies a dictionary of ``'machine': (login, password)`` (or ``'machine': requests.auth.AuthBase``)
      for HTTP Authentication, similar to the .netrc file format in spirit.

    * `headers` specifies extra HTTP headers, standard or custom, for use in all of the requests made by the session.
      The headers take precedence over the ones specified by other parameters, e.g. `user_agent`, if conflict happens.

  `
  BDownloader.downloads(path_urls)
  `

      Submit multiple downloading jobs at a time.

    * `path_urls` accepts a list of tuples of the form (_path_, _url_), where _path_ should be a pathname, probably prefixed
      with absolute or relative paths, and _url_ should be a URL string, which may consist of multiple TAB-separated URLs
      pointing to the same file. A valid `path_urls`, for example, could be [('_/opt/files/bar.tar.bz2_', '_https://foo.cc/bar.tar.bz2_'),
      ('_./sanguoshuowen.pdf_', '_https://bar.cc/sanguoshuowen.pdf\thttps://foo.cc/sanguoshuowen.pdf_'),
      ('_/**to**/**be**/created/_', '_https://flash.jiefang.rmy/lc-cl/gaozhuang/chelsia/rockspeaker.tar.gz_'), ('_/path/to/**existing**-dir_',
      '_https://ghosthat.bar/foo/puretonecone81.xz\thttps://tpot.horn/foo/puretonecone81.xz\thttps://hawkhill.bar/foo/puretonecone81.xz_')].

      Note that `BDownloaderException` will be raised if the downloads were interrupted, e.g. by calling
      `BDownloader.cancel()` in a `SIGINT` signal handler, in the process of submitting the download requests.

      > **:warning:** **Warning**\
        The method is not thread-safe, which means it should not be called at the same time in multiple threads
        with one instance.
      >
      > When multi-instanced (e.g. one instance per thread), the file paths specified in one instance should not overlap
        those in another to avoid potential race conditions. File loss may occur, for example, if a failed download task
        in one instance tries to delete a directory that is being accessed by some download tasks in other instances.
        However, this limitation doesn't apply to the file paths specified in a same instance.

  `
  BDownloader.download(path, url)
  `

      Submit a single downloading job.

    * Similar to `BDownloader.downloads()`, in fact it is just a special case of which, with [(`path`, `url`)] composed of
      the specified parameters as the input.

      Note that `BDownloaderException` will be raised if the download was interrupted, e.g. by calling
      `BDownloader.cancel()` in a `SIGINT` signal handler, in the process of submitting the download request.

      > **:warning:** **Warning**\
        The limitation on the method and the `path_name` parameter herein is the same as in `BDownloader.downloads()`.

  `
  BDownloader.wait_for_all()
  `

      Wait for all the downloading jobs to complete. Returns a 2-tuple of lists (_succeeded_, _failed_).
      The first list _succeeded_ contains the originally passed (_path_, _url_)s that completed successfully, while
      the second list _failed_ contains the raised and cancelled ones.

  `
  BDownloader.results()
  `

      Get both the succeeded and failed downloads when all done or interrupted by user. Return a 2-tuple of list
      same as that returned by `BDownloader.wait_for_all()`.

  `
  BDownloader.result()
  `

      Return the final download status. 0 for success, and -1 failure.

  `
  BDownloader.close()
  `

      Shut down and perform the cleanup.

  `
  BDownloader.cancel(keyboard_interrupt=True)
  `

      Cancel all the download jobs.

    * `keyboard_interrupt` specifies whether the user hit the interrupt key (e.g. Ctrl-C).

  `
  bdownload.set_requests_retries_factor(retries)
  `

      Set the retries factor that complements and extends the builtin retry mechanism of `urllib3`.

    * The `retries` parameter specifies the maximum number of retries when a decorated method of `requests` raised an
      exception or returned any bad status code. It should take a value of at least `1`, or else nothing changes.



  * [`movie-downloader`'s third-party programs downloader](https://github.com/Jesseatgao/movie-downloader/blob/32b775c89f273d0b34af6c713e9a9362039b805c/mdl/third_parties/__init__.py#L175)

  * [`bdownload`'s command-line utility](https://github.com/Jesseatgao/bdownload/blob/master/src/bdownload/cli.py)

  * [`bdownload`'s CACERT-updating utility](https://github.com/Jesseatgao/bdownload/blob/master/src/bdownload/utils.py)

  * Single file downloading

  ```python

  import unittest
  import tempfile
  import os
  import hashlib

  from bdownload import BDownloader


  class TestBDownloader(unittest.TestCase):
      def setUp(self):
          self.tmp_dir = tempfile.TemporaryDirectory()

      def tearDown(self):
          self.tmp_dir.cleanup()

      def test_bdownloader_download(self):
          file_path = os.path.join(self.tmp_dir.name, "aria2-x86_64-win.zip")
          file_url = "https://github.com/Jesseatgao/aria2-patched-static-build/releases/download/1.35.0-win-linux/aria2-x86_64-win.zip"
          file_sha1_exp = "16835c5329450de7a172412b09464d36c549b493"

          with BDownloader(max_workers=20, progress='mill') as downloader:
              downloader.download(file_path, file_url)
              downloader.wait_for_all()

          hashf = hashlib.sha1()
          with open(file_path, mode='rb') as f:
              hashf.update(f.read())
          file_sha1 = hashf.hexdigest()

          self.assertEqual(file_sha1_exp, file_sha1)


  if __name__ == '__main__':
      unittest.main()

  ```

  * Batch file downloading

  ```python

  import unittest
  import tempfile
  import os
  import hashlib

  from bdownload import BDownloader


  class TestBDownloader(unittest.TestCase):
      def setUp(self):
          self.tmp_dir = tempfile.TemporaryDirectory()

      def tearDown(self):
          self.tmp_dir.cleanup()

      def test_bdownloader_downloads(self):
          files = [
              {
                  "file": os.path.join(self.tmp_dir.name, "aria2-x86_64-linux.tar.xz"),
                  "url": "https://github.com/Jesseatgao/aria2-patched-static-build/releases/download/1.35.0-win-linux/aria2-x86_64-linux.tar.xz",
                  "sha1": "d02dfdab7517e78a257f4403e502f1acc2a795e4"
              },
              {
                  "file": os.path.join(self.tmp_dir.name, "mkvtoolnix-x86_64-linux.tar.xz"),
                  "url": "https://github.com/Jesseatgao/MKVToolNix-static-builds/releases/download/v47.0.0-mingw-w64-win32v1.0/mkvtoolnix-x86_64-linux.tar.xz",
                  "sha1": "19b0c7fc20839693cc0929f092f74820783a9750"
              }
          ]

          file_urls = [(f["file"], f["url"]) for f in files]

          with BDownloader(max_workers=20, progress='mill') as downloader:
              downloader.downloads(file_urls)
              downloader.wait_for_all()

          for f in files:
              hashf = hashlib.sha1()
              with open(f["file"], mode='rb') as fd:
                  hashf.update(fd.read())
              file_sha1 = hashf.hexdigest()

              self.assertEqual(f["sha1"], file_sha1)


  if __name__ == '__main__':
      unittest.main()

  ```




  ```
  bdownload      url | -L URLS [URLS ...]
                 [-O OUTPUT | -o OUTPUT [OUTPUT ...]] [-D DIR]
                 [-p PROXY] [-n MAX_WORKERS] [-j MAX_PARALLEL_DOWNLOADS]
                 [-J WORKERS_PER_DOWNLOAD] [-k MIN_SPLIT_SIZE] [-s CHUNK_SIZE]
                 [-e COOKIE] [--user-agent USER_AGENT] [--referrer REFERRER]
                 [--check-certificate {True,true,TRUE,False,false,FALSE}]
                 [--ca-certificate CA_CERTIFICATE]
                 [--certificate CERTIFICATE] [--private-key PRIVATE_KEY]
                 [-P {mill,bar,none}] [--num-pools NUM_POOLS]
                 [--pool-size POOL_SIZE] [-l {debug,info,warning,error,critical}]
                 [-c | --no-continue] [-H HEADER] [-u USER_PASS] [--netrc-file NETRC_FILE]
                 [-h]
  ```



  `url`

      URL for the file to be downloaded, which can be either a single URL or TAB-separated composite URL
      pointing to the same file, e.g. `"https://www.afilelink.com/afile.tar.gz"`,
      `"https://chinshou.libccp.mil/luoxuan1981/panjuan-hangyi/tiqianbaozha-key-yasui/qianjunyifa/bengqiyijiao/i-manual/dashboy-basket/zhongzhenkong/xinghuo-xianghui/chunqiao-electronhive-midianfeng/zhenhudan-yasally/afile.tar.gz"`,
      and `"https://www.afilelink.com/afile.tar.gz\thttps://nianpei.bpfatran.com/afile.tar.gz"`

  `-L URLS [URLS ...], --url URLS [URLS ...]`

      URL(s) for the files to be downloaded, each of which might contain TAB-separated URLs
      pointing to the same file, e.g. `-L https://yoursite.net/yourfile.7z`,
      `-L "https://yoursite01.net/thefile.7z\thttps://yoursite02.com/thefile.7z"`,
      or `--url "http://foo.cc/file1.zip" "http://bar.cc/file2.tgz\thttp://bar2.cc/file2.tgz"`

  `-O OUTPUT, --OUTPUT OUTPUT`

      a save-as file name (optionally with absolute or relative (to `-D DIR`) path),
      e.g. `-O afile.tar.gz https://www.afilelink.com/afile.tar.gz`

  `-o OUTPUT [OUTPUT ...], --output OUTPUT [OUTPUT ...]`

      one or more file names (optionally prefixed with relative (to `-D DIR`) or absolute paths), e.g.
      `-o file1.zip ~/file2.tgz`, paired with URLs specified by `--url` or `-L`

  `-D DIR, --dir DIR`

      directory in which to save the downloaded files [default: directory in which this App is running]

  `-p PROXY, --proxy PROXY`

      proxy either in the form of "`http://[user:pass@]host:port`" or "`socks5://[user:pass@]host:port`"

  `-n MAX_WORKERS, --max-workers MAX_WORKERS`

      number of worker threads [default: 20]

  `-j MAX_PARALLEL_DOWNLOADS, --max-parallel-downloads MAX_PARALLEL_DOWNLOADS`

      number of files downloading concurrently [default: 5]

  `-J WORKERS_PER_DOWNLOAD, --workers-per-download WORKERS_PER_DOWNLOAD`

      number of worker threads for every file downloading job [default: 4]

  `-k MIN_SPLIT_SIZE, --min-split-size MIN_SPLIT_SIZE`

      file split size in bytes, "1048576, 1024K or 2M" for example [default: 1M]

  `-s CHUNK_SIZE, --chunk-size CHUNK_SIZE`

      every request range size in bytes, "10240, 10K or 1M" for example [default: 100K]

  `-e COOKIE, --cookie COOKIE`

      cookies either in the form of a string (maybe whitespace- and/or semicolon- separated)
      like "`cookie_key=cookie_value cookie_key2=cookie_value2; cookie_key3=cookie_value3`", or a file,
      e.g. named "cookies.txt", in the Netscape cookie file format. NB the option `-D DIR` does not apply to the cookie file

  `--user-agent USER_AGENT`

      custom user agent

  `--referrer REFERRER`

      HTTP request header "Referer" that applies to all downloads. In particular, use `*` to tell the downloader
      to take the request URL as the referrer per download [default: *]

  `--check-certificate {True,true,TRUE,False,false,FALSE}`

      whether to verify the server's TLS certificate or not [default: True]

  `--ca-certificate CA_CERTIFICATE`

      path to the preferred CA bundle file (.pem) or directory with certificates in PEM format of trusted CAs.
      NB the directory must have been processed using the `c_rehash` utility from OpenSSL. Also, the cert files in the directory
      each only contain one CA certificate

  `--certificate CERTIFICATE`

      path to a single file in PEM format containing the client certificate and optionally a chain of additional
      certificates. If `--private-key` is not provided, then the file must contain the unencrypted private key as well

  `--private-key PRIVATE_KEY`

      path to a file containing the unencrypted private key to the client certificate

  `-P {mill,bar,none}, --progress {mill,bar,none}`

      progress indicator. To disable this feature, use `none`. [default: mill]

  `--num-pools NUM_POOLS`

      number of connection pools [default: 20]

  `--pool-size POOL_SIZE`

      max number of connections in the pool [default: 20]

  `-l {debug,info,warning,error,critical}, --log-level {debug,info,warning,error,critical}`

      logger level [default: warning]

  `-c, --continue`

      resume from the partially downloaded files. This is the default behavior

  `--no-continue`

      do not resume from last interruption, i.e. start the download from beginning

  `-H HEADER, --header HEADER`

      extra HTTP header, standard or custom, which can be repeated several times, e.g.
      '`-H "User-Agent: John Doe" -H "X-BD-Key: One Thousand And One Nights"`'. The headers take precedence over the ones
      specified by other parameters if conflict happens

  `-u USER_PASS, --user-pass USER_PASS`

      default HTTP Authentication for ALL the downloads in "`user:password`" format. **Warning**: don't use this option
      if not all of the downloads need the authentication to avoid leaking credential, use the `--netrc-file` option instead

  `--netrc-file NETRC_FILE`

      a .netrc-like file for HTTP authentication, from which the 'default' entry, if present, takes precedence
      over the `--user-pass` option

  `-h, --help`

      show help message and exit



      bdownload https://www.afilelink.com/afile.tar.gz
      bdownload -O /abspath/to/afile.tar.gz https://www.afilelink.com/afile.tar.gz
      bdownload -O /abspath/to/a/dir/ https://www.afilelink.com/afile.tar.gz
      bdownload -O /abspath/to/afile.tar.gz "https://www.afilelink.com/afile.tar.gz\thttps://nianpei.bpfatran.com/afile.tar.gz"
      bdownload -D path/to/working_dir/ -O relpath/to/working_dir/alias_afile.tar.gz https://www.afilelink.com/afile.tar.gz
      bdownload -D path/to/working/dir https://www.afilelink.com/afile.tar.gz
      bdownload -o /abspath/to/file1.zip ~/file2.tgz -L "http://foo.cc/file1.zip" "http://bar.cc/file2.tgz\thttp://bar2.cc/file2.tgz"
      bdownload -D path/to/working/dir -L "http://foo.cc/file1.zip" "http://bar.cc/file2.tgz\thttp://bar2.cc/file2.tgz"


pkgId: 282dbae177488e22a6071b7765fbded320da65e5d87df5c6e663ebdf931a90e1
name: python-bdpn
arch: src
version: 0.1.15
epoch: 0
release: 1
summary: Estimation of BDPN parameters from phylogenetic trees.
url: https://github.com/evolbioinfo/bdpn
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdpn-0.1.15-1.src.rpm
checksum_type: sha256
description:
  Estimator of BD-PN model parameters from phylogenetic trees and a non-parametric PN detection test.



  [//]: # ([![DOI:10.1093/sysbio/syad059]&#40;https://zenodo.org/badge/DOI/10.1093/sysbio/syad059.svg&#41;]&#40;https://doi.org/10.1093/sysbio/syad059&#41;)
  [//]: # ([![GitHub release]&#40;https://img.shields.io/github/v/release/evolbioinfo/bdpn.svg&#41;]&#40;https://github.com/evolbioinfo/bdpn/releases&#41;)
  [![PyPI version](https://badge.fury.io/py/bdpn.svg)](https://pypi.org/project/bdpn/)
  [![PyPI downloads](https://shields.io/pypi/dm/bdpn)](https://pypi.org/project/bdpn/)
  [![Docker pulls](https://img.shields.io/docker/pulls/evolbioinfo/bdpn)](https://hub.docker.com/r/evolbioinfo/bdpn/tags)



  BD-PN model extends the classical birth-death (BD) model with incomplete sampling [[Stadler 2009]](https://pubmed.ncbi.nlm.nih.gov/19631666/), by adding partner notification (PN).
  Under this model, infected individuals can transmit their pathogen with a constant rate λ,
  get removed (become non-infectious) with a constant rate ψ,
  and their pathogen can be sampled upon removal
  with a constant probability ρ. On top of that, in the BD-PN model,
  at the moment of sampling the sampled individual
  might notify their most recent partner with a constant probability υ.
  Upon notification, the partner is removed almost instantaneously (modeled via a constant notified
  removal rate φ >> ψ) and their pathogen is sampled.

  BD-PN model therefore has 5 parameters:
  * λ -- transmission rate
  * ψ -- removal rate
  * ρ -- sampling probability upon removal
  * υ -- probability to notify the last partner upon sampling
  * φ -- removal (and sampling) rate after notification

  These parameters can be expressed in terms of the following epidemiological parameters:
  * R<sub>0</sub>=λ/ψ -- reproduction number
  * 1/ψ -- infectious time
  * 1/φ -- partner removal time

  BD-PN model makes 3 assumptions:
  1. only observed individuals can notify (instead of any removed individual);
  2. notified individuals are always observed upon removal;
  3. only the most recent partner can get notified.

  For identifiability, BD-PN model requires one of the three BD model parameters (λ, ψ, ρ) to be fixed.



  The bdpn package provides a classical BD and a BD-PN model maximum-likelihood parameter estimator
  from a user-supplied time-scaled phylogenetic tree.
  User must also provide a value for one of the three BD model parameters (λ, ψ, or ρ).
  We recommend providing the sampling probability ρ,
  which could be estimated as the number of tree tips divided by the number of declared cases for the same time period.



  The bdpn package provides a non-parametric test detecting presence/absence of partner notification in a user-supplied time-scaled phylogenetic tree.
  It outputs a p-value.


  One needs to supply a time-scaled phylogenetic tree in newick format.
  In the examples below we will use an HIV tree reconstructed from 200 sequences,
  published in [[Rasmussen _et al._ PLoS Comput. Biol. 2017]](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005448),
  which you can find at [PairTree GitHub](https://github.com/davidrasm/PairTree)
  and in [hiv_zurich/Zurich.nwk](hiv_zurich/Zurich.nwk).



  There are 4 alternative ways to run __bdpn__ on your computer:
  with [docker](https://www.docker.com/community-edition),
  [apptainer](https://apptainer.org/),
  in Python3, or via command line (requires installation with Python3).





  You could either install python (version 3.9 or higher) system-wide and then install bdpn via pip:
  ```bash
  sudo apt install -y python3 python3-pip python3-setuptools python3-distutils
  pip3 install bdpn
  ```

  or alternatively, you could install python (version 3.9 or higher) and bdpn via [conda](https://conda.io/docs/) (make sure that conda is installed first).
  Here we will create a conda environment called _bdpnenv_:
  ```bash
  conda create --name bdpnenv python=3.9
  conda activate bdpnenv
  pip install bdpn
  ```



  If you installed __bdpn__ in a conda environment (here named _bdpnenv_), do not forget to first activate it, e.g.

  ```bash
  conda activate bdpnenv
  ```

  Run the following commands to check for the presence of partner notification and estimate BD-PN model parameters.
  The first command applies the PN test to a tree Zurich.nwk and saves the PN-test value to the file cherry_test.txt
  The second command estimated the BD-PN parameters and their 95% CIs for this tree, assuming the sampling probability of 0.25,
  and saves the estimated parameters to a comma-separated file estimates_bdpn.csv.
  The third command estimated the classical BD parameters and their 95% CIs for this tree, assuming the sampling probability of 0.25,
  and saves the estimated parameters to a comma-separated file estimates_bd.csv.
  ```bash
  pn_test --nwk Zurich.nwk --log cherry_test.txt
  bdpn_infer --nwk Zurich.nwk --ci --p 0.25 --log estimates_bdpn.csv
  bd_infer --nwk Zurich.nwk --ci --p 0.25 --log estimates_bd.csv
  ```



  To see detailed options, run:
  ```bash
  pn_test --help
  bdpn_infer --help
  bd_infer --help
  ```





  Once [docker](https://www.docker.com/community-edition) is installed,
  run the following command to estimate BD-PN model parameters:
  ```bash
  docker run -v <path_to_the_folder_containing_the_tree>:/data:rw -t evolbioinfo/bdpn --nwk /data/Zurich.nwk --ci --p 0.25 --log /data/estimates.csv
  ```

  This will produce a comma-separated file estimates.csv in the <path_to_the_folder_containing_the_tree> folder,
   containing the estimated parameter values and their 95% CIs (can be viewed with a text editor, Excel or Libre Office Calc).



  To see advanced options, run
  ```bash
  docker run -t evolbioinfo/bdpn -h
  ```






  Once [apptainer](https://apptainer.org/docs/user/latest/quick_start.html#installation) is installed,
  run the following command to estimate BD-PN model parameters (from the folder where the Zurich.nwk tree is contained):

  ```bash
  apptainer run docker://evolbioinfo/bdpn --nwk Zurich.nwk --ci --p 0.25 --log estimates.csv
  ```

  This will produce a comma-separated file estimates.csv,
   containing the estimated parameter values and their 95% CIs (can be viewed with a text editor, Excel or Libre Office Calc).




  To see advanced options, run
  ```bash
  apptainer run docker://evolbioinfo/bdpn -h
  ```


pkgId: 1ab28f555953ccdff1e50614c3a7104f650c0ba6fe2ebf6affd8e42562378e34
name: python-bdshare
arch: src
version: 1.0.3
epoch: 0
release: 1
summary: A utility for crawling historical and Real-time Quotes of DSE(Dhaka Stock Exchange)
url: https://pypi.org/project/bdshare/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdshare-1.0.3-1.src.rpm
checksum_type: sha256
description:
  [![Documentation Status](https://readthedocs.org/projects/bdshare/badge/?version=latest)](https://bdshare.readthedocs.io/en/latest/?badge=latest)
  ![PyPI](https://img.shields.io/pypi/v/bdshare)
  ![StyleCI](https://github.styleci.io/repos/253465924/shield?branch=master)
  A utility for crawling historical and Real-time data from stock exchanges of Bangladesh. At present this utility can collect data from Dhaka stock exchange.

  - [Installation](#install)
  - [Example Use](#usage)
  - [List of functions](#functions)
  - [Todo's and Road Map:](#roadmap)


  ```sh
  $ pip install bdshare
  ```
  or upgrade
  ```sh
  $ pip install -U bdshare
  ```


  ```python
  from bdshare import get_current_trade_data
  df = get_current_trade_data()
  print(df.to_string())
  ```
  ```python
  from bdshare import get_current_trade_data
  df = get_current_trade_data('GP') # get specific instrument data
  print(df.to_string())
  ```

  ```python
  from bdshare import get_hist_data
  df = get_hist_data('2022-03-01','2022-03-02') # get all instrument data
  print(df.to_string())
  ```
  or
  ```python
  from bdshare import get_hist_data
  df = get_hist_data('2022-03-01','2022-03-02','ACI') # get specific instrument data
  print(df.to_string())
  ```

  ```python
  from bdshare import get_basic_hist_data
  df = get_basic_hist_data('2022-03-01','2022-03-02') # get all instrument data
  print(df.to_string())
  ```
  or
  ```python
  from bdshare import get_basic_hist_data
  df = get_basic_hist_data('2022-03-01','2022-03-02','GP') # get specific instrument data
  print(df.to_string())
  ```

  ```python
  from bdshare import get_market_inf
  df = get_market_inf() # get last 30 days market data
  print(df.to_string())
  ```
  ```python
  from bdshare import get_market_inf_more_data
  df = get_market_inf_more_data('2022-03-01','2022-03-02') # get historical market data
  print(df.to_string())
  ```

  ```python
  from bdshare import get_market_depth_data
  df = get_market_depth_data('ACI') # get current buy and sell data
  print(df.to_string())
  ```

  ```python
  from bdshare import get_basic_hist_data, Store
  df = get_basic_hist_data('2022-03-01','2022-03-02') # get all instrument data
  Store(df).save()
  ```


  |Function|Params|Description|
  |---|---|---|
  |get_current_trade_data()|symbol:str|get last stock price|
  |get_dsex_data()|symbol:str|get dseX share price|
  |get_current_trading_code()||get last stock codes|
  |get_hist_data()|start:str, end:str|get historical stock price|
  |get_basic_hist_data()|start:str, end:str, code:str|get historical stock price|
  |get_close_price_data()|start:str, end:str, code:str|get stock close price|
  |get_last_trade_price_data()|||

  |Function|Params|Description|
  |---|---|---|
  |get_agm_news()||get stock agm declarations|
  |get_all_news()|start:str, end:str, code:str|get dse news|

  |Function|Params|Description|
  |---|---|---|
  |get_market_inf()||get stock market information|
  |get_latest_pe()||get last stock P/E|
  |get_market_inf_more_data()|start:str, end:str|get historical stock price|
  |get_market_depth_data()|index:str|get_market_depth_data('ACI')|

   - [x] refine logic for parameters
   - [x] Demo example;
   - [x] DSE daily data and historical data crawling
   - [x] DSE news,p/e crawling
   - [x] Add DSEX Index data support
   - [x] Create tests
   - [x] Store dat to csv
   - [x] DSE market depth data
   - [x] Add docker support in demo example

  Complete documentation can be found at [Readthedocs](http://bdshare.readthedocs.io/en/latest/ "bdshare's readthedocs") .

  Anyone and everyone is welcome to contribute. Please take a moment to
  review the [guidelines for contributing](CONTRIBUTING.md).
  * [Bug reports](CONTRIBUTING.md#bugs)
  * [Feature requests](CONTRIBUTING.md#features)
  * [Pull requests](CONTRIBUTING.md#pull-requests)



  - n/a

  - n/a

  - check fix for latest P/E url [#6]


  - n/a

  - n/a

  - fixed latest P/E url [#6]


  - Updated docs

  - n/a


  - Updated docs

  - n/a


  - n/a

  - fixed market depth data api


  - n/a

  - n/a


  - n/a

  - n/a


  - n/a

  - n/a


  - fixed store datafrave to csv file method

  - n/a


  - n/a

  - changed package manager


  - n/a

  - n/a


  - n/a

  - n/a


  -

  - `get_current_trading_code()`


  - added get_market_depth_data
  - added get_dsex_data
  - added 'dse.com.bd' as redundant

  - Changed documentation
  - changed get_agm_news
  - changed get_all_news


  - added get_market_inf_more_data

  - Changed documentation


  - html5lib
  - added get params

  - post request to get


  - modified index declaration


  - modified index declaration


  - added git tag
  - `VERSION.txt`

  - `setup.py`
  - `HISTORY.md` to `CHANGELOG.md`


  - `get_hist_data(), get_current_trade_data()`
  - `HISTORY.md`


pkgId: 4802180107fc5a50c47777f44bef2b4c7a485e1b04fcad4032c913720c98662f
name: python-bdsim
arch: src
version: 1.1.2
epoch: 0
release: 1
summary: Simulate dynamic systems expressed in block diagram form using Python
url: https://pypi.org/project/bdsim/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdsim-1.1.2-1.src.rpm
checksum_type: sha256
description:
  [![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
  [![QUT Centre for Robotics Open Source](https://github.com/qcr/qcr.github.io/raw/master/misc/badge.svg)](https://qcr.github.io)

  [![PyPI version](https://badge.fury.io/py/bdsim.svg)](https://badge.fury.io/py/bdsim)
  ![Python Version](https://img.shields.io/pypi/pyversions/bdsim.svg)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  [![Build Status](https://github.com/petercorke/bdsim/workflows/build/badge.svg?branch=master)](https://github.com/petercorke/bdsim/actions?query=workflow%3Abuild)
  [![Coverage](https://codecov.io/gh/petercorke/bdsim/branch/master/graph/badge.svg)](https://codecov.io/gh/petercorke/bdsim)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/bdsim)](https://pypistats.org/packages/bdsim)
  [![GitHub stars](https://img.shields.io/github/stars/petercorke/bdsim.svg?style=social&label=Star)](https://GitHub.com/petercorke/bdsim/stargazers/)

  <table style="border:0px">
  <tr style="border:0px">
  <td style="border:0px">
  <img src="https://github.com/petercorke/bdsim/raw/master/figs/BDSimLogo_NoBackgnd@2x.png" width="300"></td>
  <td style="border:0px">
  A Python block diagram simulation package</a>
  <ul>
  <li><a href="https://github.com/petercorke/bdsim">GitHub repository </a></li>
  <li><a href="https://petercorke.github.io/bdsim">Documentation</a></li>
  <li><a href="https://github.com/petercorke/bdsim/wiki">Wiki (examples and details)</a></li>
  <li><a href="installation#">Installation</a></li>
  <li>Dependencies: numpy, scipy, matplotlib, <a href="https://github.com/petercorke/ansitable">ansitable</a>, ffmpeg (if rendering animations as a movie)</li>
  </ul>
  </td>
  </tr>
  </table>

  `bdsim` is Python 3 package that enables modelling and simulation of continuous-time, discrete-time or hybrid dynamic systems.  Systems are conceptualized in block diagram form, but represented in terms of Python objects.

    <table>
    <tr>
    <td>
    <img width=450 src="https://github.com/petercorke/bdsim/raw/master/figs/bd1-sketch.png">
    </td>
    <td style="padding-left: 20px;">
    <pre style="font-size:10px;">
    
    demand = bd.STEP(T=1, name='demand')
    sum = bd.SUM('+-')
    gain = bd.GAIN(10)
    plant = bd.LTI_SISO(0.5, [2, 1])
    scope = bd.SCOPE(styles=['k', 'r--'])
    
    bd.connect(demand, sum[0], scope[1])
    bd.connect(plant, sum[1])
    bd.connect(sum, gain)
    bd.connect(gain, plant)
    bd.connect(plant, scope[0])
    </pre>
    </td>
    </tr>
    </table>

  Key features include:

  * The block diagram can be created easily using Python code, rather than drawing boxes and wires. This enables use of your favourite IDE, standard version control tools and development workflows.
  * Wires can communicate *any* Python type such as scalars, lists, dicts, NumPy arrays, objects, and functions. For robotics and vision applications using the [Spatial Maths Toolbox for Python](https://github.com/petercorke/spatialmath-python) wires could send values such as `SE3`, `UnitQuaternion` or `Twist3` objects.
  * Over 70 blocks for linear, nonlinear functions, display blocks, as well as continuous- and discrete-time dynamics
    * Easy to add your own block, it's simply a class
    * Subsystems are supported, and a subsystem can be independently instantiated multiple times in a system.  Subsystems can also be nested.
    * Blocks from other toolboxes are automatically discovered and included. There are blocks for some functions in the  [Robotics Toolbox for Python](https://github.com/petercorke/robotics-toolbox-python) (such as arm, ground and aerial robots) and [Machine Vision Toolbox for Python](https://github.com/petercorke/machinevision-toolbox-python) (such as cameras). These are defined in the `blocks` folder of those toolboxes.
  * The diagram can be executed in a headless configuration, particularly useful on an embedded computer like a RaspberryPi.
  * A [python-based graphical editor](bdedit-the-graphical-editing-tool)
    * allows graphical creation of block diagrams
    * the diagram is stored in a human readable/editable JSON file with extension `.bd`
    * creates good-quality graphics for inclusion in publications
    * can launch `bdsim` to import and execute the model
    * automatically discovers all bsdim and toolbbox blocks and adds them to the block library menu
    * icons can be easily created using any image creation tool or a LaTeX expression



  We first sketch the dynamic system we want to simulate as a block diagram, for example this simple first-order system

  ![block diagram](https://github.com/petercorke/bdsim/raw/master/figs/bd1-sketch.png)

  which we can express concisely with `bdsim` as (see [`bdsim/examples/eg1.py`](https://github.com/petercorke/bdsim/blob/master/examples/eg1.py))

  ```python
       1  #!/usr/bin/env python3
       2  import bdsim
       4  sim = bdsim.BDSim()  # create simulator
       5  bd = sim.blockdiagram()  # create an empty block diagram
       6
       7	# define the blocks
       8	demand = bd.STEP(T=1, name='demand')
       9	sum = bd.SUM('+-')
      10	gain = bd.GAIN(10)
      11	plant = bd.LTI_SISO(0.5, [2, 1], name='plant')
      12	scope = bd.SCOPE(styles=['k', 'r--'])
      13
      14	# connect the blocks
      15	bd.connect(demand, sum[0], scope[1])
      17	bd.connect(sum, gain)
      18	bd.connect(gain, plant)
      19	bd.connect(plant, sum[1], scope[0])
      20
      21	bd.compile()          # check the diagram
      22
      23	sim.report(bd)   # list the system
      24  out = sim.run(bd, 5)   # simulate for 5s
  ```
  which is just 15 lines of executable code.

  The red block annotations on the hand-drawn diagram are used as the names of the variables holding references to the block instance. The blocks can also have user-assigned names, see lines 8 and 11, which are used in diagnostics and as labels in plots.

  After the blocks are created their input and output ports need to be connected. In `bdsim` all wires are point to point, a *one-to-many* connection is implemented by *many* wires,
  for example
  ```
  bd.connect(source, dest1, dest2, ...)
  ```
  creates individual wires from `source` -> `dest1`, `source` -> `dest2` and so on.
  Ports are designated using Python indexing notation, for example `block[2]` is port 2 (the third port) of `block`.  Whether it is an input or output port depends on context.
  In the example above an index on the first argument refers to an output port, while on the second (or subsequent) arguments it refers to an input port.  If a block has only a single input or output port then no index is required, 0 is assumed.

  A group of ports can be denoted using slice notation, for example
  ```
  bd.connect(source[2:5], dest[3:6)
  ```
  will connect `source[2]` -> `dest[3]`, `source[3]` -> `dest[4]`, `source[4]` -> `dest[5]`.
  The number of wires in each slice must be consistent.  You could even do a cross over by connecting `source[2:5]` to `dest[6:3:-1]`.

  Line 21 assembles all the blocks and wires, instantiates subsystems, checks connectivity to create a flat wire list, and then builds the dataflow execution plan.

  Line 23 generates a report, in tabular form, showing a summary of the block diagram:

  ```
  ┌────────┬──────────┬────────┬────────┬─────────────┐
  │ block  │   type   │ inport │ source │ source type │
  ├────────┼──────────┼────────┼────────┼─────────────┤
  │demand@ │ step     │        │        │             │
  ├────────┼──────────┼────────┼────────┼─────────────┤
  │gain.0  │ gain     │ 0      │ sum.0  │ float64     │
  ├────────┼──────────┼────────┼────────┼─────────────┤
  │plant   │ lti_siso │ 0      │ gain.0 │ float64     │
  ├────────┼──────────┼────────┼────────┼─────────────┤
  │scope.0 │ scope    │ 0      │ plant  │ float64     │
  │        │          │ 1      │ demand │ int         │
  ├────────┼──────────┼────────┼────────┼─────────────┤
  │sum.0   │ sum      │ 0      │ demand │ int         │
  │        │          │ 1      │ plant  │ float64     │
  └────────┴──────────┴────────┴────────┴─────────────┘
  ```

  Line 24 runs the simulation for 5 seconds
  using the default variable-step RK45 solver and saves output values at least every 0.05s.  It
  causes the following output

  ```
  >>> Start simulation: T = 5.00, dt = 0.050
    Continuous state variables: 1
       x0 =  [0.]
    Discrete state variables:   0

  no graphics backend specified: Qt5Agg found, using instead of MacOSX

  bdsim ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ 100.0% - 0s

  <<< Simulation complete
    block diagram evaluations: 784
    block diagram exec time:   0.075 ms
    time steps:                123
    integration intervals:     2
  ```

  This provides a summary of the number of states for the complete system: the number of continuous states, the number
  of discrete states, and the initial value of the state vectors.

  During execution a progress bar is updated and scope blocks pops up a graphical window

  ![bdsim output](https://github.com/petercorke/bdsim/raw/master/figs/Figure_1.png)

  The simulation results are in a container object (`BDStruct`)
  ```
  >>> out
  t      = ndarray:float64 (123,)
  x      = ndarray:float64 (123, 1)
  xnames = ['plantx0'] (list)
  ynames = [] (list)
  ```
  which contains an array of time values, an array of state values, and a list of the
  names of the state variables.

  By default the `.run()` method at line 24 blocks blocks the script until all figure
  windows are closed (by pressing the operating system close button or typing "q"), or the
  script is killed with SIGINT. If you want to continue the script with the figures still
  active then the `hold=False` option should be set.

  If we wished to also record additional outputs, we can add them as _watched_ signals
  ```
  out = sim.run(bd, watch=[demand, sum])  # simulate for 5s
  ```
  and now the output is
  ```
  >>> out
  t      = ndarray:float64 (123,)
  x      = ndarray:float64 (123, 1)
  xnames = ['plantx0'] (list)
  y0     = ndarray:float64 (123,)
  y1     = ndarray:int64 (123,)
  ynames = ['plant[0]', 'demand[0]'] (list)
  ```
  where

  - `t` the time vector: ndarray, shape=(M,)
  - `x` is the state vector: ndarray, shape=(M,N), one row per timestep
  - `xnames` is a list of the names of the states corresponding to columns of `x`, eg. "plant.x0"

  The `watch` argument is a list of outputs to log, in this case `plant` defaults
  to output port 0.  This information is saved in additional variables `y0`, `y1`
  etc.  `ynames` is a list of the names of the watched variables.

  An alternative system report, created by `sim.report(bd, type="lists")` is more detailed
  ```
  Blocks::

  ┌───┬─────────┬─────┬──────┬────────┬─────────┬───────┐
  │id │    name │ nin │ nout │ nstate │ ndstate │ type  │
  ├───┼─────────┼─────┼──────┼────────┼─────────┼───────┤
  │ 0 │  demand │   0 │    1 │      0 │       0 │ step  │
  │ 1 │   sum.0 │   2 │    1 │      0 │       0 │ sum   │
  │ 2 │  gain.0 │   1 │    1 │      0 │       0 │ gain  │
  │ 3 │   plant │   1 │    1 │      1 │       0 │ LTI   │
  │ 4 │ scope.0 │   2 │    0 │      0 │       0 │ scope │
  └───┴─────────┴─────┴──────┴────────┴─────────┴───────┘

  Wires::

  ┌───┬──────┬──────┬──────────────────────────┬─────────┐
  │id │ from │  to  │       description        │  type   │
  ├───┼──────┼──────┼──────────────────────────┼─────────┤
  │ 0 │ 0[0] │ 1[0] │ demand[0] --> sum.0[0]   │ int     │
  │ 1 │ 0[0] │ 4[1] │ demand[0] --> scope.0[1] │ int     │
  │ 2 │ 3[0] │ 1[1] │ plant[0] --> sum.0[1]    │ float64 │
  │ 3 │ 1[0] │ 2[0] │ sum.0[0] --> gain.0[0]   │ float64 │
  │ 4 │ 2[0] │ 3[0] │ gain.0[0] --> plant[0]   │ float64 │
  │ 5 │ 3[0] │ 4[0] │ plant[0] --> scope.0[0]  │ float64 │
  └───┴──────┴──────┴──────────────────────────┴─────────┘
  ```
  In the first table we can see key information about each block, its `id` (used internally), name, the number of input and output ports, the number of
  continuous- and discrete-time states, and the type which is the block class.  Note that the name is auto-generated based on the type, except if it has
  been set explicitly as for the blocks `demand` and `plant`.

  The second table shows all wires in point-to-point form, showing the start and end block and port (the block is represented here by its `id`) and the type of the object sent along the wire.

  To save figures we need to make two modifications, changing line 4 to
  ```
       4  sim = bdsim.BDSim(hold=False)  # create simulator
  ```
  which prevents `.run()` from blocking and then deleting all the figures.
  Then, after the `.run()` we add
  ```
       25 scope.savefig()  # save scope figure
  ```
  If the filename is not given it defaults to the block name, in this case `scope.0.pdf`.


  The output can be pickled and written to a file

  ```[shell]
  examples/eg1.py -o
  python -mpickle bd.out
  t      = ndarray:float64 (123,)
  x      = ndarray:float64 (123, 1)
  xnames = ['plantx0'] (list)
  y0     = ndarray:float64 (123,)
  y1     = ndarray:int64 (123,)
  ynames = ['plant[0]', 'demand[0]'] (list)
  ```

  by default the results are written to `bd.out`, use the option `--out FILE` to set it
  to a specific value.

  The block parameters can also be overridden from the command line without having to
  edit the code.  To increase the loop gain we could write:
  ```[shell]
  examples/eg1.py --set gain.0:K=20
  ```

  More details on this Wiki about:

  - [Adding blocks](https://github.com/petercorke/bdsim/wiki/Adding-blocks)
  - [Connecting blocks](https://github.com/petercorke/bdsim/wiki/Connecting-blocks)
  - [Running the simulation](https://github.com/petercorke/bdsim/wiki/Running)
  - [Command line options](https://github.com/petercorke/bdsim/wiki/Runtime-options)



  In the folder `bdsim/examples` you can find a few other runnable examples:

  - [`eg1.py`](https://github.com/petercorke/bdsim/blob/master/examples/eg1.py) the example given above
  - [`waveform.py`](https://github.com/petercorke/bdsim/blob/master/examples/waveform.py) two signal generators connected to two scopes

  Examples from Chapter four of _Robotics, Vision & Control 2e (2017)_:

  - [`rvc4_2.py`](https://github.com/petercorke/bdsim/blob/master/examples/rvc4_2.py) Fig 4.2 - a car-like vehicle with bicycle kinematics driven by a rectangular pulse steering signal
  - [`rvc4_4.py`](https://github.com/petercorke/bdsim/blob/master/examples/rvc4_4.py) Fig 4.4 - a car-like vehicle driving to a point

  ![RVC Figure 4.4](https://github.com/petercorke/bdsim/raw/master/figs/rvc4_4.gif)

  - [`rvc4_6.py`](https://github.com/petercorke/bdsim/blob/master/examples/rvc4_6.py) Fig 4.6 - a car-like vehicle driving to/along a line

  ![RVC Figure 4.6](https://github.com/petercorke/bdsim/raw/master/figs/rvc4_6.gif)

  - [`rvc4_8.py`](https://github.com/petercorke/bdsim/blob/master/examples/rvc4_8.py) Fig 4.8 - a car-like vehicle using pure-pursuit trajectory following

  ![RVC Figure 4.6](https://github.com/petercorke/bdsim/raw/master/figs/rvc4_8.gif)

  - [`rvc4_11.py`](https://github.com/petercorke/bdsim/blob/master/examples/rvc4_11.py) Fig 4.11 a car-like vehicle driving to a pose

  ![RVC Figure 4.11](https://github.com/petercorke/bdsim/raw/master/figs/rvc4_11.gif)

  Figs 4.8 (pure pursuit) and Fig 4.21 (quadrotor control) are yet to be done.



  Wiring, and some simple arithmetic blocks like `GAIN`, `SUM` and `PROD` can be implicitly generated by overloaded Python operators.  This strikes a nice balance between block diagram coding and Pythonic programming.

  ```
       1  #!/usr/bin/env python3
       2
       3  import bdsim
       4
       5  sim = bdsim.BDSim()  # create simulator
       6  bd = sim.blockdiagram()  # create an empty block diagram
       7
       8  # define the blocks
       9  demand = bd.STEP(T=1, name='demand')
      10  plant = bd.LTI_SISO(0.5, [2, 1], name='plant')
      11  scope = bd.SCOPE(styles=['k', 'r--'], movie='eg1.mp4')
      12
      13  # connect the blocks using Python syntax
      14  scope[0] = plant
      15  scope[1] = demand
      16  plant[0] = 10 * (demand - plant)
      17
      18  bd.compile()   # check the diagram
      19  bd.report()    # list all blocks and wires
      20
      22  out = sim.run(bd, 5, watch=[plant,])  # simulate for 5s
  ```
  This requires fewer lines of code and the code is more readable. Importantly, it results in in *exactly the same* block diagram in terms of blocks and wires
  ```
  Wires::

  ┌───┬──────┬──────┬──────────────────────────────┬─────────┐
  │id │ from │  to  │         description          │  type   │
  ├───┼──────┼──────┼──────────────────────────────┼─────────┤
  │ 0 │ 1[0] │ 2[0] │ plant[0] --> scope.0[0]      │ float64 │
  │ 1 │ 0[0] │ 2[1] │ demand[0] --> scope.0[1]     │ int     │
  │ 2 │ 0[0] │ 3[0] │ demand[0] --> _sum.0[0]      │ int     │
  │ 3 │ 1[0] │ 3[1] │ plant[0] --> _sum.0[1]       │ float64 │
  │ 4 │ 3[0] │ 4[0] │ _sum.0[0] --> _gain.0(10)[0] │ float64 │
  │ 5 │ 4[0] │ 1[0] │ _gain.0(10)[0] --> plant[0]  │ float64 │
  └───┴──────┴──────┴──────────────────────────────┴─────────┘
  ```
  The implicitly created blocks have names prefixed with an underscore.



  ![block diagram](https://github.com/petercorke/bdsim/raw/master/figs/eg1-bdedit.png)

  `bdedit` is a multi-platform PyQt5-based graphical tool to create, edit, render and execute block diagram models.

  From the examples folder
  ```
  % bdedit eg1.bd
  ```
  will create a display like that shown above.  Pushing the run button, top left (triangle in circle) will spawn `bdrun` as a subprocess which will:

  * parse the JSON file
  * instantiate all blocks and wires
  * compile and run the diagram

  <a href="https://www.youtube.com/watch?v=1qM5D0jekjc"><img width=100 style="vertical-align:middle" src="https://cdn.mos.cms.futurecdn.net/8gzcr6RpGStvZFA2qRt4v6-1920-80.jpg.webp"> <span style="">Screencast showing bdedit usage.</span></a>




  I published [this article on LinkedIn](https://www.linkedin.com/pulse/journey-toward-open-source-block-diagram-simulation-peter-corke/?trackingId=wrJYinHUgAHDq63Nv65PnA%3D%3D), which describes the thought process behind bdsim.



  There are lots!  The biggest is that `bdsim` is based on a very standard variable-step integrator from the scipy library.  For discontinuous inputs (step, square wave, triangle wave, piecewise constant) the transitions get missed.  This also makes it inaccurate to simulate hybrid discrete-continuous time systems.  We really need a better integrator, perhaps [`odedc`](https://help.scilab.org/docs/6.1.0/en_US/odedc.html) from SciLab could be integrated.

rpm_license:
  MIT License  Copyright (c) 2020 Peter Corke  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: 17dc9405c8ea86ca071919874ac523c8943b8841525b1ab8ac906f3692e71b69
name: python-bdspackmanager
arch: src
version: 0.1.10
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/bdspackmanager/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdspackmanager-0.1.10-1.src.rpm
checksum_type: sha256
description:
  **BdsPackManager** is a command-line tool designed for managing resource and behavior packs on a Minecraft Bedrock Dedicated Server (BDS). It allows you to easily add, validate, and manage packs, ensuring that your server is always up-to-date with the latest content.



  - **Add Packs**: Supports adding `.mcpack`, `.mcaddon`, and directories containing valid `manifest.json` files.
  - **Automatic Unzipping**: Automatically extracts and processes `.mcpack` and `.mcaddon` files.
  - **Validation**: Ensures consistency between the packs listed in your server's configuration files and the actual content in the `resource_packs` and `behavior_packs` directories.
  - **Configurable**: Specify the server directory using command-line arguments, environment variables, or `.env` files.
  - **Interactive**: Prompts before overwriting existing packs to prevent accidental data loss.



  1. **Install via pip**:
      ```bash
      pip install bdspackmanager
      ```

  2. **Set up your environment**:
      - Optionally, create a `.env` file in the root directory to store your BDS directory path:
        ```
        BDS_DIRECTORY=/path/to/your/bedrock_server
        ```





  ```bash
  python -m bds_pack_manager.main [OPTIONS] PACKS...
  ```


  - `PACKS...`: One or more paths to `.mcpack`, `.mcaddon`, or directories containing a valid `manifest.json`.
  - `--bds-dir`: Specify the path to the Bedrock Dedicated Server directory (overrides `.env` and environment variable).
  - `--validate`: Validate and rescan JSON files for consistency with the actual content in the `resource_packs` and `behavior_packs` directories.



  1. **Adding a Pack**:
     ```bash
     python -m bds_pack_manager.main /path/to/your_pack.mcpack
     ```

  2. **Adding Multiple Packs**:
     ```bash
     python -m bds_pack_manager.main /path/to/your_pack_1.mcpack /path/to/your_pack_2.mcaddon /path/to/pack_directory
     ```

  3. **Validating Pack Consistency**:
     ```bash
     python -m bds_pack_manager.main --validate
     ```



  ```
  .
  ├── bds_pack_manager
  │   ├── __init__.py
  │   ├── main.py
  │   ├── pack_handler.py
  │   ├── manifest_parser.py
  │   ├── json_updater.py
  │   ├── utils.py
  ├── tests
  │   ├── test_pack_handler.py
  │   ├── test_manifest_parser.py
  │   ├── test_json_updater.py
  │   ├── test_utils.py
  ├── .env
  ├── requirements.txt
  └── README.md
  ```





  To run tests, use `pytest`:

  ```bash
  pytest
  ```



  Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.



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



  - Ensure that your Bedrock Dedicated Server is properly configured before using this tool.
  - Handle with care: Always back up your server before making significant changes.


pkgId: 44dcadd2d370c028d6b7737ae1d9cdaa0d3d3e7beae034e505c90d6bd39a8862
name: python-bdspackmanager
arch: src
version: 1.1.1
epoch: 0
release: 1
url: https://github.com/DJStompZone/bdspackmanager
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bdspackmanager-1.1.1-1.src.rpm
checksum_type: sha256
summary:
  Command-line tool designed for managing resource and behavior packs on a Minecraft Bedrock Dedicated Server (BDS)

description:
  BdsPackManager supports global configuration through the `~/.bdspackrc` file. This file behaves like `.env` and allows you to set environment variables for the tool. For example:
  ```bash
  BDS_DIRECTORY=/path/to/your/bedrock_server
  ```
  When present, `~/.bdspackrc` is automatically loaded and used as a fallback if a `.env` file is not found in the project directory. You can override these settings with command-line arguments.


pkgId: c9a215d6aa3248bbade866e0c4f4cfaf4283b88b8afc71bdf2e757e6b9009a8a
name: python-be-genai-workshop-short
arch: src
version: 0.1.2.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/be-genai-workshop-short/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-be-genai-workshop-short-0.1.2.0-1.src.rpm
checksum_type: sha256
description:
  Short workshop created in relation to a session during the BearingPoint Norway introductory week for new hires.

  [Lesson - Data Clearning with Generative AI](https://githubtocolab.com/bearingpoint-no/genAI-workshop-short/blob/main/lessons/01_Data_cleaning_with_genAI.ipynb)


pkgId: a27256b1e2abef1456e799880b0bc1be7fa45d42fcbd647540e0d1e1c263ec91
name: python-be-great
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: Generating Realistic Tabular Data using Large Language Models
url: https://github.com/kathrinse/be_great
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-be-great-0.0.8-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/be-great.svg)](https://badge.fury.io/py/be-great) [![Downloads](https://static.pepy.tech/badge/be-great)](https://pepy.tech/project/be-great)

  [//]: # (![Screenshot]&#40;https://github.com/kathrinse/be_great/blob/main/imgs/GReaT_logo.png&#41;)
  <p align="center">
  <img src="https://github.com/kathrinse/be_great/raw/main/imgs/GReaT_logo.png" width="326"/>
  </p>

  <p align="center">
  <strong>Generation of Realistic Tabular data</strong>
  <br> with pretrained Transformer-based language models
  </p>

  &nbsp;
  &nbsp;
  &nbsp;

  Our GReaT framework leverages the power of advanced pretrained Transformer language models to produce high-quality synthetic tabular data. Generate new data samples effortlessly with our user-friendly API in just a few lines of code. Please see our [publication](https://openreview.net/forum?id=cEygmQNOeI) for more details.



  The GReaT framework can be easily installed using with [pip](https://pypi.org/project/pip/) - requires a Python version >= 3.9:
  ```bash
  pip install be-great
  ```





  In the example below, we show how the GReaT approach is used to generate synthetic tabular data for the California Housing dataset.
  ```python
  from be_great import GReaT
  from sklearn.datasets import fetch_california_housing

  data = fetch_california_housing(as_frame=True).frame

  model = GReaT(llm='distilgpt2', batch_size=32,  epochs=50, fp16=True)
  model.fit(data)
  synthetic_data = model.sample(n_samples=100)
  ```

  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/kathrinse/be_great/blob/main/examples/GReaT_colab_example.ipynb)


  GReaT also features an interface to impute, i.e., fill in, missing values in arbitrary combinations. This requires a trained ``model``, for instance one obtained using the code snippet above, and a ```pd.DataFrame``` where missing values are set to NaN.
  A minimal example is provided below:
  ```python




  import numpy as np
  for clm in test_data.columns:
      test_data[clm]=test_data[clm].apply(lambda x: (x if np.random.rand() > 0.5 else np.nan))

  imputed_data = model.impute(test_data, max_length=200)
  ```


  GReaT provides methods for saving a model checkpoint (besides the checkpoints stored by the huggingface transformers Trainer) and loading the checkpoint again.
  ```python
  model = GReaT(llm='distilgpt2', batch_size=32,  epochs=50, fp16=True)
  model.fit(data)
  model.save("my_directory")  # saves a "model.pt" and a "config.json" file
  model = GReaT.load_from_dir("my_directory")  # loads the model again


  model.save("s3://my_bucket")
  model = GReaT.load_from_dir("s3://my_bucket")
  ```



  If you use GReaT, please link or cite our work:

  ``` bibtex
  @inproceedings{borisov2023language,
    title={Language Models are Realistic Tabular Data Generators},
    author={Vadim Borisov and Kathrin Sessler and Tobias Leemann and Martin Pawelczyk and Gjergji Kasneci},
    booktitle={The Eleventh International Conference on Learning Representations },
    year={2023},
    url={https://openreview.net/forum?id=cEygmQNOeI}
  }
  ```



  We sincerely thank the [HuggingFace](https://huggingface.co/) :hugs: framework.

rpm_license:
  MIT License  Copyright (c) 2022 Kathrin Seßler and Vadim Borisov  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: 7887378c5a7bc912ba996fbef7a668fce8feec827018dffce6e7b77515aecd3d
name: python-beacon2-import
arch: src
version: 2.2.4
epoch: 0
release: 1
summary: Seamlessly import and query all of the beacon protocol collections
url: https://pypi.org/project/beacon2-import/
rpm_license: CC-BY-NC-4.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beacon2-import-2.2.4-1.src.rpm
checksum_type: sha256
description:
  Beacon Import facilitates the seamless transfer of local genetic data to the Beacon database server, enhancing collaboration and knowledge sharing.
  Meanwhile, Beacon Query empowers users to efficiently explore the database for specific genetic information, including genes, sequences, variants,
  cnv, and genomic ranges. The search tools also search the phenopacket and other metadata b2ri collections (individuals, runs, datasets, biosamples,
  cohorts and analyses), catalyzing genomic research and clinical applications




  * Python 3.6 or newer. ([download instructions](https://www.python.org/downloads/))





  1. Install beacon2-import using pip3.

      ```bash
      sudo pip3 install beacon2-import
      ```

  1. Update beacon2-import, if needed, using pip3.

      ```bash
      pip3 install beacon2-import --upgrade
      ```

  1. Test your pip3 installation by running beacon2-import or beacon2-search.

      ```bash
      beacon2-import --help
      beacon2-search --help
      ```



  1. Install beacon2-import using conda.

      ```bash
      conda config --add channels bioconda
      conda config --add channels conda-forge
      conda install beacon2-import
      ```

  1. Update beacon2-import, if needed, using conda.

      ```bash
      conda update beacon2-import
      ```

  1. Test your conda installation by running beacon2-import or beacon2-search.

      ```bash
      beacon2-import --help
      beacon2-search --help
      ```




  ```bash
  usage: beacon2_import.py [-h] [-H DATABASE_HOST] [-P DATABASE_PORT] [-a]
                           [-A DATABASE_AUTH_CONFIG] [-g] [-u GALAXY_URL]
                           [-k GALAXY_KEY] [-d DATABASE] [-c COLLECTION]
                           [-i INPUT_JSON_FILE] [-s] [-o] [-D] [-V] [-ca] [-cc]
                           [-r REMOVED_COLL_NAME]

  Input arguments

  optional arguments:
    -h, --help            show this help message and exit

  Connection to MongoDB:
    -H DATABASE_HOST, --db-host DATABASE_HOST
                          Hostname/IP of the beacon database
    -P DATABASE_PORT, --db-port DATABASE_PORT
                          Port of the beacon database

  Addvanced Connection to MongoDB:
    -a, --advance-connection
                          Connect to beacon database with authentication
    -A DATABASE_AUTH_CONFIG, --db-auth-config DATABASE_AUTH_CONFIG
                          JSON file containing credentials/config e.g.{'db_auth_
                          source':'admin','db_user':'root','db_password':'exampl
                          e'}

  Connection to Galaxy:
    -g, --galaxy          Import data from Galaxy
    -u GALAXY_URL, --galaxy-url GALAXY_URL
                          Galaxy hostname or IP
    -k GALAXY_KEY, --galaxy-key GALAXY_KEY
                          API key of a galaxy user WITH ADMIN PRIVILEGES

  Database Configuration:
    -d DATABASE, --database  DATABASE
                          The targeted beacon database
    -c COLLECTION, --collection COLLECTION
                          The targeted beacon collection from the desired
                          database

  Import Json Arguments:
    -i INPUT_JSON_FILE, --input_json_file INPUT_JSON_FILE
                          Input the local path to the JSON file or it's name on
                          your Galaxy Hitory to import to beacon

  store origin:
    -s, --store-origins   Make a local file containing variantIDs with the
                          dataset they stem from
    -o , --origins-file   Full file path of where variant origins should be
                          stored (if enabled)

  control output:
    -D, --debug
    -V, --verbose         Be verbose

  Clear beacon database:
    -ca, --clearAll       Delete all data before the new import
    -cc, --clearColl      Delete specific collection before the new import
    -r REMOVED_COLL_NAME, --removeCollection REMOVED_COLL_NAME
                          Define the collection name for deletion

  ```







  ```bash
  usage: beacon2_search.py [-h]
                           {sequence,range,gene,bracket,analyses,biosamples,cohorts,datasets,individuals,runs,cnv}
                           ...

  Query Beacon Database

  positional arguments:
    {sequence,range,gene,bracket,analyses,biosamples,cohorts,datasets,individuals,runs,cnv}
      sequence            Connect to MongoDB and perform sequence-based querys
                          to the genomicVariations collection
      range               Connect to MongoDB and perform range-based querys to
                          the genomicVariations collection
      gene                Connect to MongoDB and perform geneID-based querys to
                          the genomicVariations collection
      bracket             Connect to MongoDB and perform bracket-based querys to
                          the genomicVariations collection
      analyses            Connect to MongoDB and query the analyses collection
      biosamples          Connect to MongoDB and query the biosample collection
      cohorts             Connect to MongoDB and query the cohorts collection
      datasets            Connect to MongoDB and query the datasets collection
      individuals         Connect to MongoDB and query the individuals
                          collection
      runs                Connect to MongoDB and query the runs collection
      cnv                 Connect to MongoDB and query the copy number variants
                          (cnv) collection

  optional arguments:
    -h, --help            show this help message and exit

  ```


  ```
      Beacon Query Tool

      This script provides a command-line interface for querying different collections in a Beacon Database using various sub-commands for sequence, range, gene ID, or bracket criteria.

      Example Usage:

      1. Query genomicVariations collection by sequence:
          beacon_search sequence -d database_name -c collection_name -rn reference_name -s start -ab alternate_bases

      2. Query genomicVariations collection by range:
          beacon_search range -d database_name -c collection_name -rn reference_name -s start -e end -v variant_type

      3. Query genomicVariations collection by gene ID:
          beacon_search gene -d database_name -c collection_name -g gene_id -vmin variant_min_length -vmax variant_max_length

      4. Query genomicVariations collection by bracket:
          beacon_search bracket -d database_name -c collection_name -rn reference_name -smin start_minimum -smax start_maximum -emin end_minimum -emax end_maximum -v variant_type

      5. Query analyses collection:
          beacon_search analyses -d database_name -c collection_name -al aligner -ad analysis_date -bi biosample_id -id identification -ii individual_id -pn pipeline_name -pr pipeline_ref -ri run_id -vc variant_caller

      6. Query biosamples collection:
          beacon_search biosamples -d database_name -c collection_name -bs biosample_status -cd collection_date -cm collection_moment -id identification -op obtention_procedure -so sample_origin_type

      7. Query cohorts collection:
          beacon_search cohorts -d database_name -c collection_name -ct cohort_data_types -cd cohort_design -cz cohort_size -t cohort_type -id identification -g genders -n name

      8. Query datasets collection:
          beacon_search datasets -d database_name -c collection_name -o ontology -om ontology_modifiers -id identification -n name

      9. Query individuals collection:
          beacon_search individuals -d database_name -c collection_name -g age_group -do disease_ontology -f family_history -se severity -st stage -e ethnicity -go geographic_origin -id identification -as assay_code -s sex

      10. Query runs collection:
          beacon_search runs -d database_name -c collection_name -id identification -ii individual_id -ll library_layout -ls library_selection -s library_source -st library_strategy -p platform -pm platform_model -r run_date

      11. Query for cnv:
          beacon_search cnv -d database_name -c collection_name -vi variantInternalId -ai analysisId -ii individualId -s start -e end -ch chromosome -g gene -vt variantType -p primarySite -dt diseaseType -si variantStateId -vs variantState -sd sequenceId
  ```


pkgId: 28fa6da6ae6d60917b82731fa6fa4ce801824b4f7614a8b83b9e705fcea16dd5
name: python-beacontools
arch: src
version: 2.1.0
epoch: 0
release: 1
summary: A Python library for working with various types of Bluetooth LE Beacons.
url: https://github.com/citruz/beacontools
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beacontools-2.1.0-1.src.rpm
checksum_type: sha256
description:
  |PyPI Package| |Build Status| |Coverage Status| |Requirements Status|
  A Python library for working with various types of Bluetooth LE Beacons.
  Currently supported types are:
  * `Eddystone Beacons <https://github.com/google/eddystone/>`__
  * `iBeacons <https://developer.apple.com/ibeacon/>`__ (Apple and Cypress CYALKIT-E02)
  * `Estimote Beacons (Telemetry and Nearable) <https://github.com/estimote/estimote-specs>`__
  * Control-J Monitor (temp/humidity/light)
  * `COVID-19 Exposure Notifications <https://www.apple.com/covid19/contacttracing>`__
  The BeaconTools library has two main components:
  * a parser to extract information from raw binary beacon advertisements
  * a scanner which scans for Bluetoth LE advertisements using bluez and can be configured to look only for specific beacons or packet types


pkgId: d83c79e95f7b17e3b58b9cb9a42aa4ebf766cec90aa1733eab65ee32eb3c2aac
name: python-beadify
arch: src
version: 0.0.4
epoch: 0
release: 1
url: https://github.com/CodeLexis/beadify-cli
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beadify-0.0.4-1.src.rpm
checksum_type: sha256
summary:
  A lightweight, efficient tool tailored for hobbyists looking to deploy multiple applications on a single Ubuntu-based VPS (Virtual Private Server)

description:
  1. [Pre-requisites](#pre-requisites)
     - [VPS](#vps)
     - [Local Machine](#local-machine)
  2. [Installation](#installation)
  3. [Usage](#usage)
     - [Commands Overview](#commands-overview)
     - [Workflow](#workflow)
       - [Initialize a Project](#initialize-a-project)
       - [Specify the Target Machine](#specify-the-target-machine)
       - [Deploy a Bead](#deploy-a-bead)
       - [Run a Bead](#run-a-bead)
       - [Apply SSL](#apply-ssl)
  4. [Examples](#examples)
     - [Initializing a Project](#1-initializing-a-project)
     - [Setting Up the Target Host](#2-setting-up-the-target-host)
     - [Deploying an Application](#3-deploying-an-application)
     - [Running the Application](#4-running-the-application)
     - [Setting Up HTTPS](#5-setting-up-https)
  5. [Setup](#setup)
  6. [Build](#build)
  7. [Run](#run)
     - [Source Mode](#source-mode)
     - [Packaged Mode](#packaged-mode)


pkgId: 98124ccd55b959910c3c44e09ad8b17bdee427c33aa6f4916179878308283cf2
name: python-beaker-gantry
arch: src
version: 1.8.4
epoch: 0
release: 1
url: https://pypi.org/project/beaker-gantry/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beaker-gantry-1.8.4-1.src.rpm
checksum_type: sha256
summary:
  Gantry streamlines running Python experiments in Beaker by managing containers and boilerplate for you

description:
  <div align="center">
  <br>
  <img src="https://raw.githubusercontent.com/allenai/beaker-py/main/docs/source/_static/beaker-500px-transparent.png" width="200"/>
  <br>
  <h1>Beaker Gantry</h1>
  <p>Gantry streamlines running Python experiments in <a href="https://beaker.org">Beaker</a> by managing containers and boilerplate for you</p>
  <hr/>
  <!-- TODO: Add badges once this is open source -->
  <a href="https://github.com/allenai/beaker-gantry/actions">
      <img alt="CI" src="https://github.com/allenai/beaker-gantry/workflows/Main/badge.svg?event=push&branch=main">
  </a>
  <a href="https://pypi.org/project/beaker-gantry/">
      <img alt="PyPI" src="https://img.shields.io/pypi/v/beaker-gantry">
  </a>
  <a href="https://github.com/allenai/beaker-gantry/blob/main/LICENSE">
      <img alt="License" src="https://img.shields.io/github/license/allenai/beaker-gantry.svg?color=blue&cachedrop">
  </a>
  <br/>
  </div>

  ⚡️*Easy to use*

  - **No Docker required!** 🚫 🐳
  - No writing YAML experiment specs.
  - Easy setup.
  - Simple CLI.

  🏎  *Fast*

  - Fire off Beaker experiments from your local computer instantly!
  - No local image build or upload.

  🪶 *Lightweight*

  - Pure Python (built on top of [beaker-py](https://github.com/allenai/beaker-py)).
  - Minimal dependencies.



  Gantry is for both new and seasoned Beaker users who need to run Python batch jobs (as opposed to interactive sessions) from a rapidly changing repository.
  Without Gantry, this workflow usually looks like this:

  1. Add a Dockerfile to your repository.
  2. Build the Docker image locally.
  3. Push the Docker image to Beaker.
  4. Write a YAML Beaker experiment spec that points to the image you just uploaded.
  5. Submit the experiment spec.
  6. Make changes and repeat from step 2.

  This requires experience with Docker, experience writing Beaker experiment specs, and a fast and reliable internet connection (a luxury that some of us don't have, especially in the WFH era 🙃).

  With Gantry, on the other hand, that same workflow simplifies down to this:

  1. Write a conda `environment.yml` file, or simply a PIP `requirements.txt` and/or `setup.py` file.
  2. Commit and push your changes.
  3. Submit and track a Beaker experiment with the `gantry run` command.
  4. Make changes and repeat from step 2.



  - 💾 **[Installing](#installing)**
  - 🚀 **[Quick start](#quick-start)**
  - 👓 **[Best practices](#best-practices)**
  - ❓ **[FAQ](#faq)**





  - [Savings results / metrics from an experiment](./examples/metrics)



  - [CHANGELOG](https://github.com/allenai/beaker-gantry/blob/main/CHANGELOG.md)
  - [CONTRIBUTING](https://github.com/allenai/beaker-gantry/blob/main/CONTRIBUTING.md)





  Gantry is available [on PyPI](https://pypi.org/project/gantry/). Just run

  ```bash
  pip install beaker-gantry
  ```



  To install Gantry from source, first clone [the repository](https://github.com/allenai/beaker-gantry):

  ```bash
  git clone https://github.com/allenai/beaker-gantry.git
  cd beaker-gantry
  ```

  Then run

  ```bash
  pip install -e .
  ```





  1. **Create and clone your repository.**

      If you haven't already done so, create a GitHub repository for your project and clone it locally.
      **Every `gantry` command you run must be invoked from the root directory of your repository.**

  2. **Configure Gantry.**

      If you've already configured the [Beaker command-line client](https://github.com/allenai/beaker/), Gantry will
      find and use the existing configuration file (usually located at `$HOME/.beaker/config.yml`).
      Otherwise just set the environment variable `BEAKER_TOKEN` to your Beaker [user token](https://beaker.org/user).

      The first time you call `gantry run ...` you'll also be prompted to provide a [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with the `repo` scope if your repository is not public. This allows Gantry to clone your private repository when it runs in Beaker. You don't have to do this just yet (Gantry will prompt you for it), but if you need to update this token later you can use the `gantry config set-gh-token` command.

  3. **Specify your Python environment.**

      Lastly - and this is the most important part - you'll have to create one of several different files that specify your Python environment. There are three options:

      1. A conda [`environment.yml`](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually) file.
      2. A [`setup.py`](https://docs.python.org/3/distutils/introduction.html#a-simple-example) file.
      3. A PIP [`requirements.txt`](https://pip.pypa.io/en/stable/user_guide/#requirements-files) file.

      The first method is [the recommended approach](#use-conda), especially if you're already using conda.
      But it's perfectly okay to use a combination of these different approaches as well.
      This can be useful when, for example, you need to [use a CUDA-enabled version of PyTorch on Beaker but a CPU-only version locally](#how-do-i-use-a-cuda-enabled-version-of-pytorch-on-beaker-when-im-using-a-cpu-only-version-locally).



  Let's spin up a Beaker experiment that just prints "Hello, World!" from Python.

  First make sure you've committed *and* pushed all changes so far in your repository.
  Then (from the root of your repository) run:

  ```bash
  gantry run --workspace {WORKSPACE} --cluster {CLUSTER} -- python -c 'print("Hello, World!")'
  ```

  Just replace `{WORKSPACE}` with the name of your own Beaker workspace and `{CLUSTER}` with the name of the Beaker cluster you want to run on.

  *❗Note: Everything after the `--` is the command + arguments you want to run on Beaker. It's necessary to include the `--` if any of your arguments look like options themselves (like `-c` in this example) so gantry can differentiate them from its own options.*

  Try `gantry run --help` to see all of the available options.





  Your [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) (PAT) only needs to have the `repo` scope and should have a short expiration time (e.g. 30 days).
  This limits the harm a bad actor could cause if they were able to read your PAT from your Beaker workspace somehow.



  Adding a [conda environment file](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually) will generally make your exact Python environment easier to reproduce, especially when you have platform-dependent requirements like PyTorch.
  You don't necessarily need to write the `environment.yml` file manually either.
  If you've already initialized a conda environment locally, you can just run:

  ```bash
  conda env export --from-history
  ```

  See [Exporting an Environment File Across Platforms](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#exporting-an-environment-file-across-platforms) for more details.

  It's also okay to [use a combination of conda environment and PIP requirements files](#can-i-use-both-conda-environment-and-pip-requirements-files).





  You sure can! Just set the `--beaker-image` or `--docker-image` flag.

  Gantry can use any image that has bash installed. This can be useful when you have dependencies that take a long time to download and build (like PyTorch).

  In this case it works best if you build your image with a conda environment that already has your big dependencies installed. Then when you call `gantry run`, use the `--venv` option to tell Gantry to use that environment instead of creating a new conda environment in the container. You may also want to add a `requirements.txt` file to your repository that lists all of your dependencies (including PyTorch and anything else already installed in your image's conda environment) so Gantry can make sure the environment on the image is up-to-date when it runs.

  For example, you could use one of our [pre-built PyTorch images](https://beaker.org/ws/ai2/fab/images?text=pytorch&sort=created:descending), such as [`ai2/pytorch1.11.0-cuda11.3-python3.9`](https://beaker.org/im/01G3S1CBQ0K832MCFDA77XQXFJ/details), like this:

  ```bash
  gantry run \
      --beaker-image 'ai2/pytorch1.11.0-cuda11.3-python3.9' \
      --venv 'base' \
      --pip requirements.txt \
      -- python -c 'print("Hello, World!")'
  ```



  Absolutely! This was the main use-case Gantry was developed for. Just set the `--gpus` option for `gantry run` to the number of GPUs you need.
  You should also ensure that the way in which you specify your Python environment (e.g. conda `environment.yml`, `setup.py`, or PIP `requirements.txt` file) will lead to your dependencies being properly installed to support
  the GPU hardware specific to the cluster you're running on.

  For example, if one of your dependencies is [PyTorch](https://pytorch.org/), you're probably best off writing a conda `environment.yml` file since conda is the preferred way to install PyTorch.
  You'll generally want to use the latest supported CUDA version, so in this case your `environment.yml` file could look like this:

  ```yaml
  name: torch-env
  channels:
  - pytorch
  dependencies:
  - python=3.9
  - cudatoolkit=11.3
  - numpy
  - pytorch
  - ...
  ```



  Yes you can. Gantry will initialize your environment using your conda environment file (if you have one)
  and then will also check for a PIP requirements file.




  One way to handle this would be to start with a `requirements.txt` that lists the `torch` version you need along with any other dependencies, e.g.

  ```

  torch==1.11.0
  ...
  ```

  Then add a conda `environment.yml` somewhere in your repository that specifies exactly how to install PyTorch (and a CUDA toolkit) on Beaker, e.g.:

  ```yaml

  name: torch-env
  channels:
  - pytorch
  dependencies:
  - python=3.9
  - cudatoolkit=11.3
  - pytorch==1.11.0  # make sure this matches the version in requirements.txt
  ```

  When you call `gantry run`, use the `--conda` flag to specify the path to your conda env file (e.g. `--conda beaker/environment.yml`).
  Gantry will use that env file to initialize the environment, and then will install the rest of your dependencies from the `requirements.txt` file.



  By default Gantry uses the `/results` directory on the image as the location of the results dataset.
  That means that everything your experiment writes to this directory will be persisted as a Beaker dataset when the experiment finalizes.
  And you can also create Beaker metrics for your experiment by writing a JSON file called `metrics.json` in the `/results` directory.



  Yes. When you choose an on-premise cluster managed by the Beaker team that supports the NFS drive it will be automatically attached to the experiment's container.



  You can use the `--dry-run` option with `gantry run` to see what Gantry will submit without actually submitting an experiment.
  You can also use `--save-spec PATH` in combination with `--dry-run` to save the actual experiment spec to a YAML file.



  Just use the command `gantry config set-gh-token`.



  Just use the `--dataset` option for `gantry run`. For example:

  ```bash
  gantry run --dataset 'petew/squad-train:/input-data' -- ls /input-data
  ```



  The three options `--replicas` (int), `--leader-selection` (flag), and `--host-networking` (flag) used together give you the ability to run distributed batch jobs. See the [Beaker docs](https://beaker-docs.apps.allenai.org/distributed-training.html#batch-jobs) for more information.



  A gantry is a structure that's used, among other things, to lift containers off of ships. Analogously Beaker Gantry's purpose is to lift Docker containers (or at least the *management* of Docker containers) away from users.

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


pkgId: 6284e94a0b74acb45e65d8469ff2ca5eea97545b09fe2059c229a929b9945c4a
name: python-beaker-py
arch: src
version: 1.32.0
epoch: 0
release: 1
summary: A Python Beaker client
url: https://github.com/allenai/beaker-py
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beaker-py-1.32.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
  <br>
  <img src="https://raw.githubusercontent.com/allenai/beaker-py/main/docs/source/_static/beaker-500px-transparent.png" width="200"/>
  <br>
  <br>
  <h1>beaker-py</h1>
  <p>A lightweight, standalone, pure Python client for <a href="https://beaker.org">Beaker</a></p>
  <hr/>
  <a href="https://github.com/allenai/beaker-py/actions">
      <img alt="CI" src="https://github.com/allenai/beaker-py/workflows/Main/badge.svg?event=push&branch=main">
  </a>
  <a href="https://pypi.org/project/beaker-py/">
      <img alt="PyPI" src="https://img.shields.io/pypi/v/beaker-py">
  </a>
  <a href="https://beaker-py.readthedocs.io/en/latest/">
      <img src="https://readthedocs.org/projects/beaker-py/badge/?version=latest" alt="Documentation Status" />
  </a>
  <a href="https://github.com/allenai/beaker-py/blob/main/LICENSE">
      <img alt="License" src="https://img.shields.io/github/license/allenai/beaker-py.svg?color=blue&cachedrop">
  </a>
  <br/>
  </div>



  <!-- start features -->

  🪶 *Lightweight*

  - Minimal dependencies.
  - Only pure-Python dependencies.
  - Communicates directly with the Beaker server via HTTP requests (Beaker CLI not required).

  💪 *Robust*

  - Automatically retries failed HTTP requests with exponential backoff.
  - Runtime data validation.
  - High test coverage.

  📓 *Exhaustively-typed and documented*

  - Thorough data model for all input / output types.
  - Every expected HTTP error from the Beaker server is translated into a specific exception type.

  <!-- end features -->



  - [Documentation](https://beaker-py.readthedocs.io/)
  - [PyPI package](https://pypi.org/project/beaker-py/)
  - [Contributing](https://github.com/allenai/beaker-py/blob/main/CONTRIBUTING.md)
  - [License](https://github.com/allenai/beaker-py/blob/main/LICENSE)

  *See also 👇*

  - [Beaker (CLI)](https://github.com/allenai/beaker)
  - [Beaker Gantry](https://github.com/allenai/beaker-gantry)
  - Beaker-relevant *GitHub Actions*
    - [setup-beaker](https://github.com/marketplace/actions/setup-beaker)
    - [beaker-command](https://github.com/marketplace/actions/beaker-command)
    - [beaker-run](https://github.com/marketplace/actions/beaker-run)





  **beaker-py** is available [on PyPI](https://pypi.org/project/beaker-py/). Just run

  ```bash
  pip install beaker-py
  ```



  To install **beaker-py** from source, first clone [the repository](https://github.com/allenai/beaker-py):

  ```bash
  git clone https://github.com/allenai/beaker-py.git
  cd beaker-py
  ```

  Then run

  ```bash
  pip install -e .
  ```



  <!-- start quickstart -->

  If you've already configured the [Beaker command-line client](https://github.com/allenai/beaker/), **beaker-py** will
  find and use the existing configuration file (usually located at `$HOME/.beaker/config.yml`).
  Otherwise just set the environment variable `BEAKER_TOKEN` to your Beaker [user token](https://beaker.org/user).

  Either way, you should then instantiate the Beaker client with `.from_env()`:

  ```python
  from beaker import Beaker

  beaker = Beaker.from_env(default_workspace="my_org/my_workspace")
  ```

  The API of **beaker-py** is meant to mirror - as closely as possible - the API of the Beaker CLI.
  For example, when you do this with the CLI:

  ```bash
  beaker dataset create --name foo .
  ```

  The **beaker-py** equivalent would be:

  ```python
  beaker.dataset.create("foo", ".")
  ```
  <!-- end quickstart -->

  See the [API Docs](https://beaker-py.readthedocs.io/en/latest/overview.html) to learn about the Beaker client's methods.

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


pkgId: e4a02d38ef89e182a52d8a95b77174551f46757326fed6dc7c45ad2543d39e2a
name: python-beam-postgres
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Light IO transforms for Postgres read/write in Apache Beam pipelines.
url: https://github.com/medzin/beam-postgres
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beam-postgres-0.5.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/beam-postgres.svg)][pypi-project]
  [![Supported Versions](https://img.shields.io/pypi/pyversions/beam-postgres.svg)][pypi-project]

  Light IO transforms for Postgres read/write in Apache Beam pipelines.



  The project aims to provide highly performant and customizable transforms and is
  not intended to support many different SQL database engines.



  - `ReadAllFromPostgres`, `ReadFromPostgres`` and `WriteToPostgres` transforms
  - Records can be mapped to tuples, dictionaries or dataclasses
  - Reads and writes are in configurable batches



  Printing data from the database table:

  ```python
  import apache_beam as beam
  from psycopg.rows import dict_row

  from beam_postgres.io import ReadAllFromPostgres

  with beam.Pipeline() as p:
      data = p | "Reading example records from database" >> ReadAllFromPostgres(
          "host=localhost dbname=examples user=postgres password=postgres",
          "select id, data from source",
          dict_row,
      )
      data | "Writing to stdout" >> beam.Map(print)

  ```

  Writing data to the database table:

  ```python
  from dataclasses import dataclass

  import apache_beam as beam
  from apache_beam.options.pipeline_options import PipelineOptions

  from beam_postgres.io import WriteToPostgres


  @dataclass
  class Example:
      data: str


  with beam.Pipeline(options=PipelineOptions()) as p:
      data = p | "Reading example records" >> beam.Create(
          [
              Example("example1"),
              Example("example2"),
          ]
      )
      data | "Writing example records to database" >> WriteToPostgres(
          "host=localhost dbname=examples user=postgres password=postgres",
          "insert into sink (data) values (s)",
      )

  ```

  See [here][examples] for more examples.



  There may be situations when you have so much data that it will not fit into the
  memory - then you want to read your table data in batches. You can see an
  example code [here](examples/read.py#L11) (the code reads records in a batches of
  1).

  [pypi-project]: https://pypi.org/project/beam-postgres
  [examples]: https://github.com/medzin/beam-postgres/tree/main/examples


pkgId: a1062949ebb8101106fd6975d11803dcb7fc335026b5bb9d5da9482cf3f8b4a9
name: python-beam-postgres-connector
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: An io connector for PostgreSQL read/write in Apache Beam pipelines.
url: https://github.com/satokiyo/beam-postgres-connector
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beam-postgres-connector-0.1.3-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/beam-postgres-connector.svg)][pypi-project]
  [![Supported Versions](https://img.shields.io/pypi/pyversions/beam-postgres-connector.svg)][pypi-project]
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  Beam - Postgres Connector provides an io connector for PostgreSQL read/write in [Apache Beam](https://beam.apache.org/) pipelines.



  ```bash
  pip install beam-postgres-connector
  ```



  - Read From PostgreSQL

  ```Python
  import apache_beam as beam
  from beam_postgres import splitters
  from beam_postgres.io import ReadFromPostgres

  with beam.Pipeline(options=options) as p:
      read_from_postgres = ReadFromPostgres(
              query="SELECT * FROM test_db.test.test;",
              host="localhost",
              database="test_db",
              user="test",
              password="test",
              port=5432,
              splitter=splitters.NoSplitter()  # you can select how to split query for performance
      )


      (
          p
          | "ReadFromPostgres" >> read_from_postgres
          | "WriteToStdout" >> beam.Map(print)
      )
  ```

  - Write To Postgres

  ```Python
  import apache_beam as beam
  from beam_postgres.io import WriteToPostgres


  with beam.Pipeline(options=options) as p:
      write_to_postgres = WriteToPostgres(
              host="localhost",
              database="test_db",
              table="test.test",
              user="test",
              password="test",
              port=5432,
              batch_size=1000,
      )

      (
          p
          | "ReadFromInMemory"
          >> beam.Create(
              [
                  {
                      "name": "test data",
                  }
              ]
          )
          | "WriteToPostgres" >> write_to_postgres
      )
  ```

  See [here][examples] for more examples.



  - NoSplitter

    Do not split the query

  - QuerySplitter

    Split the query by a specified separator string and distribute it for parallel processing across multiple nodes. Specify non-overlapping ranges for each query in the WHERE clause. The processing results will be combined using UNION ALL.



  MIT License.

  [pypi-project]: https://pypi.org/project/beam-postgres-connector
  [examples]: https://github.com/satokiyo/beam-postgres-connector/tree/main/examples


pkgId: 880b4e66eda2091b386a4049f666975fd97eb0bf7b89d22358d3448caa325145
name: python-beam-up
arch: src
version: 1.0.41
epoch: 0
release: 1
summary: A simple yet powerful static site generator aimed at product pages (not blogs).
url: https://github.com/adewes/beam
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beam-up-1.0.41-1.src.rpm
checksum_type: sha256
description:
  A simple yet powerful static site generator for Python.

  Templates (HTML, Markdown, ...) go in, pages come out.


pkgId: 5c4c46001f54b46e8d0c9350be5b7836029349cff22b1cec2f364a6817354f5a
name: python-beamas
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Beam Analysis Software
url: https://pypi.org/project/beamas/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beamas-1.0.0-1.src.rpm
checksum_type: sha256
description:
  Welcome to BeamAS, a powerful Python library designed for efficient beam analysis using advanced meshless methods. With BeamAS, users can effortlessly apply complex calculations and simulations without the need for traditional mesh generation. Our Python library provides a user-friendly interface, enabling students, engineers and researchers to explore the behavior of beams under various types of loading with ease and accuracy. Whether you're working on structural analysis, educational projects, or research, BeamAS equips you with the tools to elevate your work to the next level. Dive in and discover the future of beam structural analysis !
  Visit our website for the complete user guide.


pkgId: 078edfb7718e9fcbf5def433c4bef2a1f3af0741724d807234b7eb74d8528752
name: python-beambusters
arch: src
version: 2.1.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/beambusters/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beambusters-2.1.0-1.src.rpm
checksum_type: sha256
description:
  Application developed to refine the detector center of still diffraction patterns for serial crystallography experiments.

  Beambusters uses the methods implemented in bblib to calculate the detector center shift of each diffraction pattern, according to your initial detector geometry.

  Python 3.10


  pip install beambusters



  Example:
  beambusters run_centering /path/to/list/file /path/to/config/file

  The config file is a *.yaml file, you can find examples in the doc folder.



  Author: Ana Carolina Rodrigues (2021 - 2024)

  Email: sc.anarodrigues@gmail.com


pkgId: 99ec4a30e060823179946efd2eed9b42c89208ca82d6ec51df8ff34a2e1b79d1
name: python-beamer-slider
arch: src
version: 0.1.26.11
epoch: 0
release: 1
summary: Software to create inkscape overlays in Beamer
url: https://lab.compute.dtu.dk/tuhe/slider
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beamer-slider-0.1.26.11-1.src.rpm
checksum_type: sha256
description:
  Slide overlay software based on beamer and inkscape. This project is currently used in DTU coursebox.

  You can find a self-contained video guide here:
   - Youtube link: https://youtu.be/EoNZMX3QOnU
   - Gitlab link to example: https://gitlab.compute.dtu.dk/tuhe/slider/-/blob/main/examples/video/index.pdf


  Slider allows you to combine free-hand drawing with a standard LaTeX beamer slideshow. It allows you to insert a special `\osvg{label}` tag in your beamer slides:
  ```latex
  \begin{frame}\osvg{label}
  Various standard latex stuff
  \end{frame}
  ```
  Then by running the `slider` command (see below) this will automatically create a transparent `.svg` file placed "above" the LaTeX contents
  which allows you to do free-hand drawing. While you could do this manually, slider has the advantage it maintains the **LaTeX** contents as a non-editable background layer in the `.svg` file so you can do absolute positioning etc. Naturally, you can insert new `\osvg` tags (and keep them updated) at any point by just running the `slider` command.


  Simple pip-install the package and you should be all set.
  ```terminal
  pip install beamer-slider
  ```
  You can import the package using `import slider`.



  Go to an empty directory where you want to start a slideshow and run the command:
  ```terminal
  python -m slider index.tex
  ```
  This will start a small beamer project and populate it with the (few) necesary files to make the framework work. You can see the
  generated files in the `/examples/new_project` folder. The main `LaTeX` file looks like this:
  ```latex

  \documentclass[aspectratio=43]{beamer}
  \usepackage{etoolbox}
  \newtoggle{overlabel_includesvgs}
  \newtoggle{overlabel_includelabels}
  \toggletrue{overlabel_includesvgs}
  \toggletrue{overlabel_includelabels}
  \input{beamer_slider_preamble.tex}

  \title{Example slide show}
  \author{Tue Herlau}
  \begin{document}
  \begin{frame}
  \maketitle
  \end{frame}

  \begin{frame}\osvg{myoverlay} % Use the \osvg{labelname} - tag to create new overlays. Run slider and check the ./osvgs directory for the svg files!
  \title{Slide with an overlay}
  This is some example text!
  \end{frame}

  \end{document}

  ```
  And the generated PDF file looks like this:

  ![alt text|small](https://gitlab.compute.dtu.dk/tuhe/slider/-/raw/main/docs/new_project_nup.png)

  Don't worry about the label in the upper-left corner: you can just turn it off with the LaTeX switch.

  Next, go to the `osvgs` folder. It will contain an image called `myoverlay.svg` (remember this was our label name).
  ![alt text|small](https://gitlab.compute.dtu.dk/tuhe/slider/-/raw/main/docs/inkscape.png)

  At the start, this file contains all the LaTeX contents as editable `svg` contents which we can move around (for instance by rotating the text), and we can add
  free-hand drawings to the slide. The bottom layer of the image will always be a non-editable layer containing the **actual** LaTeX content of the slide (in this case the logo and text). You can use this for reference when you edit. When you are happy, simply save the file and re-run
  ```terminal
  python -m slider index.tex
  ```
  (it will automatically try to detect the `index.tex` if run without arguments). This will keep all layers up to date, flatten fonts and generally just make sure everything is okay.
  You can find the output in the `examples/basic1` folder and the `pdf` file will now look as follows:

  ![alt text|small](https://gitlab.compute.dtu.dk/tuhe/slider/-/raw/main/docs/basic1_nup.png)

  Thats is! And since this is an overlay, you are free to add more LaTeX to the slide or contents to the `svg` and as long as you run `slider`, the `.svg` images will be kept up to date.


  - You can add new overlays at any point by inserting a '\osvg{my_label}' command in your LaTeX document
  - Overlay-images with multiple layers are automatically converted into '\pause'-frames in LaTeX



  ```bibtex
  @online{beamer_slider,
  	title={Beamer-slider (0.1.7): \texttt{pip install beamer-slider}},
  	url={https://lab.compute.dtu.dk/tuhe/slider},
  	urldate = {2021-09-08},
  	month={9},
  	publisher={Technical University of Denmark (DTU)},
  	author={Tue Herlau},
  	year={2021},
  }
  ```


pkgId: c99226229e3596ed5a1fd8ebe1f76465592e76d65383e50e522122a6e1ef2ecd
name: python-beamline
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: Online model package for electron accelerator
url: http://archman.github.io/beamline/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beamline-2.0.0-1.src.rpm
checksum_type: sha256
description:
  Accelerator online model and lattice visualization package developed by Python.
  Developing language: *Python 2.7 and 3.x*
  As of release 2.0.0, Python 3.x is supported, 1.x.y supports Python 2.7.
  **Main Features:**
  +  Parsing elegant (electron accelerator tracking code) lattice file (.lte) to be
     python dict or json string for further operations.
  +  Modeling accelerator magnetic elements, such as dipole, quadrupole, drift, etc. to be python
     objects, from EPICS control environment to OOP level.
  +  Support unit conversion between EPICS PV raw value and the physical real value of elements.
  +  Modeling lattice beamline from modeled elements, constructing Lattice instance,
     dumping .lte file for code tracking.
  +  Feeding defined elements with new configuration, interfacing with EPICS environment, to form
     the close-loop online system.
  +  Visualizing the lattice layout by predefined elements' style.
  +  Friendly native-look GUI application to facilitate these functionalities.


pkgId: 0a73179f83ef24282765ae8f3fde3bea5475e737bf805bf2b8909bd58bd95f6f
name: python-beamshapy
arch: src
version: 0.1.13
epoch: 0
release: 1
summary: a package for simulations of laser beam shaping experiments
url: https://pypi.org/project/beamshapy/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beamshapy-0.1.13-1.src.rpm
checksum_type: sha256
description:
  Beamshapy is a Python-based module designed for crafting laser beam shaping masks for use on phase-only Spatial Light Modulators (SLM). It leverages Fast Fourier Transform (FFT) propagation and relies on the Lightpipes package for its core functionality.



  Beamshapy provides two primary methods for mask design:

  1. **Manual Design**:
     - Craft appropriate masks for a targeted profile using the method described in *Encoding amplitude information onto phase-only filters*, JA Davis, 1999 [Read the article](https://doi.org/10.1364/AO.38.005004)
     - Suitable for controlling amplitude and phase in the conjugate Fourier plane.

  2. **Gerchberg and Saxton Algorithm**:
     - Design masks when only the intensity profile is important.
     - Optimizes the phase mask to achieve the targeted intensity in the conjugate Fourier plane.



  Beamshapy includes several examples to demonstrate its capabilities:

  - `example_simple_FT_propagation.py`: Simple propagation with a wrapped wedge displayed on the SLM.
  - `example_mask_design_BG_modul.py`: Mask design and propagation, used to design the masks featured in the associated article.
  - `example_mask_design_fresnel.py`: Mask design for a Fresnel lens.
  - `example_mask_design_GSA.py`: Target intensity design and Gerchberg and Saxton optimization routine to obtain the phase mask for the targeted intensity in the conjugate Fourier plane.

  For a practical application of Beamshapy, refer to our article: *Selective excitation of high-order modes in two-dimensional cavity resonator integrated grating filters*, A. Rouxel et al, 2024. [Read the article](https://doi.org/10.1364/OL.519472)



  To install `beamshapy`, follow these steps:

  1. **Clone the repository from GitHub**:

     ```bash
     git clone https://github.com/a-rouxel/beamshapy.git
     cd beamshapy
     ```

  2. **Create a dedicated Python environment using Miniconda**:
     If you don't have Miniconda installed, follow the instructions [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html).

     ```bash
     
     conda create -n beamshapy python=3.9

     
     conda activate beamshapy
     ```

  3. **Install the necessary Python packages**:
     The required packages are listed in the `requirements.txt` file in the repository.

     ```bash
     
     pip install -r requirements.txt
     ```



  Beamshapy is open-source and available under the [MIT License](LICENSE).



  Contributions are welcome! Please feel free to submit issues, fork the repository, and send pull requests.



  For any questions or feedback, please contact the repository owner at [arouxel@laas.fr](mailto:arouxel@laas.fr).


pkgId: feb303d11cd2f4965b5e7da5bbc77e91712302f35b269a6b394deaf3ca064a2a
name: python-beancount
arch: src
version: 3.0.0
epoch: 0
release: 1
summary: Command-line Double-Entry Accounting
url: https://beancount.github.io/
rpm_license: GPL-2.0-only
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beancount-3.0.0-1.src.rpm
checksum_type: sha256
description:
  A double-entry accounting system that uses text files as input.

  Beancount defines a simple data format or "language" that lets you
  define financial transaction records in a text file, load them in
  memory and generate and export a variety of reports, such as balance
  sheets or income statements. It also provides a client with an
  SQL-like query language to filter and aggregate financial data, and a
  web interface which renders those reports to HTML. Finally, it
  provides the scaffolding required to automate the conversion of
  external data into one's input file in Beancount syntax.


pkgId: 55d6c82691050b5b1216afaf06057581a64b475cda7b2c9340bff56173cf9aa7
name: python-beancount-dkb
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Beancount Importer for DKB CSV exports
url: https://github.com/siddhantgoel/beancount-dkb
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beancount-dkb-1.4.0-1.src.rpm
checksum_type: sha256
description:
  [![image](https://img.shields.io/pypi/v/beancount-dkb.svg)](https://pypi.python.org/pypi/beancount-dkb)
  [![image](https://img.shields.io/pypi/pyversions/beancount-dkb.svg)](https://pypi.python.org/pypi/beancount-dkb)
  [![Downloads](https://static.pepy.tech/badge/beancount-dkb)](https://pepy.tech/project/beancount-dkb)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

  `beancount-dkb` provides importers for converting CSV exports of [DKB] (Deutsche
  Kreditbank) account summaries to the [Beancount] format.



  ```sh
  $ pip install beancount-dkb
  ```

  In case you prefer installing from the Github repository, please note that `main` is the
  development branch so `stable` is what you should be installing from.

  Note that v1.x will *only* work with Beancount 3.x, while v0.x will *only* work with
  Beancount 2.x, due to incompatibilities between Beancount 3.x and 2.x.



  If you're not familiar with how to import external data into Beancount, please read
  [this guide] first.



  Beancount 3.x has replaced the `config.py` file based workflow in favor of having a
  script based workflow, as per the [changes documented here]. As a result, the importer's
  initialization parameters have been shifted to `pyproject.toml`.

  Add the following to your `pyproject.toml` in your project root.

  ```toml
  [tool.beancount-dkb.ec]
  iban = "DE99 9999 9999 9999 9999 99"
  account_name = "Assets:DKB:EC"
  currency = "EUR"

  [tool.beancount-dkb.credit]
  card_number = "9999 9999 9999 9999"
  account_name = "Assets:DKB:Credit"
  currency = "EUR"
  ```

  Run `beancount-dkb-ec` or `beancount-dkb-credit` to call the importer. The `identify`
  and `extract` subcommands would identify the file and extract transactions for you.

  ```sh
  $ beancount-dkb-ec extract transaction.csv >> you.beancount
  $ beancount-dkb-credit extract transaction.csv >> you.beancount
  ```



  Adjust your [config file] to include `ECImporter` and `CreditImporter`
  (depending on what account you're trying to import).

  Add the following to your `config.py`.

  ```python
  from beancount_dkb import ECImporter, CreditImporter

  IBAN_NUMBER = 'DE99 9999 9999 9999 9999 99' # your real IBAN number

  CARD_NUMBER = '9999 9999 9999 9999'         # your real Credit Card number

  CONFIG = [
      ECImporter(
          IBAN_NUMBER,
          'Assets:DKB:EC',
          currency='EUR',
      ),

      CreditImporter(
          CARD_NUMBER,
          'Assets:DKB:Credit',
          currency='EUR',
      )
  ]
  ```

  Once this is in place, you should be able to run `bean-extract` on the command
  line to extract the transactions and pipe all of them into your Beancount file.

  ```sh
  $ bean-extract /path/to/config.py transaction.csv >> you.beancount
  ```



  By default, the ECImporter prepends the transaction code ("Buchungstext") to the
  transaction description. To achieve shorter descriptions and use meta tags to query for
  certain transaction codes, the importer may be configured to store the transaction code
  in a user provided meta tag.

  Add the `meta_code` parameter to the `ECImporter` initializer.



  ```toml
  [tool.beancount-dkb.ec]
  iban = "DE99 9999 9999 9999 9999 99"
  account_name = "Assets:DKB:EC"
  meta_code = "code"
  ```



  ```python
  ...
  CONFIG = [
      ECImporter(
          IBAN_NUMBER,
          'Assets:DKB:EC',
          currency='EUR',
          meta_code='code',
      ),
  ...

  ```

  This is how an example transaction looks without the option:

  ```beancount
  2021-03-01 * "Kartenzahlung" "XY Supermarket"
      Assets:DKB:EC                        -133.72 EUR
  ```

  And this is the resulting transaction using `meta_code='code'`

  ```beancount
  2021-03-01 * "XY Supermarket"
      code: Kartenzahlung
      Assets:DKB:EC                        -133.72 EUR
  ```



  It's possible to give the importer classes hints if you'd like them to include a
  second posting based on specific characteristics of the original transaction.

  For instance, if the payee or the description in a transaction always matches a
  certain value, it's possible to tell the `ECImporter` or `CreditImporter` to
  automatically place a second posting in the returned lits of transactions.



  `ECImporter` accepts `payee_patterns` and `description_patterns` arguments, which should
  be a list of `(pattern, account)` tuples.



  ```toml
  [tool.beancount-dkb.ec]
  iban = "DE99 9999 9999 9999 9999 99"
  account_name = "Assets:DKB:EC"
  payee_patterns = [
      ["REWE", "Expenses:Supermarket:REWE"],
      ["NETFLIX", "Expenses:Online:Netflix"],
  ]
  ```



  ```python
  CONFIG = [
      ECImporter(
          IBAN_NUMBER,
          'Assets:DKB:EC',
          currency='EUR',
          payee_patterns=[
              ('REWE', 'Expenses:Supermarket:REWE'),
              ('NETFLIX', 'Expenses:Online:Netflix'),
          ],
      ),
  ```



  `CreditImporter` accepts a `description_patterns` argument, which should be a list of
  `(pattern, account)` tuples.



  ```toml
  [tool.beancount-dkb.credit]
  card_number = "9999 9999 9999 9999"
  account_name = "Assets:DKB:Credit"
  currency = "EUR"
  description_patterns=[
      ['REWE', 'Expenses:Supermarket:REWE'],
      ['NETFLIX', 'Expenses:Online:Netflix'],
  ]
  ```



  ```python
  CONFIG = [
      CreditImporter(
          CARD_NUMBER,
          'Assets:DKB:Credit',
          currency='EUR',
          description_patterns=[
              ('REWE', 'Expenses:Supermarket:REWE'),
              ('NETFLIX', 'Expenses:Online:Netflix'),
          ],
      )
  ```



  Contributions are most welcome!

  Please make sure you have Python 3.8+ and [Poetry] installed.

  1. Clone the repository: `git clone https://github.com/siddhantgoel/beancount-dkb`
  2. Install the packages required for development: `poetry install`
  3. That's basically it. You should now be able to run the test suite: `poetry run task test`.

  [Beancount]: http://furius.ca/beancount/
  [DKB]: https://www.dkb.de
  [Poetry]: https://python-poetry.org/
  [changes documented here]: https://docs.google.com/document/d/1O42HgYQBQEna6YpobTqszSgTGnbRX7RdjmzR2xumfjs/edit#heading=h.hjzt0c6v8pfs
  [config file]: https://beancount.github.io/docs/importing_external_data.html#configuration
  [this guide]: https://beancount.github.io/docs/importing_external_data.html


pkgId: d7d1cbe732bcb804427852e8fe10db71e748d96b42d9d1a873c862caf86b7ceb
name: python-beancount-hangseng
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Parse Hang Seng eStatements to Beancount/CSV
url: https://github.com/yiufung/beancount-hangseng
rpm_license: GNU General Public License v3 (GPLv3)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beancount-hangseng-0.4.0-1.src.rpm
checksum_type: sha256
description:
  >  "Therefore I say unto you, Take no thought for your life, what ye shall eat,
  >  or what ye shall drink; nor yet for your body, what ye shall put on. Is not
  >  the life more than meat, and the body than raiment?" -- Matthew 6:25


pkgId: 4f5a55190361d4b22a8ea655e1628cdb89285992ce3a1f24a703f882460a09f1
name: python-beancount-hypothesis
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: A package which provides hypothesis strategies for generating beancount types
url: https://github.com/jmgilman/beancount-hypothesis
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beancount-hypothesis-0.1.1-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <a href="https://github.com/jmgilman/beancount-hypothesis/actions/workflows/ci.yml">
          <img src="https://github.com/jmgilman/beancount-hypothesis/actions/workflows/ci.yml/badge.svg"/>
      </a>
      <a href="https://pypi.org/project/beancount-hypothesis">
          <img src="https://img.shields.io/pypi/v/beancount-hypothesis"/>
      </a>
  </p>

  > A package which provides hypothesis strategies for generating beancount types.



  Strategies are provided for all of the core types present in `beancount`. The
  below example generates a random list of directives:

  ```python
  import beancount_hypothesis as h
  from hypothesis import given, strategies as s

  @given(
      s.recursive(
          h.balance()
          | h.close()
          | h.commodity()
          | h.custom()
          | h.document()
          | h.event()
          | h.note()
          | h.open()
          | h.query()
          | h.pad()
          | h.price()
          | h.transaction(),
          s.lists,
          max_leaves=5,
      )
  )
  ```

  Most of the types have restrictions placed on them with the following
  philosophy:

  * The value shouldn't break the `beancount` package
  * The value should be somewhat authentic (i.e. resemble user data)

  Note that the input generated from the strategies is not intended to be passed
  to any beancount functions. In other words, passing the above example to the
  loader will result in undefined behavior as it doesn't follow any sensible
  rules.



  ```shell
  tox
  ```

  While testing a package meant for tests seems slightly redundant, there are
  some custom compositions present that benefit from testing. In most cases the
  tests just assert that generating data doesn't raise any exceptions (i.e. break
  `beancount` in some way).



  Check out the [issues][1] for items needing attention or submit your own and
  then:

  1. [Fork the repo][2]
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

  [1]: https://github.com/jmgilman/beancount-hypothesis/issues
  [2]: https://github.com/jmgilman/beancount-hypothesis/fork


pkgId: 3a45ff594548b339d8f938dcc5d96aa21f7f0d644509fc48fb8358ff935482eb
name: python-beancount-interpolate
arch: src
version: 2.5.0
epoch: 0
release: 1
summary: Plugins for Beancount to interpolate transactions
url: https://github.com/Akuukis/beancount_interpolate
rpm_license: GNU GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beancount-interpolate-2.5.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/beancount_interpolate)](https://pypi.org/project/packages/beancount_interpolate/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/beancount_interpolate)](https://pypistats.org/packages/beancount-interpolate)
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/beancount_interpolate)
  ![PyPI - License](https://img.shields.io/pypi/l/beancount_interpolate)
  Four plugins for double-entry accounting system Beancount to interpolate transactions by generating additional entries over time.
  They are:
  - `recur`: dublicates all entry postings over time
  - `split`: dublicates all entry postings over time at fraction of value
  - `depr`: generates new entries to depreciate target asset/liability posting over given period
  - `spread`: generate new entries to allocate P&L of target income/expense posting over given period
  These plugins are triggered by adding metadata or tags to source entries. It's safe to disable at any time. All plugins share the same parser that can set maximal period, custom starting date and minimal step by either number or keyword.
  You can use these to define recurring transactions, account for depreciation, smooth transactions over time and make graphs less zig-zag.
  > This `depr` is not yet compatible with any accounting standards. For tax-compatible yearly depreciation take a look at this [plugin](https://bitbucket.org/snippets/happyalu/EAMgj/beancount-automated-depreciation-plugin) by Alok Parlikar under MIT license. All contributions to improve `depr` are welcome.


pkgId: 6b750a5cd517af4929fd1465c201a3a2be1a6ab6d8e0ed4ef71ec4d494c9c296
name: python-beancount-periodic
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: Beancount plugin to generate periodic transactions #Amortize #Depreciate #Recur
url: https://github.com/dallaslu/beancount-periodic
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beancount-periodic-0.1.3-1.src.rpm
checksum_type: sha256
description:
  ```python
  pip3 install beancount-periodic
  ```



  `main.bean`
  ```
  plugin "beancount_periodic.recur"
  ```

  ```beancount
  2022-03-31 * "Provider" "Net Fee"
    recur: "1 Year /Monthly"
    Liababilies:CreditCard:0001    -50 USD
    Expenses:Home:CommunicationFee
  ```

  Then this plugin will transform the transaction into:

  ```beancount
  2022-03-31 * "Provider" "Net Fee Recurring(1/12)"
    Liababilies:CreditCard:0001    -50 USD
    Expenses:Home:CommunicationFee

  2022-04-30 * "Provider" "Net Fee Recurring(2/12)"
    Liababilies:CreditCard:0001    -50 USD
    Expenses:Home:CommunicationFee

  2022-05-31 * "Provider" "Net Fee Recurring(3/12)"
    Liababilies:CreditCard:0001    -50 USD
    Expenses:Home:CommunicationFee

  ;...

  2023-02-28 * "Provider" "Net Fee Recurring(12/12)"
    Liababilies:CreditCard:0001    -50 USD
    Expenses:Home:CommunicationFee
  ```



  `main.bean`
  ```
  plugin "beancount_periodic.amortize"
  ```

  ```beancount
  2022-03-31 * "Landlord" "2022-04 Rent"
    Liababilies:CreditCard:0001    -12000 USD
    Expenses:Home:Rent
      amortize: "1 Year @2022-04-01 /Monthly"
  ```

  Then this plugin will transform the transaction into:

  ```beancount
  2022-03-31 * "Landlord" "2022-04 Rent"
    Liababilies:CreditCard:0001    -12000 USD
    Equity:Amortization:Home:Rent
      amortize: "1 Year @2022-04-01 /Monthly"

  2022-04-01 * "Landlord" "2022-04 Rent Amortized(1/12)"
    Equity:Amortization:Home:Rent    -1000 USD
    Expenses:Home:CommunicationFee

  2022-05-01 * "Landlord" "2022-04 Rent Amortized(2/12)"
    Equity:Amortization:Home:Rent    -1000 USD
    Expenses:Home:CommunicationFee

  2022-06-01 * "Landlord" "2022-04 Rent Amortized(3/12)"
    Equity:Amortization:Home:Rent    -1000 USD
    Expenses:Home:CommunicationFee

  ;...

  2023-03-01 * "Landlord" "2022-04 Rent Amortized(12/12)"
    Equity:Amortization:Home:Rent    -1000 USD
    Expenses:Home:CommunicationFee
  ```



  `main.bean`
  ```
  plugin "beancount_periodic.depreciate"
  ```

  ```beancount
  2022-03-31 * "Tesla" "Model X"
    Liababilies:CreditCard:0001    -200000 USD
    Assets:Car:ModelX
      depreciate: "5 Year /Yearly =80000"
  ```

  Then this plugin will transform the transaction into:

  ```beancount
  2022-03-31 * "Tesla" "Model X"
    Liababilies:CreditCard:0001    -200000 USD
    Assets:Car:ModelX
      depreciate: "5 Year /Yearly =80000"


  2022-03-31 * "Tesla" "Model X Depreciated(1/5)"
    Assets:Car:ModelX    -24000 USD
    Expenses:Depreciation:Car:ModelX

  2023-03-31 * "Tesla" "Model X Depreciated(2/5)"
    Assets:Car:ModelX    -24000 USD
    Expenses:Depreciation:Car:ModelX
  ;...

  2026-03-31 * "Tesla" "Model X Depreciated(5/5)"
    Assets:Car:ModelX    -24000 USD
    Expenses:Depreciation:Car:ModelX
  ```

  At last, the balance of the account `Assets:Car:ModelX` is 80000 USD.

  To change the depreciation expense account, add the `depreciate_account` meta to the `open` statement of the depreciated asset account:
  ```beancount
  1900-01-01 open Assets:Car:ModelX  EUR
    depreciate_account: "Expenses:Car:Value"

  2022-03-31 * "Tesla" "Model X"
    Liababilies:CreditCard:0001    -200000 USD
    Assets:Car:ModelX
      depreciate: "5 Year /Yearly =80000"


  ; generated transation
  2022-03-31 * "Tesla" "Model X Depreciated(1/5)"
    Assets:Car:ModelX    -24000 USD
    Expenses:Car:Value

  ; ...
  ```



  All settings follow the same rules. These are some examples:

  ```
  "200000- 5 Years @2022-03-31 /Yearly *line =80000"
  "200000- @2022-03-31~2027-03-30 /Year *line =80000"
  "200000 - 5 Year @2022-03-31 /1 Year *line =80000"
  "200000 - 5 Y @2022-03-31 /12 Months =80000"
  "5Y @ 2022-03-31 / 12M = 80000"
  "5Y / 12M =80000"
  "5Y / 12M"
  ```



  `200000-` means that the total value is `200000`.

  The default value of total is same as the account of posting if missing.



  `5 Years` means the duration is 5 years, and `@2022-03-31` means the first transformed transaction will start at 2022-03-31.

  `5 Years @2022-03-31` is same as `@2022-03-31~2027-03-30`. You can also use `Day` and others.

  ```
  "6 Months @2022-03-31"
  "6 M @2022-03-31"
  "5 Y @2022-03-31"
  ```

  And the start date is optional, using the entry date as default value if missing.

  ```
  "6 Months"
  ```

  The default value of duration is 1 month if missing.



  `Yearly` means one transformed transaction per year. You can also use `Daily`, `Monthly`, `Day` and others.

  If step string ends with `!` means that the amount of every step will be calculated with real days. For example:

  ```beancount
  2022-01-01 *
    Liababilies:CreditCard:0001    -365 USD
    Expenses:BlaBla
      amortize: "1 Year /Monthly!"
  ```

  Then this plugin will transform the transaction into:

  ```beancount
  2022-01-01 *
    Liababilies:CreditCard:0001    -365 USD
    Expenses:BlaBla
      amortize: "1 Year /Monthly!"

  2022-01-01 * "Amortized(1/12)"
    Equity:Amortization:BlaBla    -31 USD
    Expenses:BlaBla

  2022-02-01 * "Amortized(2/12)"
    Equity:Amortization:BlaBla    -28 USD
    Expenses:BlaBla

  2022-03-01 * "Amortized(3/12)"
    Equity:Amortization:BlaBla    -31 USD
    Expenses:BlaBla

  ;...

  2022-12-01 * "Amortized(12/12)"
    Equity:Amortization:BlaBla    -31 USD
    Expenses:BlaBla
  ```

  The default value of step is 1 day if missing.



  `*line` means that the formula is `line`. You can also use `linear`, `straight`, `line`, `load`, `work-load`, `accelerated-sum`, `sum`, `accelerated-declining`.

  The default value of formula is `line`.



  `=80000` means that the salvage value is 80000.

  The default value of salvage value is 0 if missing.


pkgId: c30cf425f83200c1aa2ee1029f9be830179107bb01bd71d39ed060b42403a570
name: python-beancount-reds-importers
arch: src
version: 0.9.0
epoch: 0
release: 1
summary: Importers for various institutions for Beancount
url: https://github.com/redstreet/beancount_reds_importers
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beancount-reds-importers-0.9.0-1.src.rpm
checksum_type: sha256
description:
  Simple importers and tools for [Beancount](https://beancount.github.io/), software for
  [plain text](https://plaintextaccounting.org/), double entry bookkeeping. _More
  importantly, a framework to allow you to easily write your own importers._



  This is a reference implementation of the principles expressed in
  **[The Five Minute Ledger Update](https://reds-rants.netlify.app/personal-finance/the-five-minute-ledger-update/).**

  Importers can be ugly and painful to write, yet are important in automating the grunt
  work out of maintaining personal finance software. The philosophy is to make writing
  sustainable, dependable importers easy. To achieve this, the design separates importers
  in to three parts:

  1. file format reader (reusable)
  2. transaction builder (reusable)
  3. institution-specific declarations and code (minimal, institution specific) <- _The
     only one you have to write_

  This design helps move most of the heavy-lifting common code into (1) and (2) above.
  Writing new importers is made easier since one only has to write code to address the
  institution-specific formatting and quirks for each bank/brokerage. See working examples
  of an [ofx based](https://github.com/redstreet/beancount_reds_importers/blob/main/beancount_reds_importers/importers/citi/__init__.py)
  and [csv](https://github.com/redstreet/beancount_reds_importers/blob/main/beancount_reds_importers/importers/schwab/schwab_csv_brokerage.py)
  based importers.



  File format readers included are:
  - `.ofx`
  - `.csv` (single and multitable support)
  - `.xlsx` (single and multitable support) (`pip3 install xlrd` if you plan to use this)

  Transaction builders included are:
  - Banking (for banks and credit cards, which benefit from a postings predictor like
    [smart_importer](https://github.com/beancount/smart_importer)).
  - Investments/brokerages (to handle the very many distinct cases of investment related
    transactions).
  - Paychecks (to handle paychecks, which typically contain very many mostly
    pre-determined postings in a single entry).

  [Input in `.ofx` format (over `.csv`) is preferred](https://reds-rants.netlify.app/personal-finance/a-word-about-input-formats-use-ofx-when-you-can/),
  when provided by the institution, as it minimizes data and coding errors, eliminates
  format breaking changes in .csv files, and typically includes balances that are used to
  generate balance assertions, and commodity prices.

  See [here](https://github.com/redstreet/beancount_reds_importers/tree/main/beancount_reds_importers)
  for a list of institutions built-in. More investment, credit card, and banking
  institutions will be added in the future. Contributions welcome.


  These commands are installed as a part of the pip installation:

  - `ofx-summarize`: Quick and dirty way to summarize a .ofx file, and peek inside it
  - `bean-download`: [Download account statements automatically](https://reds-rants.netlify.app/personal-finance/direct-downloads/)
    (for supporting institutions), from your configuration of accounts. Multi-threaded.
    - `bean-download needs-update` is a configurable utility that shows you the last time
      each account was updated, based on the latest balance assertion in your journal. See
      [this article](https://reds-rants.netlify.app/personal-finance/how-up-to-date-are-my-accounts/)
      for more.

  The commands include shell auto-completion (tab-to-complete) via
  [click](https://click.palletsprojects.com/en/8.1.x/shell-completion/). `bean-download`, in
  particular, can complete the account or account groups you want to download, which can
  be handy. To enable it in zsh, do
  ([see here for other shells](https://click.palletsprojects.com/en/8.1.x/shell-completion/)):

  ```
  mkdir -p ~/.zcomplete
  _OFX_SUMMARIZE_COMPLETE=zsh_source ofx-summarize > ~/.zcomplete/ofx-summarize-complete.zsh
  _BEAN_DOWNLOAD_COMPLETE=zsh_source bean-download > ~/.zcomplete/bean-download-complete.zsh


  for f in ~/.zcomplete/*; do source $f; done
  ```


  - supports [Beancount](https://github.com/beancount/beancount) output via `bean-extract`
    - should be easy to extend to ledger/hledger, etc. (contributions welcome)
  - automatically generates [balance assertions](https://reds-rants.netlify.app/personal-finance/automating-balance-assertions/)
  - support for:
    - investment accounts (brokerages including retirement accounts)
      - handles sweep funds, money market funds, and all standard brokerage transactions
    - banking and credit card
    - paychecks
  - file format independent (ofx, csv, xlsx supported out of the box; single and
    multitable for csv and xlsx; write your own reusable handler if needed)
  - supports commodity-leaf accounts
  - see [The Five Minute Ledger Update](https://reds-rants.netlify.app/personal-finance/the-five-minute-ledger-update/)
    for automating downloads via `ofxclient`, connecting to `smart_importer` to
    auto-classify transactions, and more



  ```
  pip3 install beancount-reds-importers
  ```

  Or to install the bleeding edge version from git:
  ```
  pip3 install git+https://github.com/redstreet/beancount_reds_importers
  ```





  1. `cd <your pip installed dir>/example #eg: cd ~/.local/lib/python3.8/site-packages/beancount_reds_importers/example`
  2. `./import.sh OfxDownload.qfx` # Imports investments
  3. `./import.sh transactions.qfx` # Import bank transactions; uses smart_importer to classify transactions



  1. Create your own my.import. An example my.import is provided. At the least, include your account numbers
  2. Include fund information. Copy the included `fund_info.py` to start with.
  3. You can now run `bean-identify`, `bean-extract`, etc. See the included script: Run `./import.sh <your_input_ofx>`
  4. If identifier/cusip/isin info is missing, the importer will let you know. Add it to your
     `fund_info.py` See
     [this article](https://reds-rants.netlify.app/personal-finance/tickers-and-identifiers/)
     for automating and managing identifier info


  Choices for the date of the generated balance assertion can be specified as a key in
  the importer config, `balance_assertion_date_type`, which can be set to:
  - `smart`:            smart date (default; see below)
  - `ofx_date`:         date specified in ofx file
  - `last_transaction`: max transaction date
  - `today`:            today's date

  If you want something else, simply override this method in individual importer

  `smart` dates: Banks and credit cards typically have pending transactions that are not
  included in downloads. When we download the next statement, new transactions may appear
  prior to the balance assertion date that we generate for this statement, which renders
  this balance assertion invalid. This problem manifests occasionally as an existing
  balance statement breaking  when a new statement is downloaded and is an annoyance as it
  needs manual fixing.

  To minimize this, we set the balance assertion date to either two days (fudge factor to
  account for pending transactions) before the statement's end date or the last
  transaction's date, whichever is later. To choose a different fudge factor, simply set
  `balance_assertion_date_fudge` in your config.




  Depending on the institution, the `payee` and `narration` fields in generated
  transactions may appear to be switched. This is described by
  [libtransactionbuilder/banking.py](https://github.com/redstreet/beancount_reds_importers/blob/main/beancount_reds_importers/libtransactionbuilder/banking.py),
  and the fields can be swapped in a `custom_init`.


  First:
  ```
  pip3 install xlrd
  ```

  Some importers are tested with
  [regression_pytest.py](https://github.com/beancount/beancount/blob/v2/beancount/ingest/regression_pytest.py).
  Run `pytest --generate` then `pytest`.

  Anonymized data to increase regression test coverage is most welcome. Please submit a
  PR if you can. See [here](beancount_reds_importers/importers/schwab/tests/schwab_csv_checking)
  for an example to follow.


  More broadly I run tests across hundreds of actual ofx and csv files, against reference
  outputs that I know to be correct from my personal file. However, I'm unable to share
  them since these are personal. Testing against real world files is best, so I recommend
  you do this with your own input files.


  Feel free to post questions/concerns in the [Beancount groups](https://groups.google.com/forum/#!forum/beancount)
  or on [The Five Minute Ledger Update](https://reds-rants.netlify.app/personal-finance/the-five-minute-ledger-update/)
  site. For bugs, open an issue here on Github.



  Features, fixes, and improvements welcome. New importers for institutions with test
  input files appreciated. Sharing importers helps the community! Remember:
  - Feel free to send send pull requests. Please include unit tests
  - For larger changes or changes that might need discussion, please reach out and discuss
    first to save time (open an issue)
  - Please squash your commits (reasonably)
  - Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages

  Thank you for contributing!


pkgId: 746a100cd20dd70624ad91b79b1de1310a6f3e201bbd4996900d12828f918970
name: python-beangulp
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Importers Framework for Beancount
url: https://pypi.org/project/beangulp/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beangulp-0.1.1-1.src.rpm
checksum_type: sha256
description:
  ``beangulp`` provides a framework for importing transactions into a
  Beancoount ledger from account statements and other documents and for
  managing documents.
  ``beangulp`` is compatible with both Beancount 2.3 and the unreleased
  Beancount 3.0. ``beangup`` is the evolution of ``beancount.ingest`` in
  Beancount 2.3 and replaces it in the upcoming Beancount 3.0 release.
  Documentation is available in form of code docstrings and
  `examples`__.  The `documentation`__ for ``beancount.ingest`` provided
  a good introduction and is still partially relevant to ``beangulp``.
  The rest of the Beancount deocumentation can be found `here`__.
  __ https://github.com/beancount/beangulp/tree/master/examples/
  __ https://beancount.github.io/docs/importing_external_data.html
  __ https://beancount.github.io/docs/

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


pkgId: a389a53e50cbc37e94e201a8185dca4713773b0260f3c56f421e75b267325058
name: python-beanhub-cli
arch: src
version: 1.4.1
epoch: 0
release: 1
summary: Command line tools for BeanHub
url: https://pypi.org/project/beanhub-cli/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanhub-cli-1.4.1-1.src.rpm
checksum_type: sha256
description:
  Command line tools for BeanHub or Beancount users.

  Please read the [documentation here](https://beanhub-cli-docs.beanhub.io).



  - **Local BeanHub Form web app** - You can run a [BeanHub Form](https://beanhub.io/blog/2023/07/31/automating-beancount-data-input-with-beanhub-custom-forms/) web app locally to try out your forms
  - **Import** - Simple yet powerful [beanhub-import](https://github.com/LaunchPlatform/beanhub-import) allows you to define importing rules in YAML to extract transactions from CSV files and generate Beancount transactions automatically
  - **Formatter** - Advanced Beancount file formatter based on top of [beancount-black](https://github.com/LaunchPlatform/beancount-black)
  - **Basic Beancount file manipulations** - Effortless Beancount account name renaming and other basic manipulations (coming soon)
  - **Doesn't require a BeanHub account** - While some features in the future will require a BeanHub repository to operate, but we make most of them usable even without a BeanHub account



  <p align="center">
    <img src="https://github.com/LaunchPlatform/beanhub-cli/raw/master/assets/forms-screenshot.png?raw=true" alt="BeanHub Forms Screenshot" />
  </p>



  <p align="center">
    <a href="https://beanhub.io"><img src="https://github.com/LaunchPlatform/beanhub-cli/raw/master/assets/beanhub.svg?raw=true" alt="BeanHub logo" /></a>
  </p>

  A modern accounting book service based on the most popular open source version control system [Git](https://git-scm.com/) and text-based double entry accounting book software [Beancount](https://beancount.github.io/docs/index.html).


pkgId: 3560b503fd7eddeab1b5f61e040a3ecbd21c16ffd5d1dcfe53abe029114f7f99
name: python-beanhub-cli
arch: src
version: 1.4.2
epoch: 0
release: 1
summary: Command line tools for BeanHub
url: https://pypi.org/project/beanhub-cli/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanhub-cli-1.4.2-1.src.rpm
checksum_type: sha256
description:
  Command line tools for BeanHub or Beancount users.

  Please read the [documentation here](https://beanhub-cli-docs.beanhub.io).



  - **Local BeanHub Form web app** - You can run a [BeanHub Form](https://beanhub.io/blog/2023/07/31/automating-beancount-data-input-with-beanhub-custom-forms/) web app locally to try out your forms
  - **Import** - Simple yet powerful [beanhub-import](https://github.com/LaunchPlatform/beanhub-import) allows you to define importing rules in YAML to extract transactions from CSV files and generate Beancount transactions automatically
  - **Formatter** - Advanced Beancount file formatter based on top of [beancount-black](https://github.com/LaunchPlatform/beancount-black)
  - **Basic Beancount file manipulations** - Effortless Beancount account name renaming and other basic manipulations
  - **Doesn't require a BeanHub account** - While some features in the future will require a BeanHub repository to operate, but we make most of them usable even without a BeanHub account



  <p align="center">
    <img src="https://github.com/LaunchPlatform/beanhub-cli/raw/master/assets/forms-screenshot.png?raw=true" alt="BeanHub Forms Screenshot" />
  </p>



  <p align="center">
    <a href="https://beanhub.io"><img src="https://github.com/LaunchPlatform/beanhub-cli/raw/master/assets/beanhub.svg?raw=true" alt="BeanHub logo" /></a>
  </p>

  A modern accounting book service based on the most popular open source version control system [Git](https://git-scm.com/) and text-based double entry accounting book software [Beancount](https://beancount.github.io/docs/index.html).


pkgId: 337ad070b5d2bd31995756989151c88ec32a7b57eb3ba02195bdb12f98449afe
name: python-beanhub-import
arch: src
version: 1.0.3
epoch: 0
release: 1
url: https://pypi.org/project/beanhub-import/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanhub-import-1.0.3-1.src.rpm
checksum_type: sha256
summary:
  The simple library for import extracted transactions provided by beanhub-extract and generate corresponding Beancount transactions based on predefined rules

description:
  Beanhub-import is a simple, declarative, smart, and easy-to-use library for importing extracted transactions from [beanhub-extract](https://github.com/LaunchPlatform/beanhub-extract).
  It generates Beancount transactions based on predefined rules.

  Read the [documentations here](https://beanhub-import-docs.beanhub.io/).

  **Note**: This project is still in early stage, still subject to rapid major changes

  Please also checkout our blog posts about the BeanHub Import and BeanHub Connect features based on this tool:
  - [BeanHub Import - One small step closer to fully automating transaction importing](https://beanhub.io/blog/2024/05/27/introduction-of-beanhub-import/)
  - [BeanHub Connect - one giant leap with fully automatic bank transactions import from 12,000+ financial institutions in 17 countries for all Beancount users!](https://beanhub.io/blog/2024/06/24/introduction-of-beanhub-connect/)



  - **Easy-to-use** - you only need to know a little bit about YAML and Jinja2 template syntax.
  - **Simple declarative rules** - A single import file for all imports
  - **Idempotent** - As long as the input data and rules are the same, the Beancount files will be the same.
  - **Auto-update existing transactions** - When you update the rules or data, corresponding Beancount transactions will be updated automatically.
  - **Auto-move transactions to a different file** - When you change the rules to output the transactions to a different file, it will automatically remove the old ones and add the new ones for you
  - **Merge data from multiple files (coming soon)** - You can define rules to match transactions from multiple sources for generating your transactions

  For example, change the import rules like this to output transactions to files grouped by quarter instead of year:

  <p align="center">
    <img src="https://github.com/LaunchPlatform/beanhub-import/raw/master/assets/quater-output-file.png?raw=true" alt="Git diff screenshot showing default_file changed to output quater file names instead of just year" />
  </p>

  Then run the import again, and you will get this:

  <p align="center">
    <img src="https://github.com/LaunchPlatform/beanhub-import/raw/master/assets/auto-txn-migration.png?raw=true" alt="Git diff screenshot showing Beancount transactions removed from the books/2024.bean file and new quater beancount files added" />
  </p>

  Another example is when you want to add new tags to the generated transactions, so you change the rules with new tags like this:

  <p align="center">
    <img src="https://github.com/LaunchPlatform/beanhub-import/raw/master/assets/new-tags.png?raw=true" alt="Git diff screenshot showing new line" />
  </p>

  When you run import again, you will get this:

  <p align="center">
    <img src="https://github.com/LaunchPlatform/beanhub-import/raw/master/assets/new-tags-result.png?raw=true" alt="Git diff screenshot showing new tags added to all imported Beancount transactions" />
  </p>

  Please check out our demonstration repository [beanhub-import-demo](https://github.com/LaunchPlatform/beanhub-import-demo) to try it yourself.

  It's all declarative and idempotent. With beanhub-import, you say goodbye to manually importing and maintaining transactions!
  We hope you like this tool. It's still in the early stage of development.
  We are also working on making generating transactions from multiple sources possible.
  Please feel free to open issues in the repository if you have any feedback 🙌



  There are countless Beancount importer projects out there, so why do we have to build a new one from the ground up?
  We are building a new one with a completely new design because we cannot find an importer that meets our requirements for [BeanHub](https://beanhub.io).
  There are a few critical problems we saw in the existing Beancount importers:

  - Need to write Python code to make it work
  - Doesn't handle duplication problem
  - Hard to reuse because extracting logic is coupled with generating logic
  - Hard to customize for our own needs
  - Can only handle a single source file



  The rules of beanhub-import is defined in YAML format at `.beanhub/imports.yaml`. Here's an example

  ```YAML


  context:
    routine_expenses:
      "Amazon Web Services":
        account: Expenses:Engineering:Servers:AWS
      Netlify:
        account: Expenses:Engineering:ServiceSubscription
      Mailchimp:
        account: Expenses:Marketing:ServiceSubscription
      Circleci:
        account: Expenses:Engineering:ServiceSubscription
      Adobe:
        account: Expenses:Design:ServiceSubscription
      Digital Ocean:
        account: Expenses:Engineering:ServiceSubscription
      Microsoft:
        account: Expenses:Office:Supplies:SoftwareAsService
        narration: "Microsoft 365 Apps for Business Subscription"
      Mercury IO Cashback:
        account: Expenses:CreditCardCashback
        narration: "Mercury IO Cashback"
      WeWork:
        account: Expenses:Office
        narration: "Virtual mailing address service fee from WeWork"




  inputs:
    - match: "import-data/mercury/*.csv"
      config:
        
        extractor: mercury
        
        default_file: "books/{{ date.year }}.bean"
        
        prepend_postings:
          - account: Assets:Bank:US:Mercury
            amount:
              number: "{{ amount }}"
              currency: "{{ currency | default('USD', true) }}"



  imports:
    - name: Routine expenses
      match:
        extractor:
          equals: "mercury"
        desc:
          one_of:
            - Amazon Web Services
            - Netlify
            - Mailchimp
            - Circleci
            - WeWork
            - Adobe
            - Digital Ocean
            - Microsoft
            - Mercury IO Cashback
      actions:
        
        - file: "books/{{ date.year }}.bean"
          txn:
            narration: "{{ routine_expenses[desc].narration | default(desc, true) | default(bank_desc, true) }}"
            postings:
              - account: "{{ routine_expenses[desc].account }}"
                amount:
                  number: "{{ -amount }}"
                  currency: "{{ currency | default('USD', true) }}"

    
    
    - name: Routine Wells Fargo expenses
      
      common_cond:
        extractor:
          equals: "plaid"
        file:
          suffix: "(.+)/Wells Fargo/(.+).csv"
      match:
        - cond:
            desc: "Comcast"
          vars:
            account: Expenses:Internet:Comcast
            narration: "Comcast internet fee"
        - cond:
            desc: "PG&E"
          vars:
            account: Expenses:Gas:PGE
            narration: "PG&E Gas"
      actions:
        
        - file: "books/{{ date.year }}.bean"
          txn:
            payee: "{{ payee | default(omit, true) }}"
            narration: "{{ narration | default(desc, true) | default(bank_desc, true) }}"
            postings:
              - account: "{{ account }}"
                amount:
                  number: "{{ -amount }}"
                  currency: "{{ currency | default('USD', true) }}"

    - name: Receive payments from contracting client
      match:
        extractor:
          equals: "mercury"
        desc:
          equals: Evil Corp
      actions:
        - txn:
            narration: "Receive payment from Evil Corp"
            postings:
              - account: "Assets:AccountsReceivable:EvilCorpContracting"
                amount:
                  number: "{{ -amount / 300 }}"
                  currency: "EVIL.WORK_HOUR"
                price:
                  number: "300.0"
                  currency: "USD"

    - name: Ignore unused entries
      match:
        extractor:
          equals: "mercury"
        desc:
          one_of:
          - Mercury Credit
          - Mercury Checking xx1234
      actions:
        
        
        - type: ignore

  ```



  This project is a library and not meant for end-users.
  If you simply want to import transactions from CSV into their beancount files, please checkout the `import` command of [beanhub-cli](https://github.com/LaunchPlatform/beanhub-cli).


pkgId: 4e96ab9331768d9a8d9997b5d230fa994a14b769269d9e9ad74f42d6bd50b296
name: python-beanie
arch: src
version: 1.26.0
epoch: 0
release: 1
summary: Asynchronous Python ODM for MongoDB
url: https://pypi.org/project/beanie/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanie-1.26.0-1.src.rpm
checksum_type: sha256
description:
  Supported by [JetBrains](https://jb.gg/OpenSource)
  [![JetBrains](https://raw.githubusercontent.com/roman-right/beanie/main/assets/logo/jetbrains.svg)](https://jb.gg/OpenSource)


pkgId: 26c20fa28771fe181d02cdf28ddd84817cbb7ac2fc9fe8f76ed0b3e48fb35817
name: python-beanie_batteries_queue
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Advanced queue system for MongoDB with Beanie ODM
url: https://pypi.org/project/beanie_batteries_queue/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanie_batteries_queue-0.4.0-1.src.rpm
checksum_type: sha256
description:
  Task Queue is an advanced queue system for Beanie (MongoDB), designed to efficiently manage and process tasks. It features task priorities, states, dependencies, and automatic expiration. Different task queues can be processed together using the Worker class. Multiple workers can be run in separate processes using the Runner class.



  ```shell
  pip install beanie[queue]
  ```



  ```python
  from beanie_batteries_queue import Task, Runner

  class ExampleTask(Task):
      data: str

      async def run(self):
          self.data = self.data.upper()
          await self.save()

  runner = Runner(task_classes=[ExampleTask])
  runner.start()
  ```





  ```python
  from beanie_batteries_queue import Task


  class SimpleTask(Task):
      s: str
  ```



  ```python
  from beanie_batteries_queue import State


  task = SimpleTask(s="test")
  await task.push()


  async for task in SimpleTask.queue():
      assert task.s == "test"
      
      await task.finish()
      break


  task = await SimpleTask.find_one({"s": "test"})
  assert task.state == State.FINISHED
  ```

  Async generator `SimpleTask.queue()` will return all unfinished tasks in the order they were created or based on the
  priority if it was specified. It is an infinite loop, so you can use `break` to stop it.

  You can also use `SimpleTask.pop()` to get the next task from the queue.

  ```python
  from beanie_batteries_queue import State


  task = SimpleTask(s="test")
  await task.push()


  task = await SimpleTask.pop()
  assert task.s == "test"

  await task.finish()
  ```



  There are three priority levels: `LOW`, `MEDIUM`, and `HIGH`. The default priority is `MEDIUM`.
  Tasks are popped from the queue in the following order: `HIGH`, `MEDIUM`, `LOW`.

  ```python
  from beanie_batteries_queue import Priority

  task1 = SimpleTask(s="test1", priority=Priority.LOW)
  await task1.push()
  task2 = SimpleTask(s="test2", priority=Priority.HIGH)
  await task2.push()

  async for task in SimpleTask.queue():
      assert task.s == "test2"
      await task.finish()
      break
  ```



  There are four states: `CREATED`, `RUNNING`, `FINISHED`, and `FAILED`. The default state is `PENDING`.
  When a task is pushed, it is in the `CREATED` state. When it gets popped from the queue, it is in the `RUNNING`
  state. `FINISHED` and `FAILED` states should be set manually.

  Finished:

  ```python
  from beanie_batteries_queue import State

  task = SimpleTask(s="test")
  await task.push()

  async for task in SimpleTask.queue():
      assert task.state == State.RUNNING
      await task.finish()
      break

  task = await SimpleTask.find_one({"s": "test"})
  assert task.state == State.FINISHED
  ```

  Failed:

  ```python
  from beanie_batteries_queue import State

  task = SimpleTask(s="test")
  await task.push()

  async for task in SimpleTask.queue():
      assert task.state == State.RUNNING
      await task.fail()
      break

  task = await SimpleTask.find_one({"s": "test"})
  assert task.state == State.FAILED
  ```



  You can specify that a task depends on another task. In this case, the task will be popped from the queue only when all
  its dependencies have finished.

  ```python
  from beanie_batteries_queue import Task, DependencyType
  from beanie_batteries_queue import Link
  from pydantic import Field


  class SimpleTask(Task):
      s: str


  class TaskWithDirectDependency(Task):
      s: str
      direct_dependency: Link[SimpleTask] = Field(
          dependency_type=DependencyType.DIRECT
      )
  ```

  ```python
  from beanie_batteries_queue import State

  task1 = SimpleTask(s="test1")
  await task1.push()

  task2 = TaskWithDirectDependency(s="test2", direct_dependency=task1)
  await task2.push()

  task_from_queue = await TaskWithDirectDependency.pop()
  assert task_from_queue is None


  await task1.finish()

  task_from_queue = await TaskWithDirectDependency.pop()
  assert task_from_queue is not None

  ```



  You can specify that a task depends on multiple tasks. In this case, the task will be popped from the queue when all or
  any its dependencies are finished. It is controlled by the `dependency_type` parameter.

  All

  ```python
  class TaskWithMultipleDependencies(Task):
      s: str
      list_of_dependencies: Link[SimpleTask] = Field(
          dependency_type=DependencyType.ALL_OF
      )
  ```

  Any

  ```python
  class TaskWithMultipleDependencies(Task):
      s: str
      list_of_dependencies: Link[SimpleTask] = Field(
          dependency_type=DependencyType.ANY_OF
      )
  ```

  Tasks can have multiple links with different dependency types.

  ```python
  class TaskWithMultipleDependencies(Task):
      s: str
      list_of_dependencies_all: Link[SimpleTask] = Field(
          dependency_type=DependencyType.ALL_OF
      )
      list_of_dependencies_any: Link[SimpleTask] = Field(
          dependency_type=DependencyType.ANY_OF
      )
      direct_dependency: Link[SimpleTask] = Field(
          dependency_type=DependencyType.DIRECT
      )
  ```



  You can specify the time after which the task will be removed from the queue, even if it is not finished or has failed.
  This is controlled by the `expireAfterSeconds` index, which is set to 24 hours by default.

  ```python
  from pymongo import ASCENDING
  from beanie_batteries_queue import Task


  class TaskWithExpireTime(Task):
      s: str

      class Settings:
          indexes = [
              

              
              [("created_at", ASCENDING), ("expireAfterSeconds", 300)],
          ]
  ```

  Finished or failed tasks are not immediately removed from the queue. They are removed after the expiration time. You can
  manually delete them using the `delete()` method.



  Queues are designed to manage tasks. It will handle all the logic of creating, updating, and deleting tasks. Task logic
  should be defined in the `run` method of the task

  ```python
  from beanie_batteries_queue import Task


  class ProcessTask(Task):
      data: str

      async def run(self):
          
          print(f"Processing task with data: {self.data}")
          self.data = self.data.upper()
          await self.save()
  ```

  Now we can start the queue and it will process all the tasks. Be aware - it will run infinite loop. If you want to have
  another logic after starting the queue, you should run it with `asyncio.create_task()`.

  ```python
  queue = ProcessTask.queue()
  await queue.start()
  ```



  You can stop the queue by calling the `stop()` method.

  ```python
  await queue.stop()
  ```



  You can specify how frequently the queue will check for new tasks. The default value is 1 second.

  ```python
  queue = ProcessTask.queue(sleep_time=60)  # 60 seconds
  await queue.start()
  ```


  Queue can handle only one task model. To process multiple task models, you should use Worker. It will run multiple queues

  ```python
  from beanie_batteries_queue import Task, Worker

  class ProcessTask(Task):
      data: str

      async def run(self):
          self.data = self.data.upper()
          await self.save()

  class AnotherTask(Task):
      data: str

      async def run(self):
          self.data = self.data.upper()
          await self.save()


  worker = Worker(task_classes=[ProcessTask, AnotherTask])
  await worker.start()
  ```

  Be aware - it will run infinite loop. If you want to have another logic after starting the worker, you should run it with `asyncio.create_task()`.



  You can stop the worker by calling the `stop()` method.

  ```python
  await worker.stop()
  ```



  You can specify how frequently the worker will check for new tasks. The default value is 1 second.

  ```python
  worker = Worker(task_classes=[ProcessTask, AnotherTask], sleep_time=60)  # 60 seconds
  await worker.start()
  ```



  Runner is a class that allows you to run multiple workers in separate processes. It is useful when your tasks are CPU intensive and you want to use all the cores of your CPU.

  ```python
  from beanie_batteries_queue import Task, Runner

  class ProcessTask(Task):
      data: str

      async def run(self):
          self.data = self.data.upper()
          await self.save()

  class AnotherTask(Task):
      data: str

      async def run(self):
          self.data = self.data.upper()
          await self.save()

  runner = Runner(task_classes=[ProcessTask, AnotherTask])
  runner.start()
  ```



  You can stop the runner by calling the `stop()` method.

  ```python
  runner.stop()
  ```



  You can specify how many workers will be run. The default value is 1.

  ```python
  runner = Runner(task_classes=[ProcessTask, AnotherTask], workers_count=4)
  runner.start()
  ```

  You can specify how frequently the worker will check for new tasks. The default value is 1 second.

  ```python
  runner = Runner(task_classes=[ProcessTask, AnotherTask], sleep_time=60)  # 60 seconds
  runner.start()
  ```

  You can specify if the start method should run while the workers are alive or if it should return immediately. The default value is True.

  ```python
  runner = Runner(task_classes=[ProcessTask, AnotherTask], run_indefinitely=False)
  runner.start()
  ```


pkgId: a8307aed53ccfd90c415229b564324f55656e19133a7a5795a93d13646f474b2
name: python-beanquery
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Customizable lightweight SQL query tool
url: https://pypi.org/project/beanquery/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanquery-0.1.0-1.src.rpm
checksum_type: sha256
description:
  beanquery is a customizable and extensible lightweight SQL query tool
  that works on tabular data, including `Beancount`__ ledger data.
  __ https://beancount.github.io/

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


pkgId: 60bd60cc397f1f6a4ee7dbaa164c21919cefd929b558c607b218756a37b72d38
name: python-beanqueue
arch: src
version: 1.1.4
epoch: 0
release: 1
summary: BeanQueue or BQ for short, PostgreSQL SKIP LOCK and SQLAlchemy based worker queue library
url: https://pypi.org/project/beanqueue/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanqueue-1.1.4-1.src.rpm
checksum_type: sha256
description:
  BeanQueue, a lightweight Python task queue framework based on [SQLAlchemy](https://www.sqlalchemy.org/), PostgreSQL [SKIP LOCKED queries](https://www.2ndquadrant.com/en/blog/what-is-select-skip-locked-for-in-postgresql-9-5/) and [NOTIFY](https://www.postgresql.org/docs/current/sql-notify.html) / [LISTEN](https://www.postgresql.org/docs/current/sql-listen.html) statements.

  **Notice**: Still in its early stage, we built this for [BeanHub](https://beanhub.io)'s internal usage. May change rapidly. Use at your own risk for now.



  - **Super lightweight**: Under 1K lines
  - **Easy-to-deploy**: Only rely on PostgreSQL
  - **Easy-to-use**: Provide command line tools for processing tasks, also helpers for generating tasks models
  - **Auto-notify**: Notify will automatically be generated and send for inserted or update tasks
  - **Retry**: Built-in and customizable retry-policies
  - **Schedule**: Schedule task to run later
  - **Worker heartbeat and auto-reschedule**: Each worker keeps updating heartbeat, if one is found dead, the others will reschedule the tasks
  - **Customizable**: Use it as an library and build your own work queue
  - **Native DB operations**: Commit your tasks with other db entries altogether without worrying about data inconsistent issue



  ```bash
  pip install beanqueue
  ```



  You can define a task processor like this

  ```python
  from sqlalchemy.orm import Session

  import bq
  from .. import models
  from .. import image_utils

  app = bq.BeanQueue()

  @app.processor(channel="images")
  def resize_image(db: Session, task: bq.Task, width: int, height: int):
      image = db.query(models.Image).filter(models.Image.task == task).one()
      image_utils.resize(image, size=(width, height))
      db.add(image)
      
      
  ```

  The `db` and `task` keyword arguments are optional.
  If you don't need to access the task object, you can simply define the function without these two parameters.
  We also provide an optional `savepoint` argument in case if you want to rollback database changes you made.

  To submit a task, you can either use `bq.Task` model object to construct the task object, insert into the
  database session and commit.

  ```python
  import bq
  from .db import Session
  from .. import models

  db = Session()
  task = bq.Task(
      channel="files",
      module="my_pkgs.files.processors",
      name="upload_to_s3_for_backup",
  )
  file = models.File(
      task=task,
      blob_name="...",
  )
  db.add(task)
  db.add(file)
  db.commit()
  ```

  Or, you can use the `run` helper like this:

  ```python
  from .processors import resize_image
  from .db import Session
  from .. import my_models

  db = Session()

  task = resize_image.run(width=200, height=300)

  image = my_models.Image(task=task, blob_name="...")
  db.add(image)


  db.add(task)

  db.commit()
  ```

  To run the worker, you can do this:

  ```bash
  BQ_PROCESSOR_PACKAGES='["my_pkgs.processors"]' bq process images
  ```

  The `BQ_PROCESSOR_PACKAGES` is a JSON list contains the Python packages where you define your processors (the functions you decorated with `bq.processors.registry.processor`).
  To submit a task for testing purpose, you can do

  ```bash
  bq submit images my_pkgs.processors resize_image -k '{"width": 200, "height": 300}'
  ```

  To create tables for BeanQueue, you can run

  ```bash
  bq create_tables
  ```



  In most cases, a task will be executed as soon as possible after it is created.
  To run a task later, you can set a datetime value to the `scheduled_at` attribute of the task model.
  For example:

  ```python
  import datetime

  db = Session()
  task = resize_image.run(width=200, height=300)
  task.scheduled_at = func.now() + datetime.timedelta(minutes=3)
  db.add(task)
  ```

  Please note that currently, workers won't wake up at the next exact moment when the scheduled tasks are ready to run.
  It has to wait until the polling times out, and eventually, it will see the task's scheduled_at time exceeds the current datetime.
  Therefore, depending on your `POLL_TIMEOUT` setting and the number of your workers when they started processing, the actual execution may be inaccurate.
  If you set the `POLL_TIMEOUT` to 60 seconds, please expect less than 60 seconds of delay.



  To automatically retry a task after failure, you can specify a retry policy to the processor.

  ```python
  import datetime
  import bq
  from sqlalchemy.orm import Session

  app = bq.BeanQueue()
  delay_retry = bq.DelayRetry(delay=datetime.timedelta(seconds=120))

  @app.processor(channel="images", retry_policy=delay_retry)
  def resize_image(db: Session, task: bq.Task, width: int, height: int):
      
      pass
  ```

  Currently, we provide some simple common retry policies such as `DelayRetry` and `ExponentialBackoffRetry`.
  Surely, you can define your retry policy easily by making a function that returns an optional object at the next scheduled time for retry.

  ```python
  def my_retry_policy(task: bq.Task) -> typing.Any:
      
      return func.now() + datetime.timedelta(seconds=delay)
  ```

  To cap how many attempts is allowed, you can also use `LimitAttempt` like this:

  ```python
  delay_retry = bq.DelayRetry(delay=datetime.timedelta(seconds=120))
  capped_delay_retry = bq.LimitAttempt(3, delay_retry)

  @app.processor(channel="images", retry_policy=capped_delay_retry)
  def resize_image(db: Session, task: bq.Task, width: int, height: int):
      
      pass
  ```

  You can also retry only for specific exception classes with the `retry_exceptions` argument.

  ```python
  @app.processor(
      channel="images",
      retry_policy=delay_retry,
      retry_exceptions=ValueError,
  )
  def resize_image(db: Session, task: bq.Task, width: int, height: int):
      
      pass
  ```



  Configurations can be modified by setting environment variables with `BQ_` prefix.
  For example, to set the python packages to scan for processors, you can set `BQ_PROCESSOR_PACKAGES`.
  To change the PostgreSQL database to connect to, you can set `BQ_DATABASE_URL`.
  The complete definition of configurations can be found at the [bq/config.py](bq/config.py) module.

  If you want to configure BeanQueue programmatically, you can pass in `Config` object to the `bq.BeanQueue` object when creating.
  For example:

  ```python
  import bq
  from .my_config import config

  container = bq.Container()
  container.wire(packages=[bq])
  config = bq.Config(
      PROCESSOR_PACKAGES=["my_pkgs.processors"],
      DATABASE_URL=config.DATABASE_URL,
      BATCH_SIZE=10,
  )
  app = bq.BeanQueue(config=config)
  ```

  Then you can pass `--app` argument (or `-a` for short) pointing to the app object to the process command like this:

  ```bash
  bq -a my_pkgs.bq.app process images
  ```

  Or if you prefer to define your own process command, you can also call `process_tasks` of the `BeanQueue` object directly like this:

  ```python
  app.process_tasks(channels=("images",))
  ```



  BeanQueue is designed to be as customizable as much as possible.
  Of course, you can define your own SQLAlchemy model instead of using the ones we provided.

  To make defining your own `Task`, `Worker` or `Event` model much easier, you can use our mixin classes:

  - `bq.TaskModelMixin`: provides task model columns
  - `bq.TaskModelRefWorkerMixin`: provides foreign key column and relationship to `bq.Worker`
  - `bq.TaskModelRefParentMixin`: provides foreign key column and relationship to children `bq.Task` created during processing
  - `bq.TaskModelRefEventMixin`: provides foreign key column and relationship to `bq.Event`
  - `bq.WorkerModelMixin`: provides worker model columns
  - `bq.WorkerRefMixin`: provides relationship to `bq.Task`
  - `bq.EventModelMixin`: provides event model columns
  - `bq.EventModelRefTaskMixin`: provides foreign key column and relationship to `bq.Task`

  Here's an example for defining your own Task model:

  ```python
  import uuid

  import bq
  from sqlalchemy import ForeignKey
  from sqlalchemy.dialects.postgresql import UUID
  from sqlalchemy.orm import Mapped
  from sqlalchemy.orm import mapped_column
  from sqlalchemy.orm import relationship

  from .base_class import Base


  class Task(bq.TaskModelMixin, Base):
      __tablename__ = "task"
      worker_id: Mapped[uuid.UUID] = mapped_column(
          UUID(as_uuid=True),
          ForeignKey("worker.id", onupdate="CASCADE"),
          nullable=True,
          index=True,
      )

      worker: Mapped["Worker"] = relationship(
          "Worker", back_populates="tasks", uselist=False
      )
  ```

  To make task insert and update with state changing to `PENDING` send out NOTIFY "channel" statement automatically, you can also use `bq.models.task.listen_events` helper to register our SQLAlchemy event handlers automatically like this

  ```python
  from bq.models.task import listen_events
  listen_events(Task)
  ```

  You just see how easy it is to define your Task model. Now, here's an example for defining your own Worker model:

  ```python
  import bq
  from sqlalchemy.orm import Mapped
  from sqlalchemy.orm import relationship

  from .base_class import Base


  class Worker(bq.WorkerModelMixin, Base):
      __tablename__ = "worker"

      tasks: Mapped[list["Task"]] = relationship(
          "Task",
          back_populates="worker",
          cascade="all,delete",
          order_by="Task.created_at",
      )
  ```

  With the model class ready, you only need to change the `TASK_MODEL`, `WORKER_MODEL` and `EVENT_MODEL` of `Config` to the full Python module name plus the class name like this.

  ```python
  import bq
  config = bq.Config(
      TASK_MODEL="my_pkgs.models.Task",
      WORKER_MODEL="my_pkgs.models.Worker",
      EVENT_MODEL="my_pkgs.models.Event",
      
  )
  app = bq.BeanQueue(config)
  ```



  There are countless work queue projects. Why make yet another one?
  The primary issue with most work queue tools is their reliance on a standalone broker server.
  Our work queue tasks frequently interact with the database, and the atomic nature of database transactions is great for data integrity.
  However, integrating an external work queue into the system presents a risk.
  The work queue and the database don't share the same data view, potentially compromising data integrity and reliability.

  For example, you have a table of `images` to keep the user-uploaded images.
  And you have a background work queue for resizing the uploaded images into different thumbnail sizes.
  So, you will first need to insert a row for the uploaded image about the job into the database before you push the task to the work queue.

  Say you push the task to the work queue immediately after you insert the `images` table then commit like this:

  ```
  1. Insert into the "images" table
  2. Push resizing task to the work queue
  3. Commit db changes
  ```

  While this might seem like the right way to do it, there's a hidden bug.
  If the worker starts too fast before the transaction commits at step 3, it will not be able to see the new row in `images` as it has not been committed yet.
  One may need to make the task retry a few times to ensure that even if the first attempt failed, it could see the image row in the following attempt.
  But this adds complexity to the system and also increases the latency if the first attempt fails.
  Also, if the commit step fails, you will have a failed work queue job trying to fetch a row from the database that will never exist.

  Another approach is to push the resize task after the database changes are committed. It works like this:

  ```
  1. Insert into the "images" table
  2. Commit db changes
  3. Push resizing task to the work queue
  ```

  With this approach, we don't need to worry about workers picking up the task too early.
  However, there's another drawback.
  If step 3 for pushing a new task to the work queue fails, the newly inserted `images` row will never be processed.
  There are many solutions to this problem, but these are all caused by inconsistent data views between the database and the work queue storage.
  Things will be much easier if we have a work queue that shares the same consistent view with the database.

  By using a database as the data storage, all the problems are gone.
  You can simply do the following:

  ```
  1. Insert into the "images" table
  2. Insert the image resizing task into the `tasks` table
  3. Commit db changes
  ```

  It's all or nothing!
  By doing so, you don't need to maintain another work queue backend.
  You are probably using a database anyway, so this work queue comes for free.

  Usually, a database is inefficient as the work queues data storage because of the potential lock contention and the need for constant querying.
  However, things have changed since the [introduction of the SKIP LOCKED](https://www.2ndquadrant.com/en/blog/what-is-select-skip-locked-for-in-postgresql-9-5/) and [LISTEN](https://www.postgresql.org/docs/current/sql-listen.html) / [NOTIFY](https://www.postgresql.org/docs/current/sql-notify.html) features in PostgreSQL or other databases.

  This project is inspired by many of the SKIP-LOCKED-based work queue successors.
  Why don't we just use those existing tools?
  Well, because while they work great as work queue solutions, they don't take advantage of writing tasks and their relative data into the database in a transaction.
  Many provide an abstraction function or gRPC method of pushing tasks into the database instead of opening it up for the user to insert the row directly with other rows and commit altogether.

  With BeanQueue, we don't abstract away the logic of publishing a new task into the queue.
  Instead, we open it up to let the user insert the row and choose when and what to commit to the task.



  <p align="center">
    <a href="https://beanhub.io"><img src="https://github.com/LaunchPlatform/bq/raw/master/assets/beanhub.svg?raw=true" alt="BeanHub logo" /></a>
  </p>

  A modern accounting book service based on the most popular open source version control system [Git](https://git-scm.com/) and text-based double entry accounting book software [Beancount](https://beancount.github.io/docs/index.html).



  - [solid_queue](https://github.com/rails/solid_queue)
  - [good_job](https://github.com/bensheldon/good_job)
  - [graphile-worker](https://github.com/graphile/worker)
  - [postgres-tq](https://github.com/flix-tech/postgres-tq)
  - [pq](https://github.com/malthe/pq/)
  - [PgQueuer](https://github.com/janbjorge/PgQueuer)
  - [hatchet](https://github.com/hatchet-dev/hatchet)


pkgId: b9768f74b737362dc299933acaf1a9b2b73c86e5e78ebdc6d7223d288f04d53f
name: python-beans-logging
arch: src
version: 6.0.0
epoch: 0
release: 1
url: https://github.com/bybatkhuu/module.python-logging
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beans-logging-6.0.0-1.src.rpm
checksum_type: sha256
summary:
  'beans_logging' is a python package for simple logger and easily managing logging modules. It is a Loguru based custom logging package for python projects.

description:
  - **Python (>= v3.8)**
  - **PyPi (>= v23)**

  Choose one of the following methods to install the package **[A ~ F]**:
  **A.** [**RECOMMENDED**] Install from **PyPi**
  ```sh

  pip install -U beans-logging
  ```
  **B.** Install latest version from **GitHub**
  ```sh

  pip install git+https://github.com/bybatkhuu/module.python-logging.git
  ```
  **C.** Install from **pre-built release** files
  1. Download **`.whl`** or **`.tar.gz`** file from **releases** - <https://github.com/bybatkhuu/module.python-logging/releases>
  2. Install with pip:
  ```sh

  pip install ./beans_logging-[VERSION]-py3-none-any.whl

  pip install ./beans_logging-[VERSION].tar.gz
  ```
  **D.** Install from **source code** by building package
  ```sh

  git clone https://github.com/bybatkhuu/module.python-logging.git beans_logging
  cd ./beans_logging

  pip install -U pip build

  python -m build
  _VERSION=$(./scripts/get-version.sh)

  pip install ./dist/beans_logging-${_VERSION}-py3-none-any.whl

  pip install ./dist/beans_logging-${_VERSION}.tar.gz
  ```
  **E.** Install with pip editable **development mode** (from source code)
  ```sh

  git clone https://github.com/bybatkhuu/module.python-logging.git beans_logging
  cd ./beans_logging

  pip install -e .
  ```
  **F.** Manually add to **PYTHONPATH** (not recommended)
  ```sh

  git clone https://github.com/bybatkhuu/module.python-logging.git beans_logging
  cd ./beans_logging

  pip install -r ./requirements.txt

  export PYTHONPATH="${PWD}:${PYTHONPATH}"
  ```

  To use `beans_logging`, import the `logger` instance from the `beans_logging.auto` package:
  ```python
  from beans_logging.auto import logger
  ```
  You can call logging methods directly from the `logger` instance:
  ```python
  logger.info("Logging info.")
  ```

  [**`configs/logger.yml`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/simple/configs/logger.yml):
  ```yml
  logger:
    app_name: "my-app"
    level: "TRACE"
    file:
      log_handlers:
        enabled: true
      json_handlers:
        enabled: true
  ```
  [**`main.py`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/simple/main.py):
  ```python
  from beans_logging.auto import logger
  logger.trace("Tracing...")
  logger.debug("Debugging...")
  logger.info("Logging info.")
  logger.success("Success.")
  logger.warning("Warning something.")
  logger.error("Error occured.")
  logger.critical("CRITICAL ERROR.")
  def divide(a, b):
      _result = a / b
      return _result
  def nested(c):
      try:
          divide(5, c)
      except ZeroDivisionError as err:
          logger.error(err)
          raise
  try:
      nested(0)
  except Exception as err:
      logger.exception("Show me, what value is wrong:")
  ```
  Run the [**`examples/simple`**](https://github.com/bybatkhuu/module.python-logging/tree/main/examples/simple):
  ```sh
  cd ./examples/simple
  python ./main.py
  ```
  **Output**:
  ```txt
  [2023-09-01 00:00:00.000 +09:00 | TRACE | beans_logging._base:478]: Intercepted modules: ['concurrent', 'concurrent.futures', 'asyncio']; Muted modules: [];
  [2023-09-01 00:00:00.000 +09:00 | TRACE | __main__:7]: Tracing...
  [2023-09-01 00:00:00.000 +09:00 | DEBUG | __main__:8]: Debugging...
  [2023-09-01 00:00:00.000 +09:00 | INFO  | __main__:9]: Logging info.
  [2023-09-01 00:00:00.000 +09:00 | OK    | __main__:10]: Success.
  [2023-09-01 00:00:00.000 +09:00 | WARN  | __main__:11]: Warning something.
  [2023-09-01 00:00:00.000 +09:00 | ERROR | __main__:12]: Error occured.
  [2023-09-01 00:00:00.000 +09:00 | CRIT  | __main__:13]: CRITICAL ERROR.
  [2023-09-01 00:00:00.000 +09:00 | ERROR | __main__:25]: division by zero
  [2023-09-01 00:00:00.000 +09:00 | ERROR | __main__:32]: Show me, what value is wrong:
  Traceback (most recent call last):
  > File "/home/user/workspaces/projects/beans_logging/examples/simple/./main.py", line 30, in <module>
      nested(0)
      └ <function nested at 0x10802a4c0>
    File "/home/user/workspaces/projects/beans_logging/examples/simple/./main.py", line 23, in nested
      divide(5, c)
      │         └ 0
      └ <function divide at 0x1052f31f0>
    File "/home/user/workspaces/projects/beans_logging/examples/simple/./main.py", line 17, in divide
      _result = a / b
                │   └ 0
                └ 5
  ZeroDivisionError: division by zero
  ```

  Checkout `beans_logging_fastapi` package: <https://github.com/bybatkhuu/module.fastapi-logging>
  - FastAPI HTTP access logging middleware


pkgId: 0b86dd477871df2c88081a7a9753345ab300f6df8c126384aba04834cd37401b
name: python-beanstalkc3
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: A simple beanstalkd client library (python 3 compatible fork)
url: http://github.com/seveas/beanstalkc
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanstalkc3-0.4.0-1.src.rpm
checksum_type: sha256
description:
  beanstalkc is a simple beanstalkd client library for Python. `beanstalkd
  <http://kr.github.com/beanstalkd/>`_ is a fast, distributed, in-memory
  workqueue service.

  After waiting for more than a year for python3-compatibility fixes to end up in
  a release, it's time to fork this apparently unmaintained library.


pkgId: ba0f9f44fbf6d55d1ee25a844b2883a4dcd5d619d64f2722fd272dcc4f9fd836
name: python-beanstalkc3-ot
arch: src
version: 0.4.1
epoch: 0
release: 1
summary: A simple beanstalkd client library
url: https://github.com/jpmens/beanstalkc3-ot
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beanstalkc3-ot-0.4.1-1.src.rpm
checksum_type: sha256
description:
  beanstalkc3-ot is a simple beanstalkd client library for Python3. `beanstalkd
  <https://beanstalkd.github.io>`_ is a fast, distributed, in-memory
  workqueue service.


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


pkgId: 8f46702c430ff9cb88d585181fba2446b89420c901fd22ed3338c8ad0b7613ac
name: python-beast-night-tv
arch: src
version: 2.0.3
epoch: 0
release: 1
summary: A Python Package made by JAK!!
url: https://github.com/Jonak-Adipta-Kalita/JAK-Python-Package
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beast-night-tv-2.0.3-1.src.rpm
checksum_type: sha256
description:
  <div align=center>



  ![PyPI](https://img.shields.io/pypi/v/beast-night-tv?style=for-the-badge)
  ![PyPI - Downloads](https://img.shields.io/pypi/dd/beast-night-tv?style=for-the-badge)
  [![Code Style: Black](https://img.shields.io/badge/Code%20Style-Black-000000.svg?style=for-the-badge)](https://github.com/psf/black)
  ![License](https://img.shields.io/github/license/Jonak-Adipta-Kalita/JAK-Python-Package?style=for-the-badge)
  [![Documentation Status](https://readthedocs.org/projects/jak-python-package/badge/?version=latest&style=for-the-badge)](https://jak-python-package.readthedocs.io/en/latest/?badge=latest)
  ![GitHub Repo Stars](https://img.shields.io/github/stars/Jonak-Adipta-Kalita/JAK-Python-Package?style=for-the-badge)
  ![GitHub Forks](https://img.shields.io/github/forks/Jonak-Adipta-Kalita/JAK-Python-Package?style=for-the-badge)
  ![GitHub Watchers](https://img.shields.io/github/watchers/Jonak-Adipta-Kalita/JAK-Python-Package?style=for-the-badge)
  ![Made by JAK](https://img.shields.io/badge/BeastNight%20TV-Made%20by%20JAK-blue?style=for-the-badge)

  </div>

  -   Note: [Formatting](#format-code) and [Testing](#test) the Code before Pushing is Important!!

  Go to the [Package](https://pypi.org/project/beast-night-tv/), [Documentation](https://jak-python-package.readthedocs.io/)





  ```bash
  pip install beast-night-tv
  ```



  ```bash
  python3 pip install beast-night-tv
  ```



  ```bash
  pip install beast-night-tv
  ```





  In a Directory open a Terminal and type:

  ```bash
  git clone https://github.com/Jonak-Adipta-Kalita/JAK-Python-Package.git
  ```



  To install the required modules, just open a terminal in the directory where this project is cloned. Now type:

  ```bash
  pip install virtualenv
  virtualenv venv
  .\venv\Scripts\activate
  pip install -r .\requirements.txt
  ```

  and hit enter.



  In a terminal, type

  ```bash
  .\venv\Scripts\activate
  black .
  deactivate
  ```



  In a terminal, type

  ```bash
  .\venv\Scripts\activate
  pytest
  deactivate
  ```

  and press Enter.



  -   Language: [Python](https://python.org/)



  <a href = "https://github.com/Jonak-Adipta-Kalita/JAK-Python-Package/graphs/contributors">
  	<img src = "https://contrib.rocks/image?repo=Jonak-Adipta-Kalita/JAK-Python-Package"/>
  </a>


pkgId: 855778b69854363872c1144826270a3e9bb4243b08956d690bc5a24192722b1a
name: python-beastiary
arch: src
version: 1.8.3
epoch: 0
release: 1
summary: Real time and remote MCMC trace monitoring with BEASTIARY
url: https://pypi.org/project/beastiary/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beastiary-1.8.3-1.src.rpm
checksum_type: sha256
description:
  **Paper**: <a href="https://academic.oup.com/mbe/advance-article/doi/10.1093/molbev/msac095/6584747" target="_blank">Wirth & Duchene (2022)</a>
  **Documentation**: <a href="https://beastiary.wytamma.com" target="_blank">https://beastiary.wytamma.com</a>


pkgId: 31662c50079a687c3f44f5b8d80721196335173e88e6c27b56c40137da9c11e4
name: python-beaupy
arch: src
version: 3.9.2
epoch: 0
release: 1
summary: A library of elements for interactive TUIs in Python
url: https://github.com/petereon/beaupy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beaupy-3.9.2-1.src.rpm
checksum_type: sha256
description:
  [![Tests](https://github.com/petereon/beaupy/actions/workflows/python-test.yml/badge.svg)](https://github.com/petereon/beaupy/actions/workflows/python-test.yml)
  [![Lint](https://github.com/petereon/beaupy/actions/workflows/python-lint.yml/badge.svg)](https://github.com/petereon/beaupy/actions/workflows/python-lint.yml)
  [![codecov](https://codecov.io/gh/petereon/beaupy/branch/master/graph/badge.svg?token=HSG6MGTXBC)](https://codecov.io/gh/petereon/beaupy)
  [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=petereon_beaupy&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=petereon_beaupy)
  [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=petereon_beaupy&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=petereon_beaupy)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/beaupy?color=g&label=%F0%9F%93%A5%20Downloads)
  ![example](https://raw.githubusercontent.com/petereon/beaupy/master/example.gif)
  For documentation but more and prettier see [**here**](https://petereon.github.io/beaupy/)

  BeauPy stands on the shoulders of giants. It is based on another library with which it shares some of the source code, [`cutie`](https://github.com/kamik423/cutie), developed by [Kamik423](https://github.com/Kamik423). It has begun as a fork but has since diverged into its own thing and as such, detached from the original repository.

  **BeauPy** implements a number of common interactive elements:
  | Function                                                                         | Functionality                                                                              |
  |:---------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------|
  | [`select`](https://petereon.github.io/beaupy/api/#select)                        | Prompt to pick a choice from a list                                                        |
  | [`select_multiple`](https://petereon.github.io/beaupy/api/#select_multiple)      | Prompt to select one or multiple choices from a list                                       |
  | [`confirm`](https://petereon.github.io/beaupy/api/#confirm)                      | Prompt with a question and yes/no options                                                  |
  | [`prompt`](https://petereon.github.io/beaupy/api/#prompt)                        | Prompt that takes free input with optional validation, type conversion and input hiding    |
  TUI elements shown in the above gif are the result of the following code:
  ```python
  import time
  from beaupy import confirm, prompt, select, select_multiple
  from beaupy.spinners import *
  from rich.console import Console
  console = Console()

  if confirm("Will you take the ring to Mordor?"):
      names = [
          "Frodo Baggins",
          "Samwise Gamgee",
          "Legolas",
          "Aragorn",
          "[red]Sauron[/red]",
      ]
      console.print("Who are you?")
      
      name = select(names, cursor="🢧", cursor_style="cyan")
      console.print(f"Alámenë, {name}")
      item_options = [
          "The One Ring",
          "Dagger",
          "Po-tae-toes",
          "Lightsaber (Wrong franchise! Nevermind, roll with it!)",
      ]
      console.print("What do you bring with you?")
      
      items = select_multiple(item_options, tick_character='🎒', ticked_indices=[0], maximal_count=3)
      potato_count = 0
      if "Po-tae-toes" in items:
          
          potato_count = prompt('How many potatoes?', target_type=int, validator=lambda count: count > 0)
      
      spinner = Spinner(DOTS, "Packing things...")
      spinner.start()
      time.sleep(2)
      spinner.stop()
      
      if "friend" == prompt("Speak, [blue bold underline]friend[/blue bold underline], and enter", secure=True).lower():
          
          spinner_animation = ['▉▉', '▌▐', '  ', '▌▐', '▉▉']
          spinner = Spinner(spinner_animation, "Opening the Door of Durin...")
          spinner.start()
          time.sleep(2)
          spinner.stop()
      else:
          spinner_animation = ['🐙🌊    ⚔️ ', '🐙 🌊   ⚔️ ', '🐙  🌊  ⚔️ ', '🐙   🌊 ⚔️ ', '🐙    🌊⚔️ ']
          spinner = Spinner(spinner_animation, "Getting attacked by an octopus...")
          spinner.start()
          time.sleep(2)
          spinner.stop()
      if 'The One Ring' in items:
          console.print("[green]You throw The One Ring to a lava from an eagle![/green]")
      else:
          console.print("[red]You forgot the ring and brought Middle-Earth to its knees![/red]")
      console.print(f"And you brought {potato_count} taters!")
  ```
  For more information refer to [more examples](https://petereon.github.io/beaupy/examples/) or definitive, but much less exciting [API documentation](https://petereon.github.io/beaupy/api/)

  From PyPI:
  ```sh
  pip install beaupy
  ```
  From source:
  ```sh
  git clone https://github.com/petereon/beaupy.git
  poetry build
  pip install ./dist/beaupy-{{some-version}}-py3-none-any.whl
  ```

  This repository has a [associated GitHub project](https://github.com/users/petereon/projects/3/views/1) where work that is currently done can be seen.

  If you would like to contribute, please feel free to suggest features or implement them yourself.
  Also **please report any issues and bugs you might find!**

  To start development you can clone the repository:
  ```sh
  git clone https://github.com/petereon/beaupy.git
  ```
  Change the directory to the project directory:
  ```sh
  cd ./beaupy/
  ```
  This project uses [`poetry`](https://python-poetry.org/) as a dependency manager. You can install the dependencies using:
  ```sh
  poetry install
  ```
  For testing, this project relies on [`ward`](https://github.com/darrenburns/ward). It is included as a development dependency, so
  after installing the dependencies you can simply execute the following:
  ```sh
  poetry run poe test
  ```
  Making sure the code follows quality standards and formatting can be ensured by executing
  ```sh
  poetry run poe lint
  ```
  You can also have the tests and lints run after every saved change by executing a respective watch command
  ```sh
  poetry run poe test:watch
  ```
  or
  ```sh
  poetry run poe lint:watch
  ```
  After you have made your changes, create a pull request towards a master branch of this repository
  Looking forward to your pull requests!

  Internal logic of `beaupy` is supported for all the major platforms (Windows, Linux, macOS).
  - For user input from console, `beaupy` relies on [petereon/yakh](https://github.com/petereon/yakh), which is tested against all the major platforms and Python versions.
  - For printing to console `beaupy` relies on [Textualize/rich](https://github.com/Textualize/rich), which [claims to support](https://github.com/Textualize/rich#compatibility) all the major platforms.

  - Version `2.x.x`: arrow keys reportedly don't always work on Windows. Resolved in `3.x.x`
  - Version `3.5.0`: various option display bugs in `select` and `select_multiple`. Resolved in `3.5.4`

  - [therealOri/Genter](https://github.com/therealOri/Genter): A strong password generator and built in password manager made with python3!
  - [therealOri/byte](https://github.com/therealOri/byte): Steganography Image/Data Injector. For artists or people to inject their own Datamark "Watermark" into their images/art or files!
  - [AnirudhG07/ntfyme](https://github.com/AnirudhG07/ntfyme): A notification tool to notify you about status of your long running processes on termination via local-notification, Gmail, Telergram, etc.

  The project is licensed under the [MIT License](https://raw.githubusercontent.com/petereon/beaupy/master/LICENSE).


pkgId: 2efe4f7bc53d3a30a1b5a9664143ac77f0082ceecdceb2592007ac32d0597c2f
name: python-beautifier
arch: src
version: 0.5.5
epoch: 0
release: 1
summary: Cleanup and beautifier emails, urls and patterns
url: https://github.com/labtocat/beautifier
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beautifier-0.5.5-1.src.rpm
checksum_type: sha256
description:
  Simple library to cleanup and prettify url patterns, domains and so on.
  Library helps to clean unicodes, special charecters and unnessesary
  redirection patterns from the urls and gives you clean date.


  ```bash
  pip install beautifier
  ```


  EMAIL cleanup API's
  ```python
  from beautifier import Email
  email = Email('me@imsach.in')
  >>> email.domain
  'imsach.in'
  >>> email.username
   'me'
  >>> email.is_free_email
   False
  ```

  URL cleanup API's
  ```python
  from beautifier import Url
  url = Url('https://in.linkedin.com/in/sachinphilip?authtoken=887nasdadasd6hasdtg21&secret=98jy766yhhuhnjk')
  >>> url.cleanup
  'https://in.linkedin.com/in/sachinphilip'
  >>> url.domain
   'in.linkedin.com'
  >>> url.param
   ['authtoken': '887nasdadasd6hasdtg21',
    'secret': '98jy766yhhuhnjk' ]
  ```


pkgId: a1ca61da0ae3b6009fd1d2a4421132089760e3ac7e1726307116f5e8c4451428
name: python-beautiful
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: A collection of functions and classes to aid developers into building better code faster
url: https://github.com/kalaspuff/beautiful
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beautiful-0.0.2-1.src.rpm
checksum_type: sha256
description:
  [![pypi](https://badge.fury.io/py/beautiful.svg)](https://pypi.python.org/pypi/beautiful/)
  [![Made with Python](https://img.shields.io/pypi/pyversions/beautiful)](https://www.python.org/)
  [![Type hinted - mypy validated](https://img.shields.io/badge/typehinted-yes-teal)](https://github.com/kalaspuff/beautiful)
  [![MIT License](https://img.shields.io/github/license/kalaspuff/beautiful.svg)](https://github.com/kalaspuff/beautiful/blob/master/LICENSE)
  [![Code coverage](https://codecov.io/gh/kalaspuff/beautiful/branch/master/graph/badge.svg)](https://codecov.io/gh/kalaspuff/beautiful/tree/master/beautiful)

  *A collection of functions and classes to aid developers into building better code faster.*



  Like you would install any other Python package, use `pip`, `poetry`, `pipenv` or your weapon of choice.
  ```
  $ pip install beautiful
  ```





  ```
  import beautiful

  ```


pkgId: 8abae3caa449948a892367a7637be487ce68cb706b7dcccb6fdefdc8266a8d52
name: python-beautiful-date
arch: src
version: 2.3.0
epoch: 0
release: 1
summary: Simple and beautiful way to create date and datetime objects in Python.
url: https://github.com/kuzmoyev/beautiful-date
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beautiful-date-2.3.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/beautiful-date.svg)](https://badge.fury.io/py/beautiful-date)
  [![Tests](https://github.com/kuzmoyev/beautiful-date/workflows/Tests/badge.svg)](https://github.com/kuzmoyev/beautiful-date/actions)
  [![Downloads](https://pepy.tech/badge/beautiful-date)](https://pepy.tech/project/beautiful-date)

  Simple and beautiful way to create date and datetime objects in Python.

  **Before**:

  ```python3
  from datetime import date, datetime

  d = date(year=2018, month=3, day=25)
  t = datetime(year=2018, month=3, day=25, hour=23, minute=45)
  ```

  **After**:

  ```python3
  from beautiful_date import *

  d = 25/Mar/2018
  t = (25/Mar/2018)[23:45]
  ```



  ```bash
  pip install beautiful-date
  ```





  Using months names:

  ```python3
  >>> from beautiful_date import *

  >>> 25/Mar/2018  # European format
  BeautifulDate(2018, 3, 25)
  >>> Mar/25/2018  # US format
  BeautifulDate(2018, 3, 25)
  ```

  Using months numbers:

  ```python3
  >>> 25/M[3]/2018  # European format
  BeautifulDate(2018, 3, 25)
  >>> M[3]/25/2018  # US format
  BeautifulDate(2018, 3, 25)
  ```

  Or alternatively:

  ```python3
  >>> D @ 25/3/2018  # European format (default)
  BeautifulDate(2018, 3, 25)

  >>> D = MDY()  # Add this at the top of your script to use US format.
  >>> d = D @ 3/25/2018  # US format
  BeautifulDate(2018, 3, 25)
  ```

  You can also easily retrieve current date as a `BeautifulDate` object and current time using:

  ```python3
  >>> D.today()
  BeautifulDate(2020, 8, 24)

  >>> D.now()
  datetime.datetime(2020, 8, 24, 0, 59, 12, 451363)

  >>> D.tomorrow()
  BeautifulDate(2020, 8, 25)

  >>> D.yesterday()
  BeautifulDate(2020, 8, 23)
  ```



  Previous methods create `BeautifulDate` objects which are inherited from `date` but can be
  easily extended to `datetime` using indexing/slicing:

  ```python3
  >>> (Oct/16/1995)[:]
  datetime.datetime(1995, 10, 16, 0, 0)

  >>> (Oct/16/1995)[23]
  datetime.datetime(1995, 10, 16, 23, 0)

  >>> (Oct/16/1995)[23:14]
  datetime.datetime(1995, 10, 16, 23, 14)

  >>> (Oct/16/1995)[23:14:10]
  datetime.datetime(1995, 10, 16, 23, 14, 10)
  ```

  You can also use prefix `D @` if you need months by their numbers:

  ```python3
  >>> (D @ 16/10/1995)[:]
  datetime.datetime(1995, 10, 16, 0, 0)

  >>> (D @ 16/10/1995)[23]
  datetime.datetime(1995, 10, 16, 23, 0)

  >>> (D @ 16/10/1995)[23:14]
  datetime.datetime(1995, 10, 16, 23, 14)

  >>> (D @ 16/10/1995)[23:14:10]
  datetime.datetime(1995, 10, 16, 23, 14, 10)
  ```



  This library also provides simple interface for
  [relativedelta](http://dateutil.readthedocs.io/en/stable/relativedelta.html) from
  [dateutil](http://dateutil.readthedocs.io/en/stable/index.html)

  Notice that singular time unit (year, month, ...) sets given value, plural (years, months,) adds it.



  ```python
  >>> 5*days.from_today
  BeautifulDate(2023, 9, 17)

  >>> 1*hours.from_now
  datetime.datetime(2023, 9, 12, 12, 53, 56)

  >>> 3*days.since(15/Mar/2023)
  BeautifulDate(2023, 3, 18)

  >>> 5*days.until_today
  BeautifulDate(2023, 9, 7)

  >>> 1*hours.until_now
  datetime.datetime(2023, 9, 12, 11, 13, 4)

  >>> 3*days.until(15/Mar/2023)
  BeautifulDate(2023, 3, 12)
  ```



  ```python3
  >>> d = 26/Mar/2018
  >>> t = d[12:23:15]

  >>> d + 2 * years
  BeautifulDate(2020, 3, 26)
  >>> d - 2 * days
  BeautifulDate(2018, 3, 24)

  >>> t + 25 * hours
  datetime.datetime(2018, 3, 27, 13, 23, 15)
  ```

  Available deltas: `years`, `months`, `weeks`, `days`, `hours`, `minutes`,
  `seconds`, `microseconds`, `leapdays`
  (see [relativedelta](http://dateutil.readthedocs.io/en/stable/relativedelta.html)).

  ```python3
  >>> d = 26/Mar/2018
  >>> t = d[12:23:15]

  >>> d + 2022 * year
  BeautifulDate(2022, 3, 26)
  >>> d += 2 * day
  >>> d
  BeautifulDate(2018, 3, 2)

  >>> t + 22 * hour
  datetime.datetime(2018, 3, 26, 22, 23, 15)
  >>> t += 22 * hour
  >>> t
  datetime.datetime(2018, 3, 26, 22, 23, 15)
  ```

  Available setters: `year`, `month`, `day`, `hour`, `minute`, `second`, `microsecond`,
  `yearday` and `nlyearday`
  (see [relativedelta](http://dateutil.readthedocs.io/en/stable/relativedelta.html)).



  Get next Monday:

  ```python3
  >>> d = 29/Mar/2018  # Thursday
  >>> d + MO  # Equivalent to MO(1)
  BeautifulDate(2018, 4, 2)
  ```

  Get second to next Monday:

  ```python3
  >>> d = 29/Mar/2018
  >>> d + MO(2)
  BeautifulDate(2018, 4, 9)
  ```

  Get last Saturday:

  ```python3
  >>> d = 29/Mar/2018
  >>> d - SA
  BeautifulDate(2018, 3, 24)
  ```

  Get second to last Saturday:

  ```python3
  >>> d = 29/Mar/2018
  >>> d - SA(2)
  BeautifulDate(2018, 3, 17)
  ```

  Get second to last Saturday (same as previous):

  ```python3
  >>> d = 29/Mar/2018
  >>> d + SA(-2)
  BeautifulDate(2018, 3, 17)
  ```





  You can use `drange` to generate ranges of dates:

  ```python3
  >>> for d in drange(27/Mar/1994, 5/Apr/1994):
  ...     print(d)
  1994-03-27
  1994-03-28
  1994-03-29
  1994-03-30
  1994-03-31
  1994-04-01
  1994-04-02
  1994-04-03
  1994-04-04

  >>> for d in drange(27/Mar/1994, 5/Apr/1994, 2*days):
  ...     print(d)
  1994-03-27
  1994-03-29
  1994-03-31
  1994-04-02
  1994-04-04
  ```

  and datetimes:

  ```python3
  >>> for dt in drange((27/Mar/1994)[10:25], (4/Apr/1994)[10:10]):
  ...     print(dt)
  1994-03-27 10:25:00
  1994-03-28 10:25:00
  1994-03-29 10:25:00
  1994-03-30 10:25:00
  1994-03-31 10:25:00
  1994-04-01 10:25:00
  1994-04-02 10:25:00
  1994-04-03 10:25:00

  >>> for dt in drange((27/Mar/1994)[10:25], (4/Apr/1994)[10:10], 20*hours):
  ...     print(dt)
  1994-03-27 10:25:00
  1994-03-28 06:25:00
  1994-03-29 02:25:00
  1994-03-29 22:25:00
  1994-03-30 18:25:00
  1994-03-31 14:25:00
  1994-04-01 10:25:00
  1994-04-02 06:25:00
  1994-04-03 02:25:00
  1994-04-03 22:25:00
  ```


pkgId: 8ebad222bcf5058b47dd24581dd49c92cbd082255b0496c0bd721d369f23e383
name: python-beautifulexcel
arch: src
version: 0.3.6
epoch: 0
release: 1
url: https://github.com/vanalmsick/beautifulexcel
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beautifulexcel-0.3.6-1.src.rpm
checksum_type: sha256
summary:
  BeautifulExcel is a python package that makes it easy and quick to save pandas dataframes in beautifully formatted excel files. BeautifulExcel is the Openpyxl for Data Scientists with a deadline.

description:
  <img src="https://github.com/vanalmsick/beautifulexcel/raw/main/docs/docs/imgs/social.png" alt="Social Banner" style="width:100%;"/>

  > **⚠️🏗️️ Note:**
  > This is only the first version - actively working on additional features!

  BeautifulExcel is a python package that makes it easy and quick to save pandas dataframes in beautifully formatted excel files. BeautifulExcel is the Openpyxl for Data Scientists with a deadline.

  <br>



  ```console
  $ pip install beautifulexcel
  ```
  **Update Package:** *(execute <ins>regularly</ins> to get the latest features)*
  ```console
  $ pip install beautifulexcel --upgrade
  ```

  <br>



  ```python
  from beautifulexcel import ExcelWriter

  with ExcelWriter('workbook.xlsx', mode='r', theme='elegant_blue') as writer:
      ws1 = writer.to_excel(
          df,
          sheet_name='My Sheet',
          startrow=0,
          startcol=0,
          index=True,
          header=True,
          col_autofit=True,  # automatically change column width to fit content best
          col_widths={'A': 20, 'RoE': 40},  # define column width manually
          auto_number_formatting=True,  # automatically detect number format and change excel format
          style={'RoE': 'bg_light_blue', 'D:E': {'fill': 'FFEEB7'}},  # apply custom styling to this dataframe export
          use_theme_style=True,  # apply the excel workbook "theme" set in ExcelWriter()
      )
  ```

  <br>


  [Go to **Documentation**](https://vanalmsick.github.io/beautifulexcel/)

  <br>


  - Please submit new features as Pull Request to the "dev" branch
  - Please make sure the code is nicely formatted and has doc strings by executing `$ pre-commit install` before your git commit


pkgId: f6de543710bd0dc6c5892311604fc64765ca94a4461bf0e4228b7a7267fca867
name: python-beautifulsoup4
arch: src
version: 4.12.3
epoch: 0
release: 1
summary: Screen-scraping library
url: https://www.crummy.com/software/BeautifulSoup/bs4/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beautifulsoup4-4.12.3-1.src.rpm
checksum_type: sha256
description:
  Beautiful Soup is a library that makes it easy to scrape information
  from web pages. It sits atop an HTML or XML parser, providing Pythonic
  idioms for iterating, searching, and modifying the parse tree.



  ```
  >>> from bs4 import BeautifulSoup
  >>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML")
  >>> print(soup.prettify())
  <html>
   <body>
    <p>
     Some
     <b>
      bad
      <i>
       HTML
      </i>
     </b>
    </p>
   </body>
  </html>
  >>> soup.find(text="bad")
  'bad'
  >>> soup.i
  <i>HTML</i>

  >>> soup = BeautifulSoup("<tag1>Some<tag2/>bad<tag3>XML", "xml")

  >>> print(soup.prettify())
  <?xml version="1.0" encoding="utf-8"?>
  <tag1>
   Some
   <tag2/>
   bad
   <tag3>
    XML
   </tag3>
  </tag1>
  ```

  To go beyond the basics, [comprehensive documentation is available](https://www.crummy.com/software/BeautifulSoup/bs4/doc/).



  * [Homepage](https://www.crummy.com/software/BeautifulSoup/bs4/)
  * [Documentation](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)
  * [Discussion group](https://groups.google.com/group/beautifulsoup/)
  * [Development](https://code.launchpad.net/beautifulsoup/)
  * [Bug tracker](https://bugs.launchpad.net/beautifulsoup/)
  * [Complete changelog](https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/CHANGELOG)



  Beautiful Soup's support for Python 2 was discontinued on December 31,
  2020: one year after the sunset date for Python 2 itself. From this
  point onward, new Beautiful Soup development will exclusively target
  Python 3. The final release of Beautiful Soup 4 to support Python 2
  was 4.9.3.



  If you use Beautiful Soup as part of your professional work, please consider a
  [Tidelift subscription](https://tidelift.com/subscription/pkg/pypi-beautifulsoup4?utm_source=pypi-beautifulsoup4&utm_medium=referral&utm_campaign=readme).
  This will support many of the free software projects your organization
  depends on, not just Beautiful Soup.

  If you use Beautiful Soup for personal projects, the best way to say
  thank you is to read
  [Tool Safety](https://www.crummy.com/software/BeautifulSoup/zine/), a zine I
  wrote about what Beautiful Soup has taught me about software
  development.



  The bs4/doc/ directory contains full documentation in Sphinx
  format. Run `make html` in that directory to create HTML
  documentation.



  Beautiful Soup supports unit test discovery using Pytest:

  ```
  $ pytest
  ```


pkgId: 305113f001a9b5d8ebaefb738de367c0c4699b20354f2ca142b2e604ad22e107
name: python-beautypix
arch: src
version: 1.0.0
epoch: 0
release: 1
url: https://github.com/MrHorbio/bpix/blob/main/bpix_package/README.md
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beautypix-1.0.0-1.src.rpm
checksum_type: sha256
summary:
  BeautyPix is a versatile Python tool designed for capturing and managing screenshots of specified domains. It efficiently captures screenshots. Ideal for web developers, testers, and digital archivists, BeautyPix simplifies the process of monitoring and documenting web content

description:
  Bpix aka BeautyPix is a Python package that provides functionality for taking screenshots of websites using Selenium WebDriver. This tool reads a list of domains from a file, captures screenshots of each domain,Dns resolution and saves them to a designated directory.



  - Take screenshots of websites specified in a text file.
  - Dns Resolution
  - Save screenshots in a specified directory.
  - Handle different URL formats and provide error messages for invalid URLs.



  ` pip install beautypix `





  ```
  from BPix.bpix import Bpix
  from Beautypix.bpix import DNS


  bpix = Bpix(file_path='path/to/domains.txt', time_out=5)


  bpix.s_shot()



  dns = DNS(file_path="path-of-file" , output_folder="output.txt")


  dns.process_domains()

  ```





  The file_path specified should point to a text file containing one URL per line:
  - https://www.google.com
  - https://www.facebook.com
  - https://www.twitter.com



  This project is licensed under the MIT License. See the LICENSE file for details.



  Contributions to Bpix are welcome! If you have suggestions, improvements, or bug fixes, please fork the repository and submit a pull request. Ensure your contributions adhere to the coding standards and include appropriate documentation.


  For any inquiries or feedback, please contact:

  - Author: Ankush Kumar Rajput (Mr.Horbio)
  - GitHub: https://github.com/MrHorbio/bpix/blob/main/bpix_package/README.md
  - Youtube: https://www.youtube.com/@Mr-Horbio



  Thank you for using Bpix!


pkgId: c685f0afd8d52b31bed0ce2fddada1b2c9cb5b2511929f9efc1318342740a008
name: python-beautysh
arch: src
version: 6.2.1
epoch: 0
release: 1
summary: A Bash beautifier for the masses.
url: https://github.com/lovesegfault/beautysh
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beautysh-6.2.1-1.src.rpm
checksum_type: sha256
description:
  This program takes upon itself the hard task of beautifying Bash scripts
  (yeesh). Processing Bash scripts is not trivial, they aren't like C or Java
  programs — they have a lot of ambiguous syntax, and (shudder) you can use
  keywords as variables. Years ago, while testing the first version of this
  program, I encountered this example:

  ```shell
  done=0;while (( $done <= 10 ));do echo done=$done;done=$((done+1));done
  ```
  Same name, but three distinct meanings (sigh). The Bash interpreter can sort out
  this perversity, but I decided not to try to recreate the Bash interpreter to
  beautify a script. This means there will be some border cases this Python
  program won't be able to process. But in tests with large Linux system
  Bash scripts, its error-free score was ~99%.



  If you have `pip` set up you can do

  ```shell
  pip install beautysh
  ```

  or clone the repo and install:

  ```shell
  git clone https://github.com/lovesegfault/beautysh
  cd beautysh
  poetry install
  ```



  You can call Beautysh from the command line such as

  ```shell
  beautysh file1.sh file2.sh file3.sh
  ```

  in which case it will beautify each one of the files.

  Available flags are:

  ```
    --indent-size INDENT_SIZE, -i INDENT_SIZE
                          Sets the number of spaces to be used in indentation.
    --backup, -b          Beautysh will create a backup file in the same path as
                          the original.
    --check, -c           Beautysh will just check the files without doing any
                          in-place beautify.
    --tab, -t             Sets indentation to tabs instead of spaces.
    --force-function-style FORCE_FUNCTION_STYLE, -s FORCE_FUNCTION_STYLE
                          Force a specific Bash function formatting. See below
                          for more info.
    --version, -v         Prints the version and exits.
    --help, -h            Print this help message.

  Bash function styles that can be specified via --force-function-style are:
    fnpar: function keyword, open/closed parentheses, e.g.      function foo()
    fnonly: function keyword, no open/closed parentheses, e.g.  function foo
    paronly: no function keyword, open/closed parentheses, e.g. foo()
  ```

  You can also call beautysh as a module:

  ```python3
  from beautysh import Beautify

  source = "my_string"

  result, error = Beautify().beautify_string(source)
  ```

  As written, beautysh can beautify large numbers of Bash scripts when called
  from a variety of means,including a Bash script:

  ```shell


  for path in `find /path -name '*.sh'`
  do
     beautysh $path
  done
  ```

  As well as the more obvious example:

  ```shell
  $ beautysh *.sh
  ```

  > **CAUTION**: Because Beautysh overwrites all the files submitted to it, this
  > could have disastrous consequences if the files include some of the
  > increasingly common Bash scripts that have appended binary content (a regime
  > where Beautysh has undefined behaviour ). So please — back up your files,
  > and don't treat Beautysh as a harmless utility. Even if that is true
  > most of the time.

  Beautysh handles Bash here-docs with care(and there are probably some
  border cases it doesn't handle). The basic idea is that the originator knew what
   format he wanted in the here-doc, and a beautifier shouldn't try to outguess
  him. So Beautysh does all it can to pass along the here-doc content
  unchanged:

  ```shell
  if true
  then

     echo "Before here-doc"

     
     
  vi $TARGETFILE <<x23LimitStringx23
  i
  This is line 1 of the example file.
  This is line 2 of the example file.
  ^[
  ZZ
  x23LimitStringx23
     

     echo "After here-doc"

  fi
  ```

  Special comments `@formatter:off` and `@formatter:on` are available to disable formatting around a block of statements.

  ```shell

  command \
      --option1 \
          --option2 \
              --option3 \


  ```
  This takes inspiration from the Eclipse feature.



  Contributions are welcome and appreciated, however test cases must be added to
  prevent regression. Adding a test case is easy, and involves the following:

  1. Create a file `tests/fixtures/my_test_name_raw.sh` containing the unformatted version
     of your test case.
  1. Create a file `tests/fixtures/my_test_name_formatted.sh` containing the formatted version
     of your test case.
  1. Register your test case in `tests/test_integration.py`, It should look
     something like this:
    ```python3
    def test_my_test_name(self):
        self.assert_formatting("my_test_name")
    ```

  ________________________________________________________________________________

  Originally written by [Paul Lutus](http://arachnoid.com/python/beautify_bash_program.html)


pkgId: 5bb7766065897052e4e0f8534990f1713ade7f025aa07d95a14727376cdcf82b
name: python-beavers
arch: src
version: 0.10.0
epoch: 0
release: 1
summary: Python stream processing
url: https://github.com/tradewelltech/beavers
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-beavers-0.10.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI Version][pypi-image]][pypi-url]
  [![Python Version][versions-image]][versions-url]
  [![Github Stars][stars-image]][stars-url]
  [![codecov][codecov-image]][codecov-url]
  [![Build Status][build-image]][build-url]
  [![Documentation][doc-image]][doc-url]
  [![License][license-image]][license-url]
  [![Downloads][downloads-image]][downloads-url]
  [![Downloads][downloads-month-image]][downloads-month-url]
  [![Code style: black][codestyle-image]][codestyle-url]

  ![Beavers Logo][5]



  [Documentation][6] / [Installation][7] / [Repository][1] / [PyPI][8]

  [Beavers][1] is a python library for stream processing, optimized for analytics.

  It is used at [Tradewell Technologies][2],
  to calculate analytics and serve model predictions,
  for both realtime and batch jobs.



  - Works in **real time** (eg: reading from Kafka) and **replay mode** (eg: reading from Parquet files).
  - Optimized for analytics, using micro-batches (instead of processing records one by one).
  - Similar to [incremental][3], it updates nodes in a dag incrementally.
  - Taking inspiration from [kafka streams][4], there are two types of nodes in the dag:
      - **Stream**: ephemeral micro-batches of events (cleared after every cycle).
      - **State**: durable state derived from streams.
  - Clear separation between the business logic and the IO.
    So the same dag can be used in real time mode, replay mode or can be easily tested.
  - Functional interface: no inheritance or decorator required.
  - Support for complicated joins, not just "linear" data flow.



  - No concurrency support.
    To speed up calculation use libraries like pandas, pyarrow or polars.
  - No async code.
    To speed up IO use kafka driver native thread or parquet IO thread pool.
  - No support for persistent state.
    Instead of saving state, replay historic data from kafka to prime stateful nodes.



  - [Unified batch and stream processing in python | PyData Global 2023][9]

  [1]: https://github.com/tradewelltech/beavers
  [2]: https://www.tradewelltech.co/
  [3]: https://github.com/janestreet/incremental
  [4]: https://www.confluent.io/blog/kafka-streams-tables-part-1-event-streaming/
  [5]: https://raw.githubusercontent.com/tradewelltech/beavers/master/docs/static/icons/beavers/logo.svg
  [6]: https://beavers.readthedocs.io/en/latest/
  [7]: https://beavers.readthedocs.io/en/latest/install/
  [8]: https://pypi.org/project/beavers/
  [9]: https://www.youtube.com/watch?v=8pUwsGA8SQM

  [pypi-image]: https://img.shields.io/pypi/v/beavers
  [pypi-url]: https://pypi.org/project/beavers/
  [build-image]: https://github.com/tradewelltech/beavers/actions/workflows/ci.yaml/badge.svg
  [build-url]: https://github.com/tradewelltech/beavers/actions/workflows/ci.yaml
  [stars-image]: https://img.shields.io/github/stars/tradewelltech/beavers
  [stars-url]: https://github.com/tradewelltech/beavers
  [versions-image]: https://img.shields.io/pypi/pyversions/beavers
  [versions-url]: https://pypi.org/project/beavers/
  [doc-image]: https://readthedocs.org/projects/beavers/badge/?version=latest
  [doc-url]: https://beavers.readthedocs.io/en/latest/?badge=latest
  [license-image]: http://img.shields.io/:license-Apache%202-blue.svg
  [license-url]: https://github.com/tradewelltech/beavers/blob/main/LICENSE
  [codecov-image]: https://codecov.io/gh/tradewelltech/beavers/branch/main/graph/badge.svg?token=GY6KL7NT1Q
  [codecov-url]: https://codecov.io/gh/tradewelltech/beavers
  [downloads-image]: https://pepy.tech/badge/beavers
  [downloads-url]: https://static.pepy.tech/badge/beavers
  [downloads-month-image]: https://pepy.tech/badge/beavers/month
  [downloads-month-url]: https://static.pepy.tech/badge/beavers/month
  [codestyle-image]: https://img.shields.io/badge/code%20style-black-000000.svg
  [codestyle-url]: https://github.com/ambv/black
  [snyk-image]: https://snyk.io/advisor/python/beavers/badge.svg
  [snyk-url]: https://snyk.io/advisor/python/beavers


pkgId: a6770e6b12b001f656f395b39d2aa4221c8dea69ca34e55018cef09b7f97a98b
name: python-bebi103
arch: src
version: 0.1.25
epoch: 0
release: 1
summary: Python utilities for the Caltech course BE/Bi 103: Data Analysis in the Biological Sciences.
url: https://github.com/justinbois/bebi103
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bebi103-0.1.25-1.src.rpm
checksum_type: sha256
description:
  [![DOI](https://data.caltech.edu/badge/44303442.svg)](https://data.caltech.edu/badge/latestdoi/44303442)

  Utilities Caltech BE/Bi 103 ab: Data Analysis in the Biological Sciences

  Please see [the documentation](http://bebi103.github.io/).


pkgId: c52660a7614eea078050ac93e3d59a073493cd5d6a7694720b0cedab58471631
name: python-bec-scan-server
arch: src
version: 1.24.1
epoch: 0
release: 1
summary: BEC scan server
url: https://gitlab.psi.ch/bec/bec
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bec-scan-server-1.24.1-1.src.rpm
checksum_type: sha256
description:
  bec-scan-server is a core Python service for the [Beamline and Experiment Control (BEC)](https://gitlab.psi.ch/bec/bec) server, tasked with the handling and orchestrating the data acquisition.



  Use the package manager [pip](https://pip.pypa.io/en/stable/) to install bec-scan-server.

  ```bash
  pip install bec-scan-server
  ```



  The documentation is part of the BEC documentation and can be found [here](https://bec.readthedocs.io/en/latest/).



  Merge requests are very welcome! For major changes, please open an issue first to discuss what you would like to change.
  All commits should use the Angular commit scheme:

  ```
  <type>(<scope>): <short summary>
    │       │             │
    │       │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
    │       │
    │       └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
    │                          elements|forms|http|language-service|localize|platform-browser|
    │                          platform-browser-dynamic|platform-server|router|service-worker|
    │                          upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
    │                          devtools
    │
    └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
  ```

  The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.


  Must be one of the following:

  * **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  * **ci**: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
  * **docs**: Documentation only changes
  * **feat**: A new feature
  * **fix**: A bug fix
  * **perf**: A code change that improves performance
  * **refactor**: A code change that neither fixes a bug nor adds a feature
  * **test**: Adding missing tests or correcting existing tests


  Please make sure to update tests as necessary.



  [BSD-3-Clause](https://choosealicense.com/licenses/bsd-3-clause/)


