# packages

pkgId: d7faccaf1f0fe5e7e332d650558e0191e0fda5006bf9d67ef3f410f465789876
name: python-battery-data-toolkit
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Utilities for reading and manipulating battery testing data
url: https://pypi.org/project/battery-data-toolkit/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battery-data-toolkit-0.4.0-1.src.rpm
checksum_type: sha256
description:
  [![Python Package](https://github.com/rovi-org/battery-data-toolkit/actions/workflows/python-package.yml/badge.svg)](https://github.com/rovi-org/battery-data-toolkit/actions/workflows/python-package.yml)
  [![Deploy Docs](https://github.com/ROVI-org/battery-data-toolkit/actions/workflows/gh-pages.yml/badge.svg?branch=main)](https://rovi-org.github.io/battery-data-toolkit/)
  [![Coverage Status](https://coveralls.io/repos/github/ROVI-org/battery-data-toolkit/badge.svg?branch=main)](https://coveralls.io/github/ROVI-org/battery-data-toolkit?branch=main)
  [![PyPI version](https://badge.fury.io/py/battery-data-toolkit.svg)](https://badge.fury.io/py/battery-data-toolkit)

  The battery-data-toolkit, `battdat`, creates consistently-formatted collections of battery data.
  The library has three main purposes:

  1. *Storing battery data in standardized formats.* ``battdat`` stores data in
     [HDF5 or Parquet files](https://rovi-org.github.io/battery-data-toolkit/user-guide/formats.html) which include
     [extensive metadata](https://rovi-org.github.io/battery-data-toolkit/user-guide/schemas/index.html).
  2. *Interfacing battery data with the PyData ecosystem*. The core data model,
     [``BatteryDataset``](https://rovi-org.github.io/battery-data-toolkit/user-guide/dataset.html),
     is built atop Pandas DataFrames.
  3. *Providing standard implementations of common analysis techniques*. ``battdat`` implements functions which
     [ensure quality](https://rovi-org.github.io/battery-data-toolkit/user-guide/consistency/index.html)
     or [perform common analyses](https://rovi-org.github.io/battery-data-toolkit/user-guide/post-processing/index.html).



  Install ``battdat`` with pip: `pip install battery-data-toolkit`



  Find the documentation at: https://rovi-org.github.io/battery-data-toolkit/



  The motivation and funding for this project came from the Rapid Operational Validation Initiative (ROVI) sponsored by the Office of Electricity.
  The focus of ROVI is "to greatly reduce time required for emerging energy storage technologies to go from lab to market by developing new tools that will accelerate the testing and validation process needed to ensure commercial success."
  If interested, you can read more about ROVI here.

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


pkgId: 88ae2001140618e03ffc8e05c6879bbf0f12cc42619c9c013d25f29f01debd29
name: python-battetl
arch: src
version: 1.1.19
epoch: 0
release: 1
summary: A Python module for extracting, transforming, and loading battery data to a database.
url: https://github.com/BattGenie/battetl
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battetl-1.1.19-1.src.rpm
checksum_type: sha256
description:
  <img src="https://raw.githubusercontent.com/BattGenie/battetl/main/images/BattETL_Logo.png">



  BattETL is a well-tested and an enterprise-ready python module for **E**xtracting, **T**ransforming, and **L**oading battery cycler data to a [database](https://github.com/BattGenie/battdb). BattETL can also be used just for data extraction and transformation if a database is not desired. Currently data from Maccor and Arbin cyclers are supported.

  <img src="https://raw.githubusercontent.com/BattGenie/battetl/main/images/BattETL_Simple_System.svg">



  - [BattETL](#battetl)
    - [Overview](#overview)
    - [Motivation](#motivation)
      - [Why another battery cycler data ingesting tool?](#why-another-battery-cycler-data-ingesting-tool)
      - [Some features of BattETL](#some-features-of-battetl)
    - [Video Guides](#video-guides)
    - [Installation](#installation)
      - [Requirements](#requirements)
        - [Software Requirements](#software-requirements)
        - [Hardware Requirements](#hardware-requirements)
      - [Installation Instructions](#installation-instructions)
    - [Usage](#usage)
      - [Quick Mode](#quick-mode)
        - [Unstructured data](#unstructured-data)
      - [Command Line Interface (CLI)](#command-line-interface-cli)
      - [Config File](#config-file)
        - [Cell Thermocouple (optional)](#cell-thermocouple-optional)
      - [Env File](#env-file)
      - [BattDB Version Check](#battdb-version-check)
      - [Data Export Requirements](#data-export-requirements)
        - [Maccor](#maccor)
        - [Arbin](#arbin)
    - [BattETL Overview](#battetl-overview)
      - [System Diagram](#system-diagram)
      - [Extractor](#extractor)
        - [Functions](#functions)
        - [Variables](#variables)
      - [Transformer](#transformer)
        - [Functions](#functions-1)
        - [Variables](#variables-1)
      - [Loader](#loader)
        - [Functions](#functions-2)
    - [Testing](#testing)
    - [API Documentation](#api-documentation)
    - [Troubleshooting](#troubleshooting)
      - [pip install psycopg2 error](#pip-install-psycopg2-error)





  There are published [open](https://github.com/TRI-AMDD/beep) [source](https://github.com/Battery-Intelligence-Lab/galvanalyser) solutions for battery cycler data ingestion. BattETL hopes to build on these tools and adds a few conveniences to support robust data management and repeatable data analytics.



  - **A relational data destination.**

  BattETL package is tightly coupled to the destination database it sends the data to. BattETL requires that for the battery data that is loaded to the database - the detailed metadata such as battery make and model, cycler make and model, and schedule/procedure information be also included. While these constraints (somewhat) slowdown the data ingestion process, it ensures verifiable, high-quality data persistance.

  - **A database that can hold *all* relevant battery test information.**

  Not only does the BattETL extract and store all the battery test data, it also captures the cycler schedule/procedure file. In addition to the schedule/procedure file, BattETL captures and stores all files associated with the schedule/procedure. This includes any current profiles (Maccor FastWave or Arbin current simulation files), EIS specifications, or even entire system specifications (Arbin batch files.)

  - **Analytics built into the transformation step.**

  As part of the transformation step BattETL calculates various cycle statistics (capacity, coulombic efficiency, CC/CV charge times, etc.) providing independent and supplemental cycle statistics to compliment those generated by the cycler software. These can particularly handy when easy-to-miss settings were overlooked in writing the schedule (e.g. forgetting to reset the capacity when incriminating the cycle.) Do you have some sort of hyper-boutique transformation or statistic calculation needed for a specific test? No problem. BattETL can apply user defined transformation functions too; all before the data is loaded to the database.



  The following are video guides BattETL and BattDB:

  - [Installation & setup](https://www.youtube.com/watch?v=tmudLhrj9xE)
  - [Design overview](https://www.youtube.com/watch?v=Y2tXInbkYF8)
  - [Demonstration](https://www.youtube.com/watch?v=3wNd3fhqBwo)



  A video showing how to setup and install BattETL and BattDB can be found [here](https://www.youtube.com/watch?v=tmudLhrj9xE)





  - Python 3.9 or 3.10
  - The required packages are listed in the `requirements.txt` file



  Based on processing approximately 10,000 rows and 12 columns with Pandas, BattETL requires a minimum of 13MB of RAM.

  - RAM: 2 GB or higher.
  - Disk Space: At least 2 GB of free space is recommended to accommodate the transformed data, as well as additional space for installation and storing data. The exact amount of disk space required will depend on the size of the data being processed and the resulting intermediate results.



  - Install BattETL using pip:

  ```sh
  pip install battetl
  ```

  - Install BattETL from source code:

  ```sh
  git clone https://github.com/BattGenie/battetl.git
  cd battetl
  pip install -r requirements.txt
  pip install .
  ```

  > Note that if you wish to use the Load feature of BattETL it is necessary to deploy an instance of a [BattDB](https://github.com/BattGenie/battdb) database to load the data to. Follow the instructions there for deploying the database.



  A video demonstrating how to use BattETL and BattDB can be found [here](https://www.youtube.com/watch?v=3wNd3fhqBwo)

  Using BattETL as an all-in-one ETL function is as easy as:

  ```python
  from battetl import BattETL

  cell = BattETL(config_path).extract().transform().load()
  ```

  Where `config_path` is the absolute or relative path to BattETL [config file](#config-file).

  It is also necessary to include an [.env file](#env-file) within the working directory that contains the associated database credentials.

  Finally, the data must be exported from the cycler in a [specific format](#data-export-requirements)

  For a practical implementation of `BattETL`, please refer to the example notebook `examples/battetl_demo.ipynb` located in the `examples` directory. This notebook demonstrates how to implement `BattETL` and can serve as a useful reference for your own project.

  > Note that repeated calls to load test data that already exists in the database (as determined by unix timestamp) will not overwrite any existing data. Only test data after the most recent existing unix timestamp will be loaded. In the case of loading cycle statistics, any duplicate cycles that already exist in the database will be overwritten.



  BattETL provides a Quick Mode, which automatically detects whether the given file is test data or test stats from a Maccor or an Arbin cycler, and uploads it to the database accordingly. Here's an example command line:

  ```bash
  python -m battetl.battetl_quick file="TEST_DATA.txt" db_url="postgres://postgres:password@localhost:5454/battdb_quick"
  ```

  This command relies on [BattDB](https://github.com/BattGenie/BattDB). If BattDB does not exist, a database will be created using Docker Compose and the data will be uploaded to it. The command also returns a harmonized Pandas dataframe that can be used for analysis and visualization.



  Quick mode also supports importing battery test data not generated by an Arbin or Maccor cycler, henceforth referred to as "unstructured data". When handling unstructured data it is necessary to include a third command line argument, `file_meta.json` that will be used to define how the data should be imported and to rename column to conform to names expected by the database. An example file_meta is given below:

  ```JSON
  {
      "pandas_read_csv_args" : {
          "delimiter":",",
          "index_col": false
      },
      "voltage_mv" :
      {
          "column_name":"volt",
          "scaling_factor":1
      },
      "current_ma" :
      {
          "column_name":"curr",
          "scaling_factor":1
      },
      "test_time_s" :
      {
          "column_name":"time",
          "scaling_factor":1
      },
      "cycle" :
      {
          "column_name":"cycl"
      }
  }
  ```

  The `pandas_read_csv_args` object holds any function arguments that should be passed to [`pandas.read_csv()`](https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html) to correctly import the data as a pandas dataframe.

  If the data is Excel, the `pandas_read_csv_args` object should be replaced with `pandas_read_excel_args` with `pandas` arguments such as `sheet_name`. For example:

  ```JSON
      "pandas_read_excel_args": {
          "sheet_name": "SHEET_NAME"
      }
  ```

  All the the other objects have the following format:

  ```JSON
  {
      "new_column_name" :
      {
          "column_name" : "existing_column_name",
          "scaling_factor": 1
      }
  }
  ```

  Where:

  - `new_column_name` is the new name of the column that should be set in the dataframe, e.g. `voltage_mv`
  - `existing_column_name` is the existing column name that should be changed to the `new_column_name`
  - `scaling_factor` *optional* provides an optional multiplicative scaling to use to scale the column value ot the desired units.

  A few notes:

  - Column decoders must be included for `voltage_mv`, `current_ma`, and `test_time_s` or `recorded_datetime` so as to match the database schema.
  - Any column can be transformed, even it is to a name that does not exist in the database schema.
  - Any column name does that does not exist in the `test_data` table will be loaded in the `other_details` column

  So, the command to run unstructured data would like the following:

  ```bash
  python -m battetl.battetl_quick file="TEST_DATA.txt" file_meta="file_meta.json" db_url="postgres://postgres:password@localhost:5454/battdb_quick"
  ```



  BattETL supports running ETL through command line as well. To create config, following command can be run:

  `battetl -c "tests/data/maccor_cycler_data/simple_data"`
  -c = create config
  tests/data/maccor_cycler_data/simple_data = path of data directory relative to the root folder of battetl.
  While creating config, data directory is a required param

  BattETL Extract:

  ```shell
  battetl -e
  battetl -e "battetl/demo_config.json"
  ```

  You have an option of providing config file. If a file is provided, it will be used as a config file. Else the file created from previous step will be used. Similarly, other commands can be run as shown below.

  BattETL Transform:

  ```shell
  battetl -t
  battetl -t "battetl/demo_config.json"
  ```

  BattETL Load:

  ```shell
  battetl -l
  battetl -l "battetl/demo_config.json"
  ```

  BattETL Extract, Transform, Load:

  ```shell
  battetl -etl
  battetl -etl "battetl/demo_config.json"
  ```



  To use BattETL it is necessary to provide a path to JSON configuration file. This config file contains paths to the relevant test data files and test metadata used for analysis and establishing database relations. An example configuration file is given within `examples/battetl_config_example.json`

  ```json
  {
      "timezone": "America/Los_Angeles",
      "data_file_path": [
          "abs/path/to/your/arbin/or/maccor/test/data/file(s).txt"
      ],
      "stats_file_path": [
          "abs/path/to/your/arbin/or/maccor/test/stats/file.txt"
      ],
      "schedule_file_path": [
          "abs/path/to/your/schedule/or/procedure/file(s).000"
      ],
      "meta_data": {
          "test_meta": {
              "test_name": "the_name_of_your_test",
              "channel": 10
          },
          "cell": {
              "manufacturer_sn": "0001"
          },
          "cell_meta": {
              "manufacturer": "FakeMN",
              "manufacturer_pn": "1234"
          },
          "schedule_meta": {
              "schedule_name": "fake_schedule.000",
              "cycler_make": "BattGenie"
          },
          "cycler": {
              "sn": "0001"
          },
          "cycler_meta": {
              "manufacturer": "BattGenie",
              "model": "Cycler9000"
          },
          "customers": {
              "customer_name": "FakeCustomer"
          },
          "projects": {
              "project_name": "FakeProject"
          }
      }
  }
  ```



  If the cell has a thermocouple, it is necessary to include the following in the header of the config file:

  ```json
  "cell_thermocouple": 1
  ```

  where `1` corresponds to the thermocouple index in the cycler test data export, i.e `Temp 1` for Maccor and `Aux_Temperature_1 (C)` for Arbin.

  If no cell thermocouple value is listed, `calculated_max_charge_temp_c` and `calculated_max_discharge_temp_c` will be set to `null` in the `test_data_cycle_stats` table.



  The .env contains the associated database credentials and is formatted as follows

  ```text
  ENV=dev # dev, prod

  DB_TARGET=YOUR_DATABASE_NAME
  DB_USERNAME=YOUR_USERNAME
  DB_PASSWORD=YOUR_PASSWORD
  DB_HOSTNAME=localhost
  DB_PORT=5432




  ```

  `BATTVIZ_URL` is optional. If it is provided, the BattETL will show the link to BattViz dashboard in the logs.

  An example .env file is given within `examples/.env.example`



  A version check was added to make sure that the correct database migrations have been applied before BattETL tries to load data into the database to ease safe schema updates. Please update the `battetl/constants.py` lines below with the latest schema version:

  ```python
  BATTDB_SCHEMA_VERSION = 9.1
  ```



  - [For Maccor Cycler](#maccor)
  - [For Arbin Cycler](#arbin)



  From the "Maccor Export" tool data should be exported as "Text Output" in a "Tab Delimited" format. The output sheets should include "Data Records" and "Cycle Statistics". The box for "Discharge Current Exported Negative" should be checked.

  The following columns are the minimum required for export:

  For Data Records:

  - Cycle : Header Label of Cyc#
  - Step : Header Label of Step
  - Test Time : Header Label of TestTime(s), Units of seconds
  - Step Time : Header Label of StepTime(s), Units of seconds
  - Capacity : Header Label of Capacity(Ah), Units of Amp-Hour
  - Energy : Header Label of Watt-hr, Units of Watt-hour
  - Current : Header Label of Current(A), Units of Amps
  - Voltage : Header Label of Voltage(V), Units of Volts
  - DPT Time : Header label of DPt Time

  <img src="https://raw.githubusercontent.com/BattGenie/battetl/main/images/MaccorExport_DataRecords.png" width="85%" height="50%">

  For Cycle Statistics:

  - Cycle : Header Label of Cycle
  - Capacity Chg : Header label AH-IN, Units of Ahr
  - Capacity Dis : Header label AH-Out, Units of Ahr
  - DPT Time : Header Label of DPt Time

  <img src="https://raw.githubusercontent.com/BattGenie/battetl/main/images/MaccorExport_CycleStats.png" width="85%" height="50%">



  Within the Arbin Export tool the "File Type" should be set to "To CSV". Within "Data Filter" the box "statistics by Cycle" should be checked along with any other data. For range filter "All" should be selected.

  <img src="https://raw.githubusercontent.com/BattGenie/battetl/main/images/ArbinExport.jpg" width="45%" height="25%">

  An example notebook `battetl_demo.ipynb` that provides a tool to help generate config files is located in the `examples` directory.



  A video discussing the design of BattDB and BattETL can be found [here](https://www.youtube.com/watch?v=Y2tXInbkYF8)

  BattETL bundles together the three independent submodules:

  - [Extractor](#extractor) : Responsible for extractor the cycler data and schedule/procedure files.
  - [Transformer](#transformer) : Responsible for transforming cycler data
  - [Loader](#loader) : Responsible for loading data and associated data to the database.

  After running BattETL on a specific configuration file the following objects will be available as class variables from the instance:

  - `raw_test_data: pandas.DataFrame`: The raw test data exactly as it is in the generated cycler data file(s).
  - `raw_cycle_stats: pandas.DataFrame`: The raw cycle stats data exactly as it is in the generated cycler statistics file.
  - `test_data: pandas.DataFrame`: The transformed test data after normalizing units and datatype and adding a unixtime column.
  - `cycle_stats: pandas.DataFrame`: The transformed cycle stats after normalizing units, datatypes, and calculating supplemental cycle statistics.
  - `schedule: dict`: The procedure/schedule file and all associated files in a nested Dictionary.



  <img src="https://raw.githubusercontent.com/BattGenie/battetl/main/images/BattETL_SystemDiagram.svg">



  The Extractor is an interface that allows you to extract battery test data from raw data files. You can extract test data and cycle stats data from multiple files using `data_from_files`, and extract Arbin schedules or Maccor procedures and associated files using `schedule_from_files`.

  For an example of the Extractor as a standalone class, see `examples/submodule_demos/Extractor_demo.ipynb`



  - `data_from_files(paths: list[str])`: Extracts multiple test data files into a single pandas DataFrame.
  - `schedule_from_files(paths: list[str])`: Extracts Arbin schedules or Maccor procedures and associated files and stores them in a dictionary.
  - `from_pickle(path: str)`: Reads data from the passed file path and returns it as a pandas DataFrame.



  - `cycler_make: str`: Cycler make
  - `raw_test_data_meta_data: list[dict]`: Test data meta data
  - `raw_cycle_stats_meta_data: list[dict]`: Cycler stats meta data
  - `raw_test_data: pandas.DataFrame`: Test data
  - `raw_cycle_stats: pandas.DataFrame`: Cycler stats
  - `maccor_procedure: dict`: Maccor procedure
  - `arbin_schedule: dict`: Arbin schedule



  The Transformer is an interface that allows you to transform battery test data to the BattETL schema. By default, the time zone is set to 'America/Los_Angeles', but you can modify it to your preferred time zone using the names found in the [IANA Time Zone Database](https://www.iana.org/time-zones). In addition to the default functions provided by the Transformer, you can add your own custom functions to perform specific transformations on your data.

  For an example of the Extractor as a standalone class, see `examples/submodule_demos/Transformer_demo.ipynb`



  - `transform_test_data(self, data: pd.DataFrame)`: Transforms test data to conform to BattETL naming and data conventions
  - `transform_cycle_stats`: Transforms cycle stats to conform to BattETL naming and data conventions



  - `timezone: str`: Time zone strings in the IANA Time Zone Database. Used to convert to unix timestamp in seconds. Default 'America/Los_Angeles'.
  - `user_transform_test_data`: A user defined function to transform test data. The function should take a pandas.DataFrame as input and return a pandas.DataFrame as output.
  - `user_transform_cycle_stats`: A user defined function to transform cycle stats. The function should take a pandas.DataFrame as input and return a pandas.DataFrame as output.
  - `test_data: pandas.DataFrame`: Transformed test data
  - `cycle_stats: pandas.DataFrame`: Transformed cycle stats



  The `load` module provides an interface to load the extracted data into a database.

  Note that repeated calls to load test data that already exists in the database (as determined by unix timestamp) will not overwrite any existing data. Only test data after the latest existing unix timestamp will be loaded. In the case of loading cycle statistics, any duplicate cycles that already exist in the database will be overwritten.

  For an example of the Extractor as a standalone class, see `examples/submodule_demos/Loader_demo.ipynb`



  - `load_test_data(test_data_df)`: Loads test_data_df to `test_data` table in the specified database.
  - `load_cycle_stats(cycle_stats_df)`: Loads cycle_stats_df to `test_data_cycle_stats` table in the specified database.



  To run the test suite, use the following commands:

  - Run all tests: `pytest`
  - Run Maccor tests: `pytest -m maccor`
  - Run Arbin tests: `pytest -m arbin`
  - Run database specific tests: `pytest -m database`
  - Run tests other than Arbin: `pytest -m "not arbin"`
  - Run Extractor tests: `pytest tests/test_extract_data.py`

  To show logs while testing, add the `-o log_cli=true` flag.



  To regenerate the API documentation, run `docker compose -f docker-compose-battetl.yml up --build --force-recreate`. The generated documentation can be found in the `docs\build` directory and open the `index.html` in any web browser to view the documentation.





  If there is an error `Error: pg_config executable not found.` Try installing `libpq-dev` before installing `psycopg2`

  ```sh
  sudo apt install libpq-dev
  ```


pkgId: 4766faa6c1c0d7fe2d51dabc4ec8f43deaa41bd52bfdd4fe1e29f96fdd21d632
name: python-batting-order-analysis
arch: src
version: 0.0.52
epoch: 0
release: 1
summary: Analysis of different batting orders given a lineup
url: https://github.com/drewscottt/batting_order_analysis
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batting-order-analysis-0.0.52-1.src.rpm
checksum_type: sha256
description:
  Simulates every possible batting order for a given lineup and displays summary statistics of
  the average runs (over a number of games) of the orders, and specific information about the
  top and bottom 5 orders. The user may choose how many games each order is simulated for,
  which players are in the lineup, or what each player's PA outcomes are in a single game
  (see sample files).


  [Baseball Savant Custom Data](https://baseballsavant.mlb.com/leaderboard/custom?year=2021&type=batter&filter=&sort=0&sortDir=desc&min=50&selections=b_total_pa,b_single,b_double,b_triple,b_home_run,b_strikeout,b_walk,on_base_percent,on_base_plus_slg,b_catcher_interf,b_hit_by_pitch,b_out_fly,b_out_ground,b_out_line_drive,b_out_popup,r_caught_stealing_2b,r_caught_stealing_3b,r_caught_stealing_home,r_stolen_base_2b,r_stolen_base_3b,r_stolen_base_home,woba,pull_percent,straightaway_percent,opposite_percent,&chart=false&x=b_total_pa&y=b_total_pa&r=no&chartType=beeswarm)


  1) Determine the accurate likelihoods of sacrifices and double plays for different out types
  2) Enable some sort of pinch hitting scheme (right now, each player hits the entire game)
  3) Enable some sort of pitcher dependent hitting results (even as simple as right-y/left-y;
      right now hitting stats are full season aggregates)
  4) Include edge cases like stealing, wild pitches, etc.
  5) More detailed data (i.e. did a double go to right or left field?)
  6) Player specific data (i.e. how often does a player try to steal?)


      pip install batting-order-analysis
  [View on PyPI](https://pypi.org/project/batting-order-analysis/)


  driver.py and driver.ipynb supply a basic interface, check them out


pkgId: 0ae8c32b55159e6f686a1e38daad0463d100e77595ab50e01b7d246e72b7be14
name: python-battle-cats-save-editor
arch: src
version: 2.7.2.4
epoch: 0
release: 1
summary: A battle cats save file editor
url: https://github.com/fieryhenry/BCSFE-Python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battle-cats-save-editor-2.7.2.4-1.src.rpm
checksum_type: sha256
description:
  1. Install python (You'll need version 3.9 and up) <https://www.python.org/downloads/>
  2. Enter the command: `py -m pip install -U battle-cats-save-editor` into command prompt or another terminal to install the editor (**NOT the Windows Python app**). If that doesn't work then use `python3` or `python` instead of `py` in the command
  3. Enter the command: `py -m BCSFE_Python` to run the editor. If that doesn't work then use `python3` or `python` instead of `py` in the command
  4. Look below for the tutorial that you need, or watch [here](https://www.youtube.com/watch?v=Kr6VaLTXOSY) for a video

  If you don't have a rooted device or an emulator setup then do this:
  5. Go into the game and look in the top right of the screen and record / remember the game version
  6. Go into the in-game transfer system in `Settings-> Data Transfer` and click `Begin Data Transfer`
  7. In the editor use the option called `Download save data from the game using transfer and confirmation codes` (enter the corresponding number, not the name itself)
  8. Enter the game version that you are using, `en`=english, `kr`=korean, `ja`=japanese, `tw`=taiwan.
  9. Enter your transfer code
  10. Enter your confirmation code
  11. Enter the game version that you recorded earlier in step 5. If you entered everything in correctly it should work and you should be able to select a place to put the save
  12. If you get a parsing error please join the [discord server](https://discord.gg/DvmMgvn5ZB) and report it in #bug-reports and / or dm me your save file (preferably <b>not</b> transfer codes)
  13. Edit what you want
  14. 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
  15. 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)
  16. If you press play you may get a `The current Save Data is in violation` message, if so press ok and try again and it should go away, if it doesn't look at the tutorial below

  If you can't upload your save data using the in-game system because your are banned or the `This save data is currently active elsewhere` message appears, you will need direct access to the save data:
  If you don't have a rooted device:
  5. You will need to get one of the emulators listed earlier, I recommend LD Player because I know that it works with this method. If you change the default install location, make sure to keep a note of it for it later
     1. Enable `root permission` in the settings and under `ADB Debugging` select `Open local connection`. You will need to restart LD Player for the changes to work
     2. Open the editor and select the option named `Use adb to pull the save from a rooted device` and enter your game version
  6. If you get the option to add adb to your path, select enter `y`.
  7. The editor will look for adb in default install directories of common emulators and add it automatically
  8. If it fails, then you will need to either
     1. Enter the path to your emulator's install directory, it might look like `C:\LDPlayer\LDPlayer4.0`
     2. Download adb with from [here](https://dl.google.com/android/repository/platform-tools-latest-windows.zip). Extract the zip and copy the folder path (not adb.exe itself) into the editor
  9. Now rerun the editor and try the option again. If it still doesn't work you'll need to manually do it, using the tutorial below.
  10. If you get a parsing issue please join the [discord server](https://discord.gg/DvmMgvn5ZB) and report it in #bug-reports and / or dm me your save file (preferably not transfer codes)
  11. Edit what you want
  12. Go into save management and select an option to push save data to the game
  13. Enter the game and you should see changes

  To use the options in the editor to get and push your save data to the game, you will need to have adb in your path system environment variable. The editor will try to do this automatically, but it may not work. So do this if it doesn't (If you're not using windows look up how to do this):
  1. If you are using an emulator: Go to your emulator's install directory, if you're
     using LDPlayer it will most likely be in `C:/LDPlayer/LDPlayer4.0`.
     Then find `adb` in that folder (other emulators might have it in the `bin` directory)
  2. If you aren't using an emulator [Download the Android SDK Platform Tools ZIP file for Windows](https://dl.google.com/android/repository/platform-tools-latest-windows.zip), and unzip it.
  3. Copy the path to the folder that you are in (not adb.exe itself)
  4. Then open the windows start menu and search: `edit the system environment variables` and press enter.
  5. Then click on the `Environment Variables` button.
  6. Then in the `System variables` box find the variable named `Path`, then
     click on the `edit` button.
  7. Then click `New` and paste the path into it.
  8. Click `Ok` then `Ok` again then `Ok` again.
  9. Relaunch powershell and maybe restart your whole pc, and try the command
     again.
  If this method is too difficult, just use a root file explorer instead
      and manually get the files that you want. The path that you will need is: `/data/data/jp.co.ponos.battlecatsen/files/SAVE_DATA`

  1. You will need to get access to save data so you will need a rooted device / emulator, so look at the first part of the `Using a rooted device` tutorial.
  2. Select the option in `Inquiry Code / Token` to `Fix elsewhere error / Unban account`
  3. 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.
  4. If you press play you may get a `The current Save Data is in violation` message, if so press ok and try again and it should go away, if it doesn't then either you've done something wrong or the process didn't work. You may need to follow the tutorial in the second part of the old help video [here](https://www.youtube.com/watch?v=xBnGR1A3A-U) (3:40) and use the `Old Fix elsewhere error / Unban account (needs 2 save files)` feature instead

  You can get banned for editing in any amount of cat food, rare tickets, platinum tickets or legend tickets.
  The way you fix it is the same method as the elsewhere fix, so just follow that.

  - 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
  2. Install F-Droid
  3. Open it and wait for it to finish `Updating repositories`
  4. Tap the green search button in the bottom right and search for `Termux`
  5. Tap `Termux Terminal emulator with packages`
  6. Tap `INSTALL` and then `OPEN` once installed
  7. Once opened enter the command `pkg install python`
  8. If that doesn't work then read this: <https://stackoverflow.com/a/71097459>
  9. Then run `python -m pip install -U battle-cats-save-editor`
  10. If that doesn't work then run `pkg upgrade` and try again
  11. Then run `python -m BCSFE_Python`
  12. You can then use the editor like normal (If asked to enter the path to a save file, then just enter `SAVE_DATA`)

  If you want the latest features and don't mind bugs 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
  py -m pip install -e BCSFE-Python/
  py -m BCSFE_Python
  ```
  If you want to use the editor again all you need to do is run the `py -m BCSFE_Python` 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)


pkgId: 5e1a8abc66dbe70f2fa6aef11106c1f111144a82a3b12802180c6bebb2f70b83
name: python-battle-map-tv
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: Display battle maps for TTRPGs on a secondary tv
url: https://github.com/Conengmo/battle-map-tv
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battle-map-tv-0.6.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/battle-map-tv)](https://pypi.org/project/battle-map-tv/)
  [![Tests](https://github.com/Conengmo/battle-map-tv/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/Conengmo/battle-map-tv/actions/workflows/pytest.yml)
  [![Mypy](https://github.com/Conengmo/battle-map-tv/actions/workflows/mypy.yml/badge.svg)](https://github.com/Conengmo/battle-map-tv/actions/workflows/mypy.yml)
  [![Ruff](https://github.com/Conengmo/battle-map-tv/actions/workflows/ruff.yml/badge.svg)](https://github.com/Conengmo/battle-map-tv/actions/workflows/ruff.yml)



  Display battle maps for TTRPGs on a tv or monitor that lies flat horizontally on your table.

  No more features than needed: just show an image the way you want. Optionally add a grid, initiative order and area of effect shapes.

  For GM's with little time or who improvise their sessions: much easier to use in-session than a full blown VTT.

  ![screenshot](https://github.com/Conengmo/battle-map-tv/assets/33519926/e6b5152f-b4d6-4856-82c8-eac182b2a3a3)



  - Works on Linux, macOS and Windows by using Python.
  - Doesn't use a browser.
  - Free and open source
  - Works offline
  - Simple UI
  - Two windows:
    - one on the TV with your map and grid on it
    - one on your GM laptop with controls
  - Import local image files to display on the tv.
  - Scale, pan, center and rotate the image.
  - Store the physical size of your screen to enable grid and autoscaling.
  - Overlay a 1-inch grid.
  - Automatically detect the grid in an image and scale to a 1 inch grid.
  - Save settings so images load like you had them last time.
  - Simple initiative tracker
  - Overlay area of effects
    - snap to grid
    - rasterize to grid




  - Open terminal or cmd.
  - Check that you have Python installed by running the `python --version` command.
    - If you don't have Python, it's easy to install. See here: https://wiki.python.org/moin/BeginnersGuide/Download
  - Install Battle Map TV with this command: `python -m pip install battle-map-tv`
  - Then run it with: `python -m battle_map_tv`




  - Drag the TV window to your TV and make it fullscreen with the 'fullscreen' button.
  - Use the 'add' button to load an image.
  - You can drag the image to pan. Zoom with your mouse scroll wheel or use the slider in the controls window.
  - Close the application with the 'exit' button.



  There are two text boxes to enter the physical dimensions of your secondary screen in milimeters.
  This is needed to display a grid overlay and autoscale the image to 1 inch.



  In the controls window, you can add players and their initiative. The list will be sorted automatically.
  Just put a number and a name on each line, for example "1 barbarians" and "20 heroes".

  The '+' and '-' buttons increase and decrease the font size.

  The 'move' button moves the lists to different positions and rotations on the screen.



  Click on one of the buttons for a shape like 'circle' or 'square'. Then click and drag anywhere in the TV window
  to create the shape in the size you want.

  The default color for shapes is white, but you can also toggle another color with the color buttons.

  You can delete a shape by right-clicking on it, or by using the 'Clear' button.

  If the grid is enabled, points will automatically snap to the grid.

  If you click 'rasterize', the edges of the shapes you make will fit the grid.

  When creating a shape, hold 'shift' to freeze the size of the shape, but keep rotating.




  - Uses [PySide6](https://wiki.qt.io/Qt_for_Python) for the graphical user interface.
  - Uses [OpenCV](https://github.com/opencv/opencv-python) to detect the grid on battle maps.
  - Uses [Hatch](https://hatch.pypa.io/latest/) to build and release the package.


pkgId: feb379eceeaad79eb6d62dedbba1e959997194057f81226b1af7fc53bdeccb91
name: python-battlemetrics
arch: src
version: 1.0.13
epoch: 0
release: 1
summary: Battlemetrics API wrapper.
url: https://github.com/Gnomeslayer/battlemetrics
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battlemetrics-1.0.13-1.src.rpm
checksum_type: sha256
description:
  This repository allows users to quickly and easily pull data from the Battlemetrics API. Removing a lot of the guesswork when reading the API.




  For the javascript equivalent, visit this repository: https://github.com/cubiquitous/battlemetrics-js


  Please note that I am an individual member of the community and not affiliated with Battlemetrics. The resources provided here are developed to facilitate the usage of the Battlemetrics API but come with no official endorsement or sponsorship from Battlemetrics.

  It's important to understand that any actions you take using these resources are solely your responsibility. I am not liable for any damage or consequences that may occur to your server or account. Please exercise caution and ensure that you follow best practices when using the API.



  To begin using the Battlemetrics API, make sure you have RCON access and an API token. If you don't have an API token yet, you can obtain one by visiting the [Battlemetrics developers page](https://www.battlemetrics.com/developers).



  1. Clone or Install this repo:

     Clone this repository
     ```bash
     git clone https://github.com/Gnomeslayer/battlemetrics.git
     ```
     Pip install
     ```bash
     pip install battlemetrics
     ```

  2. Install the required dependencies

     or you can do:
     ```bash
     pip install -r requirements.txt
     ```

  3. Import the `Battlemetrics` class into your project.
     ```bash
     from battlemetrics import Battlemetrics
     ```


  Refer to example file for examples.
  Here's an example of how to use the Battlemetrics API wrapper:
  ```bash

  bmapi = battlemetrics("Your token here")


  player = asyncio.run(bmapi.player.search(12345))


  print(player)
  ```
  Make sure to replace `"Your API token here"` with your actual API token obtained from the Battlemetrics developers page.



  For more details on the Battlemetrics API and its capabilities, refer to the official [Battlemetrics API](https://www.battlemetrics.com/developers/documentation).


  If you find any issues or have suggestions for improvement, please feel free to submit a pull request or open an issue in the [issue tracker](https://github.com/Gnomeslayer/battlemetrics/issues). I welcome contributions from the community!


  You can contact me on Discord, simply add me: gnomeslayer
  or, you can join the official [Battlemetrics discord](https://discord.gg/xWa3UNG4yh) and @gnomeslayer there.



  This repository will ALWAYS be free and hopefully regularly updated, but if you want to support me, you can do so [Here](https://ko-fi.com/gnomeslayer)


pkgId: f8ea1fd3b049da51caf5e9967d270dd729386b585942931f0ccee32ca88f4484
name: python-battleship-tui
arch: src
version: 0.24.1
epoch: 0
release: 1
summary: Battleship TUI is an implementation of the popular paper-and-pen Battleship game for your terminal.
url: https://github.com/Klavionik/battleship-tui
rpm_license: GPL-2.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battleship-tui-0.24.1-1.src.rpm
checksum_type: sha256
description:
  ![Battle](screenshots/battle.png)
  [![PyPI - Version](https://img.shields.io/pypi/v/battleship-tui)](https://pypi.org/project/battleship-tui)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/battleship-tui)
  [<img src="https://uptime.klavionik.dev/api/badge/1/status?upLabel=online&downLabel=offline">](https://uptime.klavionik.dev/status/battleship)


  Battleship TUI is an implementation of the popular paper-and-pen Battleship game for
  your terminal. You can play against the computer or a real player via the Internet,
  customize game options and appearance, keep track of your achievements, and more.

  > [!NOTE]
  > Please consider this an alpha-version software. You can still use it and enjoy it
  > but note that things may break and data might get lost. Feel free to fill in an issue
  > if you've found a bug or have a question.


  * Singleplayer mode
  * Multiplayer mode (via Internet)
  * Customizable game rules
  * Customizable UI
  * Launch via CLI
  * Game statistics


  * Ranking system
  * Account management


  * A terminal (Windows PowerShell is fine too, see below)
  * Python 3.10 or higher

  > [!NOTE]
  > If you're on Windows, **make sure** to install [the newer Windows Terminal](https://apps.microsoft.com/detail/9N0DX20HK701?hl=en-us&gl=US).
  > The older Windows PowerShell can't properly display some symbols.


  If you're on Linux or macOS, most probably you already have Python installed. You can verify it by
  running `$ python --version`. If your Python version is lower than required, try installing the
  latest operating system updates.

  If you're on Windows, you can download and install the latest Python release from the
  [official site](https://www.python.org/downloads/windows/).

  The recommended way to install and update the game is via
  [pipx](https://pypa.github.io/pipx/) (especially if you don't know anything about
  virtual environments).

  Install `pipx`, then install the game.

  ```shell
  pipx install battleship-tui[client]
  ```

  `battleship-tui` is merely a Python package and is distributed via PyPI. You can
  install it via `pip` too, but make sure it installs into a venv so that you're not
  messing with the system interpreter.


  Once the game is installed you can use the `battleship` command to run it. This
  command will launch the user interface and present you with the main menu.


  You can launch the game via CLI subcommands too, especially if you want to skip some
  in-game menus.

  For example, if your favorite game mode is singleplayer, salvo variant, you can
  quickly get into battle by running `battleship play single --salvo`.

  Run `battleship play --help` to discover available options.


  You can play Battleship TUI with your friends or colleagues via the Internet. Choose
  **Multiplayer** option in the main menu to do this.


  You may sign up for a multiplayer account or try multiplayer with guest access.

  To sign up, run `battleship account signup`. You'll be prompted with your email,
  desired nickname, and a password. Your nickname will be displayed in-game. It should
  contain 7 to 20 characters and be unique. Your password should contain at least 9
  characters.

  > [!NOTE]
  > Guests given an autogenerated nickname, their game statistics isn't saved. Guest
  > access will work until you log off.


  <details>
  <summary>Expand to see more screenshots</summary>


  ![Main menu](screenshots/main_menu.png)


  ![Summary](screenshots/summary.png)


  ![Awaiting](screenshots/multiplayer.png)


  ![Sessions](screenshots/sessions.png)
  </details>


pkgId: 1addf40ff299db69ced1f7a00e8b4b984d3fd728e09b19635978f388e8591cb7
name: python-battoul-package-lab4-cookie
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: An awesome package that does something
url: http://pypi.python.org/pypi/your_package_name/
rpm_license: LICENSE.txt
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battoul-package-lab4-cookie-1.0.0-1.src.rpm
checksum_type: sha256
description:
  `package_name` is a Python library for ..........



  Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `package_name`.

  ```bash
  pip install package_name
  ```



  ```python
  import package_name


  package_name.module_name('word')


  package_name.module_name('goose')


  package_name.module_name('phenomena')
  ```


  [MIT](https://choosealicense.com/licenses/mit/)


pkgId: adba8ca1df6c0284cc1f9fc31d1403006ce3271bb008d843057b6c5e8e33cb91
name: python-batutils
arch: src
version: 2.0.0
epoch: 0
release: 1
url: https://github.com/doddi79/batutils
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batutils-2.0.0-1.src.rpm
checksum_type: sha256
summary:
  Team Batcave's utilities for date and/or time objects and values and messing with types and so much more.

description:
  The `batutils` is a fork of the `batutils` package in order to continue its
  development and maintenance beyond Team Batcave's lifespan.

  It is a smooshup of a few Python packages from the CCP Tools Team of old (Team
  Batcave).

  Our two most commonly used internal packages, called `datetimeutils` and
  `typeutils` were too _generically_ named for Pypi.org and since they were
  both used in something like 80-90% of our other projects, it made sense to
  just smoosh them together in one module, and thus, the `batutils` package
  was born.

  Here's the README of the [Date Time Utils](batutils/dtu/README.md) submodule.

  Here's the README of the [Type Utils](batutils/tpu/README.md) submodule.




  The `legacyapi` submodule has been removed.




  The old `datetimeutils` package is now included here as the `dtu` submodule.

  ```python
  from batutils import dtu
  ```



  Importing `*` from the `structs` submodule will import all of the most
  commonly used imports in our projects:
  ```python
  from typing import *  # For type annotation

  import abc  # For interfaces (Abstract Base Classes)
  import dataclasses  # For dataclass structs
  import decimal  # Used whenever we're handling money
  import enum  # Also used for struct creation
  import logging  # Used pretty much everywhere
  import re  # Used surprisingly frequently
  import time  # Very commonly used
  ```

  Note that datetime is not included in this. That's because tt'll also import
  the aliases from the Datetime Utils (`batutils.dtu.structs.aliases`)
  package instead:

  ```python
  Date = datetime.date
  Time = datetime.time
  Datetime = datetime.datetime
  TimeDelta = datetime.timedelta
  TzInfo = datetime.tzinfo
  TimeZone = datetime.timezone
  ```

  Furthermore, it'll also include a few of the most commonly used utility
  classes from the Type Utils submodule:

  - The `Singleton` Meta Class
  - The `Empty` and `EmptyDict` classes as well as the `if_empty` method
  - The `EnumEx` base class for Enums with the `from_any` class method

  So in most cases we can cover something like 90% of any imports we tend to
  need in every Python file with a single line:

  ```python
  from batutils.structs import *
  ```

rpm_license:
  MIT License  Copyright (c) 2024 Thordur Matthiasson Copyright (c) 2013-2024 CCP Games  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: df78c7b57ae1b3f4b8cc1574056a432060d9b9d4145cdf8a689afeb50e7faad5
name: python-bauh
arch: src
version: 0.10.7
epoch: 0
release: 1
summary: Graphical interface to manage Linux applications (AppImage, Arch / AUR, Flatpak, Snap and Web)
url: https://pypi.org/project/bauh/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bauh-0.10.7-1.src.rpm
checksum_type: sha256
description:
  [![GitHub release](https://img.shields.io/github/release/vinifmor/bauh.svg?label=Release)](https://github.com/vinifmor/bauh/releases/) [![PyPI](https://img.shields.io/pypi/v/bauh?label=PyPI)](https://pypi.org/project/bauh) [![AUR](https://img.shields.io/aur/version/bauh?label=AUR)](https://aur.archlinux.org/packages/bauh) [![AUR-staging](https://img.shields.io/aur/version/bauh-staging?label=AUR-staging)](https://aur.archlinux.org/packages/bauh-staging) [![License](https://img.shields.io/github/license/vinifmor/bauh?label=License)](https://github.com/vinifmor/bauh/blob/master/LICENSE) [![kofi](https://img.shields.io/badge/Ko--Fi-Donate-orange?style=flat&logo=ko-fi)](https://ko-fi.com/vinifmor)

  **bauh** (baoo), formerly known as [fpakman](https://github.com/vinifmor/fpakman), is a graphical interface for managing your Linux software (packages/applications). It currently supports the following formats: AppImage, Debian and Arch Linux packages (including AUR), Flatpak, Snap and Web applications.

  Key features
  - A management panel where you can: search, install, uninstall, upgrade, downgrade and launch your applications
  - Tray mode: it launches attached to the system tray and publishes notifications when there are software updates available
  - System backup: it integrates with [Timeshift](https://github.com/teejee2008/timeshift) to provide a simple and safe backup process before applying changes to your system
  - Custom themes: it's possible to customize the tool's style/appearance. More at [Custom themes](#custom_themes)


  <p align="center">
      <img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/panel-themes.gif">
  </p>



  1. [Installation](#installation)
      - [AppImage](#inst_appimage)
      - [Ubuntu 20.04 based distros (Linux Mint, PopOS, ...)](#inst_ubuntu)
      - [Arch-based distros](#inst_arch)
  2. [Isolated installation](#inst_iso)
  3. [Desktop entry / menu shortcut](#desk_entry)
  4. [Autostart: tray mode](#autostart)
  5. [Distribution](#dist)
  6. [Supported types](#types)
      - [AppImage](#type_appimage)
      - [Arch packages/AUR](#type_arch)
      - [Debian](#type_deb)
      - [Flatpak](#type_flatpak)
      - [Snap](#type_snap)
      - [Native Web applications](#type_web)
  7. [General settings](#settings)
     - [Forbidden packaging formats](#forbidden_gems)
     - [Custom suggestions / curated software](#suggestions)
  8. [Directory structure, caching and logs](#dirs)
  9. [Custom themes](#custom_themes)
  10. [Tray icons](#tray_icons)
  11. [CLI (Command Line Interface)](#cli)
  12. [Improving performance](#performance)
  13. [bauh-files](#bauh_files)
  14. [Code structure](#code)
  15. [Roadmap](#roadmap)
  16. [Contributing](https://github.com/vinifmor/bauh/blob/master/CONTRIBUTING.md)
  17. [Donations](#donations)








  - `fuse`: the package name may vary from distribution
  - `qt5dxcb-plugin` (or equivalent): the package name may vary from distribution


  - Download the .AppImage file attached with the latest release from https://github.com/vinifmor/bauh/releases
  - Generally the desktop environment allows you to double-click the downloaded file to execute it. If that's not your case, follow the steps below from a console:
      - `chmod a+x bauh-${version}-x86_64.AppImage` (replace `${version}` by the respective downloaded version)
      - `./bauh-${version}-x86_64.AppImage`
  - If you want to integrate bauh to your desktop: click on bauh's settings menu ("sandwich") and then `Install bauh`

  <p align="center">
    <img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.10.0/appim_self.png">
  </p>






  `sudo apt-get install python3 python3-pip python3-yaml python3-dateutil python3-pyqt5 python3-packaging python3-requests`



  `sudo pip3 install bauh`




  - `aptitude`: Debian package management
  - `timeshift`: system backup
  - `aria2`: multi-threaded downloads
  - `axel`: multi-threaded downloads alternative
  - `libappindicator3-1`: tray-mode
  - `sqlite3`, `fuse`: AppImage support
  - `flatpak`: Flatpaks support
  - `snapd`: Snaps support
  - `python3-lxml`, `python3-bs4`: Web apps support
  - `python3-venv`: [isolated installation](#inst_iso)
  - `xdg-utils`: to open URLs in the browsers (`xdg-open`)



  Method 1

  `sudo pip3 install bauh --upgrade`

  Method 2

  ```
  sudo pip3 uninstall bauh
  sudo pip3 install bauh
  ```



  ```
  bauh --reset  # removes cache and configurations files from HOME
  sudo pip3 uninstall bauh
  ```






  `yay -S bauh`




  ```
  git clone  https://aur.archlinux.org/bauh.git
  cd bauh
  makepkg -si
  ```



  - `timeshift`: system backup
  - `aria2`: multi-threaded downloads
  - `axel`: multi-threaded downloads alternative
  - `libappindicator-gtk2`: tray-mode (GTK2 desktop environments)
  - `libappindicator-gtk3`: tray-mode (GTK3 desktop environments)
  - `xdg-utils`: to open URLs in the browser (`xdg-open`)
  - `sqlite`, `fuse2`, `fuse3`: AppImage support
  - `flatpak`: Flatpak support
  - `snapd`: Snap support
  - `pacman`: ArchLinux package management support
  - `python-lxml`, `python-beautifulsoup4`: Web apps support
  - `python-venv`: [isolated installation](#inst_iso)



  ```
  bauh --reset  # removes cache and configurations files from HOME
  pacman -R bauh
  ```




  If you prefer an isolated installation from the system libraries, type the following commands:

  ```
  python3 -m venv bauh_env       # creates an isolated environment inside the directory called "bauh_env"
  bauh_env/bin/pip install bauh  # installs bauh in the isolated environment
  bauh_env/bin/bauh              # launches bauh. For the tray-mode: bauh_env/bin/bauh-tray
  ```


  Updating bauh

  ```
  bauh_env/bin/pip install bauh --upgrade
  ```

  Uninstalling bauh

  ```
  bauh_env/bin/bauh --reset  # removes cache and configurations files from HOME
  rm -rf bauh_env` (just remove the directory)
  ```




  To create a shortcut for bauh on your desktop menu:

  - Copy the files from [bauh/desktop](https://raw.githubusercontent.com/vinifmor/bauh/master/bauh/desktop/bauh.desktop) to `~/.local/share/applications` (or `/usr/share/applications` for **root**)
  - Replace the `Exec` field on theses files by the bauh binary path. e.g: `Exec=/usr/bin/bauh` (or `bauh_env/bin/bauh`)
  - Copy [logo.svg](https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/logo.svg) to `/usr/share/icons/hicolor/scalable/apps` as `bauh.svg`




  In order to initialize bauh with the system, use your Desktop Environment settings to register it as a startup application / script (**bauh-tray**). Or
  create a file named **bauh.desktop** in **~/.config/autostart** with the content below:

  ```
  [Desktop Entry]
  Type=Application
  Name=bauh (tray)
  Exec=/path/to/bauh-tray
  ```




  bauh is officially distributed through [PyPi](https://pypi.org/project/bauh) and [AUR](https://aur.archlinux.org) ([bauh](https://aur.archlinux.org/packages/bauh) / [bauh-staging](https://aur.archlinux.org/packages/bauh-staging))







  - Supported sources: [AppImageHub](https://appimage.github.io) (applications with no releases published to GitHub are not available)
  - All available application names can be found at [apps.txt](https://github.com/vinifmor/bauh-files/blob/master/appimage/apps.txt)
  - **Only x86_64 AppImage files are available through the search mechanism at the moment**
  - Crashes may happen during an AppImage installation if [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) is installed. It is recommended to uninstall it and reboot your system before trying to install an application.
  - Extra actions
      - `Install AppImage file`: allows to install an external AppImage file
      - `Upgrade file`: allows to upgrade a manually installed AppImage file
      - `Update database`: manually synchronize the AppImage database
      - `Install bauh`: installs bauh if it is running as an AppImage

  - Installed applications are store at `~/.local/share/bauh/appimage/installed` (or `/usr/local/share/bauh/installed` for **root**)
  - Desktop entries (menu shortcuts) of the installed applications are stored at `~/.local/share/applications` (or `/usr/share/applications` for **root**). Name pattern: `bauh_appimage_appname.desktop`
  - Symlinks are created at `~/.local/bin` (or `/usr/local/bin` for **root**). They have the same name of the application (if the name already exists, it will be created as 'app_name-appimage'. e.g: `rpcs3-appimage`)
  - Downloaded database files are stored at `~/.cache/bauh/appimage` (or `/var/cache/bauh/appimage` for **root**) as **apps.db** and **releases.db**
  - Databases are updated during the initialization process if they are considered outdated
  - The configuration file is located at `~/.config/bauh/appimage.yml` (or `/etc/bauh/appimage.yml` for **root**) and it allows the following customizations:

  ```
  database:
    expiration: 60  # defines the period (in minutes) in which the database will be considered up to date during the initialization process. Use 0 if you always want to update it. Default: 60.
  suggestions:
      expiration: 24  # defines the period (in hours) in which the suggestions stored in disc will be considered up to date. Use 0 if you always want to update them. Default: 24.
  ```

  - Applications with ignored updates are defined at `~/.config/bauh/appimage/updates_ignored.txt` (or `/etc/bauh/appimage/updates_ignored.txt` for **root**)
  - Cached package suggestions: `~/.cache/bauh/web/suggestions.txt` (or `/var/cache/bauh/web/suggestions.yml` for **root**)




  - Only available for Arch-based systems
  - It handles conflicts, missing / optional packages installations, and several providers scenarios
  - [rebuild-detector](https://github.com/maximbaz/rebuild-detector) integration (**AUR only**)
  - Automatically makes simple package compilation improvements (for AUR packages):

      a) if `MAKEFLAGS` is not set in `/etc/makepkg.conf`,
      then a copy of `/etc/makepkg.conf` will be generated at `~/.config/bauh/arch/makepkg.conf` defining MAKEFLAGS to work with
      the number of your machine processors (`-j${nproc}`).

      b) same as previous, but related to `COMPRESSXZ` and `COMPRESSZST` definitions (if '--threads=0' is not defined)

      c) `ccache` will be added to `BUILDENV` if it is installed on the system and already not defined

      d) set the device CPUs to performance scaling governor

      Obs: For more information about them, have a look at [Makepkg](https://wiki.archlinux.org/index.php/Makepkg)

  - Extra actions
      - `Synchronize packages database`: synchronizes the database against the configured mirrors (`sudo pacman -Syy`)
      - `Refresh mirrors`: allows to define multiple mirrors locations and sort by the fastest (`sudo pacman-mirrors -c country1,country2 && sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syy`)
      - `Quick system upgrade`: it executes a default pacman upgrade (`pacman -Syyu --noconfirm`)
      - `Clean cache`: it cleans the pacman cache directory (default: `/var/cache/pacman/pkg`)
      - `Mark PKGBUILD as editable`: it marks a given PKGBUILD of a package as editable (a popup with the PKGBUILD will be displayed before upgrading/downgrading this package). Action only available when the configuration property `edit_aur_pkgbuild` is not `false`.
      - `Unmark PKGBUILD as editable`: reverts the action described above. Action only available when the configuration property `edit_aur_pkgbuild` is not `false`.
      - `Allow reinstallation check`: it allows to check if a given AUR packages requires to be rebuilt
      - `Ignore reinstallation check`: it does not to check if a given AUR packages requires to be rebuilt
      - `Check Snaps support`: checks if the Snapd services are properly enabled.
      - `Reinstall` (AUR only): rebuilds an installed package.

  - If you have AUR added as a repository on you pacman configuration, make sure to disable bauh's support (through the settings described below)
  - AUR package compilation may require additional installed packages to work properly. Some of them are defined on the field `optdepends` of the [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=bauh)
    - for a **root** user the following additional applications must be installed:
      - `useradd`: required to create a simple user named **bauh-aur** (since **makepkg** does not allow building packages as the **root** user)
      - `runuser`: required to run commands as another user
  - **Repository packages currently do not support the following actions: Downgrade and History**
  - If some of your installed packages are not categorized, open a PullRequest to the **bauh-files** repository changing [categories.txt](https://github.com/vinifmor/bauh-files/blob/master/arch/categories.txt)
  - During bauh initialization a full AUR normalized index is saved at `~/.cache/bauh/arch/aur/index.txt`
  - Installed AUR packages have their PKGBUILD files cached at `~/.cache/bauh/arch/installed/$pkgname`
  - Packages with ignored updates are defined at `~/.config/bauh/arch/updates_ignored.txt`
  - The configuration file is located at `~/.config/bauh/arch.yml` and it allows the following customizations:
  ```
  aur:  true # allows to manage AUR packages. Default: true
  repositories: true  # allows to manage packages from the configured repositories. Default: true
  optimize: true  # if 'false': disables the auto-compilation improvements (AUR)
  sync_databases: true # package databases synchronization once a day before the first package installation/upgrade/downgrade
  sync_databases_startup: true  # package databases synchronization once a day during startup
  clean_cached: true  # defines if old cached versions should be removed from the disk cache during a package uninstallation
  refresh_mirrors_startup: false # if the package mirrors should be refreshed during startup
  mirrors_sort_limit: 5  # defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
  repositories_mthread_download: false  # enable multi-threaded download for repository packages if aria2/axel is installed (otherwise pacman will download the packages). Default: false
  automatch_providers: true  # if a possible provider for a given package dependency exactly matches its name, it will be chosen instead of asking for the user to decide (false). Default: true.
  edit_aur_pkgbuild: false  # if the AUR PKGBUILD file should be displayed for edition before the make process. true (PKGBUILD will always be displayed for edition), false (PKGBUILD never will be displayed), null (a popup will ask if the user want to edit the PKGBUILD). Default: false.
  aur_build_dir: null  # defines a custom build directory for AUR packages (a null value will point to /tmp/bauh/arch (non-root user) or /tmp/bauh_root/arch (root user)). Default: null.
  aur_remove_build_dir: true  # it defines if a package's generated build directory should be removed after the operation is finished (installation, upgrading, ...). Options: true, false (default: true).
  aur_build_only_chosen : true  # some AUR packages have a common file definition declaring several packages to be built. When this property is 'true' only the package the user select to install will be built (unless its name is different from those declared in the PKGBUILD base). With a 'null' value a popup asking if the user wants to build all of them will be displayed. 'false' will build and install all packages. Default: true.
  aur_idx_exp: 1  # It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated. Default: 1. (P.S: this index is always updated when a package is installed/upgraded)
  check_dependency_breakage: true # if, during the verification of the update requirements, specific versions of dependencies must also be checked. Example: package A depends on version 1.0 of B. If A and B were selected to upgrade, and B would be upgrade to 2.0, then B would be excluded from the transaction. Default: true.
  suggest_unneeded_uninstall: false  # if the dependencies apparently no longer necessary associated with the uninstalled packages should be suggested for uninstallation. When this property is enabled it automatically disables the property 'suggest_optdep_uninstall'. Default: false (to prevent new users from making mistakes)
  suggest_optdep_uninstall: false  # if the optional dependencies associated with uninstalled packages should be suggested for uninstallation. Only the optional dependencies that are not dependencies of other packages will be suggested. Default: false (to prevent new users from making mistakes)
  categories_exp: 24  # It defines the expiration time (in HOURS) of the packages categories mapping file stored in disc. Use 0 so that it is always updated during initialization.
  aur_rebuild_detector: true # it checks if packages built with old library versions require to be rebuilt. If a package needs to be rebuilt, it will be marked for update ('rebuild-detector' must be installed). Default: true.
  prefer_repository_provider: true  # when there is just one repository provider for a given a dependency and several from AUR, it will be automatically picked.
  suggestions_exp: 24  # it defines the period (in hours) in which the suggestions stored in disc will be considered up to date. Use 0 if you always want to update them.
  ```
  - Cached package suggestions: `~/.cache/bauh/arch/suggestions.txt` (or `/var/cache/bauh/arch/suggestions.yml` for **root**)


  - Basic actions supported: **search**, **install**, **uninstall**, **upgrade**
  - Custom actions supported:
     - **synchronize packages**: synchronize the available packages on the repository (`aptitude update`)
     - **index applications**: maps runnable installed packages (automatically done during initialization)
     - **software sources**: launches the application responsible for managing software sources (at the moment only `software-properties-gtk` is supported)
  - Custom package actions supported:
    - **purge**: removes the packages and all related configuration files
  - Files:
    - runnable applications index: `~/.cache/bauh/debian/apps_idx.json` (or `/var/cache/bauh/debian/apps_idx.json` for **root**)
    - cached package suggestions: `~/.cache/bauh/debian/suggestions.txt` (or `/var/cache/bauh/debian/suggestions.txt` for **root**)
    - configuration: `~/.config/bauh/debian.yml` or `/etc/bauh/debian.yml`
      - `index_apps.exp`: time period (**in minutes**) in which the installed applications cache is considered up-to-date during startup (default: `1440` -> 24 hours)
      - `sync_pkgs.time`: time period (**in minutes**) in which the packages synchronization must be done on startup (default: `1440` -> 24 hours)
      - `suggestions.exp`: it defines the period (**in hours**) in which the suggestions stored in disc will be considered up to date. Use 0 if you always want to update them.
      - `pkg_sources.app`: it defines the application for managing the software sources. A `null` value detects one of the supported applications automatically.
      - `remove.purge`: if the package configurations should be removed during the uninstallation process (purge). Default: false.



  - Applications with ignored updates are defined at `~/.config/bauh/flatpak/updates_ignored.txt`
  - The configuration file is located at `~/.config/bauh/flatpak.yml` and it allows the following customizations:
  ```
  installation_level: null # defines a default installation level: "user" or "system". (null will display a popup asking the level)
  ```
  - Custom actions supported:
    - **Full update**: it completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.



  - Make sure **snapd** is properly installed and enabled on your system: https://snapcraft.io/docs/installing-snapd
  - Extra actions:
      - `Refresh`: tries to update the current Snap application revision
      - `Change channel`: allows to change the Snap application channel
  - The configuration file is located at `~/.config/bauh/snap.yml` and it allows the following customizations:
  ```
  install_channel: false  # it allows to select an available channel during the application installation. Default: false
  categories_exp: 24  # It defines the expiration time (in HOURS) of the Snaps categories mapping file stored in disc. Use 0 so that it is always updated during initialization.
  ```



  - It allows the installation of Web applications by typing their addresses/URLs on the search bar

  <p align="center">
      <img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/web/url_search.gif">
  </p>


  - It offers the possibility to customize the generated app the way you want:

  <p align="center">
      <img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/web/options.png">
  </p>


  - It provides some suggestions coming with predefined settings, and they also can be found by their names. They are
  defined at [suggestions.yml](https://raw.githubusercontent.com/vinifmor/bauh-files/master/web/env/v1/suggestions.yml), and downloaded during the application usage.

  <p align="center">
      <img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/web/suggestions.gif">
  </p>


  - It relies on [NodeJS](https://nodejs.org/en/), [Electron](https://electronjs.org/) and [nativefier](https://github.com/jiahaog/nativefier) to do all the magic, but you do not need them installed on your system. An isolated installation environment
  will be generated at `~/.local/share/bauh/web/env` (or `/usr/local/share/bauh/web/env` for **root**).
  - It supports DRM protected content through a custom Electron implementation provided by [castLabs](https://github.com/castlabs/electron-releases). nativefier handles the switch between the official Electron and the custom.
  - The isolated environment is created based on the settings defined in [environment.yml](https://raw.githubusercontent.com/vinifmor/bauh-files/master/web/env/v1/environment.yml)
   (downloaded during runtime).
  - Some applications require Javascript fixes to properly work. If there is a known fix, bauh will download the file from [fix](https://github.com/vinifmor/bauh-files/tree/master/web/env/v2/fix) and
  attach it to the generated app. The fix files are saved on the disk following the pattern `~/.local/share/bauh/web/fixes/electron_{branch}/{app_name}.js` (or `/usr/local/share/bauh/web/fixes/...` for **root**)
  - The installed applications are located at `~/.local/share/bauh/installed` (or `/usr/local/share/bauh/web/installed` for **root**).
  - A desktop entry / menu shortcut will be generated for the installed applications at `~/.local/share/applications` (or `/usr/share/applications` for **root**)
  - If the Tray Mode **Start Minimized** is defined during the installation setup, a desktop entry will be also generated at `~/.config/autostart` (or `/etc/xdg/autostart` for **root**)
  allowing the application to launch automatically after the system's boot attached to the tray.

  <p align="center">
      <img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/web/tray.gif">
  </p>


  - Extra actions
      - `Clean installation environment`: removes all the installation environment folders (it does not remove installed apps)

  - The configuration file is located at `~/.config/bauh/web.yml` (or `/etc/bauh/web.yml` for **root**) and it allows the following customizations:

  ```
  environment:
    electron:
      version: null  # set a custom Electron version here (e.g: '6.1.4')
    system: false  # set it to 'true' if you want to use the nativefier version globally installed on your system
    cache_exp: 24 # defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated. Default: 24.

  suggestions:
      cache_exp: 24  # defines the period (in HOURS) in which suggestions stored on the disk are considered up to date during the initialization process. Use 0 so that they are always updated. Default: 24.
  ```
  - Cached package suggestions: `~/.cache/bauh/web/suggestions.txt` (or `/var/cache/bauh/web/suggestions.yml` for **root**)





  You can change some application settings via environment variables or arguments (type ```bauh --help``` to get more information).
  - `--tray`: if bauh should be launched attaching itself to the system tray.
  - `--settings`: it displays only the settings window.
  - `--reset`: it cleans all configurations and cached data stored in the HOME directory.
  - `--logs`: it enables logs (for debugging purposes).
  - `--offline`: it assumes the internet connection is off.
  - `--suggestions`: it forces loading software suggestions after the initialization process.




  ```
  download:
    icons: true # allows bauh to download the applications icons when they are not saved on the disk
    multithreaded: true  # allows bauh to use a multithreaded download client installed on the system to download applications source files faster
    multithreaded_client: null  # defines the multi-threaded download tool to be used. If null, the default installed tool will be used (priority: aria2 > axel). Possible tools/values: aria2, axel
    check_ssl: true  # if the security certificate (SSL) should be checked before downloading files.
  gems: null  # defines the enabled applications types managed by bauh (a null value means "all available")
  locale: null  # defines a different translation for bauh (a null value will retrieve the system's default locale)
  store_root_password: true  # if the root password should be asked only once
  memory_cache:
    data_expiration: 3600 # the interval in SECONDS that data cached in memory will live
    icon_expiration: 300  # the interval in SECONDS that icons cached in memory will live
  suggestions:
    by_type: 20  # the maximum number of application suggestions that must be retrieved per type
    enabled: true  # if suggestions must be displayed when no application is installed
  system:
    notifications: true  # if system popup should be displayed for some events. e.g: when there are updates, bauh will display a system popup
    single_dependency_checking: false  # if bauh should check only once if for the available technologies on the system.
  ui:
    qt_style: fusion  # defines the Qt style. A null value will map to 'fusion' as well.
    table:
      max_displayed: 50  # defines the maximum number of displayed applications on the table. Use 0 for no limit.
    tray:  # system tray settings
      default_icon: null  # defines a path to a custom icon
      updates_icon: null  # defines a path to a custom icon indicating updates
    hdpi: true  # enables HDPI rendering improvements. Use 'false' to disable them if you think the interface looks strange
    auto_scale: false # activates Qt auto screen scale factor (QT_AUTO_SCREEN_SCALE_FACTOR). It fixes scaling issues for some desktop environments (like Gnome)
    scale_factor: 1.0  # defines the interface display scaling factor (Qt). Raise the value to raise the interface size. The settings window display this value as a percentage (e.g: 1.0 -> 100%).
    theme: defines the path to the theme/stylesheet file with a .qss extension (e.g: /path/to/my/theme.qss). For themes provided by bauh, only a string key is needed (e.g: light). Default: light
    system_theme: merges the system's theme/stylesheet with bauh's. Default: false.
  updates:
    check_interval: 5  # the updates checking interval in minutes
    ask_for_reboot: true  # if a dialog asking for a system reboot should be displayed after a successful upgrade
  disk:
      trim:
          after_upgrade: false # it trims the disk after a successful packages upgrade (`fstrim -a -v`). 'true' will automatically perform the trim and 'null' will display a confirmation dialog
  backup:
      enabled: true  # generate timeshift snapshots before an action (if timeshift is installed on the system)
      mode: 'incremental' # incremental=generates a new snapshot based on another pre-exising one. 'only_one'=deletes all pre-existing self created snapshots and generates a fresh one.
      install: null  # defines if the backup should be performed before installing a package. Allowed values: null (a dialog will be displayed asking if a snapshot should be generated), true: generates the backup without asking. false: disables the backup for this operation
      uninstall: null  # defines if the backup should be performed before uninstalling a package. Allowed values: null (a dialog will be displayed asking if a snapshot should be generated), true: generates the backup without asking. false: disables the backup for this operation
      upgrade: null  # defines if the backup should be performed before upgrading a package. Allowed values: null (a dialog will be displayed asking if a snapshot should be generated), true: generates the backup without asking. false: disables the backup for this operation
      downgrade: null  # defines if the backup should be performed before downgrading a package. Allowed values: null (a dialog will be displayed asking if a snapshot should be generated), true: generates the backup without asking. false: disables the backup for this operation
      type: rsync  # defines the Timeshift backup mode -> 'rsync' (default) or 'btrfs'
      remove_method: self  # define which backups should be removed in the 'only_one' mode. 'self': only self generated copies. 'all': all existing backups on the disc.
  boot:
      load_apps: true  # if the installed applications or suggestions should be loaded on the management panel after the initialization process. Default: true.
  ```


  - System administrators and package managers of Linux distributions can disable the usage/management of supported packaging formats
  by adding their ids to the file `/etc/bauh/gems.forbidden`. This will prevent their management code to be loaded.
  - Example (one id per line):
  ```
  arch
  appimage

  ```


  - The software suggestions are download from [bauh-files](https://github.com/vinifmor/bauh-files) by default
    - [appimage](https://github.com/vinifmor/bauh-files/blob/master/appimage/suggestions.txt)
    - [arch](https://github.com/vinifmor/bauh-files/blob/master/appimage/suggestions.txt)
    - [debian](https://github.com/vinifmor/bauh-files/blob/master/debian/suggestions_v1.txt)
    - [flatpak](https://github.com/vinifmor/bauh-files/blob/master/flatpak/suggestions.txt)
    - [snap](https://github.com/vinifmor/bauh-files/blob/master/snap/suggestions.txt)
    - [web](https://github.com/vinifmor/bauh-files/blob/master/web/env/v2/suggestions.yml)

  - Most of the files follow the pattern: `{priority_number}=${id or name}`
    - Priority numbers: 0 (LOW), 1 (MEDIUM), 2 (HIGH), 3 (TOP)
    - The priority number is used to sort the retrieved suggestions

  - If Linux distributions want to provide their custom suggestions files:
    - Create the file `/etc/bauh/suggestions.conf`
    - The content is basically a mapping for each gem to a url or local file (absolute path).
      - Example:
      ```
         arch=https://mydomain.com/arch/suggestions.txt  # remote file
         appimage=/etc/bauh/appimage/suggestions.txt  # local file (absolute path)
         
      ```
    - If a given gem name is omitted, its suggestions will be downloaded from the default location.


  - `~/.config/bauh` (or `/etc/bauh` for **root**): stores configuration files
  - `~/.cache/bauh` (or `/var/cache/bauh` for **root**): stores data about your installed applications, databases, indexes, etc. Files are stored here to provide a faster initialization and data recovery.
  - `/tmp/bauh@$USER` (e.g: `/tmp/bauh@root`): stores logging and temporary files (e.g: build dependencies)



  - Custom themes can be provided by adding their files at `~/.local/share/bauh/themes` (or `/usr/share/bauh/themes` for **root**). Sub-folders are allowed.
  - Themes are composed by 2 required and 1 optional files sharing the same name:
      - `my_theme.qss`: file with the qss rules. Full example: [light.qss](https://github.com/vinifmor/bauh/blob/master/bauh/view/resources/style/light/light.qss)
      - `my_theme.meta`: file defining the theme's data. Full example: [light.meta](https://github.com/vinifmor/bauh/blob/master/bauh/view/resources/style/light/light.meta)
          - available fields:
              - `name`: name that will be displayed on the interface. It supports translations by adding additional `name` fields with brackets and the language code (e.g: `name[es]=Mi tema`)
              - `description`: theme's description that will be displayed on the interface. It supports translations like `name` (e.g: description[es] = Mi tema).
              - `version`: theme's version. It just works as information at the moment. (e.g: 1.0)
              - `root_theme`: optional attribute that points to a theme that must be loaded before the theme. It supports the bauh's default theme keys (e.g: default, light, ...) or a file path (e.g: `/path/to/root/file.qss`).
              - `abstract`: optional boolean attribute (true/false) that should only be used by themes that are not complete on their own and just work as a base (root) for other themes. Abstract themes are not displayed on the interface. Full example: [default.qss](https://github.com/vinifmor/bauh/blob/master/bauh/view/resources/style/default/default.qss)
      - `my_theme.vars`: optional file defining `key=value` pairs of variables that will be available for the .qss file (can be referenced through the symbol **@**. e.g `@my_var`). Full example: [light.vars](https://github.com/vinifmor/bauh/blob/master/bauh/view/resources/style/light/light.vars)
          - common theme variables available:
              - `style_dir`: path to the .qss file directory. Example: @style_dir/my_icon.svg
              - `images`: path to bauh's icons directory (gem icons are not available through this variable). Example: @images/logo.svg




  Priority:
    1) Icon paths defined in **~/.config/bauh/config.yml**
    2) Icons from the system with the following names: `bauh_tray_default` and `bauh_tray_updates`
    3) Own packaged icons




  - For now it only allows checking for software updates (`bauh-cli updates`).
  - To verify the available commands: `bauh-cli --help`.
  - To list the command parameters: `bauh-cli [command] --help`. (e.g: `bauh-cli updates --help`)




  - Disable the application types you do not want to deal with
  - If you don't care about restarting the app every time a new supported package technology is installed, enable `single_dependency_checking`. This can reduce the application response time, since it won't need to recheck if the required technologies are available on your system every time a given action is executed.
  - If you don't mind to see the applications icons, you can disable them via `download: icons: false`. The application may have a slight response improvement, since it will reduce the IO and parallelism within it.
  - For a faster initialization process, consider raising the values of the settings properties associated with disk caching and the property `boot.load_apps` to `false`.




  It is a separate repository with some files downloaded during runtime.




  - `view`: code associated with the graphical interface
  - `gems`: code responsible to work with the different packaging technologies (every submodule deals with one or more types)
  - `api`: code abstractions representing the main actions that a user can do with Linux packages (search, install, ...). These abstractions are implemented by the `gems`, and
  the `view` code is only attached to them (it does not know how the `gems` handle these actions)
  - `commons`: common code used by `gems` and `view`


  - Support for other packaging technologies
  - Separate modules for each packaging technology
  - Memory and performance improvements
  - Improve user experience
  - The current development changes can be checked [here](https://github.com/vinifmor/bauh/blob/staging/CHANGELOG.md)


  - You can support this project through [ko-fi](https://ko-fi.com/vinifmor).

rpm_license:
  Copyright (c) 2019 Vinícius Moreira  zlib/libpng license  This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.  Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:  – The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.  – Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.  – This notice may not be removed or altered from any source distribution.


pkgId: e639b5a257863c624bc29064221d666969fe540d9bd5790179bd40209afb1898
name: python-baumanecbank-common
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: Common funcions package for Baumanec Bank bots
url: https://github.com/twobrowin-study/baumanec-bank
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baumanecbank-common-1.2.1-1.src.rpm
checksum_type: sha256
description:
  Для работы требуются пременные окружения:

  * `PG_HOST` - значение по-умолчанию `localhost`

  * `PG_PORT` - значение по-умолчанию `5432`

  * `PG_USER` - значение по-умолчанию `government_app`

  * `PG_PASSWORD` - значение по-умолчанию `government_app`

  * `PG_DATABASE` - значение по-умолчанию `postgres`

  * `APP_NAME` - значение по-умолчанию `government`

  * `I18N_DIR` - значение по-умолчанию `../i18n`

  * `I18N_LOCALE` - значение по-умолчанию `ru-RU`


pkgId: 5c64e498d4a82061ed24ebae6c1b1b166f5b64ddbd59624163ac052bbc0ea0aa
name: python-bayanpy
arch: src
version: 0.7.7
epoch: 0
release: 1
url: https://pypi.org/project/bayanpy/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayanpy-0.7.7-1.src.rpm
checksum_type: sha256
summary:
  Bayanpy is a powerful Python library for community detection in complex networks, designed to provide optimal or near-optimal solutions for modularity maximization. It features a highly efficient branch-and-cut algorithm and is backed by Integer Programming (IP) formulations.


pkgId: 115d1849b36e3d93f74bed34fc177e056b227f1dd3b727526f30e57ce9260bf0
name: python-baybars
arch: src
version: 0.0.26
epoch: 0
release: 1
summary: Python Common Packages that we use at Jet
url: https://github.com/jet/baybars
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baybars-0.0.26-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/jet/baybars.svg?branch=master)](https://travis-ci.org/jet/baybars)
  [![image](https://img.shields.io/pypi/v/baybars.svg)](https://pypi.org/project/baybars/)
  [![image](https://img.shields.io/pypi/l/baybars.svg)](https://pypi.org/project/baybars/)
  [![image](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/baybars/)



    - Common library that are wrappers on other third party libraries to make life easier for engineers.
    - We want better API's to interact various infrastructure, common libraries to be more productive.
    - We also want to share the code so that other people can reuse and make use of it.

  Software is meant to be used and not forgotten.


  It has great wrappers(beautiful APIs to interact with) for:
    - Nomad(consul, vault)
    - Azure(blob, queue, cosmosdb)
    - Kafka
    - FTP
    - Various image processing utils
    - Various compression utils
    - Various logging and timestamp utils


  - [ ] Documentation
  - [ ] Tests for each modules and test coverage
  - Machine Learning Models(expect some good Tensorflow production ready models)
  - Some common preprocessing, feature extraction modules for various data


pkgId: 713177683c3d58da431094086562807cd7250aab8926371568673c99448f0d02
name: python-baycomp
arch: src
version: 1.0.3
epoch: 0
release: 1
summary: Bayesian tests for comparison of classifiers
url: https://github.com/janezd/baycomp.git
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baycomp-1.0.3-1.src.rpm
checksum_type: sha256
description:
  Baycomp is a library for Bayesian comparison of classifiers.
  Functions compare two classifiers on one or on multiple data sets. They
  compute three probabilities: the probability that the first classifier has
  higher scores than the second, the probability that differences are within
  the region of practical equivalence (rope), or that the second classifier
  has higher scores. We will refer to this probabilities as `p_left`, `p_rope`
  and `p_right`. If the argument `rope` is omitted (or set to zero), functions
  return only `p_left` and `p_right`.
  The region of practical equivalence (rope) is specified by the caller and
  should correspond to what is "equivalent" in practice; for instance,
  classification accuracies that differ by less than 0.5 may be called
  equivalent.
  Similarly, whether higher scores are better or worse depends upon the type
  of the score.
  The library can also plot the posterior distributions.
  The library can be used in three ways.
  1. Two shortcut functions can be used for comparison on single
     and on multiple data sets. If `nbc` and `j48` contain a list of average
     classification accuracies of naive Bayesian classifier and J48 on a
     collection of data sets, we can call
          >>> two_on_multiple(nbc, j48, rope=1)
          (0.23124, 0.00666, 0.7621)
     (Actual results may differ due to Monte Carlo sampling.)
     With some additional arguments, the function can also plot the posterior
     distribution from which these probabilities came.
  2. Tests are packed into test classes. The above call is equivalent to
          >>> SignedRankTest.probs(nbc, j48, rope=1)
          (0.23124, 0.00666, 0.7621)
     and to get a plot, we call
          >>> SignedRankTest.plot(nbc, j48, rope=1, names=("nbc", "j48"))
     To switch to another test, use another class::
          >>> SignTest.probs(nbc, j48, rope=1)
          (0.26508, 0.13274, 0.60218)
  3. Finally, we can construct and query sampled posterior distributions.
          >>> posterior = SignedRankTest(nbc, j48, rope=0.5)
          >>> posterior.probs()
          (0.23124, 0.00666, 0.7621)
          >>> posterior.plot(names=("nbc", "j48"))


pkgId: eb76b08dfd90659f515a235982917206a0158db3f31b05cd1e32854f8350d6e0
name: python-bayes-spec
arch: src
version: 1.7.2
epoch: 0
release: 1
summary: A Bayesian Spectral Line Modeling Framework for Astrophysics
url: https://github.com/tvwenger/bayes_spec
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayes-spec-1.7.2-1.src.rpm
checksum_type: sha256
description:
  ![publish](https://github.com/tvwenger/bayes_spec/actions/workflows/publish.yml/badge.svg)
  ![tests](https://github.com/tvwenger/bayes_spec/actions/workflows/tests.yml/badge.svg)
  [![codecov](https://codecov.io/github/tvwenger/bayes_spec/graph/badge.svg?token=XNGOS4M6TZ)](https://codecov.io/github/tvwenger/bayes_spec)
  [![Documentation Status](https://readthedocs.org/projects/bayes-spec/badge/?version=latest)](https://bayes-spec.readthedocs.io/en/latest/?badge=latest)
  [![status](https://joss.theoj.org/papers/ac05a353639c3268883cae19ca6a9cf9/status.svg)](https://joss.theoj.org/papers/ac05a353639c3268883cae19ca6a9cf9)

  A Bayesian Spectral Line Modeling Framework for Astrophysics

  `bayes_spec` is a framework for user-defined, cloud-based models of astrophysical systems (e.g., the interstellar medium) that enables spectral line simulation and statistical inference. Built in the [`pymc` probabilistic programming library](https://www.pymc.io/welcome.html), `bayes_spec` uses Monte Carlo Markov Chain techniques to fit user-defined models to data. The user-defined models can be a simple line profile (e.g., a Gaussian profile) or a complicated physical model. The models are "cloud-based", meaning there can be multiple "clouds" or "components" each with a unique set of the model parameters. `bayes_spec` includes algorithms to estimate the optimal number of components in a given dataset.

  Read below to get started, and check out the tutorials and guides here: https://bayes-spec.readthedocs.io.

  - [Installation](#installation)
    - [Basic Installation](#basic-installation)
    - [Development Installation](#development-installation)
  - [Quick Start](#quick-start)
  - [Usage](#usage)
    - [Data Format](#data-format)
    - [Model Specification](#model-specification)
  - [Algorithms](#algorithms)
    - [Posterior Sampling: Variational Inference](#posterior-sampling-variational-inference)
    - [Posterior Sampling: MCMC](#posterior-sampling-mcmc)
    - [Posterior Sampling: SMC](#posterior-sampling-smc)
    - [Posterior Clustering: Gaussian Mixture Models](#posterior-clustering-gaussian-mixture-models)
    - [Optimization](#optimization)
  - [Models](#models)
    - [`bayes_spec.models.GaussModel`](#bayes_specmodelsgaussmodel)
    - [`bayes_spec.models.GaussNoiseModel`](#bayes_specmodelsgaussnoisemodel)
    - [`ordered_velocity`](#ordered_velocity)
  - [Syntax \& Examples](#syntax--examples)
  - [Feedback, Issues, and Contributing](#feedback-issues-and-contributing)
  - [License and Copyright](#license-and-copyright)






  Install with `pip` in a `conda` virtual environment:
  ```
  conda create --name bayes_spec -c conda-forge pymc pip
  conda activate bayes_spec
  pip install bayes_spec
  ```



  Alternatively, download and unpack the [latest release](https://github.com/tvwenger/bayes_spec/releases/latest), or [fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) and contribute to the development of `bayes_spec`!

  Install in a `conda` virtual environment:
  ```
  cd /path/to/bayes_spec
  conda env create -f environment.yml


  conda activate bayes_spec-dev
  pip install -e .
  ```



  Here we demonstrate how to use `bayes_spec` to fit a simple Gaussian line profile model to a synthetic spectrum. For more details, see the [Usage](#usage) section as well as the [documentation and tutorials](https://bayes-spec.readthedocs.io).

  ```python

  import numpy as np
  from bayes_spec import SpecData

  velocity_axis = np.linspace(-250.0, 250.0, 501) # km s-1
  noise = 1.0 # K
  brightness_data = noise * np.random.randn(len(velocity_axis)) # K
  observation = SpecData(velocity_axis, brightness_data, noise,
                         ylabel=r"Brightness Temperature $T_B$ (K)",
                         xlabel=r"LSR Velocity $V_{\rm LSR}$ (km s$^{-1})$")
  data = {"observation": observation}


  from bayes_spec.models import GaussModel

  model = GaussModel(data, n_clouds=3, baseline_degree=2)
  model.add_priors()
  model.add_likelihood()


  sim_brightness = model.model.observation.eval({
      "fwhm": [25.0, 40.0, 35.0], # FWHM line width (km/s)
      "line_area": [250.0, 125.0, 175.0], # line area (K km/s)
      "velocity": [-35.0, 10.0, 55.0], # velocity (km/s)
      "baseline_observation_norm": [-0.5, -2.0, 3.0], # normalized baseline coefficients
  })


  observation = SpecData(velocity_axis, sim_brightness, noise,
                         ylabel=r"Brightness Temperature $T_B$ (K)",
                         xlabel=r"LSR Velocity $V_{\rm LSR}$ (km s$^{-1})$")
  data = {"observation": observation}


  model = GaussModel(data, n_clouds=3, baseline_degree=2)
  model.add_priors()
  model.add_likelihood()


  model.sample()


  model.solve()


  from bayes_spec.plots import plot_predictive

  posterior = model.sample_posterior_predictive(thin=100)
  axes = plot_predictive(model.data, posterior.posterior_predictive)
  axes.ravel()[0].figure.show()


  from bayes_spec.plots import plot_pair

  axes = plot_pair(model.trace.solution_0, model.cloud_deterministics, labeller=model.labeller)
  axes.ravel()[0].figure.show()


  import arviz as az

  print(az.summary(model.trace.solution_0))
  ```

  ![posterior predictive](paper/posterior_predictive.png)

  Posterior predictive samples for a three-cloud `GaussLine` model fit to a synthetic spectrum. The black line represents the synthetic spectrum, and each colored line is one posterior predictive sample.

  ![posterior pair](paper/posterior_pair.png)

  Projections of the posterior distribution for a three-cloud `GaussLine` model fit to a synthetic spectrum. The free model parameters are the integrated line area, $\int T_B dV$, the full-width at half-maximum line width, $\Delta V$, and the line-center velocity, $V_{\rm LSR}$. The line amplitude, $T_B$, is a derived quantity. The three posterior modes correspond to the three clouds in this model.



  `bayes_spec` assumes that the source of spectral line emission can be decomposed into a series of "clouds" or "components", each of which are defined by a *unique* set of model parameters. For a simple line profile model (like a Gaussian profile), these parameters might be the Gaussian amplitude, center velocity, and line width. For a more complicated model, they might be the optical depth, excitation temperature, and velocity of the cloud. `bayes_spec` also supports hyper-parameters: parameters that influence both non-cloud based features in the data (e.g., spectral baseline structure) as well as overall cloud properties (e.g., a property assumed shared among all clouds) or physical relationships (e.g., an empirical scaling law).

  *Users are responsible for defining and testing their models.* Here we briefly describe how to do this, but see [Syntax \& Examples](#syntax--examples) for some practical demonstrations. Additional tips and tricks can be found in the documentation: https://bayes-spec.readthedocs.io/en/stable/tips.html

  Users must specify the following:

  1. The data
  2. Model parameters and hyper-parameters
  3. The parameter and hyper-parameter prior distributions
  4. Derived quantities (called "deterministics") that should be saved (e.g., for inference)
  5. The relationship between the model parameters and spectral observations (i.e., the likelihood)



  Data must be packaged within a `bayes_spec.SpecData` object. `SpecData` takes three arguments: the spectral axis (i.e., frequency, velocity), the brightness data (e.g., brightness temperature, flux density), and the noise (in the same units as the brightness data). The noise can either be a scalar value, in which case it is assumed constant across the spectrum, or an array of the same length as the brightness_data.

  ```python
  from bayes_spec import SpecData

  spec = SpecData(spectral_axis, brightness_data, noise, xlabel="Velocity", ylabel="Brightness Temperature")
  ```

  The spectral and brightness data are accessed via `spec.spectral` and `spec.brightness`, respectively. The noise is accessed via `spec.noise`.

  The data are passed to a `bayes_spec` model in a dictionary, which allows multiple spectra to be included in a single model. For example, if a model is constrained by both an emission-line spectrum and an absorption-line spectrum, then this dictionary might look something like this:

  ```python
  emission = SpecData(emission_spec_axis, emission_data, emission_noise, xlabel="Velocity", ylabel="Brightness Temperature")
  absorption = SpecData(absorption_spec_axis, absorption_data, absorption_noise, xlabel="Velocity", ylabel="Optical Depth")

  data = {"emission": emission, "absorption": absorption}
  ```

  The keys of this data dictionary (`"emission"` and `"absorption"` in this case) are important, you must remember them and use the same keys in your model definition.

  Internally, `SpecData` normalizes both the spectral axis and the data. Generally, this is only relevant for the polynomial baseline model, which is fit to the normalized data.



  Model specification is made though a class that extends the `bayes_spec.BaseModel` base model class definition. This class must include three methods: `__init__`, which initializes the model, and `add_priors`, which adds the priors to the model, and `add_likelihood`, which adds the likelihood to the model. These priors and likelihood are specified following the usual `pymc` syntax. [See the definition of `GaussModel` for an example.](https://github.com/tvwenger/bayes_spec/blob/main/bayes_spec/models/gauss_model.py) Alternatively, the class can extend an existing `bayes_spec` model, which is convenient for similar models with, for example, added complexity. [See the definition of `GaussNoiseModel`, which extends `GaussLine`.](https://github.com/tvwenger/bayes_spec/blob/main/bayes_spec/models/gauss_noise_model.py)

  A step-by-step guide for creating `bayes_spec` models can be found in the documentation: https://bayes-spec.readthedocs.io/en/stable/models.html





  `bayes_spec` can sample from an approximation of model posterior distribution using [variational inference (VI)](https://www.pymc.io/projects/examples/en/latest/variational_inference/variational_api_quickstart.html). The benefit of VI is that it is fast, but the downside is that it often fails to capture complex posterior topologies. We recommend only using VI for quick model tests or MCMC initialization. Draw posterior samples using VI via `model.fit()`.



  `bayes_spec` can also use MCMC to sample the posterior distribution. MCMC sampling tends to be much slower but also more accurate. Draw posterior samples using MCMC via `model.sample()`. Since `bayes_spec` uses `pymc` for sampling, several `pymc` samplers are available, including GPU samplers (see ["other samplers" example notebook](https://bayes-spec.readthedocs.io/en/stable/notebooks/other_samplers.html)).



  Finally, `bayes_spec` implements Sequential Monte Carlo (SMC) sampling via `model.sample_smc()`. SMC can significantly improve performance for degenerate models with multi-modal posterior distributions, although it struggles with high dimensional models and models that suffer from a strong labeling degeneracy (see ["other samplers" example notebook](https://bayes-spec.readthedocs.io/en/stable/notebooks/other_samplers.html)).



  Assuming that we have drawn posterior samples via MCMC or SMC using multiple independent Markov chains, then it is possible that each chain disagrees on the order of clouds. This is known as the labeling degeneracy. For some models (e.g., optically thin radiative transfer), the order of clouds along the line-of-sight is arbitrary so each chain may converge to a different label order.

  It is also possible that the model solution is degenerate, the posterior distribution is strongly multi-modal, and each chain converges to different, unique solutions.

  `bayes_spec` uses Gaussian Mixture Models (GMMs) to break the labeling degeneracy and identify unique solutions. After sampling, execute `model.solve()` to fit a GMM to the posterior samples of each chain individually. Unique solutions are identified by discrepant GMM fits, and we break the labeling degeneracy by adopting the most common cloud order amongst chains. The user defines which parameters are used for the GMM clustering.



  `bayes_spec` can optimize the number of clouds in addition to the other model parameters. The `Optimize` class will use VI, MCMC, and/or SMC to estimate the preferred number of clouds.



  `bayes_spec` provides two basic models for convenience.



  `GaussModel` is a Gaussian line profile model. The model assumes that the emission of each cloud is a Gaussian-shaped spectral line. The `SpecData` key must be `"observation"`. The following diagram demonstrates the relationship between the free parameters (empty ellipses), deterministic quantities (rectangles), model predictions (filled ellipses), and observations (filled, round rectangles). Many of the parameters are internally normalized (and thus have names like `_norm`). The subsequent tables describe the model parameters in more detail.

  ![gauss model](https://bayes-spec.readthedocs.io/en/stable/_images/notebooks_basic_tutorial_13_0.svg)

  | Cloud Parameter<br>`variable` | Parameter                                   | Units      | Prior, where<br>($p_0, p_1, \dots$) = `prior_{variable}`         | Default<br>`prior_{variable}` |
  | :---------------------------- | :------------------------------------------ | :--------- | :--------------------------------------------------------------- | :---------------------------- |
  | `line_area`                   | Integrated line area                        | `K km s-1` | $\int T_{B, \rm H} dV \sim {\rm Gamma}(\alpha=2.0, \beta=1.0/p)$ | `100.0`                       |
  | `fwhm`                        | FWHM line width                             | `km s-1`   | $\Delta V_{\rm H} \sim {\rm Gamma}(\alpha=3.0, \beta=2.0/p)$     | `20.0`                        |  |
  | `velocity`                    | Center velocity                             | `km s-1`   | $V_{\rm LSR, H} \sim {\rm Normal}(\mu=p_0, \sigma=p_1)$          | `[0.0, 25.0]`                 |
  | `baseline_coeffs`             | Normalized polynomial baseline coefficients | ``         | $\beta_i \sim {\rm Normal}(\mu=0.0, \sigma=p_i)$                 | `[1.0]*baseline_degree`       |



  `GaussNoiseModel` extends `GaussModel` to add an additional free parameter: the spectral rms noise. The `SpecData` key must be `"observation"`.

  ![gauss noise model](https://bayes-spec.readthedocs.io/en/stable/_images/notebooks_basic_tutorial_noise_9_0.svg)

  | Hyper Parameter<br>`variable` | Parameter          | Units | Prior, where<br>($p_0, p_1, \dots$) = `prior_{variable}` | Default<br>`prior_{variable}` |
  | :---------------------------- | :----------------- | :---- | :------------------------------------------------------- | :---------------------------- |
  | `rms`                         | Spectral rms noise | `K`   | ${\rm rms} \sim {\rm HalfNormal}(\sigma=p)$              | `1.0`                         |



  An additional parameter to `set_priors` for these models is `ordered_velocity`. By default, this parameter is `False`, in which case the order of the clouds is arbitrary. Sampling from these models can be challenging due to the labeling degeneracy: if the order of clouds does not matter (i.e., the emission is optically thin), then each Markov chain could decide on a different, equally-valid order of clouds.

  If we assume that the emission is optically thin (and thus the order of clouds really is arbitrary), then we can set `ordered_velocity=True`, in which case the order of clouds is restricted to be increasing with velocity. This assumption can *drastically* improve sampling efficiency. When `ordered_velocity=True`, the `velocity` prior is defined differently:

  | Cloud Parameter<br>`variable` | Parameter       | Units    | Prior, where<br>($p_0, p_1, \dots$) = `prior_{variable}`                 | Default<br>`prior_{variable}` |
  | :---------------------------- | :-------------- | :------- | :----------------------------------------------------------------------- | :---------------------------- |
  | `velocity`                    | Center velocity | `km s-1` | $V_i \sim p_0 + \sum_0^{i-1} V_i + {\rm Gamma}(\alpha=2, \beta=1.0/p_1)$ | `[0.0, 25.0]`                 |



  See the various tutorial notebooks under [docs/source/notebooks](https://github.com/tvwenger/bayes_spec/tree/main/docs/source/notebooks). Tutorials and the full API are available here: https://bayes-spec.readthedocs.io.



  If you have questions about `bayes_spec`, then please consider starting a [discussion on GitHub](https://github.com/tvwenger/bayes_spec/discussions).

  Should you find any issues or encounter any problems with `bayes_spec`, then please submit an [issue on GitHub](https://github.com/tvwenger/bayes_spec/issues).

  Anyone is welcome to contribute to the development of `bayes_spec` via [GitHub](https://github.com/tvwenger/bayes_spec). Please consider submitting a pull request for any bug fixes or new features!



  Copyright(C) 2024 by
  Trey V. Wenger; tvwenger@gmail.com
  This code is licensed under MIT license (see LICENSE for details)

rpm_license:
  The MIT License (MIT)  Copyright (c) 2024 Trey V. Wenger  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: acf793744640c3a8acd7fd9df5885874a6addac5b08fc1277266429d00dc34ef
name: python-bayes-traj
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: bayes_traj
url: https://github.com/acil-bwh/bayes_traj
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayes-traj-1.0.1-1.src.rpm
checksum_type: sha256
description:
  Algorithms and tools for Bayesian trajectory modeling

  ```sh
  pip install provenance_tools
  pip install bayes_traj
  ```



  * `mult_dp_regression.py` is the current non-pyro model
    "multivariate Dirichlet process regression"
  * `generate_prior.py` creates a prior file.
  * `viz_data_prior_draws.py` prior predictive checks.
  * `bayes_traj_main.py --out_model PICKLE_FILE` saves a trajectory model
    configured by other tools.
    This inputs a prior file.
  * `viz_model_trajs.py` is posterior predictive check,
    visualizes the learned clusters.
  * `sumarize_traj_model.py` prints additional info.
  * `assign_trajectory.py` reads in the model + data.csv and outputs a
    data.csv file with one appended column that is the assigned trajectory.

  Other files are legacy.



  ```sh
  pytest
  ```
  or when debugging
  ```sh
  pytest -vsx --pdb
  ```


pkgId: 7a8489db62a295916ac522af45fb7a11f5aade4e05fefd96c35c264b02651f37
name: python-bayesdesign
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Package for Bayesian optimal experimental design
url: https://github.com/dkirkby/bayesdesign
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesdesign-0.4.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI package](https://img.shields.io/badge/pip%20install-bayesdesign-brightgreen)](https://pypi.org/project/bayesdesign/) [![GitHub Release](https://img.shields.io/github/v/release/dkirkby/bayesdesign?color=green)](https://github.com/dkirkby/bayesdesign/releases) [![Actions Status](https://github.com/dkirkby/bayesdesign/workflows/Test/badge.svg)](https://github.com/dkirkby/bayesdesign/actions) [![License](https://img.shields.io/github/license/dkirkby/bayesdesign)](https://github.com/dkirkby/bayesdesign/blob/main/LICENSE)

  Use this package to calculate expected information gain for Bayesian optimal experiment design. For an introduction to this topic, see this [interactive notebook](https://observablehq.com/@dkirkby/boed). To perform a similar calculation with this package, use:
  ```python
  from bed.grid import Grid, GridStack
  from bed.design import ExperimentDesigner

  designs = Grid(t_obs=np.linspace(0, 5, 51))
  features = Grid(y_obs=np.linspace(-1.25, 1.25, 100))
  params = Grid(amplitude=1, frequency=np.linspace(0.2, 2.0, 181), offset=0)

  sigma_y=0.1
  with GridStack(features, designs, params):
      y_mean = params.amplitude * np.sin(params.frequency * (designs.t_obs - params.offset))
      y_diff = features.y_obs - y_mean
      likelihood = np.exp(-0.5 * (y_diff / sigma_y) ** 2)
      features.normalize(likelihood)

  designer = ExperimentDesigner(params, features, designs, likelihood)

  prior = np.ones(params.shape)
  params.normalize(prior);

  designer.calculateEIG(prior)

  plt.plot(designs.t_obs, designer.EIG)
  ```

  Browse the [examples folder](https://github.com/dkirkby/bayesdesign/) to learn more about using this package.



  Install the [latest released version](https://github.com/dkirkby/bayesdesign/releases/latest) from [pypi](https://pypi.org/project/bayesdesign/) using:
  ```
  pip install bayesdesign
  ```
  The only required dependency is numpy. The optional plot module also requires matplotlib.

  The changes with each version are documented [here](CHANGELOG.md).



  To upgrade your pip-installed package to the [latest released version](https://github.com/dkirkby/bayesdesign/releases/latest) use:
  ```
  pip install bayesdesign --upgrade
  ```



  If you have feedback or would like to contribute to this package, please see our [contributor's guide](CONTRIBUTING.md).


pkgId: ea63ffa31d839e7cdc583613c4a0488946f6ed9b54297f337b1803ef33a819e8
name: python-bayesdesign
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Package for Bayesian optimal experimental design
url: https://github.com/dkirkby/bayesdesign
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesdesign-0.5.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI package](https://img.shields.io/badge/pip%20install-bayesdesign-brightgreen)](https://pypi.org/project/bayesdesign/) [![GitHub Release](https://img.shields.io/github/v/release/dkirkby/bayesdesign?color=green)](https://github.com/dkirkby/bayesdesign/releases) [![Actions Status](https://github.com/dkirkby/bayesdesign/workflows/Test/badge.svg)](https://github.com/dkirkby/bayesdesign/actions) [![License](https://img.shields.io/github/license/dkirkby/bayesdesign)](https://github.com/dkirkby/bayesdesign/blob/main/LICENSE)

  Use this package to calculate expected information gain for Bayesian optimal experiment design. For an introduction to this topic, see this [interactive notebook](https://observablehq.com/@dkirkby/boed). To perform a similar calculation with this package, use:
  ```python
  from bed.grid import Grid, GridStack
  from bed.design import ExperimentDesigner

  designs = Grid(t_obs=np.linspace(0, 5, 51))
  features = Grid(y_obs=np.linspace(-1.25, 1.25, 100))
  params = Grid(amplitude=1, frequency=np.linspace(0.2, 2.0, 181), offset=0)

  sigma_y=0.1
  with GridStack(features, designs, params):
      y_mean = params.amplitude * np.sin(params.frequency * (designs.t_obs - params.offset))
      y_diff = features.y_obs - y_mean
      likelihood = np.exp(-0.5 * (y_diff / sigma_y) ** 2)
      features.normalize(likelihood)

  designer = ExperimentDesigner(params, features, designs, likelihood)

  prior = np.ones(params.shape)
  params.normalize(prior);

  designer.calculateEIG(prior)

  plt.plot(designs.t_obs, designer.EIG)
  ```

  Browse the [examples folder](https://github.com/dkirkby/bayesdesign/) to learn more about using this package.

  To run the examples in [google colab](https://colab.research.google.com/), select **GitHub** and enter `https://github.com/dkirkby/bayesdesign`.



  Install the [latest released version](https://github.com/dkirkby/bayesdesign/releases/latest) from [pypi](https://pypi.org/project/bayesdesign/) using:
  ```
  pip install bayesdesign
  ```
  The only required dependency is numpy. The optional plot module also requires matplotlib.

  The changes with each version are documented [here](CHANGELOG.md).



  To upgrade your pip-installed package to the [latest released version](https://github.com/dkirkby/bayesdesign/releases/latest) use:
  ```
  pip install bayesdesign --upgrade
  ```



  If you have feedback or would like to contribute to this package, please see our [contributor's guide](CONTRIBUTING.md).


pkgId: 7c7cebc21c62436418c2192a5b36cd3b2cdfdf57094c78a1cfa739ec5b148738
name: python-bayesian-optimization
arch: src
version: 1.5.1
epoch: 0
release: 1
summary: Bayesian Optimization package
url: https://pypi.org/project/bayesian-optimization/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesian-optimization-1.5.1-1.src.rpm
checksum_type: sha256
description:
      |  1        | -7.135    |  2.834    |  1.322    |
      |  2        | -7.78     |  2.0      | -1.186    |
      |  3        | -19.0     |  4.0      |  3.0      |
      |  4        | -16.3     |  2.378    | -2.413    |


pkgId: f985f9ceb444b32839f4f32f015f7b9d0b00b341a65a62236573f94e07ab9f7b
name: python-bayesian-testing
arch: src
version: 0.8.0
epoch: 0
release: 1
summary: Bayesian A/B testing with simple probabilities.
url: https://github.com/Matt52/bayesian-testing
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesian-testing-0.8.0-1.src.rpm
checksum_type: sha256
description:
  [![Tests](https://github.com/Matt52/bayesian-testing/workflows/Tests/badge.svg)](https://github.com/Matt52/bayesian-testing/actions?workflow=Tests)
  [![Codecov](https://codecov.io/gh/Matt52/bayesian-testing/branch/main/graph/badge.svg)](https://codecov.io/gh/Matt52/bayesian-testing)
  [![PyPI](https://img.shields.io/pypi/v/bayesian-testing.svg)](https://pypi.org/project/bayesian-testing/)

  `bayesian_testing` is a small package for a quick evaluation of A/B (or A/B/C/...) tests using
  Bayesian approach.

  **Implemented tests:**
  - [BinaryDataTest](bayesian_testing/experiments/binary.py)
    - **_Input data_** - binary data (`[0, 1, 0, ...]`)
    - Designed for conversion-like data A/B testing.
  - [NormalDataTest](bayesian_testing/experiments/normal.py)
    - **_Input data_** - normal data with unknown variance
    - Designed for normal data A/B testing.
  - [DeltaLognormalDataTest](bayesian_testing/experiments/delta_lognormal.py)
    - **_Input data_** - lognormal data with zeros
    - Designed for revenue-like data A/B testing.
  - [DeltaNormalDataTest](bayesian_testing/experiments/delta_normal.py)
    - **_Input data_** - normal data with zeros
    - Designed for profit-like data A/B testing.
  - [DiscreteDataTest](bayesian_testing/experiments/discrete.py)
    - **_Input data_** - categorical data with numerical categories
    - Designed for discrete data A/B testing (e.g. dice rolls, star ratings, 1-10 ratings, etc.).
  - [PoissonDataTest](bayesian_testing/experiments/poisson.py)
    - **_Input data_** - non-negative integers (`[1, 0, 3, ...]`)
    - Designed for poisson data A/B testing.
  - [ExponentialDataTest](bayesian_testing/experiments/exponential.py)
    - **_Input data_** - exponential data (non-negative real numbers)
    - Designed for exponential data A/B testing (e.g. session/waiting time, time between events,
  etc.).

  **Implemented evaluation metrics:**
  - `Posterior Mean`
    - Expected value from the posterior distribution for a given variant.
  - `Credible Interval`
    - Quantile-based credible intervals based on simulations from posterior distributions (i.e.
  empirical).
    - Interval probability (`interval_alpha`) can be set during the evaluation (default value is 95%).
  - `Probability of Being Best`
    - Probability that a given variant is best among all variants.
    - By default, `the best` is equivalent to `the greatest` (from a data/metric point of view),
  however it is possible to change this by using `min_is_best=True` in the evaluation method
  (this can be useful if we try to find the variant with the smallest tested measure).
  - `Expected Loss`
    - "Risk" of choosing particular variant over other variants in the test.
    - Measured in same units as a tested measure (e.g. positive rate or average value).

  `Credible Interval`, `Probability of Being Best` and `Expected Loss` are calculated using
  simulations from posterior distributions (considering given data).



  `bayesian_testing` can be installed using pip:
  ```console
  pip install bayesian_testing
  ```
  Alternatively, you can clone the repository and use `poetry` manually:
  ```console
  cd bayesian_testing
  pip install poetry
  poetry install
  poetry shell
  ```


  The primary features are classes:
  - `BinaryDataTest`
  - `NormalDataTest`
  - `DeltaLognormalDataTest`
  - `DeltaNormalDataTest`
  - `DiscreteDataTest`
  - `PoissonDataTest`
  - `ExponentialDataTest`

  All test classes support two methods to insert the data:
  - `add_variant_data` - Adding raw data for a variant as a list of observations (or numpy 1-D array).
  - `add_variant_data_agg` - Adding aggregated variant data (this can be practical for a large data,
  as the aggregation can be done already on a database level).

  Both methods for adding data allow specification of prior distributions
  (see details in respective docstrings). Default prior setup should be sufficient for most of the
  cases (e.g. cases with unknown priors or large amounts of data).

  To get the results of the test, simply call the method `evaluate`.

  Probability of being best, expected loss and credible intervals are approximated using simulations,
  hence the `evaluate` method can return slightly different values for different runs. To stabilize
  it, you can  set the `sim_count` parameter of the `evaluate` to a higher value (default value is
  20K), or even use the `seed` parameter to fix it completely.


  Class for a Bayesian A/B test for the binary-like data (e.g. conversions, successes, etc.).

  **Example:**
  ```python
  import numpy as np
  from bayesian_testing.experiments import BinaryDataTest


  rng = np.random.default_rng(52)

  data_a = rng.binomial(n=1, p=0.052, size=1500)

  data_b = rng.binomial(n=1, p=0.067, size=1200)


  test = BinaryDataTest()


  test.add_variant_data("A", data_a)
  test.add_variant_data("B", data_b)




  test.add_variant_data_agg("C", totals=1000, positives=50)


  results = test.evaluate()
  results

  ```

      +-------------------+-----------+-------------+-------------+
      |                   | A         | B           | C           |
      +===================+===========+=============+=============+
      | totals            | 1500      | 1200        | 1000        |
      +-------------------+-----------+-------------+-------------+
      | positives         | 80        | 80          | 50          |
      +-------------------+-----------+-------------+-------------+
      | positive_rate     | 0.05333   | 0.06667     | 0.05        |
      +-------------------+-----------+-------------+-------------+
      | posterior_mean    | 0.05363   | 0.06703     | 0.05045     |
      +-------------------+-----------+-------------+-------------+
      | credible_interval | [0.04284, | [0.0535309, | [0.0379814, |
      |                   | 0.065501] | 0.0816476]  | 0.0648625]  |
      +-------------------+-----------+-------------+-------------+
      | prob_being_best   | 0.06485   | 0.89295     | 0.0422      |
      +-------------------+-----------+-------------+-------------+
      | expected_loss     | 0.0139248 | 0.0004693   | 0.0170767   |
      +-------------------+-----------+-------------+-------------+


  Class for a Bayesian A/B test for the normal data.

  **Example:**
  ```python
  import numpy as np
  from bayesian_testing.experiments import NormalDataTest


  rng = np.random.default_rng(21)
  data_a = rng.normal(7.2, 2, 1000)
  data_b = rng.normal(7.1, 2, 800)
  data_c = rng.normal(7.0, 4, 500)


  test = NormalDataTest()


  test.add_variant_data("A", data_a)
  test.add_variant_data("B", data_b)



  test.add_variant_data_agg("C", len(data_c), sum(data_c), sum(np.square(data_c)))


  results = test.evaluate(sim_count=20000, seed=52, min_is_best=False, interval_alpha=0.99)
  results

  ```

      +-------------------+-------------+-------------+-------------+
      |                   | A           | B           | C           |
      +===================+=============+=============+=============+
      | totals            | 1000        | 800         | 500         |
      +-------------------+-------------+-------------+-------------+
      | sum_values        | 7294.67901  | 5685.86168  | 3736.91581  |
      +-------------------+-------------+-------------+-------------+
      | avg_values        | 7.29468     | 7.10733     | 7.47383     |
      +-------------------+-------------+-------------+-------------+
      | posterior_mean    | 7.29462     | 7.10725     | 7.4737      |
      +-------------------+-------------+-------------+-------------+
      | credible_interval | [7.1359436, | [6.9324733, | [7.0240102, |
      |                   | 7.4528369]  | 7.2779293]  | 7.9379341]  |
      +-------------------+-------------+-------------+-------------+
      | prob_being_best   | 0.1707      | 0.00125     | 0.82805     |
      +-------------------+-------------+-------------+-------------+
      | expected_loss     | 0.1968735   | 0.385112    | 0.0169998   |
      +-------------------+-------------+-------------+-------------+


  Class for a Bayesian A/B test for the delta-lognormal data (log-normal with zeros).
  Delta-lognormal data is typical case of revenue per session data where many sessions have 0 revenue
  but non-zero values are positive values with possible log-normal distribution.
  To handle this data, the calculation is combining binary Bayes model for zero vs non-zero
  "conversions" and log-normal model for non-zero values.

  **Example:**
  ```python
  import numpy as np
  from bayesian_testing.experiments import DeltaLognormalDataTest

  test = DeltaLognormalDataTest()

  data_a = [7.1, 0.3, 5.9, 0, 1.3, 0.3, 0, 1.2, 0, 3.6, 0, 1.5,
            2.2, 0, 4.9, 0, 0, 1.1, 0, 0, 7.1, 0, 6.9, 0]
  data_b = [4.0, 0, 3.3, 19.3, 18.5, 0, 0, 0, 12.9, 0, 0, 0, 10.2,
            0, 0, 23.1, 0, 3.7, 0, 0, 11.3, 10.0, 0, 18.3, 12.1]


  test.add_variant_data("A", data_a)




  test.add_variant_data_agg(
      name="B",
      totals=len(data_b),
      positives=sum(x > 0 for x in data_b),
      sum_values=sum(data_b),
      sum_logs=sum([np.log(x) for x in data_b if x > 0]),
      sum_logs_2=sum([np.square(np.log(x)) for x in data_b if x > 0])
  )


  results = test.evaluate(seed=21)
  results

  ```

      +---------------------+-------------+-------------+
      |                     | A           | B           |
      +=====================+=============+=============+
      | totals              | 24          | 25          |
      +---------------------+-------------+-------------+
      | positives           | 13          | 12          |
      +---------------------+-------------+-------------+
      | sum_values          | 43.4        | 146.7       |
      +---------------------+-------------+-------------+
      | avg_values          | 1.80833     | 5.868       |
      +---------------------+-------------+-------------+
      | avg_positive_values | 3.33846     | 12.225      |
      +---------------------+-------------+-------------+
      | posterior_mean      | 2.09766     | 6.19017     |
      +---------------------+-------------+-------------+
      | credible_interval   | [0.9884509, | [3.3746212, |
      |                     | 6.9054963]  | 11.7349253] |
      +---------------------+-------------+-------------+
      | prob_being_best     | 0.04815     | 0.95185     |
      +---------------------+-------------+-------------+
      | expected_loss       | 4.0941101   | 0.1588627   |
      +---------------------+-------------+-------------+

  ***Note**: Alternatively, `DeltaNormalDataTest` can be used for a case when conversions are not
  necessarily positive values.*


  Class for a Bayesian A/B test for the discrete data with finite number of numerical categories
  (states), representing some value.
  This test can be used for instance for dice rolls data (when looking for the "best" of multiple
  dice) or rating data (e.g. 1-5 stars or 1-10 scale).

  **Example:**
  ```python
  from bayesian_testing.experiments import DiscreteDataTest


  data_a = [2, 5, 1, 4, 6, 2, 2, 6, 3, 2, 6, 3, 4, 6, 3, 1, 6, 3, 5, 6]
  data_b = [1, 2, 2, 2, 2, 3, 2, 3, 4, 2]
  data_c = [1, 3, 6, 5, 4]


  test = DiscreteDataTest(states=[1, 2, 3, 4, 5, 6])


  test.add_variant_data("A", data_a)
  test.add_variant_data("B", data_b)
  test.add_variant_data("C", data_c)





  results = test.evaluate(sim_count=20000, seed=52, min_is_best=False, interval_alpha=0.95)
  results

  ```

      +-------------------+------------------+------------------+------------------+
      |                   | A                | B                | C                |
      +===================+==================+==================+==================+
      | concentration     | {1: 2.0, 2: 4.0, | {1: 1.0, 2: 6.0, | {1: 1.0, 2: 0.0, |
      |                   | 3: 4.0, 4: 2.0,  | 3: 2.0, 4: 1.0,  | 3: 1.0, 4: 1.0,  |
      |                   | 5: 2.0, 6: 6.0}  | 5: 0.0, 6: 0.0}  | 5: 1.0, 6: 1.0}  |
      +-------------------+------------------+------------------+------------------+
      | average_value     | 3.8              | 2.3              | 3.8              |
      +-------------------+------------------+------------------+------------------+
      | posterior_mean    | 3.73077          | 2.75             | 3.63636          |
      +-------------------+------------------+------------------+------------------+
      | credible_interval | [3.0710797,      | [2.1791584,      | [2.6556465,      |
      |                   | 4.3888021]       | 3.4589178]       | 4.5784839]       |
      +-------------------+------------------+------------------+------------------+
      | prob_being_best   | 0.54685          | 0.008            | 0.44515          |
      +-------------------+------------------+------------------+------------------+
      | expected_loss     | 0.199953         | 1.1826766        | 0.2870247        |
      +-------------------+------------------+------------------+------------------+


  Class for a Bayesian A/B test for the poisson data.

  **Example:**
  ```python
  from bayesian_testing.experiments import PoissonDataTest


  psg_goals_against = [0, 2, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 3, 1, 0]
  city_goals_against = [0, 0, 3, 2, 0, 1, 0, 3, 0, 1, 1, 0, 1, 2]
  bayern_goals_against = [1, 0, 0, 1, 1, 2, 1, 0, 2, 0, 0, 2, 2, 1, 0]


  test = PoissonDataTest()


  test.add_variant_data('psg', psg_goals_against)



  test.add_variant_data('city', city_goals_against, a_prior=3, b_prior=1)



  test.add_variant_data_agg("bayern", len(bayern_goals_against), sum(bayern_goals_against))


  results = test.evaluate(sim_count=20000, seed=52, min_is_best=True)
  results

  ```

      +-------------------+-------------+-------------+------------+
      |                   | psg         | city        | bayern     |
      +===================+=============+=============+============+
      | totals            | 15          | 14          | 15         |
      +-------------------+-------------+-------------+------------+
      | sum_values        | 9           | 14          | 13         |
      +-------------------+-------------+-------------+------------+
      | observed_average  | 0.6         | 1.0         | 0.86667    |
      +-------------------+-------------+-------------+------------+
      | posterior_mean    | 0.60265     | 1.13333     | 0.86755    |
      +-------------------+-------------+-------------+------------+
      | credible_interval | [0.2800848, | [0.6562029, | [0.465913, |
      |                   | 1.0570327]  | 1.7265045]  | 1.3964389] |
      +-------------------+-------------+-------------+------------+
      | prob_being_best   | 0.78175     | 0.0344      | 0.18385    |
      +-------------------+-------------+-------------+------------+
      | expected_loss     | 0.0369998   | 0.5620553   | 0.3003345  |
      +-------------------+-------------+-------------+------------+

  _note: Since we set `min_is_best=True` (because received goals are "bad"), probability and loss are
  in a favor of variants with lower posterior means._


  Class for a Bayesian A/B test for the exponential data.

  **Example:**
  ```python
  import numpy as np
  from bayesian_testing.experiments import ExponentialDataTest



  waiting_times_a = np.random.exponential(scale=10, size=200)
  waiting_times_b = np.random.exponential(scale=11, size=210)
  waiting_times_c = np.random.exponential(scale=11, size=220)


  test = ExponentialDataTest()

  test.add_variant_data('A', waiting_times_a)
  test.add_variant_data('B', waiting_times_b)
  test.add_variant_data('C', waiting_times_c)





  results = test.evaluate(sim_count=20000, min_is_best=True)
  results

  ```

      +-------------------+-------------+-------------+-------------+
      |                   | A           | B           | C           |
      +===================+=============+=============+=============+
      | totals            | 200         | 210         | 220         |
      +-------------------+-------------+-------------+-------------+
      | sum_values        | 1827.81709  | 2217.46016  | 2160.73134  |
      +-------------------+-------------+-------------+-------------+
      | observed_average  | 9.13909     | 10.55933    | 9.82151     |
      +-------------------+-------------+-------------+-------------+
      | posterior_mean    | 9.13502     | 10.55478    | 9.8175      |
      +-------------------+-------------+-------------+-------------+
      | credible_interval | [7.994178,  | [9.2543372, | [8.6184821, |
      |                   | 10.5410967] | 12.1527256] | 11.2566538] |
      +-------------------+-------------+-------------+-------------+
      | prob_being_best   | 0.7456      | 0.0405      | 0.2139      |
      +-------------------+-------------+-------------+-------------+
      | expected_loss     | 0.1428729   | 1.5674747   | 0.8230728   |
      +-------------------+-------------+-------------+-------------+


  To set up a development environment, use [Poetry](https://python-poetry.org/) and [pre-commit](https://pre-commit.com):
  ```console
  pip install poetry
  poetry install
  poetry run pre-commit install
  ```



  Additional metrics:
  - `Potential Value Remaining`


  - `bayesian_testing` package itself depends only on [numpy](https://numpy.org) package.
  - Work on this package (including default priors selection) was inspired mainly by a Coursera
  course [Bayesian Statistics: From Concept to Data Analysis](https://www.coursera.org/learn/bayesian-statistics).


pkgId: 002afd990562e88014d297ea52bfd113744d0d2071b009e55e62aafe3f31ed92
name: python-bayesian-torch
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: A library for Bayesian neural network layers and uncertainty estimation in Deep Learning
url: https://github.com/IntelLabs/bayesian-torch
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesian-torch-0.5.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  <img src="https://raw.githubusercontent.com/IntelLabs/bayesian-torch/5a4793ba0a54660c891df8af0d5729e840340a88/assets/bayesian-torch.png" width="500px">
  <h2 >
  A library for Bayesian neural network layers and uncertainty estimation in Deep Learning </a>
  </h2>

  [![python](https://img.shields.io/badge/python-3.7%2B-blue)](https://github.com/IntelLabs/bayesian-torch)
  [![pytorch](https://img.shields.io/badge/pytorch-1.7.0%2B-orange)](https://github.com/IntelLabs/bayesian-torch)
  [![version](https://img.shields.io/badge/release-0.5.0-green)](https://github.com/IntelLabs/bayesian-torch/releases)
  [![license](https://img.shields.io/badge/license-BSD%203--Clause-blue)](https://github.com/IntelLabs/bayesian-torch/blob/main/LICENSE)
  [![Downloads](https://static.pepy.tech/badge/bayesian-torch)](https://pepy.tech/project/bayesian-torch)
  <h4 align="center">
    <a href="https://github.com/IntelLabs/bayesian-torch#installing-bayesian-torch">Get Started</a> |
    <a href="https://github.com/IntelLabs/bayesian-torch#usage">Example usage</a> |
    <a href="https://github.com/IntelLabs/bayesian-torch/blob/main/doc/bayesian_torch.layers.md">Documentation</a> |
    <a href="https://github.com/IntelLabs/bayesian-torch#citing">Citing</a>
  </h4>

  </div>

  ___

  Bayesian-Torch is a library of neural network layers and utilities extending the core of PyTorch to enable Bayesian inference in deep learning models to quantify principled uncertainty estimates in model predictions.


  Bayesian-Torch is designed to be flexible and enables seamless extension of deterministic deep neural network model to corresponding Bayesian form by simply replacing the deterministic layers with Bayesian layers. It enables user to perform stochastic variational inference in deep neural networks.

  **Bayesian layers:**

  * **[Variational layers with reparameterized Monte Carlo estimators](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/layers/variational_layers)** [[Blundell et al. 2015](https://arxiv.org/abs/1505.05424)]


        LinearReparameterization
        Conv1dReparameterization, Conv2dReparameterization, Conv3dReparameterization, ConvTranspose1dReparameterization, ConvTranspose2dReparameterization, ConvTranspose3dReparameterization
        LSTMReparameterization

  * **[Variational layers with Flipout Monte Carlo estimators](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/layers/flipout_layers)** [[Wen et al. 2018](https://arxiv.org/abs/1803.04386)]

        LinearFlipout
        Conv1dFlipout, Conv2dFlipout, Conv3dFlipout, ConvTranspose1dFlipout, ConvTranspose2dFlipout, ConvTranspose3dFlipout
        LSTMFlipout



  **Key features:**
  * [dnn_to_bnn()](https://github.com/IntelLabs/bayesian-torch/blob/main/bayesian_torch/models/dnn_to_bnn.py#L127): Seamless conversion of model to be Uncertainty-aware with single line of code. An API to convert deterministic deep neural network (dnn) model of any architecture to Bayesian deep neural network (bnn) model, simplifying the model definition i.e. drop-in replacements  of Convolutional, Linear and LSTM layers to corresponding Bayesian layers. This will enable seamless conversion of existing topology of larger models to Bayesian deep neural network models for extending towards uncertainty-aware applications.
  * [MOPED](https://github.com/IntelLabs/bayesian-torch/blob/main/bayesian_torch/utils/util.py#L72): Scale Bayesian inference to large scale models by specifying weight priors and variational posteriors in Bayesian neural networks with Empirical Bayes [[Krishnan et al. 2020](https://ojs.aaai.org/index.php/AAAI/article/view/5875)]
  * [Quantization](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/ao): Post Training Quantization of Bayesian deep neural network models for INT8 inference with simple API's [[Lin et al. 2023](https://ieeexplore.ieee.org/abstract/document/10289271)]
  * [AvUC](https://github.com/IntelLabs/bayesian-torch/blob/main/bayesian_torch/utils/avuc_loss.py): Accuracy versus Uncertainty Calibration loss [[Krishnan and Tickoo 2020](https://proceedings.neurips.cc/paper/2020/file/d3d9446802a44259755d38e6d163e820-Paper.pdf)]



  **To install core library using `pip`:**
  ```
  pip install bayesian-torch
  ```

  **To install latest development version from source:**
  ```sh
  git clone https://github.com/IntelLabs/bayesian-torch
  cd bayesian-torch
  pip install .
  ```
  <!--
  This code has been tested on PyTorch v1.8.1 LTS.

  Dependencies:

  - Create conda environment with python=3.7
  - Install PyTorch and torchvision packages within conda environment following instructions from [PyTorch install guide](https://pytorch.org/get-started/locally/)
  - conda install -c conda-forge accimage
  - pip install tensorboard
  - pip install scikit-learn
  -->


  There are two ways to build Bayesian deep neural networks using Bayesian-Torch:
  1. Convert an existing deterministic deep neural network (dnn) model to Bayesian deep neural network (bnn) model with dnn_to_bnn() API
  2. Define your custom model using the Bayesian layers ([Reparameterization](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/layers/variational_layers) or [Flipout](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/layers/flipout_layers))

  (1) For instance, building Bayesian-ResNet18 from torchvision deterministic ResNet18 model is as simple as:
  ```
  import torch
  import torchvision
  from bayesian_torch.models.dnn_to_bnn import dnn_to_bnn, get_kl_loss

  const_bnn_prior_parameters = {
          "prior_mu": 0.0,
          "prior_sigma": 1.0,
          "posterior_mu_init": 0.0,
          "posterior_rho_init": -3.0,
          "type": "Reparameterization",  # Flipout or Reparameterization
          "moped_enable": False,  # True to initialize mu/sigma from the pretrained dnn weights
          "moped_delta": 0.5,
  }

  model = torchvision.models.resnet18()
  dnn_to_bnn(model, const_bnn_prior_parameters)
  ```
  To use MOPED method i.e. setting the prior and initializing variational parameters from a pretrained deterministic model (helps training convergence of larger models):
  ```
  const_bnn_prior_parameters = {
          "prior_mu": 0.0,
          "prior_sigma": 1.0,
          "posterior_mu_init": 0.0,
          "posterior_rho_init": -3.0,
          "type": "Reparameterization",  # Flipout or Reparameterization
          "moped_enable": True,  # True to initialize mu/sigma from the pretrained dnn weights
          "moped_delta": 0.5,
  }

  model = torchvision.models.resnet18(pretrained=True)
  dnn_to_bnn(model, const_bnn_prior_parameters)
  ```
  Training snippet:
  ```
  criterion = torch.nn.CrossEntropyLoss()
  optimizer = torch.optim.Adam(model.parameters(), args.learning_rate)

  output = model(x_train)
  kl = get_kl_loss(model)
  ce_loss = criterion(output, y_train)
  loss = ce_loss + kl / args.batch_size

  loss.backward()
  optimizer.step()
  ```
  Testing snippet:
  ```
  model.eval()
  with torch.no_grad():
      output_mc = []
      for mc_run in range(args.num_monte_carlo):
          logits = model(x_test)
          probs = torch.nn.functional.softmax(logits, dim=-1)
          output_mc.append(probs)
      output = torch.stack(output_mc)
      pred_mean = output.mean(dim=0)
      y_pred = torch.argmax(pred_mean, axis=-1)
      test_acc = (y_pred.data.cpu().numpy() == y_test.data.cpu().numpy()).mean()
  ```
  Uncertainty Quantification:
  ```
  from utils.util import predictive_entropy, mutual_information

  predictive_uncertainty = predictive_entropy(output.data.cpu().numpy())
  model_uncertainty = mutual_information(output.data.cpu().numpy())
  ```

  (2) For building custom models, we have provided [example model implementations](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/models/bayesian) using the Bayesian layers.



  We have provided [example usages](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/examples) and [scripts](https://github.com/IntelLabs/bayesian-torch/tree/main/bayesian_torch/scripts) to train/evaluate the models. The instructions for CIFAR10 examples is provided below, similar scripts for ImageNet and MNIST are available.
  ```
  cd bayesian_torch
  ```


  To train Bayesian ResNet on CIFAR10, run this command:

  **Mean-field variational inference (Reparameterized Monte Carlo estimator)**
  ```train
  sh scripts/train_bayesian_cifar.sh
  ```

  **Mean-field variational inference (Flipout Monte Carlo estimator)**
  ```train
  sh scripts/train_bayesian_flipout_cifar.sh
  ```

  To train deterministic ResNet on CIFAR10, run this command:

  **Vanilla**
  ```train
  sh scripts/train_deterministic_cifar.sh
  ```




  To evaluate Bayesian ResNet on CIFAR10, run this command:

  **Mean-field variational inference (Reparameterized Monte Carlo estimator)**
  ```test
  sh scripts/test_bayesian_cifar.sh
  ```

  **Mean-field variational inference (Flipout Monte Carlo estimator)**
  ```test
  sh scripts/test_bayesian_flipout_cifar.sh
  ```

  To evaluate deterministic ResNet on CIFAR10, run this command:

  **Vanilla**
  ```test
  sh scripts/test_deterministic_cifar.sh
  ```



  To quantize Bayesian ResNet (convert to INT8) and evaluate on CIFAR10, run this command:
  ```test
  sh scripts/quantize_bayesian_cifar.sh
  ```



  If you use this code, please cite as:
  ```sh
  @software{krishnan2022bayesiantorch,
    author       = {Ranganath Krishnan and Pi Esposito and Mahesh Subedar},
    title        = {Bayesian-Torch: Bayesian neural network layers for uncertainty estimation},
    month        = jan,
    year         = 2022,
    doi          = {10.5281/zenodo.5908307},
    url          = {https://doi.org/10.5281/zenodo.5908307}
    howpublished = {\url{https://github.com/IntelLabs/bayesian-torch}}
  }
  ```
  Accuracy versus Uncertainty Calibration (AvUC) loss
  ```sh
  @inproceedings{NEURIPS2020_d3d94468,
   title = {Improving model calibration with accuracy versus uncertainty optimization},
   author = {Krishnan, Ranganath and Tickoo, Omesh},
   booktitle = {Advances in Neural Information Processing Systems},
   volume = {33},
   pages = {18237--18248},
   year = {2020},
   url = {https://proceedings.neurips.cc/paper/2020/file/d3d9446802a44259755d38e6d163e820-Paper.pdf}

  }
  ```
  Quantization framework for Bayesian deep learning
  ```sh
  @inproceedings{lin2023quantization,
    title={Quantization for Bayesian Deep Learning: Low-Precision Characterization and Robustness},
    author={Lin, Jun-Liang and Krishnan, Ranganath and Ranipa, Keyur Ruganathbhai and Subedar, Mahesh and Sanghavi, Vrushabh and Arunachalam, Meena and Tickoo, Omesh and Iyer, Ravishankar and Kandemir, Mahmut Taylan},
    booktitle={2023 IEEE International Symposium on Workload Characterization (IISWC)},
    pages={180--192},
    year={2023},
    organization={IEEE}
  }
  ```
  Model Priors with Empirical Bayes using DNN (MOPED)
  ```sh
  @inproceedings{krishnan2020specifying,
    title={Specifying weight priors in bayesian deep neural networks with empirical bayes},
    author={Krishnan, Ranganath and Subedar, Mahesh and Tickoo, Omesh},
    booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
    volume={34},
    number={04},
    pages={4477--4484},
    year={2020},
    url = {https://ojs.aaai.org/index.php/AAAI/article/view/5875}
  }
  ```

  This library and code is intended for researchers and developers, enables to quantify principled uncertainty estimates in deep learning models to develop uncertainty-aware AI models.
  Feedbacks, issues and contributions are welcome.


pkgId: c0b6a1d6f7b257bab9a4ccf693d1d8c63d4530dfe5e62f849852d0efbfa33412
name: python-bayesianbandits
arch: src
version: 0.8.0
epoch: 0
release: 1
summary: A Pythonic microframework for Multi-Armed Bandit algorithms.
url: https://pypi.org/project/bayesianbandits/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesianbandits-0.8.0-1.src.rpm
checksum_type: sha256
description:
  [![Downloads](https://static.pepy.tech/badge/bayesianbandits/month)](https://pepy.tech/project/bayesianbandits)
  [![codecov](https://codecov.io/gh/bayesianbandits/bayesianbandits/graph/badge.svg?token=1YG8LBDJ5A)](https://codecov.io/gh/bayesianbandits/bayesianbandits)
  [![Documentation Status](https://readthedocs.org/projects/bayesianbandits/badge/?version=stable)](https://bayesianbandits.readthedocs.io/en/stable/?badge=stable)



  **Problem**: Despite having a conceptually simple interface, putting together a multi-armed bandit in Python is a daunting task.

  **Solution**: `bayesianbandits` is a Python package that provides a simple interface for creating and running Bayesian multi-armed bandits. It is built on top of [scikit-learn](https://scikit-learn.org/stable/) and [scipy](https://www.scipy.org/), taking advantage of conjugate priors to provide fast and accurate inference.

  While the API is still evolving, this library is already being used in production for marketing optimization, dynamic pricing, and other applications. Are you using `bayesianbandits` in your project? Let us know!



  * **Simple API**: `bayesianbandits` provides a simple interface - most users will only need to call `pull` and `update` to get started.
  * **Fast**: `bayesianbandits` is built on top of already fast scientific Python libraries, but, if installed, will also use SuiteSparse to further speed up matrix operations on sparse matrices. Handling tens or even hundreds of thousands of features in a sparse model is no problem.
  * **scikit-learn compatible**: Use sklearn pipelines and transformers to preprocess data before feeding it into your bandit.
  * **Flexible**: Pick from a variety of policy algorithms, including Thompson sampling, upper confidence bound, and epsilon-greedy. Pick from a variety of prior distributions, including beta, gamma, normal, and normal-inverse-gamma.
  * **Extensible**: `bayesianbandits` provides simple interfaces for creating custom policies and priors.
  * **Well-tested**: `bayesianbandits` is well-tested, with nearly 100% test coverage.



  `bayesianbandits` is tested with Python 3.9, 3.10, 3.11, and 3.12 with `scikit-learn` 1.2.2, 1.3.2, 1.4.2, and 1.5.1.



  Install this package from PyPI.

  ```
  pip install -U bayesianbandits
  ```

  Define a LinearUCB contextual bandit with a normal prior.

  ```python
  import numpy as np
  from bayesianbandits import (
      Arm,
      NormalInverseGammaRegressor,
      ContextualAgent,
      UpperConfidenceBound,
  )

  arms = [
      Arm(1, learner=NormalInverseGammaRegressor()),
      Arm(2, learner=NormalInverseGammaRegressor()),
      Arm(3, learner=NormalInverseGammaRegressor()),
      Arm(4, learner=NormalInverseGammaRegressor()),
  ]

  policy = UpperConfidenceBound(alpha=0.84)
  ```

  Instantiate the agent and pull an arm with context.

  ```python
  agent = ContextualAgent(arms, policy)

  context = np.array([[1, 0, 0, 0]])





  agent.pull(context)
  ```

  Update the bandit with the reward.

  ```python
  agent.update(context, np.array([15.0]))
  ```

  That's it! Check out the [documentation](https://bayesianbandits.readthedocs.io/en/latest/) for more examples.


pkgId: 2c29fd3a90711fae7363ecd2aca181f57cdbc03316197489c8e698213bc82831
name: python-bayesianbandits
arch: src
version: 0.8.1
epoch: 0
release: 1
summary: A Pythonic microframework for Multi-Armed Bandit algorithms.
url: https://pypi.org/project/bayesianbandits/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesianbandits-0.8.1-1.src.rpm
checksum_type: sha256
description:
  [![Downloads](https://static.pepy.tech/badge/bayesianbandits/month)](https://pepy.tech/project/bayesianbandits)
  [![codecov](https://codecov.io/gh/bayesianbandits/bayesianbandits/graph/badge.svg?token=1YG8LBDJ5A)](https://codecov.io/gh/bayesianbandits/bayesianbandits)
  [![Documentation Status](https://readthedocs.org/projects/bayesianbandits/badge/?version=stable)](https://bayesianbandits.readthedocs.io/en/stable/?badge=stable)



  **Problem**: Despite having a conceptually simple interface, putting together a multi-armed bandit in Python is a daunting task.

  **Solution**: `bayesianbandits` is a Python package that provides a simple interface for creating and running Bayesian multi-armed bandits. It is built on top of [scikit-learn](https://scikit-learn.org/stable/) and [scipy](https://www.scipy.org/), taking advantage of conjugate priors to provide fast and accurate inference.

  While the API is still evolving, this library is already being used in production for marketing optimization, dynamic pricing, and other applications. Are you using `bayesianbandits` in your project? Let us know!



  * **Simple API**: `bayesianbandits` provides a simple interface - most users will only need to call `pull` and `update` to get started.
  * **Fast**: `bayesianbandits` is built on top of already fast scientific Python libraries, but, if installed, will also use SuiteSparse to further speed up matrix operations on sparse matrices. Handling tens or even hundreds of thousands of features in a sparse model is no problem.
  * **scikit-learn compatible**: Use sklearn pipelines and transformers to preprocess data before feeding it into your bandit.
  * **Flexible**: Pick from a variety of policy algorithms, including Thompson sampling, upper confidence bound, and epsilon-greedy. Pick from a variety of prior distributions, including beta, gamma, normal, and normal-inverse-gamma.
  * **Extensible**: `bayesianbandits` provides simple interfaces for creating custom policies and priors.
  * **Well-tested**: `bayesianbandits` is well-tested, with nearly 100% test coverage.



  `bayesianbandits` is tested with Python 3.10, 3.11, 3.12 and 3.13 with `scikit-learn` 1.3.2, 1.4.2, and 1.5.2.



  Install this package from PyPI.

  ```
  pip install -U bayesianbandits
  ```

  Define a LinearUCB contextual bandit with a normal prior.

  ```python
  import numpy as np
  from bayesianbandits import (
      Arm,
      NormalInverseGammaRegressor,
      ContextualAgent,
      UpperConfidenceBound,
  )

  arms = [
      Arm(1, learner=NormalInverseGammaRegressor()),
      Arm(2, learner=NormalInverseGammaRegressor()),
      Arm(3, learner=NormalInverseGammaRegressor()),
      Arm(4, learner=NormalInverseGammaRegressor()),
  ]

  policy = UpperConfidenceBound(alpha=0.84)
  ```

  Instantiate the agent and pull an arm with context.

  ```python
  agent = ContextualAgent(arms, policy)

  context = np.array([[1, 0, 0, 0]])





  agent.pull(context)
  ```

  Update the bandit with the reward.

  ```python
  agent.update(context, np.array([15.0]))
  ```

  That's it! Check out the [documentation](https://bayesianbandits.readthedocs.io/en/latest/) for more examples.


pkgId: a3c1e39b54144775f76b27472611f7b09c29c6f0608614079ee2b660a6050b3a
name: python-bayesim
arch: src
version: 0.10.2
epoch: 0
release: 1
summary: Fast model fitting via Bayesian inference
url: https://pypi.org/project/bayesim/
rpm_license: GPLv2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayesim-0.10.2-1.src.rpm
checksum_type: sha256
description:
  The little home on the internet for our adaptive grid sampled Bayesian inference code. Check it out if you want to compute probability distributions over ~1-10 input parameters to a relatively computationally expensive (10's of core-seconds per evaluation) model.
  More detailed documentation `here <https://pv-lab.github.io/bayesim/_build/html/index.html>`_.


pkgId: e853679f302f33da51f9a1b772c24927c6910ef4208efdac9c43fdfec66f2bb4
name: python-bayespy
arch: src
version: 0.6.2
epoch: 0
release: 1
summary: Variational Bayesian inference tools for Python
url: http://bayespy.org
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayespy-0.6.2-1.src.rpm
checksum_type: sha256
description:
  BayesPy provides tools for Bayesian inference with Python.  The user
  constructs a model as a Bayesian network, observes data and runs
  posterior inference.  The goal is to provide a tool which is
  efficient, flexible and extendable enough for expert use but also
  accessible for more casual users.
  Currently, only variational Bayesian inference for
  conjugate-exponential family (variational message passing) has been
  implemented.  Future work includes variational approximations for
  other types of distributions and possibly other approximate inference
  methods such as expectation propagation, Laplace approximations,
  Markov chain Monte Carlo (MCMC) and other methods. Contributions are
  welcome.


pkgId: 3883a06cbf5be1fb114f4806bedc1b5d945d22ea5f6828895b482aab71f59e65
name: python-bayeux-ml
arch: src
version: 0.1.14
epoch: 0
release: 1
summary: Stitching together probabilistic models and inference.
url: https://pypi.org/project/bayeux-ml/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayeux-ml-0.1.14-1.src.rpm
checksum_type: sha256
description:
  *Stitching together models and samplers*

  [![Unittests](https://github.com/jax-ml/bayeux/actions/workflows/pytest_and_autopublish.yml/badge.svg)](https://github.com/jax-ml/bayeux/actions/workflows/pytest_and_autopublish.yml)
  [![PyPI version](https://badge.fury.io/py/bayeux_ml.svg)](https://badge.fury.io/py/bayeux_ml)

  `bayeux` lets you write a probabilistic model in JAX and immediately have access to state-of-the-art inference methods. The API aims to be **simple**, **self descriptive**, and **helpful**. Simply provide a log density function (which doesn't even have to be normalized), along with a single point (specified as a [pytree](https://jax.readthedocs.io/en/latest/pytrees.html)) where that log density is finite. Then let `bayeux` do the rest!



  ```bash
  pip install bayeux-ml
  ```


  We define a model by providing a log density in JAX. This could be defined using a probabilistic programming language (PPL) like [numpyro](examples/numpyro_and_bayeux), [PyMC](examples/pymc_and_bayeux), [TFP](examples/tfp_and_bayeux), distrax, oryx, coix, or directly in JAX.

  ```python
  import bayeux as bx
  import jax

  normal_density = bx.Model(
    log_density=lambda x: -x*x,
    test_point=1.)

  seed = jax.random.key(0)

  opt_results = normal_density.optimize.optax_adam(seed=seed)

  idata = normal_density.mcmc.numpyro_nuts(seed=seed)

  surrogate_posterior, loss = normal_density.vi.tfp_factored_surrogate_posterior(seed=seed)
  ```



  * [Defining models](inference)
  * [Inspecting models](inspecting)
  * [Testing and debugging](debug_mode)
  * Also see `bayeux` integration with [numpyro](examples/numpyro_and_bayeux), [PyMC](examples/pymc_and_bayeux), and [TFP](examples/tfp_and_bayeux)!


  *This is not an officially supported Google product.*


pkgId: 39979d15049e47fa285234fa23aa4c2f20ad628bc5a3a9bdede4515cca607ac8
name: python-bayex
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Minimal Bayesian Optimization Implementation with Gaussian Processes written in JAX.
url: https://github.com/alonfnt/bayex
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayex-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [![tests](https://github.com/alonfnt/bayex/actions/workflows/tests.yml/badge.svg)](https://github.com/alonfnt/bayex/actions/workflows/tests.yml)

  <p align="center">
      <img src="https://github.com/alonfnt/bayex/assets/38870744/ffb920ed-f347-4185-9abe-24ec2d0a22f1" height="300">
      <img src="https://github.com/alonfnt/bayex/assets/38870744/882fecc7-bc30-4267-ad1d-687fdbbe2cdc" height="300">
  </p>

  [**Installation**](#installation)
  | [**Usage**](#usage)
  | [**Contributing**](#contributing)
  | [**License**](#license)

  Bayex is a lightweight Bayesian optimization library designed for efficiency and flexibility, leveraging the power of JAX for high-performance numerical computations.
  This library aims to provide an easy-to-use interface for optimizing expensive-to-evaluate functions through Gaussian Process (GP) models and various acquisition functions. Whether you're maximizing or minimizing your objective function, Bayex offers a simple yet powerful set of tools to guide your search for optimal parameters.


  Bayex can be installed using [PyPI](https://pypi.org/project/bayex/) via `pip`:
  ```
  pip install bayex
  ```
  or from GitHub directly
  ```
  pip install git+git://github.com/alonfnt/bayex.git
  ```

  Likewise, you can clone this repository and install it locally

  ```bash
  git clone https://github.com/alonfnt/bayex.git
  cd bayex
  pip install -r requirements.txt
  ```


  Using Bayex is quite simple despite its low level approach:
  ```python
  import jax
  import numpy as np
  import bayex

  def f(x):
      return -(1.4 - 3 * x) * np.sin(18 * x)

  domain = {'x': bayex.domain.Real(0.0, 2.0)}
  optimizer = bayex.Optimizer(domain=domain, maximize=True, acq='PI')


  params = {'x': [0.0, 0.5, 1.0]}
  ys = [f(x) for x in params['x']
  opt_state = optimizer.init(ys, params)


  ori_key = jax.random.key(42)
  for step in range(20):
      key = jax.random.fold_in(ori_key, step)
      new_params = optimizer.sample(key, opt_state)
      y_new = f(**new_params)
      opt_state = optimizer.fit(opt_state, y_new, new_params)
  ```

  with the results being saved at `opt_state`.


  We welcome contributions to Bayex! Whether it's adding new features, improving documentation, or reporting issues, please feel free to make a pull request or open an issue.


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

rpm_license:
  MIT License  Copyright (c) 2021 Albert Alonso  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: 6fdd505b8f0c91db6b51a764ebeef8b126472e8eb77347f38fedc15e5a02a749
name: python-bayinf
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Bayesian Inference
url: http://github.com/zhiqingxiao/bayinf/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayinf-0.1.0-1.src.rpm
checksum_type: sha256
description:
  ```
  import numpy as np
  from bayinf import infer_binomial, infer_poisson, infer_normal_known_variance, infer_normal_unknown_variance

  data_binomial = [1, 1, 0, 1, 0, 1, 1, 0, 1, 0]
  prior_alpha = 2
  prior_beta = 2
  print(f"Binomial Prior Alpha: {prior_alpha}")
  print(f"Binomial Prior Beta: {prior_beta}")
  posterior_alpha, posterior_beta = infer_binomial(data_binomial, prior_alpha, prior_beta)
  print(f"Binomial Posterior Alpha: {posterior_alpha}")
  print(f"Binomial Posterior Beta: {posterior_beta}")

  data_poisson = [2, 3, 1, 2, 4, 3, 2, 1, 3, 2]
  prior_alpha = 1
  prior_beta = 1
  print(f"Poisson Prior Alpha: {prior_alpha}")
  print(f"Poisson Prior Beta: {prior_beta}")
  posterior_alpha, posterior_beta = infer_poisson(data_poisson, prior_alpha, prior_beta)
  print(f"Poisson Posterior Alpha: {posterior_alpha}")
  print(f"Poisson Posterior Beta: {posterior_beta}")

  data_normal_known_variance = [1.5, 2.0, 1.8, 2.2, 1.9, 2.1, 1.7, 2.3, 2.0, 1.6]
  known_variance = 0.5
  prior_mean = 0
  prior_precision = 1
  print(f"Normal (Known Variance) Prior Mean: {prior_mean}")
  print(f"Normal (Known Variance) Prior Precision: {prior_precision}")
  posterior_mean, posterior_precision = infer_normal_known_variance(data_normal_known_variance, known_variance, prior_mean, prior_precision)
  print(f"Normal (Known Variance) Posterior Mean: {posterior_mean}")
  print(f"Normal (Known Variance) Posterior Precision: {posterior_precision}")

  data_normal_unknown_variance = [1.5, 2.0, 1.8, 2.2, 1.9, 2.1, 1.7, 2.3, 2.0, 1.6]
  prior_mean = 0
  prior_precision = 1
  prior_df = 2
  prior_scale = 1
  print(f"Normal (Unknown Variance) Prior Mean: {prior_mean}")
  print(f"Normal (Unknown Variance) Prior Precision: {prior_precision}")
  print(f"Normal (Unknown Variance) Prior DF: {prior_df}")
  print(f"Normal (Unknown Variance) Prior Scale: {prior_scale}")
  posterior_mean, posterior_precision, posterior_df, posterior_scale = infer_normal_unknown_variance(data_normal_unknown_variance, prior_mean, prior_precision, prior_df, prior_scale)
  print(f"Normal (Unknown Variance) Posterior Mean: {posterior_mean}")
  print(f"Normal (Unknown Variance) Posterior Precision: {posterior_precision}")
  print(f"Normal (Unknown Variance) Posterior DF: {posterior_df}")
  print(f"Normal (Unknown Variance) Posterior Scale: {posterior_scale}")
  ```


pkgId: 56d44aefaa9fd6d49c41b15634d184bc8fd505047bb55f9aa6d0b924a7231b99
name: python-baykeshop
arch: src
version: 1.3.4
epoch: 0
release: 1
summary: BaykeShop开源商城系统
url: https://gitee.com/xingfugz/bayke-shop
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baykeshop-1.3.4-1.src.rpm
checksum_type: sha256
description:
  基于django构建的开源商城模块,可以快速的应用到自己的项目当中，使得自己的项目可以快速的拥有一个商城模块，使用简单，没有过多的依赖第三方包，非常的轻量，只使用了django+pyecharts+pillow等一些基础的模块库，并实现了商城后台所需要的数据分析功能图表。


  前台演示：http://baykeshop.proae.cn/

  后台演示：联系作者添加微信（baywanyun）获取访问账号密码！

  - 系统截图
  <img src="src/baykeshop/apps/core/static/core/images/zs.jpeg" width="100%">



  ```bash
  pip install baykeshop
  ```


  1. 项目settings.py中配置

  ```python
  INSTALLED_APPS = [
      ...
      'django.contrib.sites',
      'django.contrib.sitemaps',
      'baykeshop.apps.core',
      'baykeshop.apps.article',
      'baykeshop.apps.user',
      'baykeshop.apps.shop',
      'baykeshop.apps.order',
  ]

  SITE_ID = 1
  ```
  这里注意需要引入django的sites模块以及sitemaps模块，否则无法使用sitemap功能。

  2. 配置静态文件目录
  ```python

  STATIC_URL = 'static/'
  STATIC_ROOT = BASE_DIR / "static"

  MEDIA_URL = "media/"
  MEDIA_ROOT = BASE_DIR / "media"
  ```

  3. 配置数据库

  这里我们不做强制配置，直接使用默认的数据库即可，也可以根据自己需要配置数据库，具体请参考Django官方文档。

  4. 配置缓存

  Django默认使用内存缓存，如果你需要使用其他缓存，可以参考Django官方文档。

  5. 配置日志

  Django默认使用文件日志，如果你需要使用其他日志，可以参考Django官方文档。


  在项目的urls.py文件中，添加如下代码：
  ```python
  from django.contrib import admin
  from django.urls import path, include
  from django.conf import settings
  from django.conf.urls.static import static
  from baykeshop.site import admin as bayke_admin

  urlpatterns = [
      path('admin/', admin.site.urls),
      
      path('system/', bayke_admin.site.urls),
      
      path('', include('baykeshop.apps.urls')),
      
      *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
      
      *static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
  ]
  ```

  ```python

  python manage.py makemigrations

  python manage.py migrate

  python manage.py createsuperuser

  python manage.py init

  python manage.py runserver
  ```
  配置完成后，即可在浏览器中访问项目。



  后台管理我们自定义AdminSite,因此默认的admin中是无法使用的。

  后台访问需要遵循`path('system/', bayke_admin.site.urls),` 的路径。


pkgId: 91d566acc153e197ed4d5392ea0836b9b611a6ec6b986234a1d3a5cfaa99201b
name: python-baysalt-christmas
arch: src
version: 1.1.9
epoch: 0
release: 1
summary: Some simple tools for Christmas
url: https://pypi.org/project/baysalt-christmas/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baysalt-christmas-1.1.9-1.src.rpm
checksum_type: sha256
description:
  To install this package, run:

      pip install baysalt_christmas
  or

      pip3 install baysalt_christmas






  ```python
  from christmas.commonCode import convertToTime
  ddt = convertToTime('20230330')
  ddt = convertToTime('2023033001')
  ddt = convertToTime('202303300101')
  ddt = convertToTime('20230330010101')
  ddt = convertToTime('2022-11-09_01:00:00')
  ```

  ```python
  from christmas.commonCode import new_filename
  import numpy as np
  _lon = np.linspace(100,120)
  _lat = np.linspace(10,20)
  filename = new_filename('wave', _lon, _lat, _date, 10)
  ```

  ```python
  from christmas.commonCode import get_date
  date = get_date()
  ```

  ```python
  from christmas.commonCode import make_dir
  make_dir('/home/ocean/zcy/1/2/3/4')
  ```


  ```python
  from christmas.commonCode import split_path
  path = split_path('/home/ocean/zcy/1/2/3/4/')
  ```

  ```python
  from christmas.commonCode import osprint
  x = '123'
  osprint(f'{x}SSS')
  ```

  ```python
  from christmas.commonCode import osprints
  x = '123'
  osprints('INFO',f'{x}SSS')
  ```




  ```python
  from christmas.processBar import SftpProcessbar
  import paramiko
  ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  ssh.connect(hostname='47.105.220.136', port=22, username='wave', password='wave', timeout=100)
  sftp = paramiko.SFTPClient.from_transport(ssh.get_transport())
  sftp_obj =SftpProcessbar()
  Sprocess_bar = sftp_obj.process_bar
  sftp.put('/home/ocean/x.zip', 'x.zip', callback=Sprocess_bar)
  ```


  ```python
  from christmas.processBar import FtpProcessbar
  import os, ftplib

  buf_size = 1024
  ftp = ftplib.FTP()
  ftp.encoding = 'utf-8'
  ftp.set_debuglevel(0)
  ftp.connect(host='47.105.220.136', port=22)
  ftp.login('wave', 'wave')
  Ftp_obj = FtpProcessbar(os.path.getsize('/home/ocean/x.zip'))
  Fprocess_bar = Ftp_obj.process_bar()
  with open('/home/ocean/x.zip', 'rb') as fp:
    ftp.storbinary(f'STOR x.zip', fp, buf_size, Fprocess_bar)
  ```




  ```python
  from christmas.read_conf import read_conf
  Conf = read_conf('Post_fvcom.conf')
  ```


  ```python
  from christmas.read_conf import is_number
  TF = is_number('12')
  TF = is_number('-12')
  TF = is_number('1e10')
  TF = is_number('.5')
  ```




  ```python
  from christmas.S_DateTime import build_date
  Nearby_date = build_date('20230324')
  ```



  ```python
  from christmas.server_info import grep_from_top
  pid = grep_from_top('python3 forecast.py')
  ```

  ```python
  from christmas.server_info import grep_from_top_mpi
  pid = grep_from_top_mpi('wrf.exe')
  ```

  ```python
  from christmas.server_info import get_free_core
  cpu_num, free_cpu_num = get_free_core()
  ```

  ```python
  from christmas.server_info import get_serve_info
  user, hostname, ip = get_serve_info()
  ```


  ```python
  from christmas.mncPy.compress import mnc_Py
  mnc = mnc_Py('/home/ocean/wave_without_compress.nc',o_path = True, d_rm=True)
  mnc.compress_files()
  ```


pkgId: 29350c24858fb150cb0d30901b6c492ac46b7934d426cde29a46352336836922
name: python-bayspec
arch: src
version: 0.1.11
epoch: 0
release: 1
summary: Astronomical spectrum fitting tool
url: https://github.com/jyangch/bayspec
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bayspec-0.1.11-1.src.rpm
checksum_type: sha256
description:
  A Bayesian inference-based spectral fitting tool for multi-dimensional and multi-wavelength astrophysical data


pkgId: b07718a4f572b9eb1c58db598eaffe3cf693401ff094dd097f24922aaeb1d8b5
name: python-bazel-runfiles
arch: src
version: 0.36.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/bazelbuild/rules_python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bazel-runfiles-0.36.0-1.src.rpm
checksum_type: sha256
description:
  This is a Bazel Runfiles lookup library for Bazel-built Python binaries and tests.

  Learn about runfiles: read [Runfiles guide](https://bazel.build/extending/rules#runfiles)
  or watch [Fabian's BazelCon talk](https://www.youtube.com/watch?v=5NbgUMH1OGo).



  The Runfiles API is available from two sources, a direct Bazel target, and a [pypi](https://pypi.org/) package.



  1. Depend on this runfiles library from your build rule, like you would other third-party libraries:

      ```python
      py_binary(
          name = "my_binary",
          
          deps = ["@rules_python//python/runfiles"],
      )
      ```

  2. Import the runfiles library:

      ```python
          from python.runfiles import Runfiles
      ```



  1. Add the 'bazel-runfiles' dependency along with other third-party dependencies, for example in your `requirements.txt` file.

  2. Depend on this runfiles library from your build rule, like you would other third-party libraries:
      ```python
      load("@pip_deps//:requirements.bzl", "requirement")

      py_binary(
          name = "my_binary",
          ...
          deps = [requirement("bazel-runfiles")],
      )
      ```

  3. Import the runfiles library:
      ```python
      from runfiles import Runfiles
      ```



  Create a `Runfiles` object and use `Rlocation` to look up runfile paths:

  ```python
  r = Runfiles.Create()

  with open(r.Rlocation("my_workspace/path/to/my/data.txt"), "r") as f:
      contents = f.readlines()
      
  ```

  The code above creates a manifest- or directory-based implementation based on the environment variables in `os.environ`. See `Runfiles.Create()` for more info.

  If you want to explicitly create a manifest- or directory-based
  implementation, you can do so as follows:

  ```python
  r1 = Runfiles.CreateManifestBased("path/to/foo.runfiles_manifest")

  r2 = Runfiles.CreateDirectoryBased("path/to/foo.runfiles/")
  ```

  If you want to start subprocesses, and the subprocess can't automatically
  find the correct runfiles directory, you can explicitly set the right
  environment variables for them:

  ```python
  import subprocess
  from python.runfiles import Runfiles

  r = Runfiles.Create()
  env = {}

  env.update(r.EnvVars())
  p = subprocess.run(
      [r.Rlocation("path/to/binary")],
      env=env,
      
  )
  ```


pkgId: 21abd35b2250882a3df7bcd46e41b9e326998fcc0088560acb131271a7343222
name: python-bazze-json-logger
arch: src
version: 0.0.3
epoch: 0
release: 1
summary: Simple tool for standardizing logging to JSON.
url: https://pypi.org/project/bazze-json-logger/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bazze-json-logger-0.0.3-1.src.rpm
checksum_type: sha256
description:
  Import into your Python project to standardize logs to JSON format.  Works well with AWS CloudWatch and AWS Lambda Functions.



  ```bash
  pip install -U bazze-json-logger
  ```



  This package sets up a JSON formatter for the Python root logger.  In order for this to work properly, be sure to run this package before setting up any new loggers.

  ```python
  import logging

  import bazze_json_logger

  logging.basicConfig(level=logging.INFO)

  bazze_json_logger.setup()

  logger = logging.getLogger()
  logger.info('Hello World!')
  ```

  Output

  ```bash
  >>> {"timestamp": "2020-09-30T00:15:39.667110Z", "level": "INFO", "name": "root", "message": "Hello World!", "schema_version": "0.0.2"}
  ```



  When using AWS Lambda it is nice to have the `aws_request_id` as part of the JSON object for tracing purposes.  To do this we need to pass it into the `setup()` method.

  ```python
  import logging

  import bazze_json_logger

  logging.basicConfig(level=logging.INFO)


  def lambda_handler(event, context):
      bazze_json_logger.setup(aws_request_id=context.aws_request_id)
      logger = logging.getLogger()
      logger.info('Hello World!')
  ```




  Logs can be viewed locally in your terminal when testings.  When the application is deployed, they will show up in the CloudWatch group in JSON format.

  To view the CloudWatch logs in your console:

  Install awslogs

  ```bash
  pip install -U awslogs
  ```

  Export AWS_PROFILE

  ```bash
  export AWS_PROFILE=bazze
  ```

  To view all log groups:

  ```bash
  awslogs groups
  ```

  To tail your log group:

  ```bash
  awslogs get /aws/lambda/your-function --since 5m --watch
  ```

  To query and aggregate the logs, I recommend using CloudWatch Insights.


pkgId: d2a1960ee671816f66f9f1e8d0a605d2f358ad2cca77abe88c0e84c53b62ec28
name: python-bb-logger
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: setup logger bb
url: https://github.com/dulx96/bb_logger.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bb-logger-0.3.3-1.src.rpm
checksum_type: sha256
description:
  1. Remove all logger handlers and reformat log record ( can be extended )
  2. Set noti status, controlable by arguments
  3. Override lambda raise error to critical and notice if noti status = True, optional



  > 1. call setup_logging() one time at begin of program
  > 2. using decorator setup_logging_dec() with each lambda


  > **default_level** (int, optional): min log level. Defaults to logging.WARNING.

  > **extend_format** (str, optional): custom extend format. Defaults to None.

  > **lambda_exec_error_log** (bool, optional): log with critical level for lambda raise exception. Defaults to True. only with decorator **setup_logging_dec()**

  > **default_noti_level** (int, optional): all log from this level will be noticed if no arguments are provided. Defaults to logging.ERROR

  > **force_noti_level** (int, optional): force all log with this level to be noticed. Defaults to logging.ERROR.



  > (*) extend_format logic

  logging format details can be  [here](https://docs.python.org/3/library/logging.html#logrecord-attributes)

  * BASE_FORMAT = '[s]'
  * DEFAULT_FORMAT = BASE_FORMAT + ' s'
  * if extend_format is specified, FORMAT will be : BASE_FORMAT + '\\t'+ extend_format
  * else DEFAULT_FORMAT wil be used  



  > sample code
  ```python
  import logging
  from bb_logger import setup_logging

  logging.error('before setup, using old handler format')

  setup_logging()
  logging.error('after setup, using new default format')

  setup_logging(extend_format="s - s")
  logging.error('after setup with custom format, using extended format')
  ```
  > output
  ```sh
  ERROR:root:before setup, using old handler format
  [ERROR] after setup, using new default format
  [ERROR]	2021-01-10 18:18:46,202 - after setup with custom format, using extended format
  ```





   

   ADD NOTI STATUS TO LOG BASE ON CONDITIONS
   > (*) **force_noti_level** : default is logging.ERROR

  EXAMPLE

  ```python
  import logging
  from bb_logger import setup_logging
  logging.error('before setup')

  setup_logging()
  logging.error('after setup, noti status was added')


  logging.warning('warning with noti True', {'noti': True})
  logging.warning('warning with noti False', {'noti': False})


  setup_logging(default_level=logging.INFO, force_noti_level=logging.INFO)
  logging.info('info with noti True', {'noti': True})
  logging.info('info with noti False stil have NOTI status', {'noti': False})


  ```
  > output
  ```sh
  [ERROR]	2021-02-06T08:01:56.558Z	c4c3fad9-eacf-41f3-bba1-15b119bfd980	before setup
  [ERROR] [NOTI] after setup, noti status was added
  [WARNING] [NOTI] warning with noti True
  [WARNING] [NOT_NOTI] warning with noti False
  [INFO] [NOTI] info with noti True
  [INFO] [NOTI] info with noti False stil have NOTI status

  ```




  EXAMPLE

  ```python
  from bb_logger import setup_logging,setup_logging_dec

  @setup_logging_dec(default_level=logging.INFO,lambda_exec_error_log=True, force_noti_level=logging.ERROR)
  def lambda_handler(event, context):
      a = 1 / 0

  ```
  > output
  ```shell
  [CRITICAL] [NOTI] division by zero
  Traceback (most recent call last):
    File "/var/task/bb_logger.py", line 98, in wrapper
      func(*args, **kwargs)
    File "/var/task/lambda_function.py", line 12, in lambda_handler
      a = 1/ 0
  ```
  > exception raise by lambda will be set at Critical level and noticed





  CloudWatch now accept following pattern:

  * [LEVEL] [NOTI]

  Example:

  * "[ERROR] [NOTI] error log" will be matched

  * "some thing before [ERROR] [NOTI] error log" will be matched


pkgId: 848cdf999bed539bbfd568ae7682814850c77a9fd27cb30ce949498513c9aa53
name: python-bb-unsucked
arch: src
version: 0.0.14
epoch: 0
release: 1
summary: A solution to Blackboard misery for college students and professors
url: https://git-community.cs.odu.edu/jmcateer/blackboard-unsucked
rpm_license: GNU General Public License v2 (GPLv2)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bb-unsucked-0.0.14-1.src.rpm
checksum_type: sha256
description:
  _crummy name for a fix of crummy software_

  If you are a student or faculty at ODU I'm sure you're no stranger
  to wasting 2-3 hours a day trying to find or post assignments via BlackBoard.

  I am concerned with the student's view, but I hope this experiment can
  prove useful for professors as well. The goal is to wrap around existing
  BlackBoard infrastructure and provide a CLI API to access all the important functions
  which usually are trapped behind 4-5 links and a total 20-30 second browser load time.



   - [x] Login to BB
   - [x] List classes for the current semester only (hide irrelevant ones)
   - [x] List all announcements
   - [x] List assignments for a given class
    - This will have to be sort of intelligent as professors put assignments in different places
   - [ ] Submit files for assignments
   - [ ] View/Post to discussion boards
   - [ ] Caching and Daemon operation, to prevent having to hit the network for most data access




  Python3 `requests`, and `BeautifulSoup`, both of which can be
  installed via `pip3`



  The fastest setup is to save a `.har` file of a recent Blackboard session someplace,
  then run

  ```bash

  pip3 install --user bb_unsucked

  python3 -m bb_unsucked build-cache downloads/my-session.har

  python3 -m bb_unsucked ls
  ```



  the file `demo_usage_in_script.py` has more examples, but the hello world is:

  ```python
  import bb_unsucked

  bb = bb_unsucked.BBUnsucked()

  for my_class in bb.classes():
    print(f"I am in {my_class.course_id}")

  ```



  To perform the authentication step the most reliable method is to
  save a `.har` file of a recent blackboard session. `bb_unsucked` is
  capable of parsing authentication session cookies out of the file `recent_request.har`.

  ![how to save a .har from a browser](howto-save-har.jpg "Saving .HAR")




  `bb-unsucked` reads from config directives first from `/etc/bb-unsucked/config.ini`
  and then from `$HOME/.bb-unsucked/config.ini`. Neither file need to be present,
  but should you want to override a parameter the default config contents would be

  ```
  [DEFAULT]
  base_domain = https://www.blackboard.odu.edu
  cookies_file = /j/.bb-unsucked/cookies.bin
  agressive_caching = False
  courses_cache_file = /j/.bb-unsucked/courses-cache.bin
  courses_max_cache_s = 604800
  announcements_cache_file = /j/.bb-unsucked/announcements-cache.bin
  announcements_max_cache_s = 21600

  ```

  As you can see, the `base_domain` defaults to ODU's blackboard instance,
  but this can be changed to point to any blackboard instance.

  My config lists various cache files as being under `/j/` (my home dir)
  because when using defaults `bb-unsucked` will dynamically generate the
  values of `cookies_file`, `courses_cache_file`, and  `announcements_cache_file`.



  Some speed demons will want to optimize performance as much as possible, esp.
  if `bb-unsucked` is going to be used in other scripts. This repo contains
  a makefile which will build the binary `bb-unsucked` when you execute `make bb-unsucked`.

  The binary outperforms the python module most effectively when reading
  cached data which requires no network access. It does this by inserting some code,
  `cython_main_interpose.c`, in the generated `.c` file that Cython outputs.

  This code is responsible for trying to perform simple tasks without
  the need to jump into a python runtime. good examples are printing help text and listing classes,
  which the module takes 200ms doing and the binary takes 2ms to do.


pkgId: 1d79f00b892fc36e82dc5dd41f3dcb0ee2eaae7f357e603bc607dcddcf70c56c
name: python-bbb-dl
arch: src
version: 1.0.13
epoch: 0
release: 1
summary: Big Blue Button Downloader that downloads a BBB lesson as MP4 video
url: https://github.com/C0D3D3V/bbb-dl
rpm_license: GPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbb-dl-1.0.13-1.src.rpm
checksum_type: sha256
description:
  Downloads a BBB lesson as MP4 video.
  The assembled video includes:

  - shared audio and webcams video
  - presented slides with
    - whiteboard actions (text and drawings)
    - cursor movements
    - zooming
  - screen sharing

  If something does not work, feel free to [contact me](https://github.com/C0D3D3V/bbb-dl/issues).


  1. Install [Python](https://www.python.org/) >=3.7
  2. Install [ffmpeg](https://github.com/C0D3D3V/Moodle-Downloader-2/wiki/Installing-ffmpeg)
  3. Run: `pip install --user bbb-dl`
  4. Run `python -m playwright install chromium`

  5. Run `bbb-dl --help` to see all options

  If you ever need to update `bbb-dl` run: `pip install -U bbb-dl`


  <details>
    <summary> For Experts: Click here for alternatively Setup using a virtual environment</summary>

  1. Install [Python](https://www.python.org/) >=3.7 and [git](https://git-scm.com/downloads)
  2. Install  `virtualenv`: `pip install virtualenv`
  3. Create a directory where you wish to install bbb-dl. Open a terminal in the desired directory
  4. Clone this repository into that folder: `git clone https://github.com/C0D3D3V/bbb-dl.git .`
  5. Run `virtualenv venv` to create the virtual environment (on Windows use `venv\Scripts\activate`)
  6. Run `source venv/bin/activate` to activate the virtual environment (on Windows use `venv\Scripts\activate`)
  7. Install `bbb-dl`: `pip install .`
  8. Install [ffmpeg](https://github.com/C0D3D3V/Moodle-Downloader-2/wiki/Installing-ffmpeg)
  9. Run `playwright install chromium`
  10. Run `bbb-dl --help` to see all options

  To deactivate the virtual environment run: `deactivate`
  </details>



  **Temporary files are default stored in the application data folder**

  - The `--backup` option uses the same location
  - You can change this location with the `--working-dir` option
  - On Windows, the folder is located in `%localappdata%\bbb-dl`
  - On Linux / MacOS, the folder is located in `~/.local/share/bbb-dl/`
  - If you used the `--keep-tmp-files` option and you run the program again with other `--skip-annotations` or `--skip-cursor` options, then you may want to remove the corresponding `frames` folder inside the temporary directory. Because frames are not overwritten.
  - If ffmpeg has an error and a file has not been finished, it should be deleted from the temporary directory.

  Example call:

  `bbb-dl --skip-cursor https://your.bbb.org/playback/presentation/2.3/playback.html?meetingId=5d9100very_long_id70001800032c-160100033965`


  ```
  usage: bbb-dl [-h] [-ao] [-sw] [-swfd] [-sa] [-sc] [-sz] [-bk] [-kt] [-v] [--ffmpeg-location FFMPEG_LOCATION] [-scv] [-ais] [-uac]
                [-ftv FORCE_TLS_VERSION] [--version] [--encoder ENCODER] [--audiocodec AUDIOCODEC] [--preset PRESET] [--crf CRF] [-f FILENAME]
                [-od OUTPUT_DIR] [-wd WORKING_DIR] [-mpc MAX_PARALLEL_CHROMES] [-fw FORCE_WIDTH] [-fh FORCE_HEIGHT]
                URL

  Big Blue Button Downloader that downloads a BBB lesson as MP4 video

  positional arguments:
    URL                   URL of a BBB lesson

  options:
    -h, --help            show this help message and exit
    -ao, --audio-only     Extract only the audio from the presentation, do not generate video.
    -sw, --skip-webcam    Skip adding the webcam video as an overlay to the final video. This will reduce the time to generate the final video
    -swfd, --skip-webcam-freeze-detection
                          Skip detecting if the webcam video is completely empty. It is assumed the webcam recording is not empty. This will reduce
                          the time to generate the final video
    -sa, --skip-annotations
                          Skip capturing the annotations of the professor. This will reduce the time to generate the final video
    -sc, --skip-cursor    Skip capturing the cursor of the professor. This will reduce the time to generate the final video
    -sz, --skip-zoom      Skip zooming into the presentation. All presentation slides are rendered in full size, which may result in sharper output
                          video. However, consequently also to smaller font.
    -bk, --backup         Downloads all the content from the server and then stops. After using this option, you can run bbb-dl again to create the
                          video based on the saved files
    -kt, --keep-tmp-files
                          Keep the temporary files after finish. In case of an error bbb-dl will reuse the already generated files
    -v, --verbose         Print more verbose debug information
    --ffmpeg-location FFMPEG_LOCATION
                          Optional path to the directory in that your installed ffmpeg executable is located (Use it if ffmpeg is not located in your
                          system PATH)
    -scv, --skip-cert-verify
                          Suppress HTTPS certificate validation
    -ais, --allow-insecure-ssl
                          Allow connections to unpatched servers. Use this option if your server uses a very old SSL version.
    -uac, --use-all-ciphers
                          Allow connections to servers that use insecure ciphers. Use this option if your server uses an insecure cipher.
    -ftv FORCE_TLS_VERSION, --force-tls-version FORCE_TLS_VERSION
                          Force the client to use a specify tls version. E.g: TLSv1_3
    --version             Print program version and exit
    --encoder ENCODER     Optional encoder to pass to ffmpeg (default libx264)
    --audiocodec AUDIOCODEC
                          Optional audiocodec to pass to ffmpeg (default copy the codec from the original source)
    --preset PRESET       Optional preset to pass to ffmpeg (default fast, a preset that can be used with all encoders)
    --crf CRF             Optional crf to pass to ffmpeg (default 23, lower crf (e.g 22) usually means larger file size and better video quality)
    -f FILENAME, --filename FILENAME
                          Optional output filename
    -od OUTPUT_DIR, --output-dir OUTPUT_DIR
                          Optional output directory for final video
    -wd WORKING_DIR, --working-dir WORKING_DIR
                          Optional output directory for all temporary directories/files
    -mpc MAX_PARALLEL_CHROMES, --max-parallel-chromes MAX_PARALLEL_CHROMES
                          Maximum number of chrome browser instances used to generate frames
    -fw FORCE_WIDTH, --force-width FORCE_WIDTH
                          Force width on final output. (e.g. 1280) This can reduce the time to generate the final video
    -fh FORCE_HEIGHT, --force-height FORCE_HEIGHT
                          Force height on final output. (e.g. 720) This can reduce the time to generate the final video
  ```



   If you want to do batch processing you can use `bbb-dl-batch`. All passed arguments will be passed to the respective `bbb-dl`. `bbb-dl-batch` itself only needs the path to a text file in which URLs to bbb sessions are specified line by line. See `bbb-dl-batch --help` for more information.

   Successfully downloaded URL sessions are added to `successful.txt` in the output folder. Session URLs that could not be successfully downloaded are added to `failed.txt` in the output folder.



  First of all, you should check if the BBB session you downloaded really looks better in the browser than the video you created. When comparing, make sure that the presentation in the browser has the same resolution as the video.

  Among other things, `ffmpeg` offers two options with which you can influence the output quality. You can experiment with them and see if the output improves.

  - `--preset` is the first of these options, it can take values from -1 to 13 or in words ultrafast, superfast, veryfast, faster, fast (default), medium, slow and veryslow. A slower encoder often delivers better quality, so try `--preset medium` to see if the quality improves.
  - `--crf` is the second of these options, it can take values from -1 to 63. A lower crf (e.g 22) usually means larger file size and better video quality, so try `--crf 22` to see if the quality improves.

  `bbb-dl` tries to estimate a suitable output resolution for the final video, this choice may or may not be good. You can force your own output resolution with the `--force-width` and `--force-height` options.

  - A high resolution would be e.g. FullHD with 1920x1080. Be warned if the slides themselves are not that large you may get blurry slides.
  - A lower resolution for faster rendering would be e.g. HD with 1280x720. It may be that the output looks sharper or less sharp, test it yourself.



  FFmpeg can use different hardware accelerators for encoding videos. You can find more information about this here: https://trac.ffmpeg.org/wiki/HWAccelIntro

  To use such hardware for encoding you may need to install drivers as indicated on the website and then set the `--encoder` option to the appropriate encoder.

  For example, if you have an **Nvidia** graphics card installed on a computer, you can use it with the [NVENC](https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC) encoder. For this, you simply set the option `--encoder h264_nvenc`. You can see on the [Nvidia website which graphics cards support this option](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new). If your graphics card also supports H.265 (HEVC) you can set the option `--encoder hevc_nvenc` instead, which might be even faster (you have to test this yourself).

  - For Intel CPUs, you can try the encoder `h264_qsv` (Use the option `--encoder h264_qsv`). Sometimes this encoder is faster than your graphics card encoder.

  - For AMD CPUs / GPUs, you can try the encoder `h264_amf` (Use the option `--encoder h264_amf`).

  > You have to test yourself if it is faster to use your hardware encoder or not. In some cases, hardware encoders are slower than using the CPU directly.




  [bbb-video-download](https://github.com/tilmanmoser/bbb-video-download)
  - It uses a clever approach written in Node.js that can be easily integrated into a bbb server
  - You can use the `--backup` option to feed `bbb-video-download`.
  - A multi-threaded port in go-lang can be found here: [bbb-video-converter](https://github.com/cli-ish/bbb-video-converter)

  [bbb-download](https://github.com/fossasia/bbb-download)
  - Takes advantage of the fact that you can use the bbb-player to play the session data offline.
  - Instead of creating a video file, this downloader downloads only the necessary files from the server, so you can use the bbb-player to play the session offline. The player is provided to you via shortcut.

  If someone wants to link another downloader here, which offers e.g. functions that bbb-dl does not offer, feel free to open an issue.


  This project is licensed under the terms of the *MIT License*. For further information, please look [here](LICENSE).


pkgId: e420030528f72a40764db0a95a4d679b02ae6564e3d94cfcec0fd2052f5a09b3
name: python-bbcloud-python-sdk
arch: src
version: 0.0.52
epoch: 0
release: 1
summary: bbcloud python sdk
url: https://github.com/bbcloudGroup/bbcloud_python_sdk
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbcloud-python-sdk-0.0.52-1.src.rpm
checksum_type: sha256
description:
  BBCloud内部使用的Python工具包

  ```shell

  pip3 install -r requirements.txt


  python3 setup.py sdist bdist_wheel

  python3 -m twine upload --repository pypi dist/*
  ```


pkgId: c6c5011886fced3615d4517927928cfe1ddc9e626c04708ee38d444978dd0e9c
name: python-bbcode
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: A pure python bbcode parser and formatter.
url: https://github.com/dcwatson/bbcode
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbcode-1.1.0-1.src.rpm
checksum_type: sha256
description:
  **Latest Package**
  http://pypi.python.org/pypi/bbcode
  **Source Code**
  https://github.com/dcwatson/bbcode
  **Documentation**
  https://dcwatson.github.io/bbcode/
  [![CI Status](https://github.com/dcwatson/bbcode/workflows/CI/badge.svg)](https://github.com/dcwatson/bbcode/actions)


pkgId: 854502c6e4121dc5d798347b374f64cbd020ec1b8ae7d14ebff91bd9defd4af6
name: python-bbconf
arch: src
version: 0.9.0
epoch: 0
release: 1
summary: Configuration package for bedbase project
url: https://databio.org
rpm_license: BSD2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbconf-0.9.0-1.src.rpm
checksum_type: sha256
description:
  **Documentation**: <a href="https://docs.bedbase.org/bedboss" target="_blank">https://docs.bedbase.org/bedboss</a>


pkgId: abae53f0cd23b5a7d219b0bccecfd02502786d7fa81631edefc75280a0d05c7b
name: python-bbd-table-parser
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Package to parse inline tables for use with pytest-bdd.
url: https://gitlab.com/GreatIrishElk/table_parse
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbd-table-parser-0.0.1-1.src.rpm
checksum_type: sha256
description:
  Intended to be used with [pytest_bdd](https://pypi.org/project/pytest-bdd/) for parsing inline tables from str into dict

  Example:
  ```gherkin
  Given I have a thing
  When I do stuff:
      | Heading | Other Heading |
      | to do   | Also          |
      | more    | Other         |
  Then everything is great
  ```

  ```python
  from pytest_bdd import when, parsers
  from table_parser.table_parser import table_parser

  @when(parsers.cfparse('I do stuff:\n{table}'))
  def verify_date_from_request(table):
      table_dict = table_parser(table)
  ```


pkgId: bd58923db907ca305f5afb9519fe868a050fb29f690077b063aa7ccbd0c9081c
name: python-bbg-databricks
arch: src
version: 0.7.3
epoch: 0
release: 1
url: https://pypi.org/project/bbg-databricks/
rpm_license: mit
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbg-databricks-0.7.3-1.src.rpm
checksum_type: sha256
summary:
  A repositiory for a useful package that will allow us to make querying a lot easier in bbg's databricks.

description:
  A repositiory for a useful package that will allow us to make querying a lot easier in bbg's databricks.

  The repository wiki can be found here:  [Wiki](https://danielwilczak101.github.io/bbg/)


pkgId: 6f092a24970159551bfc0efdd68642fdeef037e619c0149a12fb3ff1f7404968
name: python-bbg-fetch
arch: src
version: 1.0.28
epoch: 0
release: 1
summary: Bloomberg fetching analytics wrapping xbbg package
url: https://github.com/ArturSepp/BloombergFetch
rpm_license: LICENSE.txt
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbg-fetch-1.0.28-1.src.rpm
checksum_type: sha256
description:
  Wrapper of xbbg package for bloomberg fetch

  Install using
  ```python
  pip install bbg_fetch
  ```

  Upgrade using
  ```python
  pip install --upgrade bbg_fetch
  ```

  Close using
  ```python
  git clone https://github.com/ArturSepp/BloombergFetch.git
  ```


  Install blpapi package with:
  ```python
  pip install --index-url=https://blpapi.bloomberg.com/repository/releases/python/simple blpapi
  ```

  Configuration of rolls for futures contracts on Bloomberg: GFUT


pkgId: cd22bb14cafa36d0184acd96a35791e65e3892e2a5eb8421ba8af95486c8f358
name: python-bbii-decon
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Projected Barzilai-Borwein Image Deconvolution with Infeasible Iterates (BBii-Decon)
url: https://github.com/gdellaire/bbii-decon
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbii-decon-0.0.1-1.src.rpm
checksum_type: sha256
description:
  This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.
  <!--
  Don't miss the full getting started guide to set up your new package:
  https://github.com/napari/cookiecutter-napari-plugin#getting-started
  and review the napari docs for plugin developers:
  https://napari.org/plugins/stable/index.html
  -->

  You can install `bbii-decon` via [pip]:
      pip install bbii-decon

  Clone the github repository:
  ```
  conda install git
  git clone https://github.com/gdellaire/BBii-Decon.git
  cd BBii-Decon
  pip install -e .
  ```

  For deploying the plugin to the python package index (pypi), one needs a [pypi user account](https://pypi.org/account/register/)
  first. For deploying the plugin to pypi, one needs to install some tools:
  ```
  python -m pip install --user --upgrade setuptools wheel
  python -m pip install --user --upgrade twine
  ```
  The following command allows us to package the souce code as a python wheel. Make sure that the 'dist' and 'build' folders are deleted before doing this:
  ```
  python setup.py sdist bdist_wheel
  ```
  This command ships the just generated to pypi:
  ```
  python -m twine upload --repository pypi dist/*
  ```
  [Read more about distributing your python package via pypi](https://realpython.com/pypi-publish-python-package/#publishing-to-pypi).

  Contributions are very welcome. Tests can be run with [tox], please ensure
  the coverage at least stays the same before you submit a pull request.

  Distributed under the terms of the [BSD-3] license,
  "bbii-decon" is free and open source software

  If you encounter any problems, please [file an issue] along with a detailed description.
  [napari]: https://github.com/napari/napari
  [Cookiecutter]: https://github.com/audreyr/cookiecutter
  [@napari]: https://github.com/napari
  [MIT]: http://opensource.org/licenses/MIT
  [BSD-3]: http://opensource.org/licenses/BSD-3-Clause
  [GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt
  [GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt
  [Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0
  [Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt
  [cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin
  [file an issue]: https://github.com/gdellaire/bbii-decon/issues
  [napari]: https://github.com/napari/napari
  [tox]: https://tox.readthedocs.io/en/latest/
  [pip]: https://pypi.org/project/pip/
  [PyPI]: https://pypi.org/


pkgId: 33ddecf035bb2620026b8c896dde849ab2a25c9727697abd4c55ddaf7abd75cc
name: python-bbknn
arch: src
version: 1.6.0
epoch: 0
release: 1
summary: Batch balanced KNN
url: https://pypi.org/project/bbknn/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbknn-1.6.0-1.src.rpm
checksum_type: sha256
description:
  BBKNN is a fast and intuitive batch effect removal tool that can be directly used in the [scanpy](https://scanpy.readthedocs.io/en/latest/) workflow. It serves as an alternative to `scanpy.pp.neighbors()`, with both functions creating a neighbour graph for subsequent use in clustering, pseudotime and UMAP visualisation. The standard approach begins by identifying the k nearest neighbours for each individual cell across the entire data structure, with the candidates being subsequently transformed to exponentially related connectivities before serving as the basis for further analyses. If technical artifacts (be they because of differing data acquisition technologies, protocol alterations or even particularly severe operator effects) are present in the data, they will make it challenging to link corresponding cell types across different batches.

  <p align="center"><img src="figures/batch1.png" alt="KNN" width="50%"></p>

  As such, BBKNN actively combats this effect by taking each cell and identifying a (smaller) k nearest neighbours in each batch separately, rather than the dataset as a whole. These nearest neighbours for each batch are then merged into a final neighbour list for the cell. This helps create connections between analogous cells in different batches without altering the counts or PCA space.

  <p align="center"><img src="figures/batch2.png" alt="BBKNN" width="50%"></p>



  If you use BBKNN in your work, please cite the [paper](https://doi.org/10.1093/bioinformatics/btz625):

  	@article{polanski2019bbknn,
  	  title={BBKNN: Fast Batch Alignment of Single Cell Transcriptomes},
  	  author={Pola{\'n}ski, Krzysztof and Young, Matthew D and Miao, Zhichao and Meyer, Kerstin B and Teichmann, Sarah A and Park, Jong-Eun},
  	  doi={10.1093/bioinformatics/btz625},
  	  journal={Bioinformatics},
  	  year={2019}
  	}



  BBKNN depends on Cython, numpy, scipy, annoy, pynndescent, umap-learn and scikit-learn. The package is available on pip and conda, and can be easily installed as follows:

  ```bash
  pip3 install bbknn
  ```

  or

  ```bash
  conda install -c bioconda bbknn
  ```

  BBKNN can also make use of faiss. Consult the [official installation instructions](https://github.com/facebookresearch/faiss/blob/master/INSTALL.md), the easiest way to get it is via conda.



  BBKNN has the option to immediately slot into the spot occupied by `scanpy.neighbors()` in the [Seurat-inspired scanpy workflow](https://nbviewer.jupyter.org/github/theislab/scanpy_usage/blob/master/170505_seurat/seurat.ipynb). It computes a batch aligned variant of the neighbourhood graph, with its uses within scanpy including clustering, diffusion map pseudotime inference and UMAP visualisation. The basic syntax to run BBKNN on scanpy's AnnData object (with PCA computed via `scanpy.tl.pca()`) is as follows:

  ```python3
  import bbknn

  bbknn.bbknn(adata)
  ```

  You can provide which `adata.obs` column to use for batch discrimination via the `batch_key` parameter. This defaults to `'batch'`, which is created by scanpy when you merge multiple AnnData objects (e.g. if you were to import multiple samples separately and then concatenate them).

  Integration can be improved by using ridge regression on both a technical effect and a biological grouping prior to BBKNN, following a workflow from [Park _et al._, 2020](https://science.sciencemag.org/content/367/6480/eaay3224.abstract). In the event of not having a biological grouping at hand, a coarse clustering obtained from a BBKNN-corrected graph can be used in its place. This creates the following basic workflow syntax:

  ```python3
  import bbknn
  import scanpy

  bbknn.bbknn(adata)
  scanpy.tl.leiden(adata)
  bbknn.ridge_regression(adata, batch_key=['batch'], confounder_key=['leiden'])
  scanpy.tl.pca(adata)
  bbknn.bbknn(adata)
  ```

  Alternately, you can just provide a PCA matrix with cells as rows and a matching vector of batch assignments for each of the cells and call BBKNN as follows (with `connectivities` being the primary graph output of interest):

  ```python3
  import bbknn.matrix

  distances, connectivities, parameters = bbknn.matrix.bbknn(pca_matrix, batch_list)
  ```

  An HTML render of the BBKNN function docstring, detailing all the parameters, can be accessed at [ReadTheDocs](https://bbknn.readthedocs.io/en/latest/). BBKNN use, along with using ridge regression to improve the integration, is shown in a [demonstration notebook](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/demo.ipynb).



  At this point, there is no plan to create a BBKNN R package. However, it can be ran quite easily via reticulate. Using the base functions is the same as in python. If you're in possession of a PCA matrix and a batch assignment vector and want to get UMAP coordinates out of it, you can use the following code snippet to do so. The weird PCA computation part and replacing it with your original values is unfortunately necessary due to how AnnData innards operate from a reticulate level. Provide your python path in `use_python()`

  ```R
  library(reticulate)
  use_python("/usr/bin/python3")

  anndata = import("anndata",convert=FALSE)
  bbknn = import("bbknn", convert=FALSE)
  sc = import("scanpy",convert=FALSE)

  adata = anndata$AnnData(X=pca, obs=batch)
  sc$tl$pca(adata)
  adata$obsm$X_pca = pca
  bbknn$bbknn(adata,batch_key=0)
  sc$tl$umap(adata)
  umap = py_to_r(adata$obsm[["X_umap"]])
  ```

  If you wish to change any integer arguments (such as `neighbors_within_batch`), you'll have to `as.integer()` the value so python understands it as an integer.

  When testing locally, faiss refused to work when BBKNN was reticulated. As such, provide `use_faiss=FALSE` to the BBKNN call if you run into this problem.



  **[demo.ipynb](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/demo.ipynb) is the main demonstration, applying BBKNN to some pancreas data with a batch effect. The notebook also uses ridge regression to improve the integration.**

  The [BBKNN paper](https://doi.org/10.1093/bioinformatics/btz625) makes use of the following analyses:
  - [simulation.ipynb](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/simulation.ipynb) applies BBKNN to simulated data with a known ground truth, and demonstrates the utility of graph trimming by introducing an unrelated cell population. This simulated data is then used to benchmark BBKNN against mnnCorrect, CCA, Scanorama and Harmony in [benchmark.ipynb](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/benchmark.ipynb), and then finish off with a benchmarking of a BBKNN variant reluctant to work within R/reticulate and visualise the findings in  [benchmark2.ipynb](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/benchmark2.ipynb). [benchmark3-new-R-methods.ipynb](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/benchmark3-new-R-methods.ipynb) adds some newer R approaches to the benchmark.
  - [mouse.ipynb](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/mouse.ipynb) runs a collection of murine atlases through BBKNN. [mouse-harmony.ipynb](https://nbviewer.jupyter.org/github/Teichlab/bbknn/blob/master/examples/mouse-harmony.ipynb) applies Harmony to the same data.

  The [BBKNN preprint](https://www.biorxiv.org/content/early/2018/08/22/397042) performed some additional analyses that got left out of the final manuscript. Archival notebooks are stored in a [separate repository](https://github.com/Teichlab/bbknn_preprint).


pkgId: c803f05551176533cd5715d4f875e0b95f0af903455444c9862caad637716bf2
name: python-bblearn
arch: src
version: 0.3.6
epoch: 0
release: 1
summary: An API client for Blackboard Learn
url: https://pypi.org/project/bblearn/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bblearn-0.3.6-1.src.rpm
checksum_type: sha256
description:
  > This project is not endorsed by Blackboard© but developed independently

  Developed with [`tiny-api-client`][tiny-api-client]

  This library started as part of [Blackboard Sync][bbsync], but decided it could be extracted into its own distribution package.

  ```python
  from blackboard import BlackboardSession

  session = BlackboardSession('http://blackboard.example.com/learn/api/public/v{version}', cookies=...)
  session.fetch_version()
  ```




  ```bash
  pip install bblearn
  ```





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

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


  <!-- LINKS -->

  [tiny-api-client]: https://pypi.org/project/tiny-api-client
  [bbsync]: https://github.com/sanjacob/BlackboardSync


  <!-- LICENSE -->

  [license]: LICENSE "General Public License v2"
  [gnu]: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html "Free Software Foundation"
  [license-shield]: https://img.shields.io/github/license/sanjacob/bblearn


  <!-- SHIELD LINKS -->

  [pypi]: https://pypi.org/project/bblearn


  <!-- SHIELDS -->

  [pypi-shield]: https://img.shields.io/pypi/v/bblearn
  [build-shield]: https://img.shields.io/github/actions/workflow/status/sanjacob/bblearn/build.yml?branch=master
  [docs-shield]: https://img.shields.io/readthedocs/bblearn


pkgId: 98519bff1ce1b7f64ebe297b99a0a9e721f291383cc2c8e3431268a6f5d56296
name: python-bblocks-data-importers
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A package to import data
url: https://pypi.org/project/bblocks-data-importers/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bblocks-data-importers-0.1.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/bblocks_data_importers.svg)](https://pypi.org/project/bblocks_data_importers/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bblocks_data_importers.svg)](https://pypi.org/project/bblocks_data_importers/)
  [![Documentation Status](https://readthedocs.org/projects/bblocks-data-importers/badge/?version=latest)](https://bblocks-data-importers.readthedocs.io/en/latest/?badge=latest)
  [![codecov](https://codecov.io/gh/ONEcampaign/bblocks_data_importers/branch/main/graph/badge.svg?token=YN8S1719NH)](https://codecov.io/gh/ONEcampaign/bblocks_data_importers)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)




  A package to import data from major humanitarian, development and financial institutions.



  ```bash
  $ pip install bblocks_data_importers
  ```



  Import the package and use the various importer objects to access data from different sources.

  ```python
  import bblocks_data_importers as bbdata
  ```

  To access data from the IMF's World Economic Outlook use a WEO object:

  ```python
  weo = bbdata.WEO() # Create a WEO object
  df = weo.get_data() # Get the data as a pandas DataFrame
  ```

  Available importers include:
  - `WEO` to access the IMF's World Economic Outlook
  - `GHED` to access WHO's Global Health Expenditure Database
  - `WFPFoodSecurity` and `WFPInflation` to access the World Food Programme's Food Security and Inflation data
  - `WorldBank` to access the World Bank data
  - `InternationalDebtStatistics` to access the World Bank's International Debt Statistics

  Read the documentation for more details on each importer [here](https://bblocks-data-importers.readthedocs.io/en/latest/Importers/index.html)




  Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.



  `bblocks_data_importers` was created by The ONE Campaign. It is licensed under the terms of the MIT license.


  This package is maintained by Luca Picci and Jorge Rivera

  `bblocks_data_importers` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).


pkgId: bc5c03b43f53192cf24689979995d16db5d540fec1ce6afe94a95f29a766a0d8
name: python-bbm
arch: src
version: 0.0.12
epoch: 0
release: 1
summary: 📊 Buzzni Batch process Monitor.
url: https://pypi.org/project/bbm/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbm-0.0.12-1.src.rpm
checksum_type: sha256
description:
  📊 Buzzni Batch process Monitor -> BBM

  </p>
  <p align="center">
  <a href="https://pypi.org/project/bbm" target="_blank">
      <img src="https://img.shields.io/pypi/v/bbm?color=%2334D058&label=pypi%20package" alt="Package version">
  </a>
  <a href="https://pypi.org/project/bbm" target="_blank">
      <img src="https://img.shields.io/pypi/pyversions/bbm?color=%2334D058" alt="Supported Python versions">
  </a>
  </p>


  ```bash
  pip install bbm
  ```



  ```python
  from bbm import Interval, logging, setup


  @logging()
  def temp_func():
      return "Hello World"


  @logging(process_name="custom_name_of_process", interval=Interval.A_DAY)
  def temp_func2():
      return "Hello World"


  if __name__ == "__main__":
      setup(es_url="your-es-url", index_prefix="your-index-prefix")
      temp_func()
      temp_func2()
  ```

  ```python
  from bbm import reporter, setup

  if __name__ == "__main__":
      
      setup(es_url="your-es-url", index_prefix="your-index-prefix")

      
      reporter = reporter.Reporter(slack_token="your-slack-token", slack_channel_id="your-slack-channel-id")
      post_response = reporter.post_message(title="title", text="text")
      ts = post_response["ts"]
      post_message_to_thread = reporter.post_message(title="title", text="text", ts=ts)

      
      reporter.post_report()
  ```


  1. Need to check report
  ![report_sample](https://raw.githubusercontent.com/buzzni/bbm/main/doc/images/example1.png)
  2. Full report (It will be sent as a file at 'need to check report' thread)
  ![report_sample](https://raw.githubusercontent.com/buzzni/bbm/main/doc/images/example2.png)


pkgId: 972ec18fa6ce37628a1c293b780468189e81060ca397f6a368596eee1fb329bc
name: python-bbndb
arch: src
version: 2020.1
epoch: 0
release: 1
summary: BBN Configuration Database
url: https://github.com/BBN-Q/bbndb
rpm_license: Apache 2.0 License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbndb-2020.1-1.src.rpm
checksum_type: sha256
description:
  Configuration database for BBN Qubit Measurement Framework. Used by both Auspex and QGL as a shared, versioned, means of storing instrument, qubit, and filter configurations. Based on SQLAlchemy framework.



  We use *alembic* to facilitate migrations. Examining the `url.sqlalchemy` field in *alembic.ini* you can see the database that is being tracked by default.

  `
  sqlalchemy.url = sqlite:///BBN.sqlite
  `

  These do not always work with SQLite due to the inability to alter the tables in certain ways.

  In the simplest case alembic can be run as follows:
  `bash
  alembic upgrade head
  `

  For information on how to generate your own migrations, please see *alembic/README*.


pkgId: aaa2175c2d0a486ae1ae4121fb87b789c7d660fc24f804ebc8e86d84a1828178
name: python-bbo-calibcamlib
arch: src
version: 0.3.12
epoch: 0
release: 1
summary: Library to work with calibration from bbo-calibcam
url: https://github.com/bbo-lab/calibcamlib
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbo-calibcamlib-0.3.12-1.src.rpm
checksum_type: sha256
description:
  Library to work with calibration from bbo-calibcam



  Install via pip as `bbo-calibcamlib`.



  Load a calibration with

  ```python
  cs = calibcamlib.Camerasystem.load([PATH TO multicam_calibration.yml])
  ```

  Use calibrated camera system with

  ```python
  coords2d = cs.project(self, X, offsets=None)
          
          

  dirs, cam_pos = cs.get_camera_lines(self, x, offsets=None)
          
          
          

  coords3d = cs.triangulate(self, x, offsets=None)
          
          

  coords3d = cs.triangulate_3derr(self, x, offsets=None)
          
          
  ```


pkgId: 4f9718cb4d9f4c9e5cf169d0b150e2b86e36e4283c7123fad0e3ce92e87afd5d
name: python-bbot
arch: src
version: 2.0.1
epoch: 0
release: 1
summary: OSINT automation for hackers.
url: https://github.com/blacklanternsecurity/bbot
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbot-2.0.1-1.src.rpm
checksum_type: sha256
description:
  [![bbot_banner](https://github.com/user-attachments/assets/f02804ce-9478-4f1e-ac4d-9cf5620a3214)](https://github.com/blacklanternsecurity/bbot)

  [![Python Version](https://img.shields.io/badge/python-3.9+-FF8400)](https://www.python.org) [![License](https://img.shields.io/badge/license-GPLv3-FF8400.svg)](https://github.com/blacklanternsecurity/bbot/blob/dev/LICENSE) [![DEF CON Recon Village 2024](https://img.shields.io/badge/DEF%20CON%20Demo%20Labs-2023-FF8400.svg)](https://www.reconvillage.org/talks) [![PyPi Downloads](https://static.pepy.tech/personalized-badge/bbot?right_color=orange&left_color=grey)](https://pepy.tech/project/bbot) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Tests](https://github.com/blacklanternsecurity/bbot/actions/workflows/tests.yml/badge.svg?branch=stable)](https://github.com/blacklanternsecurity/bbot/actions?query=workflow%3A"tests") [![Codecov](https://codecov.io/gh/blacklanternsecurity/bbot/branch/dev/graph/badge.svg?token=IR5AZBDM5K)](https://codecov.io/gh/blacklanternsecurity/bbot) [![Discord](https://img.shields.io/discord/859164869970362439)](https://discord.com/invite/PZqkgxu5SA)



  https://github.com/blacklanternsecurity/bbot/assets/20261699/e539e89b-92ea-46fa-b893-9cde94eebf81

  _A BBOT scan in real-time - visualization with [VivaGraphJS](https://github.com/blacklanternsecurity/bbot-vivagraphjs)_



  ```bash

  pipx install bbot


  pipx install --pip-args '\--pre' bbot
  ```

  _For more installation methods, including [Docker](https://hub.docker.com/r/blacklanternsecurity/bbot), see [Getting Started](https://www.blacklanternsecurity.com/bbot/Stable/)_





  Passive API sources plus a recursive DNS brute-force with target-specific subdomain mutations.

  ```bash

  bbot -t evilcorp.com -p subdomain-enum


  bbot -t evilcorp.com -p subdomain-enum -rf passive
  ```

  <!-- BBOT SUBDOMAIN-ENUM PRESET EXPANDABLE -->

  <details>
  <summary><b><code>subdomain-enum.yml</code></b></summary>

  ```yaml
  description: Enumerate subdomains via APIs, brute-force

  flags:
    
    - subdomain-enum

  output_modules:
    
    - subdomains

  config:
    dns:
      threads: 25
      brute_threads: 1000
    
    modules:
      github:
        api_key: ""
      chaos:
        api_key: ""
      securitytrails:
        api_key: ""

  ```

  </details>

  <!-- END BBOT SUBDOMAIN-ENUM PRESET EXPANDABLE -->

  BBOT consistently finds 20-50% more subdomains than other tools. The bigger the domain, the bigger the difference. To learn how this is possible, see [How It Works](https://www.blacklanternsecurity.com/bbot/Dev/how_it_works/).

  ![subdomain-stats-ebay](https://github.com/blacklanternsecurity/bbot/assets/20261699/de3e7f21-6f52-4ac4-8eab-367296cd385f)



  ```bash

  bbot -t evilcorp.com -p spider
  ```

  <!-- BBOT SPIDER PRESET EXPANDABLE -->

  <details>
  <summary><b><code>spider.yml</code></b></summary>

  ```yaml
  description: Recursive web spider

  modules:
    - httpx

  config:
    web:
      
      spider_distance: 2
      
      spider_depth: 4
      
      spider_links_per_page: 25

  ```

  </details>

  <!-- END BBOT SPIDER PRESET EXPANDABLE -->



  ```bash

  bbot -t evilcorp.com -p email-enum


  bbot -t evilcorp.com -p email-enum subdomain-enum spider
  ```

  <!-- BBOT EMAIL-ENUM PRESET EXPANDABLE -->

  <details>
  <summary><b><code>email-enum.yml</code></b></summary>

  ```yaml
  description: Enumerate email addresses from APIs, web crawling, etc.

  flags:
    - email-enum

  output_modules:
    - emails

  ```

  </details>

  <!-- END BBOT EMAIL-ENUM PRESET EXPANDABLE -->



  ```bash

  bbot -t www.evilcorp.com -p web-basic


  bbot -t www.evilcorp.com -p web-thorough
  ```

  <!-- BBOT WEB-BASIC PRESET EXPANDABLE -->

  <details>
  <summary><b><code>web-basic.yml</code></b></summary>

  ```yaml
  description: Quick web scan

  include:
    - iis-shortnames

  flags:
    - web-basic

  ```

  </details>

  <!-- END BBOT WEB-BASIC PRESET EXPANDABLE -->

  <!-- BBOT WEB-THOROUGH PRESET EXPANDABLE -->

  <details>
  <summary><b><code>web-thorough.yml</code></b></summary>

  ```yaml
  description: Aggressive web scan

  include:
    
    - web-basic

  flags:
    - web-thorough

  ```

  </details>

  <!-- END BBOT WEB-THOROUGH PRESET EXPANDABLE -->



  ```bash

  bbot -t evilcorp.com -p kitchen-sink


  bbot -t evilcorp.com -p subdomain-enum cloud-enum code-enum email-enum spider web-basic paramminer dirbust-light web-screenshots
  ```

  <!-- BBOT KITCHEN-SINK PRESET EXPANDABLE -->

  <details>
  <summary><b><code>kitchen-sink.yml</code></b></summary>

  ```yaml
  description: Everything everywhere all at once

  include:
    - subdomain-enum
    - cloud-enum
    - code-enum
    - email-enum
    - spider
    - web-basic
    - paramminer
    - dirbust-light
    - web-screenshots

  config:
    modules:
      baddns:
        enable_references: True



  ```

  </details>

  <!-- END BBOT KITCHEN-SINK PRESET EXPANDABLE -->



  Click the graph below to explore the [inner workings](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works/) of BBOT.

  [![image](https://github.com/blacklanternsecurity/bbot/assets/20261699/e55ba6bd-6d97-48a6-96f0-e122acc23513)](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works/)




  ```python
  from bbot.scanner import Scanner

  if __name__ == "__main__":
      scan = Scanner("evilcorp.com", presets=["subdomain-enum"])
      for event in scan.start():
          print(event)
  ```


  ```python
  from bbot.scanner import Scanner

  async def main():
      scan = Scanner("evilcorp.com", presets=["subdomain-enum"])
      async for event in scan.async_start():
          print(event.json())

  if __name__ == "__main__":
      import asyncio
      asyncio.run(main())
  ```

  <details>
  <summary><b>SEE: This Nefarious Discord Bot</b></summary>

  A [BBOT Discord Bot](https://www.blacklanternsecurity.com/bbot/Stable/dev/#discord-bot-example) that responds to the `/scan` command. Scan the internet from the comfort of your discord server!

  ![bbot-discord](https://github.com/blacklanternsecurity/bbot/assets/20261699/22b268a2-0dfd-4c2a-b7c5-548c0f2cc6f9)

  </details>



  - Support for Multiple Targets
  - Web Screenshots
  - Suite of Offensive Web Modules
  - NLP-powered Subdomain Mutations
  - Native Output to Neo4j (and more)
  - Automatic dependency install with Ansible
  - Search entire attack surface with custom YARA rules
  - Python API + Developer Documentation



  BBOT accepts an unlimited number of targets via `-t`. You can specify targets either directly on the command line or in files (or both!):

  ```bash
  bbot -t evilcorp.com evilcorp.org 1.2.3.0/24 -p subdomain-enum
  ```

  Targets can be any of the following:

  - `DNS_NAME` (`evilcorp.com`)
  - `IP_ADDRESS` (`1.2.3.4`)
  - `IP_RANGE` (`1.2.3.0/24`)
  - `OPEN_TCP_PORT` (`192.168.0.1:80`)
  - `URL` (`https://www.evilcorp.com`)

  For more information, see [Targets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#targets-t). To learn how BBOT handles scope, see [Scope](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#scope).



  Similar to Amass or Subfinder, BBOT supports API keys for various third-party services such as SecurityTrails, etc.

  The standard way to do this is to enter your API keys in **`~/.config/bbot/bbot.yml`**:
  ```yaml
  modules:
    shodan_dns:
      api_key: 4f41243847da693a4f356c0486114bc6
    c99:
      api_key: 21a270d5f59c9b05813a72bb41707266
    virustotal:
      api_key: dd5f0eee2e4a99b71a939bded450b246
    securitytrails:
      api_key: d9a05c3fd9a514497713c54b4455d0b0
  ```

  If you like, you can also specify them on the command line:
  ```bash
  bbot -c modules.virustotal.api_key=dd5f0eee2e4a99b71a939bded450b246
  ```

  For details, see [Configuration](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/).



  - Complete list of [Modules](https://www.blacklanternsecurity.com/bbot/Stable/modules/list_of_modules/).
  - Complete list of [Flags](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#list-of-flags).
  - Complete list of [Presets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets_list/).
      - Complete list of [Global Config Options](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/#global-config-options).
      - Complete list of [Module Config Options](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/#module-config-options).



  <!-- BBOT DOCS TOC -->
  - **User Manual**
      - **Basics**
          - [Getting Started](https://www.blacklanternsecurity.com/bbot/Stable/)
          - [How it Works](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works)
          - [Comparison to Other Tools](https://www.blacklanternsecurity.com/bbot/Stable/comparison)
      - **Scanning**
          - [Scanning Overview](https://www.blacklanternsecurity.com/bbot/Stable/scanning/)
          - **Presets**
              - [Overview](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets)
              - [List of Presets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets_list)
          - [Events](https://www.blacklanternsecurity.com/bbot/Stable/scanning/events)
          - [Output](https://www.blacklanternsecurity.com/bbot/Stable/scanning/output)
          - [Tips and Tricks](https://www.blacklanternsecurity.com/bbot/Stable/scanning/tips_and_tricks)
          - [Advanced Usage](https://www.blacklanternsecurity.com/bbot/Stable/scanning/advanced)
          - [Configuration](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration)
      - **Modules**
          - [List of Modules](https://www.blacklanternsecurity.com/bbot/Stable/modules/list_of_modules)
          - [Nuclei](https://www.blacklanternsecurity.com/bbot/Stable/modules/nuclei)
      - **Misc**
          - [Contribution](https://www.blacklanternsecurity.com/bbot/Stable/contribution)
          - [Release History](https://www.blacklanternsecurity.com/bbot/Stable/release_history)
          - [Troubleshooting](https://www.blacklanternsecurity.com/bbot/Stable/troubleshooting)
  - **Developer Manual**
      - [Development Overview](https://www.blacklanternsecurity.com/bbot/Stable/dev/)
      - [Setting Up a Dev Environment](https://www.blacklanternsecurity.com/bbot/Stable/dev/dev_environment)
      - [BBOT Internal Architecture](https://www.blacklanternsecurity.com/bbot/Stable/dev/architecture)
      - [How to Write a BBOT Module](https://www.blacklanternsecurity.com/bbot/Stable/dev/module_howto)
      - [Unit Tests](https://www.blacklanternsecurity.com/bbot/Stable/dev/tests)
      - [Discord Bot Example](https://www.blacklanternsecurity.com/bbot/Stable/dev/discord_bot)
      - **Code Reference**
          - [Scanner](https://www.blacklanternsecurity.com/bbot/Stable/dev/scanner)
          - [Presets](https://www.blacklanternsecurity.com/bbot/Stable/dev/presets)
          - [Event](https://www.blacklanternsecurity.com/bbot/Stable/dev/event)
          - [Target](https://www.blacklanternsecurity.com/bbot/Stable/dev/target)
          - [BaseModule](https://www.blacklanternsecurity.com/bbot/Stable/dev/basemodule)
          - [BBOTCore](https://www.blacklanternsecurity.com/bbot/Stable/dev/core)
          - [Engine](https://www.blacklanternsecurity.com/bbot/Stable/dev/engine)
          - **Helpers**
              - [Overview](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/)
              - [Command](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/command)
              - [DNS](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/dns)
              - [Interactsh](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/interactsh)
              - [Miscellaneous](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/misc)
              - [Web](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/web)
              - [Word Cloud](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/wordcloud)
  <!-- END BBOT DOCS TOC -->



  Some of the best BBOT modules were written by the community. BBOT is being constantly improved; every day it grows more powerful!

  We welcome contributions. Not just code, but ideas too! If you have an idea for a new feature, please let us know in [Discussions](https://github.com/blacklanternsecurity/bbot/discussions). If you want to get your hands dirty, see [Contribution](https://www.blacklanternsecurity.com/bbot/Stable/contribution/). There you can find setup instructions and a simple tutorial on how to write a BBOT module. We also have extensive [Developer Documentation](https://www.blacklanternsecurity.com/bbot/Stable/dev/).

  Thanks to these amazing people for contributing to BBOT! :heart:

  <p align="center">
  <a href="https://github.com/blacklanternsecurity/bbot/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=blacklanternsecurity/bbot&max=500">
  </a>
  </p>

  Special thanks to:

  - @TheTechromancer for creating BBOT
  - @liquidsec for his extensive work on BBOT's web hacking features, including [badsecrets](https://github.com/blacklanternsecurity/badsecrets) and [baddns](https://github.com/blacklanternsecurity/baddns)
  - Steve Micallef (@smicallef) for creating Spiderfoot
  - @kerrymilan for his Neo4j and Ansible expertise
  - @domwhewell-sage for his family of badass code-looting modules
  - @aconite33 and @amiremami for their ruthless testing
  - Aleksei Kornev (@alekseiko) for granting us ownership of the bbot Pypi repository <3


pkgId: 6a212512d9ddfc75f0f5fa71dc9e795b95dd1f6fe6b8d5790c0ee044e80f4619
name: python-bbot
arch: src
version: 2.1.2
epoch: 0
release: 1
summary: OSINT automation for hackers.
url: https://github.com/blacklanternsecurity/bbot
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbot-2.1.2-1.src.rpm
checksum_type: sha256
description:
  [![bbot_banner](https://github.com/user-attachments/assets/f02804ce-9478-4f1e-ac4d-9cf5620a3214)](https://github.com/blacklanternsecurity/bbot)

  [![Python Version](https://img.shields.io/badge/python-3.9+-FF8400)](https://www.python.org) [![License](https://img.shields.io/badge/license-GPLv3-FF8400.svg)](https://github.com/blacklanternsecurity/bbot/blob/dev/LICENSE) [![DEF CON Recon Village 2024](https://img.shields.io/badge/DEF%20CON%20Demo%20Labs-2023-FF8400.svg)](https://www.reconvillage.org/talks) [![PyPi Downloads](https://static.pepy.tech/personalized-badge/bbot?right_color=orange&left_color=grey)](https://pepy.tech/project/bbot) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Tests](https://github.com/blacklanternsecurity/bbot/actions/workflows/tests.yml/badge.svg?branch=stable)](https://github.com/blacklanternsecurity/bbot/actions?query=workflow%3A"tests") [![Codecov](https://codecov.io/gh/blacklanternsecurity/bbot/branch/dev/graph/badge.svg?token=IR5AZBDM5K)](https://codecov.io/gh/blacklanternsecurity/bbot) [![Discord](https://img.shields.io/discord/859164869970362439)](https://discord.com/invite/PZqkgxu5SA)



  https://github.com/blacklanternsecurity/bbot/assets/20261699/e539e89b-92ea-46fa-b893-9cde94eebf81

  _A BBOT scan in real-time - visualization with [VivaGraphJS](https://github.com/blacklanternsecurity/bbot-vivagraphjs)_



  ```bash

  pipx install bbot


  pipx install --pip-args '\--pre' bbot
  ```

  _For more installation methods, including [Docker](https://hub.docker.com/r/blacklanternsecurity/bbot), see [Getting Started](https://www.blacklanternsecurity.com/bbot/Stable/)_





  Passive API sources plus a recursive DNS brute-force with target-specific subdomain mutations.

  ```bash

  bbot -t evilcorp.com -p subdomain-enum


  bbot -t evilcorp.com -p subdomain-enum -rf passive
  ```

  <!-- BBOT SUBDOMAIN-ENUM PRESET EXPANDABLE -->

  <details>
  <summary><b><code>subdomain-enum.yml</code></b></summary>

  ```yaml
  description: Enumerate subdomains via APIs, brute-force

  flags:
    
    - subdomain-enum

  output_modules:
    
    - subdomains

  config:
    dns:
      threads: 25
      brute_threads: 1000
    
    
    
    
    
    
    
    

  ```

  </details>

  <!-- END BBOT SUBDOMAIN-ENUM PRESET EXPANDABLE -->

  BBOT consistently finds 20-50% more subdomains than other tools. The bigger the domain, the bigger the difference. To learn how this is possible, see [How It Works](https://www.blacklanternsecurity.com/bbot/Dev/how_it_works/).

  ![subdomain-stats-ebay](https://github.com/blacklanternsecurity/bbot/assets/20261699/de3e7f21-6f52-4ac4-8eab-367296cd385f)



  ```bash

  bbot -t evilcorp.com -p spider
  ```

  <!-- BBOT SPIDER PRESET EXPANDABLE -->

  <details>
  <summary><b><code>spider.yml</code></b></summary>

  ```yaml
  description: Recursive web spider

  modules:
    - httpx

  config:
    web:
      
      spider_distance: 2
      
      spider_depth: 4
      
      spider_links_per_page: 25

  ```

  </details>

  <!-- END BBOT SPIDER PRESET EXPANDABLE -->



  ```bash

  bbot -t evilcorp.com -p email-enum


  bbot -t evilcorp.com -p email-enum subdomain-enum spider
  ```

  <!-- BBOT EMAIL-ENUM PRESET EXPANDABLE -->

  <details>
  <summary><b><code>email-enum.yml</code></b></summary>

  ```yaml
  description: Enumerate email addresses from APIs, web crawling, etc.

  flags:
    - email-enum

  output_modules:
    - emails

  ```

  </details>

  <!-- END BBOT EMAIL-ENUM PRESET EXPANDABLE -->



  ```bash

  bbot -t www.evilcorp.com -p web-basic


  bbot -t www.evilcorp.com -p web-thorough
  ```

  <!-- BBOT WEB-BASIC PRESET EXPANDABLE -->

  <details>
  <summary><b><code>web-basic.yml</code></b></summary>

  ```yaml
  description: Quick web scan

  include:
    - iis-shortnames

  flags:
    - web-basic

  ```

  </details>

  <!-- END BBOT WEB-BASIC PRESET EXPANDABLE -->

  <!-- BBOT WEB-THOROUGH PRESET EXPANDABLE -->

  <details>
  <summary><b><code>web-thorough.yml</code></b></summary>

  ```yaml
  description: Aggressive web scan

  include:
    
    - web-basic

  flags:
    - web-thorough

  ```

  </details>

  <!-- END BBOT WEB-THOROUGH PRESET EXPANDABLE -->



  ```bash

  bbot -t evilcorp.com -p kitchen-sink


  bbot -t evilcorp.com -p subdomain-enum cloud-enum code-enum email-enum spider web-basic paramminer dirbust-light web-screenshots
  ```

  <!-- BBOT KITCHEN-SINK PRESET EXPANDABLE -->

  <details>
  <summary><b><code>kitchen-sink.yml</code></b></summary>

  ```yaml
  description: Everything everywhere all at once

  include:
    - subdomain-enum
    - cloud-enum
    - code-enum
    - email-enum
    - spider
    - web-basic
    - paramminer
    - dirbust-light
    - web-screenshots
    - baddns-thorough

  config:
    modules:
      baddns:
        enable_references: True



  ```

  </details>

  <!-- END BBOT KITCHEN-SINK PRESET EXPANDABLE -->



  Click the graph below to explore the [inner workings](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works/) of BBOT.

  [![image](https://github.com/blacklanternsecurity/bbot/assets/20261699/e55ba6bd-6d97-48a6-96f0-e122acc23513)](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works/)




  ```python
  from bbot.scanner import Scanner

  if __name__ == "__main__":
      scan = Scanner("evilcorp.com", presets=["subdomain-enum"])
      for event in scan.start():
          print(event)
  ```


  ```python
  from bbot.scanner import Scanner

  async def main():
      scan = Scanner("evilcorp.com", presets=["subdomain-enum"])
      async for event in scan.async_start():
          print(event.json())

  if __name__ == "__main__":
      import asyncio
      asyncio.run(main())
  ```

  <details>
  <summary><b>SEE: This Nefarious Discord Bot</b></summary>

  A [BBOT Discord Bot](https://www.blacklanternsecurity.com/bbot/Stable/dev/#discord-bot-example) that responds to the `/scan` command. Scan the internet from the comfort of your discord server!

  ![bbot-discord](https://github.com/blacklanternsecurity/bbot/assets/20261699/22b268a2-0dfd-4c2a-b7c5-548c0f2cc6f9)

  </details>



  - Support for Multiple Targets
  - Web Screenshots
  - Suite of Offensive Web Modules
  - NLP-powered Subdomain Mutations
  - Native Output to Neo4j (and more)
  - Automatic dependency install with Ansible
  - Search entire attack surface with custom YARA rules
  - Python API + Developer Documentation



  BBOT accepts an unlimited number of targets via `-t`. You can specify targets either directly on the command line or in files (or both!):

  ```bash
  bbot -t evilcorp.com evilcorp.org 1.2.3.0/24 -p subdomain-enum
  ```

  Targets can be any of the following:

  - `DNS_NAME` (`evilcorp.com`)
  - `IP_ADDRESS` (`1.2.3.4`)
  - `IP_RANGE` (`1.2.3.0/24`)
  - `OPEN_TCP_PORT` (`192.168.0.1:80`)
  - `URL` (`https://www.evilcorp.com`)

  For more information, see [Targets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#targets-t). To learn how BBOT handles scope, see [Scope](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#scope).



  Similar to Amass or Subfinder, BBOT supports API keys for various third-party services such as SecurityTrails, etc.

  The standard way to do this is to enter your API keys in **`~/.config/bbot/bbot.yml`**. Note that multiple API keys are allowed:
  ```yaml
  modules:
    shodan_dns:
      api_key: 4f41243847da693a4f356c0486114bc6
    c99:
      
      api_key:
        - 21a270d5f59c9b05813a72bb41707266
        - ea8f243d9885cf8ce9876a580224fd3c
        - 5bc6ed268ab6488270e496d3183a1a27
    virustotal:
      api_key: dd5f0eee2e4a99b71a939bded450b246
    securitytrails:
      api_key: d9a05c3fd9a514497713c54b4455d0b0
  ```

  If you like, you can also specify them on the command line:
  ```bash
  bbot -c modules.virustotal.api_key=dd5f0eee2e4a99b71a939bded450b246
  ```

  For details, see [Configuration](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/).



  - Complete list of [Modules](https://www.blacklanternsecurity.com/bbot/Stable/modules/list_of_modules/).
  - Complete list of [Flags](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#list-of-flags).
  - Complete list of [Presets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets_list/).
      - Complete list of [Global Config Options](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/#global-config-options).
      - Complete list of [Module Config Options](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/#module-config-options).



  <!-- BBOT DOCS TOC -->
  - **User Manual**
      - **Basics**
          - [Getting Started](https://www.blacklanternsecurity.com/bbot/Stable/)
          - [How it Works](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works)
          - [Comparison to Other Tools](https://www.blacklanternsecurity.com/bbot/Stable/comparison)
      - **Scanning**
          - [Scanning Overview](https://www.blacklanternsecurity.com/bbot/Stable/scanning/)
          - **Presets**
              - [Overview](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets)
              - [List of Presets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets_list)
          - [Events](https://www.blacklanternsecurity.com/bbot/Stable/scanning/events)
          - [Output](https://www.blacklanternsecurity.com/bbot/Stable/scanning/output)
          - [Tips and Tricks](https://www.blacklanternsecurity.com/bbot/Stable/scanning/tips_and_tricks)
          - [Advanced Usage](https://www.blacklanternsecurity.com/bbot/Stable/scanning/advanced)
          - [Configuration](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration)
      - **Modules**
          - [List of Modules](https://www.blacklanternsecurity.com/bbot/Stable/modules/list_of_modules)
          - [Nuclei](https://www.blacklanternsecurity.com/bbot/Stable/modules/nuclei)
      - **Misc**
          - [Contribution](https://www.blacklanternsecurity.com/bbot/Stable/contribution)
          - [Release History](https://www.blacklanternsecurity.com/bbot/Stable/release_history)
          - [Troubleshooting](https://www.blacklanternsecurity.com/bbot/Stable/troubleshooting)
  - **Developer Manual**
      - [Development Overview](https://www.blacklanternsecurity.com/bbot/Stable/dev/)
      - [Setting Up a Dev Environment](https://www.blacklanternsecurity.com/bbot/Stable/dev/dev_environment)
      - [BBOT Internal Architecture](https://www.blacklanternsecurity.com/bbot/Stable/dev/architecture)
      - [How to Write a BBOT Module](https://www.blacklanternsecurity.com/bbot/Stable/dev/module_howto)
      - [Unit Tests](https://www.blacklanternsecurity.com/bbot/Stable/dev/tests)
      - [Discord Bot Example](https://www.blacklanternsecurity.com/bbot/Stable/dev/discord_bot)
      - **Code Reference**
          - [Scanner](https://www.blacklanternsecurity.com/bbot/Stable/dev/scanner)
          - [Presets](https://www.blacklanternsecurity.com/bbot/Stable/dev/presets)
          - [Event](https://www.blacklanternsecurity.com/bbot/Stable/dev/event)
          - [Target](https://www.blacklanternsecurity.com/bbot/Stable/dev/target)
          - [BaseModule](https://www.blacklanternsecurity.com/bbot/Stable/dev/basemodule)
          - [BBOTCore](https://www.blacklanternsecurity.com/bbot/Stable/dev/core)
          - [Engine](https://www.blacklanternsecurity.com/bbot/Stable/dev/engine)
          - **Helpers**
              - [Overview](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/)
              - [Command](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/command)
              - [DNS](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/dns)
              - [Interactsh](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/interactsh)
              - [Miscellaneous](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/misc)
              - [Web](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/web)
              - [Word Cloud](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/wordcloud)
  <!-- END BBOT DOCS TOC -->



  Some of the best BBOT modules were written by the community. BBOT is being constantly improved; every day it grows more powerful!

  We welcome contributions. Not just code, but ideas too! If you have an idea for a new feature, please let us know in [Discussions](https://github.com/blacklanternsecurity/bbot/discussions). If you want to get your hands dirty, see [Contribution](https://www.blacklanternsecurity.com/bbot/Stable/contribution/). There you can find setup instructions and a simple tutorial on how to write a BBOT module. We also have extensive [Developer Documentation](https://www.blacklanternsecurity.com/bbot/Stable/dev/).

  Thanks to these amazing people for contributing to BBOT! :heart:

  <p align="center">
  <a href="https://github.com/blacklanternsecurity/bbot/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=blacklanternsecurity/bbot&max=500">
  </a>
  </p>

  Special thanks to:

  - @TheTechromancer for creating BBOT
  - @liquidsec for his extensive work on BBOT's web hacking features, including [badsecrets](https://github.com/blacklanternsecurity/badsecrets) and [baddns](https://github.com/blacklanternsecurity/baddns)
  - Steve Micallef (@smicallef) for creating Spiderfoot
  - @kerrymilan for his Neo4j and Ansible expertise
  - @domwhewell-sage for his family of badass code-looting modules
  - @aconite33 and @amiremami for their ruthless testing
  - Aleksei Kornev (@alekseiko) for granting us ownership of the bbot Pypi repository <3


pkgId: ee3024adabe908265d0d7c63f0ccc57fcc46589001043b3bef6a460738fbc429
name: python-bbot
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: OSINT automation for hackers.
url: https://github.com/blacklanternsecurity/bbot
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbot-2.2.0-1.src.rpm
checksum_type: sha256
description:
  [![bbot_banner](https://github.com/user-attachments/assets/f02804ce-9478-4f1e-ac4d-9cf5620a3214)](https://github.com/blacklanternsecurity/bbot)

  [![Python Version](https://img.shields.io/badge/python-3.9+-FF8400)](https://www.python.org) [![License](https://img.shields.io/badge/license-GPLv3-FF8400.svg)](https://github.com/blacklanternsecurity/bbot/blob/dev/LICENSE) [![DEF CON Recon Village 2024](https://img.shields.io/badge/DEF%20CON%20Demo%20Labs-2023-FF8400.svg)](https://www.reconvillage.org/talks) [![PyPi Downloads](https://static.pepy.tech/personalized-badge/bbot?right_color=orange&left_color=grey)](https://pepy.tech/project/bbot) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Tests](https://github.com/blacklanternsecurity/bbot/actions/workflows/tests.yml/badge.svg?branch=stable)](https://github.com/blacklanternsecurity/bbot/actions?query=workflow%3A"tests") [![Codecov](https://codecov.io/gh/blacklanternsecurity/bbot/branch/dev/graph/badge.svg?token=IR5AZBDM5K)](https://codecov.io/gh/blacklanternsecurity/bbot) [![Discord](https://img.shields.io/discord/859164869970362439)](https://discord.com/invite/PZqkgxu5SA)



  https://github.com/blacklanternsecurity/bbot/assets/20261699/e539e89b-92ea-46fa-b893-9cde94eebf81

  _A BBOT scan in real-time - visualization with [VivaGraphJS](https://github.com/blacklanternsecurity/bbot-vivagraphjs)_



  ```bash

  pipx install bbot


  pipx install --pip-args '\--pre' bbot
  ```

  _For more installation methods, including [Docker](https://hub.docker.com/r/blacklanternsecurity/bbot), see [Getting Started](https://www.blacklanternsecurity.com/bbot/Stable/)_





  Passive API sources plus a recursive DNS brute-force with target-specific subdomain mutations.

  ```bash

  bbot -t evilcorp.com -p subdomain-enum


  bbot -t evilcorp.com -p subdomain-enum -rf passive
  ```

  <!-- BBOT SUBDOMAIN-ENUM PRESET EXPANDABLE -->

  <details>
  <summary><b><code>subdomain-enum.yml</code></b></summary>

  ```yaml
  description: Enumerate subdomains via APIs, brute-force

  flags:
    
    - subdomain-enum

  output_modules:
    
    - subdomains

  config:
    dns:
      threads: 25
      brute_threads: 1000
    
    
    
    
    
    
    
    

  ```

  </details>

  <!-- END BBOT SUBDOMAIN-ENUM PRESET EXPANDABLE -->

  BBOT consistently finds 20-50% more subdomains than other tools. The bigger the domain, the bigger the difference. To learn how this is possible, see [How It Works](https://www.blacklanternsecurity.com/bbot/Dev/how_it_works/).

  ![subdomain-stats-ebay](https://github.com/blacklanternsecurity/bbot/assets/20261699/de3e7f21-6f52-4ac4-8eab-367296cd385f)



  ```bash

  bbot -t evilcorp.com -p spider
  ```

  <!-- BBOT SPIDER PRESET EXPANDABLE -->

  <details>
  <summary><b><code>spider.yml</code></b></summary>

  ```yaml
  description: Recursive web spider

  modules:
    - httpx

  config:
    web:
      
      spider_distance: 2
      
      spider_depth: 4
      
      spider_links_per_page: 25

  ```

  </details>

  <!-- END BBOT SPIDER PRESET EXPANDABLE -->



  ```bash

  bbot -t evilcorp.com -p email-enum


  bbot -t evilcorp.com -p email-enum subdomain-enum spider
  ```

  <!-- BBOT EMAIL-ENUM PRESET EXPANDABLE -->

  <details>
  <summary><b><code>email-enum.yml</code></b></summary>

  ```yaml
  description: Enumerate email addresses from APIs, web crawling, etc.

  flags:
    - email-enum

  output_modules:
    - emails

  ```

  </details>

  <!-- END BBOT EMAIL-ENUM PRESET EXPANDABLE -->



  ```bash

  bbot -t www.evilcorp.com -p web-basic


  bbot -t www.evilcorp.com -p web-thorough
  ```

  <!-- BBOT WEB-BASIC PRESET EXPANDABLE -->

  <details>
  <summary><b><code>web-basic.yml</code></b></summary>

  ```yaml
  description: Quick web scan

  include:
    - iis-shortnames

  flags:
    - web-basic

  ```

  </details>

  <!-- END BBOT WEB-BASIC PRESET EXPANDABLE -->

  <!-- BBOT WEB-THOROUGH PRESET EXPANDABLE -->

  <details>
  <summary><b><code>web-thorough.yml</code></b></summary>

  ```yaml
  description: Aggressive web scan

  include:
    
    - web-basic

  flags:
    - web-thorough

  ```

  </details>

  <!-- END BBOT WEB-THOROUGH PRESET EXPANDABLE -->



  ```bash

  bbot -t evilcorp.com -p kitchen-sink


  bbot -t evilcorp.com -p subdomain-enum cloud-enum code-enum email-enum spider web-basic paramminer dirbust-light web-screenshots
  ```

  <!-- BBOT KITCHEN-SINK PRESET EXPANDABLE -->

  <details>
  <summary><b><code>kitchen-sink.yml</code></b></summary>

  ```yaml
  description: Everything everywhere all at once

  include:
    - subdomain-enum
    - cloud-enum
    - code-enum
    - email-enum
    - spider
    - web-basic
    - paramminer
    - dirbust-light
    - web-screenshots
    - baddns-thorough

  config:
    modules:
      baddns:
        enable_references: True



  ```

  </details>

  <!-- END BBOT KITCHEN-SINK PRESET EXPANDABLE -->



  Click the graph below to explore the [inner workings](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works/) of BBOT.

  [![image](https://github.com/blacklanternsecurity/bbot/assets/20261699/e55ba6bd-6d97-48a6-96f0-e122acc23513)](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works/)




  ```python
  from bbot.scanner import Scanner

  if __name__ == "__main__":
      scan = Scanner("evilcorp.com", presets=["subdomain-enum"])
      for event in scan.start():
          print(event)
  ```


  ```python
  from bbot.scanner import Scanner

  async def main():
      scan = Scanner("evilcorp.com", presets=["subdomain-enum"])
      async for event in scan.async_start():
          print(event.json())

  if __name__ == "__main__":
      import asyncio
      asyncio.run(main())
  ```

  <details>
  <summary><b>SEE: This Nefarious Discord Bot</b></summary>

  A [BBOT Discord Bot](https://www.blacklanternsecurity.com/bbot/Stable/dev/#discord-bot-example) that responds to the `/scan` command. Scan the internet from the comfort of your discord server!

  ![bbot-discord](https://github.com/blacklanternsecurity/bbot/assets/20261699/22b268a2-0dfd-4c2a-b7c5-548c0f2cc6f9)

  </details>



  - Support for Multiple Targets
  - Web Screenshots
  - Suite of Offensive Web Modules
  - NLP-powered Subdomain Mutations
  - Native Output to Neo4j (and more)
  - Automatic dependency install with Ansible
  - Search entire attack surface with custom YARA rules
  - Python API + Developer Documentation



  BBOT accepts an unlimited number of targets via `-t`. You can specify targets either directly on the command line or in files (or both!):

  ```bash
  bbot -t evilcorp.com evilcorp.org 1.2.3.0/24 -p subdomain-enum
  ```

  Targets can be any of the following:

  - `DNS_NAME` (`evilcorp.com`)
  - `IP_ADDRESS` (`1.2.3.4`)
  - `IP_RANGE` (`1.2.3.0/24`)
  - `OPEN_TCP_PORT` (`192.168.0.1:80`)
  - `URL` (`https://www.evilcorp.com`)

  For more information, see [Targets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#targets-t). To learn how BBOT handles scope, see [Scope](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#scope).



  Similar to Amass or Subfinder, BBOT supports API keys for various third-party services such as SecurityTrails, etc.

  The standard way to do this is to enter your API keys in **`~/.config/bbot/bbot.yml`**. Note that multiple API keys are allowed:
  ```yaml
  modules:
    shodan_dns:
      api_key: 4f41243847da693a4f356c0486114bc6
    c99:
      
      api_key:
        - 21a270d5f59c9b05813a72bb41707266
        - ea8f243d9885cf8ce9876a580224fd3c
        - 5bc6ed268ab6488270e496d3183a1a27
    virustotal:
      api_key: dd5f0eee2e4a99b71a939bded450b246
    securitytrails:
      api_key: d9a05c3fd9a514497713c54b4455d0b0
  ```

  If you like, you can also specify them on the command line:
  ```bash
  bbot -c modules.virustotal.api_key=dd5f0eee2e4a99b71a939bded450b246
  ```

  For details, see [Configuration](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/).



  - Complete list of [Modules](https://www.blacklanternsecurity.com/bbot/Stable/modules/list_of_modules/).
  - Complete list of [Flags](https://www.blacklanternsecurity.com/bbot/Stable/scanning/#list-of-flags).
  - Complete list of [Presets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets_list/).
      - Complete list of [Global Config Options](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/#global-config-options).
      - Complete list of [Module Config Options](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration/#module-config-options).



  <!-- BBOT DOCS TOC -->
  - **User Manual**
      - **Basics**
          - [Getting Started](https://www.blacklanternsecurity.com/bbot/Stable/)
          - [How it Works](https://www.blacklanternsecurity.com/bbot/Stable/how_it_works)
          - [Comparison to Other Tools](https://www.blacklanternsecurity.com/bbot/Stable/comparison)
      - **Scanning**
          - [Scanning Overview](https://www.blacklanternsecurity.com/bbot/Stable/scanning/)
          - **Presets**
              - [Overview](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets)
              - [List of Presets](https://www.blacklanternsecurity.com/bbot/Stable/scanning/presets_list)
          - [Events](https://www.blacklanternsecurity.com/bbot/Stable/scanning/events)
          - [Output](https://www.blacklanternsecurity.com/bbot/Stable/scanning/output)
          - [Tips and Tricks](https://www.blacklanternsecurity.com/bbot/Stable/scanning/tips_and_tricks)
          - [Advanced Usage](https://www.blacklanternsecurity.com/bbot/Stable/scanning/advanced)
          - [Configuration](https://www.blacklanternsecurity.com/bbot/Stable/scanning/configuration)
      - **Modules**
          - [List of Modules](https://www.blacklanternsecurity.com/bbot/Stable/modules/list_of_modules)
          - [Nuclei](https://www.blacklanternsecurity.com/bbot/Stable/modules/nuclei)
          - [Custom YARA Rules](https://www.blacklanternsecurity.com/bbot/Stable/modules/custom_yara_rules)
      - **Misc**
          - [Contribution](https://www.blacklanternsecurity.com/bbot/Stable/contribution)
          - [Release History](https://www.blacklanternsecurity.com/bbot/Stable/release_history)
          - [Troubleshooting](https://www.blacklanternsecurity.com/bbot/Stable/troubleshooting)
  - **Developer Manual**
      - [Development Overview](https://www.blacklanternsecurity.com/bbot/Stable/dev/)
      - [Setting Up a Dev Environment](https://www.blacklanternsecurity.com/bbot/Stable/dev/dev_environment)
      - [BBOT Internal Architecture](https://www.blacklanternsecurity.com/bbot/Stable/dev/architecture)
      - [How to Write a BBOT Module](https://www.blacklanternsecurity.com/bbot/Stable/dev/module_howto)
      - [Unit Tests](https://www.blacklanternsecurity.com/bbot/Stable/dev/tests)
      - [Discord Bot Example](https://www.blacklanternsecurity.com/bbot/Stable/dev/discord_bot)
      - **Code Reference**
          - [Scanner](https://www.blacklanternsecurity.com/bbot/Stable/dev/scanner)
          - [Presets](https://www.blacklanternsecurity.com/bbot/Stable/dev/presets)
          - [Event](https://www.blacklanternsecurity.com/bbot/Stable/dev/event)
          - [Target](https://www.blacklanternsecurity.com/bbot/Stable/dev/target)
          - [BaseModule](https://www.blacklanternsecurity.com/bbot/Stable/dev/basemodule)
          - [BBOTCore](https://www.blacklanternsecurity.com/bbot/Stable/dev/core)
          - [Engine](https://www.blacklanternsecurity.com/bbot/Stable/dev/engine)
          - **Helpers**
              - [Overview](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/)
              - [Command](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/command)
              - [DNS](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/dns)
              - [Interactsh](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/interactsh)
              - [Miscellaneous](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/misc)
              - [Web](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/web)
              - [Word Cloud](https://www.blacklanternsecurity.com/bbot/Stable/dev/helpers/wordcloud)
  <!-- END BBOT DOCS TOC -->



  Some of the best BBOT modules were written by the community. BBOT is being constantly improved; every day it grows more powerful!

  We welcome contributions. Not just code, but ideas too! If you have an idea for a new feature, please let us know in [Discussions](https://github.com/blacklanternsecurity/bbot/discussions). If you want to get your hands dirty, see [Contribution](https://www.blacklanternsecurity.com/bbot/Stable/contribution/). There you can find setup instructions and a simple tutorial on how to write a BBOT module. We also have extensive [Developer Documentation](https://www.blacklanternsecurity.com/bbot/Stable/dev/).

  Thanks to these amazing people for contributing to BBOT! :heart:

  <p align="center">
  <a href="https://github.com/blacklanternsecurity/bbot/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=blacklanternsecurity/bbot&max=500">
  </a>
  </p>

  Special thanks to:

  - @TheTechromancer for creating BBOT
  - @liquidsec for his extensive work on BBOT's web hacking features, including [badsecrets](https://github.com/blacklanternsecurity/badsecrets) and [baddns](https://github.com/blacklanternsecurity/baddns)
  - Steve Micallef (@smicallef) for creating Spiderfoot
  - @kerrymilan for his Neo4j and Ansible expertise
  - @domwhewell-sage for his family of badass code-looting modules
  - @aconite33 and @amiremami for their ruthless testing
  - Aleksei Kornev (@alekseiko) for granting us ownership of the bbot Pypi repository <3


pkgId: 27ffea3cd47174c20519a676b14e177f21a4fe5b1fc360c4776b6d5d1c98b63c
name: python-bboxpy
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Fetch data from bouygues bbox
url: https://pypi.org/project/bboxpy/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bboxpy-1.2.0-1.src.rpm
checksum_type: sha256
description:
  Manage your Bouygues Bbox in Python

  Easily manage your Bbox in Python.
  Check your config, configure your dhcp, disable your wifi, monitor your LAN activity and many others, on LAN or remotely.

  bboxpy is a python library implementing fir the Bbox.

  This project is based on stilllman/aiofreepybox, which provides the same features as aiofreepybox in a synchronous manner.



  Use the PIP package manager

  ```bash
  $ pip install bboxpy
  ```

  Or manually download and install the last version from github

  ```bash
  $ git clone https://github.com/cyr-ius/bboxpy.git
  $ python setup.py install
  ```



  ```python

  from bboxpy import Bbox
  from bboxpy.exceptions import BboxException

  async def async_main()
      
      bbox = Bbox(hostname="https://192.168.1.254",pass='xxxxxx')

      
      await bbox.async_login()

      try:
          device_info = await bbox.device.async_get_bbox_info()
          print(device_info)
      except BboxException as error:
          logger.error(error)

      
      await bbox.device.async_reboot()

      
      await bbox.async_logout()


  if __name__ == "__main__":
      loop = asyncio.get_event_loop()
      loop.run_until_complete(async_main())

  ```


pkgId: b6e13871b08827042de8b1f07cd293384dde7f5865f5fa774b686a22673e3272
name: python-bbpb
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Library for working with protobuf messages without a protobuf type definition.
url: https://github.com/nccgroup/blackboxprotobuf
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbpb-1.4.0-1.src.rpm
checksum_type: sha256
description:
  Blackbox protobuf library is a Python module for decoding and re-encoding protobuf
  messages without access to the source protobuf descriptor file. This library
  provides a simple Python interface to encode/decode messages that can be
  integrated into other tools.

  This library is targeted towards use in penetration testing where being able to
  modify messages is critical and a protocol buffer definition may not be readily
  available.


  Protocol Buffers (protobufs)  are a standard published by Google with
  accompanying libraries for binary serialization of data. Protocol buffers are
  defined by a `.proto` file known to both the sender and the receiver. The actual
  binary message does not contain information such as field names or most type
  information.

  For each field, the serialized protocol buffer includes two pieces of metadata,
  a field number and the wire type. The wire type tells a parser how to parse the
  length of the field, so that it can be skipped if it is not known (one protocol
  buffer design goal is being able to handle messages with unknown fields). A
  single wire-type generally encompasses multiple protocol buffer types, for
  example the length delimited wire-type can be used for string, bytestring,
  inner message or packed repeated fields. See
  <https://developers.google.com/protocol-buffers/docs/encoding#structure> for
  the breakdown of wire types.

  The protocol buffer compiler (`protoc`) does support a similar method of
  decoding protocol buffers without the definition with the `--decode_raw`
  option. However, it does not provide any functionality to re-encode the decoded
  message.


  The library makes a best effort guess of the type based on the provided wire type (and
  occasionally field content) and builds a type definition that can be used to
  re-encode the data. In general, most fields of interest are likely to be parsed
  into a usable form. Users can optionally pass in custom type definitions that
  override the guessed type. Custom type definitions also allow naming of fields to
  improve user friendliness.



  The package can be installed from source with:

  ```
  poetry install
  ```

  BlackBox Protobuf is also available on PyPi at <https://pypi.org/project/bbpb>.
  It can be installed with:

  ```
  pip install bbpb
  ```


  The package defines a `bbpb` command for command line encoding/decoding.

  For command line usage see [CLI.md](./CLI.md).


  The main `blackboxprotobuf` module defines an API with the core encode/decode
  message functions, along with several convenience functions to make it easier
  to use blackboxprotobuf with a user interface, such as encoding/decoding
  directly to JSON and validating modified type definitions.


  Decoding functions takes a protobuf bytestring, and optionally
  either a type definition or a known message name mapped to a type definition
  (in `blackboxprotobuf.known_messages`). If a type definition isn't provided, an
  empty message type is assumed and all types are derived from the protobuf
  binary.

  The decoder returns a tuple containing a dictionary with the decoded data and a
  dictionary containing the generated type definition. If the input type
  definition does not include types for all fields in the message, the output
  type definitions will include type guesses for those fields.

  Example use:
  ```python
  import blackboxprotobuf
  import base64

  data = base64.b64decode('KglNb2RpZnkgTWU=')
  message,typedef = blackboxprotobuf.protobuf_to_json(data)
  print(message)
  ```


  The encoding functions takes a Python dictionary containing the data and a type
  definition. Unlike decoding, the type definition is required and will fail if
  any fields are not defined. Generally, the type definition should be the output
  from the decoding function or a modified version thereof.

  Example use:
  ```python
  import blackboxprotobuf
  import base64

  data = base64.b64decode('KglNb2RpZnkgTWU=')
  message,typedef = blackboxprotobuf.decode_message(data)

  message[5] = 'Modified Me'

  data = blackboxprotobuf.encode_message(message,typedef)
  print(data)
  ```


  The type definition object is a Python dictionary representing the type
  structure of a message, it includes a type for each field and optionally a
  name. Each entry in the dictionary represents a field in the message. The key
  should be the field number and the value is a dictionary containing attributes.

  At the minimum the dictionary should contain the 'type' entry which contains a
  string identifier for the type. Valid type identifiers can be found in
  `blackboxprotobuf/lib/types/type_maps.py`.

  Message fields will also contain one of two entries, 'message_typedef' or
  'message_type_name'. 'message_typedef' should contain a second type definition
  structure for the inner message. 'message_type_name' should contain the string
  identifier for a message type previously stored in
  `blackboxprotobuf.known_messages`. If both are specified, the 'message_type_name'
  will be ignored.



  The `protobuf_to_json` and `protobuf_from_json` functions are convenience
  functions for  encoding/decoding messages to JSON instead of a python
  dictionary. These functions are designed for user-facing input/output and will
  also automatically sort the output, try to encode bytestrings for better
  printing and annotate example values onto the type definition structure.



  The `export_protofile` and `import_protofile` will attempt to convert a
  protobuffer `.proto` file into the blackboxprotobuf type definition and vice
  versa. These functions provide a higher level interface to
  `blackboxprotobuf.lib.protofile` which only takes a filename. The protofile
  functions do not implement a full proper parser and may break on some types.
  One common case to be aware of is the "import" statements in ".proto" files,
  which are not supported. Any imported files must be manually imported with
  `import_protofile` and saved in `blackboxprotobuf.known_messages` first.




  The `validate_typedef` function is designed to sanity check modified type
  definitions and make sure they are internally consistent and consistent with
  the previous type definition (if provided). This should help catch issues such
  as changing a field to an incompatible type or duplicate field names.



  The `json_safe_transform` is a helper function to help create more readable
  JSON output of bytes. It will encode/decode bytes types as `latin1` based on
  the type in the type definition.

  The `sort_output` is a helper function which sorts the output message based on
  the field numbers from the typedef. This helps makes the JSON output more
  consistent and predictable.

  The `sort_typedef` function sorts the fields of the typedef in order to make
  the output more readable. The message fields are sorted by their number and
  type fields (eg. name, type, inner message typedef) are sorted to prioritize
  important short fields at the top and especially to keep the name and type
  fields from getting buried underneath a long inner typedef.



  Many of the functions accept a `config` keyword argument of the
  `blackboxprotobuf.lib.config.Config` class. The config object allows modifying
  some of the encoding/decoding functionality and storing some state. This
  replaces some variables that were global before.

  At the moment this includes:

  * `known_types` - Mapping of message type names to typedef (previously
    `blackboxprotobuf.known_messages`)

  * `default_binary_type` - Change the default type choice for binary fields when
    decoding previously unknown fields. Defaults to `bytes` but can be set to
    `bytes_hex` to return a hex encoded string instead. `bytes_base64` might be
    another option in the future. The type can always be changed for an
    individual field by changing the `type` in the typedef.

  * `default_types` - Change the default type choice for any wiretype when
    decoding a previously unknown field. For example, to default to unsigned
    integers for all varints, set `default_types[WIRETYPE_VARINT] =
    'uint'`.

  The `api` functions like `blackboxprotobuf.decode_message` will default to
  using the global `blackboxprotobuf.lib.config.default` object if one is not
  specified.


  The following is a quick breakdown of wire types and default values. See
  <https://developers.google.com/protocol-buffers/docs/encoding> for more detailed
  information from Google.


  The `varint` wire type represents integers with multiple bytes where one bit of
  each is dedicated to indicating if it is the last byte. This can be used to
  represent integers (signed/unsigned), boolean values or enums. Integers can be
  encoded using three variations:

  - `uint`: Varint encoding with no representation of negative numbers.
  - `int`: Standard encoding but inefficient for negative numbers (always 10 bytes).
  - `sint`: Uses ZigZag encoding to efficiently represent negative numbers by
    mapping negative numbers into the integer space. For example -1 is converted
    to 1, 1 to 2, -2 to 3, and so on. This can result in drastically different
    numbers if a type is misinterpreted and either the original or incorrect type
    is `sint`.

  The default is currently `int` with no ZigZag encoding.


  The fixed length wire types have an implicit size based on the wire type. These
  support either fixed size integers (signed/unsigned) or fixed size floating
  point numbers (float/double). The default type for these is the floating point
  type as most integers are more likely to be represented by a varint.


  Length delimited wire types are prefixed with a `varint` indicating the length.
  This is used for strings, bytestrings, inner messages and packed repeated
  fields. Messages can generally be identified by validating if it is a valid
  protobuf binary. If it is not a message, the default type is a string/byte
  which are relatively interchangeable in Python. A different default type (such
  as `bytes_hex`) can be specified by changing
  `blackboxprotobuf.lib.types.default_binary_type`.

  Packed repeated fields are arrays of either `varints` or a fixed length wire
  type. Non-packed repeated fields use a separate tag (wire type + field number)
  for each element, allowing them to be easily identified and parsed. However,
  packed repeated fields only have the initial length delimited wire type tag.
  The parser is assumed to know the full type already for parsing out the
  individual elements. This makes this field type difficult to differentiate from
  an arbitrary byte string and will require user intervention to identify. In
  protobuf version 2, repeated fields had to be explicitly declared packed in the
  definition. In protobuf version 3, repeated fields are packed by default and
  are likely to become more common.


pkgId: efe59aa4d65115441ea4bcb48bfd35e7ef54dab75527993f6bac253ff58fd22c
name: python-bbrecon
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: A client library and CLI for accessing the Bug Bounty Recon API
url: https://pypi.org/project/bbrecon/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbrecon-0.2.1-1.src.rpm
checksum_type: sha256
description:
  <dl>
    <p align="center">
      <img width="320px" src="https://raw.githubusercontent.com/serain/bbrecon/master/docs/logo_cropped.png">
    </p>
    <p align="center">
      <a href="https://gitter.im/bbrecon/community">
        <img src="http://badges.gitter.im/serain/bbrecon.svg">
      </a>
    </p>
    <br />
  </dl>

  Bug Bounty Recon (`bbrecon`) is a free Recon-as-a-Service for bug bounty hunters and security researchers. The API aims to provide a continuously up-to-date map of the Internet "safe harbor" attack surface, excluding out-of-scope targets.

  It comes with an ergonomic CLI and Python library.



  While effort is taken to ensure the results returned by `bbrecon` are reliable and trustworthy, this service and its operators are in no way responsible for what you do with the data provided.

  Double check your scopes and ensure you stay within safe harbors.



  - **Public Programs** - public bug bounty programs indexed and searchable with filters (live)
  - **Domains** - domains in scope across programs (live)
  - **Private Programs** - support for private programs (September 2020)
  - **Notifications** - webhook alerts when programs are created, updated or domains discovered (September 2020)
  - **Endpoints** - all HTTP and non-HTTP endpoints in scope across all programs (October 2020)



  `bbrecon` is in a gradual **Beta** release phase; major features are released every few weeks to get feedback and fix kinks. You can sign up and start using it, but be aware that **breaking changes may be deployed without notice**. While the service and infrastructure is designed to scale, it is **not currently configured to serve a large global audience**. This will change, but for now YMMV.



  Please report bugs with [GitHub issues](https://github.com/serain/bbrecon/issues).

  Use the [Gitter chat](https://gitter.im/bbrecon/community) for support or enquiring about service availability during beta.





  Fetch an API key from the Console: https://console.bugbountyrecon.com

  Only Google SSO is supported at this time.



  ```
  $ pip3 install bbrecon
  ```

  > `bbrecon` requires Python >= 3.8 - if `pip` tells you it can't find `bbrecon` it's probably because `pip` is using another Python version. Check this with `pip3 --version`.

  If you intend to use the CLI, you should permanently configure your key:

  ```
  $ bbrecon configure key
  Enter your API key: YOUR_API_KEY
  ```

  You can alternatively set the `BBRECON_KEY` environment variable if you prefer.



  The following will output all programs released in the last month that have "web" type targets (APIs/web apps):

  ```
  $ bbrecon get programs --type web --since last-month
  SLUG         PLATFORM     CREATED     REWARDS      MIN.BOUNTY    AVG.BOUNTY    MAX.BOUNTY      SCOPES  TYPES
  cybrary      bugcrowd     2020-07-22  fame         $0            $0            $0                   6  android,ios,web
  expressvpn   bugcrowd     2020-07-14  cash,fame    $150          $1047         $2500               17  android,ios,other,web
  prestashop   yeswehack    2020-07-23  cash         $0            $0            $1000                1  web
  ...
  ```

  To get scopes for specific programs, use `get scopes`:

  ```
  $ bbrecon get scopes rockset codefi-bbp
  SLUG        PLATFORM    TYPE    VALUE
  rockset     hackerone   web     console.rockset.com
  rockset     hackerone   web     docs.rockset.com
  rockset     hackerone   web     api.rs2.usw2.rockset.com
  codefi-bbp  hackerone   web     activate.codefi.network
  ```

  To get domains for specific programs, use `get domains`:

  ```
  $ bbrecon get domains dropcontact rebellion-defense
  SLUG               DOMAIN                    CREATED
  dropcontact        www.dropcontact.io        2020-08-23
  rebellion-defense  mooch.rip                 2020-08-23
  rebellion-defense  www.rebelliondefense.com  2020-08-23
  rebellion-defense  rebelliondefense.com      2020-08-23
  ...
  ```

  Most commands can output JSON to make it easy to work with your scripts. Try `--output json`:

  ```
  $ bbrecon get programs --output json
  [
      {
          "url": "https://bugcrowd.com/optimizely",
          "name": "Optimizely",
          "platform": "bugcrowd",
          "rewards": [
              "cash",
              "fame"
          ],
  ...
  ```

  You can get information about specific programs by passing one or many slugs to the `get programs` command:

  ```
  $ bbrecon get programs twago optimizely
  SLUG        PLATFORM    CREATED     REWARDS    MIN.BOUNTY    AVG.BOUNTY    MAX.BOUNTY      SCOPES  TYPES
  twago       intigriti   2020-04-09             $0            $0            $0                   5  web
  optimizely  bugcrowd    2018-03-22  cash,fame  $0            $750          $5000                6  web
  ```

  Use `--help` to get a list of filters for each command:

  ```
  $ bbrecon get programs --help
  ...
                                    Output format.  [default: wide]
    -n, --name TEXT                 Filter by name.
    -t, --type TEXT                 Filter by scope type. Can be used multiple
                                    times.

    -r, --reward TEXT               Filter by reward type. Can be used multiple
                                    times.

    -p, --platform TEXT             Filter by platform. Can be used multiple
                                    times.

    --exclude-platform TEXT         Exclude specific platform. Ignored if
                                    --platform was passed. Can be used multiple
                                    times.

    -s, --since TEXT                Filter by bounties created after a certain
                                    date. A specific date in the format
                                    '%Y-%m-%d' can be supplied. Alternatively,
                                    the following keywords are supported:
                                    'yesterday', 'last-week', 'last-month',
                                    'last-year' as well as 'last-X-days' (where
                                    'X' is an integer).
  ...
  ```

  Note that some filters are lists, and can be used multiple times! If you wanted to get all programs that have mobile apps in scope you could run:

  ```
  $ bbrecon get programs --type android --type ios
  SLUG           PLATFORM     CREATED     REWARDS      MIN.BOUNTY    AVG.BOUNTY    MAX.BOUNTY  SCOPES  TYPES
  square         bugcrowd     2018-03-22  cash,fame    $300          $492          $5000            4  android,ios,other,web
  gojek          bugcrowd     2018-03-22  cash,fame    $200          $618          $5000            4  android,ios,web
  smartthings    bugcrowd     2018-03-22  fame         $0            $0            $0               5  android,hardware,ios,web
  ...
  ```



  You are invited to check out this repo's codebase for more details, but to get started:

  ```python3
  from bbrecon import BugBountyRecon

  bb = BugBountyRecon(token="API_KEY")

  programs = bb.programs(
      types=["web", "ios"],
      platforms=["hackerone"],
      rewards=["cash"],
  )

  for program in programs:
      print(f"{program.name} rewards up to ${program.maximum_bounty}!")
      print(f"More information is available at: {program.url}")

      for scope in program.in_scope:
          if scope.type == "desktop":
              print("Found a desktop app in scope for this program. Cool!")

      domains = list(bb.domains(programs=[program.slug]))
      print("Here are some domains for this program:")
      for domain in domains[:3]:
          print(domain.name)
  ```



  You can interact directly with the REST API if you prefer. Check out the API docs [here](https://docs.bugbountyrecon.com/index.html).


pkgId: da8bf2cd9da50d4592fea6760feff70aefa28f305fa0dd2dc61f27d0e221d81a
name: python-bbrl
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: RL library inspired from salina
url: https://pypi.org/project/bbrl/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbrl-0.3.3-1.src.rpm
checksum_type: sha256
description:
  `bbrl`- A Flexible and Simple Library for Reinforcement Learning deriving from SaLinA

  BBRL stands for "BlackBoard Reinforcement Learning". Initially, this library was a fork of [the SaLinA library](https://github.com/facebookresearch/salina).
  But SaLinA is a general model for sequential learning whereas BBRL is dedicated to RL, thus it focuses on a subset of SaLinA.
  Morevover, BBRL is designed for education purpose (in particular, to teach various RL algorithms, concepts and phenomena).
  Thus the fork slowly drifted away from SaLinA and became independent after a few months, even if some parts of the code are still inherited from SaLinA.



  `bbrl` is a lightweight library extending PyTorch modules for developping **Reinforcement Learning** models
  * It supports simultaneously training with AutoReset on multiple environments
  * It works on multiple CPUs and GPUs



  BBRL being inspired from SaLinA, please use this bibtex if you want to cite BBRL in your publications:

  Link to the paper: [SaLinA: Sequential Learning of Agents](https://arxiv.org/abs/2110.07910)

  ```
      @misc{salina,
          author = {Ludovic Denoyer, Alfredo de la Fuente, Song Duong, Jean-Baptiste Gaya, Pierre-Alexandre Kamienny, Daniel H. Thompson},
          title = {SaLinA: Sequential Learning of Agents},
          year = {2021},
          publisher = {Arxiv},
          howpublished = {\url{https://github.com/facebookresearch/salina}},
      }

  ```



  * create and activate a python environment with your favorite tool, e.g. conda or venv (for instance, `conda create bbrl_env` ; `conda activate bbrl_env`)
  * Then clone the repo
  * `pip install -e .`




  * April 2024:
  * * Major evolution of the documentation

  * March 2024:
  * * Bug fixes in the replay buffer

  * May-June 2023:
  * * Integrated the use of gymnasium. Turned google colab notebooks into colab compatible jupyter notebooks. Refactored all the notebooks.

  * August 2022:
  * * Major updates of the notebook-based documentation

  * May 2022:
  * * First commit of the BBRL repository

  * March 2022:
  * * Forked SaLinA and started to modify the model





  - BBRL only contains core classes to implement RL algorithms.

  - Because both notations coexist in the literature, the GymAgent classes support the case where doing action $a_t$ in state $s_t$ results in reward $r_t$, and the case where it results in reward $r_{t+1}$.

  - Some output string were corrected, some variable were renamed and some comments were improved to favor code readability.

  - A few small bugs in SaLinA were fixed:

  * * The replay buffer was rejecting samples that did not fit inside when the number of added samples was beyond the limit. This has been corrected to implement the standard FIFO behavior of replay buffer.

  * * When using autoreset=True and no replay buffer, transitions from an episode to the next were considered as standard steps in an episode. We added a mechanism to properly filter them out, using an additional `get_transitions()` function in the Workspace class.



  To help you understand how to use BBRL, we have written a doc [here](https://github.com/osigaud/bbrl/blob/master/docs/overview.md)



  If you want to learn RL on your own using BBRL, you can do so from [the following online material](https://github.com/osigaud/bbrl/blob/master/docs/learning_RL/learning_RL.md)



  Most of the notebooks below can be run under jupyter notebook as well as under Google colaboratory. In any case, download it on your disk and run it with your favorite notebook environment:

  - `conda activate bbrl_env` (for instance)
  - `jupyter notebook`
  - the notebook opens in your browser

  - [Coding DQN using autoreset=False](http://master-dac.isir.upmc.fr/rld/rl/03-1-dqn-introduction.student.ipynb)

  - [Coding DQN using autoreset=True](http://master-dac.isir.upmc.fr/rld/rl/03-2-dqn-full.student.ipynb)

  - [Coding DPPG and TD3 using autoreset=True](http://master-dac.isir.upmc.fr/rld/rl/04-ddpg-td3.student.ipynb)

  - [Coding basic Policy Gradient algorithms and REINFORCE](http://master-dac.isir.upmc.fr/rld/rl/05-reinforce.student.ipynb)

  - [A basic version of the A2C algorithm](http://master-dac.isir.upmc.fr/rld/rl/06-1-a2c-basic.student.ipynb)

  - [A more advanced version of the A2C algorithm](http://master-dac.isir.upmc.fr/rld/rl/06-2-a2c-advanced.student.ipynb)

  - [The KL penalty version of PPO](http://master-dac.isir.upmc.fr/rld/rl/07-1-ppo_penalty.student.ipynb)

  - [The clipped version of PPO](http://master-dac.isir.upmc.fr/rld/rl/07-2-ppo_clip.student.ipynb)

  - [Coding SAC](http://master-dac.isir.upmc.fr/rld/rl/08-sac.student.ipynb)

  <!---
  - [Coding TQC](https://colab.research.google.com/drive/1Lg9_M9YwI_E6Xm1on8GY9TLYxLItTSuw?usp=sharing)
  -->




  Have a look at the [bbrl_algos](https://github.com/osigaud/bbrl_algos.git) library.



  [Generated with pdoc](https://htmlpreview.github.io/?https://github.com/osigaud/bbrl/blob/master/documentation/bbrl/index.html)



  See [contributing](CONTRIBUTING.md)



  `bbrl` utilizes `pytorch`, `hydra` for configuring experiments, and `gymnasium` for reinforcement learning algorithms. See requirements.txt for more details.



  `bbrl` is released under the MIT license. See [LICENSE](LICENSE) for additional details about it.


pkgId: 1d1557d947ee4d1ad7fbee3c333e9b17b7bfecd26495da3fd644b6818728d6bc
name: python-bbrl-gymnasium
arch: src
version: 0.3.7
epoch: 0
release: 1
summary: A set of additional gym environments
url: https://pypi.org/project/bbrl-gymnasium/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbrl-gymnasium-0.3.7-1.src.rpm
checksum_type: sha256
description:
  The bbrl_gymnasium library is the place where I put additional gym-like environments.

  So far, it contains the following environments:
  - CartPoleContinuous-v0 (with timit limit = 200 steps)
  - CartPoleContinuous-v1 (with timit limit = 500 steps)
  - MazeMDP, a Maze environment for Tabular RL
  - RocketLander-v0, a rocket landing simulation adapted from [this repository](https://github.com/sdsubhajitdas/Rocket_Lander_Gym)
  - LineMDP-v0, a simple discrete state and action MDP
  - LineMDPContinuous-v0, a simple discrete action MDP
  - 2DMDPContinuous-v0, a discrete action MDP with 2D state
  - PendulumEnv-v0, a version of the Pendulum environment with friction
  - CartPolePixelsEnv-v0, a version of CartPole controlled from pixels, with time limit 200
  - CartPolePixelsEnv-v1, a version of CartPole controlled from pixels, with time limit 500




  ```
  pip install bbrl_gymnasium
  ```



  ```
  import gymnasium as gym
  import bbrl_gymnasium

  env = gym.make("CartPoleContinuous-v0")  # or -v1 or any other and then use your environment as usual
  ```


pkgId: 3ee36ea3801a5a255cbf810d985bbfa67e50108b16db254aaccbf02c6f2bc989
name: python-bbstrader
arch: src
version: 0.1.9
epoch: 0
release: 1
summary: Simplified Investment & Trading Toolkit
url: https://github.com/bbalouki/bbstrader
rpm_license: The MIT License (MIT)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbstrader-0.1.9-1.src.rpm
checksum_type: sha256
description:
  ![bbstrader](https://github.com/bbalouki/bbstrader/blob/main/assets/bbstrader_logo.png?raw=true)

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

  [Dcoumentation](https://bbstrader.readthedocs.io/en/latest/index.html)



  BBSTrader is a trading system suite developed for MetaTrader 5 (MT5) and IBKR platforms (comming soon), designed to offer a comprehensive set of tools for developping, backtesting, executing, and managing a wide array of trading strategies. With an emphasis on algorithmic and quantitative trading to provide traders with a robust platform for exploring and deploying sophisticated trading strategies.

  `bbstrader` is comprised of several key modules, each focus on specific aspects of trading strategy development and execution:

  - **Backtesting Module (btengine)** : Enables traders to rigorously test their trading strategies using historical data to evaluate performance before live deployment.
  - **Trading Strategies Module**: A collection of predefined trading strategies, including ARIMA+GARCH models, Kalman Filters, and Simple Moving Averages, equipped with risk management through Hidden Markov Models.
  - **MetaTrader5 Module (metatrader)**: Facilitates the direct execution of trading strategies on the MetaTrader 5 platform, supporting real-time trading across multiple financial instruments.
  - **Modles Module**: Serves as a framework for implementing various types of financial models (risk managment models, Machine learing models etc).
  - **Time serie Module (tseries)** designed for conducting advanced time series analysis in financial markets.
  It leverages statistical models and algorithms to perform tasks such as cointegration testing, volatility modeling, and filter-based estimation to assist in trading strategy development, market analysis, and financial data exploration.



  - **Comprehensive Backtesting**: Assess the performance of trading strategies with historical market data to optimize parameters and strategies for live trading environments.
  - **Integrated Risk Management**: Leverage advanced risk management techniques to adapt to changing market conditions and maintain control over risk exposure.
  - **Automated Trading**: Execute trades automatically on the MT5 platform, with support for managing orders, positions, and risk in real-time.
  - **Flexible Framework**: Customize existing strategies or develop new ones with the flexible, modular architecture designed to accommodate traders' evolving needs.
  - **Advanced Time Series Analysis**: Conduct in-depth analysis of financial time series data to identify patterns, trends, and relationships that can inform trading strategies.
  You can read the full documentation [here](https://bbstrader.readthedocs.io/en/latest/index.html)



  Before you can use the bbstrader and the metratrader, you need to have MetaTrader 5 (MT5) installed on your computer and an active MT5 trading account.
  This Module currenlty support three brokers, [Admirals Group AS](https://cabinet.a-partnership.com/visit/?bta=35537&brand=admiralmarkets), [Just Global Markets Ltd.](https://one.justmarkets.link/a/tufvj0xugm/registration/trader), and [FTMO](https://trader.ftmo.com/?affiliates=JGmeuQqepAZLMcdOEQRp), so you need to create a demo or live account with one of them.
  * If you want to trade `Stocks`, `ETFs`, `Indices`, `Commodities`, `Futures`, and `Forex`, [click here](https://cabinet.a-partnership.com/visit/?bta=35537&brand=admiralmarkets)
  * If you want to trade `Stocks`, `Crypto`, `indices`, `Commodities`, and `Forex`, [click here](https://one.justmarkets.link/a/tufvj0xugm/registration/trader)
  * If you are looking for a prop firm, [click here](https://trader.ftmo.com/?affiliates=JGmeuQqepAZLMcdOEQRp)

  Then, you can install `bbstrader` using pip:
  ```bash
  pip install bbstrader
  ```



  ```python
  from bbstrader.trading.strategies import test_strategy

  if __name__ == '__main__':
      
      test_strategy(strategy='sistbo')

  ```

  ![Backtesting Results 1](https://github.com/bbalouki/bbstrader/blob/main/assets/bbs_.png?raw=true)
  ![Backtesting Results 2](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_metrics_1.png?raw=true)
  ![Backtesting Results 3](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_metrics_2.png?raw=true)
  ![Backtesting Results 4](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_plots_1_.png?raw=true)
  ![Backtesting Results 5](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_plots_2_.png?raw=true)



  `bbstrader`'s modular design allows for easy customization and extension. Traders and developers are encouraged to modify existing strategies, add new ones, or enhance the system's capabilities. Contributions to the `bbstrader` project are welcome.



  We warmly welcome contributions from the trading and development community! Whether you're interested in fixing bugs, adding new features, or improving documentation, your help is invaluable to making `bbstrader` more robust and versatile. Here's how you can contribute:



  - **Develop New Strategies**: Implement and share your unique trading strategies or models.
  - **Enhance Existing Modules**: Optimize the performance, extend the functionality, or improve the usability of existing modules.
  - **Report Bugs**: Identify and report bugs to help us improve the system's stability and performance.
  - **Improve Documentation**: Contribute to the project's documentation for clearer guidance and better usability.
  - **Share Insights and Best Practices**: Provide examples, tutorials, or best practices on utilizing `bbstrader` effectively.



  1. **Fork the Repository**: Start by forking the `bbstrader` repository to your GitHub account.
  2. **Clone Your Fork**: Clone your forked repository to your local machine to start making changes.
  3. **Set Up Your Development Environment**: Ensure you have the necessary development environment set up, including Python, MetaTrader 5, and any dependencies.
  4. **Create a New Branch**: Make your changes in a new git branch, branching off from the main branch.
  5. **Implement Your Changes**: Work on bug fixes, features, or documentation improvements.
  6. **Test Your Changes**: Ensure your changes do not introduce new issues and that they work as intended.
  7. **Submit a Pull Request**: Once you're ready, submit a pull request (PR) against the main `bbstrader` repository. Include a clear description of the changes and any other relevant information.



  Please adhere to the following guidelines to ensure a smooth contribution process:

  - **Follow the Coding Standards**: Write clean, readable code and follow the coding conventions used throughout the project.
  - **Document Your Changes**: Add comments and update the README.md files as necessary to explain your changes or additions.
  - **Respect the License**: All contributions are subject to the MIT License under which `bbstrader` is distributed.

  We're excited to see your contributions and to welcome you to the `bbstrader` community. Together, we can build a powerful tool that serves the needs of traders around the world.




  Trading financial instruments involves a high level of risk and may not be suitable for all investors. The developers of `bbstrader` are not responsible for any financial losses incurred from the use of this software. Trade responsibly and at your own risk.


  `bbstrader` is open source and available under the MIT License.


pkgId: 11412d0c35b4708665748252353c9f15b88c2edf9ea3351f3172c847b718b3f3
name: python-bbwebservice
arch: src
version: 1.0.10
epoch: 0
release: 1
summary: A bare bone webserver
url: https://pypi.org/project/bbwebservice/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbwebservice-1.0.10-1.src.rpm
checksum_type: sha256
description:
  `bbwebservice` is a small Python library for creating simple webservers.



  To install this library, use the pip command: `pip install bbwebservice`



  - how to import:

  ```python
  from bbwebservice.webserver import *
  ```

  1. Register pages for HTTP `GET`:
     - `@register`: When using the `@register` decorator, you must define the named parameters `route` and `type`.
       - `route`: The URL which must be requested via HTTP `GET` method for the decorated function to execute. The decorated function is expected to return the respective response content.
       - `type`: The `type` parameter holds the intended MIME-type of the response.

  ```python
  @register(route='/', type=MIME_TYPE.HTML)
  def main_page():
      return load_file('/content/index.html')
  ```

  2. Register pages for HTTP `POST`:
     - `@post_handler`: Works similarly to [1.], with the only difference being that it is mandatory for the decorated function to take a parameter.

  ```python
  @post_handler(route='/makethread', type=MIME_TYPE.HTML)
  def makethread(args):
      return load_file('/content/post.html')
  ```

  3. Redirect:
    To redirect a request, you can return a `Redirect` object that specifies the path to which the request should be redirected.

  ```python
  @register(route='/foo', type=MIME_TYPE.HTML)
  def redirect():
      return Redirect('/')
  ```

  4. PartialContent and videostreaming:
     To serve partial-content for video streaming or other applications, you can return a `PartialContent` object which takes the location of the streamed file and the chunk size which determines the size of the parts that should be streamed.

  ```python
  @register(route='/video.mp4', type=MIME_TYPE.MP4)
  def vid(args):
      return PartialContent("/content/v.mp4", 80000)
  ```

  5. Error handler:
     With the `@error_handler`, it is possible to provide default responses for requests with the specified error code.

  ```python
  @error_handler(error_code=404, type=MIME_TYPE.HTML)
  def not_found():
      return load_file('/content/404.html')
  ```

  6. Handler args:
     Setting cookies, getting query strings, or setting custom headers are possible when you give your handler function a parameter.

  ```python
  @post_handler(route='/', type=MIME_TYPE.HTML)
  def login(args):
      set_cookie(args, 'id', "test")
      return load_file('/content/index.html')
  ```

  The server-supplied `args` value looks something like this, and changes to the provided value will be reflected in the server answer:

  ```py
  {
      "query_string": {},
      "flags": [],
      "template_args": {},
      "cookies": {},
      "address": ("192.168.56.1", 64361),
      "post": bytearray(b""),
      "request_header": {
          "Host": ["192.168.56.1:5000"],
          "Connection": ["keep-alive"],
          "User-agent": ["Mozilla/5.0 (Windows NT 10.0", "Win64", "x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"],
          "Accept": ["text/html,application/xhtml+xml,application/xml", "q=0.9,image/avif,image/webp,image/apng,*/*", "q=0.8,application/signed-exchange", "v=b3", "q=0.7"],
          "Accept-encoding": ["gzip, deflate"],
          "Accept-language": ["de-DE,de", "q=0.9,en-US", "q=0.8,en", "q=0.7"]
      },
      "response": "<bbwebservice.http_parser.HTTP_Response object at 0x00000151D5718E50>"
  }
  ```

  7. Start the server (example of fully functional server):
     To start the server, invoke the `start` function.

  ```python
  from bbwebservice.webserver import *

  @register(route='/', type=MIME_TYPE.HTML)
  def main():
      return load_file('/content/index.html')

  start()
  ```

  8. With URL-templating you are able to match dynamic URLs like `/test/paul/1456379827256`

  ```py
  @register(route= UrlTemplate('/test/{name:str}/{id:int}'), type=MIME_TYPE.TEXT)
  def test(args):
      return str(args[STORE_VARS.TEMPLATE_VARS])
  ```

  | Supported Types | Example             |
  |-----------------|---------------------|
  | `str`           | `{varname:str}`     |
  | `int`           | `{varname:int}`     |
  | `float`         | `{varname:float}`   |
  | `bool`          | `{varname:bool}`    |
  | `path`          | `{varname:path}`    |

  you can combine the `path` type with `load_file_from_directory` like this:
  ```py
  @register(route= UrlTemplate('/path/{path:path}'), type=MIME_TYPE.TEXT)
  def load_from_dir(args):
      return load_file_from_directory('C:/myserver/content',args[STORE_VARS.TEMPLATE_VARS].get('path'))
  ```

  1. Register routes for different domains through which the server is accessed when SNI is enabled in the config file.
  ```py
  @register(route=UrlTemplate('domain1.net:{path:path}'), type=MIME_TYPE.TEXT)
  def main1(args):
      print("args:",args)
      return 'domain1.net' +" "+ args[STORE_VARS.TEMPLATE_VARS].get('path')

  @register(route=UrlTemplate('domain2.net:{path:path}'), type=MIME_TYPE.TEXT)
  def main2(args):
      print("args:",args)
      return 'domain2.net' +" "+ args[STORE_VARS.TEMPLATE_VARS].get('path')
  ```



  In the directory `/config`, there is a file named `config.json`. Here you can configure the server:

  ```json
  {
      "ip": "localhost",
      "port": 5000,
      "queue_size": 10,
      "SSL": false,
      "cert_path" : "",
      "key_path" : ""
  }
  ```

  If you intend to keep the application centrally (online), it is recommended to set the value of `ip` to either `default` or the IP address of the respective server. Additionally, it is advisable to activate `SSL` and set the corresponding paths for `cert_path` and `key_path`.

  ```json
      "host": [
          {
              "host": "domain1.net",
              "cert_path" : "...fullchain.pem",
              "key_path" : "...privkey.pem"
          },
          {
              "host": "domain1.net",
              "cert_path" : "...fullchain.pem",
              "key_path" : "...privkey.pem"
          }
      ]
  ```
  `SNI support`:
  You can provide the config with a host argument like this to support multible certificates
  for different domains.



  - 5000: For testing purposes
  - 443: For HTTPS (SSL = true)
  - 80: For HTTP (SSL = false)



  ```python
  log_to_file()
  set_logging(LOGGING_OPTIONS.INFO, True)
  set_logging(LOGGING_OPTIONS.TIME, True)
  set_logging(LOGGING_OPTIONS.DEBUG, True)
  set_logging(LOGGING_OPTIONS.ERROR, True)

  def log(log, date, loglvl):
      if loglvl not in ['debug','info']:
          return
      print('[my-log]', log, date)


  set_logging_callback(log)
  ```


pkgId: ff3031c06498ffc05d5d11ae7d99d8576e018ee7f2dbae812b5157a753308521
name: python-bbx
arch: src
version: 1.1.2
epoch: 0
release: 1
summary: Simple bounding box operations
url: https://github.com/RomanJuranek/bbx
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bbx-1.1.2-1.src.rpm
checksum_type: sha256
description:
  Simple operations over bounding boxes.
  The package provides a class `Boxes` encapsulating a set of bounding boxes. Internally, the boxes are represented in an Nx4 matrix with x1,y1,x2,y2 coordinates. Instances of `Boxes` support arbitraty user-defined fields which can hold other properties of boxes like e.g. score.

  ```python
  import bbx

  B = bbx.Boxes([0,0,10,10])  # New instance
  B.set_field("score", [1])  # Set the field
  B.width()  # [10]
  C = bbx.resize(B, 2)  # Resize and make new instance
  C.get() # [[-5,-5,15,15]]
  C.get_field("score")  # [1]
  C.area()  # [400]
  ```



  ... for the glory of s... But seriously, I use bounding boxes in every other project and there is no decent small package for this. Yes I can use TF obj detection api (and I did for a while, this pkg have similar interface to it) or structures from imgaug or others. I did not find anything that suits my needs (if you know about something just let me know). You either install a big non-standard package with tons of functionality you do not need or you implement it by yourself. So I decided to make a very small package that does precisely what I need and nothing more, is portable (just numpy needed, and you already have it!).

  Yes, I just implemented a non-standard package, so I so not need to use other non-standard packages... yes, I know...



  The package is in PyPI so just use `pip`
  ```
  pip install bbx
  ```



  Feelin' brave? Contribute with code! You can also submit an issue if something is broken.



  This code is published under [MIT License](LICENSE)


pkgId: 8f4e8e6d937e3f547c479a7b777a50ba242085bafeca93ab4f2ffe177d1a66ea
name: python-bc-detect-secrets
arch: src
version: 1.5.16
epoch: 0
release: 1
summary: Tool for detecting secrets in the codebase
url: https://github.com/bridgecrewio/detect-secrets
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bc-detect-secrets-1.5.16-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/bridgecrewio/detect-secrets/actions/workflows/release.yml/badge.svg)](https://github.com/bridgecrewio/detect-secrets/actions/workflows/release.yml?query=branch%3Amaster++)
  [![PyPI](https://img.shields.io/pypi/v/bc-detect-secrets)](https://pypi.org/project/bc-detect-secrets/)
  [![Python Version](https://img.shields.io/pypi/pyversions/bc-detect-secrets)](#)





  This is a fork of the [detect-secrets](https://github.com/Yelp/detect-secrets) repo by Yelp and is
  officially supported by Bridgecrew.



  `detect-secrets` is an aptly named module for (surprise, surprise) **detecting secrets** within a
  code base.

  However, unlike other similar packages that solely focus on finding secrets, this package is
  designed with the enterprise client in mind: providing a **backwards compatible**, systematic
  means of:

  1. Preventing new secrets from entering the code base,
  2. Detecting if such preventions are explicitly bypassed, and
  3. Providing a checklist of secrets to roll, and migrate off to a more secure storage.

  This way, you create a
  [separation of concern](https://en.wikipedia.org/wiki/Separation_of_concerns):
  accepting that there may *currently* be secrets hiding in your large repository
  (this is what we refer to as a _baseline_), but preventing this issue from getting any larger,
  without dealing with the potentially gargantuan effort of moving existing secrets away.

  It does this by running periodic diff outputs against heuristically crafted regex statements,
  to identify whether any *new* secret has been committed. This way, it avoids the overhead of
  digging through all git history, as well as the need to scan the entire repository every time.

  For a look at recent changes, please see [CHANGELOG.md](CHANGELOG.md).

  If you are looking to contribute, please see [CONTRIBUTING.md](CONTRIBUTING.md).

  For more detailed documentation, check out our other [documentation](docs/).





  Create a baseline of potential secrets currently found in your git repository.

  ```bash
  $ detect-secrets scan > .secrets.baseline
  ```

  or, to run it from a different directory:

  ```bash
  $ detect-secrets -C /path/to/directory scan > /path/to/directory/.secrets.baseline
  ```

  **Scanning non-git tracked files:**

  ```bash
  $ detect-secrets scan test_data/ --all-files > .secrets.baseline
  ```



  This will rescan your codebase, and:

  1. Update/upgrade your baseline to be compatible with the latest version,
  2. Add any new secrets it finds to your baseline,
  3. Remove any secrets no longer in your codebase

  This will also preserve any labelled secrets you have.

  ```bash
  $ detect-secrets scan --baseline .secrets.baseline
  ```

  For baselines older than version 0.9, just recreate it.



  **Scanning Staged Files Only:**

  ```bash
  $ git diff --staged --name-only -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
  ```

  **Scanning All Tracked Files:**

  ```bash
  $ git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
  ```



  ```bash
  $ detect-secrets scan --list-all-plugins
  ArtifactoryDetector
  AWSKeyDetector
  AzureStorageKeyDetector
  BasicAuthDetector
  CloudantDetector
  DiscordBotTokenDetector
  GitHubTokenDetector
  Base64HighEntropyString
  HexHighEntropyString
  IbmCloudIamDetector
  IbmCosHmacDetector
  JwtTokenDetector
  KeywordDetector
  MailchimpDetector
  NpmDetector
  PrivateKeyDetector
  SendGridDetector
  SlackDetector
  SoftlayerDetector
  SquareOAuthDetector
  StripeDetector
  TwilioKeyDetector
  ```



  ```bash
  $ detect-secrets scan --disable-plugin KeywordDetector --disable-plugin AWSKeyDetector
  ```

  If you want to **only** run a specific plugin, you can do:

  ```bash
  $ detect-secrets scan --list-all-plugins | \
      grep -v 'BasicAuthDetector' | \
      sed "s#^#--disable-plugin #g" | \
      xargs detect-secrets scan test_data
  ```



  This is an optional step to label the results in your baseline. It can be used to narrow down your
  checklist of secrets to migrate, or to better configure your plugins to improve its signal-to-noise
  ratio.

  ```bash
  $ detect-secrets audit .secrets.baseline
  ```



  **Basic Use:**

  ```python
  from detect_secrets import SecretsCollection
  from detect_secrets.settings import default_settings

  secrets = SecretsCollection()
  with default_settings():
      secrets.scan_file('test_data/config.ini')


  import json
  print(json.dumps(secrets.json(), indent=2))
  ```

  **More Advanced Configuration:**

  ```python
  from detect_secrets import SecretsCollection
  from detect_secrets.settings import transient_settings

  secrets = SecretsCollection()
  with transient_settings({
      
      
      'plugins_used': [
          
          {
              'name': 'Base64HighEntropyString',
              'limit': 5.0,
          },

          
          {
              'name': 'HippoDetector',
              'path': 'file:///Users/aaronloo/Documents/github/detect-secrets/testing/plugins.py',
          },
      ],

      
      
      
      'filters_used': [
          {
              'path': 'file://private-filters/example.py::is_identified_by_ML_model',
          },
      ]
  }) as settings:
      
      
      settings.disable_filters(
          'detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign',
          'detect_secrets.filters.heuristic.is_likely_id_string',
      )

      secrets.scan_file('test_data/config.ini')
  ```



  ```bash
  $ pip install detect-secrets
  ✨🍰✨
  ```

  Install via [brew](https://brew.sh/):

  ```bash
  $ brew install detect-secrets
  ```



  `detect-secrets` comes with three different tools, and there is often confusion around which one
  to use. Use this handy checklist to help you decide:

  1. Do you want to add secrets to your baseline? If so, use **`detect-secrets scan`**.
  2. Do you want to alert off new secrets not in the baseline? If so, use **`detect-secrets-hook`**.
  3. Are you analyzing the baseline itself? If so, use **`detect-secrets audit`**.



  ```
  $ detect-secrets scan --help
  usage: detect-secrets scan [-h] [--string [STRING]] [--only-allowlisted]
                             [--all-files] [--baseline FILENAME]
                             [--force-use-all-plugins] [--slim]
                             [--list-all-plugins] [-p PLUGIN]
                             [--base64-limit [BASE64_LIMIT]]
                             [--hex-limit [HEX_LIMIT]]
                             [--disable-plugin DISABLE_PLUGIN]
                             [-n | --only-verified]
                             [--exclude-lines EXCLUDE_LINES]
                             [--exclude-files EXCLUDE_FILES]
                             [--exclude-secrets EXCLUDE_SECRETS]
                             [--word-list WORD_LIST_FILE] [-f FILTER]
                             [--disable-filter DISABLE_FILTER]
                             [path [path ...]]

  Scans a repository for secrets in code. The generated output is compatible
  with `detect-secrets-hook --baseline`.

  positional arguments:
    path                  Scans the entire codebase and outputs a snapshot of
                          currently identified secrets.

  optional arguments:
    -h, --help            show this help message and exit
    --string [STRING]     Scans an individual string, and displays configured
                          plugins' verdict.
    --only-allowlisted    Only scans the lines that are flagged with `allowlist
                          secret`. This helps verify that individual exceptions
                          are indeed non-secrets.

  scan options:
    --all-files           Scan all files recursively (as compared to only
                          scanning git tracked files).
    --baseline FILENAME   If provided, will update existing baseline by
                          importing settings from it.
    --force-use-all-plugins
                          If a baseline is provided, detect-secrets will default
                          to loading the plugins specified by that baseline.
                          However, this may also mean it doesn't perform the
                          scan with the latest plugins. If this flag is
                          provided, it will always use the latest plugins
    --slim                Slim baselines are created with the intention of
                          minimizing differences between commits. However, they
                          are not compatible with the `audit` functionality, and
                          slim baselines will need to be remade to be audited.

  plugin options:
    Configure settings for each secret scanning ruleset. By default, all
    plugins are enabled unless explicitly disabled.

    --list-all-plugins    Lists all plugins that will be used for the scan.
    -p PLUGIN, --plugin PLUGIN
                          Specify path to custom secret detector plugin.
    --base64-limit [BASE64_LIMIT]
                          Sets the entropy limit for high entropy strings. Value
                          must be between 0.0 and 8.0, defaults to 4.5.
    --hex-limit [HEX_LIMIT]
                          Sets the entropy limit for high entropy strings. Value
                          must be between 0.0 and 8.0, defaults to 3.0.
    --disable-plugin DISABLE_PLUGIN
                          Plugin class names to disable. e.g.
                          Base64HighEntropyString

  filter options:
    Configure settings for filtering out secrets after they are flagged by the
    engine.

    -n, --no-verify       Disables additional verification of secrets via
                          network call.
    --only-verified       Only flags secrets that can be verified.
    --exclude-lines EXCLUDE_LINES
                          If lines match this regex, it will be ignored.
    --exclude-files EXCLUDE_FILES
                          If filenames match this regex, it will be ignored.
    --exclude-secrets EXCLUDE_SECRETS
                          If secrets match this regex, it will be ignored.
    --word-list WORD_LIST_FILE
                          Text file with a list of words, if a secret contains a
                          word in the list we ignore it.
    -f FILTER, --filter FILTER
                          Specify path to custom filter. May be a python module
                          path (e.g.
                          detect_secrets.filters.common.is_invalid_file) or a
                          local file path (e.g.
                          file://path/to/file.py::function_name).
    --disable-filter DISABLE_FILTER
                          Specify filter to disable. e.g.
                          detect_secrets.filters.common.is_invalid_file
  ```



  ```
  $ detect-secrets-hook --help
  usage: detect-secrets-hook [-h] [-v] [--version] [--baseline FILENAME]
                             [--list-all-plugins] [-p PLUGIN]
                             [--base64-limit [BASE64_LIMIT]]
                             [--hex-limit [HEX_LIMIT]]
                             [--disable-plugin DISABLE_PLUGIN]
                             [-n | --only-verified]
                             [--exclude-lines EXCLUDE_LINES]
                             [--exclude-files EXCLUDE_FILES]
                             [--exclude-secrets EXCLUDE_SECRETS]
                             [--word-list WORD_LIST_FILE] [-f FILTER]
                             [--disable-filter DISABLE_FILTER]
                             [filenames [filenames ...]]

  positional arguments:
    filenames             Filenames to check.

  optional arguments:
    -h, --help            show this help message and exit
    -v, --verbose         Verbose mode.
    --version             Display version information.
    --json                Print detect-secrets-hook output as JSON
    --baseline FILENAME   Explicitly ignore secrets through a baseline generated
                          by `detect-secrets scan`

  plugin options:
    Configure settings for each secret scanning ruleset. By default, all
    plugins are enabled unless explicitly disabled.

    --list-all-plugins    Lists all plugins that will be used for the scan.
    -p PLUGIN, --plugin PLUGIN
                          Specify path to custom secret detector plugin.
    --base64-limit [BASE64_LIMIT]
                          Sets the entropy limit for high entropy strings. Value
                          must be between 0.0 and 8.0, defaults to 4.5.
    --hex-limit [HEX_LIMIT]
                          Sets the entropy limit for high entropy strings. Value
                          must be between 0.0 and 8.0, defaults to 3.0.
    --disable-plugin DISABLE_PLUGIN
                          Plugin class names to disable. e.g.
                          Base64HighEntropyString

  filter options:
    Configure settings for filtering out secrets after they are flagged by the
    engine.

    -n, --no-verify       Disables additional verification of secrets via
                          network call.
    --only-verified       Only flags secrets that can be verified.
    --exclude-lines EXCLUDE_LINES
                          If lines match this regex, it will be ignored.
    --exclude-files EXCLUDE_FILES
                          If filenames match this regex, it will be ignored.
    --exclude-secrets EXCLUDE_SECRETS
                          If secrets match this regex, it will be ignored.
    -f FILTER, --filter FILTER
                          Specify path to custom filter. May be a python module
                          path (e.g.
                          detect_secrets.filters.common.is_invalid_file) or a
                          local file path (e.g.
                          file://path/to/file.py::function_name).
    --disable-filter DISABLE_FILTER
                          Specify filter to disable. e.g.
                          detect_secrets.filters.common.is_invalid_file
  ```

  We recommend setting this up as a pre-commit hook. One way to do this is by using the
  [pre-commit](https://github.com/pre-commit/pre-commit) framework:

  ```yaml

  repos:
  -   repo: https://github.com/Yelp/detect-secrets
      rev: v1.4.0
      hooks:
      -   id: detect-secrets
          args: ['--baseline', '.secrets.baseline']
          exclude: package.lock.json
  ```



  There are times when we want to exclude a false positive from blocking a commit, without creating
  a baseline to do so. You can do so by adding a comment as such:

  ```python
  secret = "hunter2"      # pragma: allowlist secret
  ```

  or

  ```javascript
  //  pragma: allowlist nextline secret
  const secret = "hunter2";
  ```



  ```bash
  $ detect-secrets audit --help
  usage: detect-secrets audit [-h] [--diff] [--stats]
                        [--report] [--only-real | --only-false]
                        [--json]
                        filename [filename ...]

  Auditing a baseline allows analysts to label results, and optimize plugins for
  the highest signal-to-noise ratio for their environment.

  positional arguments:
    filename      Audit a given baseline file to distinguish the difference
                  between false and true positives.

  optional arguments:
    -h, --help    show this help message and exit
    --diff        Allows the comparison of two baseline files, in order to
                  effectively distinguish the difference between various plugin
                  configurations.
    --stats       Displays the results of an interactive auditing session which
                  have been saved to a baseline file.
    --report      Displays a report with the secrets detected

  reporting:
    Display a summary with all the findings and the made decisions. To be used with the report mode (--report).

    --only-real   Only includes real secrets in the report
    --only-false  Only includes false positives in the report

  analytics:
    Quantify the success of your plugins based on the labelled results in your
    baseline. To be used with the statistics mode (--stats).

    --json        Outputs results in a machine-readable format.
  ```



  This tool operates through a system of **plugins** and **filters**.

  - **Plugins** find secrets in code
  - **Filters** ignore false positives to increase scanning precision

  You can adjust both to suit your precision/recall needs.



  There are three different strategies we employ to try and find secrets in code:

  1. Regex-based Rules

     These are the most common type of plugin, and work well with well-structured secrets.
     These secrets can optionally be [verified](docs/plugins.md#Verified-Secrets), which increases
     scanning precision. However, solely depending on these may negatively affect the recall of your
     scan.

  2. Entropy Detector

     This searches for "secret-looking" strings through a variety of heuristic approaches. This
     is great for non-structured secrets, but may require tuning to adjust the scanning precision.

  3. Keyword Detector

     This ignores the secret value, and searches for variable names that are often associated with
     assigning secrets with hard-coded values. This is great for "non-secret-looking" strings (e.g.
     le3tc0de passwords), but may require tuning filters to adjust the scanning precision.

  Want to find a secret that we don't currently catch? You can also (easily) develop your own
  plugin, and use it with the engine! For more information, check out the
  [plugin documentation](docs/plugins.md#Using-Your-Own-Plugin).



  `detect-secrets` comes with several different in-built filters that may suit your needs.



  Sometimes, you want to be able to globally allow certain lines in your scan, if they match a
  specific pattern. You can specify a regex rule as such:

  ```bash
  $ detect-secrets scan --exclude-lines 'password = (blah|fake)'
  ```

  Or you can specify multiple regex rules as such:

  ```bash
  $ detect-secrets scan --exclude-lines 'password = blah' --exclude-lines 'password = fake'
  ```



  Sometimes, you want to be able to ignore certain files in your scan. You can specify a regex
  pattern to do so, and if the filename meets this regex pattern, it will not be scanned:

  ```bash
  $ detect-secrets scan --exclude-files '.*\.signature$'
  ```

  Or you can specify multiple regex patterns as such:

  ```bash
  $ detect-secrets scan --exclude-files '.*\.signature$' --exclude-files '.*/i18n/.*'
  ```



  Sometimes, you want to be able to ignore certain secret values in your scan. You can specify
  a regex rule as such:

  ```bash
  $ detect-secrets scan --exclude-secrets '(fakesecret|\${.*})'
  ```

  Or you can specify multiple regex rules as such:

  ```bash
  $ detect-secrets scan --exclude-secrets 'fakesecret' --exclude-secrets '\${.*})'
  ```



  Sometimes, you want to apply an exclusion to a specific line, rather than globally excluding it.
  You can do so with inline allowlisting as such:

  ```python
  API_KEY = 'this-will-ordinarily-be-detected-by-a-plugin'    # pragma: allowlist secret
  ```

  These comments are supported in multiple languages. e.g.

  ```java
  const GoogleCredentialPassword = "something-secret-here";     //  pragma: allowlist secret
  ```

  You can also use:

  ```python

  API_KEY = 'WillAlsoBeIgnored'
  ```

  This may be a convenient way for you to ignore secrets, without needing to regenerate the entire
  baseline again. If you need to explicitly search for these allowlisted secrets, you can also do:

  ```bash
  $ detect-secrets scan --only-allowlisted
  ```

  Want to write more custom logic to filter out false positives? Check out how to do this in
  our [filters documentation](docs/filters.md#Using-Your-Own-Filters).





  The `--exclude-secrets` flag allows you to specify regex rules to exclude secret values. However,
  if you want to specify a large list of words instead, you can use the `--word-list` flag.

  To use this feature, be sure to install the `pyahocorasick` package, or simply use:

  ```bash
  $ pip install detect-secrets[word_list]
  ```

  Then, you can use it as such:

  ```bash
  $ cat wordlist.txt
  not-a-real-secret
  $ cat sample.ini
  password = not-a-real-secret


  $ detect-secrets scan sample.ini


  $ detect-secrets scan --word-list wordlist.txt
  ```



  The Gibberish Detector is a simple ML model, that attempts to determine whether a secret value
  is actually gibberish, with the assumption that **real** secret values are not word-like.

  To use this feature, be sure to install the `gibberish-detector` package, or use:

  ```bash
  $ pip install detect-secrets[gibberish]
  ```

  Check out the [gibberish-detector](https://github.com/domanchi/gibberish-detector) package for
  more information on how to train the model. A pre-trained model (seeded by processing RFCs) will
  be included for easy use.

  You can also specify your own model as such:

  ```bash
  $ detect-secrets scan --gibberish-model custom.model
  ```

  This is not a default plugin, given that this will ignore secrets such as `password`.



  This is not meant to be a sure-fire solution to prevent secrets from entering the codebase. Only
  proper developer education can truly do that. This pre-commit hook merely implements several
  heuristics to try and prevent obvious cases of committing secrets.

  **Things That Won't Be Prevented:**

  - Multi-line secrets
  - Default passwords that don't trigger the `KeywordDetector` (e.g. `login = "hunter2"`)





  - **"Did not detect git repository." warning encountered, even though I'm in a git repo.**

    Check to see whether your `git` version is >= 1.8.5. If not, please upgrade it then try again.
    [More details here](https://github.com/Yelp/detect-secrets/issues/220).



  - **`detect-secrets audit` displays "Not a valid baseline file!" after creating baseline.**

    Ensure the file encoding of your baseline file is UTF-8.
    [More details here](https://github.com/Yelp/detect-secrets/issues/272#issuecomment-619187136).


pkgId: f29aec2b9eefd54788c221a9a277cfca8602f3f73c74692417e6447b5fbd64b1
name: python-bc-jsonpath-ng
arch: src
version: 1.6.1
epoch: 0
release: 1
url: https://github.com/bridgecrewio/jsonpath-ng
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bc-jsonpath-ng-1.6.1-1.src.rpm
checksum_type: sha256
summary:
  A final implementation of JSONPath for Python that aims to be standard compliant, including arithmetic and binary comparison operators and providing clear AST for metaprogramming.

description:
  A final implementation of JSONPath for Python that aims to be standard compliant, including arithmetic
  and binary comparison operators, as defined in the original `JSONPath proposal`_.
  This packages merges both `jsonpath-rw`_ and `jsonpath-rw-ext`_ and
  provides several AST API enhancements, such as the ability to update or removes nodes in the tree.


pkgId: 6d0b89e10818dc7911835f920ffb8dcd3e5039f3ef6c0eddd7df042f72acf67c
name: python-bc-python-hcl2
arch: src
version: 0.4.2
epoch: 0
release: 1
summary: A parser for HCL2
url: https://github.com/bridgecrewio/python-hcl2
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bc-python-hcl2-0.4.2-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/bridgecrewio/python-hcl2/workflows/build/badge.svg)](https://github.com/bridgecrewio/python-hcl2/actions)
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)
  [![PyPI](https://img.shields.io/pypi/v/bc-python-hcl2.svg)](https://pypi.org/project/bc-python-hcl2/)
  [![Python Versions](https://img.shields.io/pypi/pyversions/bc-python-hcl2.svg)](https://pypi.python.org/pypi/bc-python-hcl2)
  [![Downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&url=https%3A%2F%2Fpypistats.org%2Fapi%2Fpackages%2Fbc-python-hcl2%2Frecent&query=data.last_month&colorB=brightgreen&suffix=%2FMonth)](https://pypistats.org/packages/bc-python-hcl2)



  This is a fork of the [Python HCL2](https://github.com/amplify-education/python-hcl2) repo by Amplify and is
  officially supported by Bridgecrew. We contributed as much as possible to the upstream project, but the two projects
  are now deviating in a way that pushing new changes upstream doesn't make sense anymore.



  A parser for [HCL2](https://github.com/hashicorp/hcl/blob/hcl2/hclsyntax/spec.md) written in Python using
  [Lark](https://github.com/lark-parser/lark). This parser only supports HCL2 and isn't backwards compatible
  with HCL v1. It can be used to parse any HCL2 config file such as Terraform.



  Amplify builds innovative and compelling digital educational products that empower teachers and students across the
  country. We have a long history as the leading innovator in K-12 education - and have been described as the best tech
  company in education and the best education company in tech. While others try to shrink the learning experience into
  the technology, we use technology to expand what is possible in real classrooms with real students and teachers.

  Learn more at <https://www.amplify.com>




  python-hcl2 requires Python 3.7 or higher to run.



  This package can be installed using `pip`

  ```sh
  pip install bc-python-hcl2
  ```


  ```python
  import hcl2
  with open('foo.tf', 'r') as file:
      dict = hcl2.load(file)
  ```



  For development, `tox>=2.9.1` is recommended.



  python-hcl2 uses `tox`. You will need to install tox with `pip install tox`.
  Running `tox` will automatically execute linters as well as the unit tests.

  You can also run them individually with the `-e` argument.

  For example, `tox -e py37-unit` will run the unit tests for python 3.7

  To see all the available options, run `tox -l`.


  If you have any security issue to report, contact project maintainers privately.
  You can reach us at <mailto:github@amplify.com>


  We welcome pull requests! For your pull request to be accepted smoothly, we suggest that you:
   1. For any sizable change, first open a GitHub issue to discuss your idea.
   2. Create a pull request.  Explain why you want to make the change and what it’s for.

  We’ll try to answer any PR’s promptly.


pkgId: e9e085cc4dcc33cdaa4013dc7522268bd02d0eb9996f66e6c1bdfbebe5482bf2
name: python-bc125py
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: A Python-based interface for the Uniden BC125AT
url: https://github.com/itsmaxymoo/bc125py
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bc125py-1.0.0-1.src.rpm
checksum_type: sha256
description:
  A Python-based interface for the Uniden BC125AT radio scanner.

  This project aims to be a Linux replacement for the Windows-only
  Uniden software for the BC125AT. Presently, BC125Py only has a
  command line interface, but couples well with Libreoffice Calc/MS Excel. Rest assured, the
  CLI is not hard to use at all! View the [changelog here](CHANGELOG.md).




  `sudo pip install bc125py`

  *It is recommended to install bc125py as root.*




  Most commands **must be ran as root**.

  Plug the BC125AT into your computer, and power the device on.



  `sudo bc125py import --csv channels.csv`

  Then, edit the CSV file in a spreadsheet editor!

  **Note:** Depending on your CSV editor, the channels may be offset by 1 or 2
  **Note:** All 500 channels are together. Bank 1 starts at 1 or 2, bank 2 starts at 51 or 52, etc...
  **Note:** omitting the `--csv` flag will import all channels
  **and** settings, and use the **json** file format.



  `sudo bc125py export --csv channels.csv`

  **Note:** omitting the `--csv` flag will export all channels
  **and** settings, and use the **json** file format.



  `bc125py validate scanner.json` or `bc125py validate --csv scanner.csv`



  `sudo bc125py shell`

  The shell allows you to send commands directly to the device.
  The `shell` subcommand accepts a script filename as an optional parameter.
  Specifying `-` as the input script will tell the shell to read from stdin.

  The shell remembers its history by default. This can be cleared by deleting
  `~/.bc125py_history` (but usually for the root user), or by running the shell
  subcommand with the `-c` or `--clear-history` flags.



  `sudo bc125py wipe`

  This will **erase all channels** and reset all settings.



  `sudo bc125py unlock`



  The following are top level flags, to be use after the
  `bc125py` but before the subcommand.

  | Flag | Usage |
  | --- | --- |
  | `-v` | Enable debug messages |
  | `-l`, `--log` LOG | Additionally print all debug messages to LOG_FILE |
  | `-p`, `--port` PORT | Force BC125Py to use port (device file) PORT |
  | `--legacy-detect` | Use the legacy automatic port detection method. Try this if BC125Py does not initially detect your scanner. This may produce duplicate results |



  By default, import and export will process all of the scanner's channels
  and settings, and work with json files. The `--csv` flag tells these
  command to process channels only, and work with csv files.



  The `shell` subcommand accepts an optional parameter for an input file,
  to be processed as a script. Run `help` once inside the shell to learn
  more. The recommended extension for these scripts is `.125at`; see
  the [docs directory](docs/) for examples.



  As of version 0.10.0, bc125py supports human-friendly CTCSS/DCS tones.
  Your old save files will still work. To view a list of possible tone values,
  run `bc125py --help-tones`



  TLP, a power management tool on some laptops,
  may interfere with the operation of BC125Py.
  To use BC125Py on a TLP-enabled laptop, follow
  [this guide](https://askubuntu.com/questions/1239176/how-to-disable-tlp)
  to disable it. This is easily reversible afterwards.
  If you are aware of a better way to work around TLP, please fork and submit a PR!



  The import, export, and shell subcommands may accept a single dash
  ( `-` ) as a filename to use stdin/stdout. In this mode, the `import`
  subcommand will write to stdout. `export` and `shell` will read from stdin.




  * The module `bc125py`, excluding `app`, should only contain library (non-executable) code.
  * `sdo.py` shall be for all scanner-data abstraction classes.
  * The `app` module shall be for all executable code.
  * `app/cli.py` shall be the CLI portion of the program.
  * `app/core.py` shall be all common functions for the executable portion of the program, both CLI and GUI.
  * `app/log.py` shall be the logger. **Use the logger wherever possible!**

  The 'main' branch shall be the most up-to-date version of the project. Once the main branch reaches
  stability, the version number will be incremented, a release will be generated, and a 'release-x.x.x'
  branch will be created to preserve the repository at its state.


pkgId: 66e4f7c9f777b9ca5073f35ca7d670d4d19df237a3296919b73492f74ac3495e
name: python-bcbio-nextgen
arch: src
version: 1.1.5
epoch: 0
release: 1
summary: Best-practice pipelines for fully automated high throughput sequencing analysis
url: https://github.com/bcbio/bcbio-nextgen
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcbio-nextgen-1.1.5-1.src.rpm
checksum_type: sha256
description:
  - Community developed: We welcome contributors with the goal of
    overcoming the biological, algorithmic and computational challenges
    that face individual developers working on complex pipelines in
    quickly changing research areas. See our `users page`_ for examples
    of bcbio-nextgen deployments, and the `developer documentation`_ for
    tips on contributing.
  - Installation: `A single installer script`_ prepares all
    third party software, data libraries and system configuration files.
  - `Automated validation`_: Compare variant calls against common reference
    materials or sample specific SNP arrays to ensure call correctness.
    Incorporation of multiple approaches for alignment, preparation and
    variant calling enable unbiased comparisons of algorithms.
  - Distributed: Focus on `parallel analysis and scaling`_ to handle
    large population studies and whole genome analysis. Runs on single
    multicore computers, in compute clusters using `IPython parallel`_,
    or on the Amazon cloud. See the `parallel documentation`_ for full
    details.
  - Multiple analysis algorithms: bcbio-nextgen provides configurable
    `variant calling, RNA-seq and small RNA pipelines`_.


pkgId: c15f437293d8a61aba6d329e4e5ab204c437b04e2b1f752a2048d60af2b05654
name: python-bccd
arch: src
version: 2.9.3
epoch: 0
release: 1
summary: B-NMR/B-NQR Beamspot Image Viewer and Analysis
url: https://github.com/dfujim/bccd
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bccd-2.9.3-1.src.rpm
checksum_type: sha256
description:
  * Install with `pip3 install --user bccd` from [pypi](https://pypi.org/project/bccd/).
  * Run with `bccd`.

  Note that `bccd` uses `rsync` to copy all files from the machines which operate the cameras. These machines are password protected and the passwords must be entered on every use, unless you give your public key to these devices. To do that, do:

  * Create a public key if you don't have one already: `ssh-keygen -t rsa`. On prompt enter no password.
  * Copy the key to the server using the proper username and password: `ssh-copy-id user@machine.domain`

  On first usage, `bccd` will need to transfer all the files from these machines. This may take some time, please be patient. On subsequent usages, `bccd` will only update its list of files so the process will be much faster. These files are stored in `$HOME/.bccd`.



  Constructor:

  ```python
  fits(filename,rescale_pixels=True)
  ```

  Functions:

  ```python


  detect_lines(sigma=1,min_length=50,min_gap=3,theta=None,nlines=np.inf,draw=True)
  detect_hlines(sigma=1,min_length=50,min_gap=3,nlines=np.inf,draw=True,**kwargs)
  detect_circles(rad_range,nlines=1,sigma=1,draw=True)


  draw(black=0,alpha=1,cmap='Greys',imap=True)
  draw_2Dfit(fn,*pars,levels=10,cmap='jet')
  draw_contour(nlevels=5,alpha=1,cmap='Greys',imap=True)
  draw_edges(sigma=1,alpha=1,cmap='Greys',imap=True)
  draw_sobel(alpha=1,cmap='Greys',imap=False)


  fit2D(function,**fitargs)
  fit_gaussian2D(draw=True, get_p0_from_center=False, **fitargs)


  get_center(draw=True)
  get_cm(draw=True)
  get_gaussian2D_overlap(ylo,yhi,xlo,xhi)


  read(filename,rescale_pixels=True)
  set_black(black)
  set_mask(mask)
  ```

  Data fields:

  ```
  black:          float, pixel value corresponding to black (zero)
  data:           2D numpy array, pixel values
  data_original:  numpy array, pixel values
  header:         dict, header information

  mask:           (x,y,r) specifying circle to mask on

  result_center:      (par,names) fitting results
  result_cm:          (par,names) center of mass results
  result_fit2D:       (par,cov) fitting results
  result_gaussian2D:  (par,cov,names) fitting results
  result_gaussian2D_overlap: float, overlap
  ```

  Some useful colourmap names:

  ```
      Greys
      Purples
      Yellows
      Blues
      Oranges
      Reds
      Greens
  ```

  Parameter descriptions

  ```
  alpha:          float, image transparency. Range: [0,1].
  black:          float, value to set to black, all pixels of lower value raised to this level. Use to
                  clean up noise.

  cmap:           str, color map to color the image. Ex: "Reds", "Greens", etc.
  draw:           bool, if true, draw output
  filename:       str, path to .fits file
  fitargs:        **dict, arguments passed to curve_fit
  fn:             function handle, function to draw
  imap:           bool, if True, invert color map colours
  levels:         int, number of contour levels to draw
  kwargs:         **dict, unused
  mask:           tuple, exclude all pixels outside of circle from draw or calculation. (x0,y0,r)
  min_length:     float, minimum length of lines to find, in pixels
  min_gap:        float, maximum acceptable distance between line pixels which do not signify breaking
                  the line
  nlines:         int, number of shapes to find
  pars:           *tuple, parameters passed to fn.
  rad_range:      tuple, radius range to seach in (r_lo, r_hi)
  rescale_pixels: bool, pixels are intrinsically asymmetric. Rescale image such that the pixels are
                  square, interpolating pixel values with 3rd order spline.
  shape:          tuple, shape of the image (number of pixels x,y)
  sigma:          float, standard deviation of rolling Gaussian filter, smoothing image features.
  theta:          float, list of acceptable angles for the lines to point

  xlo:              function handle, lower integration bound [inner]
  xlhi:             function handle, upper integration bound [inner]
  ylo:              float, lower integration bound [outer]
  yhi:              float, upper integration bound [outer]
  ```





  ```python
  gaussian2D(x,y,x0,y0,sigmax,sigmay,amp,theta=0)
  ```

  Parameter descriptions

  ```
  amp:              float, unused in favour of normalized amplitude (present for ease of use)
  sx,sy:            float, standard deviation
  theta:            float, angle of rotation
  x0,y0:            float, gaussian mean location
  ```


pkgId: 3301ed39266f1def476ab5c336a6ad7700434879044666009afb3668e05880ee
name: python-bcdata
arch: src
version: 0.12.3
epoch: 0
release: 1
summary: Python tools for quick access to DataBC geo-data available via WFS
url: https://github.com/smnorris/bcdata
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcdata-0.12.3-1.src.rpm
checksum_type: sha256
description:
   whse_imagery_and_base_maps.gsr_airports_svw | 2021-02-17 11:50:34.044481-08
  ```

  Search the data listing for airports:
        $ bcdata list | grep AIRPORTS
        WHSE_IMAGERY_AND_BASE_MAPS.GSR_AIRPORTS_SVW
  Describe a dataset. Note that if we know the id of a dataset, we can use that rather than the object name:
      $ bcdata info bc-airports --indent 2
      {
        "name": "WHSE_IMAGERY_AND_BASE_MAPS.GSR_AIRPORTS_SVW",
        "count": 455,
        "schema": {
          "properties": {
            "CUSTODIAN_ORG_DESCRIPTION": "string",
            "BUSINESS_CATEGORY_CLASS": "string",
            "BUSINESS_CATEGORY_DESCRIPTION": "string",
            "OCCUPANT_TYPE_DESCRIPTION": "string",
          },
          "geometry": "GeometryCollection",
          "geometry_column": "SHAPE"
        }
      }
  The JSON output can be manipulated with [jq](https://stedolan.github.io/jq/). For example, to show only the fields available in the dataset:
      $ bcdata info bc-airports | jq '.schema'
      {
        "CUSTODIAN_ORG_DESCRIPTION": "string",
        "BUSINESS_CATEGORY_CLASS": "string",
        "BUSINESS_CATEGORY_DESCRIPTION": "string",
        "OCCUPANT_TYPE_DESCRIPTION": "string",
        etc...
      }
  Dump data to geojson ([`EPSG:4326` only](https://tools.ietf.org/html/rfc7946#section-4)):
      $ bcdata dump bc-airports > bc-airports.geojson
  Get a single feature and send it to geojsonio (requires [geojson-cli](https://github.com/mapbox/geojsonio-cli)).  Note the double quotes  required around a CQL FILTER provided to the `--query` option.
      $ bcdata dump \
        WHSE_IMAGERY_AND_BASE_MAPS.GSR_AIRPORTS_SVW \
        --query "AIRPORT_NAME='Terrace (Northwest Regional) Airport'" \
         | geojsonio
  Save a layer to a geopackage in BC Albers:
      $ bcdata cat bc-airports --dst-crs EPSG:3005 \
        | fio collect \
        | fio load -f GPKG --dst-crs EPSG:3005 airports.gpkg
  Note that this will not work if the source data has mixed geometry types.
  Load data to postgres and run a spatial query:
      $ bcdata bc2pg bc-airports \
          --db_url postgresql://postgres:postgres@localhost:5432/postgis
      $ bcdata bc2pg WHSE_LEGAL_ADMIN_BOUNDARIES.ABMS_MUNICIPALITIES_SP \
          --db_url postgresql://postgres:postgres@localhost:5432/postgis
      $ psql -c \
        "SELECT airport_name
         FROM whse_imagery_and_base_maps.gsr_airports_svw a
         INNER JOIN whse_legal_admin_boundaries.abms_municipalities_sp m
         ON ST_Intersects(a.geom, m.geom)
         WHERE admin_area_name LIKE '%Victoria%'"


pkgId: 8a08ffc3fb712f1b34b236bb476a0a274f1a13163b8683e764da77d6c0818d7e
name: python-bcf-api-xml
arch: src
version: 0.4.13
epoch: 0
release: 1
summary: Convert BCF-API to BCF-XML
url: https://github.com/bimdata/BCF-API-XML-translator
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcf-api-xml-0.4.13-1.src.rpm
checksum_type: sha256
description:
  BCF-API-XML-converter is a library to open BCFzip and get data similar to BCF API json and to save BCF API data as BCFzip files.

  ```bash
  pip install bcf-api-xml
  ```

  ```python
      from bcf_api_xml import to_zip, to_json
      file_like_bcf_zip = to_zip(topics, comments, viewpoints)
      imported_topics = to_json(file_like_bcf_zip)
  ```

  ```bash
  poetry shell
  poetry install
  pytest
  pre-commit install
  ```

  ```bash
  poetry publish --build --username= --password=
  ```


pkgId: c97544b47277ac6683dac7f6cf1993dc113630df67fc50bd9deff9bcf50f3f23
name: python-bcg
arch: src
version: 1.17.0
epoch: 0
release: 1
summary: BigClown USB Gateway
url: https://github.com/bigclownlabs/bch-usb-gateway
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcg-1.17.0-1.src.rpm
checksum_type: sha256
description:
  Made with &#x2764;&nbsp; by [**HARDWARIO s.r.o.**](https://www.hardwario.com/) in the heart of Europe.


pkgId: 0b5572e7a590df87034f41c1b554b135a7a058d1ad61f7c4c56c32c92a6c1f96
name: python-bchlib
arch: src
version: 2.1.3
epoch: 0
release: 1
summary: A python wrapper module for the Linux kernel BCH library.
url: https://github.com/jkent/python-bchlib
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bchlib-2.1.3-1.src.rpm
checksum_type: sha256
description:
  This is a python module for encoding, decoding, and correcting data using [BCH codes](https://en.wikipedia.org/wiki/BCH_code).

    Python 3.6 or greater required.

      $ pip install bchlib

    On Linux, you will need python-dev or equivalent package.  Windows, you need Microsoft Visual C++.  I've tested this manually using [Visual Studio 2015](https://stackoverflow.com/a/44290942/6844002).
      $ pip install .

    See Python's built-in help `import bchlib; help(bchlib)` and the module's [tests](tests) for usage examples.


pkgId: d3eda2550b20830f5549477ff8d362090457830191a38e766842466446e3288d
name: python-bci-essentials
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: Python backend for bci-essentials
url: https://pypi.org/project/bci-essentials/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bci-essentials-0.2.2-1.src.rpm
checksum_type: sha256
description:
  This repository contains python modules and scripts for the processing of EEG-based BCI.
  These modules are specifically designed to be equivalent whether run offline or online.



  The front end for this package can be found in [bci-essentials-unity](https://www.github.com/kirtonBCIlab/bci-essentials-unity)


  - **[Wiki](https://github.com/kirtonBCIlab/bci-essentials-python/wiki)** – More detailed installation instructions and tutorials.
  - **[API documentation](https://kirtonbcilab.github.io/APIdocs-for-bci-essentials-python)**


  BCI Essentials requires Python 3.9 or later.  To install for Windows, MacOS or Linux:

  ```
  pip install bci-essentials
  ```

  On some systems, it may be necessary to install [liblsl](https://github.com/sccn/liblsl).  Alternatively, use the Conda [environment](https://github.com/kirtonBCIlab/bci-essentials-python/blob/main/environment.yml) to set up dependencies that are not provided by pip:

  ```
  conda env create -f ./environment.yml
  conda activate bci
  ```


  Offline processing can be done by running the corresponding offline test script (ie. mi_offline_test.py, p300_offline_test.py, etc.)
  Change the filename in the script to point to the data you want to process.
  ```
  python examples/mi_offline_test.py
  ```


  Online processing requires an EEG stream and a marker stream. These can both be simulated using eeg_lsl_sim.py and marker_lsl_sim.py.
  Real EEG streams come from a headset connected over LSL. Real marker streams come from the application in the Unity frontend.
  Once these streams are running, simply begin the backend processing script ( ie. mi_unity_backend.py, p300_unity_bakend.py, etc.)
  It is recommended to save the EEG, marker, and response (created by the backend processing script) streams using
  [Lab Recorder](https://github.com/labstreaminglayer/App-LabRecorder) for later offline processing.
  ```
  python examples/mi_unity_backend.py
  ```



  The main packge containing modules for BCI processing.
  - bci_controller.py         -   module for reading online/offline data, windowing, processing, and classifying EEG signals
  - classification.py   -   module containing relevant classifiers for bci_controller, classifiers can be extended to meet individual needs
  - signal_processing.py-   module containing functions for the processing of bci_controller
  - visuals.py          -   module for visualizing EEG data


  Example scripts and data.
  - data                        -   directory containing example data for P300, MI, and SSVEP
  - eeg_lsl_sim.py              -   creates a stream of mock EEG data from an xdf file
  - marker_lsl_sim.py           -   creates a stream of mock marker data from an xdf file
  - mi_offline_test.py          -   runs offline MI processing on previously collected EEG and marker streams
  - mi_unity_backend.py         -   runs online MI processing on live EEG and marker streams
  - p300_offline_test.py        -   runs offline P300 processing on previously collected EEG and marker streams
  - p300_unity_backend.py       -   runs online P300 processing on live EEG and marker streams
  - ssvep_offline_test.py       -   runs offline SSVEP processing on previously collected EEG and marker streams
  - ssvep_unity_backend_tf.py   -   runs online SSVEP processing on live EEG and marker streams, does not require training
  - ssvep_unity_backend.py      -   runs online SSVEP processing on live EEG and marker streams
  - switch_offline_test.py      -   runs offline switch state processing on previously collected EEG and marker streams
  - switch_unity_backend.py     -   runs online switch state processing on live EEG and marker streams


pkgId: f768019163030f2894390fce96d1fcf61fd726f751605a93bff5b3198792b1a9
name: python-bcitflex
arch: src
version: 3.11.0
epoch: 0
release: 1
summary: Browse BCIT Flex course offerings.
url: https://pypi.org/project/bcitflex/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcitflex-3.11.0-1.src.rpm
checksum_type: sha256
description:
  [![ci](https://github.com/jonbiemond/BCIT-Flex/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jonbiemond/BCIT-Flex/actions/workflows/ci.yml)

  [www.bcitflex.tech](http://www.bcitflex.tech)

  A website for easily viewing BCIT course offerings.
  Features a course filter to aid in course selection.

  Please feel free to report any issues, bugs or suggestions. Pull requests are welcome.



  `pip install bcitflex`


  * A [PostgreSQL instance](https://www.postgresql.org/download/) is required for the database.
  * Dependency `psycopg2` requires `libpq-dev` to be installed for Ubuntu/Debian systems.
  ```bash
  sudo apt install libpq-dev python3-dev
  ```
  For more details see the [pycopg2 documentation](https://www.psycopg.org/docs/install.html#install-from-source) and [StackOverflow](https://stackoverflow.com/questions/5420789/how-to-install-psycopg2-with-pip-on-python).



  PostgreSQL is used as the DBMS.
  To create and initialize the database:

  1. Create a database using the cli command. Pass `--help` for more information.
  ```bash
  flask --app bcitflex create-db
  ```
  2. Build schema using alembic:
  ```bash
  flask --app bcitflex upgrade-db
  ```
  3. Populate the subject table with the list of subjects to scrape courses for:
  ```bash
  flask --app bcitflex load-subjects
  ```
  By default, subjects COMP, MATH, COMM AND BLAW are loaded. To load all subjects pass the `--all-subjects` flag.



  To run the webscraper and populate the database with the latest course offerings:
  ```bash
  flask --app bcitflex load-db
  ```

  To run the dev webserver:
  ```bash
  flask --app bcitflex run
  ```



  - Filter by prerequisites
  - ~~Individual Course Offerings~~
  - ~~Rate My Professors~~
  - ~~Web app~~
  - ~~GUI~~
  - Return RMP rating
  - Indication of data freshness
  - Program information
  - User relevant course view
  - User course wishlist
  - User course schedule planner



  - Sam - [0x53616D75656C](https://github.com/0x53616D75656C)
  - Jonathan - [jonbiemond](https://github.com/jonbiemond)


pkgId: 028e55fa8927f1f6a6b6dcdfa7ddba7e7e2bee839be23881e217f074a66f243a
name: python-bcitoolbox
arch: src
version: 0.1.0.3
epoch: 0
release: 1
summary: A zero-programming package for Bayesian causal inference model
url: https://pypi.org/project/bcitoolbox/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcitoolbox-0.1.0.3-1.src.rpm
checksum_type: sha256
description:
  BCI Toolbox is a Python implementation of the hierarchical Bayesian Causal Inference (BCI) model for multisensory research. BCI model is a statistical framework for understanding the causal relationships between sensory inputs and prior expectations of a common cause, which can account for human perception in a number of tasks, including temporal numerosity judgment (Shams et al., 2005; Wozny et al., 2008), spatial localization judgment (Körding et al., 2007; Wozny & Shams, 2011), size-weight illusion paradigm (Peters et al., 2016), rubber-hand illusion paradigm (Chancel et al., 2022; Chancel & Ehrsson, 2023).


pkgId: 67941da7da4700b20e258cb09e326910a8cbd3c690d7abf09bc25b014439c158
name: python-bcmc
arch: src
version: 0.1.0.post1
epoch: 0
release: 1
summary: a CLI-centric broadcast and multicast validation tool
url: https://github.com/joshschmelzle/bcmc
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcmc-0.1.0.post1-1.src.rpm
checksum_type: sha256
description:
  ```text
   _
  | |__   ___ _ __ ___   ___   _ __  _   _
  | '_ \ / __| '_ ` _ \ / __| | '_ \| | | |
  | |_) | (__| | | | | | (__ _| |_) | |_| |
  |_.__/ \___|_| |_| |_|\___(_) .__/ \__, |
                              |_|    |___/
  ```

  `bcmc` is a CLI-centric IP broadcast and multicast tool built with Python. it is a testing tool for generating and validating broadcast or multicast traffic.

  `bcmc` can be run as a server to generate broadcast or multicast traffic or `bcmc` can be run as a client to receive broadcast or multicast traffic. it is a CLI-based client/server tool inspired by iperf.

  `bcmc` is developed by Josh Schmelzle and Kevin L. Marshall and is released under a three-clause BSD license.



  Existing tools such as Multicast Hammer are platform specific and may have unsupported system dependencies on modern OSes. `bcmc` aims to be a free cross-platform tool that can be used from *unix or Windows. While `bcmc` aims to function cross-platform, please note some optional features may not work on certain OSes.



  `bcmc` is a client/server tool which functions similar to iperf. `bcmc` can be used to test and validate broadcast or multicast on 802.11 or 802.3 networks.

  steps:

  * You will need two hosts
  * Place both hosts on the target test network
  * Use one host to run `bcmc` in client mode (receive)
  * Use the other host to run `bcmc` in server mode (transmit)



  In broadcast mode, the default behavior for `bcmc` is to send IP layer UDP packets to 255.255.255.255.



  In multicast mode, the default behavior for `bcmc` is to send IP layer UDP packets to 239.0.0.2 as the multicast group address.



  `bcmc` can be run as client or server.



  `bcmc` can generate broadcast or multicast IP packets.



  client usage:

  ```bash
  bcmc -c -bc
  ```

  server usage:

  ```bash
  bcmc -s -bc
  ```



  client usage:

  ```bash
  bcmc -c -mc
  ```

  server usage:

  ```bash
  bcmc -s -mc
  ```



  * to understand or "try out" the behavior of `bcmc`, you can also use `bcmc` with two different terminals on the same host.
  * in one terminal, run `bcmc` in client mode
  * in the other, run `bcmc` in server mode
  * you should see incrementing messages from `bcmc` running in server mode in the terminal running `bcmc` as client mode.



  On Windows, `bcmc` server (`-s`) mode will default to the interface with the lowest metric. If you are having issues where client (`-c`) mode is not receiving messages from server (`-s`) mode, investigate the metric by running `route PRINT` from conhost (cmd.exe) or PowerShell.



  ```bash
  usage: bcmc [-s|-c] [-bc|-mc] [options]
         bcmc [-h|--help] [-v|--version]

  options:
    -h, --help            show this help message and exit
    -p 2002, --port 2002  port to listen on/connect to
    -b <host>, --bind <host>
                          bind to the interface associated with provided <host> address (experimental)
    --debug               increase output for debugging purposes
    -c, --client          run in client mode
    -s, --server          run in client mode
    -bc, --broadcast      set traffic type to broadcast
    -mc, --multicast      set traffic type to multicast
    --group 239.0.0.2     multicast group address (239.0.0.2 by default)
    -i 1, --interval 1    interval to send multicast packets
    --ttl 3               set the hop restriction in network for multicast server
    --dscp 46             set the Differentiated Service Code Point value applied to packets sent in server mode
    --padding 0           number of additional null bytes per payload which is sent in server mode
    --payload 'string'    add an arbitrary payload which is sent in server mode
  ```


pkgId: 6c803d042e2f2c499860315a28869e08f22b2bce7b3923939dcb86babcfb50e8
name: python-bcolors
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: A module for coloring print statement.
url: https://github.com/yks0000/bcolors
rpm_license: GNU General Public License v3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcolors-1.0.4-1.src.rpm
checksum_type: sha256
description:
  Setting Text ForeGround Color. This can be used with Print Statement.



  ```bash
  pip install bcolors
  ```



  ```python
  import bcolors as b
  print(b.OK + "Color Statement" + b.END)
  ```


pkgId: 52454b7224f319d9421980076811868167d39357f41bb8782f0470568c2d6a36
name: python-bcompiler
arch: src
version: 1.3.23
epoch: 0
release: 1
summary: Program to migrate data for DfT BICC reporting process.
url: https://bitbucket.org/mrlemon/bcompiler
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcompiler-1.3.23-1.src.rpm
checksum_type: sha256
description:
  * Ensure Python 3.6.2 or later is installed on your system.
  * Ensure git is installed on your system.
  * ``pip install bcompiler``
  * ``bcompiler-init``
  * ``bcompiler --help``


pkgId: 23f80205238d0a4954d257b018792eacec9a274e7b24560346ef2d9c1b826bbf
name: python-bcompiler-engine
arch: src
version: 1.1.7
epoch: 0
release: 1
summary: Library for parsing spreadsheets using datamaps
url: https://github.com/hammerheadlemon/bcompiler-engine
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcompiler-engine-1.1.7-1.src.rpm
checksum_type: sha256
description:
  ![Tests](https://github.com/hammerheadlemon/bcompiler-engine/workflows/Tests/badge.svg?branch=master)
  [![Coverage Status](https://coveralls.io/repos/github/yulqen/bcompiler-engine/badge.svg?branch=typechecking)](https://coveralls.io/github/yulqen/bcompiler-engine?branch=typechecking)

  A new, faster, more efficient, more modular back end for
  [Datamaps](http://datamaps.twentyfoursoftware.com), and for newer tools and improved interfaces.

  A library that allows for controlled extraction and insertion of data to and
  from spreadsheets used for collecting data. Part of a more modular overall
  design, `bcompiler-engine` focuses on speed, simplicity and data validation. It
  forms the primary back-end to
  [datamaps](http://datamaps.twentyfoursoftware.com), and will
  eventually have a suitable API making it easy for anyone designing an
  application to use the datamaps philosophy - more on that coming soon.



  * Brand new code, developed with the benefit of several years and multiple projects
      of hindsight.
  * Extract data using multiple cores to do it faster.
  * Type checking and rule-setting, allowing for greater confidence in integrity of data.
  * Improved, modular design, powering *a brand new interface*, available soon.
  * Designed to be packaged for more general distribution.


pkgId: 572aa7e745fcf16ffbdf616b57d524d34e5619df5e549c67642fad6decfd39da
name: python-bcp
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: This is a python utility that allows users to import/export data to/from a database.
url: https://github.com/fivestack/bcp
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcp-0.4.0-1.src.rpm
checksum_type: sha256
description:
  This library began as a wrapper around SQL Server's BCP utility. It makes some assumptions
  about parameters to simplify the interface and allow the user to work natively in python.
  Though it currently supports MSSQL, there are plans to extend support to other database dialects.

  - Python 3.6+
  This library purposely requires no python packages outside of the standard library, beyond testing and documentation
  needs. The intention is to maintain this status. However, you will need to have the appropriate command line utilities
  installed for the specific database dialects with which you'll interact. For example, if your database is a MS SQL
  SERVER instance, you'll need BCP installed. Consult the table below for further documentation, including download files
  and instructions.
  | RDBMS         | Utility | Documentation / Installation                           |
  |:--------------|:--------|:-------------------------------------------------------|
  | MS SQL Server | BCP     | https://docs.microsoft.com/en-us/sql/tools/bcp-utility |

  This library is still in development. So you'll have to build it from
  source in the meantime. I'll soon get around to publishing it on pypi,
  in which case you'll be able to install it using `pip`
      pip install bcp

  Import data:
  ```python
  import bcp
  conn = bcp.Connection(host='HOST', driver='mssql', username='USER', password='PASSWORD')
  my_bcp = bcp.BCP(conn)
  file = bcp.DataFile(file_path='path/to/file.csv', delimiter=',')
  my_bcp.load(input_file=file, table='table_name')
  ```
  Export data:
  ```python
  import bcp
  conn = bcp.Connection(host='HOST', driver='mssql', username='USER', password='PASSWORD')
  my_bcp = bcp.BCP(conn)
  file = bcp.DataFile(file_path='path/to/file.csv', delimiter=',')
  my_bcp.dump(query='select * from sys.tables', output_file=file)
  ```

  For the full documentation, please visit: https://bcp.readthedocs.io/en/latest/


pkgId: 91ab8675f1a158b8ec901a857b485988664ad2471037cb9ca0ed05f8ffd6db01
name: python-bcp47
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Language tags made easy
url: https://github.com/highfestiva/bcp47.py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcp47-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Language tags are not your everyday ISO standard, but instead composed of an ISO-639 language code, and an ISO-3166 country/region code
  (and occationally an ISO-15924 script tag for the written language).

  The file is generated from Microsoft's seminal piece, [MS-LCID].pdf.




  ```bash
  $ pip install bcp47
  ```




  ```python
  >>> import bcp47

  >>> 'dje' in bcp47.tags and 'es-DO' in bcp47.tags
  True

  >>> [v for k,v in bcp47.languages.items() if 'English' in k]
  ['en', 'en-AS', 'en-AI', 'en-AG', 'en-AU', 'en-AT', 'en-BS', 'en-BB', 'en-BE', 'en-BZ', 'en-BM', 'en-BW', 'en-IO', ...]
  ```




  This package only lists the most common language codes. If you want a package to parse, validate and simplify full BCP47 language tags,
  have a look at [langcodes](https://github.com/LuminosoInsight/langcodes) or [langtags](https://github.com/jsommers/langtags).

  The BCP47 standard is 84 pages catering to specificity (such as `de-CH-1996` and `zh-CN-a-myext-x-private`) while this package currently
  does not. Instead a highly pragmatic approach is used (some say [overly simplified](https://github.com/highfestiva/bcp47.py/issues/2))
  where only the most common 900 or so language codes are listed, such as `fo-DK` and `iu-Cans-CA`.

  Microsoft's language codes are used to ensure some level of pragmatism, [KISS](https://en.wikipedia.org/wiki/KISS_principle). Validation you
  will have to do yourself, see above for a trivial example.

  Enjoy at the best of your ability!


pkgId: 0d19544c7f936ca0f75418a2c58f9940c8e9916f738a53e055446465f0eeb00b
name: python-bcpandas
arch: src
version: 2.6.4
epoch: 0
release: 1
url: https://github.com/yehoshuadimarsky/bcpandas
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcpandas-2.6.4-1.src.rpm
checksum_type: sha256
summary:
  High-level wrapper around BCP for high performance data transfers between pandas and SQL Server. No knowledge of BCP required!!

description:
  [![PyPI version](https://img.shields.io/pypi/v/bcpandas.svg)](https://pypi.org/project/bcpandas/)
  [![Conda-Forge version](https://img.shields.io/conda/vn/conda-forge/bcpandas.svg)](https://anaconda.org/conda-forge/bcpandas)
  [![GitHub license](https://img.shields.io/github/license/yehoshuadimarsky/bcpandas.svg)](https://github.com/yehoshuadimarsky/bcpandas/blob/master/LICENSE)
  [![CI](https://github.com/yehoshuadimarsky/bcpandas/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/yehoshuadimarsky/bcpandas/actions/workflows/ci.yml)
  [![codecov](https://codecov.io/gh/yehoshuadimarsky/bcpandas/branch/master/graph/badge.svg)](https://codecov.io/gh/yehoshuadimarsky/bcpandas)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![PyPI pyversions](https://img.shields.io/pypi/pyversions/bcpandas.svg)](https://pypi.python.org/pypi/bcpandas/)
  [![Awesome Badges](https://img.shields.io/badge/badges-awesome-green.svg)](https://github.com/Naereen/badges)
  [![Downloads](https://static.pepy.tech/personalized-badge/bcpandas?period=total&units=international_system&left_color=grey&right_color=orange&left_text=pypi%20total%20downloads)](https://pepy.tech/project/bcpandas)
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yehoshuadimarsky/bcpandas/master.svg)](https://results.pre-commit.ci/latest/github/yehoshuadimarsky/bcpandas/master)

  High-level wrapper around BCP for high performance data transfers between pandas and SQL Server. No
  knowledge of BCP required!! (pronounced _BEE-CEE-Pandas_)

  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

  - [Quickstart](#quickstart)
  - [IMPORTANT - Read vs. Write](#important---read-vs-write)
  - [Benchmarks](#benchmarks)
    - [to_sql](#to_sql)
      - [Why not just use the new pandas `method='multi'`?](#why-not-just-use-the-new-pandas-methodmulti)
    - [read_sql](#read_sql)
  - [Requirements](#requirements)
    - [Database](#database)
    - [Python User](#python-user)
  - [Installation](#installation)
  - [Usage](#usage)
    - [Credential/Connection object](#credentialconnection-object)
    - [Recommended Usage](#recommended-usage)
  - [Known Issues](#known-issues)
    - [Troubleshooting](#troubleshooting)
      - [All quote characters appear in the data](#all-quote-characters-appear-in-the-data)
      - [All delimiter characters appear in the data](#all-delimiter-characters-appear-in-the-data)
      - [Write to database fails due to spaces in columns](#write-to-database-fails-due-to-spaces-in-columns)
  - [Background](#background)
    - [Existing Solutions](#existing-solutions)
    - [Design and Scope](#design-and-scope)
  - [Testing](#testing)
    - [Testing Requirements](#testing-requirements)
    - [What Is Tested?](#what-is-tested)
    - [Testing Implementation](#testing-implementation)
  - [CI/CD](#cicd)
  - [Contributing](#contributing)
  - [GitHub Stars Trend](#github-stars-trend)

  <!-- END doctoc generated TOC please keep comment here to allow auto update -->



  ```python
  In [1]: import pandas as pd
     ...: import numpy as np
     ...:
     ...: from bcpandas import SqlCreds, to_sql

  In [2]: creds = SqlCreds(
     ...:     'my_server',
     ...:     'my_db',
     ...:     'my_username',
     ...:     'my_password'
     ...: )

  In [3]: df = pd.DataFrame(
     ...:         data=np.ndarray(shape=(10, 6), dtype=int),
     ...:         columns=[f"col_{x}" for x in range(6)]
     ...:     )

  In [4]: df
  Out[4]:
       col_0    col_1    col_2    col_3    col_4    col_5
  0  4128860  6029375  3801155  5570652  6619251  7536754
  1  4849756  7536751  4456552  7143529  7471201  7012467
  2  6029433  6881357  6881390  7274595  6553710  3342433
  3  6619228  7733358  6029427  6488162  6357104  6553710
  4  7536737  7077980  6422633  7536732  7602281  2949221
  5  6357104  7012451  6750305  7536741  7340124  7274610
  6  7340141  6226036  7274612  7077999  6881387  6029428
  7  6619243  6226041  6881378  6553710  7209065  6029415
  8  6881378  6553710  7209065  7536743  7274588  6619248
  9  6226030  7209065  6619231  6881380  7274612  3014770

  In [5]: to_sql(df, 'my_test_table', creds, index=False, if_exists='replace')

  In [6]: df2 = pd.read_sql_table(table_name='my_test_table', con=creds.engine)

  In [7]: df2
  Out[7]:
       col_0    col_1    col_2    col_3    col_4    col_5
  0  4128860  6029375  3801155  5570652  6619251  7536754
  1  4849756  7536751  4456552  7143529  7471201  7012467
  2  6029433  6881357  6881390  7274595  6553710  3342433
  3  6619228  7733358  6029427  6488162  6357104  6553710
  4  7536737  7077980  6422633  7536732  7602281  2949221
  5  6357104  7012451  6750305  7536741  7340124  7274610
  6  7340141  6226036  7274612  7077999  6881387  6029428
  7  6619243  6226041  6881378  6553710  7209065  6029415
  8  6881378  6553710  7209065  7536743  7274588  6619248
  9  6226030  7209065  6619231  6881380  7274612  3014770
  ```



  The big speedup benefit of bcpandas is in the `to_sql` function, as the benchmarks below show.
  However, the bcpandas `read_sql` function actually performs **slower** than the pandas equivalent.
  Therefore, the bcpandas `read_sql` function was deprecated in v5.0 and has now been removed in
  v6.0+. To read data **from** SQL to pandas, use the native pandas method `pd.read_sql_table` or
  `pd.read_sql_query`.



  See figures below. All code is in the `/benchmarks` directory. To run the benchmarks, from the root
  directory of this repository, run `python benchmarks/benchmark.py main --help` and fill in the
  command line options that are presented.

  Running this will output

  1. PNG image of the graph
  2. JSON file of the benchmark data
  3. JSON file with the environment details of the machine that was used to generate it



  > I didn't bother including the pandas non-`multiinsert` version here because it just takes way too
  > long

  ![to_sql benchmark graph](benchmarks/tosql_benchmark.png)



  1. Because it is still much slower
  2. Because you are forced to set the `chunksize` parameter to a very small number for it to work -
     generally a bit less then `2100/<number of columns>`. This is because SQL Server can only accept
     up to 2100 parameters in a query. See
     [here](https://stackoverflow.com/questions/50689082/to-sql-pyodbc-count-field-incorrect-or-syntax-error)
     and [here](https://github.com/mkleehammer/pyodbc/issues/217) for more discussion on this, and
     the recommendation to use a bulk insert tool such as BCP. It seems that SQL Server simply didn't
     design the regular `INSERT` statement to support huge amounts of data.



  As you can see, pandas native clearly wins here

  ![read_sql benchmark graph](benchmarks/readsql_benchmark.png)





  Any version of Microsoft SQL Server. Can be installed on-prem, in the cloud, on a VM, or one of the
  Azure versions.



  - [BCP](https://docs.microsoft.com/en-us/sql/tools/bcp-utility) Utility
  - Microsoft ODBC Driver **11, 13, 13.1, or 17** for SQL Server.
    ([Microsoft Docs](https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server))
    See the
    [pyodbc docs](https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-Windows)
    for more on different driver versions.
  - Python >= 3.8
  - `pandas` >= 1.5
  - `sqlalchemy` >= 1.4
  - `pyodbc` as the
    [supported DBAPI](https://docs.sqlalchemy.org/en/13/dialects/mssql.html#module-sqlalchemy.dialects.mssql.pyodbc)



  | Source |                 Command                 |
  | :----: | :-------------------------------------: |
  |  PyPI  |         `pip install bcpandas`          |
  | Conda  | `conda install -c conda-forge bcpandas` |



  1. Create creds (see next section)
  2. Replace any `df.to_sql(...)` in your code with `bcpandas.to_sql(df, ...)`

  That's it!



  Bcpandas requires a `bcpandas.SqlCreds` object in order to use it, and also a `sqlalchemy.Engine`.
  The user has 2 options when constructing it.

  1. Create the bcpandas `SqlCreds` object with just the minimum attributes needed (server, database,
     username, password), and bcpandas will create a full `Engine` object from this. It will use
     `pyodbc`, `sqlalchemy`, and the Microsoft ODBC Driver for SQL Server, and will store it in the
     `.engine` attribute.

     ```python
     In [1]: from bcpandas import SqlCreds

     In [2]: creds = SqlCreds('my_server', 'my_db', 'my_username', 'my_password')

     In [3]: creds.engine
     Out[3]: Engine(mssql+pyodbc:///?odbc_connect=Driver={ODBC Driver 17 for SQL Server};Server=tcp:my_server,1433;Database=my_db;UID=my_username;PWD=my_password)

     ```

  2. Pass a full `Engine` object to the bcpandas `SqlCreds` object, and bcpandas will attempt to
     parse out the server, database, username, and password to pass to the command line utilities. If
     a DSN is used, this will fail.

     (continuing example above)

     ```python
     In [4]: creds2 = SqlCreds.from_engine(creds.engine)

     In [5]: creds2.engine
     Out[5]: Engine(mssql+pyodbc:///?odbc_connect=Driver={ODBC Driver 17 for SQL Server};Server=tcp:my_server,1433;Database=my_db;UID=my_username;PWD=my_password)

     In [6]: creds2
     Out[6]: SqlCreds(server='my_server', database='my_db', username='my_username', with_krb_auth=False, engine=Engine(mssql+pyodbc:///?odbc_connect=Driver={ODBC Driver 17 for SQL Server};Server=tcp:my_server,1433;Database=my_db;UID=my_username;PWD=my_password), password=[REDACTED])
     ```



  | Feature                                           |   Pandas native    |      BCPandas      |
  | ------------------------------------------------- | :----------------: | :----------------: |
  | Super speed                                       |        :x:         | :white_check_mark: |
  | Good for simple data types like numbers and dates |        :x:         | :white_check_mark: |
  | Handle messy string data                          | :white_check_mark: |        :x:         |

  > built with the help of https://www.tablesgenerator.com/markdown_tables# and
  > https://gist.github.com/rxaviers/7360908



  Here are some caveats and limitations of bcpandas.

  - Bcpandas has been tested with all ASCII characters 32-127. Unicode characters beyond that range
    have not been tested.
  - An empty string (`""`) in the dataframe becomes `NULL` in the SQL database instead of remaining
    an empty string.
  - Because bcpandas first outputs to CSV, it needs to use several specific characters to create the
    CSV, including a _delimiter_ and a _quote character_. Bcpandas attempts to use characters that
    are not present in the dataframe for this, going through the possilbe delimiters and quote
    characters specified in `constants.py`. If all possible characters are present in the dataframe
    and bcpandas cannot find both a delimiter and quote character to use, it will throw an error.
    - The BCP utility does **not** ignore delimiter characters when surrounded by quotes, unlike
      CSVs - see
      [here](https://docs.microsoft.com/en-us/sql/relational-databases/import-export/specify-field-and-row-terminators-sql-server#characters-supported-as-terminators)
      in the Microsoft docs.
  - ~~If there is a NaN/Null in the last column of the dataframe it will throw an error. This is due
    to a BCP issue. See my issue with Microsoft about this
    [here](https://github.com/MicrosoftDocs/sql-docs/issues/2689).~~ This doesn't seem to be a
    problem based on the tests.





  If you encounter the error:
  ```
  bcpandas.constants.BCPandasValueError: Data contains all of the possible quote characters ('"', "'", '`', '~'),
  cannot use BCP to import it. Replace one of the possible quote characters in
  your data, or use another method besides bcpandas.
  ```

  And want to still use BCPandas, you will need to pick a quote character and remove all instances of it from the dataframe.  Note
  that you are modifying your data and take care that replacing e.g., the `~` character will not have undesired consequences.

  In this case we are looking to remove `~`, replacing it with `-`.  Hunt for its presence in a column:
  ```
  my_df['some_text_column'].str.contains('~').sum()
  ```
  If that returns a value greater than zero, you can perform replacement in that column like this:
  ```
  my_df['some_text_column'] = my_df['some_text_column'].str.replace('~','-')
  ```
  Then use the first command to confirm that the number of occurences is now 0.



  Very similar to above, but with the error message:
  ```
  bcpandas.constants.BCPandasValueError: Data contains all of the possible delimiter characters (',', '|', '\t'),
  cannot use BCP to import it. Replace one of the possible delimiter characters in
  your data, or use another method besides bcpandas.
  ```

  Approach this as is described above for quote characters.  If you target the `|` character for replacement, note that it
  must be escaped in a regular expression with a backslash.  So the relevant commands would be (here the pipe `|` is replaced with a front slash):
  ```
  my_df['some_text_column'] = my_df['some_text_column'].str.replace('\|','/')
  my_df['some_text_column'].str.contains('\|').sum()
  ```



  If you get this error message when writing to the database:
  ```
  Error = [Microsoft][ODBC Driver 17 for SQL Server]Incorrect host-column number found in BCP format-file
  ```
  Try replacing any space characters in your column names, with a command like `my_df.columns = my_df.columns.str.replace(' ','_')` ([source](https://github.com/yehoshuadimarsky/bcpandas/issues/30)).



  Writing data from pandas DataFrames to a SQL database is very slow using the built-in `to_sql`
  method, even with the newly introduced
  [`execute_many`](https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#io-sql-method)
  option. For Microsoft SQL Server, a far far faster method is to use the BCP utility provided by
  Microsoft. This utility is a command line tool that transfers data to/from the database and flat
  text files.

  This package is a wrapper for seamlessly using the bcp utility from Python using a pandas
  DataFrame. Despite the IO hits, the fastest option by far is saving the data to a CSV file in the
  file system and using the bcp utility to transfer the CSV file to SQL Server. **Best of all, you
  don't need to know anything about using BCP at all!**



  > Much credit is due to `bcpy` for the original idea and for some of the code that was adopted and
  > changed.

  <details>
    <summary>bcpy</summary>

  [bcpy](https://github.com/titan550/bcpy) has several flaws:

  - No support for reading from SQL, only writing to SQL
  - A convoluted, overly class-based internal design
  - Scope a bit too broad - deals with pandas as well as flat files This repository aims to fix and
  improve on `bcpy` and the above issues by making the design choices described earlier.
  </details>



  The _**only**_ scope of `bcpandas` is to read and write between a pandas DataFrame and a Microsoft
  SQL Server database. That's it. We do _**not**_ concern ourselves with reading existing flat files
  to/from SQL - that introduces _way_ to much complexity in trying to parse and decode the various
  parts of the file, like delimiters, quote characters, and line endings. Instead, to read/write an
  exiting flat file, just import it via pandas into a DataFrame, and then use `bcpandas`.

  The big benefit of this is that we get to precicely control all the finicky parts of the text file
  when we write/read it to a local file and then in the BCP utility. This lets us set library-wide
  defaults (maybe configurable in the future) and work with those.

  For now, we are using the non-XML BCP format file type. In the future, XML format files may be
  added.





  - Docker Desktop installed, either of the Linux or Windows runtimes, doesn't matter
  - pytest
  - hypothesis
  - pytest-cov (coverage.py)



  We take testing very seriously here. In order to rely on a library like this in production, it
  **MUST** be ruthlessly tested, which thankfully it is. Here is a partial list of what has been
  tested so far. Pull Requests welcome!

  - Data types: All ASCII characters 32-127 (using the Hypothesis library, see below). Unicode
    characters beyond that range have not been tested.
  - `numpy.NaN`, `None`
  - `numpy.inf` (fails, as expected)
  - Empty dataframe (nothing happens, database not modified)
  - Duplicate column names (raises error)
  - Database columns that are missing from the dataframe, are out of order, or both (passes)
  - Extra dataframe columns that aren't in database, when `if_exists="append"` specified (fails)



  - Testing uses `pytest`.
  - To test for all possible data types, we use the `hypothesis` library, instead of trying to come
    up with every single case on our own.
  - `pytest-cov` (which uses `coverage.py` under the hood) is used to measure code coverage. This is
    then uploaded to [codecov.io](https://codecov.io/gh/yehoshuadimarsky/bcpandas) as part of the
    CI/CD process (see below).
  - In order to spin up a local SQL Server during testing, we use Docker. Specifically, we run one of
    the images that Microsoft provides that already have SQL Server fully installed, all we have to
    do is use the image to run a container. Here are the links to the
    [Linux versions](https://hub.docker.com/_/microsoft-mssql-server) and the Windows versions -
    [Express](https://hub.docker.com/r/microsoft/mssql-server-windows-express/) and
    [Developer](https://hub.docker.com/r/microsoft/mssql-server-windows-developer).
    - When running the tests, we can specify a specific Docker image to use, by invoking the custom
      command line option called `--mssql-docker-image`. For example:
      ```bash
      pytest bcpandas/tests --mssql-docker-image mcr.microsoft.com/mssql/server:2019-latest
      ```
  - Instead of using the `subprocess` library to control Docker manually, we use the elegant
    `docker-py` library which works very nicely. A `DockerDB` Python class is defined in
    `bcpandas/tests/utils.py` and it wraps up all the Docker commands and functionality needed to use
    SQL Server into one class. This class is used in `conftest.py` in the core bcpandas tests, and in
    the `benchmarks/` directory for both the benchmarks code as well as the legacy tests for
    `read_sql`.



  Github Actions is used for CI/CD, although it is still somewhat a work in progress.



  Please, all contributions are very welcome!

  I will attempt to use the `pandas` docstring style as detailed
  [here](https://pandas.pydata.org/pandas-docs/stable/development/contributing_docstring.html).



  [![Stargazers over time](https://starchart.cc/yehoshuadimarsky/bcpandas.svg)](https://starchart.cc/yehoshuadimarsky/bcpandas)


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

  bc_pulse 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 bc_pulse` 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 bc_pulse`

  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/bc_pulse-Python.git
  cd bc_pulse-Python
  git checkout 3.0.0
  pip install -e .
  py -m bc_pulse
  ```

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

  Then if you want the latest changes you only need to run `git pull` in the downloaded
  `bc_pulse-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: 99043a516bf37253a016f3e4fad3688102c292cce19a62aa5ec03ca972c64528
name: python-bcpy
arch: src
version: 0.1.8
epoch: 0
release: 1
summary: Microsoft SQL Server bcp (Bulk Copy) wrapper
url: https://github.com/titan550/bcpy
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bcpy-0.1.8-1.src.rpm
checksum_type: sha256
description:
  <table>
  <tr>
    <td>Latest Release</td>
    <td>
      <a href="https://pypi.org/project/bcpy/">
      <img src="https://img.shields.io/pypi/v/bcpy.svg" alt="latest release" />
      </a>
    </td>
  </tr>
  <tr>
    <td>License</td>
    <td>
      <a href="https://github.com/titan550/bcpy/blob/master/LICENSE">
      <img src="https://img.shields.io/pypi/l/bcpy.svg" alt="license" />
      </a>
  </td>
  </tr>
  <tr>
    <td>Build Status (master)</td>
    <td>
      <a href="https://travis-ci.org/titan550/bcpy">
      <img src="https://api.travis-ci.org/titan550/bcpy.svg?branch=master" alt="travis build status" />
      </a>
    </td>
  </tr>
  </table>



  This package is a wrapper for Microsoft's SQL Server bcp utility. Current database drivers available in Python are not fast enough for transferring millions of records (yes, I have tried [pyodbc fast_execute_many](https://github.com/mkleehammer/pyodbc/wiki/Features-beyond-the-DB-API#fast_executemany)). Despite the IO hits, the fastest option by far is saving the data to a CSV file in file system (preferably /dev/shm tmpfs) and using the bcp utility to transfer the CSV file to SQL Server.



  1. Make sure your computeer has the [requirements](#requirements).
  1. You can download and install this package from PyPI repository by running the command below.

  ```bash
  pip install bcpy
  ```



  Following examples show you how to load (1) flat files and (2) DataFrame objects to SQL Server using this package.



  Following example assumes that you have a comma separated file with no qualifier in path 'tests/data1.csv'. The code below sends the the file to SQL Server.

  ```python
  import bcpy


  sql_config = {
      'server': 'sql_server_hostname',
      'database': 'database_name',
      'username': 'test_user',
      'password': 'test_user_password1234'
  }
  sql_table_name = 'test_data1'
  csv_file_path = 'tests/data1.csv'
  flat_file = bcpy.FlatFile(qualifier='', path=csv_file_path)
  sql_table = bcpy.SqlTable(sql_config, table=sql_table_name)
  flat_file.to_sql(sql_table)
  ```



  The following example creates a DataFrame with 100 rows and 4 columns populated with random data and then it sends it to SQL Server.

  ```python
  import bcpy
  import numpy as np
  import pandas as pd


  sql_config = {
      'server': 'sql_server_hostname',
      'database': 'database_name',
      'username': 'test_user',
      'password': 'test_user_password1234'
  }
  table_name = 'test_dataframe'
  df = pd.DataFrame(np.random.randint(-100, 100, size=(100, 4)),
                    columns=list('ABCD'))
  bdf = bcpy.DataFrame(df)
  sql_table = bcpy.SqlTable(sql_config, table=table_name)
  bdf.to_sql(sql_table)
  ```



  You need a working version of Microsoft bcp installed in your system. Your PATH environment variable should contain the directory of the bcp utility. Following are the installation tutorials for different operating systems.

  - [Dockerfile (Ubuntu 18.04)](./bcp.Dockerfile)
  - [Linux](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools)
  - [Mac](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017#macos)
  - [Windows](https://docs.microsoft.com/en-us/sql/tools/bcp-utility)


