# packages

pkgId: 8027f87266b0d4b3c3a1b74f275b18f08fc6d90fa1758bd1bff70e9e9e2284b4
name: python-basalam.backbone-orm
arch: src
version: 2.0.10
epoch: 0
release: 1
summary: Python Utilities & Basalam Micro-Services SDK
url: https://github.com/basalam/backbone-orm
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basalam.backbone-orm-2.0.10-1.src.rpm
checksum_type: sha256
description:
  - Python 3.6+



  ```shell
  pip install backbone-orm
  ```



  ```python
  from backbone_orm import (
      RepositoryAbstract,
      PostgresManager,
      DriverEnum,
  ConnectionConfig,
      ModelAbstract,
      T,
      Parameters
  )
  import aioredis
  import typing

  postgres = PostgresManager(
      default=DriverEnum.POOL,
      config=ConnectionConfig(...)
  )

  redis = aioredis.Redis(...)


  class UserModel(ModelAbstract):
      id: int
      name: str


  class UserRepo(RepositoryAbstract[UserModel]):

      @classmethod
      async def connection(cls) -> PostgresConnection:
          return await postgres.acquire()

      @classmethod
      def redis(cls) -> aioredis.Redis:
          return redis

      @classmethod
      def table_name(cls) -> str:
          return "users"

      @classmethod
      def model(cls) -> typing.Type[T]:
          return UserModel

      @classmethod
      def soft_deletes(cls) -> bool:
          return True

      @classmethod
      def default_relations(cls) -> typing.List[str]:
          return []


  print(await UserRepo.find_by_id(1))
  ```



  ```bash

  pip install pytest


  python -m pytest
  ```



  - 0.0.11 Now build and push are done using gitlab-ci
  - 0.0.13 fix: return type of update_return
  - 0.0.14 custom order enums
  - 0.0.15 has_relations in ModelAbstract
  - 1.0.0 Adds QueryBuilder, Adds Connection Manager
  - 1.0.9 Extend QueryBuilderAbstract from pypika PostgreSQLQueryBuilder


pkgId: b5b9b9581fe079f75f6a9ab4b531633e5208d3b2cf2c4346e1f18fdee3d62c67
name: python-basalam.backbone-redis-cache
arch: src
version: 0.0.7
epoch: 0
release: 1
summary: Python Utilities & Basalam Micro-Services SDK
url: https://pypi.org/project/basalam.backbone-redis-cache/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basalam.backbone-redis-cache-0.0.7-1.src.rpm
checksum_type: sha256
description:
  - Python 3.6+



  ```shell
  pip install backbone-redis-cache
  ```



  ```python
  from basalam.backbone_redis_cache import RedisCache
  from redis.asyncio import Redis


  cache = RedisCache(
      connection=Redis(host="127.0.0.1", port=6379),
      prefix="ORDER_CACHE."
  )

  await cache.set("key", "value", seconds=10 * 60)
  await cache.get("key", default="Nevermind")

  await cache.mset({'key1': "value1",'key2': "value2"}, seconds=15 * 60)
  await cache.mget(["key1", "key2"], default="Whatever")


  await cache.cset("key", 1, seconds=60)
  await cache.cget("key")

  await cache.exists("key")
  await cache.forget("key")

  await cache.flush()
  ```



  ```bash

  pip install pytest


  python -m pytest
  ```


  - 0.0.3 Now build and push are done using gitlab-ci
  - 0.0.5 set & get a counter thanks to abdi.zbn@gmail.com
  - 0.0.10 added scan method thanks to ali.alimohammadi@basalam.com


pkgId: 5a389aba9eeb29eabc1715d8143c0509175665d24e997f03c72fbfd0d7da3b96
name: python-basana
arch: src
version: 1.6.2
epoch: 0
release: 1
url: https://github.com/gbeced/basana
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basana-1.6.2-1.src.rpm
checksum_type: sha256
summary:
  A Python async and event driven framework for algorithmic trading, with a focus on crypto currencies.


pkgId: de52cf9ebd9cde3c4e62eeaa7c9281ebffeeacca92de054483ff661068b9c6a0
name: python-basaran
arch: src
version: 0.21.1
epoch: 0
release: 1
summary: Open-source alternative to the OpenAI text completion API
url: https://pypi.org/project/basaran/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basaran-0.21.1-1.src.rpm
checksum_type: sha256
description:
  Basaran is an open-source alternative to the OpenAI text completion API. It provides a compatible streaming API for your Hugging Face Transformers-based text generation models.


pkgId: 9def70216add39f2661d1e1183e81dee6afce781fae39abb52c57cf9503dfa66
name: python-base-assistant-extension
arch: src
version: 0.6.6
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/base-assistant-extension/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-base-assistant-extension-0.6.6-1.src.rpm
checksum_type: sha256
description:
  Use this library to add extension to https://github.com/samuelint/ai-assistant.


  1. Add the library to your project
  ```bash
  poetry add base-assistant-extension
  ```

  2. At the base of your project export a class Called `Extension`
  ```python

  from langchain_core.language_models import BaseChatModel
  from langchain_core.runnables import Runnable
  from base_assistant_extension.base_extension import (
      BaseExtension,
  )
  from langchain_core.prompts import PromptTemplate


  class Extension(BaseExtension):
      def name(self) -> str:
          return "joker"

      def description(self) -> str:
          return "Tell jokes."

      def create_runnable(self, llm: BaseChatModel) -> Runnable:
          prompt = PromptTemplate.from_template(
              "You tell jokes. No matter the question. You have to tell a joke."
              "{messages}"
          )

          return prompt | llm
  ```

  ```python

  from .extension import Extension

  __all__ = ["Extension"]
  ```

  3. Build
  ```bash
  poetry build
  ```
  will produce a `.whl` file. Which is the extension to be used.


pkgId: 888e42df8a9037ee862a521df5dffc2ed80c91d9ff3c98bfd9993f94defbfb63
name: python-base256
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: When base64 just isn't enough
url: https://github.com/donno2048/base256
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-base256-1.0.1-1.src.rpm
checksum_type: sha256
description:
  When base64 just isn't enough





  ```sh
  pip3 install base256
  ```



  ```sh
  pip3 install git+https://github.com/donno2048/base256
  ```



  Please only use even-length hexadecimal values.



  ```py
  from os import remove
  from base256 import encode, decode, encode_hex, decode_hex, encode_file, decode_file, encode_string, decode_string
  print(encode('123456789abcdef0'))
  print(decode('ĒĴŖŸƚƼǞǰ'))
  print(encode_hex(0x123456789abcdef0))
  print(decode_hex('ĒĴŖŸƚƼǞǰ'))
  print(hex(decode_hex('ĒĴŖŸƚƼǞǰ')))
  print(encode_file('README.md'))
  print(decode_file('ģĠŢšųťĲĵĶĊĊŗŨťŮĠŢšųťĶĴĠŪŵųŴĠũųŮħŴĠťŮůŵŧŨĊĊģģĠŉŮųŴšŬŬšŴũůŮĊĊģģģĠņŲůŭĠŐŹŐŉĊĊŠŠŠųŨĊŰũŰĳĠũŮųŴšŬŬĠŢšųťĲĵĶĊŠŠŠĊĊģģģĠņŲůŭĠŇũŴňŵŢĊĊŠŠŠųŨĊŰũŰĳĠũŮųŴšŬŬĠŧũŴīŨŴŴŰųĺįįŧũŴŨŵŢĮţůŭįŤůŮŮůĲİĴĸįŢšųťĲĵĶĊŠŠŠĊĊģģĠŕųšŧťĊĊŐŬťšųťĠůŮŬŹĠŵųťĠťŶťŮĭŬťŮŧŴŨĠŨťŸšŤťţũŭšŬĠŶšŬŵťųĮĊĊģģģĠŉŮĠŐŹŴŨůŮĊĊŠŠŠŰŹĊŦŲůŭĠůųĠũŭŰůŲŴĠŲťŭůŶťĊŦŲůŭĠŢšųťĲĵĶĠũŭŰůŲŴĠťŮţůŤťĬĠŤťţůŤťĬĠťŮţůŤťşŨťŸĬĠŤťţůŤťşŨťŸĬĠťŮţůŤťşŦũŬťĬĠŤťţůŤťşŦũŬťĬĠťŮţůŤťşųŴŲũŮŧĬĠŤťţůŤťşųŴŲũŮŧĊŰŲũŮŴĨťŮţůŤťĨħıĲĳĴĵĶķĸĹšŢţŤťŦİħĩĩĊŰŲũŮŴĨŤťţůŤťĨħǄƒǄƴǅƖǅƸǆƚǆƼǇƞǄƏħĩĩĊŰŲũŮŴĨťŮţůŤťşŨťŸĨİŸıĲĳĴĵĶķĸĹšŢţŤťŦİĩĩĊŰŲũŮŴĨŤťţůŤťşŨťŸĨĩĩĊŰŲũŮŴĨťŮţůŤťşŦũŬťĨħŒŅŁńōŅĮŭŤħĩĩĊŰŲũŮŴĨŤťţůŤťşŦũŬťĨĬĠħŴťŭŰħĩĩĊŲťŭůŶťĨħŴťŭŰħĩĊŰŲũŮŴĨťŮţůŤťşųŴŲũŮŧĨħňťŬŬůĬĠŷůŲŬŤġħĩĩĊŰŲũŮŴĨŤťţůŤťşųŴŲũŮŧĨħħĩĩĊŠŠŠĊĊģģģĠŉŮĠŴŨťĠţůŭŭšŮŤĠŬũŮťĊĊŠŠŠųŨĊŢšųťĲĵĶĊŠŠŠĊ', 'temp'))
  remove('temp')
  print(encode_string('Hello, world!'))
  print(decode_string('ňťŬŬůĬĠŷůŲŬŤġ'))
  ```



  ```sh
  base256
  ```


pkgId: cd69c810cf5d217ba5fe9dae8cf25950cecad568edeb3caefe84404b3b86330e
name: python-base32-crockford
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: A Python implementation of Douglas Crockford's base32 encoding scheme
url: https://github.com/jbittel/base32-crockford
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-base32-crockford-0.3.0-1.src.rpm
checksum_type: sha256
description:
  A Python module implementing the alternate base32 encoding as described
  by Douglas Crockford at: http://www.crockford.com/wrmg/base32.html.
  He designed the encoding to:
     * Be human and machine readable
     * Be compact
     * Be error resistant
     * Be pronounceable
  It uses a symbol set of 10 digits and 22 letters, excluding I, L O and
  U. Decoding is not case sensitive, and 'i' and 'l' are converted to '1'
  and 'o' is converted to '0'. Encoding uses only upper-case characters.
  Hyphens may be present in symbol strings to improve readability, and
  are removed when decoding.
  A check symbol can be appended to a symbol string to detect errors
  within the string.


pkgId: 0fca91eaba9f1d305caea7eb4f45f6ed883c9235e8ae66beee8d2da1c8e2dc1a
name: python-base32check1
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Implementation of the base32check1 algorithm.
url: https://base32check.org/
rpm_license: Apache v2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-base32check1-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [![Release Notes](https://img.shields.io/github/release/bitmarck-service/base32check-python.svg)](https://github.com/bitmarck-service/base32check-python/releases/latest)
  [![Apache License 2.0](https://img.shields.io/github/license/bitmarck-service/base32check-python.svg)](https://www.apache.org/licenses/LICENSE-2.0)
  [![Test Workflow](https://github.com/bitmarck-service/base32check-python/workflows/test/badge.svg)](https://github.com/bitmarck-service/base32check-python/actions?query=workflow%3Atest)



  This project is a Python 3 implementation of the [Base32Check1](https://base32check.org/) algorithm.
  The minimum requirement is Python 3.6.
  There are no additional requirements/dependencies.



  This project is covered by the [Apache License, Version 2](LICENSE).



  For an easy release process and upload to PyPI [zest.releaser]
  (https://github.com/zestsoftware/zest.releaser) can be used.

  First you have to configure your `~/.pypirc` with your credentials. ([doc]
  (https://zestreleaser.readthedocs.io/en/latest/uploading.html#pypi-configuration-file-pypirc))
  Then you can start the release process.


  ````bash
  $ python3.9 -m venv venv
  $ venv/bin pip install zest.releaser[recommended]
  $ venv/bin/fullrelease

  ```


pkgId: 25632885c891427b9da3b8642ffba15c3534fddd663e73fa909bb41ac4e6df1c
name: python-base45
arch: src
version: 0.4.4
epoch: 0
release: 1
summary: Base45 Encoder/Decoder
url: https://github.com/kirei/python-base45
rpm_license: BSD-2-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-base45-0.4.4-1.src.rpm
checksum_type: sha256
description:
  A Python module to encode/decode binary data using Base45 as described in [RFC 9285 ](https://www.rfc-editor.org/info/rfc9285).


pkgId: 27624a7113d7f10c9a5d4aa8ae9e88c3f546d8ae2e558591e7723233f74430f6
name: python-base58
arch: src
version: 2.1.1
epoch: 0
release: 1
summary: Base58 and Base58Check implementation.
url: https://github.com/keis/base58
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-base58-2.1.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI Version][pypi-image]](https://pypi.python.org/pypi?name=base58&:action=display)
  [![PyPI Downloads][pypi-downloads-image]](https://pypi.python.org/pypi?name=base58&:action=display)
  [![Build Status][travis-image]](https://travis-ci.org/keis/base58)
  [![Coverage Status][coveralls-image]](https://coveralls.io/r/keis/base58?branch=master)

  Base58 and Base58Check implementation compatible with what is used by the
  bitcoin network. Any other alternative alphabet (like the XRP one) can be used.

  Starting from version 2.0.0 **python2 is no longer supported** the 1.x series
  will remain supported but no new features will be added.




      $ printf "hello world" | base58
      StV1DL6CwTryKyV

      $ printf "hello world" | base58 -c
      3vQB7B6MrGQZaxCuFg4oh

      $ printf "3vQB7B6MrGQZaxCuFg4oh" | base58 -dc
      hello world

      $ printf "4vQB7B6MrGQZaxCuFg4oh" | base58 -dc
      Invalid checksum




      >>> import base58
      >>> base58.b58encode(b'hello world')
      b'StV1DL6CwTryKyV'
      >>> base58.b58decode(b'StV1DL6CwTryKyV')
      b'hello world'
      >>> base58.b58encode_check(b'hello world')
      b'3vQB7B6MrGQZaxCuFg4oh'
      >>> base58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh')
      b'hello world'
      >>> base58.b58decode_check(b'4vQB7B6MrGQZaxCuFg4oh')
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "base58.py", line 89, in b58decode_check
          raise ValueError("Invalid checksum")
      ValueError: Invalid checksum
      
      
      
      >>> base58.b58encode(b'hello world', alphabet=base58.XRP_ALPHABET)
      b'StVrDLaUATiyKyV'
      >>> base58.b58decode(b'StVrDLaUATiyKyV', alphabet=base58.XRP_ALPHABET)
      b'hello world'


  [pypi-image]: https://img.shields.io/pypi/v/base58.svg?style=flat
  [pypi-downloads-image]: https://img.shields.io/pypi/dm/base58.svg?style=flat
  [travis-image]: https://img.shields.io/travis/keis/base58.svg?style=flat
  [coveralls-image]: https://img.shields.io/coveralls/keis/base58.svg?style=flat


pkgId: e89d7398d39a185960bd36e654dfcbe73e28fb26988a1fc644ba49bae2e962b4
name: python-baseapp-auth
arch: src
version: 0.4.8
epoch: 0
release: 1
summary: BaseApp Auth
url: https://github.com/silverlogic/baseapp-backend
rpm_license: BSD-3-Clause # Example license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-auth-0.4.8-1.src.rpm
checksum_type: sha256
description:
  This project includes:

  - API endpoints for authentication and account management
  - default User model



  `AbstractUser` is an abstract Django user model implementation. It provides a default implementation of `User` model and can be extended in the target Django app. The attached [test project](testproject/) contains a concrete implementation of User class for demo purposes.



  In the `rest_framework/` directory you can find a implementation of account-related endpoints: login, signup, forgot-passowrd, change-email. Authentication (login) is implemented in a few different modes that can be picked depending on project preference/requirements. In [testproject/urls.py](testproject/urls.py) you'll find DRF routing set up for each of supported modes with unit tests for each mode:

  - Authentication with Simple AuthToken
  - Authentication with JWT
  - Authentication with MFA and Simple AuthToken
  - Authentication with MFA and JWT






  When your `DjangoObjectType` implements `PermissionsInterface` you are able to query for object-level permissions:

  ```graphql
  query {
    page(id: 1) {
      canDelete: hasPerm(perm: "delete")
      canChange: hasPerm(perm: "change")
    }
  }
  ```





  There is a [test project](testproject/) with a complete demo set up.



  Install in your environment:

  ```bash
  pip install baseapp-auth
  ```



  Add the app to your project INSTALLED_APPS:

  ```py
  INSTALLED_APPS = [
      ...
      "baseapp_auth",
  ]
  ```

  Set the Django auth user model to the concrete model of your app:

  ```py
  AUTH_USER_MODEL = "testapp.User"
  ```

  If you want to use JWT authentication, add the corresponding authentication backend:

  ```py
  REST_FRAMEWORK = {
      "DEFAULT_AUTHENTICATION_CLASSES": (
          "rest_framework_simplejwt.authentication.JWTAuthentication",
          
      )
  }
  ```

  I you want to use JWT authentication, set the related JWT settings (e.g. the claims serializer):

  ```py
  SIMPLE_JWT = {
      
      "TOKEN_OBTAIN_SERIALIZER": "testproject.testapp.rest_framework.jwt.serializers.MyTokenObtainPairSerializer",
      
  }
  JWT_CLAIM_SERIALIZER_CLASS = "baseapp_auth.rest_framework.users.serializers.UserBaseSerializer"
  ```
  We override some settings from the Simple JWT library by default to make some baseapp features work properly. They look like the following:
  ```py
  SIMPLE_JWT = {
      "TOKEN_OBTAIN_SERIALIZER": "baseapp_auth.rest_framework.jwt.serializers.BaseJwtLoginSerializer",
      "TOKEN_REFRESH_SERIALIZER": "baseapp_auth.rest_framework.jwt.serializers.BaseJwtRefreshSerializer",
  }

  JWT_CLAIM_SERIALIZER_CLASS = "baseapp_auth.rest_framework.users.serializers.UserBaseSerializer"
  ```
  However, any setting defined on the project will take precedence over the default ones.

  There is a constance config for password expiration interval:

  ```py
  CONSTANCE_CONFIG = OrderedDict(
      [
          (
              "USER_PASSWORD_EXPIRATION_INTERVAL",
              (
                  365 * 2,
                  "The time interval (in days) after which a user will need to reset their password.",
              ),
          ),
      ]
  )
  ```

  There is an optional scheduled task that can be configured for notifying that the user's password has expired:

  ```py
  CELERY_BEAT_SCHEDULE = {
      "notify_is_password_expired": {
          "task": "baseapp_auth.tasks.notify_users_is_password_expired",
          "schedule": "...",
          "options": "...",
      },
  }
  ```



  General development instructions can be found in [main README](..#testing)



  ```py
  BA_AUTH_PRE_AUTH_TOKEN_EXPIRATION_TIME_DELTA: datetime.timedelta
  BA_AUTH_CHANGE_EXPIRED_PASSWORD_TOKEN_EXPIRATION_TIME_DELTA: datetime.timedelta
  BA_AUTH_CONFIRM_EMAIL_TOKEN_EXPIRATION_TIME_DELTA: datetime.timedelta
  BA_AUTH_CHANGE_EMAIL_VERIFY_TOKEN_EXPIRATION_TIME_DELTA: datetime.timedelta
  BA_AUTH_CHANGE_EMAIL_CONFIRM_TOKEN_EXPIRATION_TIME_DELTA: datetime.timedelta
  ```


pkgId: a22b77f0f70ec5764639b1f6ddcd833b1d78fb412f9c1cef82b6cf5d2ffa97aa
name: python-baseapp-backend
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: BaseApp
url: https://github.com/silverlogic/baseapp-backend
rpm_license: BSD-3-Clause # Example license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-backend-0.0.2-1.src.rpm
checksum_type: sha256
description:
  BaseApp is a Django project template that provides a set of tools and best practices for building web applications.



  Run `pip install baseapp-backend`
  And make sure to add the frozen version to your `requirements/base.txt` file

  If you want to develop, [install using this other guide](#how-to-develop).



  Then enable the desired apps in your Django project's `INSTALLED_APPS` setting:

  ```python
  INSTALLED_APPS = [
      ...
      'baseapp.activity_log',
      ...
  ]
  ```





  Clone the project inside your project's backend dir:

  ```
  git clone git@github.com:silverlogic/baseapp-backend.git
  ```

  And manually install the package:

  ```
  pip install -e baseapp-backend/baseapp
  ```

  The `-e` flag will make it like any change you make in the cloned repo files will effect into the project.


pkgId: 982b9ea7005f3a25d4e85a7e53d7ba1f70eeb6e2474479b9fe74cc7b30f47435
name: python-baseapp-comments
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: BaseApp Comments
url: https://github.com/silverlogic/baseapp-backend
rpm_license: BSD-3-Clause # Example license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-comments-0.3.0-1.src.rpm
checksum_type: sha256
description:
  Reusable app to handle comments threads.



  - [ ] DRF views and serializers



  This package requires to following packages to be installed:

  - [baseapp-core\[graphql\]](../baseapp-core/baseapp_core/graphql/README.md)
  - [baseapp-notifications](../baseapp-notifications/README.md)
  - [baseapp-reactions](../baseapp-reactions/README.md)

  And install the package with `pip install baseapp-comments`.

  If you want to develop, [install using this other guide](#how-to-develop).



  1 - **Make sure** to have [GraphQL websocket enabled](../baseapp-core/baseapp_core/graphql/README.md#enable-websockets) in your project

  2 - Add `baseapp_comments` to your project's `INSTALLED_APPS` and run `./manage.py migrate` as any other django model:

  ```python
  INSTALLED_APPS = [
      
      "baseapp_comments",
      
  ]
  ```

  3 - Add `baseapp_comments.permissions.CommentsPermissionsBackend` to the `AUTHENTICATION_BACKENDS` list in your django settings file.

  ```python
  AUTHENTICATION_BACKENDS = [
      
      "baseapp_comments.permissions.CommentsPermissionsBackend",
      
  ]
  ```

  4 - Make sure to add the task routing for the notifications:

  ```python
  CELERY_TASK_ROUTES = {
      "baseapp_comments.notifications.send_reply_created_notification": {
          "exchange": "default",
          "routing_key": "default",
      },
      "baseapp_comments.notifications.send_comment_created_notification": {
          "exchange": "default",
          "routing_key": "default",
      }
  }
  ```

  5 - Expose `CommentsMutations`, `CommentsQueries` and `CommentsSubscriptions` in your GraphQL/graphene endpoint, like:

  ```python
  from baseapp_comments.graphql.mutations import CommentsMutations
  from baseapp_comments.graphql.queries import CommentsQueries
  from baseapp_comments.graphql.subscriptions import CommentsSubscriptions

  class Query(graphene.ObjectType, CommentsQueries):
      pass

  class Mutation(graphene.ObjectType, CommentsMutations):
      pass

  class Subscription(graphene.ObjectType, CommentsSubscriptions):
      pass

  schema = graphene.Schema(query=Query, mutation=Mutation, subscription=Subscription)
  ```



  You can customize some settings, bellow are the default values:

  ```python
  BASEAPP_COMMENTS_CAN_ANONYMOUS_VIEW_COMMENTS = True
  BASEAPP_COMMENTS_MAX_PINS_PER_THREAD = None
  BASEAPP_COMMENTS_ENABLE_GRAPHQL_SUBSCRIPTIONS = True
  BASEAPP_COMMENTS_ENABLE_NOTIFICATIONS = True
  ```

  You need to inherit `CommentableModel` in your model and make sure to add `CommentsInterface` to your ObjectType's interfaces like:



  ```python
  from django.db import models
  from baseapp_comments.models import CommentableModel

  class MyModel(models.Model, CommentableModel):
      pass
  ```

  This will add the following fields to your model:

  - `comments` a reverse relation to `Comment` model
  - `comments_count` a JSON field that stores the count of comments for the object like: `{total: 5, main: 3, replies: 2, pinned: 1}`
  - `is_comments_enabled` a boolean fields that stores if comments are enabled for the object

  **Don't forget** to run `./manage.py makemigrations` and `./manage.py migrate` after adding `CommentableModel` to your model.



  `CommentsInterface` is a GraphQL interface that can be used to query for comments. It has the following fields:

  - `isCommentsEnabled` return the active `URLPath`
  - `commentsCount` return `CommentsCount` objectType with the following fields:
      - `total`
      - `main`
      - `replies`
      - `pinned`
  - `comments` list of comments attached to this object

  ```python
  from baseapp_core.graphql import DjangoObjectType
  from baseapp_comments.graphql import CommentsInterface


  class MyModelObjectType(DjangoObjectType):
      class Meta:
          model = MyModel
          interfaces = (relay.Node, CommentsInterface)

  ```



  There are some signals that handles stuff like updating comments count, notify users when a comment is created and send a GraphQL subscription when a comment is created, updated or deleted. You can find all signals in `baseapp_comments.signals`.

  You could disconnect the signals and connect your own handlers if you want to customize the behavior.

  ```python
  import swapper
  from django.db.models.signals import post_save
  from baseapp_comments.signals import notify_on_comment_created

  Comment = swapper.load_model("baseapp_comments", "Comment")

  post_save.disconnect(notify_on_comment_created, dispatch_uid="notify_on_comment_created")


  def my_custom_notify_on_comment_created(sender, instance, created, **kwargs):
      
      pass
  post_save.connect(notify_on_comment_created, sender=Comment, dispatch_uid="notify_on_comment_created")
  ```



  In can inherit `baseapp_comments.permissions.CommentsPermissionsBackend` to customize the permissions.

  ```python
  from baseapp_comments.permissions import CommentsPermissionsBackend


  class MyCommentsPermissionsBackend(CommentsPermissionsBackend):
      def has_perm(self, user_obj, perm, obj=None):
          if perm == "baseapp_comments.add_comment_with_profile":
              return obj.owner_id == user.id  # only the profile's owner can use

          return super().has_perm(user_obj, perm, obj)
  ```

  And add it to your `AUTHENTICATION_BACKENDS` list in your django settings file.

  ```python
  AUTHENTICATION_BACKENDS = [
      
      "myapp.permissions.MyCommentsPermissionsBackend",
      
  ]

  ```



  General development instructions can be found in [main README](..#how-to-develop).




  - Removed pghistory tracking from the `Comment` model:

  ```python
  @pghistory.track(
      pghistory.InsertEvent(),
      pghistory.UpdateEvent(),
      pghistory.DeleteEvent(),
      exclude=["comments_count", "reactions_count"],
  )

  ```


pkgId: 457048faa74b7982855b47d4078907f4888627e5b0adb60d730b038bdbb9a2ec
name: python-baseapp-django-push-notifications
arch: src
version: 3.0.3rc3
epoch: 0
release: 1
url: https://github.com/silverlogic/django-push-notifications
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-django-push-notifications-3.0.3rc3-1.src.rpm
checksum_type: sha256
summary:
  Send push notifications to mobile devices through GCM, APNS or WNS and to WebPush (Chrome, Firefox and Opera) in Django

description:
  A minimal Django app that implements Device models that can send messages through APNS, FCM/GCM, WNS and WebPush.
  The app implements four models: ``GCMDevice``, ``APNSDevice``, ``WNSDevice`` and ``WebPushDevice``. Those models share the same attributes:
   - ``name`` (optional): A name for the device.
   - ``active`` (default True): A boolean that determines whether the device will be sent notifications.
   - ``user`` (optional): A foreign key to auth.User, if you wish to link the device to a specific user.
   - ``device_id`` (optional): A UUID for the device obtained from Android/iOS/Windows APIs, if you wish to uniquely identify it.
   - ``registration_id`` (required): The FCM/GCM registration id or the APNS token for the device.
  The app also implements an admin panel, through which you can test single and bulk notifications. Select one or more
  FCM/GCM, APNS, WNS or WebPush devices and in the action dropdown, select "Send test message" or "Send test message in bulk", accordingly.
  Note that sending a non-bulk test message to more than one device will just iterate over the devices and send multiple
  single messages.
  UPDATE_ON_DUPLICATE_REG_ID: Transform create of an existing Device (based on registration id) into a update. See below Update of device with duplicate registration ID for more details.


pkgId: 784dbb811fd7d99d90a98023467b976b3558ae4dc454efa8360365318c322e86
name: python-baseapp-message-templates
arch: src
version: 1.9.3
epoch: 0
release: 1
summary: A BaseApp app that allows the use of customizable e-mail and sms templates.
url: https://github.com/silverlogic/baseapp-backend
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-message-templates-1.9.3-1.src.rpm
checksum_type: sha256
description:
  This app provides the integration of custom e-mail and sms template configuration with The SilverLogic's [BaseApp](https://bitbucket.org/silverlogic/baseapp-django-v2).



  Add to `requirements/base.txt`:

  ```bash
  git+https://bitbucket.org/silverlogic/baseapp-message-templates-django.git
  ```



  ```py
  TEMPLATES  =  [
  	{
  		"BACKEND": "django_jinja.backend.Jinja2",
  		"DIRS": [str(APPS_DIR  /  "templates")], # change this to wherever your base templates are stored
  		"APP_DIRS": True,
          "NAME": "jinja2",
  		"OPTIONS": {
  			"match_extension": ".j2",
  			"constants": {"URL": URL, "FRONT_URL": FRONT_URL},
  		},
  	},
  	{
  		"BACKEND": "django.template.backends.django.DjangoTemplates",
  		"DIRS": [
  			str(APPS_DIR  /  "templates"), # change this to wherever your base templates are stored
  		],
  		"APP_DIRS": True,
  		"OPTIONS": {
  			"context_processors": [
  				"django.template.context_processors.debug",
  				"django.template.context_processors.request",
  				"django.contrib.auth.context_processors.auth",
  				"django.contrib.messages.context_processors.messages",
  			],
  			"libraries": {
  				"filter": "baseapp_message_templates.filters",
  			},
  		},
  	},
  ]
  ```



  In our Django application, you have the option to use a default email template. This template acts as a wrapper for your other email templates, ensuring a consistent layout and style across all your emails.




  To effectively utilize the default template:

  1. **Create the Default Template**

     Ensure your default template includes a placeholder for the child template content. This is done using the `template_content|safe` variable in your Jinja2 template.

     Example:
     ```html
     <html>
     <body>
       <div>
         <!-- Your default template layout -->
         <div class="content">
           {{ template_content|safe }}
         </div>
         <!-- More of your default template layout -->
       </div>
     </body>
     </html>


  2. **Render Child Templates**

  	When rendering a child template, pass the content as a string to template_content. `Jinja2` will insert this content into the default template at the location of {{ template_content|safe }}.

  3. **Sanitize for Security:**
  	To ensure security, especially since we're using the safe filter, it's important to sanitize `template_content` to prevent XSS (Cross-Site Scripting) attacks. This process removes or neutralizes any potentially harmful scripts that might be part of the content.




  If you want to use a default base template that your emails will automatically inherit from, add the path to that template in your Django settings. This configuration allows you to define a consistent layout or design for your emails. Note that this base template won't apply to emails created directly in SendGrid.

  In your `settings.py`:

  ```python
  DEFAULT_EMAIL_TEMPLATE = "path/to/your/default/template" # ex: "emails/base-template"
  ```



  If you want to use SendGrid to send mail, add these settings to your `settings/base.py`:

  ```py
  DJMAIL_REAL_BACKEND = "sendgrid_backend.SendgridBackend"

  SENDGRID_API_KEY = env("SENDGRID_API_KEY")

  SENDGRID_SANDBOX_MODE_IN_DEBUG = False
  ```



  This model is responsible for customizing your e-mail template and sending mail. At minimum, an instance of `EmailTemplate` must have a unique name and either a SendGrid template ID or some custom HTML content. The `subject`, `plain_text_content`, and `attachments` are optional.



  `Attachment` instances that are linked to an `EmailTemplate` represent static files that will be attached to every message sent via that template, regardless of recipient or context. These attachments will be sent regardless of whether the e-mail is sent through a SendGrid template or a custom HTML template.



  If a `sendgrid_template_id` is provided on an instance of `EmailTemplate`, a SendGrid template can be used to send mail. In order to send mail via SendGrid template, you can use the `send_sendgrid_email` util, or manually do so by creating at least one `Personalization`. Each `Personalization`will contain the email of a recipient and any context that must be provided to the template. A `Personalization` can be created like so:

  ```py

  from baseapp_message_templates.sendgrid import get_personalization

  personalization = get_personalization("john@test.com", {"message": "Hello there."})
  ```



  The `send_sendgrid_email` in `email_utils` automatically handles the fetching of the email template and the creation of the personalizations. The function takes two arguments: `template_name`, which is the name of the `EmailTemplate` to be used, and `content`, which is a list of tuples containing a recipient email and message pair.

  ```py
  from baseapp_message_templates.email_utils import send_sendgrid_email
   
   
   

  send_sendgrid_email("Test Template", [("john@test.com", "Hello there.")])
  ```

  This util automatically handles sending multiple messages to multiple recipients. You just need to provide the recipient/message tuple in the content list.

  ```py
  from baseapp_message_templates.email_utils import send_sendgrid_email

  send_sendgrid_email("Test Template", [("john@test.com", "Hello there."), ("jane@test.com", "Hi!")])
  ```
  If needed, it is possible to manully send emails using the `send_via_sendgrid` or `mass_send_via_sendgrid` methods.




  The `send_via_sendgrid` method of `EmailTemplate` can be used to send a single email to one recipient. The method takes one `Personalization` as an argument, as well as an optional list of `attachments` that can be sent along with this particular message.

  ```py
  from baseapp_message_templates.models import EmailTemplate
  from baseapp_message_templates.sendgrid import get_personalization

  template = EmailTemplate.objects.get("Test Template")

  personalization = get_personalization("john@test.com", {"message": "Hello there."})

  template.send_via_sendgrid(personalization)
  ```



  The `mass_send_via_sendgrid` method of `EmailTemplate` can be used to send multiple instances of a template to multiple recipients. The method takes a list of `Personalization` objects as an argument, and each `Personalization` will send a separate message to each recipient with its own context.

  ```py
  from baseapp_message_templates.models import EmailTemplate
  from baseapp_message_templates.sendgrid import get_personalization


  template = EmailTemplate.objects.get("Test Template")

  personalization_1 = get_personalization("john@test.com", {"message": "Hello there."})
  personalization_2 = get_personalization("jane@test.com", {"message": "Good morning."})
  personalization_list = [personalization_1, personalization_2]

  template.mass_send_via_sendgrid(personalization_list)
  ```



  If you aren't using SendGrid and instead wish to provide your custom HTML content directly to the `EmailTemplate` instance, this can be done through the `html_content` field. Once `html_content` has been provided, the `send` method of the `EmailTemplate` can be used to send mail.



  When adding HTML content to a template through the Django Admin, the "source" option must be selected in the text field.

  ![enter image description here](https://i.ibb.co/3yCBRy3/Screen-Shot-2023-06-12-at-12-48-17-PM.png)

  After saving, the content of the text field will no longer contain the raw HTML that was added. This is a small caveat of the Django Admin. The "raw HTML" field that is displayed underneath the input will display the actual raw HTML content that is currently added to the instance.

  ![enter image description here](https://i.ibb.co/0jgms7c/Screen-Shot-2023-06-12-at-12-48-32-PM.png)



  Once you've added `html_content` to your template, either programatically or through the Django Admin, a message can now be sent through the `send_template_email` util in `email_utils`. This util is a simple wrapper for fetching the email template and sending it using the template's `send` method.

  Regardless of the method used, there are two required parameters: `template_name`, which is the name of the `EmailTemplate` to be used, and `recipients`, which is a list of one or more strings containing the e-mail addresses of the recipients. A `context` dict can be passed in optionally if the HTML content is expected one or more key/value pairs to be provided.

  The other (optional) params are: `use_base_template`, `extended_with`, `attachments` and `custom_subject`.

  The `use_base_template` param will determine whether the message should extend from a base HTML template. If set to `True`, the message will extend from a base template that can be either the base template set in the `DEFAULT_EMAIL_TEMPLATE` setting, or a path to a custom template - which must be provided to the `extended_with` param. Keep in mind that the `send_template_email` util will default `use_base_template` to `True`.

  The `attachments` parameter is a list of one or more files that will be send along with this particular message. These attachments will be sent along with any static attachments that have been attached to the template itself through `Attachment`.

  Finally, the `custom_subject` parameter is a string, which will override the copy template subject if passed.

  ```py
  from baseapp_message_templates.email_utils import send_template_email


  recipients = ["john@test.com"]
  context = {"content": "Hello."}
  extended_with = "apps/base/templates/test-template.html"

  send_template_email("Test Template", recipients, context, True, extended_with)


  attachments = [attch_1, ...]
  subject = f'Custom subject {var}'
  send_template_email("Test Template", recipients, context, True, extended_with,
                attachments=attachments, subject=subject)



  from baseapp_message_templates.models import EmailTemplate


  template = EmailTemplate.objects.get("Test Template")

  recipients = ["john@test.com"]
  context = {"content": "Hello."}
  extended_with = "apps/base/templates/test-template.html"

  template.send(recipients, context, True, extended_with)
  ```




  The `SmsTemplate` model has two fields:
  * `name`: this name must be unique.
  * `message`: this is a textfield and does not accept HTML



  Once you have installed the package you can simply create a migration to input your templates like so:
  ```py
  from __future__ import unicode_literals

  from django.db import migrations


  def create_object(sms_template, name, message):
      sms_template.objects.create(
          name=name,
          message=message,
      )


  def create_sms_templates(apps, schema_migration):
      sms_template = apps.get_model("baseapp_message_templates", "SmsTemplate")

      create_object(
          sms_template,
          "First Template",
          """
              Hello, {{ some_variable }}.
          """,
      )

      create_object(
          sms_template,
          "Second template",
          """
              Hello, {{ some_other_variable }}.
          """,
      )


  class Migration(migrations.Migration):
      dependencies = [("some_app", "0002_some_previus_migration")]

      operations = [migrations.RunPython(create_sms_templates, migrations.RunPython.noop)]

  ```

  OBS: make sure that the variables are the right ones that you will pass as context when getting the message.


  To get the template message you can simply use the util functions `get_sms_message` from `sms_utils` passing as first parameter the name of the template and the second parameter the context with your variables if needed.

  ```py
  from baseapp_message_templates.sms_utils import get_sms_message

  context = {"some_variable": "some_value"}

  message = get_sms_message("First Template", context)
  ```


pkgId: 90cd4077489dc13a3f4a17cd9d4083aec64cb7d4808b56800d1635fc19ad204a
name: python-baseapp-notifications
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: BaseApp Notifications
url: https://github.com/silverlogic/baseapp-backend
rpm_license: BSD-3-Clause # Example license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-notifications-0.3.1-1.src.rpm
checksum_type: sha256
description:
  Reusable app to have in-app notifications integrated with email and push notifications. Its built on top of [django-notifications-hq](https://github.com/django-notifications/django-notifications).

  Based on the [Activity Streams Spec](http://activitystrea.ms/specs/atom/1.0/).

  Notifications are actually actions events, which are categorized by four main components.

  -   `Actor`. The object that performed the activity.
  -   `Verb`. The verb phrase that identifies the action of the activity.
  -   `Action Object`. *(Optional)* The object linked to the action
      itself.
  -   `Target`. *(Optional)* The object to which the activity was
      performed.

  `Actor`, `Action Object` and `Target` are `GenericForeignKeys` to any
  arbitrary Django object. An action is a description of an action that
  was performed (`Verb`) at some instant in time by some `Actor` on some
  optional `Target` that results in an `Action Object` getting
  created/updated/deleted.

  For example: [nossila](https://github.com/nossila/) `(actor)`
  *opened* `(verb)` [pull request
  18](https://github.com/silverlogic/baseapp-backend/pull/18)
  `(action_object)` on
  [baseapp-backend](https://github.com/silverlogic/baseapp-backend)
  `(target)` 12 hours ago


  - [X] Finish implementing push notifications
  - [ ] DRF views and serializers



  Requirements:
  - **baseapp-core** >= 0.2.0
  - **django-notifications-hq** >= 1.8
  - **django-push-notifications >= 3.0.2

  Run `pip install baseapp-notifications`
  And make sure to add the frozen version to your `requirements/base.txt` file

  If you want to develop, [install using this other guide](#how-to-develop).



  1 - Add to your `INSTALLED_APPS`:

  ```python
  INSTALLED_APPS = [
    "baseapp_notifications",
  ]
  ```

  2 - Set the notification model in your `settings/base.py`:

  ```python
  NOTIFICATIONS_NOTIFICATION_MODEL = "baseapp_notifications.Notification"
  ```

  Check how to customize to your own model [bellow](#how-to-customize-notifications-model).

  3 - Make sure to add the task routing for `send_push_notification`

  ```python
  CELERY_TASK_ROUTES = {
      "baseapp_notifications.tasks.send_push_notification": {
          "exchange": "default",
          "routing_key": "default",
      },
  }
  ```

  4 - Make sure that your main `User`'s `DjangoObjectType` implements interface `NotificationsInterface`:

  ```python
  from baseapp_core.graphql import DjangoObjectType
  from baseapp_notifications.graphql.object_types import NotificationsInterface

  class UserNode(DjangoObjectType):
      class Meta:
          interfaces = (relay.Node, NotificationsInterface)
  ```

  5 - Then you can expose notification's mutations and subscriptions:

  ```python
  import graphene

  from baseapp_notifications.graphql.mutations import NotificationsMutations
  from baseapp_notifications.graphql.subscriptions import NotificationsSubscription


  class Query(graphene.ObjectType):
      me = graphene.Field(UserNode)

      def resolve_me(self, info):
          if info.context.user.is_authenticated:
              return info.context.user


  class Mutation(graphene.ObjectType, NotificationsMutations):
      pass


  class Subscription(graphene.ObjectType, NotificationsSubscription):
      pass


  schema = graphene.Schema(query=Query, mutation=Mutation, subscription=Subscription)
  ```



  1 - Add to your `INSTALLED_APPS`:

  ```python
  INSTALLED_APPS = [
    "push_notifications"
  ]
  ```

  2 - Set the push notifications settings in your `settings/base.py`:

  ```python
  PUSH_NOTIFICATIONS_SETTINGS = {
    "FCM_API_KEY": "[your api key]",
    "APNS_CERTIFICATE": ["Absolute path to your APNS certificate file"],
    "APNS_TOPIC": ["Apple app ID"],
    "DEFAULT_CLOUD_MESSAGE_TYPE": "FCM",
    "UPDATE_ON_DUPLICATE_REG_ID": True/False,
    "APNS_USE_SANDBOX": True/False,
  }
  ```

  You can get more details about this settings dict at the [django-push-notifications oficial repository](https://github.com/jazzband/django-push-notifications?tab=readme-ov-file#settings-list).

  3 - Set the push notification routes in your `router.py`

  ```python
  from push_notifications.api.rest_framework import (  # noqa
      APNSDeviceAuthorizedViewSet,
      GCMDeviceAuthorizedViewSet,
      WNSDeviceAuthorizedViewSet,
      WebPushDeviceAuthorizedViewSet,
  )
  router.register(r"push-notifications/apns", APNSDeviceAuthorizedViewSet, basename="apns")
  router.register(r"push-notifications/gcm", GCMDeviceAuthorizedViewSet, basename="gcm")
  router.register(r"push-notifications/wns", WNSDeviceAuthorizedViewSet, basename="wns")
  router.register(r"push-notifications/web", WebPushDeviceAuthorizedViewSet, basename="web")
  ```



  ```python
  from baseapp_notifications import send_notification

  send_notification(
      add_to_history=True,
      send_push=True,
      send_email=True,
      sender=user,
      recipient=user,
      verb="opened",
      action_object=pr,
      target=repository,
      level="info",
      description=_("{user_name} opened a pull request in {repository_name}").format(
        user_name=user.name,
        repository_name=repository.name
      ),
      push_title=_("title"),
      push_description=_("description"),
      extra={},
  )
  ```

  Arguments:

  - **add_to_history**: A boolean (default=True). True to add this to your in-app notifications history.
  - **send_push**: A boolean (default=True). True to send push notification to user's devices.
  - **send_email**: A boolean (default=True). True to send notification via email.
  - **sender**: An object of any type. (Required)
  - **recipient**: A **Group** or a **User QuerySet** or a list of **User**. (Required)
  - **verb**: An string. (Required)
  - **action\_object**: An object of any type. (Optional)
  - **target**: An object of any type. (Optional)
  - **level**: One of Notification.LEVELS (\'success\', \'info\', \'warning\', \'error\') (default=info). (Optional)
  - **description**: An string. (Optional)
  - **notification_url**: URL used in emails so users can open this notification's page. (Optional)
  - **email_subject**: An string (default=description). This will override the email's subject message. (Optional)
  - **email_message**: An string (default=description). This will override the email's body message. (Optional)
  - **public**: An boolean (default=True). (Optional)
  - **timestamp**: An tzinfo (default=timezone.now()). (Optional)
  - **push_description**: A string. (Required). The "body" of your push notification
  - **push_title**: A string. (Optional). This will override the Title of your notification (apple and google uses the name defined on your build files)
  - **extra**: A dict with data of any type. (Optional)

  **Extra data**: ou can also send any arbitrary kwargs and they will be added to `Notification.data` JSONField.



  To send email notifications make sure to set `send_email=True` argument and `notification_url` so users can open the notification in the browser. The `description` will be used both as email's subject and email's body by default, check how to customize bellow.

  ```python
  send_notification(
      sender=user,
      recipient=user,
      verb="opened",
      description="email's subject",
      add_to_history=True,
      send_email=True,
      notification_url="https://github.com/silverlogic/baseapp-backend/pull/18",
  )
  ```



  By default it will look for templates based in your `slugify(verb)`, so can implement the following files with the following content in your project for each verb you want to customize:

  Create `templates/emails/notifications/{verb_slugified}-subject.txt.j2` with:

  ```jinja2
  {% include "emails/notification-subject.txt.j2" %}
  ```

  Create `templates/emails/notifications/{verb_slugified}-body.txt.j2` with:

  ```jinja2
  {% extends "emails/notification-body.txt.j2" %}
  ```

  Create `templates/emails/notifications/{verb_slugified}-body.html.j2` with:

  ```jinja2
  {% extends "emails/notification-body.html.j2" %}
  ```

  You can copy the extended templates over to your project to customize them as well.

  Also check [their source code in this repository](baseapp_notifications/templates/emails/) to understand how you can customize the notification message for each notification's verb, for example, to customize the email notification message (defaults to what you passed to `description`):



  ```jinja2
  {# templates/emails/notifications/opened-body.html.j2 #}
  {% extends "emails/notification-body.html.j2" %}

  {% block notification_message %}
      {{ recipient.name }}'s custom notification message.
  {% endblock %}
  ```



  In you GraphQL schema it will expose the following queries, mutations and subscriptions. Please check your GraphiQL playground for better understanding



  ```graphql
  query {
    me {
      notificationsUnreadCount
      notifications
    }
  }
  ```



  ```graphql
  mutation {
    notificationsMarkAllAsRead(input: { read: true }) {
      recipient { notificationsUnreadCount }
    }

    notificationsMarkAsRead(input: { notificationIds: ["Tm90aWZpY2F0aW9uOjE=", "Tm90aWZpY2F0aW9uOjI="], read: true }) {
      recipient { notificationsUnreadCount }
    }
  }
  ```



  ```graphql
  subscription {
    onNotificationChange {
      createdNotification @prependEdge(connections: $connections) {
        node {
          ...NotificationCardFragment

          recipient {
            id
            notificationsUnreadCount
          }
        }
      }

      updatedNotification {
        ...NotificationCardFragment
      }

      deletedNotificationId @deleteRecord
    }
  }
  ```



  Create your `custom_notifications` django app inside your project and inherit from `AbstractNotification` like:

  ```python
  from baseapp_notifications.base import AbstractNotification

  class Notification(AbstractNotification):
    my_custom_field = models.CharField()

    class Meta(AbstractNotification.Meta):
          abstract = False
  ```

  Then make sure to change your `settings/base.py` like:

  ```python
  INSTALLED_APPS = [
    "baseapp_notifications",
    "custom_notifications", # need to have both
  ]

  NOTIFICATIONS_NOTIFICATION_MODEL = "custom_notifications.Notification"
  ```

  That's it, `my_custom_field` should be available in your GraphQL's Notification ObjectType as well.



  General development instructions can be found in [main README](..#how-to-develop).


pkgId: 63be724e47b6af881c362d2af31474c27212fd6c03a20c50605d95f9663e3f34
name: python-baseapp-profiles
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: BaseApp Profiles
url: https://github.com/silverlogic/baseapp-backend
rpm_license: BSD-3-Clause # Example license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-profiles-0.3.3-1.src.rpm
checksum_type: sha256
description:
  Reusable app to handle profiles, URL's paths and metadata. It provides useful models and GraphQL Interfaces.



  And install the package with `pip install baseapp-profiles`.

  If you want to develop, [install using this other guide](#how-to-develop).



  Add `baseapp_profiles` to your project's `INSTALLED_APPS` and run `./manage.py migrate` as any other django model:

  ```python
  INSTALLED_APPS = [
      'baseapp_profiles',
  ]
  ```

  Add `baseapp_profiles.middleware.CurrentProfileMiddleware` to the `MIDDLEWARE` list in your django settings file, make sure it is **after** `django.contrib.auth.middleware.AuthenticationMiddleware`.

  Add `baseapp_profiles.permissions.ProfilesPermissionsBackend` to the `AUTHENTICATION_BACKENDS` list in your django settings file.

  Expose `ProfilesMutations` and `ProfilesQuery` in your GraphQL/graphene endpoint, like:

  ```python
  from baseapp_profiles.graphql.mutations import ProfilesMutations
  from baseapp_profiles.graphql.queries import ProfilesQuery

  class Query(graphene.ObjectType, ProfilesQuery):
      pass

  class Mutation(graphene.ObjectType, ProfilesMutations):
      pass

  schema = graphene.Schema(query=Query, mutation=Mutation)
  ```



  `ProfileInterface` is a GraphQL interface that can be used to query for profiles. It has the following fields:

  - `profile` return the `Profile` for the object



  General development instructions can be found in [main README](..#how-to-develop).


pkgId: 767a1cd0ddf17ba984802d67b6838a5fad8b13cc84d57e59be46f1b5bbe8ffcd
name: python-baseapp-reactions
arch: src
version: 0.3.4
epoch: 0
release: 1
summary: BaseApp Reactions
url: https://github.com/silverlogic/baseapp-backend
rpm_license: BSD-3-Clause # Example license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseapp-reactions-0.3.4-1.src.rpm
checksum_type: sha256
description:
  Reusable app to enable User's reactions on any model, features like like/dislike or any other reactions type, customizable for project's needs.



  Install in your environment:

  ```bash
  pip install baseapp-reactions
  ```

  If you want to develop, [install using this other guide](#how-to-develop).



  Add `baseapp_reactions` to your project's `INSTALLED_APPS`

  ```python
  INSTALLED_APPS = [
      
      "baseapp_reactions",
      
  ]
  ```

  Add `baseapp_reactions.permissions.ReactionsPermissionsBackend` to the `AUTHENTICATION_BACKENDS` list in your django settings file.

  ```python
  AUTHENTICATION_BACKENDS = [
      
      "baseapp_reactions.permissions.ReactionsPermissionsBackend",
      
  ]
  ```

  Now make sure all models you'd like to get reactions also inherits `ReactableModel`, like:

  ```python
  from baseapp_reactions.models import ReactableModel

  class Comment(models.Model, ReactableModel):
      body = models.Textfield()
  ```

  Also make sure your GraphQL object types extends `ReactionsInterface` interface:

  ```python
  from baseapp_reactions.graphql.object_types import ReactionsInterface

  class CommentNode(DjangoObjectType):
      class Meta:
          interfaces = (relay.Node, ReactionsInterface)
  ```

  Expose `ReactionsMutations` and `ReactionsQueries` in your GraphQL/graphene endpoint, like:

  ```python
  from baseapp_reactions.graphql.mutations import ReactionsMutations
  from baseapp_reactions.graphql.queries import ReactionsQueries

  class Query(graphene.ObjectType, ReactionsQueries):
      pass

  class Mutation(graphene.ObjectType, ReactionsMutations):
      pass

  schema = graphene.Schema(query=Query, mutation=Mutation)
  ```

  This will expose `reactionToggle` mutation and add fields and connections to all your GraphqlQL Object Types using interface `ReactionsInterface`.

  Example:

  ```graphql
  {
      comment(id: $id) {
          id
          reactionsCount {
              LIKE
              DISLIKE
              total
          }
          reactions(first: 10) {
              edges {
                  node {
                      reactionType
                      user {
                          name
                      }
                  }
              }
          }
      }
  }
  ```



  In some cases you may need to extend Reaction model, and we can do it following the next steps:

  Start by creating a barebones django app:

  ```
  mkdir my_project/reactions
  touch my_project/reactions/__init__.py
  touch my_project/reactions/models.py
  ```

  Your `models.py` will look something like this:

  ```python
  from django.db import models
  from django.utils.translation import gettext_lazy as _

  from baseapp_reactions.models import AbstractBaseReaction

  class Reaction(AbstractBaseReaction):
      custom_field = models.CharField(null=True)

      class ReactionTypes(models.IntegerChoices):
          LIKE = 1, _("like")
          DISLIKE = -1, _("dislike")

          @property
          def description(self):
              return self.label
  ```

  Now make your to add your new app to your `INSTALLED_APPS` and run `makemigrations` and `migrate` like any normal django app.

  Now in your `settings/base.py` make sure to tell baseapp-reactions what is your custom model for Reaction:

  ```python
  BASEAPP_REACTIONS_REACTION_MODEL = 'reactions.Reaction'
  ```



  Clone the project inside your project's backend dir:

  ```
  git clone git@github.com:silverlogic/baseapp-backend.git
  ```

  And manually install the package:

  ```
  pip install -e baseapp-backend/baseapp-reactions
  ```

  The `-e` flag will make it like any change you make in the cloned repo files will effect into the project.


pkgId: 78acac34f985fc50447e0fa96675c8850ecff72056bd92b8f3663016152d6524
name: python-baseball_scorecard
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: API to programatically generate baseball scorecards as PDFs.
url: https://pypi.org/project/baseball_scorecard/
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseball_scorecard-0.1.2-1.src.rpm
checksum_type: sha256
description:
  Baseball Scorecard Generator offers a Python API to generate a series of
  Metapost files that can be compiled into a scorecard PDF.

  - [Baseball Scorecard Generator](#baseball-scorecard-generator)
    - [How to score a game](#how-to-score-a-game)
      - [Setting up the game data](#setting-up-the-game-data)
        - [Roster](#roster)
      - [Play ball!](#play-ball)
        - [Pitching substitution](#pitching-substitution)
        - [Defensive substitution](#defensive-substitution)
        - [Defensive switch](#defensive-switch)
        - [Offensive substitution](#offensive-substitution)
        - [At-bat](#at-bat)
          - [Batter methods](#batter-methods)
            - [Pitches](#pitches)
            - [Hit](#hit)
            - [Out](#out)
            - [Reach base](#reach-base)
          - [Runner methods](#runner-methods)
            - [Advance bases](#advance-bases)
            - [Thrown out](#thrown-out)
            - [Place runner on base](#place-runner-on-base)
          - [Other at-bat methods](#other-at-bat-methods)
            - [Error](#error)
            - [Balk](#balk)
            - [Wild pitch](#wild-pitch)
            - [Passed ball](#passed-ball)
            - [At base](#at-base)
            - [No at-bat](#no-at-bat)
      - [Noting win/loss/save pitchers](#noting-winlosssave-pitchers)
      - [Generating the Metapost files](#generating-the-metapost-files)
      - [Generating the PDF](#generating-the-pdf)
    - [Limitations](#limitations)
    - [Appendix](#appendix)
      - [Normal game data example](#normal-game-data-example)
      - [Extended roster game data example](#extended-roster-game-data-example)
    - [Credits](#credits)




  _Note: Example games and how to score certain plays are provided in the_
  _`examples` folder. Additional are available in the separate_
  _[examples](https://github.com/Vicyorus/BaseballScorecardGenerator-examples) repository._

  In order to start scoring a game, import the `scorecard` module on your
  Python script, and create a `Scorecard` object:

  ```
  from scorecard import Scorecard

  score = Scorecard(...)
  ```

  The `Scorecard` class has the following parameters:

  - `output_dir`: The location where the Metapost files will be deposited.
  - `data`: The data for the game to be scored.
  - `template_dir` (optional): A directory that holds custom templates for the
    scorecard.
    Expects the following files to exist: `'team_scorecard_template.mp`
    and `final_scorecard_template.tex`.
    If not specified, it will use the library's default templates.



  The game data expects the following information:

  - `extended_roster` (optional): If set to True, a different format for the roster
    is expected for each team. Check the [roster section](#roster) of this
    document for more information.
  - `scorer`: Name of the scorer.
  - `date`: Date of the game.
  - `at`: Baseball stadium where the game took place.
  - `att`: Official attendance.
  - `temp`: Temperature and weather at first pitch.
  - `wind`: Wind at first pitch.
  - `away`: Information about the away team.
  - `home`: Information about the home team.
  - `umpires`: Information about the umpires.

  For each team, the following information is expected:
  - `team`: Name of the team.
  - `starter`: Player ID for the starting pitcher.
  - `roster`: Dictionary of the players in the team.
  - `lefties`: List of player IDs for all left-handed pitchers.
  - `lineup`: List representing the lineup, each item is a list containing
    the player ID and their fielding position.
  - `bench`: List of player IDs that start the game in the bench.
  - `bullpen`: List of player IDs that start the game in the bullpen.

  For the umpire information, a dictionary is expected, where the keys are the
  position, and the value is the name of the umpire.
  Valid keys are `HP`, `1B`, `2B`, `3B`, `LF` and `RF`.



  The `roster` for a team is expected to be a key-value pair, where the key
  represents the **Player ID**, and the value is the player information.

  The format for the player information varies whether the `extended_roster`
  key on the data dictionary was set or not:

  - If the key is not set, the **Player ID** can be their jersey number, and the
    player data can be their name.
  - If the key is set, the format becomes the following:
    `1000: {"jersey": 1, "name": "John Doe"}`.
    `1000` becomes the **Player ID**, and the jersey number and name of the
    player can be specified in the inner dictionary.



  Once the `Scorecard` object is created, the game can be recorded.

  Start each frame by calling the `Scorecard.new_inning` method.

  ```
  inn = score.new_inning()
  ```

  From here, you can call the following functions:



  To register a pitching substitution, call the `pitching_substitution` method.

  ```
  inn.pitching_substitution(PITCHER_ID)
  ```

  Arguments:
  - `PITCHER_ID` (int): Player ID for the entering pitcher.



  To register a defensive substitution, call the `defensive_substitution` method.

  ```
  inn.defensive_substitution(ORDER, PLAYER_ID, POSITION)
  ```

  Arguments:
  - `ORDER` (int): Order in the lineup where the fielder will bat (1-9).
  - `PLAYER_ID` (int): Player ID for the entering fielder.
  - `POSITION` (str): Position in the field for the new player.



  To register a defensive switch, call the `defensive_switch` method.

  ```
  inn.defensive_switch(PLAYER_ID, POSITION)
  ```

  Arguments:
  - `PLAYER_ID` (int): Player ID for the fielder.
  - `POSITION` (str): New defensive position for the fielder.



  To register a offensive substitution, call the `offensive_substitution` method.

  ```
  inn.offensive_substitution(ORDER, PLAYER_ID, POSITION)
  ```

  Arguments:
  - `ORDER` (int): Order in the lineup where the batter will bat (1-9).
  - `PLAYER_ID` (int): Player ID for the entering batter.
  - `POSITION` (str): Position for the new player, can be either `PH` for a
    pinch-hitter, or `PR` for a pinch-runner.



  To start a new at-bat, call the `new_ab` method. This will automatically start
  an at-bat for the next batter on the batting team.

  ```
  inn.new_ab([IS_RISP])
  ```

  Arguments:
  - `IS_RISP` (bool, optional): Indicates to the scorecard generator that the
    result of this at-bat should be counted for the batting average with runners
    in scoring position statistic shown for the team.

  Once an at-bat is started, the following methods can be called:





  To register the pitches a batter received, use the `pitch_list` method.

  ```
  inn.pitch_list(PITCHES)
  ```

  Arguments:
  - `PITCHES` (str): List of pitches, each pitch separated by a space.
    The following codes are recognized:
    - `pso`: Pitcher step-off.
    - `1`, `2` or `3`: Pickoff attempts at 1B, 2B or 3B.
    - `vp`: Pitch clock violation on the pitcher, counts as a ball.
    - `ab`: Pitch clock violation on the batter, counts as a strike.
    - `s`: Swinging strike.
    - `c`: Called strike.
    - `f`: Foul.
    - `b`: Ball.
    - `d`: Ball in dirt.
    - `p`: Pitchout, counts as a ball.
    - `m`: Missed bunt attempt.
    - `t`: Foul tip.
    - `l`: Foul bunt.
    ***NOTE***: For balls put in play, it is not necessary to add a pitch, the
    batter functions will handle the pitch count automatically.



  To register a hit on the at-bat, use the `hit` method.

  ```
  inn.hit(BASES, [RBIS])
  ```

  Arguments:
  - `BASES` (int/str): The amount of bases the hit allowed, from 1-4.
    In case the hit is classified as an unearned home run, use `"U"`.
  - `RBIS` (int, optional): If the play resulted in runs batted in, set the
    number of RBIs. Default is 0.



  To register an out on the batter, use the `out` method.

  ```
  inn.out(PLAY, [RBIS])
  ```

  Arguments:
  - `PLAY` (str): The play on which the out was made.
    Starting the play with the following codes will automatically tally
    certain statistics:
    - `K`: Swinging strikeout.
    - `!K`: Called strikeout.
    - `SAC`: Sacrifice bunt.
    - `SF`: Sacrifice fly.
    - `DP`: Double play.
    - `TP`: Triple play.
  - `RBIS` (int, optional): If the play resulted in runs batted in, set the
    number of RBIs. Default is 0.



  To register the batter reaching base in a non-hit play, use the `reach` method.

  ```
  inn.reach(PLAY, [END_BASE], [RBIS])
  ```

  Arguments:
  - `PLAY` (str): The play on which the batter reached base.
    Starting the play with the following codes will automatically tally
    certain statistics:
    - `E`: Fielding error.
    - `BB`: Base on Balls.
    - `IBB`: Intent walk.
    - `HBP`: Hit by pitch.
    - `CI`: Catcher's interference.
    - `K`: Strikeout.
    - `SAC`: Sacrifice bunt.
    - `SF`: Sacrifice fly.
    - `DP`: Double play.
  - `END_BASE` (int, optional): If the batter-runner reached past 1B, use this
    argument. Default is 1 for 1B.
  - `RBIS` (int, optional): If the play resulted in runs batted in, set the
    number of RBIs. Default is 0.





  To register a runner advancing bases, use the `advance` method.

  ```
  inn.advance(END_BASE, PLAY)
  ```

  Arguments:
  - `END_BASE` (int/str): The final base reached by the batter on a play.
    - `2`: Second base.
    - `3`: Third base.
    - `4`: Home, for an earned run.
    - `U`: Home, for an unearned run.
  - `PLAY` (str): The play on which the runner advanced. If `SB` is used in the
    play, a stolen base is credited to the runner.



  To register a runner getting thrown out in the basepaths,
  use the `thrown_out` method.

  ```
  inn.thrown_out(OUT_BASE, PLAY, [OUT_NUMBER], [PITCHER_ID])
  ```

  Arguments:
  - `OUT_BASE` (int): The base where the out occurred.
    - `1`: First base.
    - `2`: Second base.
    - `3`: Third base.
    - `4`: Home plate.
  - `PLAY` (str): The play on which the runner advanced.
    If `CS` is used in the play, a caught stealing is credited to the runner.
    IF `PO` is used in the play, a pickoff is credited to the runner.
  - `OUT_NUMBER` (int, optional): Specific out number to use, otherwise the
    scorecard will assign the next available out.
  - `PITCHER_ID` (int, optional): Player ID of the pitcher that made the out.
    Useful for when pitching changes occur mid-inning and the new pitcher makes
    an out on an inherited runner.




  To register a runner getting placed on base, such as MLB's extra innings
  "ghost runner" or "Manfred runner", use the `place_runner` method.

  ```
  inn.place_runner([PLAYER_ID], [BASE], [LABEL])
  ```

  Arguments:
  - `PLAYER_ID` (int, optional): The player ID for the runner to be placed.
    If no player ID is provided, it will default to the player that precedes the
    leadoff batter for the inning.
  - `BASE` (int, optional): The base on which to place the runner.
    Defaults to `2` for 2B.
  - `LABEL` (str, optional): Label to put on the base in which the runner is placed.
    Defaults to `RP` for "runner placed".





  To register a fielding error, use the `error` method.

  ```
  inn.error(POSITION)
  ```

  Arguments:
  - `POSITION`: Position of the fielder who made the error (1-9).



  To register a balk, use the `balk` method.

  ```
  inn.balk()
  ```



  To register a wild pitch, use the `wp` method.

  ```
  inn.wp([QUANTITY])
  ```

  Arguments:
  - `QUANTITY` (int, optional): The number of wild pitches in the at-bat.
    Defaults to 1.



  To register a passed ball, use the `pb` method.

  ```
  inn.pb([QUANTITY])
  ```

  Arguments:
  - `QUANTITY` (int, optional): The number of passed balls in the at-bat.
    Defaults to 1.



  To make a comment at any given base, use the `atbase` method. Useful for
  noting down pinch-runners.

  ```
  inn.atbase(LABEL, [BASE])
  ```

  Arguments:
  - `LABEL` (str): The label to put at a given base.
  - `BASE` (int, optional): The base to put the label at. By default, it will be
    placed at 1B.



  To register that the batter was unable to complete their at-bat, likely
  due to the third out made on one of the runners in the middle of an at-bat,
  call the `no_ab` method.

  ```
  inn.no_ab(LABEL)
  ```

  Arguments:
  - `LABEL` (str): Label to put in the center of the diamond.



  Once the game has been recorded, note down the winning pitcher, losing pitcher
  and save pitcher with the following methods:

  ```
  score.winning_pitcher(PITCHER_ID, [IS_AWAY_TEAM])
  score.losing_pitcher(PITCHER_ID, [IS_AWAY_TEAM])
  score.save_pitcher(PITCHER_ID, [IS_AWAY_TEAM])
  ```

  Arguments:
  - `PITCHER_ID` (int): The player ID for the pitcher.
  - `IS_AWAY_TEAM` (bool): If the pitcher is from the away team, set this to `True`.
    Defaults to `False`, which credits a pitcher from the home team.



  Once all the plays have been registered, and the winning/losing/save pitchers
  have been registered, run the `generate_scorecard` method to generate
  the Metapost scorecards.

  ```
  score.generate_scorecard()
  ```

  This will generate a series of `.mp` files and a `.tex` file on the indicated
  folder that can be compiled into a PDF.



  Currently, integration with the Metapost compiler is not available.
  A compilation script is provided in the `examples` folder.



  - Currently, the Metapost code can only accomodate up to 20 innings safely.
    Anything else runs the risk to find a limitation with Metapost's
    coordenate system.





  Below is an example of a complete game data dictionary, taken from the
  New York Yankees @ Boston Red Sox 2018-08-03 game.

  ```python
  {
      "scorer": "Vicyorus",
      "date":   "2018-08-03 19:10-21:25",
      "at":     "Fenway Park, Boston, MA",
      "att":    "37,231",
      "temp":   "87F, Partly Cloudy",
      "wind":   "21mph, Out To CF",
      "away"   : {
          "team":    "New York Yankees",
          "starter": 40,
          "roster":  {
              
              11 : "Brett Gardner",
              27 : "Giancarlo Stanton",
              18 : "Didi Gregorius",
              31 : "Aaron Hicks",
              25 : "Gleyber Torres",
              33 : "Greg Bird",
              41 : "Miguel Andujar",
              28 : "Austin Romine",
              14 : "Neil Walker",

              
              40 : "Luis Severino",

              
              66 : "Kyle Higashioka",
              38 : "Shane Robinson",
              45 : "Luke Voit",

              
              67 : "A.J. Cole",
              68 : "Dellin Betances",
              36 : "Lance Lynn",
              55 : "Sonny Gray",
              56 : "Jonathan Holder",
              52 : "CC Sabathia",
              53 : "Zack Britton",
              19 : "Masahiro Tanaka",
              57 : "Chad Green",
              48 : "Tommy Kahnle",
              30 : "David Robertson",
              54 : "Aroldis Chapman",
          },
          "lefties" : [
              52, 53, 54
          ],
          "lineup" : [
              [11, "7"],
              [27, "9"],
              [18, "6"],
              [31, "8"],
              [25, "4"],
              [33, "3"],
              [41, "0"],
              [28, "2"],
              [14, "5"],
          ],
          "bench" : [
              [66, "C" ],
              [38, "CF"],
              [45, "1B"],
          ],
          "bullpen" : [
              67, 68, 36, 55, 56, 52, 53, 19, 57, 48, 30, 54
          ],
      },
      "home"   : {
          "team":    "Boston Red Sox",
          "starter": 22,
          "roster":  {
              
              50 : "Mookie Betts",
              16 : "Andrew Benintendi",
              25 : "Steve Pearce",
              28 : "J.D. Martinez",
              5  : "Ian Kinsler",
              36 : "Eduardo Núñez",
              12 : "Brock Holt",
              3  : "Sandy León",
              19 : "Jackie Bradley Jr.",

              
              22 : "Rick Porcello",

              
              18 : "Mitch Moreland",
              68 : "Dan Butler",
              2  : "Xander Bogaerts",

              
              47 : "Tyler Thornburg",
              44 : "Brandon Workman",
              31 : "Drew Pomeranz",
              61 : "Brian Johnson",
              37 : "Heath Hembree",
              24 : "David Price",
              46 : "Craig Kimbrel",
              76 : "Hector Velázquez",
              70 : "Ryan Brasier",
              56 : "Joe Kelly",
              17 : "Nathan Eovaldi",
              32 : "Matt Barnes",
          },
          "lefties" : [
              31, 61, 24
          ],
          "lineup" : [
              [50, "9"],
              [16, "7"],
              [25, "3"],
              [28, "0"],
              [5,  "4"],
              [36, "5"],
              [12, "6"],
              [3,  "2"],
              [19, "8"],
          ],
          "bench" : [
              [18, "1B"],
              [68, "C" ],
              [2,  "2B"],
          ],
          "bullpen" : [
              47, 44, 31, 61, 37, 24, 46, 76, 70, 56, 17, 32
          ],
      },
      "umpires" : {
          "HP" : "Adam Hamari",
          "1B" : "Phil Cuzzi",
          "2B" : "Chris Conroy",
          "3B" : "Dan Bellino",
      },
  }
  ```



  The following is an example of the game data if the `extended_roster` key
  is set to `True`, taken from the Seattle Mariners @ Boston Red Sox
  2024-07-29 game.

  The player IDs in this example correspond to the MLB.com IDs for each player.

  ```python
  {
      "extended_roster": True,
      "scorer": "Vicyorus",
      "date":   "2024-07-29 19:11-21:58",
      "at":     "Fenway Park, Boston, MA",
      "att":    "35,007",
      "temp":   "72F, Partly Cloudy",
      "wind":   "4mph, Out To RF",
      "away"   : {
          "team":    "Seattle Mariners",
          "starter": 669302,
          "roster":  {
              
              645302 : { "jersey" : 10, "name" : "Victor Robles" },
              668227 : { "jersey" : 56, "name" : "Randy Arozarena" },
              663728 : { "jersey" : 29, "name" : "Cal Raleigh" },
              593871 : { "jersey" : 7,  "name" : "Jorge Polanco" },
              670042 : { "jersey" : 20, "name" : "Luke Raley" },
              664238 : { "jersey" : 25, "name" : "Dylan Moore" },
              613564 : { "jersey" : 35, "name" : "Jason Vosler" },
              571745 : { "jersey" : 17, "name" : "Mitch Haniger" },
              668942 : { "jersey" : 4,  "name" : "Josh Rojas" },

              
              669302 : { "jersey" : 36, "name" : "Logan Gilbert" },

              
              682988 : { "jersey" : 27, "name" : "Tyler Locklear" },
              641598 : { "jersey" : 18, "name" : "Mitch Garver" },
              687799 : { "jersey" : 2,  "name" : "Cade Marlowe" },
              660844 : { "jersey" : 76, "name" : "Leo Rivas" },

              
              676092 : { "jersey" : 52, "name" : "Collin Snider" },
              608723 : { "jersey" : 30, "name" : "Austin Voth" },
              666619 : { "jersey" : 48, "name" : "Gregory Santos" },
              693433 : { "jersey" : 22, "name" : "Bryan Woo" },
              554340 : { "jersey" : 93, "name" : "Yimi García" },
              663423 : { "jersey" : 46, "name" : "Trent Thornton" },
              622491 : { "jersey" : 58, "name" : "Luis Castillo" },
              669923 : { "jersey" : 68, "name" : "George Kirby" },
              662253 : { "jersey" : 75, "name" : "Andrés Muñoz" },
              642048 : { "jersey" : 60, "name" : "Tayler Saucedo" },
              642100 : { "jersey" : 55, "name" : "Gabe Speier" },
              682243 : { "jersey" : 50, "name" : "Bryce Miller" },
          },
          "lefties" : [
              642048, 642100
          ],
          "lineup" : [
              [645302, "8"],
              [668227, "7"],
              [663728, "2"],
              [593871, "4"],
              [670042, "9"],
              [664238, "6"],
              [613564, "3"],
              [571745, "0"],
              [668942, "5"],
          ],
          "bench" : [
              [682988, "1B"],
              [641598, "DH"],
              [687799, "LF"],
              [660844, "SS"],
          ],
          "bullpen" : [
              676092, 608723, 666619, 693433, 554340, 663423, 622491, 669923, 662253, 642048, 642100, 682243
          ],
      },
      "home"   : {
          "team":    "Boston Red Sox",
          "starter": 601713,
          "roster":  {
              
              680776 : { "jersey" : 16, "name" : "Jarren Duran" },
              677800 : { "jersey" : 52, "name" : "Wilyer Abreu" },
              807799 : { "jersey" : 7,  "name" : "Masataka Yoshida" },
              646240 : { "jersey" : 11, "name" : "Rafael Devers" },
              641933 : { "jersey" : 17, "name" : "Tyler O'Neill" },
              642086 : { "jersey" : 2,  "name" : "Dominic Smith" },
              657136 : { "jersey" : 12, "name" : "Connor Wong" },
              666152 : { "jersey" : 70, "name" : "David Hamilton" },
              678882 : { "jersey" : 43, "name" : "Ceddanne Rafaela" },

              
              601713 : { "jersey" : 37, "name" : "Nick Pivetta" },

              
              642197 : { "jersey" : 73, "name" : "Jamie Westbrook" },
              663853 : { "jersey" : 23, "name" : "Romy Gonzalez" },
              608701 : { "jersey" : 30, "name" : "Rob Refsnyder" },
              643376 : { "jersey" : 28, "name" : "Danny Jansen" },

              
              677161 : { "jersey" : 76, "name" : "Zack Kelly" },
              572020 : { "jersey" : 65, "name" : "James Paxton" },
              678394 : { "jersey" : 66, "name" : "Brayan Bello" },
              592155 : { "jersey" : 71, "name" : "Cam Booser" },
              445276 : { "jersey" : 74, "name" : "Kenley Jansen" },
              670174 : { "jersey" : 25, "name" : "Josh Winckowski" },
              657514 : { "jersey" : 83, "name" : "Brennan Bernardino" },
              690544 : { "jersey" : 78, "name" : "Bailey Horn" },
              676710 : { "jersey" : 50, "name" : "Kutter Crawford" },
              622259 : { "jersey" : 61, "name" : "Trey Wingenter" },
              681867 : { "jersey" : 64, "name" : "Cooper Criswell" },
              656557 : { "jersey" : 89, "name" : "Tanner Houck" },
          },
          "lefties" : [
              572020, 592155, 657514, 690544
          ],
          "lineup" : [
              [680776, "8"],
              [677800, "9"],
              [807799, "0"],
              [646240, "5"],
              [641933, "7"],
              [642086, "3"],
              [657136, "2"],
              [666152, "4"],
              [678882, "6"],
          ],
          "bench" : [
              [642197, "2B"],
              [663853, "SS"],
              [608701, "RF"],
              [643376, "C" ],
          ],
          "bullpen" : [
              677161, 572020, 678394, 592155, 445276, 670174, 657514, 690544, 676710, 622259, 681867, 656557
          ],
      },
      "umpires" : {
          "HP" : "Andy Fletcher",
          "1B" : "Jansen Visconti",
          "2B" : "Cory Blaser",
          "3B" : "John Bacon",
      },
  }
  ```



  This project is heavily based on the work by Chris Nandor
  (https://sourceforge.net/projects/pudge/files/Games_Baseball_Scorecard/),
  and uses a modified version of the Metapost scorecard template created by
  Christopher Swingley (https://swingleydev.com/baseball/scorecards.php).


pkgId: 976abcf561e4ab05a2da5e36154c6c894e4c654282f64bb5c73e2742a9afa46f
name: python-baseballquery
arch: src
version: 0.0.3
epoch: 0
release: 1
summary: A library to query MLB stats including on a game level
url: https://github.com/jso8910/baseballquery
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseballquery-0.0.3-1.src.rpm
checksum_type: sha256
description:
  It's a stathead replacement, plain and simple.

  When you install this package and import it for the first time, it will download many GB of data from retrosheet. Eventually, it will be deleted, but you will get a total of 12 GB of data in the form of an hdf5 file. This is a lot of data, but it's necessary. This whole process (including calculating linear weights) can take upwards of half an hour so start running this in the background once you install it before you use it.

  Not implemented (as of when I finish this):
  - Park factors
  - Full game stats (saves, holds, shutouts, etc.) for pitchers. This one is probably important
  - GB%, LD%, FB%, and PU% will deviate from fangraphs due to differences in data and it being quite subjective. Also, Fangraphs FB is more similar to FB+PU so that's what I used in HR/FB% calculations.
      - This probably is impossible to fix
  - With splits, ERA is pretty much nonsense. Just because, even if a pitcher leaves the game, they are credited with an earned run if a runner they left on base scores. Even if they aren't eligible for the split.
      - In general, it's not really possible to coherently calculate ERA for splits. For example: if two hits come against righties then a lefty hits a homer, scoring 3 runs, is the earned runs against righties 0? or 1? or 2? It's not really possible to say. So, if you set any significant splits which eliminate PAs (basically anything other than set_split and set_subdivision), ignore ERA.


  Recipients of Retrosheet data are free to make any desired use of
  the information, including (but not limited to) selling it,
  giving it away, or producing a commercial product based upon the
  data.  Retrosheet has one requirement for any such transfer of
  data or product development, which is that the following
  statement must appear prominently:

       The information used here was obtained free of
       charge from and is copyrighted by Retrosheet.  Interested
       parties may contact Retrosheet at "www.retrosheet.org".

  Retrosheet makes no guarantees of accuracy for the information
  that is supplied. Much effort is expended to make our website
  as correct as possible, but Retrosheet shall not be held
  responsible for any consequences arising from the use of the
  material presented here. All information is subject to corrections
  as additional data are received. We are grateful to anyone who
  discovers discrepancies and we appreciate learning of the details.


pkgId: 8deae608dbab0809325033217f6860ff1c223c8196e49239d587f045631c23d1
name: python-baseband
arch: src
version: 4.2.0
epoch: 0
release: 1
summary: A package for radio baseband I/O
url: https://github.com/mhvk/baseband
rpm_license: GNU GPL v3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseband-4.2.0-1.src.rpm
checksum_type: sha256
description:
  Baseband is a package for reading and writing VLBI and other radio baseband
  files, with the aim of simplifying and streamlining data conversion and
  standardization.  It relies on `NumPy <http://www.numpy.org/>`_ and `Astropy
  <http://www.astropy.org/>`_.
  For installation and usage instructions, please see the `online documentation
  <https://baseband.readthedocs.io/>`_.
  If you used this package in your research, please cite it via DOI
  `10.5281/zenodo.1214268 <https://doi.org/10.5281/zenodo.1214268>`_.


pkgId: c890d1592d316a4247f81886113d8ffc066f272fb460c18dd21a523b29b619bf
name: python-baseblock
arch: src
version: 0.2.24
epoch: 0
release: 1
summary: Base Block of Common Enterprise Python Utilities
url: https://github.com/craigtrim/climate-bot
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseblock-0.2.24-1.src.rpm
checksum_type: sha256
description:
  Base Block of Common Enterprise Python Utilities



  Usage
  ```python
  from baseblock import CryptoBase

  key = CryptoBase.generate_private_key()
  ```

  The `key` is used to both encrypt and decrypt text, like this:
  ```python
  input_text = "Hello, World!"

  crypt = CryptoBase(key)

  x = crypt.encrypt_str(input_text)
  y = crypt.decrypt_str(x)

  assert input_text == y
  ```

  The key can also be stored in the environment under **BASEBLOCK_CRYPTO_KEY**.


pkgId: 748ff26dd556af46596388981409fd537162db062d8d725a2f52c88169b9485f
name: python-basecampapi
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/basecampapi/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basecampapi-1.2.0-1.src.rpm
checksum_type: sha256
description:
  This package allows simple interaction with [Basecamp API](https://github.com/basecamp/bc3-api) using Python.



  1. [Installation](https://github.com/mare011rs/basecampapi#1-installation)
  2. [Initial authentication: Getting your refresh token](https://github.com/mare011rs/basecampapi#2-initial-authentication-getting-your-refresh-token)
  3. [Authentication with Refresh token](https://github.com/mare011rs/basecampapi#3-authentication-with-refresh-token)
  4. [Attachments](https://github.com/mare011rs/basecampapi#4-attachments)
  5. [Additional information](https://github.com/mare011rs/basecampapi#5-additional-information)


  The package can be installed from your terminal by typing:

      pip install basecampapi

  You need to have python 3.7 or higher installed.







  To be able to interact with Basecamp's API, we need to provide an access token upon each API request. Basecamp's access tokens are set to expire 2 weeks after being generated, which is why we need to generate a refresh token.

  Refresh token allows us to automate the process of generating an access token. We only have to generate the refresh token once and after that we can use it to gain access to Basecamp each time we run our script.

  To gain access you need a developer app on Basecamp. App can be created on https://launchpad.37signals.com/integrations, after which you need to use the generated Client ID, Client Secret and the Redirect URI which you provided for initial authentication. You can read more about the authentication process on [Basecamp API Authentication](https://github.com/basecamp/api/blob/master/sections/authentication.md) page.

  To begin the authentication process, you need to create a dictionary with your app credentials and use it in the `Basecamp` object:

  ```python
  from basecampapi import Basecamp

  your_credentials = {
  	"account_id": "your-account-id",
  	"client_id": "your-client-id",
  	"client_secret": "your-client-secret",
  	"redirect_uri": "your-redirect-uri"
  }

  bc = Basecamp(credentials=your_credentials)
  ```
  Your account ID can be found on your Basecamp home page, in the URL address:
  > https:<SPAN></SPAN>//3.basecamp.com/<b>YOUR-ACCOUNT-ID</b>/projects

  If your credentials dictionary does not contain a "refresh_token", an error will be raised which contains a link for the authorization of your app. You need to open that link on the browser where you are logged into your Basecamp account and  click on "Yes, I'll allow access":

  ![Verification page](https://user-images.githubusercontent.com/24939829/209202366-bae05d01-5f8d-4ca6-a0f8-5e1eb9088acd.png  "Verification page")

  Clicking that button will redirect you to the link you provided as Redirect URI in your credentials, but it will have the verification code in the url address. Save that verification code:

  ![Verification code](https://user-images.githubusercontent.com/24939829/209202400-d2aa342b-70e1-4fd1-9787-2f3dc1280a57.png  "Verification code")

  Initiate the `Basecamp` object again, and provide the code you gathered via the `verification_code` parameter:

  ```python

  your_verification_code = "17beb4cd"

  bc = Basecamp(credentials=your_credentials, verification_code=your_verification_code)
  ```

  This will generate your Refresh token and use that token right away to generate the Access token for your current session. You need to generate your Refresh token only once, but that Refresh token will be used to generate Access token each time you initialize the `Basecamp` object.




  To interact with objects on Basecamp you have to initialize the `Basecamo` object. This object will generate your access token and allow you to interact with other Basecamp objects.

  ```python
  from basecampapi import Basecamp

  your_credentials = {
  	"account_id": "your-account-id",
  	"client_id": "your-client-id",
  	"client_secret": "your-client-secret",
  	"redirect_uri": "your-redirect-uri",
  	"refresh_token": "your-refresh-token"
  }

  bc = Basecamp(credentials=your_credentials)
  ```
  This generates the Access token which is then used in object that interact with Basecamp.

  ```python
  from basecampapi import Campfire


  your_campfire = Campfire(campfire_id='your-campfire-id', project_id='your-project-id')


  your_campfire.write(content="Hello from Python!")
  ```




  When attaching images or other files to Basecamp posts we do this by using [Rich text](https://github.com/basecamp/bc3-api/blob/3f71ee57b278be6e71f51488c71197f600395a2b/sections/rich_text.md), which means that we will be sending HTML as content to the Basecamp object we want to interact with.

  Sending rich text through API is not allowed on all Basecamp objects that have rich text by themselves. Best example are Campfires, when interacting with Basecamp you can upload images and files to a campfire or edit the text style, but Basecamp API does not allow this to be done programatically. Here is a [list](https://github.com/basecamp/bc3-api/blob/3f71ee57b278be6e71f51488c71197f600395a2b/sections/rich_text.md#rich-text-content-attributes) of Basecamp endpoints that can accept rich text.


  To upload a file to Basecamp, first we need upload the file to Basecamp's server and get its `attachable_sgid`. You can do this by using the `Attachments` object and its `upload_file()` method:

  ```python
  from basecampapi import Attachments

  my_att = Attachments()
  my_att.upload_file("folder/image.png", filename="my_image")
  ```
  After this the file will be on Basecamp's server and it will have an automatically generated `attachable_sgid` Uploaded files can be accessed through `Attachments.files` dictionary:
  ```python
  print(my_att.files)
  ```
  This returns a dictionary of dictionaries which contain information about the files you uploaded:
  ```python
  {
  	"my_image": {
  		'filename': 'my_image',
  		'file_size': '155291',
  		'content-type': 'image/png',
  		'sgid': 'your-file-sgid'
  		}
  }
  ```
  To attach a file inside a Basecamp post, comment or any other object where rich text is accessible through API, we need to send an HTML string  as the content parameter of the object we are interacting with, and we need to use the `<bc-attachment>` tag for any file attachments.

  ```python
  "<bc-attachment sgid='your-file-sgid'></bc-attachment>"
  ```

  Creating a new Message Board post on Basecamp with our uploaded image will look like this:
  ```python
  from basecampapi import MessageBoard


  content = "Hello world! <br> \
  	<bc-attachment sgid='#######' caption='My image'></bc-attachment> <br> \
  	This is an image sent from python."


  message_board = MessageBoard(project_id=123456, message_board_id=123456)


  message_board.create_message(subject="Test message", content=content)
  ```



  Currently available endpoints:
  - Campfire - allows reading campfire messages and writing to campfires
  - MessageBoard - allows reading, creating and updating messages, as well as reading, creating and updating comments on messages
  - Attachments - used for uploading files and attaching them to with other Basecamp objects

  Future upgrades:
  - Vaults (Docs & Files)
  - To-dos

  Request new features in [issues](https://github.com/mare011rs/basecampapi/issues).


pkgId: 5f26e7694b9d440ec78f3e9450f43ac81bde969bfd9e6869941ac378fb6eb617
name: python-basecase
arch: src
version: 4.32.10
epoch: 0
release: 1
summary: A complete web automation framework for end-to-end testing.
url: https://github.com/seleniumbase/SeleniumBase
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basecase-4.32.10-1.src.rpm
checksum_type: sha256
description:
  📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
  👤 Note that <span translate="no">SeleniumBase</span> <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b> (Stealth Mode) has its own ReadMe</a>.
  🐙 Also note that Seleniumbase <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b> has its own separate ReadMe</a>.
  ℹ️ Scripts can be called via <code translate="no"><b>python</b></code>, although some <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
  <p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>, which tests login, shopping, and checkout:</p>
  ```bash
  pytest my_first_test.py
  ```
  <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="520" /></a>


pkgId: 5fb6256bcaa5ab0186b240b4dfc7842fbedfd0dfd8d4dd6cb2c25df840a6257f
name: python-baseconnect
arch: src
version: 0.3
epoch: 0
release: 1
summary: Database connection library for SQL Server
url: https://github.com/Domiterd/BaseConnect
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseconnect-0.3-1.src.rpm
checksum_type: sha256
description:
  A Python library for easier SQL Server database connection .



  ```bash
  pip install

  usage:
  from baseconnect import Database


pkgId: fcd5fa03804c7b9321cda9cc5e048e01f5b220a200ad7838baab8c49825da50b
name: python-baseconnect
arch: src
version: 0.6
epoch: 0
release: 1
summary: Database connection library for SQL Server
url: https://github.com/Domiterd/BaseConnect
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseconnect-0.6-1.src.rpm
checksum_type: sha256
description:
  The BaseConnect library simplifies database operations for SQL Server by providing an easy-to-use Python interface.
  It abstracts repetitive tasks like connecting to the database, executing queries, and fetching data into pandas
  DataFrames. This package is built using pyodbc and pandas.



  To use BaseConnect, ensure you have the following dependencies installed:

  pyodbc: For database connection
  pandas: For data manipulation
  Install the dependencies using pip:

  ```bash
  pip install pyodbc pandas
  ```
  Include the BaseConnect package in your Python project structure.



  The Database class is the core component of the BaseConnect package.
  It provides methods for connecting to SQL Server, executing queries, and managing data.

  **Initialization**
  ```bash
  from baseconnect import Database
  ```
  ```bash
  db = Database(
      server="server_name",
      database="database_name",
      user="username",                           # Optional, for SQL authentication
      password="password",                       # Optional, for SQL authentication
      driver="ODBC Driver 17 for SQL Server"     # Default driver
  )
  ```

  * **server (str)**: The SQL Server hostname or IP address.
  * **database (str)**: The database name to connect to.
  * **user (str)**: (Optional) The username for SQL authentication. Leave empty for Windows Authentication.
  * **password (str)**: (Optional) The password for SQL authentication.
  * **driver (str)**: (Optional) The ODBC driver to use. Defaults to "ODBC Driver 17 for SQL Server."



  1. **connect()** - Establishes a connection to the SQL Server database.

  ```bash
  db.connect()
  ```
  _Output: Prints a success or error message._

  2. **close()**
  Closes the database connection.
  ```bash
  db.close()
  ```
  _Output: Prints a confirmation message when the connection is closed._

  3. **insert_row(row_data, table)**
  Inserts a new row into the specified table.
  ```bash
  row_data = {"column1": value1, "column2": value2, ...}
  table = "table_name"
  db.insert_row(row_data, table)
  ```
  Parameters:

  **row_data (dict)**: Dictionary where keys are column names and
  values are the respective data.

  **table (str)**: The table name where the row should be inserted.

  _Output: Prints a success or error message._

  4. **update_row(keys, updates, table)**
  Updates a row in the specified table.
  ```bash
  keys = {"primary_key_column": value}
  updates = {"column_to_update": new_value, ...}
  table = "table_name"
  db.update_row(keys, updates, table)
  ```


  Parameters:

  **keys (dict)**: Dictionary of key-value pairs used in the WHERE clause.

  **updates (dict)**: Dictionary of column-value pairs to update.

  **table (str)**: The table name where the update should occur.

  _Output: Prints a success or error message._

  5. **execute_query(query)**
  Executes a custom SQL query.
  ```bash
  query = "SELECT * FROM table_name WHERE column_name = 'value'"
  results = db.execute_query(query)
  ```
  Parameters:

  **query (str)**: The SQL query to execute.

  _Returns: List of tuples containing query results (if any)._

  6. **get_table(table)**
  Fetches all rows from the specified table and returns them as a pandas DataFrame.
  ```bash
  table = "table_name"
  table_df = db.get_table(table)
  ```
  Parameters:

  **table (str)**: The table name to fetch.

  _Returns: A pandas DataFrame containing all rows from the table._

  7. **query(query_string)**
  Executes a custom SQL query and returns the results as a pandas DataFrame.
  ```bash
  query_string = "SELECT * FROM table_name WHERE column_name = 'value'"
  query_df = db.query(query_string)
  ```
  Parameters:
  **query_string (str)**: The SQL query to execute.

  _Returns: A pandas DataFrame containing the query results._

  **Best Practices**

  Always close the database connection using close() to release resources.
  Handle exceptions for invalid queries or data input to prevent SQL injection.
  Use environment variables to store sensitive information like database credentials.

  **Error Handling**

  The Database class includes basic error handling, which prints error messages
  for connection failures or query errors.

  **Conclusion**

  BaseConnect is a flexible and efficient library for managing SQL Server databases in Python.
  With its intuitive interface and pandas integration, it is ideal for applications requiring data manipulation
  and analytics.


pkgId: e0dbece9f5f8760a799d6d4dacdbcd27dda8785d75c54d363b05b419fff96285
name: python-based-latex
arch: src
version: 0.0.61
epoch: 0
release: 1
summary: Generates properly baselined images and HTML code from LaTeX formulas.
url: https://github.com/wircho/based_latex
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-based-latex-0.0.61-1.src.rpm
checksum_type: sha256
description:
  Generates SVG image code from LaTeX formulas.



  ```
  pip install based_latex
  ```



  This package requires a [LaTeX distribution](https://www.latex-project.org/), as well as [Ghostscript](https://www.ghostscript.com/) and [Inkscape](https://inkscape.org/).



  Use the function `based_latex.get_latex_svg_data(expression)` to get a dictionary of the form

  ```
  {
  	dimensions: # Some dimension parameters (useful for HTML embedding)
  	svg: # The SVG code.
  }
  ```


pkgId: 805386e670a4ba5b4ee9265f501f40be0c5cc89f2b2a3d80ff354f8155f0bd87
name: python-basefunctions
arch: src
version: 0.4.2
epoch: 0
release: 1
summary: simple library to have some commonly used functions for everyday purpose
url: https://dev.azure.com/neuraldevelopment/basefunctions
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basefunctions-0.4.2-1.src.rpm
checksum_type: sha256
description:
      int
          The return value of the callable function.
  """
  import time
  import basefunctions

  class A(basefunctions.ThreadPoolUserObjectInterface):
      """
      class A
      """
      def callable_function(self, thread_local_data, input_queue, output_queue, message) -> int:
          """
          Summary:
          This method represents the task that will be executed by the
          ThreadPool.

rpm_license:
  MIT License  Copyright (c) 2023 NeuralDevelopment  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: 206daf6a64f630019236fa644a6d0e0d23a9798ac5605628e7b98517dbe40e95
name: python-basegun-ml
arch: src
version: 2.0.5
epoch: 0
release: 1
summary: A deeplearning package for the basegun weapon recognition app
url: https://pypi.org/project/basegun-ml/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basegun-ml-2.0.5-1.src.rpm
checksum_type: sha256
description:
  Basegun_ml is a deeplearning package for the basegun weapon recongition app.


  ```
  pip install basegun-ml
  ```



  **Gun Mechanism Classification**: This feature categorizes an image into a list of families representing different firearm mechanisms. The classification is based on descriptive, objective criteria that are independent of legal classification.
  ```Python
  from basegun_ml.classification import get_typology, list_typologies



  with open("test.jpg", "rb") as file:
      image_bytes = file.read()


  typology,confidence_score,confidence_level=get_typology(image_bytes)


  list_typologies()

  ```

  <li> <b>typology</b>: it corresponds to the weapon class predicted from the image. The list of typologies can be obtained from the function

  <li> <b>confidence_score</b>: it corresponds to the confidence of the class prediction of the algorithm, the closer to 1 to more confident is the prediction

  <li> <b>confidence_level</b>: there are 3 level of confidence defined. According to this performance level the basegun user will have more information.


  **Measure Length Module**: Measuring the overall length of a firearm or its barrel length is crucial for its legal classification. In France, the classification of long guns depends on these measurements. This module measures these lengths using an image.

  ```Python
  from basegun_ml.measure import get_lengths


  with open("test.jpg", "rb") as file:
      image_bytes = file.read()


  weapon_length,barrel_length,confidence_card=get_lengths(image_bytes)
  ```

  <li> <b>weapon_length</b>: it corresponds to the weapon overall length predicted from the image.

  <li> <b>barrel_length</b>: it corresponds to the barrel length of the weapon predicted from the image.

  <li> <b>confidence_card</b>: it corresponds to the confidence score for the card prediction. A card is used as a reference for the measure module

  <li> If the gun is not detected, the exception <b>MissingGun</b> is raised

  <li> If the card is not detected, the exception <b>MissingCard</b> is raised


  **Alarm Gun Recognition**: An alarm gun is a type of blank gun recognized as an alarm by French legislation. These guns are considered impossible to modify to make them lethal. The associated algorithm detects alarm guns using markings on the weapon.
  ```Python
  from basegun_ml.ocr import is_alarm_weapon



  with open("test.jpg", "rb") as file:
      image_bytes = file.read()


  alarm_model = is_alarm_weapon(image_bytes, quality_check=True )


  ```

  <li> <b>alarm_model</b> if the gun is one of the alarm model it returns "Alarm_model". If the gun has the PAK marking then alarm_model returns "PAK" else it return "Not_alarm"

  <li> <b>quality_check</b> specify if the quality analysis is run before the text detection

  <li> If the image quality is too low, the exception <b>LowQuality</b> is raised

  <li> If no text is detected, the exception <b>MissingText</b> is raised




  Tests are available for the classification task and the measure length task
  ```
  pytest tests/test_classification.py
  pytest tests/test_measure.py
  pytest tests/test_OCR.py
  ```


  - This project uses the [Ultralytics Library](https://github.com/ultralytics/ultralytics)
  - The oriented bounding box detection is inspired from [this YOLOV5 implementation](https://github.com/hukaixuan19970627/yolov5_obb)
  - The image quality analysis uses [Pyiqa](https://github.com/chaofengc/IQA-PyTorch)
  - The OCR tasks are computed using [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR?tab=readme-ov-file)

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


pkgId: 356377f4937c1cd27572a9ad21da33063515c0e03df1b58e8dbe02f08feffc05
name: python-baselime-opentelemetry
arch: src
version: 0.2.14
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/baselime-opentelemetry/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baselime-opentelemetry-0.2.14-1.src.rpm
checksum_type: sha256
description:
  [![Documentation][docs_badge]][docs]
  [![Latest Release][release_badge]][release]
  [![License][license_badge]][license]

  Instrument your Python applications with OpenTelemetry and send the traces to [Baselime](https://baselime.io)



  Check out the [documentation](https://baselime.io/docs/sending-data/opentelemetry/).



  ```bash
  poetry add baselime-opentelemetry

  BASELIME_API_KEY=<YOUR_API_KEY> poetry run opentelemetry-instrument python myapp.py
  ```



  &copy; Baselime Limited, 2023

  Distributed under MIT License (`The MIT License`).

  See [LICENSE](LICENSE) for more information.

  <!-- Badges -->

  [docs]: https://baselime.io/docs/
  [docs_badge]: https://img.shields.io/badge/docs-reference-blue.svg?style=flat-square
  [release]: https://github.com/baselime/node-opentelemetry/releases/latest
  [release_badge]: https://img.shields.io/github/release/baselime/node-opentelemetry.svg?style=flat-square&ghcache=unused
  [license]: https://opensource.org/licenses/MIT
  [license_badge]: https://img.shields.io/github/license/baselime/node-opentelemetry.svg?color=blue&style=flat-square&ghcache=unused


pkgId: 28333fb072b649624e2e66424c5f5e53dbc6eb5a09bcde455c051562c3a28a74
name: python-basemap-data
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: Data assets for matplotlib basemap
url: https://matplotlib.org/basemap
rpm_license: GNU Lesser General Public License v3 or later (LGPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basemap-data-1.3.2-1.src.rpm
checksum_type: sha256
description:
  Plot on map projections (with coastlines and political boundaries) using
  [`matplotlib`].

  This is a support package for [`basemap`] with the basic data assets
  required by [`basemap`] to work.



  The package is available in PyPI and can be installed with [`pip`]:
  ```python
  python -m pip install basemap-data
  ```



  The land-sea mask, coastline, lake, river and political boundary data
  are extracted from the [GSHHG] datasets (version 2.3.6) using [GMT]
  (5.x series) and are included under the terms of the [LGPLv3+] license
  (see [`COPYING`] and [`COPYING.LESSER`]).

  The other files are included under the terms of the [MIT] license. See
  [`LICENSE.epsg`] for the EPSG file (taken from the PROJ.4 package) and
  [`LICENSE.mit`] for the rest.


  [`matplotlib`]:
  https://matplotlib.org/
  [`basemap`]:
  https://matplotlib.org/basemap/
  [`pip`]:
  https://pip.pypa.io/

  [GSHHG]:
  https://www.soest.hawaii.edu/pwessel/gshhg
  [GMT]:
  https://www.generic-mapping-tools.org/

  [LGPLv3+]:
  https://spdx.org/licenses/LGPL-3.0-or-later.html
  [MIT]:
  https://spdx.org/licenses/MIT.html

  [`COPYING`]:
  https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/COPYING
  [`COPYING.LESSER`]:
  https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/COPYING.LESSER
  [`LICENSE.epsg`]:
  https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/LICENSE.epsg
  [`LICENSE.mit`]:
  https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/LICENSE.mit


pkgId: 730a8e12b3b38cfb78e4069f21303f274229a2b6fb1f0f1037b64ca547367e4f
name: python-basemap-data-hires
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: High-resolution data assets for matplotlib basemap
url: https://matplotlib.org/basemap
rpm_license: GNU Lesser General Public License v3 or later (LGPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basemap-data-hires-1.3.2-1.src.rpm
checksum_type: sha256
description:
  Plot on map projections (with coastlines and political boundaries) using
  [`matplotlib`].

  This is an optional package for [`basemap`] with the high-resolution
  data assets.



  The package is available in PyPI and can be installed with [`pip`]:
  ```python
  python -m pip install basemap-data-hires
  ```



  The land-sea mask, coastline, lake, river and political boundary data
  are extracted from the [GSHHG] datasets (version 2.3.6) using [GMT]
  (5.x series) and are included under the terms of the [LGPLv3+] license
  (see [`COPYING`] and [`COPYING.LESSER`]).


  [`matplotlib`]:
  https://matplotlib.org/
  [`basemap`]:
  https://matplotlib.org/basemap/
  [`pip`]:
  https://pip.pypa.io/

  [GSHHG]:
  https://www.soest.hawaii.edu/pwessel/gshhg
  [GMT]:
  https://www.generic-mapping-tools.org/

  [LGPLv3+]:
  https://spdx.org/licenses/LGPL-3.0-or-later.html
  [`COPYING`]:
  https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data_hires/COPYING
  [`COPYING.LESSER`]:
  https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data_hires/COPYING.LESSER


pkgId: 27cdf478d90181ddd535d8f5f7d7deaa9d1c9528f3455b0da5273b6165fc413c
name: python-basepair
arch: src
version: 2.1.12
epoch: 0
release: 1
summary: Python client for Basepair's API
url: https://bitbucket.org/basepair/basepair
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basepair-2.1.12-1.src.rpm
checksum_type: sha256
description:
  Python bindings for Basepair's API and command line interface (CLI).

  **Note: It is advisable to use MFA for increased security and best practices**
  After you have been added to the list of collaborators, you can verify if MFA has been activated for you by visiting [collaboration page](https://pypi.org/manage/project/basepair/collaboration/)

  ```BASH
  python setup.py sdist bdist_wheel # This will create two files in a newly created dist directory, a source archive and a wheel:
  twine upload dist/* # To upload it to Pypi
  Uploading distributions to https://upload.pypi.org/legacy/
  Enter your username:
  Enter your password:
  ```
  Note: `username` must be `__token__` (not your pypi username)
  `password` is the token. You may generate the token -> [token creation page](https://pypi.org/manage/account/token/).
  That is it!
  Below is a successful execution sample:
  ```
  Uploading distributions to https://upload.pypi.org/legacy/
  Enter your username: __token__
  Enter your password:
  Uploading basepair-2.0.7-py3-none-any.whl
  100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.0/51.0 kB • 00:00 • 36.3 MB/s
  Uploading basepair-2.0.7.tar.gz
  100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 37.4/37.4 kB • 00:00 • 47.2 MB/s
  View at:
  https://pypi.org/project/basepair/2.0.7/
  ```


pkgId: e730d8d428421059c14cd7ba13da2dc144558fe1364755db304ecfcfaed55ff1
name: python-basepak
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/basepak/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basepak-0.0.11-1.src.rpm
checksum_type: sha256
description:
  Basepak provides a toolset to interact with the Iguazio platform and create scripts in the Iguazio environment.

  - [Installation](#installation)
  - [Getting Started](#Getting-Started)
  - [License](#license)

  ```console
  pip install basepak
  ```

  TBD

  `basepak` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.


pkgId: 75b4774974378fea7a657177fb59875d916c259b382916c541e1409537495706
name: python-baseplate
arch: src
version: 2.7.0
epoch: 0
release: 1
summary: reddit's python service framework
url: https://github.com/reddit/baseplate.py
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseplate-2.7.0-1.src.rpm
checksum_type: sha256
description:
  +++ b/requirements.txt
  -baseplate==2.5.7
  +git+https://github.com/reddit/baseplate.py@<ref>#egg=baseplate
  ```
  In this case the ref can be either a commit hash or a branch name. After making
  this update you can check if the service works in Snoodev.
  > **Warning**
  > Never deploy this change to production. Production should always use a Baseplate
  > semantic version that has been tagged, and released.


pkgId: 0d7c354de499e109943a73fc6d8c9076372bc1d58984ded627f28b33a4c13f63
name: python-baserowsdk
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: Baserow OpenAPI Python SDK
url: https://pypi.org/project/baserowsdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baserowsdk-0.0.8-1.src.rpm
checksum_type: sha256
description:
  python3.8 +



  ```shell
  pip install --upgrade baserowsdk
  ```




  ```python
  from baserowsdk import Client

  client = Client(
      api_key="your_api_key",
      base_url="http://your.baserow.domain"
  )
  ```


  ```python

  fields = client.fields(table_id=182)
  print(fields)
  ```


  ```python

  base = client.base(39)
  row = base.table(182).row(row_id=1)
  print(row)


  rows = base.table(182).select(page_size=100)
  print(rows)
  ```


  ```python

  row = client.base(39).table(182).create(
      fields={"黑话改写_输入": "1234567890","黑话改写_输出": "1234567890"}
  )
  print(row)
  ```


  ```python

  updated_row = client.base(39).table(182).update(
      row_id=6,
      fields={
          "执行批次ID": "BATCH-001",
          "测试用例": [1, 2, 3]  # 关联字段支持多值
      },
      user_field_names=True  # 使用用户定义的字段名
  )
  print(updated_row)
  ```


  ```python

  client.base(39).table(182).delete(row_id=7)
  ```


pkgId: 142f22a73ebc2ce00ba7db18f896217c70553d53e7394d27e345d2cf912f3ed3
name: python-baserowsdk
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Baserow OpenAPI Python SDK
url: https://pypi.org/project/baserowsdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baserowsdk-0.1.1-1.src.rpm
checksum_type: sha256
description:
  python3.8 +



  ```shell
  pip install --upgrade baserowsdk
  ```




  ```python
  from baserowsdk import Client

  client = Client(
      api_key="your_api_key",
      base_url="http://your.baserow.domain"
  )
  ```


  ```python

  fields = client.fields(table_id=182)
  print(fields)
  ```


  ```python

  base = client.base(39)
  row = base.table(182).row(row_id=1)
  print(row)


  rows = base.table(182).select(page_size=100)
  print(rows)




  rows = base.table(182).select(page_size=100, cache_senconds=10)
  print(rows)
  ```


  ```python

  row = client.base(39).table(182).create(
      fields={"黑话改写_输入": "1234567890","黑话改写_输出": "1234567890"}
  )
  print(row)
  ```


  ```python

  updated_row = client.base(39).table(182).update(
      row_id=6,
      fields={
          "执行批次ID": "BATCH-001",
          "测试用例": [1, 2, 3]  # 关联字段支持多值
      },
      user_field_names=True  # 使用用户定义的字段名
  )
  print(updated_row)
  ```


  ```python

  client.base(39).table(182).delete(row_id=7)
  ```


pkgId: be74024488a5ce4afba9fb71af164d7f2cf00786ea9d70f2d47f24f615f8b22d
name: python-baserun
arch: src
version: 2.0.9
epoch: 0
release: 1
summary: tools for testing, debugging, and evaluating llm features.
url: https://baserun.ai
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baserun-2.0.9-1.src.rpm
checksum_type: sha256
description:
  [![](https://img.shields.io/badge/Visit%20Us-baserun.ai-brightgreen)](https://baserun.ai)
  [![](https://img.shields.io/badge/View%20Documentation-Docs-yellow)](https://docs.baserun.ai)
  [![](https://img.shields.io/badge/Join%20our%20community-Discord-blue)](https://discord.gg/xEPFsvSmkb)
  [![Twitter](https://img.shields.io/twitter/follow/baserun.ai?style=social)](https://twitter.com/baserunai)

  **[Baserun](https://baserun.ai)** is the testing and observability platform for LLM apps.





  ```bash
  pip install baserun
  ```


  Create an account at [https://baserun.ai](https://baserun.ai). Then generate an API key for your project in the [settings](https://baserun.ai/settings) tab. Set it as an environment variable:

  ```bash
  export BASERUN_API_KEY="your_api_key_here"
  ```



  In order to have Baserun trace your LLM Requests, all you need to do is import `OpenAI` from `baserun` instead of `openai`. Creating an OpenAI client object automatically starts the trace, and all future LLM requests made with this client object will be captured.

  <CodeGroup>

  ```python python
  from baserun import OpenAI


  def example():
      client = OpenAI()
      completion = client.chat.completions.create(
          name="Paris Activities",
          model="gpt-4o",
          temperature=0.7,
          messages=[
              {
                  "role": "user",
                  "content": "What are three activities to do in Paris?"
              }
          ],
      )


  if __name__ == "__main__":
      print(example())
  ```



  If, for some reason, you don't wish to use Baserun's OpenAI client, you can simply wrap your normal OpenAI client using `init`.

  ```python python
  from baserun import init

  client = init(OpenAI())
  ```

  </CodeGroup>



  When you start a trace by initializing an OpenAI object, there are several _optional_ parameters you can set for that trace:

  - `name`: A customized name for the trace
  - `result`: Some end result or output for the trace
  - `user`: A username or user ID to associate with this trace.
  - `session`: A session ID to associate with this trace.
  - `trace_id`: A previously-generated or custom UUID (e.g. to continue a previous trace)

  ```python
  from baserun import OpenAI

  def example():
      client = OpenAI(result="What are three activities to do in Paris?")
      client.name = "Example"
      client.user = "user123"
      client.session = "session123"

      completion = client.chat.completions.create(
          name="Paris Activities",
          model="gpt-4o",
          temperature=0.7,
          messages=[
              {
                  "role": "user",
                  "content": "What are three activities to do in Paris?"
              }
          ],
      )
      client.result = "Done"
  ```





  You can perform evals directly on a completion object. The `includes` eval is used here as an example, and checks if a string is included in the completion's output. The argument passed to `eval()` is a name or label used for your reference.

  ```python
  from baserun import OpenAI

  def example():
      client = OpenAI()
      completion = client.chat.completions.create(
          model="gpt-4o",
          temperature=0.7,
          messages=[
              {
                  "role": "user",
                  "content": "What are three activities to do in Paris?"
              }
          ],
      )
      client.eval("include_eiffel_tower").includes("Eiffel Tower")
  ```



  You can add tags either to the traced OpenAI object or to the completion. There are several different types of tags:

  - `log`: Any arbitrary logs you want to attach to a trace or completion
  - `feedback`: Any score-based feedback given from users (e.g. thumbs up/down, star rating)
  - `variable`: Any variables used, e.g. while rendering a template
  - `custom`: Any arbitrary attributes you want to attach to a trace or completion

  Each tag type has functions on traced OpenAI objects and completions. Each tag function can accept a `metadata` parameter which is an arbitrary dictionary with any values you might want to capture.

  ```python
  from baserun import OpenAI

  def example():
      client = OpenAI()
      client.log("Gathering user input")
      city = input()
      completion = client.chat.completions.create(
          model="gpt-4o",
          temperature=0.7,
          messages=[
              {
                  "role": "user",
                  "content": f"What are three activities to do in {city}?"
              }
          ],
      )
      completion.variable("city", city)
      user_score = input()
      client.feedback("User Score", score=user_score, metadata={"My key": "My value"})
  ```



  After a trace has been completed you may wish to add additional tags to a trace or completion. For example, you might have user feedback that is gathered well after the fact. To add these tags, you need to store the `trace_id`, and, if the tag is for a completion, the `completion_id`. You can then use the `tag`, `log`, or `feedback` functions to submit those tags.

  ```python
  from baserun import OpenAI, log, feedback

  client = OpenAI(name="trace to be resumed")
  completion = client.chat.completions.create(
      name="completion to be resumed",
      model="gpt-4o",
      messages=[{"role": "user", "content": "What are three activities to do in Paris?"}],
  )


  trace_id = client.trace_id
  completion_id = completion.completion_id


  log("Tagging resumed", trace_id=trace_id, completion_id=completion_id)
  feedback("User satisfaction", 0.9, trace_id=trace_id, completion_id=completion_id)
  ```


  Baserun ships with support for OpenAI and Anthropic. If you use another provider or library, you can still use Baserun by manually creating "generic" objects. Notably, generic completions _must be submitted_ explicitly using `submit_to_baserun`. Here's what that looks like:

  ```python
  question = "What is the capital of the US?"
  response = call_my_custom_model(question)

  client = GenericClient(name="My Traced Client")
  completion = GenericCompletion(
      model="my custom model",
      name="My Completion",
      input_messages=[GenericInputMessage(content=question, role="user")],
      choices=[GenericChoice(message=GenericCompletionMessage(content=response))],
      client=client,
      trace_id=client.trace_id,
  )
  completion.submit_to_baserun()
  ```



  Baserun has built-in support for the `datasets` library by HuggingFace. You can use the `Dataset` class to submit datasets. See the [HuggingFace documentation](https://huggingface.co/docs/datasets/index) to learn more about the `datasets` library.

  Once you have loaded your dataset, you can submit it to Baserun by using the `submit_dataset` function.

  ```python
  from datasets import Dataset
  from baserun import submit_dataset


  data_samples = {
      "question": ["When was the first super bowl?"],
      "answer": ["The first Super Bowl was held on January 15, 1967. It took place at the Los Angeles Memorial Coliseum in Los Angeles, California."],
      "contexts": [
          [
              "The First AFL–NFL World Championship Game was an American football game played on January 15, 1967, at the Los Angeles Memorial Coliseum in Los Angeles,"
          ],
      ],
      "ground_truth": [
          "The first Super Bowl was held on January 15, 1967",
      ],
  }

  dataset = Dataset.from_dict(data_samples)
  submit_dataset(dataset, "questions")
  ```



  Once you have submitted a dataset, you can use the `get_dataset` function to retrieve it. The retrieved dataset can automatically create scenarios from your data. From there, you can easily evaluate these scenarios by using the `evaluate` function:

  ```python
  from baserun import OpenAI, evaluate

  dataset = await get_dataset(name="capital questions")
  question = "What is the capital of {country}?"

  client = OpenAI()
  experiment = Experiment(dataset=dataset, client=client, name="Dataset online eval run")
  for scenario in experiment.scenarios:
      evaluators = [Includes(scenario=scenario, expected="{city}"), Correctness(scenario=scenario, question=question)]

      completion = client.chat.completions.create(
          name=scenario.name,
          model="gpt-4o",
          messages=scenario.format_messages([{"role": "user", "content": question}]),
          variables=scenario.input,
      )
      output = completion.choices[0].message.content
      client.output = output
      scenario.actual = output

      evaluate(evaluators, scenario, completion=completion)
  ```



  For a deeper dive on all capabilities and more advanced usage, please refer to our [Documentation](https://docs.baserun.ai).



  [MIT License](https://github.com/baserun-ai/baserun-py/blob/main/LICENSE)

rpm_license:
  MIT License  Copyright (c) 2023 Mochi Labs, Inc.  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: 003c5e55239030e16a6b36149b67ce822196a6cd5cd94c29881b664a5b2daea9
name: python-bases
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: Python library for general Base-N encodings.
url: https://github.com/hashberg-io/bases
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bases-0.3.0-1.src.rpm
checksum_type: sha256
description:
  Bases provides a customisable, parametric implementation of several common styles of Base-N encoding, covering all cases appearing in the `multibase specification <https://github.com/multiformats/multibase>`_ (except for proquints).


pkgId: baa0d0cc7c78b379fce5a74995f658a5deea0651741b98923a4b642eb8bd8731
name: python-baseten
arch: src
version: 0.8.2
epoch: 0
release: 1
summary: Deploy machine learning models to Baseten
url: https://baseten.co
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseten-0.8.2-1.src.rpm
checksum_type: sha256
description:
  This is the Python client for [Baseten](https://baseten.co) and [Blueprint](https://blueprint.baseten.co).



  Install the latest version of the `baseten` package:

  ```sh
  pip install --upgrade baseten
  ```



  Baseten is a hosted platform for building ML-powered applications. Build apps with auto-scaling, GPU access, CRON jobs, and serverless functions.

  Visit our official documentation for Baseten at [docs.baseten.co](https://docs.baseten.co).



  Blueprint is the model fine-tuning and serving infrastructure for developers. It's powered by Baseten infrastructure and uses the baseten PyPi package.

  Visit our official documentation for Blueprint at [docs.blueprint.baseten.co](https://docs.blueprint.baseten.co).


pkgId: 89d87af9e196bfb674b155a59b271123293eeaa371001f5546406d29eea0575b
name: python-baseweb
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: A Pythonic base for building interactive web applications
url: https://github.com/christophevg/baseweb
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseweb-0.4.0-1.src.rpm
checksum_type: sha256
description:
  > A Pythonic base for building interactive web applications

  [![Latest Version on PyPI](https://img.shields.io/pypi/v/baseweb.svg)](https://pypi.python.org/pypi/baseweb/)
  [![Supported Implementations](https://img.shields.io/pypi/pyversions/baseweb.svg)](https://pypi.python.org/pypi/baseweb/)
  ![Build Status](https://github.com/christophevg/baseweb/actions/workflows/test.yaml/badge.svg)
  [![Documentation Status](https://readthedocs.org/projects/baseweb/badge/?version=latest)](https://baseweb.readthedocs.io/en/latest/?badge=latest)
  [![Coverage Status](https://coveralls.io/repos/github/christophevg/baseweb/badge.svg?branch=master)](https://coveralls.io/github/christophevg/baseweb?branch=master)
  [![Built with PyPi Template](https://img.shields.io/badge/PyPi_Template-v0.6.1-blue.svg)](https://github.com/christophevg/pypi-template)





  Visit [Read the Docs](https://baseweb.readthedocs.org) for the full documentation, including overviews and several examples.


pkgId: 7f5f03216d6a138c014bcb1a6c7a16bc0061d6ca83b56d5f2fbd744f82b6ead8
name: python-baseweb
arch: src
version: 0.4.2
epoch: 0
release: 1
summary: A Pythonic base for building interactive web applications
url: https://github.com/christophevg/baseweb
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baseweb-0.4.2-1.src.rpm
checksum_type: sha256
description:
  > A Pythonic base for building interactive web applications

  [![Latest Version on PyPI](https://img.shields.io/pypi/v/baseweb.svg)](https://pypi.python.org/pypi/baseweb/)
  [![Supported Implementations](https://img.shields.io/pypi/pyversions/baseweb.svg)](https://pypi.python.org/pypi/baseweb/)
  ![Build Status](https://github.com/christophevg/baseweb/actions/workflows/test.yaml/badge.svg)
  [![Documentation Status](https://readthedocs.org/projects/baseweb/badge/?version=latest)](https://baseweb.readthedocs.io/en/latest/?badge=latest)
  [![Coverage Status](https://coveralls.io/repos/github/christophevg/baseweb/badge.svg?branch=master)](https://coveralls.io/github/christophevg/baseweb?branch=master)
  [![Built with PyPi Template](https://img.shields.io/badge/PyPi_Template-v0.8.0-blue.svg)](https://github.com/christophevg/pypi-template)





  Visit [Read the Docs](https://baseweb.readthedocs.org) for the full documentation, including overviews and several examples.


pkgId: cf44984e9dd4e594c2ed4d4b166711b6ae10d84049f25e895887118f94d70b69
name: python-basextools
arch: src
version: 0.0.20
epoch: 0
release: 1
summary: Tools for EX Analysis
url: https://pypi.org/project/basextools/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basextools-0.0.20-1.src.rpm
checksum_type: sha256
description:
  A package with basic functionalities for EX Analysis


  To install the package, run the following:
  ```bash
  pip install basextools
  ```
  Then you can use it's modules, by importing it in your code, as below:
  ```python
  import basex
  ```
  or
  ```python
  from basex import ada
  ```


  - **ada (Algorithms for Data Arithmetics, also Ada Lovelace)**: CÃ¡lculos bÃ¡sicos. Ex. eNPS e favorabilidades.
  - **bender (Biblioteca de ENcapsulamento de Dados e ExtraÃ§Ãµes Recorrentes)**: FunÃ§Ãµes relacionadas a tratamento\
  de bases a partir do DW. Ex.: puxar respostas a partir de um CP.
  - **chandler (Creation of Heatmaps AND Large Extensions of Rows, also Chandler Bing)**: CriaÃ§Ã£o de heatmaps (nÃ£o\
  grÃ¡ficos) e tabelas.
  - **lygia (LibrarY for Graphics, Images and Art, also Lygia Clark)**: GrÃ¡ficos bÃ¡sicos e derivados de produtos,\
  inclusive com padrÃ£o de cores. Ex. gauge eNPS e barras de favorabilidades.
  - **comments (still needs a cool name)**: ManipulaÃ§Ã£o de comentÃ¡rios.


pkgId: 61ca2b4b843c9e54f0b8ac3024a5ef44124af1a7c7748bf5978cbaf986797cfa
name: python-bash-buddy-cli
arch: src
version: 0.1.5
epoch: 0
release: 1
summary: A CLI tool for interacting with Meta Ads API
url: https://github.com/TheRealJamesRussell/BashBuddy
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bash-buddy-cli-0.1.5-1.src.rpm
checksum_type: sha256
description:
  Bash Buddy is a CLI tool designed to assist users with questions related to bash scripting and terminal commands. It integrates with OpenAI's GPT-4o mini model (Low Cost Model) to provide concise and helpful answers directly in the terminal.



  - **Ask Questions**: Get answers to your bash-related questions. Right in the Terminal!
  - **API Key Management**: Easily add and manage your OpenAI API key.



  1. Clone the repository:
      ```sh
      git clone https://github.com/yourusername/bash_buddy.git
      cd bash_buddy
      ```

  2. Install the package using `setup.py`:
      ```sh
      pip install -e .
      ```





  To ask a question, simply run the CLI tool followed by your question:
      ```sh
      buddy "How do I list all files in a directory?"
      ```



  To add your OpenAI API key, use the `--api_key` argument:
      ```sh
      buddy --api_key your_openai_api_key
      ```



  We welcome contributions to Bash Buddy! If you have an idea for a new feature or have found a bug, please follow these steps:

  1. **Fork the Repository**: Click the "Fork" button at the top right of this repository's page to create a copy of the repository in your GitHub account.

  2. **Clone Your Fork**: Clone your forked repository to your local machine.
      ```sh
      git clone https://github.com/yourusername/bash_buddy.git
      cd bash_buddy
      ```

  3. **Install Development Dependencies**: Install the necessary development dependencies.
      ```sh
      pip install -e .[dev]
      ```

  4. **Create a Branch**: Create a new branch for your feature or bugfix.
      ```sh
      git checkout -b feature-or-bugfix-name
      ```

  5. **Make Your Changes**: Implement your feature or fix the bug in your branch.

  6. **Commit Your Changes**: Commit your changes with a descriptive commit message.
      ```sh
      git add .
      git commit -m "Description of the feature or bugfix"
      ```

  7. **Push to Your Fork**: Push your changes to your forked repository.
      ```sh
      git push origin feature-or-bugfix-name
      ```

  8. **Create a Pull Request**: Go to the original repository and create a pull request from your forked repository. Provide a clear description of your changes and any related issues.

  We will review your pull request and provide feedback. Thank you for contributing to Bash Buddy.



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



  For any questions or feedback, please open an issue on GitHub.


pkgId: 8f94a9990e7498f599ce17fd6d8af150182b5cecd89c6f64c8f935c5376a071c
name: python-bash-menu-builder
arch: src
version: 1.1.5
epoch: 0
release: 1
summary: Bash Menu Builder
url: https://github.com/OleksiiPopovDev/Bash-Menu-Builder
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bash-menu-builder-1.1.5-1.src.rpm
checksum_type: sha256
description:
  ![PyPI - Version](https://img.shields.io/pypi/v/bash-menu-builder?logo=pypi&logoColor=white)
  ![Python Version](https://img.shields.io/badge/Python-v3.9-orange?logo=python&logoColor=white)
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/c69d7c6784144fb8a4e16150165533e6)](https://app.codacy.com/gh/OleksiiPopovDev/Bash-Menu-Builder/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
  ![PyPI - License](https://img.shields.io/pypi/l/bash-menu-builder)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/bash-menu-builder)
  ![Downloads](https://img.shields.io/github/downloads/OleksiiPopovDev/Bash-Menu-Builder/total")
  ![GitHub repo size](https://img.shields.io/github/repo-size/OleksiiPopovDev/Bash-Menu-Builder)

  <p align="center">
  <img src="https://raw.githubusercontent.com/OleksiiPopovDev/Bash-Menu-Builder/main/doc/logo.png" width="50%">
  </p>

  This package help you build menu for yours console scripts

  [Installation](#installation) | [Usage](#usage) | [Draw menu](#draw-menu) | [How it works](#how-it-works)


  For install package to your project use this command:
  ```shell
  pip3 install bash-menu-builder
  ```


  Script give opportunity use two type views of menu:
   - [Input Menu](#the-input-type-menu)
   - [Select Menu](#the-select-type-menu)



  ```python
  from bash_menu_builder import InputMenu, CommandOptionDto, MenuItemDto

  def banner_text() -> str:
      return 'I\'m Banner Text'

  def function_one() -> None:
      print('Script One')

  def function_two() -> None:
      print('Script Two')

  def function_three() -> None:
      print('Script Three')


  if __name__ == "__main__":
      InputMenu(
          menu=[
              MenuItemDto(
                  title='Menu Item One',
                  option=CommandOptionDto(
                      long_option='one',
                      short_option='o',
                  ),
                  handler=function_one,
                  priority=2
              ),
              MenuItemDto(
                  title='Menu Item Two',
                  option=CommandOptionDto(
                      long_option='two',
                      short_option='t'
                  ),
                  handler=function_two
              ),
              MenuItemDto(
                  title='Menu Item Three',
                  option=CommandOptionDto(
                      long_option='three',
                      short_option='r'
                  ),
                  handler=function_three
              ),
          ],
          banner=banner_text()
      )
  ```

  <img src="https://raw.githubusercontent.com/OleksiiPopovDev/Bash-Menu-Builder/main/doc/example-input.gif" alt="How it works" style="width:100%;" />


  ```python
  from bash_menu_builder import SelectMenu, CommandOptionDto, MenuItemDto

  def banner_text() -> str:
      return 'I\'m Banner Text'

  def function_one() -> None:
      print('Script One')

  def function_two() -> None:
      print('Script Two')

  def function_three() -> None:
      print('Script Three')


  if __name__ == "__main__":
      SelectMenu(
          menu=[
              MenuItemDto(
                  title='Menu Item One',
                  option=CommandOptionDto(
                      long_option='one',
                      short_option='o',
                  ),
                  handler=function_one,
                  priority=2
              ),
              MenuItemDto(
                  title='Menu Item Two',
                  option=CommandOptionDto(
                      long_option='two',
                      short_option='t'
                  ),
                  handler=function_two
              ),
              MenuItemDto(
                  title='Menu Item Three',
                  option=CommandOptionDto(
                      long_option='three',
                      short_option='r'
                  ),
                  handler=function_three
              ),
          ],
          banner=banner_text()
      )
  ```

  <img src="https://raw.githubusercontent.com/OleksiiPopovDev/Bash-Menu-Builder/main/doc/example-select.gif" alt="How it works" style="width:100%;" />


  The menu draw via class ``View`` which get params of array with DTOs and text of banner (optional)
  The MenuItemDto have 3 params ``def __init__(self, title: str, option_name: str, handler: object):``
   - `title: str` - the title of menu item
   - `option: CommandOptionDto` - add options to command using via ``--`` ex. calling handler of first item menu: ``python3 main.py --three`` or short option ``python3 main.py --r``
     - `long_option: str` - full name of option for calling ex ``python3 main.py --three``
     - `short_option: str` - short name of option for calling like ``python3 main.py --r``
     - `has_value: bool` - is `True` than you can set value in bash command of handler like ``python3 main.py --three some value``
     > [!WARNING]
     > Unfortunately, you can't use **has_value** param in Select type Menu. **Only for Input type Menu!**

   - `handler: object` - the handler of menu item. What exactly script do after select this menu item.




  After select the menu number and press Enter will run script in function. When script finish process menu will draw again.

  Also, you can call script without drawing menu. Just set option when call python script file, ex. ``python3 main.py --three`` or short option ``python3 main.py --r``
  In this case will run script for menu **'Menu Item Three'**. When script finish process menu will not draw again and program will close.

  <img src="https://github.com/OleksiiPopovDev/Bash-Menu-Builder/blob/main/doc/example-console.png?raw=true" alt="How it works" style="width:100%;" />


  You can draw three types od alerts **Error**, **Warning** and **Success**. How use it:
  ```python
  from bash_menu_builder.message import Message

  Message.error(
     message='Lorem Ipsum is simply dummy text of the printing and typesetting industry.'
             '\nLorem Ipsum has been the industry\'s standard dummy text ever since the 1500s,'
             '\nwhen an unknown printer took a galley of type and scrambled it to make a type specimen book. '
  )
  Message.warning(
     message='Lorem Ipsum is simply dummy text of the printing and typesetting industry.'
             '\nLorem Ipsum has been the industry\'s standard dummy text ever since the 1500s,'
             '\nwhen an unknown printer took a galley of type and scrambled it to make a type specimen book. '
  )
  Message.success(
     message='Lorem Ipsum is simply dummy text of the printing and typesetting industry.'
             '\nLorem Ipsum has been the industry\'s standard dummy text ever since the 1500s,'
             '\nwhen an unknown printer took a galley of type and scrambled it to make a type specimen book. ',
     title='Custom Success Title'
  )
  ```
  <img src="https://raw.githubusercontent.com/OleksiiPopovDev/Bash-Menu-Builder/main/doc/messages.png" alt="How it works" style="width:100%;" />


  Using `Message.set_tabs({COUNT_OF_TABS})` you can set tabulation ex.:
  ```python
  from bash_menu_builder.message import Message

  Message.error(
     message='Lorem Ipsum is simply dummy text of the printing and typesetting industry...'
  )

  Message.set_tabs(1)
  Message.warning(
     message='Lorem Ipsum is simply dummy text of the printing and typesetting industry...'
  )

  Message.set_tabs(2)
  Message.success(
     message='Lorem Ipsum is simply dummy text of the printing and typesetting industry...',
     title='Custom Success Title'
  )
  ```
  <img src="https://raw.githubusercontent.com/OleksiiPopovDev/Bash-Menu-Builder/main/doc/messages-tabs.png" alt="How it works" style="width:100%;" />


  Using tags in text allows you to set the color of the text after the tag. Here's how to use it:
  ```python
  from bash_menu_builder import Draw

  print(Draw.paint(
     '{Red}Lorem Ipsum {Green}is simply {Blue}dummy text of the {Yellow}printing and typesetting industry...'
     '\n{Purple}Lorem Ipsum has been the {Cyan}industry\'s standard dummy {White}text ever since the 1500s,'
     '\n{BBlue}when an unknown {BBlack}printer took a galley {BRed}of type and scrambled it {BPurple}to make a type specimen book. '
     '\n{UGreen}It has survived not only five centuries, {UYellow}but also the leap into electronic typesetting, {UCyan}remaining essentially unchanged.'
     '\n{On_Blue}It was popularised {On_Yellow}in the 1960s with {IGreen}the release of Letraset sheets {IWhite}containing Lorem Ipsum passages, and more '
     '\n{BIRed}recently with {BIYellow}desktop publishing {ColorOff}software like Aldus PageMaker including versions of Lorem Ipsum.'
  ))
  ```
  <img src="https://raw.githubusercontent.com/OleksiiPopovDev/Bash-Menu-Builder/main/doc/color-text.png" alt="How it works" style="width:100%;" />

  The list of tags you can find in `Color` enum:
  ```python
  class Color(Enum):
      
      ColorOff = '\033[0m'  # Text Reset

      
      Black = '\033[0;30m'  # Black
      Red = '\033[0;31m'  # Red
      Green = '\033[0;32m'  # Green
      Yellow = '\033[0;33m'  # Yellow
      Blue = '\033[0;34m'  # Blue
      Purple = '\033[0;35m'  # Purple
      Cyan = '\033[0;36m'  # Cyan
      White = '\033[0;37m'  # White

      
      BBlack = '\033[1;30m'  # Black
      BRed = '\033[1;31m'  # Red
      BGreen = '\033[1;32m'  # Green
      BYellow = '\033[1;33m'  # Yellow
      BBlue = '\033[1;34m'  # Blue
      BPurple = '\033[1;35m'  # Purple
      BCyan = '\033[1;36m'  # Cyan
      BWhite = '\033[1;37m'  # White

      
      UBlack = '\033[4;30m'  # Black
      URed = '\033[4;31m'  # Red
      UGreen = '\033[4;32m'  # Green
      UYellow = '\033[4;33m'  # Yellow
      UBlue = '\033[4;34m'  # Blue
      UPurple = '\033[4;35m'  # Purple
      UCyan = '\033[4;36m'  # Cyan
      UWhite = '\033[4;37m'  # White

      
      On_Black = '\033[40m'  # Black
      On_Red = '\033[41m'  # Red
      On_Green = '\033[42m'  # Green
      On_Yellow = '\033[43m'  # Yellow
      On_Blue = '\033[44m'  # Blue
      On_Purple = '\033[45m'  # Purple
      On_Cyan = '\033[46m'  # Cyan
      On_White = '\033[47m'  # White

      
      IBlack = '\033[0;90m'  # Black
      IRed = '\033[0;91m'  # Red
      IGreen = '\033[0;92m'  # Green
      IYellow = '\033[0;93m'  # Yellow
      IBlue = '\033[0;94m'  # Blue
      IPurple = '\033[0;95m'  # Purple
      ICyan = '\033[0;96m'  # Cyan
      IWhite = '\033[0;97m'  # White

      
      BIBlack = '\033[1;90m'  # Black
      BIRed = '\033[1;91m'  # Red
      BIGreen = '\033[1;92m'  # Green
      BIYellow = '\033[1;93m'  # Yellow
      BIBlue = '\033[1;94m'  # Blue
      BIPurple = '\033[1;95m'  # Purple
      BICyan = '\033[1;96m'  # Cyan
      BIWhite = '\033[1;97m'  # White

      
      On_IBlack = '\033[0;100m'  # Black
      On_IRed = '\033[0;101m'  # Red
      On_IGreen = '\033[0;102m'  # Green
      On_IYellow = '\033[0;103m'  # Yellow
      On_IBlue = '\033[0;104m'  # Blue
      On_IPurple = '\033[0;105m'  # Purple
      On_ICyan = '\033[0;106m'  # Cyan
      On_IWhite = '\033[0;107m'  # White
  ```


pkgId: 51202ba909fd078a7e24bf2394b96460817dfffc07b22b48428ae28fffa684df
name: python-bashlex
arch: src
version: 0.18
epoch: 0
release: 1
summary: Python parser for bash
url: https://github.com/idank/bashlex.git
rpm_license: GPLv3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-bashlex-0.18-1.src.rpm
checksum_type: sha256
description:
  bashlex is a Python port of the parser used internally by GNU bash.

  For the most part it's transliterated from C, the major differences are:

  1. it does not execute anything
  2. it is reentrant
  3. it generates a complete AST

  See https://github.com/idank/bashlex/blob/master/README.md for more info.


pkgId: f3b55428c76df2f3d63dbe8236e0f564bf1bd5881861582d670094aa03eed22f
name: python-basic-colormath
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Simple color conversion and perceptual (DeltaE CIE 2000) difference
url: https://pypi.org/project/basic-colormath/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-colormath-0.5.0-1.src.rpm
checksum_type: sha256
description:
  Everything I wanted to salvage from the [python-colormath](https://github.com/gtaylor/python-colormath/tree/master) library ... with no numpy deps and 14x speed.

  * Perceptual (DeltaE CIE 2000) and Euclidean distance between colors
  * Conversion between RGB, HSV, HSL, and 8-bit hex colors
  * Simple, one-way conversion to Lab
  * Some convenience functions for RGB tuples and 8-bit hex color strings
  * Vectorized functions for numpy arrays
  * Proximity and cross-proximity (rectangular) matrices for numpy arrays

  Lab color format is exciting because it can cover a larger colorspace than RGB. But don't get *too* excited yet. If you convert an RGB tuple to Lab *with no additional information*, then the result will—of course—*not* contain more information than the RGB tuple you converted from. Other parameters are necessary to get anything out of these elaborate formats. I don't know how to do that, and most likely neither do you, so why not drop all of that complexity?

  I've installed [python-colormath](https://github.com/gtaylor/python-colormath/tree/master) on a lot of projects. The library does many interesting things, but most of what I wanted was perceptual color distance. This requires Lab colors, which have more parameters than an RGB tuple provides. **Colormath didn't use those parameters**, so the result didn't require the elaborate classes and methods provided by Colormath.

  The color distance I provide here is DeltaE CIE 2000. Aside from (presumably) some specialized applications, this is the best of the multiple color distances provided by [python-colormath](https://github.com/gtaylor/python-colormath/tree/master). Tuples in, float out, and with a lot more speed. It doesn't use all of those expert parameters, **but neither did Colormath**. This is the same result you'll get from any of the online DeltaE calculators you're likely to find.

  This library is more or less specialized for working with "upscaled" RGB tuples `([0, 255], [0, 255], [0, 255])`. Functions will take floats or ints in that range and return floats. If you want ints, use `float_tuple_to_8bit_int_tuple`. This is dramatically better int conversion than `int(float)` or `int(round(float))`, so use it insead of those.



  ```python
  Rgb = Annotated[tuple[float, float, float], ([0, 255], [0, 255], [0, 255])]
  Hsv = Annotated[tuple[float, float, float], ([0, 365), [0, 100], [0, 100])]
  Hsl = Annotated[tuple[float, float, float], ([0, 365), [0, 100], [0, 100])]
  Lab = Annotated[tuple[float, float, float], ([0, 100], [-128, 127], [-128, 127])]
  Hex = Annotated[str, "#000fff"]

  rgb_to_lab(rgb: Rgb) -> Lab:
      

  hex_to_lab(hex: Hex) -> Lab:
      

  get_delta_e(rgb_a: Rgb, rgb_b: Rgb) -> float:
      
      

  get_delta_e_hex(hex_a: Hex, hex_b: Hex) -> float:
      
      

  get_delta_e_lab(lab_a: Lab, lab_b: Lab) -> float:
      
      

  get_sqeuclidean(rgb_a: Rgb, rgb_b: Rgb) -> float:
      

  get_sqeuclidean_hex(hex_a: Hex, hex_b: Hex) -> float:
      

  get_euclidean(rgb_a: Rgb, rgb_b: Rgb) -> float:
      

  get_euclidean_hex(hex_a: Hex, hex_b: Hex) -> float:
      
  ```



  Converts to other simple formats.

  ```python
  def rgb_to_hsv(rgb: Rgb) -> Hsv: ...

  def hsv_to_rgb(hsv: Hsv) -> Rgb: ...

  def rgb_to_hsl(rgb: Rgb) -> Hsl: ...

  def hsl_to_rgb(hsl: Hsl) -> Rgb: ...

  def rgb_to_hex(rgb: Rgb) -> Hex: ...

  def hex_to_rgb(hex_: Hex) -> Rgb: ...
  ```



  ```python
  _Ratio = float | tuple[float, ...] | None

  scale_rgb(rgb: Rgb, scalar: float) -> Rgb:
      

  mix_rgb(*rgb_args: Rgb, ratio: _Ratio=None) -> Rgb:
      

      :param rgb_args: rgb tuples ([0, 255], [0, 255], [0, 255])
      :param ratio: 0.0 to 1.0 for the weight of the first rgb_arg or a tuple of floats
          to distribute across rgb_args or None for equal ratios. Ratios will be
          normalized and (if fewer ratios than colors are provided) the remaining
          ratios will be equal.
      :return: rgb tuple ([0, 255], [0, 255], [0, 255])

  scale_hex(hex_: Hex, scalar: float)-> Hex
      

  mix_hex(*hex_args: Hex, ratio: _Ratio=None) -> Hex
      
  ```



  ```python
  def float_to_8bit_int(float_: float | int) -> int: ...

  def float_tuple_to_8bit_int_tuple(rgb: Rgb) -> tuple[int, int, int]: ...
  ```



  If you have numpy installed in your env, basic_colormath will provide vectorized versions of most functions along with proximity matrices and cross-proximity matrices.

  | Function                      | Vectorized Function           | (Cross-) Proximity Matrix  |
  | ----------------------------- | ----------------------------- | -------------------------- |
  | float_to_8bit_int             | floats_to_uint8               |                            |
  | get_delta_e                   | get_deltas_e                  | get_delta_e_matrix         |
  | get_delta_e_hex               | get_deltas_e_hex              | get_delta_e_matrix_hex     |
  | get_delta_e_lab               | get_deltas_e_lab              | get_delta_e_matrix_lab     |
  | get_euclidean                 | get_euclideans                | get_euclidean_matrix       |
  | get_euclidean_hex             | get_euclideans_hex            | get_euclidean_matrix_hex   |
  | get_sqeuclidean               | get_sqeuclideans              | get_squeclidean_matrix     |
  | get_sqeuclidean_hex           | get_sqeuclideans_hex          | get_sqeuclinean_matrix_hex |
  | hex_to_rgb                    | hexs_to_rgb                   |                            |
  | hsl_to_rgb                    | hsls_to_rgb                   |                            |
  | hsv_to_rgb                    | hsvs_to_rgb                   |                            |
  | rgb_to_hex                    | rgbs_to_hex                   |                            |
  | rgb_to_hsl                    | rgbs_to_hsl                   |                            |
  | rgb_to_hsv                    | rgbs_to_hsv                   |                            |
  | rgb_to_lab                    | rgbs_to_lab                   |                            |
  | mix_hex                       |                               |                            |
  | mix_rgb                       |                               |                            |
  | scale_hex                     |                               |                            |
  | scale_rgb                     |                               |                            |



  (Cross-)proximity matrix functions take a (-1, 3) array of color values or (-1,) array of hex color strings and return a proximity matrix. This is a square matrix with the same number of rows and columns as the number of colors provided. The value at row `i` and column `j` is the distance between the color at index `i` and the color at index `j`. The diagonal is always zero.

  An optional second argument creates a *cross-proximity* matrix. This is a matrix with the same number of rows as the first argument and the same number of columns as the second argument. The value at row `i` and column `j` is the distance between the color at index `i` in the first argument and the color at index `j` in the second argument.



  Sadly, [python-colormath](https://github.com/gtaylor/python-colormath/tree/master) has been abandoned, long enough now that a numpy function on which it relies has been not only deprecated but removed. If you still need to use [python-colormath](https://github.com/gtaylor/python-colormath/tree/master), patch `np.asscalar`:

  ```python
  import numpy as np
  import numpy.typing as npt

  def _patch_asscalar(a: npt.NDArray[np.float64]) -> float:
      """Alias for np.item(). Patch np.asscalar for colormath.

      :param a: numpy array
      :return: input array as scalar
      """
      return a.item()

  np.asscalar = _patch_asscalar  # type: ignore
  ```


pkgId: f4ae948df1cf75519ded88afaf02418f4bf52a4302b824ce8ca38f144b8ee1c2
name: python-basic-components
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Re-usable server-side components based on shadcn/ui with JinjaX, Alpine.js and Tailwind CSS
url: https://github.com/basicmachines-co/basic-components
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-components-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Re-usable server-side components based on shadcn/ui.
  Built with JinjaX, Alpine.js, and Tailwind CSS, with support for htmx.





  You can use the CLI directly without installing the package:

  ```bash

  uvx --from basic-components components add button
  ```

  You will also need to configure your project to load components into the `jinjax.Catalog` and add a global `cn` function
  to the Jinja environment. See [utilities](docs/content/docs/utilities.md)



  Install only the utility functions for JinjaX and tailwind:

  ```bash

  pip install basic-components[utils]
  ```



  - `utils`: Utility functions for JinjaX setup and `cn()` tailwind class helper
  - `docs`: Runs the docs site
  - `dev`: Development tools for contributing
  - `full`: All features included



  Visit [https://components.basicmachines.co](https://components.basicmachines.co) to view the documentation.



  Please read the [contributing guide](https://components.basicmachines.co/docs/contribution).



  Licensed under the [MIT license](https://github.com/shadcn/ui/blob/main/LICENSE.md).



  19/48

  - [x] accordion
  - [x] alert
  - [x] alert-dialog -- example cancel/action
  - [ ] aspect-ratio
  - [ ] avatar
  - [x] badge
  - [ ] breadcrumb
  - [x] button
  - [ ] calendar
  - [x] card
  - [ ] carousel
  - [ ] chart
  - [x] checkbox
  - [ ] collapsible
  - [ ] command
  - [ ] context-menu
  - [x] dialog -- examples
  - [ ] drawer
  - [x] dropdown-menu
  - [x] form
  - [ ] hover-card
  - [ ] input-otp
  - [x] input
  - [x] label
  - [x] link
  - [ ] menubar
  - [ ] navigation-menu
  - [ ] pagination
  - [x] popover
  - [ ] progress
  - [x] radio-group
  - [ ] resizable
  - [ ] scroll-area
  - [x] select
  - [ ] separator
  - [x] sheet
  - [ ] sidebar
  - [ ] skeleton
  - [ ] slider
  - [ ] sonner
  - [ ] switch
  - [x] table
  - [ ] tabs
  - [x] textarea
  - [x] toast
  - [ ] toaster
  - [ ] toggle-group
  - [ ] toggle
  - [ ] tooltip

  Extended
  - [ ] Prose - https://docs.astro.build/en/recipes/tailwind-rendered-markdown/#recipe


pkgId: 244996bcd1a12ac79ba59c34ba8737b20cb358955fdbcacebbff5549e9bde847
name: python-basic-fengfengzai
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: short package description
url: http://example.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-fengfengzai-0.0.2-1.src.rpm
checksum_type: sha256
description:
  this is a simple python package for test pypi



  ```
  from multiply.multi_by_three import multiply_by_three
  from divide.divide_by_three import divide_by_three

  multiply_by_three(9)
  divide_by_three(21)
  ```


pkgId: f59ac134cd54163d5b71e9007a23833f03cc75b1d051125a12eae1d0fcb5bbc6
name: python-basic-pid
arch: src
version: 0.2.7
epoch: 0
release: 1
summary: Standard PID Controller For Discrete Time Regulators
url: https://github.com/mkner/basic-pid
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-pid-0.2.7-1.src.rpm
checksum_type: sha256
description:
  **BasicPID** is a classic PID controller that is easy to use, works and does the job

  The PID controller is designed to be used in discrete-time regulators and
  implements timestep integration that supports two modes of operation: **Integrative** and **Iterative**

  In **Integrative Mode**, the timestep integrations are calculated inside the controller
  and the output from the PID controller for the current timestep is used directly or with
  modifications and sent to the device or process plant as the current input signal without
  further iterative integration.

  In **Iterative Mode**, the PID timestep integrations are manually calculated and updated
  outside the controller in the algorithm that calls the PID controller for the output of
  the PID at the current timestep.

  **BasicPID** has proven to be a tested, and reliable PID controller. It has been used, for example,
  with mobile robotic systems for LVC (Linear Velocity Control) for regulating wheel velocities,
  LVDR (Lateral Velocity Differential Regulator) for keeping the wheel velocities in sync for
  differential drive mobile robots when traversing a straight line path and
  ADVR (Angular Differential Velocity Regulator) for tracking a heading angle using typical
  motion control input signals (v,w) for linear and angular velocities.


  Installation:

  $ **pip** install basic-pid

  For documentation see https://basic-pid.readthedocs.io/en/latest/


pkgId: 89e69b434d1aa300d7496684800b64b6cc4992747dbae277d8f1438b7a97be27
name: python-basic-pitch
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection.
url: https://pypi.org/project/basic-pitch/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-pitch-0.4.0-1.src.rpm
checksum_type: sha256
description:
  ![Basic Pitch Logo](https://user-images.githubusercontent.com/213293/167478083-de988de2-9137-4325-8a5f-ceeb51233753.png)



  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/basic-pitch)
  ![Supported Platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Windows%20%7C%20Linux-green)


  Basic Pitch is a Python library for Automatic Music Transcription (AMT), using lightweight neural network developed by [Spotify's Audio Intelligence Lab](https://research.atspotify.com/audio-intelligence/). It's small, easy-to-use, `pip install`-able and `npm install`-able via its [sibling repo](https://github.com/spotify/basic-pitch-ts).

  Basic Pitch may be simple, but it's is far from "basic"! `basic-pitch` is efficient and easy to use, and its multipitch support, its ability to generalize across instruments, and its note accuracy competes with much larger and more resource-hungry AMT systems.

  Provide a compatible audio file and basic-pitch will generate a MIDI file, complete with pitch bends. Basic pitch is instrument-agnostic and supports polyphonic instruments, so you can freely enjoy transcription of all your favorite music, no matter what instrument is used.  Basic pitch works best on one instrument at a time.


  This library was released in conjunction with Spotify's publication at [ICASSP 2022](https://2022.ieeeicassp.org/). You can read more about this research in the paper, [A Lightweight Instrument-Agnostic Model for Polyphonic Note Transcription and Multipitch Estimation](https://arxiv.org/abs/2203.09893).

  If you use this library in academic research, consider citing it:
  ```bibtex
  @inproceedings{2022_BittnerBRME_LightweightNoteTranscription_ICASSP,
    author= {Bittner, Rachel M. and Bosch, Juan Jos\'e and Rubinstein, David and Meseguer-Brocal, Gabriel and Ewert, Sebastian},
    title= {A Lightweight Instrument-Agnostic Model for Polyphonic Note Transcription and Multipitch Estimation},
    booktitle= {Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP)},
    address= {Singapore},
    year= 2022,
  }
  ```

  **Note that we have improved Basic Pitch beyond what was presented in this paper. Therefore, if you use the output of Basic Pitch in academic research,
  we recommend that you cite the version of the code that was used.**


  If, for whatever reason, you're not yet completely inspired, or you're just like so totally over the general vibe and stuff, checkout our snappy demo website, [basicpitch.io](https://basicpitch.io), to experiment with our model on whatever music audio you provide!




  `basic-pitch` is available via PyPI. To install the current release:

      pip install basic-pitch

  To update Basic Pitch to the latest version, add `--upgrade` to the above command.


  - MacOS, Windows and Ubuntu operating systems
  - Python versions 3.7, 3.8, 3.9, 3.10, 3.11
  - **For Mac M1 hardware, we currently only support python version 3.10. Otherwise, we suggest using a virtual machine.**




  Basic Pitch comes with the original TensorFlow model and the TensorFlow model converted to [CoreML](https://developer.apple.com/documentation/coreml), [TensorFlowLite](https://www.tensorflow.org/lite), and [ONNX](https://onnx.ai/). By default, Basic Pitch will _not_ install TensorFlow as a dependency *unless you are using Python>=3.11*. Instead, by default, CoreML will be installed on MacOS, TensorFlowLite will be installed on Linux and ONNX will be installed on Windows. If you want to install TensorFlow along with the default model inference runtime, you can install TensorFlow via `pip install basic-pitch[tf]`.







  By default, Basic Pitch will attempt to load a model in the following order:

  1. TensorFlow
  2. CoreML
  3. TensorFlowLite
  4. ONNX

  Additionally, the module variable ICASSP_2022_MODEL_PATH will default to the first available version in the list.

  We will explain how to override this priority list below. Because all other model serializations were converted from TensorFlow, we recommend using TensorFlow when possible. N.B. Basic Pitch does not install TensorFlow by default to save the user time when installing and running Basic Pitch.



  This library offers a command line tool interface. A basic prediction command will generate and save a MIDI file transcription of audio at the `<input-audio-path>` to the `<output-directory>`:

  ```bash
  basic-pitch <output-directory> <input-audio-path>
  ```

  For example:
  ```
  basic-pitch /output/directory/path /input/audio/path
  ```

  To process more than one audio file at a time:

  ```bash
  basic-pitch <output-directory> <input-audio-path-1> <input-audio-path-2> <input-audio-path-3>
  ```

  Optionally, you may append any of the following flags to your prediction command to save additional formats of the prediction output to the `<output-directory>`:

  - `--sonify-midi` to additionally save a `.wav` audio rendering of the MIDI file.
  - `--save-model-outputs` to additionally save raw model outputs as an NPZ file.
  - `--save-note-events` to additionally save the predicted note events as a CSV file.

  If you want to use a non-default model type (e.g., use CoreML instead of TF), use the `--model-serialization` argument. The CLI will change the loaded model to the type you prefer.

  To discover more parameter control, run:
  ```bash
  basic-pitch --help
  ```



  **predict()**

  Import `basic-pitch` into your own Python code and run the [`predict`](basic_pitch/inference.py) functions directly, providing an `<input-audio-path>` and returning the model's prediction results:

  ```python
  from basic_pitch.inference import predict
  from basic_pitch import ICASSP_2022_MODEL_PATH

  model_output, midi_data, note_events = predict(<input-audio-path>)
  ```

  - `<minimum-frequency>` & `<maximum-frequency>` (*float*s) set the maximum and minimum allowed note frequency, in Hz, returned by the model. Pitch events with frequencies outside of this range will be excluded from the prediction results.
  - `model_output` is the raw model inference output
  - `midi_data` is the transcribed MIDI data derived from the `model_output`
  - `note_events` is a list of note events derived from the `model_output`

  Note: As mentioned previously, ICASSP_2022_MODEL_PATH will default to the runtime first supported in the list TensorFlow, CoreML, TensorFlowLite, ONNX.

  **predict() in a loop**

  To run prediction within a loop, you'll want to load the model yourself and provide `predict()` with the loaded model object itself to be used for repeated prediction calls, in order to avoid redundant and sluggish model loading.

  ```python
  import tensorflow as tf

  from basic_pitch.inference import predict, Model
  from basic_pitch import ICASSP_2022_MODEL_PATH

  basic_pitch_model = Model(ICASSP_2022_MODEL_PATH))

  for x in range():
      ...
      model_output, midi_data, note_events = predict(
          <loop-x-input-audio-path>,
          basic_pitch_model,
      )
      ...
  ```

  **predict_and_save()**

  If you would like `basic-pitch` orchestrate the generation and saving of our various supported output file types, you may use [`predict_and_save`](basic_pitch/inference.py) instead of using [`predict`](basic_pitch/inference.py) directly:

  ```python
  from basic_pitch.inference import predict_and_save

  predict_and_save(
      <input-audio-path-list>,
      <output-directory>,
      <save-midi>,
      <sonify-midi>,
      <save-model-outputs>,
      <save-notes>,
  )
  ```

  where:
     - `<input-audio-path-list>` & `<output-directory>`
          - directory paths for `basic-pitch` to read from/write to.
     - `<save-midi>`
          - *bool* to control generating and saving a MIDI file to the `<output-directory>`
     - `<sonify-midi>`
          - *bool* to control saving a WAV audio rendering of the MIDI file to the `<output-directory>`
     - `<save-model-outputs>`
          - *bool* to control saving the raw model output as a NPZ file to the `<output-directory>`
     - `<save-notes>`
          - *bool* to control saving predicted note events as a CSV file `<output-directory>`





  **Supported Audio Codecs**

     `basic-pitch` accepts all sound files that are compatible with its version of [`librosa`](https://librosa.org/doc/latest/index.html), including:

  - `.mp3`
  - `.ogg`
  - `.wav`
  - `.flac`
  - `.m4a`

  **Mono Channel Audio Only**

  While you may use stereo audio as an input to our model, at prediction time, the channels of the input will be down-mixed to mono, and then analyzed and transcribed.

  **File Size/Audio Length**

  This model can process any size or length of audio, but processing of larger/longer audio files could be limited by your machine's available disk space. To process these files, we recommend streaming the audio of the file, processing windows of audio at a time.

  **Sample Rate**

  Input audio maybe be of any sample rate, however, all audio will be resampled to 22050 Hz before processing.



  Thanks to DamRsn for developing this working VST version of basic-pitch! - https://github.com/DamRsn/NeuralNote




  Contributions to `basic-pitch` are welcomed! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.


  `basic-pitch` is Copyright 2022 Spotify AB.

  This software is licensed under the Apache License, Version 2.0 (the "Apache License"). You may choose either license to govern your use of this software only upon the condition that you accept all of the terms of either the Apache License.

  You may obtain a copy of the Apache License at:

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


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


pkgId: c8552172fc4b4e69a922c8dffaa87538627f088ca9843f9848eba0e19d673a46
name: python-basic-rest-endpoint
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: A package that facilitates standard rest API flows.
url: https://github.com/swimlane/basic-rest-endpoint
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-rest-endpoint-1.2.0-1.src.rpm
checksum_type: sha256
description:
  For a REST API, use the BasicRestEndpoint class.

  This class allows easily creating a task for an endpoint. For example, say we want to integrate with example.com's
  indicator API. Here is a table of what their API looks like.

  Endpoint	HTTP Method	URL Parameters
  https://example.com/api/indicator	GET	indicator_id (int)
  https://example.com/api/indicator	POST/PATCH	indicator_name, indicator_value
  https://example.com/api/indicator/{id}	DELETE	(none)
  So we have 3 endpoints, each with different HTTP Methods and parameters, but the same base URL.
  We can create a superclass for this integration, let's call it ExampleIntegration

  ```python
  from basic_rest_endpoint import BasicRestEndpoint


  class ExampleIntegration(BasicRestEndpoint):
      def __init__(self, context):
          super(ExampleIntegration, self).__init__(context.asset["host"]
          
          )
  ```

  To make a request using this library, you just use `self.request(<method>, <endpoint>, **kwargs)`
  Where `<method>` is an HTTP method, `<endpoint>` is the URL relative to the host, and `**kwargs`
  are optional params to pass into the requests.request(...) call


  Now we create a task, say for the GET /api/indicator endpoint
  ```python
  from sw_example import ExampleIntegration  # Import our superclass from above

  class SwMain(ExampleIntegration):
      endpoint = "/api/indicator"
      method = "GET"

      def __init__(self, context):
          super(SwMain, self).__init__(context)
          self.kwargs['params'] = {"indicator_id": context.inputs["indicator_id"]}  # Get indicator from inputs
  ```
  But we didn't actually make a request here! It is all handled by the BasicRestEndpoint superclass.
  The params kwarg is passed into self.request which is used to create the full url with self.host that
  ends up like https://example.com/api/indicator?indicator_id=<id>


  But what if the data required from the API isn't in the URL params? And what if the data returned from
  wthe API isn't suitable for just returning, or needs some parsing?

  Let's take a look at the second endpoint, the POST /api/indicator.
  ```python
  from sw_example import ExampleIntegration  # Import our superclass from above


  class SwMain(ExampleIntegration):
      endpoint = "/api/indicator"
      method = "POST"

      def parse_response(self, response):
          data = response.json()  # Basically json.loads(response.text)
          return data["data"]

      def __init__(self, context):
          super(SwMain, self).__init__(context)
          self.kwargs['json'] = {
              "indicator_name": context.inputs["indicator_name"],  # Get indicator from inputs
              "indicator_value": context.inputs["indicator_value"]
          }
  }
  ```
  This time, the data is passed in under the `json` parameter to requests which automatically formats our data for
  us in the POST body. If the data were non-json, we would use `data` instead. We also parsed out the data returned,
  only returning the JSON under the `data` key.


  Similarly to a variable request method, we can have a variable URL. This is quite trivial
  ```python
  class SwMain(ExampleIntegration):
      method = "DELETE"

      def __init__(self, context):
          super(SwMain, self).__init__(context)
          self.endpoint = f"/api/indicator/{context.inputs['iid']}"
  ```


  But what if example.com required authentication to make those calls?
  There are options for these authentication methods, Basic Auth, Header Auth, Param Auth, and Custom Auth.


  ```python
  from basic_rest_endpoint import BasicRestEndpoint

  class ExampleIntegration(BasicRestEndpoint):
      def __init__(self, context):
          super(ExampleIntegration, self).__init__(
              host=context.asset["host"],
              auth=(context.asset["username"], context.asset["password"])
          )
  ```
  This auth is handled by requests directly, and automatically parses it out and inserts it into the headers for us


  ```python
  from basic_rest_endpoint import BasicRestEndpoint, HeaderAuth

  class ExampleIntegration(BasicRestEndpoint):
      def __init__(self, context):
          super(ExampleIntegration, self).__init__(
              host=context.asset["host"],
              auth=HeaderAuth({"X-api-key": context.asset["api_key"]})
          )
  ```
  This auth is when an API requires a certain header to be sent in each request


  ```python
  from basic_rest_endpoint import BasicRestEndpoint, ParamAuth

  class ExampleIntegration(BasicRestEndpoint):
      def __init__(self, context):
          super(ExampleIntegration, self).__init__(
              host=context.asset["host"],
              auth=ParamAuth({"username": context.asset["username"], "password" context.asset["password"]})
          )
  ``````
  This auth is used when the URL contains the authenticating information, like
  https://example.com/api/indicator?indicator_id=<id>&username=<username>&password=<password>


  Sometimes an API will return a status that indicates that they are still processing your request,
  and you will need to send requests until the processing is complete. We can use the polling request here.
  ```python




  self.poll_request("GET", "/my/endpoint")


  self.poll_request("GET", "/my/endpoint", step=5, timeout=60)


  def my_poll_func(poll_method, poll_endpoint, poll_kwargs):
      result = self.request(poll_method, poll_endpoint, **poll_kwargs)
      if r.json()["status"].lower() == "done":
          return result  # Return the final response
      else:
          return False  # If what we return is falsey, then it will continue to poll

  self.poll_request("GET" "/my/endpoint", poll_func=my_poll_func)
  ```


  An API may return a single page in a list of results of pages. To make this easy to process,
  inherit from BasicPaginationEndpoint and implement the following functions
  ```python
  from basic_rest_endpoint import BasicRestPaginationEndpoint

  def MyIntegration(BasicRestPaginationEndpoint):
      def __init__(self, context):
          

      def get_next_page(self, response):
          data = response.json()
          if "next" in data:
              return data["next"]  # Return the URL for the next call
          else:
              return None  # If this function returns None, all pages have been seen

      def parse_response(self, response):
          data = response.json()
          data.pop("next", None)  # Remove useless keys/clean data of each response here
          return data

      def combine_responses(self, results):
          
          all_data = []
          for result in results:
              all_data.extend(result)  # Use .extend to take [1,2,3] + [4,5] -> [1,2,3,4,5]

          return all_data
  ```


  Some (very few) APIs implement a standard called "Link Headers" which makes pagination very easy.
  This implementation is completely done so all you have to do is implement combine_responses
  ```python
  from basic_rest_endpoint import LinkHeadersPaginationEndpoint

  def MyIntegration(LinkHeadersPaginationEndpoint):
      def __init__(self, context):
          

      def combine_responses(self, results):
          
  ```


  The `asset_parser` function is used to split the incoming Context object into a super() call for BasicRestEndpoint

  In the following example, the Context object is parsed, and with auth set to "basic" the username and password are automatically set up for Basic HTTP auth.
  ```python
  from basic_rest_endpoint import BasicRestEndpoint, asset_parser


  class MyIntegration(BasicRestEndpoint):
      def __init__(self, context):
          super(MyIntegration, self).__init__(**asset_parser(context, auth="basic"))


  class Context(object):
      asset = {
          "host": "abc.com",
          "username": "bb",
          "password": "cc",
          "verify_ssl": False,
          "http_proxy": None
      }
  ```


pkgId: 642fc9039e8afac28a09e34db9f4df6eb20e0a5160cf77f614fd22251617b913
name: python-basic-robotics
arch: src
version: 1.0.2
epoch: 0
release: 1
url: https://github.com/64-B1T/basic_robotics
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-robotics-1.0.2-1.src.rpm
checksum_type: sha256
summary:
  General Purpose Robotics Package featuring forward and inverse kinematics for serial and parallel robots, static analysis, transformations, path planning, and more.

description:
  Basic Robotics is divided into several different component libraries:
   - basic_robotics.general - Basic robotics math, transforms, helper functions
   - basic_robotics.interfaces - Hardware communications skeletons for physical robots
   - basic_robotics.kinematics - Serial and Parallel robot kinematics classes
   - basic_robotics.modern_robotics_numba - Numba enabled version of NxRLab's Modern Robotics
   - basic_robotics.path_planning - RRT* path planning variations and spatial indexing
   - basic_robotics.plotting - Simple Plotting functions for visualizations of robots
   - basic_robotics.robot_collisions - Fast Collision Manager for robotics and obstacles
   - basic_robotics.utilities - Terminal Displays and Logging


  FASER Interfaces is a general toolkit for functions used elswehere in other related repositories, and feautres tm: a transformation library, FASER: a catchall repository for useful functions, and Faser High Performance, an extension of [Modern Robotics](http://hades.mech.northwestern.edu/index.php/Modern_Robotics)'s robotics toolkit.


  - Abstracted handling and display of transformation matrices.
  - Fully overloaded operators for addition, multiplication, etc
  - Generate transforms from a variety of input types
  - Easily extract positions and rotations in a variety of formats


  - Provides kinematic extensions to the faser_robotics_kinematics library
  - Accelerated with Numba, and extends [Modern Robotics](http://hades.mech.northwestern.edu/index.php/Modern_Robotics).


  - Catchall functions for manipulation of data elsewhere in FASER system
  - Simple trajectory generation
  - Position interpolation


  Usage Examples:


  ```python
  import numpy as np
  from basic_robotics.general import tm


  from basic_robotics.utilities.disp import disp


  identity_matrix = tm()
  disp(identity_matrix, 'identity') #This is just zeros in TAA format.


  trans_x_2m = tm([2, 0, 0, 0, 0, 0]) #Translations can be created with a list (Xm, Ym, Zm, Xrad, Yrad, Zrad)
  trans_y_4m = tm(np.array([0, 4, 0, 0, 0, 0])) # Translations can be created with a numpy array
  rot_z_90 = tm([0, 0, 0, 0, 0, np.pi/2]) # Rotations can be declared in radians
  trans_z_2m_neg = tm(np.array([[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -2], [0, 0, 0, 1]]))


  trans_x_2m_quat = tm([2, 0, 0, 0, 0, 0, 1]) # Transformations can even be declared with quaternions

  list_of_transforms = [trans_x_2m, trans_y_4m, rot_z_90]
  disp(list_of_transforms, 'transform list') # List of transforms will be displayed in columns


  new_simple_transform = trans_x_2m + trans_y_4m #Additon is element-wise on TAA form
  new_transform_multiplied = trans_x_2m @ trans_y_4m #Transformation matrix multiplication uses '@'
  new_double_transform = trans_x_2m * 2 # Multiplication by a scalar is elementwise




  ```
  Detailed Usage TODO


  FASER Interfaces is a simple toolkit for communicating over serial and udp through a common interface, and used generally to communicate with robots or sensors


  - Generalized "Comms" implementation
  - Communications supervisor
  - Standard interface for Serial and UDP




  Detailed Usage TODO


  FASER Robotics Kinematics is a toolbox for kinematics, statics, and dynamics of Stewart Platforms and Serial Manipulators, largely based on [Modern Robotics](http://hades.mech.northwestern.edu/index.php/Modern_Robotics). It is part of a set of related robotics repositories hosted here.




  - Forward and Inverse Kinematics
  - Static Analysis and Force Calculations
  - Custom Configurations
  - Error detection and correction


  - Forward and Inverse Kinematics
  - Static Analysis and Force Calculations
  - Custom Configurations
  - Error detection and correction
  - Dynamics Analysis
  - Visual Servoing and Path Planning



  Detailed Usage TODO


  ```python
  import json
  import os
  import matplotlib.pyplot as plt

  import basic_robotics #Import the General Library
  from basic_robotics.general import tm #Import transformation library
  from basic_robotics.utilities.disp import disp

  disp("Beginning SP Test")
  from basic_robotics.kinematics import loadSP
  from basic_robotics.plotting.vis_matplotlib import DrawSP

  basic_sp = {
      "Name":"Basic SP","Type":"SP","BottomPlate":{"Thickness":0.1,"JointRadius":0.9,"JointSpacing":9,"Mass": 6},
      "TopPlate":{"Thickness":0.16,"JointRadius":0.3,"JointSpacing":25,"Mass": 1},
      "Actuators":{"MinExtension":0.75,"MaxExtension":1.5,"MotorMass":0.5,"ShaftMass":0.9,"ForceLimit": 800,"MotorCOGD":0.2,"ShaftCOGD":0.2},
      "Drawing":{"TopRadius":1,"BottomRadius":1,"ShaftRadius": 0.1,"MotorRadius": 0.2},
      "Settings":{"MaxAngleDev":55,"GenerateActuators":0,"IgnoreRestHeight":1,"UseSpin":0,"AssignMasses":1,"InferActuatorCOG":1},
      "Params":{"RestHeight":1.2,"Spin":30}}

  basic_sp_string = json.dumps(basic_sp)
  with open ('sp_test_data.json', 'w') as outfile:
      outfile.write(basic_sp_string)

  sp_model = loadSP('sp_test_data.json', '')
  fig = plt.figure()
  ax = plt.axes(projection = '3d')
  ax.set_xlim3d(-1,1)
  ax.set_ylim3d(-1,1)
  ax.set_zlim3d(0,2)


  os.remove('sp_test_data.json')
  DrawSP(sp_model, ax)

  plt.show()
  ```


  ```python
  from basic_robotics.kinematics import loadArmFromURDF


  new_arm = loadArmFromURDF('some_example_robot.urdf')

  ```


  ```python
  from basic_robotics.general import tm, fsr
  from basic_robotics.kinematics import Arm
  from basic_robotics.plotting.vis_matplotlib import *

  fig = plt.figure()
  ax = plt.axes(projection = '3d')
  ax.set_xlim3d(-3,3)
  ax.set_ylim3d(-3,3)
  ax.set_zlim3d(0,6)
  Base_T = tm() # Set a transformation for the base

          
  L1 = 3
  L2 = 3
  L3 = 3
  W = 0.1

  Tspace = [tm(np.array([[0],[0],[L1/2],[0],[0],[0]])),
      tm(np.array([[L2/2],[0],[L1],[0],[0],[0]])),
      tm(np.array([[L2+(L3/2)],[0],[L1],[0],[0],[0]])),
      tm(np.array([[L2+L3+(W/2)],[0],[L1],[0],[0],[0]])),
      tm(np.array([[L2+L3+W+(W/2)],[0],[L1],[0],[0],[0]])),
      tm(np.array([[L2+L3+W+W+(W/2)],[0],[L1],[0],[0],[0]]))]
  basic_arm_end_effector_home = fsr.TAAtoTM(np.array([[L2+L3+W+W+W],[0],[L1],[0],[0],[0]]))

  basic_arm_joint_axes = np.array([[0, 0, 1],[0, 1, 0],[0, 1, 0],[1, 0, 0],[0, 1, 0],[1, 0, 0]]).conj().T
  basic_arm_joint_homes = np.array([[0, 0, 0],[0, 0, L1],[L2, 0, L1],[L2+L3, 0, L1],[L2+L3+W, 0, L1],[L2+L3+2*W, 0, L1]]).conj().T
  basic_arm_screw_list = np.zeros((6,6))


  for i in range(0,6):
      basic_arm_screw_list[0:6,i] = np.hstack((basic_arm_joint_axes[0:3,i],np.cross(basic_arm_joint_homes[0:3,i],basic_arm_joint_axes[0:3,i])))


  basic_arm_link_box_dims = np.array([[W, W, L1],[L2, W, W],[L3, W, W],[W, W, W],[W, W, W],[W, W, W]]).conj().T
  basic_arm_link_mass_transforms = [None] * (len(basic_arm_screw_list) + 1)
  basic_arm_link_mass_transforms[0] = Tspace[0]


  for i in range(1,6):
      basic_arm_link_mass_transforms[i] = (Tspace[i-1].inv() @ Tspace[i])
  basic_arm_link_mass_transforms[6] = (Tspace[5].inv() @ basic_arm_end_effector_home)
  masses = np.array([20, 20, 20, 1, 1, 1])
  basic_arm_inertia_list = np.zeros((6,6,6))


  for i in range(6):
      basic_arm_inertia_list[i,:,:] = fsr.boxSpatialInertia(masses[i],basic_arm_link_box_dims[0,i],basic_arm_link_box_dims[1,i],basic_arm_link_box_dims[2,i])


  arm = Arm(Base_T,basic_arm_screw_list,basic_arm_end_effector_home,basic_arm_joint_homes,basic_arm_joint_axes)


  arm.setDynamicsProperties(
      basic_arm_link_mass_transforms,
      Tspace,
      basic_arm_inertia_list,
      basic_arm_link_box_dims)
  arm.joint_mins = np.array([np.pi, np.pi, np.pi, np.pi, np.pi, np.pi])* -2
  arm.joint_maxs= np.array([np.pi, np.pi, np.pi, np.pi, np.pi, np.pi]) * 2



  goal = arm.FK(np.array([np.pi/2, np.pi/4, -np.pi/4+.1, 0, 0, 0]))
  DrawArm(arm, ax, jdia = .3)
  plt.show()
  ```

  TODO Explanation
  This repository contains the code library accompanying [_Modern Robotics:
  Mechanics, Planning, and Control_](http://modernrobotics.org) (Kevin Lynch
  and Frank Park, Cambridge University Press 2017). The
  [user manual](/doc/MRlib.pdf) is in the doc directory.

  The functions are available in:

  * Python
  * MATLAB
  * Mathematica

  Each function has a commented section above it explaining the inputs required for its use as well as an example of how it can be used and what the output will be. This repository also contains a pdf document that provides an overview of the available functions using MATLAB syntax. Functions are organized according to the chapter in which they are introduced in the book. Basic functions, such as functions to calculate the magnitude of a vector, normalize a vector, test if the value is near zero, and perform matrix operations such as multiplication and inverses, are not documented here.

  The primary purpose of the provided software is to be easy to read and educational, reinforcing the concepts in the book. The code is optimized neither for efficiency nor robustness.


  FASER Path planning is a toolbox for using RRT* to plan paths quickly through adverse terrain in a generalized sense (compatible with a wide variety of robotic tools)

  - RRT* generation for various configurations
  - Fake terrain generation
  - Collision detection and obstacle avoidance
  - Bindable functions for advanced tuning
  - Dual Path RRT* for quicker solution finding



  ```python
  from basic_robotics.kinematics import loadArmFromURDF
  from basic_robotics.path_planning import RRTStar, PathNode
  from basic_robotics.plotting.vis_matplotlib import *

  fig = plt.figure()
  ax = plt.axes(projection = '3d')
  ax.set_xlim3d(-1,1)
  ax.set_ylim3d(-1,1)
  ax.set_zlim3d(0,2)
  arm = loadArmFromURDF('tests/test_helpers/irb_2400.urdf')


  init = arm.getEEPos()
  rrt = RRTStar(init)
  rrt.addObstruction([0.5, 0.5, 0.7], [1.2, 1.2, 1.2]) # Add some random obstructions
  rrt.addObstruction([0.5, 0.5, -2], [1, 1, 0.5])
  DrawArm(arm, ax)

  goal = arm.FK(np.array([np.pi/3, np.pi/3, -np.pi/8, np.pi/10, -np.pi/4, np.pi/5]))
  arm.FK(np.zeros(6))

  DrawObstructions(rrt.obstructions, ax) #Draw the obstructions for visulization


  random.seed(10)
  traj = rrt.findPathGeneral(
  lambda: rrt.generalGenerateTree( # Generate a general RRT* tree using:
      lambda : PathNode(arm.randomPos()), # Random generation for path nodes
      lambda x, y : rrt.distance(x, y), # Distance between nodes as a cost
      lambda x, y : rrt.armObstruction(arm,x,y)), #Basic rtree collision detection as obstruction checking
  goal) # Goal position

  DrawRRTPath(traj, ax, 'green') # Draw the finalized path


  plt.show() #Show the plot
  ```
  Detailed Usage TODO


  FASER Plotting is a simple toolbox which extends matplotlib to draw simple shapes and show how a robot fits together.

  - Animate videos using matplotlib frames
  - Plot various primary shapes
  - Plot FASER Robots
  - Plot transforms and wrenches



  Detailed Usage TODO


  Provides support for detecting collisions between Robot objects and user supplied obstacles, or other robots. Supports both creation of basic shapes, and loading in robot geometry (from URDFs for example)



  ```python
  from basic_robotics.kinematics import loadArmFromURDF
  from basic_robotics.collisions import ColliderManager, ColliderObject, ColliderArm, createMesh

  arm1 = loadArmFromURDF('some_arm.urdf')
  arm2 = loadArmFromURDF('another_arm.urdf')

  manager = ColliderManager()

  arm1_collider = ColliderArm(arm1, 'arm1')
  arm2_collider = ColliderArm(arm2, 'arm2')

  arm1_collider.bindManager(manager)
  arm2_collider.bindManager(manager)

  print(manager.checkCollisions())

  random_mesh_series = ColliderObject()
  random_mesh_series.bindManager(manager)
  random_mesh_series.addMesh('mesh_1', createMesh('first_mesh.stl', tm()))
  random_mesh_series.addMesh('mesh_2', createMesh('second_mesh.stl', tm()))

  print(manager.checkCollisions())
  ```

  Utilities contains display and logging tools generally useful for working with other components in this package

  - matlab like display function 'disp' which is a drop in replacement for python print()
  - JSON file logging tool
  - Print matrices with appropriate labels
  - ProgressBar display

  Detailed Usage TODO



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



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


pkgId: 3820e08ae744281c4f3b97c9b1c1185a1907592426057f3138e33756441bda51
name: python-basic-ui
arch: src
version: 0.4.8
epoch: 0
release: 1
summary: basic ui is a package for pygame to create interfaces easly based on json files
url: https://pypi.org/project/basic-ui/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basic-ui-0.4.8-1.src.rpm
checksum_type: sha256
description:
  basic-ui is a project of user interface using pygame and json files. The goal is to simplify the creation of app menus, and interfaces.


pkgId: 33c0dcc80587b6f3cf318d6b18815648ed8fde58949ef27a9e390e85f436e0a0
name: python-basicbedrock
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: An abstraction layer for AWS Bedrock. Removes the need to keep track of response/request schemas.
url: https://github.com/cyberitech/BasicBedrock
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basicbedrock-0.2.4-1.src.rpm
checksum_type: sha256
description:
  AWS Bedrock provides a variety of foundational models to AWS customers.  Each model family requires their own request structure, yet the underlying semantics are roughly common; there is always a field for the textual input prompt, and often there are fields to define maximum desired output, stop words, P, K and Temperature values.

  This package aims to abstract away all of that.

  For model requests, top_p, top_k, temp, max_tokens, stop_words and prompts are all abstracted away.  For model responses, the answer itself is extracted, but the caller can also get the raw dict object passed back by boto3 if they wish.


  I designed this around the following design principles:
   * If a paramater is specified, it will be used whenever possible.  If not possible, it is (silently) ignored.
   * If a parameter is not specified, but it is required, a default parameter will be used (see below)
   * If a parameter is required to be in a certain format (such as a prompt) this is done by default
   * If multiple parameters are specified (stop_words), but only 0 or 1 are valid, then the first valid one will be used. If none are valid, then the default will be used


  There is no default prompt.  The user must always provide their prompt for every call to invoke().  Unless the caller specifies otherwise, the following defaults are used:
  ```python
  top_p: float = 0.5
  top_k: int = 125
  temp: float = 0.5
  max_tokens: int = 250
  stop_words: List[str] = []
  ```




  ```bash
  pip install basicbedrock
  ```


  Rather simple to use.  See [examples](./examples) for some usage examples.

  ```python
  import boto3
  from basicbedrock import BasicBedrock

  session = boto3.session.Session(profile_name="default",region_name="us-west-2")
  bb = BasicBedrock(session=session)
  model = "anthropic.claude-3-sonnet-20240229-v1:0"
  prompt = "Tell me about flowers"
  r = bb.invoke(model, prompt)
  print(r.get_answer())
  ```

rpm_license:
  Copyright 2024  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: e640696d753870eb22bec30e4f5c5876a51f83feb12e94fc2f13bc8bf3dd1eb4
name: python-basicrta
arch: src
version: 0.2
epoch: 0
release: 1
summary: A package to extract binding kinetics from molecular dynamics simulations
url: https://pypi.org/project/basicrta/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basicrta-0.2-1.src.rpm
checksum_type: sha256
description:
  [//]: # (Badges)
  | **Latest release** | [![Last release tag][badge_release]][url_latest_release] ![GitHub commits since latest release (by date) for a branch][badge_commits_since]  [![Documentation Status][badge_docs]][url_docs]|
  | :----------------- | :------- |
  | **Archives** | [![DOI][badge_zenodo]][url_zenodo] |
  | **Status**         | [![GH Actions Status][badge_actions]][url_actions] [![codecov][badge_codecov]][url_codecov] |
  | **Community**      | [![License: GPL v3][badge_license]][url_license]  [![Powered by MDAnalysis][badge_mda]][url_mda]|
  [badge_actions]: https://github.com/becksteinlab/basicrta/actions/workflows/gh-ci.yaml/badge.svg
  [badge_codecov]: https://codecov.io/gh/becksteinlab/basicrta/branch/main/graph/badge.svg
  [badge_commits_since]: https://img.shields.io/github/commits-since/becksteinlab/basicrta/latest
  [badge_docs]: https://readthedocs.org/projects/basicrta/badge/?version=latest
  [badge_license]: https://img.shields.io/badge/License-GPLv3-blue.svg
  [badge_zenodo]: https://zenodo.org/badge/DOI/10.5281/zenodo.13877225.svg
  [badge_mda]: https://img.shields.io/badge/powered%20by-MDAnalysis-orange.svg?logoWidth=16&logo=data:image/x-icon;base64,AAABAAEAEBAAAAEAIAAoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJD+XwCY/fEAkf3uAJf97wGT/a+HfHaoiIWE7n9/f+6Hh4fvgICAjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACT/yYAlP//AJ///wCg//8JjvOchXly1oaGhv+Ghob/j4+P/39/f3IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJH8aQCY/8wAkv2kfY+elJ6al/yVlZX7iIiI8H9/f7h/f38UAAAAAAAAAAAAAAAAAAAAAAAAAAB/f38egYF/noqAebF8gYaagnx3oFpUUtZpaWr/WFhY8zo6OmT///8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAn46Ojv+Hh4b/jouJ/4iGhfcAAADnAAAA/wAAAP8AAADIAAAAAwCj/zIAnf2VAJD/PAAAAAAAAAAAAAAAAICAgNGHh4f/gICA/4SEhP+Xl5f/AwMD/wAAAP8AAAD/AAAA/wAAAB8Aov9/ALr//wCS/Z0AAAAAAAAAAAAAAACBgYGOjo6O/4mJif+Pj4//iYmJ/wAAAOAAAAD+AAAA/wAAAP8AAABhAP7+FgCi/38Axf4fAAAAAAAAAAAAAAAAiIiID4GBgYKCgoKogoB+fYSEgZhgYGDZXl5e/m9vb/9ISEjpEBAQxw8AAFQAAAAAAAAANQAAADcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjo6Mb5iYmP+cnJz/jY2N95CQkO4pKSn/AAAA7gAAAP0AAAD7AAAAhgAAAAEAAAAAAAAAAACL/gsAkv2uAJX/QQAAAAB9fX3egoKC/4CAgP+NjY3/c3Nz+wAAAP8AAAD/AAAA/wAAAPUAAAAcAAAAAAAAAAAAnP4NAJL9rgCR/0YAAAAAfX19w4ODg/98fHz/i4uL/4qKivwAAAD/AAAA/wAAAP8AAAD1AAAAGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGxsVyqqqr/mpqa/6mpqf9KSUn/AAAA5QAAAPkAAAD5AAAAhQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkUFBSuZ2dn/3V1df8uLi7bAAAATgBGfyQAAAA2AAAAMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0AAADoAAAA/wAAAP8AAAD/AAAAWgC3/2AAnv3eAJ/+dgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9AAAA/wAAAP8AAAD/AAAA/wAKDzEAnP3WAKn//wCS/OgAf/8MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIQAAANwAAADtAAAA7QAAAMAAABUMAJn9gwCe/e0Aj/2LAP//AQAAAAAAAAAA
  [badge_release]: https://img.shields.io/github/release-pre/becksteinlab/basicrta.svg
  [url_actions]: https://github.com/becksteinlab/basicrta/actions?query=branch%3Amain+workflow%3Agh-ci
  [url_codecov]: https://codecov.io/gh/becksteinlab/basicrta/branch/main
  [url_docs]: https://basicrta.readthedocs.io/en/latest/?badge=latest
  [url_latest_release]: https://github.com/becksteinlab/basicrta/releases
  [url_license]: https://www.gnu.org/licenses/gpl-2.0
  [url_mda]: https://www.mdanalysis.org
  [url_zenodo]: https://doi.org/10.5281/zenodo.13877225
  A package to extract binding kinetics from molecular dynamics simulations
  basicrta is bound by a [Code of Conduct](https://github.com/becksteinlab/basicrta/blob/main/CODE_OF_CONDUCT.md).

  To build basicrta from source,
  we highly recommend using virtual environments.
  If possible, we strongly recommend that you use
  [Anaconda](https://docs.conda.io/en/latest/) as your package manager.
  Below we provide instructions both for `conda` and
  for `pip`.

  Ensure that you have [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) installed.
  Create a virtual environment and activate it:
  ```
  conda create --name basicrta
  conda activate basicrta
  ```
  Install the development and documentation dependencies:
  ```
  conda env update --name basicrta --file devtools/conda-envs/test_env.yaml
  conda env update --name basicrta --file docs/requirements.yaml
  ```
  Build this package from source:
  ```
  pip install -e .
  ```
  If you want to update your dependencies (which can be risky!), run:
  ```
  conda update --all
  ```
  And when you are finished, you can exit the virtual environment with:
  ```
  conda deactivate
  ```

  To build the package from source, run:
  ```
  pip install .
  ```
  If you want to create a development environment, install
  the dependencies required for tests and docs with:
  ```
  pip install ".[test,doc]"
  ```

  The basicrta source code is hosted at https://github.com/becksteinlab/basicrta
  and is available under the GNU General Public License, version 3 (see the file [LICENSE](https://github.com/becksteinlab/basicrta/blob/main/LICENSE)).
  Copyright (c) 2024, Ricky Sexton

  Project based on the
  [MDAnalysis Cookiecutter](https://github.com/MDAnalysis/cookiecutter-mda) version 0.1.
  Please cite [MDAnalysis](https://github.com/MDAnalysis/mdanalysis#citation) when using basicrta in published work.

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


pkgId: 818ec8c27870e05d82fd80cf0fdb200adc9b4008b864ed0805e45ee66b6f9c1c
name: python-basicsr
arch: src
version: 1.4.2
epoch: 0
release: 1
summary: Open Source Image and Video Super-Resolution Toolbox
url: https://github.com/xinntao/BasicSR
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basicsr-1.4.2-1.src.rpm
checksum_type: sha256
description:
  BasicSR (**Basic** **S**uper **R**estoration) is an open-source **image and video restoration** toolbox based on PyTorch, such as super-resolution, denoise, deblurring, JPEG artifacts removal, *etc*.<br>
  BasicSR (**Basic** **S**uper **R**estoration) 是一个基于 PyTorch 的开源 图像视频复原工具箱, 比如 超分辨率, 去噪, 去模糊, 去 JPEG 压缩噪声等.
  🚩 **New Features/Updates**
  - ✅ July 26, 2022. Add plot scripts 📊[Plot](scripts/plot).
  - ✅ May 9, 2022. BasicSR joins [XPixel](http://xpixel.group/).
  - ✅ Oct 5, 2021. Add **ECBSR training and testing** codes: [ECBSR](https://github.com/xindongzhang/ECBSR).
    > ACMMM21: Edge-oriented Convolution Block for Real-time Super Resolution on Mobile Devices
  - ✅ Sep 2, 2021. Add **SwinIR training and testing** codes: [SwinIR](https://github.com/JingyunLiang/SwinIR) by [Jingyun Liang](https://github.com/JingyunLiang). More details are in [HOWTOs.md](docs/HOWTOs.md#how-to-train-swinir-sr)
  - ✅ Aug 5, 2021. Add NIQE, which produces the same results as MATLAB (both are 5.7296 for tests/data/baboon.png).
  - ✅ July 31, 2021. Add **bi-directional video super-resolution** codes: [**BasicVSR** and IconVSR](https://arxiv.org/abs/2012.02181).
    > CVPR21: BasicVSR: The Search for Essential Components in Video Super-Resolution and Beyond


pkgId: 95143086ba21834063527766ddb72b6b6cc0558164a2f06bd7e9e4728e0fe686
name: python-basicthainlp
arch: src
version: 0.5.1
epoch: 0
release: 1
summary: Basic nlp for thai
url: https://pypi.org/project/basicthainlp/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basicthainlp-0.5.1-1.src.rpm
checksum_type: sha256
description:
  * เพิ่ม function FindSimilarityTerms

  * แก้ bug TokenIdentification: E-mail regular expression

  * แก้ bug TokenIdentification: Tag จากไฟล์ให้ถูกต้องมากขึ้น

  * แก้ correction ใน spelling ในกรณีที่ค่า prop เท่ากันให้พิจารณาโดยใช้ Tri-gram

  * เพิ่ม library spelling

  * แก้ function get_ps แบบสั้น ไม่ต้องใส่ textInput=

  * แก้ function get_ps ไม่ให้ new class ทุกครั้ง
  * หลังจาก new class PmSeg() ต้องเรียกฟังก์ชั่น init_cls() เสมอ
  * หลังจาก new class PosTag() ต้องเรียกฟังก์ชั่น init_cls() เสมอ

  * เพิ่ม library POS Tagging

  * Add wrap function get_ps

  * เพิ่ม library Token Identification


pkgId: 73ff6549960469f65e95e236d20ffe9db253385bedf8d5a2e6ddc9b78feefcdb
name: python-basicthainlp
arch: src
version: 0.5.2
epoch: 0
release: 1
summary: Basic nlp for thai
url: https://pypi.org/project/basicthainlp/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basicthainlp-0.5.2-1.src.rpm
checksum_type: sha256
description:
  * แก้ bug FindSimilarityTerms: เปลี่ยนชื่อ find_timilarity_terms เป็น find_similarity_terms

  * เพิ่ม library FindSimilarityTerms

  * แก้ bug TokenIdentification: E-mail regular expression

  * แก้ bug TokenIdentification: Tag จากไฟล์ให้ถูกต้องมากขึ้น

  * แก้ correction ใน spelling ในกรณีที่ค่า prop เท่ากันให้พิจารณาโดยใช้ Tri-gram

  * เพิ่ม library spelling

  * แก้ function get_ps แบบสั้น ไม่ต้องใส่ textInput=

  * แก้ function get_ps ไม่ให้ new class ทุกครั้ง
  * หลังจาก new class PmSeg() ต้องเรียกฟังก์ชั่น init_cls() เสมอ
  * หลังจาก new class PosTag() ต้องเรียกฟังก์ชั่น init_cls() เสมอ

  * เพิ่ม library POS Tagging

  * Add wrap function get_ps

  * เพิ่ม library Token Identification


pkgId: b83a2d1bef50017672dcf78b071b82e3ca250be36f3e7639585ed4078d465c90
name: python-basil-daq
arch: src
version: 3.2.0
epoch: 0
release: 1
summary: Basil - a data acquisition and system testing framework
url: https://github.com/SiLab-Bonn/basil
rpm_license: BSD 3-Clause ("BSD New" or "BSD Simplified") License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basil-daq-3.2.0-1.src.rpm
checksum_type: sha256
description:
  Basil is a modular data acquisition system and system testing framework in Python.
  It also provides generic FPGA firmware modules for different hardware platforms and drivers for wide range of lab appliances.


pkgId: 5cede34d47eb23d97165f355f085d0609c79d18334045aa483c04926f8792219
name: python-basilearn
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A python package for educational content and interactive learning
url: https://pypi.org/project/basilearn/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basilearn-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Basilearn is a Python project for learning programming concepts interactively. It provides a hands-on approach to mastering basic Python topics like variables, data types, operators and controls.



  Clone or download the project:

  ```
  git clone https://github.com/barbara99/basilearn.git
  ```

  Navigate to the project folder:

  ```
  cd basilearn
  ```

  Open and run the main.py file to start learning:

  ```
  python main.py
  ```


  - Interactive Lessons: Learn Python basics step by step.
  - Real-time Feedback: Get immediate results as you work through exercises.
  - Offline Usable: Perfect for offline learning without requiring an internet connection.


  - Add more lessons on Python topics
  - Build the framework into a full Python package for easy installation via pip.


pkgId: d9250d3f9b6e8513a13c4f05f88d645f08f86759e2ae57923c771c63dc2ebe5b
name: python-basilisp
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: A Clojure-like lisp written for Python
url: https://github.com/basilisp-lang/basilisp
rpm_license: Eclipse Public License 1.0 (EPL-1.0)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basilisp-0.2.4-1.src.rpm
checksum_type: sha256
description:
  A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+.

  [![PyPI](https://img.shields.io/pypi/v/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![python](https://img.shields.io/pypi/pyversions/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![pyimpl](https://img.shields.io/pypi/implementation/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![readthedocs](https://img.shields.io/readthedocs/basilisp.svg?style=flat-square)](https://basilisp.readthedocs.io/) [![Run tests](https://github.com/basilisp-lang/basilisp/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/basilisp-lang/basilisp/actions/workflows/run-tests.yml) [![Coveralls github](https://img.shields.io/coveralls/github/basilisp-lang/basilisp.svg?style=flat-square)](https://coveralls.io/github/basilisp-lang/basilisp) [![license](https://img.shields.io/github/license/basilisp-lang/basilisp.svg?style=flat-square)](https://github.com/basilisp-lang/basilisp/blob/master/LICENSE)



  Basilisp is developed on [GitHub](https://github.com/basilisp-lang/basilisp) and
  hosted on [PyPI](https://pypi.python.org/pypi/basilisp). You can fetch Basilisp
  using `pip`:

  ```bash
  pip install basilisp
  ```

  Once Basilisp is installed, you can enter into the REPL using:

  ```bash
  basilisp repl
  ```

  Basilisp [documentation](https://basilisp.readthedocs.io) can help guide your
  exploration at the REPL. Additionally, Basilisp features many of the same functions
  and idioms as [Clojure](https://clojure.org/), so you may find guides and
  documentation there helpful for getting started.



  Basilisp is a project I (@chrisrink10) created to learn about Python, Clojure,
  hosted  languages, and compilers.

  That said, it is generally stable at this point with reasonably high test
  coverage, linting, and type checking. Work is ongoing to complete the rest of
  standard the library implementations. I suspect it could be used to build small
  applications and tools at this point, though I would not recommend it unless you
  like being a very early adopter.

  _Use in a production setting at your own risk._



  Eclipse Public License 1.0


pkgId: 445a31fa8bac2544891ddff32fac5dca19010e5a1f3c7f4e1d2eab8669d34bfd
name: python-basilisp
arch: src
version: 0.3.2
epoch: 0
release: 1
summary: A Clojure-like lisp written for Python
url: https://github.com/basilisp-lang/basilisp
rpm_license: Eclipse Public License 1.0 (EPL-1.0)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basilisp-0.3.2-1.src.rpm
checksum_type: sha256
description:
  A Clojure-compatible(-ish) Lisp dialect targeting Python 3.9+.

  [![PyPI](https://img.shields.io/pypi/v/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![python](https://img.shields.io/pypi/pyversions/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![pyimpl](https://img.shields.io/pypi/implementation/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![readthedocs](https://img.shields.io/readthedocs/basilisp.svg?style=flat-square)](https://basilisp.readthedocs.io/) [![Run tests](https://github.com/basilisp-lang/basilisp/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/basilisp-lang/basilisp/actions/workflows/run-tests.yml) [![Coveralls github](https://img.shields.io/coveralls/github/basilisp-lang/basilisp.svg?style=flat-square)](https://coveralls.io/github/basilisp-lang/basilisp) [![license](https://img.shields.io/github/license/basilisp-lang/basilisp.svg?style=flat-square)](https://github.com/basilisp-lang/basilisp/blob/master/LICENSE)



  Basilisp is developed on [GitHub](https://github.com/basilisp-lang/basilisp) and
  hosted on [PyPI](https://pypi.python.org/pypi/basilisp). You can fetch Basilisp
  using `pip`:

  ```bash
  pip install basilisp
  ```

  Once Basilisp is installed, you can enter into the REPL using:

  ```bash
  basilisp repl
  ```

  Basilisp [documentation](https://basilisp.readthedocs.io) can help guide your
  exploration at the REPL. Additionally, Basilisp features many of the same functions
  and idioms as [Clojure](https://clojure.org/), so you may find guides and
  documentation there helpful for getting started.

  For those who prefer a video introduction, feel free to check out this
  [talk](https://youtu.be/ruGRHYpq448?si=0jr2a6uWlq6Vi2_k) hosted by the
  [London Clojurians](https://www.meetup.com/london-clojurians/) group about Basilisp.



  Basilisp is a project I (@chrisrink10) created to learn about Python, Clojure,
  hosted  languages, and compilers.

  That said, it is generally stable at this point with reasonably high test
  coverage, linting, and type checking. Work is ongoing to complete the rest of the
  standard the library implementations. I suspect it could be used to build small
  applications and tools at this point, though I would not recommend it unless you
  like being an early adopter.

  _Use in a production setting at your own risk._



  Eclipse Public License 1.0


pkgId: a8696fa05cc60b7ce98baa2826781ef892f9779ff41cfd16045fdbc11f412c3e
name: python-basilisp-nrepl-async
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/basilisp-nrepl-async/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basilisp-nrepl-async-0.1.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/basilisp-nrepl-async.svg?style=flat-square)](https://pypi.org/project/basilisp-nrepl-async/) [![CI](https://github.com/ikappaki/basilisp-nrepl-async/actions/workflows/tests-run.yml/badge.svg)](https://github.com/ikappaki/basilisp-nrepl-async/actions/workflows/tests-run.yml)



  [Basilisp](https://github.com/basilisp-lang/basilisp) is a Python-based Lisp implementation that offers broad compatibility with Clojure. Refer to [documentation](https://basilisp.readthedocs.io/en/latest/index.html) for more details.



  An nREPL server is a networked REPL for Clojure that facilitates remote code evaluation, code completion, and debugging within Clojure-enabled editors like Emacs (via [CIDER](https://docs.cider.mx/cider/index.html)) and VS Code (via [Calva](https://calva.io/)), among others.

  This package provides an nREPL server implementation for Basilisp Clojure, evolved from the [basilisp.contrib.nrepl-server](https://basilisp.readthedocs.io/en/latest/api/contrib/nrepl-server.html) namespace in Basilisp, addressing issues that arise from serving nREPL request in parallel with the main event loop.

  Serving an nREPL client connection on a parallel thread in Python may conflict with the Global Interpreter Lock (GIL) and single-threaded libraries, potentially causing errors or crashes.

  To mitigate this, the library includes an asynchronous mode where client requests are queued, allowing the main application to process them at a designated time within its main event loop. This is in addition to the synchronous multi-threaded mode, where client requests are handled immediately upon arrival.



  To install `basilisp-nrepl-async`, run:

  ```shell
  pip install basilisp-nrepl-async
  ```



  See [API.md](API.md).



  To start in synchronous mode, call [server-start!](API.md#basilisp-nrepl-async.nrepl-server/server-start!) with the optional `:host`, `:port` and `:nrepl-port-file` keys. The server will block and handle client requests as they arrive.

  ```clojure
  (require '[basilisp-nrepl-async.nrepl-server :as nr])

  (def server-async (nr/server-start! {:port 9999}))
  ; nREPL server started on port 9999 on host 127.0.0.1 - nrepl://127.0.0.1:9999
  ```



  To start the nREPL server on a random port bound to the local interface in asynchronous mode, call [server-start!](API.md#basilisp-nrepl-async.nrepl-server/server-start!) with the `async?` option set to `true`. Periodically invoke the returned `work-fn` within your program's main loop to handle client requests. Use the `shutdown-fn` to stop the server.

  ```clojure
  (require '[basilisp-nrepl-async.nrepl-server :as nr])
  (import time)

  ;; Start the nREPL server on a separate thread to handle client
  ;; requests asynchronously
  (def server-async (nr/server-start! {:async? true}))
  ; nREPL server started on port 55144 on host 127.0.0.1 - nrepl://127.0.0.1:55144

  ;; Process client requests on this thread
  (let [{:keys [host port shutdown-fn work-fn]} server-async]
    (loop [] ;; suppose this is the main event loop

      (work-fn) ;; Execute any pending nREPL client work

      ;; simulate some work
      (time/sleep 0.5)

      (recur)))
  ```

  The server will create an `.nrepl-port` file in the current working directory with the port number, which nREPL-enabled Clojure editors can use to connect.

  You can also pass additional options to the [server-start!](API.md#basilisp-nrepl-async.nrepl-server/server-start!) function, such as `:host`, `:port` and `:nrepl-port-file`, to explicitly configure the server's listening interface, port, and the file where the port number is written (typically `<your-basilisp-lib>/.nrepl-port` for integration with your editor).



  To run the test suite, use the following command:

  ```shell
  basilsp test
  ```



  This project is licensed under the Eclipse Public License 2.0. See the [LICENSE](LICENSE) file for details.



  This library is a spin-off of [basilisp-blender](https://github.com/ikappaki/basilisp-blender)'s `basilisp-blender.nrepl-server` namespace.


pkgId: 8a3418d41f84cd6dd2291a5979bc7e2b30bdd9dc55cfc13a8341c015e2601d5c
name: python-basilisp-pprint
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/basilisp-pprint/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basilisp-pprint-0.1.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/basilisp-pprint.svg?style=flat-square)](https://pypi.org/project/basilisp-pprint/) [![CI](https://github.com/ikappaki/basilisp-pprint/actions/workflows/tests-run.yml/badge.svg)](https://github.com/ikappaki/basilisp-pprint/actions/workflows/tests-run.yml)



  [Basilisp](https://github.com/basilisp-lang/basilisp) is a Python-based Lisp implementation that offers broad compatibility with Clojure. For more details, check out the [documentation](https://basilisp.readthedocs.io/en/latest/index.html).


  `basilisp-pprint` is a source code port of the `clojure.pprint` core library to [Basilisp](https://github.com/basilisp-lang/basilisp).

  The `clojure.pprint` library provides pretty formatting capabilities for common Clojure data structures such as lists, maps, sets, vectors, as well as Clojure code. The library allows for customizable printing through various options and parameters.

  `basilisp-pprint` provides these capabilities to Basilisp as an external library, allowing you to use it while the native `basilisp.pprint` support (note the dot in the name) is [still in development](https://basilisp.readthedocs.io/en/latest/api/pprint.html). This includes enhanced API features, such as the [cl-format](https://clojure.github.io/clojure/clojure.pprint-api.html#clojure.pprint/cl-format) function.



  To install `basilisp-pprint`, run:

  ```shell
  pip install basilisp-pprint
  ```



  To use the library, require it as `basilisp-pprint.pprint` in your Basilisp code.

  For general usage instructions, refer to the [`clojure.pprint documentation`](https://clojure.github.io/clojure/clojure.pprint-api.html).





  ```clojure
  ;; https://clojuredocs.org/clojure.pprint/pprint#example-542692d0c026201cdc326ec5
  (require '[basilisp-pprint.pprint :as p])

  (def big-map (zipmap
                [:a :b :c :d :e]
                (repeat
                 (zipmap [:a :b :c :d :e]
                         (take 5 (range))))))
  ;; => #'user/big-map

  big-map
  ;; => {:e {:e 4 :a 0 :c 2 :d 3 :b 1} :a {:e 4 :a 0 :c 2 :d 3 :b 1} :c {:e 4 :a 0 :c 2 :d 3 :b 1} :d {:e 4 :a 0 :c 2 :d 3 :b 1} :b {:e 4 :a 0 :c 2 :d 3 :b 1}}

  (p/pprint big-map)
  ;; {:e {:e 4, :a 0, :c 2, :d 3, :b 1},
  ;;  :a {:e 4, :a 0, :c 2, :d 3, :b 1},
  ;;  :c {:e 4, :a 0, :c 2, :d 3, :b 1},
  ;;  :d {:e 4, :a 0, :c 2, :d 3, :b 1},
  ;;  :b {:e 4, :a 0, :c 2, :d 3, :b 1}}
  ```



  ```clojure
  ;; https://clojuredocs.org/clojure.pprint/pprint#example-5b950e6ce4b00ac801ed9e8a
  ;;
  ;; get Clojure snippets to print nicely
  (require '[basilisp-pprint.pprint :as p]
           'basilisp.edn)

  (def lost-formatting
    "(defn op [sel] (condp = sel :plus + :minus - :mult *
     :div / :rem rem :quot quot :mod mod))")
  ;; => #'user/lost-formatting

  (p/with-pprint-dispatch
    p/code-dispatch
    (p/pprint
     (basilisp.edn/read-string lost-formatting)))
  ;; (defn op [sel]
  ;;   (condp = sel
  ;;     :plus +
  ;;     :minus -
  ;;     :mult *
  ;;     :div /
  ;;     :rem rem
  ;;     :quot quot
  ;;     :mod mod))
  ```



  ```clojure
  ;; https://clojuredocs.org/clojure.pprint/pprint#example-6318f958e4b0b1e3652d765f
  ;;
  ;; pprint with metadata
  (require '[basilisp-pprint.pprint :as p])

  (binding [*print-meta* true]
    (p/pprint ^{:hello :world} {}))
  ;; ^{:hello :world} {}
  ```



  ```clojure
  ;; https://clojuredocs.org/clojure.pprint/print-table#example-542692d6c026201cdc3270f1
  ;;
  ;; If there are keys not in the first row, and/or you want to specify only
  ;; some, or in a particular order, give the desired keys as the first arg.
  (require '[basilisp-pprint.pprint :as p])

  (p/print-table [:b :a] [{:a 1 :b 2 :c 3} {:b 5 :a 7 :c "dog"}])
  ;; | :b | :a |
  ;; |----+----|
  ;; |  2 |  1 |
  ;; |  5 |  7 |
  ```



  ```clojure
  ;; cl-format example
  (require '[basilisp-pprint.pprint :as p])

  (let [name "Alice"
        born 1999
        hobbies ["reading" "hiking" "hacking"]]
    (-> (p/cl-format nil "Name: ~A~%Born: ~@R~%Hobbies: ~{~A~^, ~}~%"
                        name
                        born
                        hobbies)
        print))
  ;; Name: Alice
  ;; Born: MCMXCIX
  ;; Hobbies: reading, hiking, hacking
  ```


  The approach taken for this port was to make as few changes as possible to the original `clojure.pprint` source code in order to maintain consistency. While the current implementations is feature-complete and works quite well, it has not yet been fully optimized for Python.

  To run the test suite, use the following command:

  ```shell
  basilsp test
  ```



  This project is licensed under the Eclipse Public License 1.0. See the [LICENSE](LICENSE) file for details.



  @chrisrink10, for developing [Basilisp](https://github.com/basilisp-lang/basilisp) and ensuring API compatibility with Clojure, enabling smooth ports of Clojure source code to Python.

  ```
  ;;; pprint.clj -- Pretty printer and Common Lisp compatible format function (cl-format) for Clojure

  ;   Copyright (c) Rich Hickey. All rights reserved.
  ;   The use and distribution terms for this software are covered by the
  ;   Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
  ;   which can be found in the file epl-v10.html at the root of this distribution.
  ;   By using this software in any fashion, you are agreeing to be bound by
  ;   the terms of this license.
  ;   You must not remove this notice, or any other, from this software.

  ;; Author: Tom Faulhaber
  ;; April 3, 2009
  ;;
  ;; Porting to Basilisp initiated from Clojure,
  ;; based on the code available at
  ;; https://github.com/clojure/clojure/blob/08a2d9bdd013143a87e50fa82e9740e2ab4ee2c2/src/clj/clojure/pprint.clj
  ```


pkgId: bd206f471fbb8308fe69aa805f20ccc8ca0aa8c8e186961873746b9228495808
name: python-basinmaker
arch: src
version: 3.1.0
epoch: 0
release: 1
summary: An automated GIS toolbox for watershed delineation with lakes
url: https://github.com/dustming/basinmaker
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basinmaker-3.1.0-1.src.rpm
checksum_type: sha256
description:
  Before introducing the methodology and application procedure of the BasinMaker, the differences between routing structure without considering lake and routing structure with lakes defined by BasinMaker will be introduce in this section.

  A routing structure without considering lakes is shown in Figure 1A. Catchments defined by river reaches in this routing structure are showed in Figure 1A. In hydrological models, the streamflow is only explicitly simulated at the outlet of each catchment. It is not explicitly simulated at the mid of the river segment or any point inside each catchment. Thus, when using this routing structure to build hydrological model, we could obtain the simulated streamflow at the end of each reach or catchment outlet in Figure 1A, but the inflow and the outflow of each lake shown in Figure 1 cannot be simulated. Thus, the impact of lake on the routing process modeling such as flow attenuation can not be correctly modeled.

  An example of routing structure with lakes generated by the BasinMaker is shown in Figure 1B. Lakes are divided into two categories by the BasinMaker: (1) connected lakes (CL), which indicates lakes directly connected with the river network; and (2) non-connected lakes (NCL), which denotes lakes not connected with the river network (Figure 1B). The resolution of the river network is defined by user provided flow accumulation threshold. Both CL and NCL defined here are within the drainage area of the watershed and water released from both CL and NCL will move to the outlet of the watershed. Thus, the definition of NCL here is not the same as the definition of none contributing area, in which runoff generated will not move to the watershed outlet.

  For both CL and NCL, the BasinMaker will use lake polygon to identify each lake’s inlets and outlet and then represent each lake as a lake catchment (LC) shown Figure 1B. A lake catchment will fully cover the lake polygon and its outlet is the same as the outlet of the lake (Figure 1B). At the same time, each inlet of the CL will also be identified as a catchment outlet (Figure 1B). In this way, both inflow and outflow of each lake can be explicitly simulated by the semi-distributed hydrological models.

  <figure>
      <p align="center">
      <img src="https://github.com/dustming/RoutingTool/wiki/Figures/Figure1.png" width="100%" height="100%" />
      </p>
      <font size="1">
      <figcaption width="50%"> <b>Figure 1</b>: Lakes in the generated routing network by the lake river routing toolbox. A is the predefined river network and catchment boundary (Catchment boundary (River)) defined by the predefined river network without considering lakes. Figure B, the generated lake river routing structure by this toolbox using predefined river network and lake's polygons.<br>
      </figcaption>
      </font>
  </figure>




  Installation instructions for BasinMaker can be found [here](https://basinmaker.readthedocs.io/en/latest/installation.html)




  Examples of BasinMaker can be found [here](http://hydrology.uwaterloo.ca/basinmaker/index.html)




  BasinMaker and the associated river and lake routing product was developed by the hydrology research group at the University of Waterloo. Primary Contributors includes Ming Han, Hongren Shen, Bryan A. Tolson, James R. Craig, Juliane Mai, Simon Lin, Nandita B. Basu, Frezer Awol. We also want to thank Robert Chlumsky, Étienne Gaborit, Hongli Liu, Konhee Lee for their secondary support in development of this product and their contributions to our Pan-Canadian routing product.



   - Han, M., J. Mai, B. A. Tolson, J. R. Craig, É. Gaborit, H. Liu, and K. Lee, Subwatershed-based lake and river routing products for hydrologic and land surface models applied over Canada, Canadian Water Resources Journal, 2020 (paper)

  and/or cite the zenodo dataset directly:

   - Han, M., J. Mai, B. A. Tolson, J. R. Craig, É. Gaborit, H. Liu, and K. Lee. 2020. A Catchment-Based Lake and River Routing Product for Hydrologic and Land Surface Models in Canada. (routing product v1.0)

   - Han, M., H. Shen, B. A. Tolson, J. R. Craig, J. Mai, S. Lin, N. B. Basu, F. Awol. 2021. North American Lake-River Routing Product v 2.0, derived by BasinMaker GIS Toolbox (routing product v2.0)

  - Han, M., H. Shen, B. A. Tolson, J. R. Craig, J. Mai, S. Lin, N. B. Basu, F. Awol. 2021. North American Lake-River Routing Product v 2.1, derived by BasinMaker GIS Toolbox (routing product v2.1)



  BasinMaker is open-source under the [Artistic License 2.0](https://opensource.org/licenses/Artistic-2.0). This sofware is freely distributed ’as is’ without warranties or conditions of any kind, either express or implied, including, without limitation, any warranties or conditions of title, non-infringement, merchantability, or fitness for a particular purpose.


pkgId: dd6a37815d17c2132dc6802c8fb5c13edd2b3e503fd8a3c928bee3cf9acf76a8
name: python-basis-set-exchange
arch: src
version: 0.10
epoch: 0
release: 1
summary: The Basis Set Exchange
url: https://www.basissetexchange.org
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basis-set-exchange-0.10-1.src.rpm
checksum_type: sha256
description:
  [![Continuous Integration](https://github.com/MolSSI-BSE/basis_set_exchange/workflows/Continuous%20Integration/badge.svg)](https://github.com/MolSSI-BSE/basis_set_exchange/actions?query=workflow%3A%22Continuous+Integration%22)
  [![PyPI version](https://img.shields.io/pypi/v/basis_set_exchange.svg)](https://pypi.org/project/basis_set_exchange/)



  If you are looking for the Basis Set Exchange website (which can be
  used to browse and download this data in a more user-friendly way),
  visit https://www.basissetexchange.org




  This project is a library containing basis sets for use in quantum
  chemistry calculations.  In addition, this library has functionality
  for manipulation of basis set data.

  The goal of this project is to create a consistent, thoroughly curated
  database of basis sets, and to provide a standard nomenclature for
  quantum chemistry.

  The data contained within this library is being thoroughly evaluated
  and checked against relevant literature, software implementations, and
  other databases when available. The original data from the PNNL Basis
  Set Exchange is also available.

  This library is used to form the backend of the new Basis Set Exchange
  website.

  This project is a collaboration between the Molecular Sciences Software
  Institute (https://molssi.org) and the Environmental Molecular Sciences
  Laboratory (https://www.emsl.pnl.gov)



  When publishing results obtained from use of the Basis Set Exchange software, please cite:

   * *A New Basis Set Exchange: An Open, Up-to-date Resource for the Molecular Sciences Community* Benjamin P. Pritchard, Doaa Altarawy, Brett Didier, Tara D. Gibson, and Theresa L. Windus *J. Chem. Inf. Model.* **2019**, 59(11), 4814-4820 doi:[10.1021/acs.jcim.9b00725](https://doi.org/10.1021/acs.jcim.9b00725)

  For citing the previous EMSL/PNNL Basis Set Exchange, please cite the following references:

   * *The Role of Databases in Support of Computational Chemistry Calculations,* Feller, D., *J. Comp. Chem.* **1996**, 17(13), 1571-1586, doi:[10.1002/(SICI)1096-987X(199610)17:13<1571::AID-JCC9>3.0.CO;2-P](https://doi.org/10.1002/(SICI)1096-987X(199610)17:13<1571::AID-JCC9>3.0.CO;2-P)
   * *Basis Set Exchange: A Community Database for Computational Sciences Schuchardt,* K.L., Didier, B.T., Elsethagen, T., Sun, L., Gurumoorthi, V., Chase, J., Li, J., and Windus, T.L. *J. Chem. Inf. Model.* **2007**, 47(3), 1045-1052, doi:[10.1021/ci600510j](https://doi.org/10.1021/ci600510j)



  Full user and developer documentation can be found at
  https://molssi-bse.github.io/basis_set_exchange

  An overview of the project and its design is also available at
  https://molssi-bse.github.io/basis_set_exchange/project_doc.html



  This library also includes a command line interface.
  See https://molssi-bse.github.io/basis_set_exchange/bse_cli.html for how to use it.


  This project can be installed via pip/PyPI.
  ```
  pip install basis_set_exchange
  ```

  If checking out from github, you can do a local install of the Python
  directory,
  ```
  pip install -e .
  ```



  Tests can be run using `py.test -v` once installed. Thorough (but very
  long) tests can be run with `py.test --runslow`.


  ```python
  import basis_set_exchange as bse


  bse.get_basis('STO-3G', elements=[1,6], fmt='nwchem')


  bse.get_references('STO-3G', elements=[1,6], fmt='txt')
  ```

  For more documentation, see https://molssi-bse.github.io/basis_set_exchange




  Same as above, but using the command line

  ``$ bse get-basis sto-3g nwchem --elements=1,6``

  ``$ bse get-refs sto-3g txt --elements=1,6``



  This project is released under the BSD 3-Clause license. See [LICENSE](LICENSE) for details.

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


pkgId: b8a7e289348be82d28e427a60d8c1ad8fa794efbf1418936d49e847aa8f10fa0
name: python-basis-vm
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A complete Python virtual machine for executing smart contracts.
url: https://bitbucket.org/base-computing/basis_vm
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basis-vm-0.1.0-1.src.rpm
checksum_type: sha256
description:
  To run the tests for this project, you need to use the `make test` command. Before running the tests, ensure that the path to the virtual environment is correctly configured.



  1. **Configure the Virtual Environment Path:**
      Open the `Makefile` and set the `VENV_PATH` variable to the path of your virtual environment. For example:
      ```makefile
      VENV_PATH=~/Desktop/Environments/base_computing/micro_dlts_chain/smart_contracts_client/bin/activate
      ```

  2. **Run the Tests:**
      Execute the following command in your terminal:
      ```sh
      make test
      ```

      This command will:
      - Activate the virtual environment.
      - Run the tests using `unittest` framework.



  1. **Run the Coverage Command:**
      Execute the following command in your terminal:
      ```sh
      make coverage
      ```

      This command will:
      - Activate the virtual environment.
      - Run the tests and measure code coverage.
      - Generate a coverage report.
      - Generate an HTML report in the `htmlcov` directory.



  Here is an example of the `Makefile` configuration:
  ```makefile
  VENV_PATH=~/Desktop/Environments/base_computing/micro_dlts_chain/smart_contracts_client/bin/activate

  .PHONY: test coverage

  test:
      source $(VENV_PATH) && python -m unittest discover -s tests

  coverage:
      source $(VENV_PATH) && coverage run -m unittest discover -s tests
      coverage report
      coverage html
      echo "Informe HTML generado en la carpeta 'htmlcov'."
  ```

  Make sure the `VENV_PATH` points to the correct location of your virtual environment's `activate` script.


pkgId: 9bab14b3f36bc9f74d44602581593447e3159f3102026ee4fcd6fd6dc060eb14
name: python-basistheory
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: BasisTheory Python SDK
url: https://basistheory.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basistheory-2.2.0-1.src.rpm
checksum_type: sha256
description:
  *TokensApi* | [**create**](docs/TokensApi.md#create) | **POST** /tokens
  *TokensApi* | [**delete**](docs/TokensApi.md#delete) | **DELETE** /tokens/{id}
  *TokensApi* | [**get_by_id**](docs/TokensApi.md#get_by_id) | **GET** /tokens/{id}
  *TokensApi* | [**list**](docs/TokensApi.md#list) | **GET** /tokens

  - [EncryptionKey](docs/EncryptionKey.md)
  - [EncryptionMetadata](docs/EncryptionMetadata.md)
  - [PaginatedTokenList](docs/PaginatedTokenList.md)
  - [Pagination](docs/Pagination.md)
  - [Token](docs/Token.md)


  All of the client methods accept an optional `RequestOptions` object.<br>This is
  used if you want to set a [correlation ID](https://docs.basistheory.com/api-reference/?shell#request-correlation) or if you want to set a per-request [`BT-API-KEY`](https://docs.basistheory.com/api-reference/?shell#authentication)
  ```python
  import uuid
  import basistheory
  from basistheory.request_options import RequestOptions
  request_options = RequestOptions(api_key="API KEY", correlation_id=uuid.uuid4())
  ```

  Each Api client can be configured to use a custom API url and client-wide [`BT-API-KEY`](https://docs.basistheory.com/api-reference/?shell#authentication).
  ```python
  import basistheory
  from basistheory.api import tokens_api
  configuration = basistheory.Configuration(
      host = "https://token-proxy.somedomain.com",
      api_key = "API KEY"
  )
  with basistheory.ApiClient(configuration) as api_client:
      
      token_client = tokens_api.TokensApi(api_client)
  ```

  Quick example creating a token and then retrieving it.
  ```python
  import uuid
  import basistheory
  from pprint import pprint
  from basistheory.api import tokens_api
  from basistheory.model.create_token_request import CreateTokenRequest
  from basistheory.request_options import RequestOptions

  configuration = basistheory.Configuration(
      api_key = "API KEY"
  )
  with basistheory.ApiClient(configuration) as api_client:
      
      token_client = tokens_api.TokensApi(api_client)
      
      request_options = RequestOptions(correlation_id=uuid.uuid4().__str__())
      
      request = CreateTokenRequest(type="token", data="My Secret Data")
      try:
          
          created_token = token_client.create(create_token_request=request, request_options=request_options)
          pprint(created_token)
          
          retrieved_token = token_client.get_by_id(id=created_token.id)
          pprint(retrieved_token)
      except basistheory.ApiException as e:
          print("Exception when calling TokensApi: %s\n" % e)
  ```


pkgId: 6b98677879a8d1b2901e86a79a13fca30a96db7077f414ae23607ee5e65a2ce1
name: python-basix
arch: src
version: 0.0.13
epoch: 0
release: 1
summary: Utils for python
url: https://pypi.org/project/basix/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basix-0.0.13-1.src.rpm
checksum_type: sha256
description:
  Implementation of some basic operations


  ```
  basix
  ├─ maps
  │  ├─ google.py
  │  │  └─ get_coord
  │  └─ nominatim.py
  │     └─ get_coord
  │
  ├─ files.py
  │  ├─ download_file
  │  ├─ read_file
  │  ├─ file_print
  │  ├─ make_directory
  │  ├─ remove_file
  │  ├─ remove_empty_directory
  │  ├─ remove_directory_recursively
  │  └─ remove_directory
  │
  ├─ functions.py
  │  ├─ ArgumentProperties
  │  ├─ FunctionProperties
  │  ├─ Pipe
  │  └─ get_function_properties
  │
  ├─ numbers.py
  │  └─ round
  │
  ├─ parquet.py
  │  └─ write
  │
  ├─ viz.py
  │  ├─ ColorMix
  │  ├─ hex_to_rgb
  │  ├─ rgb_to_hex
  │  └─ define_colormap
  │
  └─ yaml.py
     └─ read

  ```


pkgId: e5c73e96eb55dd80ff7b9f29aa0230ca1a8a986ad57c2570c78a67d587b5135a
name: python-basketball_reference_web_scraper
arch: src
version: 4.14.1
epoch: 0
release: 1
summary: A Basketball Reference client that generates data by scraping the website
url: https://jaebradley.github.io/basketball_reference_web_scraper
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basketball_reference_web_scraper-4.14.1-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <a href="#" target="_blank" rel="noopener noreferrer">
          <img width="550" src="https://imgur.com/dJL05Ud.png" alt="logo">
      </a>
  </p>
  <p align="center">
      <a href="https://pypi.org/project/basketball_reference_web_scraper/">
          <img src="https://img.shields.io/pypi/v/basketball_reference_web_scraper" alt="pypi" />
      </a>
      <a href="https://pypi.org/project/basketball_reference_web_scraper/">
          <img src="https://img.shields.io/pypi/pyversions/basketball_reference_web_scraper" alt="python version" />
      </a>
      <a href="https://pypi.org/project/basketball_reference_web_scraper/">
          <img src="https://img.shields.io/pypi/l/basketball_reference_web_scraper" alt="license" />
      </a>
      <a href="https://codecov.io/gh/jaebradley/basketball_reference_web_scraper">
          <img src="https://codecov.io/gh/jaebradley/basketball_reference_web_scraper/branch/v4/graph/badge.svg" alt="code coverage" />
      </a>
      <a href="https://github.com/jaebradley/basketball_reference_web_scraper/workflows/Build/badge.svg">
          <img src="https://github.com/jaebradley/basketball_reference_web_scraper/workflows/Build/badge.svg" alt="continuous integration" />
      </a>
  </p>

  [Basketball Reference](http://www.basketball-reference.com) is a great site (especially for a basketball stats nut like me), and hopefully they don't get too pissed off at me for creating this.

  I initially wrote this library as an exercise for creating my first `PyPi` package - hope you find it valuable!



  For documentation about installing the package and API methods see [the documentation page](https://jaebradley.github.io/basketball_reference_web_scraper/).



  Thanks to [@DaiJunyan](https://github.com/DaiJunyan), [@ecallahan5](https://github.com/ecallahan5),
  [@Yotamho](https://github.com/Yotamho), [@ntsirakis](https://github.com/ntsirakis), [@allanbelliti](https://github.com/allanbelliti), [@krlu](https://github.com/krlu), and [@aaronbannin](https://github.com/aaronbannin) for their contributions!


pkgId: 74c110c59195d6793e2cdf5acddea2138da8b14554ead4c5ea010f27fe2f9c8a
name: python-basketball_reference_web_scraper
arch: src
version: 4.15.1
epoch: 0
release: 1
summary: A Basketball Reference client that generates data by scraping the website
url: https://jaebradley.github.io/basketball_reference_web_scraper
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basketball_reference_web_scraper-4.15.1-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <a href="#" target="_blank" rel="noopener noreferrer">
          <img width="550" src="https://imgur.com/dJL05Ud.png" alt="logo">
      </a>
  </p>
  <p align="center">
      <a href="https://pypi.org/project/basketball_reference_web_scraper/">
          <img src="https://img.shields.io/pypi/v/basketball_reference_web_scraper" alt="pypi" />
      </a>
      <a href="https://pypi.org/project/basketball_reference_web_scraper/">
          <img src="https://img.shields.io/pypi/pyversions/basketball_reference_web_scraper" alt="python version" />
      </a>
      <a href="https://pypi.org/project/basketball_reference_web_scraper/">
          <img src="https://img.shields.io/pypi/l/basketball_reference_web_scraper" alt="license" />
      </a>
      <a href="https://codecov.io/gh/jaebradley/basketball_reference_web_scraper">
          <img src="https://codecov.io/gh/jaebradley/basketball_reference_web_scraper/branch/v4/graph/badge.svg" alt="code coverage" />
      </a>
      <a href="https://github.com/jaebradley/basketball_reference_web_scraper/workflows/Build/badge.svg">
          <img src="https://github.com/jaebradley/basketball_reference_web_scraper/workflows/Build/badge.svg" alt="continuous integration" />
      </a>
  </p>

  [Basketball Reference](http://www.basketball-reference.com) is a great site (especially for a basketball stats nut like me), and hopefully they don't get too pissed off at me for creating this.

  I initially wrote this library as an exercise for creating my first `PyPi` package - hope you find it valuable!



  For documentation about installing the package and API methods see [the documentation page](https://jaebradley.github.io/basketball_reference_web_scraper/).



  Thanks to [@DaiJunyan](https://github.com/DaiJunyan), [@ecallahan5](https://github.com/ecallahan5),
  [@Yotamho](https://github.com/Yotamho), [@ntsirakis](https://github.com/ntsirakis), [@allanbelliti](https://github.com/allanbelliti), [@krlu](https://github.com/krlu), [@aaronbannin](https://github.com/aaronbannin), and  [@benjaminmesser](https://github.com/benjaminmesser) for their contributions!


pkgId: b7cf11c7d853fc12612750e8f21000289e1c4fb1de67166565aba941b044a9b8
name: python-basketcase
arch: src
version: 7.1.0
epoch: 0
release: 1
summary: Download images and videos from Instagram
url: https://gitlab.com/crimson.king/basketcase
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basketcase-7.1.0-1.src.rpm
checksum_type: sha256
description:
  Download images and videos from Instagram.

  Notable features:
  - Stories can be downloaded without triggering the "seen" flag.
  - Downloads a high quality version of a profile picture.

  ["Green Day - Basket Case" on YouTube](https://www.youtube.com/watch?v=NUTGr5t3MoY) ;)



  The author prefers [pipx](https://pipx.pypa.io/stable/), which greatly simplifies
  user installations while avoiding conflicts with the system.


  Or you could simply install it in a virtual environment using `venv`.
  I would keep mine at `~/.venv`, then I'd use a shell alias to quickly activate it.


  A pre-built executable for Linux is provided with the releases, and you can just put it in your `PATH`.


  Finally, you can install it from [PyPI](https://pypi.org/project/basketcase/) as a [user install](https://pip.pypa.io/en/stable/user_guide/#user-installs).
  But be aware that some operating systems forbid this practice.

  ```sh
  pip install --user basketcase
  ```


  ```sh
  basketcase -u "https://instagram.com/p/<post_id>"
  ```

  > Downloaded resources will be stored in the current working directory (i.e. `$PWD/basketcase_downloads`).

  To download from multiple URLs, create a text file (e.g. `urls.txt`)
  and populate it with resource URLs:

  ```
  https://instagram.com/p/<post_id>
  https://instagram.com/reel/<reel_id>
  https://instagram.com/<username>
  ```

  ```sh
  basketcase -f ./urls.txt
  ```

  See `--help` for more info.


  | Supported URL                                              | Description                                                                      |
  |------------------------------------------------------------|----------------------------------------------------------------------------------|
  | `https://instagram.com/<username>`                         | User profile. Downloads stories from the past 24 hours, and the profile picture. |
  | `https://instagram.com/p/<post_id>`                        | Standard feed post                                                               |
  | `https://instagram.com/reel/<reel_id>`                     | Reels movie                                                                      |
  | `https://instagram.com/stories/highlights/<highlight_id>/` | A collection of stories, or "highlights"                                         |
  | `https://instagram.com/s/<code>`                           | An alternative URL commonly used for highlighted stories                         |
  | `https://instagram.com/tv/<code>`                          | Similar to reels                                                                 |


  1. Add a session cookie

  ```sh
  basketcase --cookie <session_cookie_id> --cookie-name "my session"

  ```

  2. Specify its identifier when downloading

  ```sh
  basketcase -s 1
  ```

  > List all available sessions with `basketcase -l`.
  > To disable sessions, use `--no-session`.
  > If only one exists, it is treated as the default.


  Cookies and other application data are kept in your home directory (i.e. `~/.basketcase`).


  This program relies on the APIs used by the web browser Instagram client, which can change without a notice.

  To discover and run all tests in this project, activate the project _venv_, `cd` to the project root
  and run `python -m unittest`. Test coverage is still low and needs some effort.


  Fails to locate a suitable extractor for a standard feed post with multiple authors, in which
  the owner - or main author - has a private profile you cannot see.


  This project uses [pipenv](https://pipenv.pypa.io/en/latest/index.html) for dependency and virtual environment
  management, so make sure it's installed. [pipx](https://pipx.pypa.io/stable/) is a convenient tool to manage
  your virtual-environment user installations, and it can be used to install pipenv.

  1. `cd` to the project root and run `pipenv install --dev`.


  1. Increment the version in `pyproject.toml`.
  2. Build the package.

  ```sh
  python -m build
  ```

  3. Commit and push the changes (and a new version tag) to the git repository.
  4. Publish it.
  ```sh
  python -m twine upload dist/*
  ```


  With the [zipapp](https://docs.python.org/3/library/zipapp.html#creating-standalone-applications-with-zipapp) module
  we can build the whole package as an executable file for Linux. The only
  runtime requirement is Python 3.

  1. `cd` to the project root.
  2. Activate the virtual environment.
  3. Run `sh zipapp.sh`.

  The executable file `basketcase` is in the `dist` folder.

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


pkgId: 4b0eccca590f1aee2540c59264ae003d9c3acdb4009400dbc8dc26957fcd1eb2
name: python-baskref
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: baskRef is a tool to scrape basketball Data from the web.
url: https://github.com/orion512/basketball_scraper
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-baskref-1.0.0-1.src.rpm
checksum_type: sha256
description:
  BaskRef is a tool to scrape basketball Data from the web.

  The goal of this project is to provide a data collection utility for
  NBA basketball data. The collection strategy is to scrape data from
  https://www.basketball-reference.com.
  The data can then be saved into a csv to be used by a different utility.





  - games & game stats (in depth stats of the games)
  - players game stats

  All datasets are available to be collected:
  - by day (all games in one day)
  - by whole season (regular + playoffs)
  - by playoffs


  - players meta data (Not Implemented)
  - game logs (Not Implemented)





  ```bash
  pip install baskref


  export LOG_LEVEL=DEBUG # INFO, DEBUG, ERROR
  ```



  Scrape all games for the 7th of January 2022.
  ```bash
  baskref -t g -d 2022-01-07 -fp datasets

  ```

  Scrape all games for the 2006 NBA season (regular season + playoffs).
  ```bash
  baskref -t gs -y 2006 -fp datasets

  ```

  Scrape all games for the 2006 NBA playoffs.
  ```bash
  baskref -t gp -y 2006 -fp datasets


  ```



  ```bash


  baskref -t gu -d 2022-01-07 -fp datasets
  ```



  ```bash


  baskref -t gpl -d 2022-01-07 -fp datasets
  ```


  Use proxy for scraping.
  ```bash
  baskref -t g -d 2022-01-07 -fp datasets -p http://someproxy.com
  ```




  Install requirements
  ```bash
  pip install -r requirements.txt
  ```


  This refers to the scraping functionalities.

  For any mode of collection first you need to import and initialize
  the below classes.
  ```python
  from baskref.data_collection import (
      BaskRefUrlScraper,
      BaskRefDataScraper,
  )

  url_scraper = BaskRefUrlScraper()
  data_scraper = BaskRefDataScraper()


  proxy_url_scraper = BaskRefUrlScraper("http://someproxy.com")
  proxy_data_scraper = BaskRefDataScraper("http://someproxy.com")
  ```
  The BaskRefDataScraper.get_games_data returns a list of dictionaries.

  Collect games for a specific day
  ```python
  from datetime import date

  game_urls = url_scraper.get_game_urls_day(date(2022,1,7))
  game_data = data_scraper.get_games_data(game_urls)
  ```

  Collect games for a specific season (regular + playoffs)
  ```python
  game_urls = url_scraper.get_game_urls_year(2006)
  game_data = data_scraper.get_games_data(game_urls)
  ```

  Collect games for a specific postseason
  ```python
  game_urls = url_scraper.get_game_urls_playoffs(2006)
  game_data = data_scraper.get_games_data(game_urls)
  ```

  Collect player stats for for a specific day
  ```python
  from datetime import date

  game_urls = url_scraper.get_game_urls_day(date(2022,1,7))
  pl_stats_data = data_scraper.get_player_stats_data(game_urls)
  ```


  This refers to the saving of the data.

  Save a list of dictionaries to a CSV file.
  ```python
  import os
  from baskref.data_saving.file_saver import save_file_from_list

  save_path = os.path.join('datasets', 'file_name.csv')
  save_file_from_list(game_data, save_path)
  ```



  Run all tests with Pytest
  ```
  pytest
  ```

  Run all tests with coverage
  ```
  coverage run --source=baskref -m pytest
  coverage report --omit="*/test*" -m --skip-empty
  ```



  The code base uses black for automatic formating.
  the configuration for black is stored in pyproject.toml file.

  ```bash

  black .
  ```



  The code base uses pylint and mypy for code linting.



  the configuration for pylint is stored in .pylintrc file.

  ```bash

  pylint --recursive=y ./
  ```



  the configuration for mypy is stored in pyproject.toml file.

  ```bash

  mypy baskref
  ```





  1. Create Virtual Environment

  - You might want to use a virtual environment for executing the project.
  - this is an optional step (if skipping go straight to step 2)

  Create a new virtual environemnt
  ```
  python -m venv venv  # The second parameter is a path to the virtual env.
  ```

  Activate the new virtual environment
  ```

  .\venv\Scripts\activate


  source venv/bin/activate
  ```

  Leaving the virtual environment
  ```
  deactivate
  ```

  2. Install all the dev requirements

  ```
  pip install -r requirements_dev.txt


  pip freeze > unins && pip uninstall -y -r unins && del unins


  pip freeze | xargs pip uninstall -y
  ```

  3. Install the pre-commit hook
  ```
  pre-commit install
  ```


  This section describes some of the steps when preparing a new baskref version.

  - empty the dist folder
  ```
  rm -rf dist/*
  ```

  - adjust the pyproject.toml file
      - version
      - dependencies

  - install project locally and test it
  ```
  python -m build
  pip install .
  ```

  - install twine
  ```
  pip install --upgrade twine
  ```

  - publish project to test.pypi (optional)
  ```
  twine upload --repository testpypi dist/*

  pip install --index-url https://test.pypi.org/simple/ baskref
  ```

  - publish a new version
  ```
  twine upload dist/*
  ```




  1. [Dominik Zulovec Sajovic](https://www.linkedin.com/in/dominik-zulovec-sajovic/)

rpm_license:
  MIT License  Copyright (c) 2022 Dominik Zulovec Sajovic  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: bd843ddecccd95e1d655e4c5982f3580b12364c4a3d7414abdbffee00073f743
name: python-basti-cdk
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: Cost-efficient bastion host with a CLI tool for convenient access to your AWS resources
url: https://github.com/basti-app/basti/tree/main/packages/basti-cdk
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basti-cdk-1.1.1-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">Basti CDK</h1><div align="center">
    <a href="https://www.npmjs.com/package/basti-cdk">
      <img alt="NPM Package" src="https://img.shields.io/npm/v/basti-cdk?color=green">
    </a>
    <a href="https://pypi.org/project/basti-cdk">
      <img alt="PyPI" src="https://img.shields.io/pypi/v/basti-cdk?color=blue">
    </a>
    <a href="https://github.com/basti-app/basti/blob/main/packages/basti-cdk/LICENSE">
      <img alt="GitHub" src="https://img.shields.io/github/license/basti-app/basti">
    </a>
  </div><br/><div align="center">
    <a href="https://github.com/basti-app/basti/tree/main/packages/basti-cdk">Basti CDK</a> is a construct library that allows you to create cost-efficient <a href="https://en.wikipedia.org/wiki/Bastion_host">bastion instances</a> and easily connect to your infrastructure with <a href="https://github.com/basti-app/basti">Basti CLI</a>.
    <br/>
    <br/>
    💵 <em>No idle costs.</em>  🔑 <em>No SSH keys.</em> 🔒 <em>Fully IAM-driven.</em>
  </div><br/><div align="center">
    <img alt="Diagram" src="https://github.com/basti-app/basti/assets/45905756/1fa0762e-d6a1-4449-9e83-da87b53c3604">
  </div><br/><!-- The following toc is generated with the Markdown All in One VSCode extension (https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one) --><!-- omit from toc -->



  * [Why Basti?](#why-basti)
  * [How it works](#how-it-works)
  * [Installation](#installation)

    * [NPM](#npm)
    * [PyPI](#pypi)
  * [API reference](#api-reference)
  * [Examples](#examples)
  * [Basic usage](#basic-usage)

    * [Set up Basti instance](#set-up-basti-instance)
    * [Allow connection to target](#allow-connection-to-target)
    * [Connect to target](#connect-to-target)
  * [Advanced usage](#advanced-usage)

    * [Importing existing Basti instance](#importing-existing-basti-instance)
    * [Granting access to use Basti instance](#granting-access-to-use-basti-instance)
  * [License](#license)

  <br/>



  With [Basti](https://github.com/basti-app/basti), you can securely connect to your RDS/Aurora/Elasticache/EC2 instances in private VPC subnets from a local machine or CI/CD pipeline almost for free!



  * 🏰 Using Basti CDK, you set up a bastion instance in the connection target's VPC.
  * 🧑‍💻 You use [Basti CLI](https://github.com/basti-app/basti) to conveniently connect to your target through the bastion instance.
  * 💵 Basti takes care of keeping the bastion instance stopped when it's not used to make the solution cost as low as **≈ 0.01 USD** per hour of connection plus **≈ 0.80 USD** per month of maintaining the instance in a stopped state.
  * 🔒 Security completely relies on AWS Session Manager and IAM policies. The bastion instance is not accessible from the Internet and no SSH keys are used.



  The construct is available in multiple languages thanks to [JSII](https://github.com/aws/jsii).



  ```bash
  npm install basti-cdk
  ```



  ```bash
  pip install basti-cdk
  ```



  See the full API reference [on Construct Hub](https://constructs.dev/packages/basti-cdk).



  See [the test CDK apps](https://github.com/basti-app/basti/tree/main/packages/basti-cdk/test/cdk-apps) for working examples of each feature the library provides.



  Basti constructs can be imported from the `basti-cdk` package.

  ```python
  import { BastiAccessSecurityGroup, BastiInstance } from 'basti-cdk';
  ```

  > 💡 RDS instance is used as an example target. You can use Basti to connect to any other AWS resource that supports security groups.



  Use `BastiInstance` construct to create Basti EC2 instance.

  ```python
  const bastiInstance = new BastiInstance(stack, 'BastiInstance', {
    vpc,

    // Optional. Randomly generated if omitted.
    // Used to name the EC2 instance and other resources.
    // The resulting name will be "basti-instance-my-bastion"
    bastiId: 'my-bastion',
  });
  ```



  Use `BastiAccessSecurityGroup` construct to create a security group for your target. This security group will allow the Basti instance to connect to the target.

  ```python
  // Create a security group for your target
  const bastiAccessSecurityGroup = new BastiAccessSecurityGroup(
    stack,
    'BastiAccessSecurityGroup',
    {
      vpc,

      // Optional. Randomly generated if omitted.
      // Used to name the security group and other resources.
      // The resulting name will be "basti-access-my-target"
      bastiId: 'my-target',
    }
  );

  // Create the target
  const rdsInstance = new aws_rds.DatabaseInstance(stack, 'RdsInstance', {
    // Unrelated properties are omitted for brevity

    vpc,
    port: 5432,

    securityGroups: [bastiAccessSecurityGroup],
  });

  // Allow the Basti instance to connect to the target on the specified port
  bastiAccessSecurityGroup.allowBastiInstanceConnection(
    bastiInstance,
    aws_ec2.Port.tcp(rdsInstance.instanceEndpoint.port)
  );
  ```



  When the stack is deployed, you can use [Basti CLI](https://github.com/basti-app/basti) to connect to your target.

  ```sh
  basti connect
  ```





  When sharing a Basti instance across stacks, you can just pass it as a property to the other stack. In case you need to import a Basti instance created in a separate CDK app or not managed by CDK at all, you can use the `BastiInstance.fromBastiId` method. The method returns an `IBastiInstance` object which is sufficient for granting access to a connection target.

  ```python
  // Most likely, the VPC was created separately as well
  const vpc = aws_ec2.Vpc.fromLookup(stack, 'Vpc', {
    vpcName: 'existing-vpc-id',
  });

  const bastiInstance = BastiInstance.fromBastiId(
    this,
    'BastiInstance',
    // The BastiID of the Basti instance you want to import
    'existing-basti-id',
    vpc
  );

  // bastiInstance can now be used to allow access to a connection target
  bastiAccessSecurityGroup.allowBastiInstanceConnection(
    bastiInstance,
    aws_ec2.Port.tcp(1717)
  );
  ```



  You can grant the ability to connect to a Basti instance to other resources (users, roles, etc.) using the `grantBastiCliConnect` method of an existing Basti instance.

  ```python
  const bastiInstance = new BastiInstance(/*...*/);
  const grantee = new aws_iam.Role(/*...*/);

  bastiInstance.grantBastiCliConnect(grantee);
  ```



  Usage is provided under the MIT License. See [LICENSE](https://github.com/basti-app/basti/blob/main/packages/basti-cdk/LICENSE) for the full details.


pkgId: 8e9cdb561b23af3345b70579b83b68e750d01be988b52a6b68fc24671a204b5a
name: python-basxconnect
arch: src
version: 0.4.62
epoch: 0
release: 1
summary: CRM application for non-profit organizations
url: https://github.com/basxsoftwareassociation/basxconnect
rpm_license: New BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basxconnect-0.4.62-1.src.rpm
checksum_type: sha256
description:
  A core implementation of a CRM system for non-profit organizations.
  Documentation at [readthedocs](https://basx-bread.readthedocs.io/en/latest/)


pkgId: 43d18febaea33234aded871a98593a1f785f5c89740c0191bccc180125652732
name: python-basylic
arch: src
version: 0.22.0
epoch: 0
release: 1
summary: Python interface to Basylic's API
url: https://github.com/basylic-team/basylic-python-client
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basylic-0.22.0-1.src.rpm
checksum_type: sha256
description:
  Module to access [Basylic](https://www.basylic.fr/) API.



  Developed by ETAONIS, Basylic is a SaaS solution performing document
  fraud detection with "state-of-the-art" performances. The solution is
  also used as a powerful tool to extract information from
  documents. This module provides a Python interface for accessing
  Basylic.



  This module is available on PyPI. You can install it with `pip` command:

  ```
  pip install basylic
  ```

  Alternatively, you can access the module source code on GitHub:

  * https://github.com/basylic-team/basylic-python-client



  To access the API, refresh and access tokens should be provided. You
  can access your Refresh token via the Portal interface. Then, we
  recommend you store its value in the environment variable
  `BASYLIC_REFRESH_TOKEN`.

  ```python
  from basylic import Basylic
  basylic = Basylic()
  ```

  Alternatively, if your refresh token is stored in a non-standard
  location, you can specify its value with argument `refresh_token`
  during class instantiation:

  ```python
  from basylic import Basylic
  basylic = Basylic(refresh_token=...)
  ```

  2. At least two arguments should be set: one of `file_path`,
     `file_obj` or `ftp_file`, and `document_type`:

  ```python
  basylic.send_document(file_path="corinne-berthier-recto-verso.pdf", document_type="french_ids")
  ```

  * The `file_path` argument is a string with the document path (e.g.: "~/FILE.pdf")
  * `document_type` is a string specifying which Basylic API to call (e.g.: "french_ids")

  Possible values for `document_type` are: `'french_ids'`, `'rib'`, `'ri'`, `'avis-imposition'`...

  With those arguments specified, `send_document` returns a comprehensive JSON document.

  3. Data about applicants can also be joined to the API call:

  ```python
  applicants_information = {"applicant_0": {"identity": "BERTHIER CORINNE"}}
  basylic_result = basylic.send_document(
      file_path="corinne-berthier-recto-verso.pdf",
      document_type="french_ids", applicants_information=applicants_information)
  print(basylic_result)
  ```

  4. And various arguments could be passed as kwargs. For example:

  * a. `save_report=True` will save the result of your request in your
    user space on Basylic Portal;
  * b. `with_image=True` will return a base64 image for each recognised document;

  For example, this code:

  ```python
  applicants_information = {"applicant_0": {"identity": "BERTHIER CORINNE"}}
  basylic_result = basylic.send_document(
      file_path="corinne-berthier-recto-verso.pdf",
      document_type="french_ids", applicants_information=applicants_information,
      with_image=True, save_report=True)
  print(basylic_result)
  ```

  will act in the following way:

  1. Uploads of document whose path is `file_path` to Basylic service `french_ids`;
  2. Produces of a JSON document `basylic_result` with all relevant information;
  3. Compares `identity` provided and identity extracted by Basylic OCR;
  5. A base64 encoded image will be returned in the approriate key of `basylic_result`.


pkgId: c99af2211f9df3c13e76f17599adf6bd2ccca69126897bf050bf969c3b098727
name: python-basyx-python-sdk
arch: src
version: 1.0.0
epoch: 0
release: 1
url: https://github.com/eclipse-basyx/basyx-python-sdk
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-basyx-python-sdk-1.0.0-1.src.rpm
checksum_type: sha256
summary:
  The Eclipse BaSyx Python SDK, an implementation of the Asset Administration Shell for Industry 4.0 systems

description:
  (formerly known as PyI40AAS – Python Industry 4.0 Asset Administration Shell)

  The Eclipse BaSyx Python project focuses on providing a Python implementation of the Asset Administration Shell (AAS)
  for Industry 4.0 Systems.
  These are the currently implemented specifications:

  | Specification                         | Version                                                                                                                     |
  |---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
  | Part 1: Metamodel                     | [v3.0 (01001-3-0)](https://industrialdigitaltwin.org/content-hub/aasspecifications/idta_01001-3-0_metamodel)                |
  | Part 2: API                           | not implemented yet                                                                                                         |
  | Part 3a: Data Specification IEC 61360 | [v3.0 (01003-a-3-0)](https://industrialdigitaltwin.org/content-hub/aasspecifications/idta_01003-a-3-0_data_specification)   |
  | Part 5: Package File Format (AASX)    | [v3.0 (01005-3-0)](https://industrialdigitaltwin.org/content-hub/aasspecifications/idta-01005-3-0_package_file_format_aasx) |



  * Modelling of AASs as Python objects
      * **except for**: *HasDataSpecification*
  * Reading and writing of AASX package files
  * (De-)serialization of AAS objects into/from JSON and XML
  * Storing of AAS objects in CouchDB, Backend infrastructure for easy expansion
  * Compliance checking of AAS XML and JSON files




  The BaSyx Python SDK project provides the `basax.aas` Python package with 6 submodules:

  * `basyx.aas.model`: The AAS metamodel implemented in python
  * `basyx.aas.adapter`: Adapters for various file formats
  * `basyx.aas.backend`: Backend infrastructure for storing and retrieving AAS objects
  * `basyx.aas.compliance_tool`: Compliance checker for AAS files
  * `basyx.aas.util`: Provides utilities
  * `basyx.aas.examples`: Example data and tutorials




  The BaSyx Python SDK project is licensed under the terms of the MIT License.

  SPDX-License-Identifier: MIT

  For more information, especially considering the licenses of included third-party works, please consult the `NOTICE`
  file.




  The BaSyx Python SDK requires the following Python packages to be installed for production usage. These dependencies are listed in
  `setup.py` to be fetched automatically when installing with `pip`:
  * `lxml` (BSD 3-clause License, using `libxml2` under MIT License)
  * `python-dateutil` (BSD 3-clause License)
  * `pyecma376-2` (Apache License v2.0)
  * `urllib3` (MIT License)

  Optional production usage dependencies:
  * For using the Compliance Tool to validate JSON files against the JSON Schema: `jsonschema` and its
  dependencies (MIT License, Apache License, PSF License)

  Development/testing/documentation/example dependencies (see `requirements.txt`):
  * `jsonschema` and its dependencies (MIT License, Apache License, PSF License)
  * `psutil` (BSD 3-clause License)
  * `Sphinx` and its dependencies (multiple licenses)
  * `sphinx-rtd-theme` and its dependencies
  * `sphinx-argparse` (MIT License)

  Dependencies for building the documentation:
  * `Sphinx` and its dependencies (BSD 2-clause License, MIT License, Apache License)
  * `sphinx-rtd-theme` and its dependencies (MIT License, PSF License)
  * `sphinx-argparse` (MIT License)






  Eclipse BaSyx Python SDK can be installed from PyPI, the Python Package Index, just as nearly every other Python package:
  ```bash
  pip install basyx-python-sdk
  ```

  For working with the current development version, you can also install the package directly from GitHub, using Pip's Git feature:
  ```bash
  pip install git+https://github.com/eclipse-basyx/basyx-python-sdk.git@main
  ```

  You may want to use a Python's `venv` or a similar tool to install BaSyx Python SDK and its dependencies only in a project-specific local environment.




  The following code example shows how to create a `Submodel` with a `Property` serialize it into an XML file using the
  Eclipse BaSyx Python SDK:

  Create a `Submodel`:
  ```python
  from basyx.aas import model  # Import all BaSyx Python SDK classes from the model package

  identifier = 'https://acplt.org/Simple_Submodel'
  submodel = model.Submodel(identifier)
  ```

  Create a `Property` and add it to the `Submodel`:
  ```python

  semantic_reference = model.ExternalReference(
      (model.Key(
          type_=model.KeyTypes.GLOBAL_REFERENCE,
          value='http://acplt.org/Properties/SimpleProperty'
      ),)
  )
  property = model.Property(
      id_short='ExampleProperty',  # Identifying string of the element within the submodel namespace
      value_type=model.datatypes.String,  # Data type of the value
      value='exampleValue',  # Value of the property
      semantic_id=semantic_reference  # set the semantic reference
  )
  submodel.submodel_element.add(property)
  ```

  Serialize the `Submodel` to XML:
  ```python
  from basyx.aas.adapter import write_aas_xml_file

  data: model.DictObjectStore[model.Identifiable] = model.DictObjectStore()
  data.add(submodel)
  with open('Simple_Submodel.xml', 'w', encoding='utf-8') as f:
      write_aas_xml_file(file=f, data=data)
  ```




  For further examples and tutorials, check out the `basyx.aas.examples`-package. Here is a quick overview:

  * [`tutorial_create_simple_aas`](./basyx/aas/examples/tutorial_create_simple_aas.py): Create an Asset Administration Shell, including an Asset object and a Submodel
  * [`tutorial_storage`](./basyx/aas/examples/tutorial_storage.py): Manage a larger number of Asset Administration Shells in an ObjectStore and resolve references
  * [`tutorial_serialization_deserialization`](./basyx/aas/examples/tutorial_serialization_deserialization.py): Use the JSON and XML serialization/deserialization for single objects or full standard-compliant files
  * [`tutorial_aasx`](./basyx/aas/examples/tutorial_aasx.py): Export Asset Administration Shells with related objects and auxiliary files to AASX package files
  * [`tutorial_backend_couchdb`](./basyx/aas/examples/tutorial_backend_couchdb.py): Use the *Backends* interface (`update()/commit()` methods) to manage and retrieve AAS objects in a CouchDB document database




  A detailed, complete API documentation is available on Read the Docs: https://basyx-python-sdk.readthedocs.io



  The Eclipse BaSyx Python SDK project contains a compliance tool for testing xml and json files is provided in the
  `basyx.aas.compliance_tool`-package. Following functionalities are supported:

  * create an xml or json file compliant to the official schema containing example Asset Administration Shell elements
  * create an aasx file with xml or json files compliant to the official schema containing example Asset Administration
  Shell elements
  * check if a given xml or json file is compliant to the official schema
  * check if a given xml, json or aasx file is readable even if it is not compliant to the offical schema
  * check if the data in a given xml, json or aasx file is the same as the example data
  * check if two given xml, json or aasx files contain the same Asset Administration Shell elements in any order

  Invoking should work with either `python -m basyx.aas.compliance_tool.cli` or (when installed correctly and PATH is set
  correctly) with `aas-compliance-check` on the command line.

  For further usage information consider the `basyx.aas.compliance_tool`-package or invoke with
  `python -m basyx.aas.compliance_tool.cli --help` respectively `aas-compliance-check --help`.



  For contributing with issues and code, please see our [Contribution Guideline](CONTRIBUTING.md).



  To contribute code to this project you need to sign the [Eclipse Contributor Agreement (ECA)](https://www.eclipse.org/legal/ECA.php).
  This is done by creating an Eclipse account for your git e-mail address and then submitting the following form: https://accounts.eclipse.org/user/eca


pkgId: b7af15bd1cfd3ed25a9160aa43233a6b8a15c79964ebb2a71158f472b0559256
name: python-batch-mailchimp
arch: src
version: 1.2.2
epoch: 0
release: 1
summary: A python client for MailChimp Marketing API, with batch support
url: https://github.com/FullFact/python-batchmailchimp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batch-mailchimp-1.2.2-1.src.rpm
checksum_type: sha256
description:
  A light wrapper around `mailchimp-marketing <https://pypi.org/project/mailchimp-marketing/>`__ that makes it easier to use batch operations.


pkgId: da0273f5cb4be16fa65865c353a44306ba707e0e05664f2dd14a76b94137dfb9
name: python-batch-please
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: A package for batch processing with sync and async capabilities
url: https://github.com/gillespied/batch_please
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batch-please-0.2.0-1.src.rpm
checksum_type: sha256
description:
  A flexible and efficient Python library for processing large datasets in batches, with support for both synchronous and asynchronous operations.



  - Process large datasets in customizable batch sizes
  - Support for both synchronous and asynchronous processing
  - Checkpoint functionality to resume processing from where it left off
  - Optional progress bar using tqdm
  - Configurable concurrency limit for asynchronous processing
  - Logging support



  ```bash
  pip install batch_please
  ```





  ```python
  from batch_please import BatchProcessor

  def process_func(item):
      return f"Processed: {item}"

  processor = BatchProcessor(
      process_func=process_func,
      batch_size=100,
      use_tqdm=True
  )

  input_data = range(1000)
  processed_items = processor.process_items_in_batches(input_data)
  ```



  ```python
  import asyncio
  from batch_please import AsyncBatchProcessor

  async def async_process_func(item):
      await asyncio.sleep(0.1)
      return f"Processed: {item}"

  async def main():
      processor = AsyncBatchProcessor(
          process_func=async_process_func,
          batch_size=100,
          max_concurrent=10,
          use_tqdm=True
      )

      input_data = range(1000)
      processed_items = await processor.process_items_in_batches(input_data)

  asyncio.run(main())
  ```





  ```python
  processor = BatchProcessor(
      process_func=process_func,
      batch_size=100,
      pickle_file="checkpoint.pkl",
      recover_from_checkpoint=True
  )
  ```



  ```python
  processor = BatchProcessor(
      process_func=process_func,
      batch_size=100,
      logfile="processing.log"
  )
  ```

  Further [Documentation](https://gillespied.github.io/batch_please/)


pkgId: 16b44b7cb42520484e2b2bdd97b95d91e5ab36928033327f3157090042c1a63e
name: python-batch-queue2
arch: src
version: 1.0.10
epoch: 0
release: 1
summary: A batch queue system implemented with asyncio
url: https://sr.ht/~ndbecker2/batch_queue2/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batch-queue2-1.0.10-1.src.rpm
checksum_type: sha256
description:
  **batch_queue2** is a simple task queuing system built using Python's
  `asyncio`. It allows you to submit, manage, and track tasks using a
  lightweight, XML-RPC-based interface.  It's main purpose is to allow
  queueing up more tasks to run on the local machine than we can support
  running simultaneously; either because the number of tasks is more
  than the number of CPUs or because running all those tasks
  simultaneously will use too much memory.


  - Submit, list, suspend, resume, and kill tasks using command-line commands.
  - Tasks can be queued, paused, or resumed based on available CPUs.
  - XML-RPC server for managing task requests.
  - Ability to run tasks using multiple CPUs.
  - Tasks can be paused and resumed.


  - Python 3.7+
  - `aiohttp`
  - `requests`


  You can install **batch_queue2** from PyPI:

  ```sh
  pip install batch_queue2
  ```

  Or clone the repository from [Sourcehut](https://hg.sr.ht/~ndbecker2/batch_queue2/):

  ```sh
  hg clone https://hg.sr.ht/~ndbecker2/batch_queue2
  cd batch_queue2
  python -m pip install .
  ```



  After installing, you can use the `batch_queue` command to manage tasks. Below are the available options:


  To start the server:

  ```sh
  batch_queue start --max-cpus 4
  ```

  - `--max-cpus`: (Optional) Specify the maximum number of CPUs to use. Defaults to the number of CPUs available on your system.

  The server will start in daemon mode by default.


  To submit a task, use the `submit` command:

  ```sh
  batch_queue submit <command>
  ```
  For example:

  ```sh
  batch_queue submit sleep 10
  ```

  You can also optionally specify:
  - `--log-stdout <file>`: Redirect the standard output of the task to a file.
  - `--log-stderr <file>`: Redirect the standard error of the task to a file.


  To list all tasks:

  ```sh
  batch_queue list
  ```
  This will display:
  - Max CPUs available.
  - Active tasks.
  - Queued tasks.
  - Paused tasks.
  - Runnable paused tasks.


  To suspend task(s) (running or queued):

  ```sh
  batch_queue suspend <task_ids>
  ```

  To resume a paused task(s):

  ```sh
  batch_queue resume <task_ids>
  ```


  To kill specific task(s):

  ```sh
  batch_queue kill <task_ids> <signal>
  ```
  You can also optionally specify the signal to use, default is `SIGTERM`.


  To get detailed information about a specific task:

  ```sh
  batch_queue id <task_id>
  ```
  This command provides detailed information about the task including command, user, working directory, environment variables, and logs.


  You can reset the max #cpus.  When you do this, if the new maximum is
  greater than the number of active tasks the scheduler is recalled and
  queued tasks can be started.  If the new maximum is smaller than the
  number of active tasks tasks will be suspended, but marked runnable to
  be continued later.

  ```sh
  batch_queue setcpus #cpus
  ```


  To stop the server:

  ```sh
  batch_queue stop
  ```
  This command gracefully stops the server, ensuring no tasks are left in a zombie state.


  1. Start the server using:
     ```sh
     batch_queue start --max-cpus 4
     ```

  2. Submit a couple of tasks:
     ```sh
     batch_queue submit sleep 10
     batch_queue submit echo "Hello World"
     ```

  3. List the tasks to see the active, queued, and paused tasks:
     ```sh
     batch_queue list
     ```

  4. Suspend running tasks:
     ```sh
     batch_queue suspend 0
     ```

  5. Resume paused tasks:
     ```sh
     batch_queue resume 0
     ```

  6. Stop the server:
     ```sh
     batch_queue stop
     ```


  The server logs all activity to `~/batch_queue.log`. You can view the log to monitor task submissions, task status changes, server starts and stops, etc.


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


  The server listens on a unix domain socket normally in the user's home
  directory who starts it.  Only users with access to this socket can
  use it.


pkgId: 32e5c8b246d07cef31b086e75a105943c0a619b770fed202403ae796011dcc65
name: python-batch-queue2
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: A Python-based batch queue manager
url: https://sr.ht/~ndbecker2/batch_queue2/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batch-queue2-1.0.4-1.src.rpm
checksum_type: sha256
description:
  **batch_queue2** is a simple task queuing system built using Python's `asyncio`. It allows you to submit, manage, and track tasks using a lightweight, XML-RPC-based interface.


  - Submit, list, suspend, resume, and kill tasks using command-line commands.
  - Tasks can be queued, paused, or resumed based on available CPUs.
  - XML-RPC server for managing task requests.
  - Ability to run tasks using multiple CPUs.
  - Tasks can be paused and resumed.


  - Python 3.7+
  - `aiohttp`
  - `requests`


  You can install **batch_queue2** from PyPI:

  ```sh
  pip install batch_queue2
  ```

  Or clone the repository from [Sourcehut](https://sr.ht/~ndbecker2/batch_queue2/):

  ```sh
  git clone https://sr.ht/~ndbecker2/batch_queue2/
  cd batch_queue2
  python -m pip install .
  ```



  After installing, you can use the `batch_queue` command to manage tasks. Below are the available options:


  To start the server:

  ```sh
  batch_queue start --max-cpus 4
  ```

  - `--max-cpus`: (Optional) Specify the maximum number of CPUs to use. Defaults to the number of CPUs available on your system.

  The server will start in daemon mode by default.


  To submit a task, use the `submit` command:

  ```sh
  batch_queue submit <command>
  ```
  For example:

  ```sh
  batch_queue submit sleep 10
  ```

  You can also optionally specify:
  - `--log-stdout <file>`: Redirect the standard output of the task to a file.
  - `--log-stderr <file>`: Redirect the standard error of the task to a file.


  To list all tasks:

  ```sh
  batch_queue list
  ```
  This will display:
  - Max CPUs available.
  - Active tasks.
  - Queued tasks.
  - Paused tasks.


  To suspend a running task:

  ```sh
  batch_queue suspend <task_id>
  ```

  To resume a paused task:

  ```sh
  batch_queue resume <task_id>
  ```


  To kill a specific task:

  ```sh
  batch_queue kill <task_id>
  ```
  You can also optionally specify the signal to use, default is `SIGTERM`.


  To get detailed information about a specific task:

  ```sh
  batch_queue id <task_id>
  ```
  This command provides detailed information about the task including command, user, working directory, environment variables, and logs.


  To stop the server:

  ```sh
  batch_queue stop
  ```
  This command gracefully stops the server, ensuring no tasks are left in a zombie state.


  1. Start the server using:
     ```sh
     batch_queue start --max-cpus 4
     ```

  2. Submit a couple of tasks:
     ```sh
     batch_queue submit sleep 10
     batch_queue submit echo "Hello World"
     ```

  3. List the tasks to see the active, queued, and paused tasks:
     ```sh
     batch_queue list
     ```

  4. Suspend a running task:
     ```sh
     batch_queue suspend 0
     ```

  5. Resume a paused task:
     ```sh
     batch_queue resume 0
     ```

  6. Stop the server:
     ```sh
     batch_queue stop
     ```


  The server logs all activity to `~/batch_queue.log`. You can view the log to monitor task submissions, task status changes, server starts and stops, etc.


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


pkgId: 89f077a4455c972a46c299685fd05ccbceb4ebdfc0cf7e1a4ccfb3f0a4c948af
name: python-batchalign
arch: src
version: 0.7.4
epoch: 0
release: 1
summary: Python Speech Language Sample Analysis
url: https://pypi.org/project/batchalign/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchalign-0.7.4-1.src.rpm
checksum_type: sha256
description:
  The following instructions provide a quick start to installing Batchalign. For most users aiming to process CHAT and audio with Batchalign, we recommend more detailed usage instructions: for [usage](https://talkbank.org/info/BA2-usage.pdf) and [human transcript cleanup](https://talkbank.org/info/BA2-cleanup.pdf). The following provides a quick start guide for the program.

  - We support Python versions 3.9, 3.10, and 3.11.
  - **We do not support Python 3.12** (no PyTorch support)
  - To install Python, follow the instructions...
      -  for macOS
          1. Install Brew: [visit this link](https://brew.sh/)
          2. Install Python: execute `brew install python@3.11`
      -  for Windows
          1.  Install Python 3.11: [via this link](https://www.python.org/ftp/python/3.11.7/python-3.11.7-amd64.exe)
          2.  If later commands report `pip module not found`, [this page may help](https://stackoverflow.com/a/15626784)
      -  your distribution's instructions for Linux

  You can get Batchalign from PyPi, and you can update the package in the same way:
  macOS/Linux:
  ```
  pip install -U batchalign
  ```
  Windows:
  ```
  py -m pip install -U batchalign
  ```

  There are two main ways of interacting with Batchalign. Batchalign can be used as a program to batch-process CHAT (hence the name), or as a Python LSA library.
  - to get started with the Batchalign program, [tap here](#quick-start-command-line)
  - to get started on the Batchalign Library (assumes familiarity with Python), [tap here](#quick-start-python)


  Once installed, you can invoke the Batchalign program by typing `batchalign` into the Terminal (MacOS) or Command Prompt (Windows).
  It is used in the following basic way:
  ```
  batchalign [verb] [input_dir] [output_dir]
  ```
  Where `verb` includes:
  1. `transcribe` - by placing only an audio of video file (`.mp3/.mp4/.wav`) in the input directory, this function performs ASR on the audio, diarizes utterances, identifies some basic conversational features like retracing and filled pauses, and generates word-level alignments. You must supply a language code flag: `--lang=[three letter ISO language code]` for the ASR system to know what language the transcript is in. You can choose the flags `--rev` to use Rev.AI, a commercial ASR service, or `--whisper`, to use a local copy of OpenAI Whisper.
  2. `align` - by placing both an audio of video file (`.mp3/.mp4/.wav`) and an *utterance-aligned* CHAT file in the input directory, this function recovers utterance-level time alignments (if they are not already annotated) and generates word-level alignments. The @Languages header in the CHAT file tells the program which language is in the transcript.
  3. `morphotag` - by placing a CHAT file in the input directory, this function uses Stanford NLP Stanza to generate morphological and dependency analyses. The @Languages header in the CHAT file tells the program which language is in the transcript. You must supply a language code flag: `--lang=[three letter ISO language code]` for the alignment system to know what language the transcript is in.
  <!-- 4. `bulletize` - placing both an audio of video file (`.mp3/.mp4/.wav`) and an *unlinked* CHAT file in the input directory, generate utterance-level alignments through ASR -->
  You can get a CHAT transcript to experiment with [at the TalkBank website](https://talkbank.org/), under any of the "Banks" that are available. You can also generate and parse a CHAT transcript via [the Python program](https://github.com/TalkBank/batchalign2?tab=readme-ov-file#chat).

  For input files (CHAT and audio for `align`, CHAT only for `morphotag`, and audio only for `transcribe`), located in `~/ba_input` dumping the output to `~/ba_output`, one could write:

  ```
  batchalign transcribe --lang=eng ~/ba_input ~/ba_output
  ```

  ```
  batchalign morphotag ~/ba_input ~/ba_output
  ```

  ```
  batchalign align --lang=eng ~/ba_input ~/ba_output


pkgId: 7846b2a1fd2182e13f5124e0152ae38a3495612dc3182021bcc347808aab72a2
name: python-batcharray
arch: src
version: 0.0.3
epoch: 0
release: 1
summary: Functions to manipulate NumPy arrays
url: https://github.com/durandtibo/batcharray
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batcharray-0.0.3-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <a href="https://github.com/durandtibo/batcharray/actions">
          <img alt="CI" src="https://github.com/durandtibo/batcharray/workflows/CI/badge.svg">
      </a>
      <a href="https://github.com/durandtibo/batcharray/actions">
          <img alt="Nightly Tests" src="https://github.com/durandtibo/batcharray/workflows/Nightly%20Tests/badge.svg">
      </a>
      <a href="https://github.com/durandtibo/batcharray/actions">
          <img alt="Nightly Package Tests" src="https://github.com/durandtibo/batcharray/workflows/Nightly%20Package%20Tests/badge.svg">
      </a>
      <br/>
      <a href="https://durandtibo.github.io/batcharray/">
          <img alt="Documentation" src="https://github.com/durandtibo/batcharray/workflows/Documentation%20(stable)/badge.svg">
      </a>
      <a href="https://durandtibo.github.io/batcharray/">
          <img alt="Documentation" src="https://github.com/durandtibo/batcharray/workflows/Documentation%20(unstable)/badge.svg">
      </a>
      <br/>
      <a href="https://codecov.io/gh/durandtibo/batcharray">
          <img alt="Codecov" src="https://codecov.io/gh/durandtibo/batcharray/branch/main/graph/badge.svg">
      </a>
      <a href="https://codeclimate.com/github/durandtibo/batcharray/maintainability">
          <img src="https://api.codeclimate.com/v1/badges/9907f3838df3b9a1cba8/maintainability" />
      </a>
      <a href="https://codeclimate.com/github/durandtibo/batcharray/test_coverage">
          <img src="https://api.codeclimate.com/v1/badges/9907f3838df3b9a1cba8/test_coverage" />
      </a>
      <br/>
      <a href="https://github.com/psf/black">
          <img  alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
      </a>
      <a href="https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings">
          <img  alt="Doc style: google" src="https://img.shields.io/badge/%20style-google-3666d6.svg">
      </a>
      <a href="https://github.com/astral-sh/ruff">
          <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;">
      </a>
      <a href="https://github.com/guilatrova/tryceratops">
          <img  alt="Doc style: google" src="https://img.shields.io/badge/try%2Fexcept%20style-tryceratops%20%F0%9F%A6%96%E2%9C%A8-black">
      </a>
      <br/>
      <a href="https://pypi.org/project/batcharray/">
          <img alt="PYPI version" src="https://img.shields.io/pypi/v/batcharray">
      </a>
      <a href="https://pypi.org/project/batcharray/">
          <img alt="Python" src="https://img.shields.io/pypi/pyversions/batcharray.svg">
      </a>
      <a href="https://opensource.org/licenses/BSD-3-Clause">
          <img alt="BSD-3-Clause" src="https://img.shields.io/pypi/l/batcharray">
      </a>
      <br/>
      <a href="https://pepy.tech/project/batcharray">
          <img  alt="Downloads" src="https://static.pepy.tech/badge/batcharray">
      </a>
      <a href="https://pepy.tech/project/batcharray">
          <img  alt="Monthly downloads" src="https://static.pepy.tech/badge/batcharray/month">
      </a>
      <br/>
  </p>



  `batcharray` is lightweight library built on top of [NumPy](https://numpy.org/doc/stable/index.html)
  to manipulate nested data structure with NumPy arrays.
  This library provides functions for arrays where the first axis is the batch axis.
  It also provides functions for arrays representing a batch of sequences where the first axis
  is the batch axis and the second axis is the sequence axis.

  - [Motivation](#motivation)
  - [Documentation](https://durandtibo.github.io/batcharray/)
  - [Installation](#installation)
  - [Contributing](#contributing)
  - [API stability](#api-stability)
  - [License](#license)



  Let's imagine you have a batch which is represented by a dictionary with three arrays, and you want
  to take the first 2 items.
  `batcharray` provides the function `slice_along_batch` that allows to slide all the arrays:

  ```pycon

  >>> import numpy as np
  >>> from batcharray.nested import slice_along_batch
  >>> batch = {
  ...     "a": np.array([[2, 6], [0, 3], [4, 9], [8, 1], [5, 7]]),
  ...     "b": np.array([4, 3, 2, 1, 0]),
  ...     "c": np.array([1.0, 2.0, 3.0, 4.0, 5.0]),
  ... }
  >>> slice_along_batch(batch, stop=2)
  {'a': array([[2, 6], [0, 3]]), 'b': array([4, 3]), 'c': array([1., 2.])}

  ```

  Similarly, it is possible to split a batch in multiple batches by using the
  function `split_along_batch`:

  ```pycon

  >>> import numpy as np
  >>> from batcharray.nested import split_along_batch
  >>> batch = {
  ...     "a": np.array([[2, 6], [0, 3], [4, 9], [8, 1], [5, 7]]),
  ...     "b": np.array([4, 3, 2, 1, 0]),
  ...     "c": np.array([1.0, 2.0, 3.0, 4.0, 5.0]),
  ... }
  >>> split_along_batch(batch, split_size_or_sections=2)
  [{'a': array([[2, 6], [0, 3]]), 'b': array([4, 3]), 'c': array([1., 2.])},
   {'a': array([[4, 9], [8, 1]]), 'b': array([2, 1]), 'c': array([3., 4.])},
   {'a': array([[5, 7]]), 'b': array([0]), 'c': array([5.])}]

  ```

  Please check the documentation to see all the implemented functions.



  - [latest (stable)](https://durandtibo.github.io/batcharray/): documentation from the latest stable
    release.
  - [main (unstable)](https://durandtibo.github.io/batcharray/main/): documentation associated to the
    main branch of the repo. This documentation may contain a lot of work-in-progress/outdated/missing
    parts.



  We highly recommend installing
  a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).
  `batcharray` can be installed from pip using the following command:

  ```shell
  pip install batcharray
  ```

  To make the package as slim as possible, only the minimal packages required to use `batcharray` are
  installed.
  To include all the dependencies, you can use the following command:

  ```shell
  pip install batcharray[all]
  ```

  Please check the [get started page](https://durandtibo.github.io/batcharray/get_started) to see how
  to install only some specific dependencies or other alternatives to install the library.
  The following is the corresponding `batcharray` versions and tested dependencies.

  | `batcharray` | `coola`      | `numpy`       | `python`      |
  |--------------|--------------|---------------|---------------|
  | `main`       | `>=0.3,<1.0` | `>=1.22,<3.0` | `>=3.9,<3.13` |
  | `0.0.3`      | `>=0.3,<1.0` | `>=1.22,<3.0` | `>=3.9,<3.13` |
  | `0.0.2`      | `>=0.3,<1.0` | `>=1.22,<2.0` | `>=3.9,<3.13` |
  | `0.0.1`      | `>=0.3,<1.0` | `>=1.22,<2.0` | `>=3.9,<3.13` |

  <sup>*</sup> indicates an optional dependency



  Please check the instructions in [CONTRIBUTING.md](.github/CONTRIBUTING.md).



  Everyone is welcome to contribute to the community.
  If you have any questions or suggestions, you can
  submit [Github Issues](https://github.com/durandtibo/batcharray/issues).
  We will reply to you as soon as possible. Thank you very much.



  :warning: While `batcharray` is in development stage, no API is guaranteed to be stable from one
  release to the next.
  In fact, it is very likely that the API will change multiple times before a stable 1.0.0 release.
  In practice, this means that upgrading `batcharray` to a new version will possibly break any code
  that was using the old version of `batcharray`.



  `batcharray` is licensed under BSD 3-Clause "New" or "Revised" license available
  in [LICENSE](LICENSE) file.


pkgId: cd79d115e2357c53c6bddde94a68b72d8ee3001ee1450f5017e98e1397452047
name: python-batcharray
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Functions to manipulate NumPy arrays
url: https://github.com/durandtibo/batcharray
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batcharray-0.1.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <a href="https://github.com/durandtibo/batcharray/actions">
          <img alt="CI" src="https://github.com/durandtibo/batcharray/workflows/CI/badge.svg">
      </a>
      <a href="https://github.com/durandtibo/batcharray/actions">
          <img alt="Nightly Tests" src="https://github.com/durandtibo/batcharray/workflows/Nightly%20Tests/badge.svg">
      </a>
      <a href="https://github.com/durandtibo/batcharray/actions">
          <img alt="Nightly Package Tests" src="https://github.com/durandtibo/batcharray/workflows/Nightly%20Package%20Tests/badge.svg">
      </a>
      <br/>
      <a href="https://durandtibo.github.io/batcharray/">
          <img alt="Documentation" src="https://github.com/durandtibo/batcharray/workflows/Documentation%20(stable)/badge.svg">
      </a>
      <a href="https://durandtibo.github.io/batcharray/">
          <img alt="Documentation" src="https://github.com/durandtibo/batcharray/workflows/Documentation%20(unstable)/badge.svg">
      </a>
      <br/>
      <a href="https://codecov.io/gh/durandtibo/batcharray">
          <img alt="Codecov" src="https://codecov.io/gh/durandtibo/batcharray/branch/main/graph/badge.svg">
      </a>
      <a href="https://codeclimate.com/github/durandtibo/batcharray/maintainability">
          <img src="https://api.codeclimate.com/v1/badges/9907f3838df3b9a1cba8/maintainability" />
      </a>
      <a href="https://codeclimate.com/github/durandtibo/batcharray/test_coverage">
          <img src="https://api.codeclimate.com/v1/badges/9907f3838df3b9a1cba8/test_coverage" />
      </a>
      <br/>
      <a href="https://github.com/psf/black">
          <img  alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
      </a>
      <a href="https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings">
          <img  alt="Doc style: google" src="https://img.shields.io/badge/%20style-google-3666d6.svg">
      </a>
      <a href="https://github.com/astral-sh/ruff">
          <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;">
      </a>
      <a href="https://github.com/guilatrova/tryceratops">
          <img  alt="Doc style: google" src="https://img.shields.io/badge/try%2Fexcept%20style-tryceratops%20%F0%9F%A6%96%E2%9C%A8-black">
      </a>
      <br/>
      <a href="https://pypi.org/project/batcharray/">
          <img alt="PYPI version" src="https://img.shields.io/pypi/v/batcharray">
      </a>
      <a href="https://pypi.org/project/batcharray/">
          <img alt="Python" src="https://img.shields.io/pypi/pyversions/batcharray.svg">
      </a>
      <a href="https://opensource.org/licenses/BSD-3-Clause">
          <img alt="BSD-3-Clause" src="https://img.shields.io/pypi/l/batcharray">
      </a>
      <br/>
      <a href="https://pepy.tech/project/batcharray">
          <img  alt="Downloads" src="https://static.pepy.tech/badge/batcharray">
      </a>
      <a href="https://pepy.tech/project/batcharray">
          <img  alt="Monthly downloads" src="https://static.pepy.tech/badge/batcharray/month">
      </a>
      <br/>
  </p>



  `batcharray` is lightweight library built on top of [NumPy](https://numpy.org/doc/stable/index.html)
  to manipulate nested data structure with NumPy arrays.
  This library provides functions for arrays where the first axis is the batch axis.
  It also provides functions for arrays representing a batch of sequences where the first axis
  is the batch axis and the second axis is the sequence axis.

  - [Motivation](#motivation)
  - [Documentation](https://durandtibo.github.io/batcharray/)
  - [Installation](#installation)
  - [Contributing](#contributing)
  - [API stability](#api-stability)
  - [License](#license)



  Let's imagine you have a batch which is represented by a dictionary with three arrays, and you want
  to take the first 2 items.
  `batcharray` provides the function `slice_along_batch` that allows to slide all the arrays:

  ```pycon

  >>> import numpy as np
  >>> from batcharray.nested import slice_along_batch
  >>> batch = {
  ...     "a": np.array([[2, 6], [0, 3], [4, 9], [8, 1], [5, 7]]),
  ...     "b": np.array([4, 3, 2, 1, 0]),
  ...     "c": np.array([1.0, 2.0, 3.0, 4.0, 5.0]),
  ... }
  >>> slice_along_batch(batch, stop=2)
  {'a': array([[2, 6], [0, 3]]), 'b': array([4, 3]), 'c': array([1., 2.])}

  ```

  Similarly, it is possible to split a batch in multiple batches by using the
  function `split_along_batch`:

  ```pycon

  >>> import numpy as np
  >>> from batcharray.nested import split_along_batch
  >>> batch = {
  ...     "a": np.array([[2, 6], [0, 3], [4, 9], [8, 1], [5, 7]]),
  ...     "b": np.array([4, 3, 2, 1, 0]),
  ...     "c": np.array([1.0, 2.0, 3.0, 4.0, 5.0]),
  ... }
  >>> split_along_batch(batch, split_size_or_sections=2)
  [{'a': array([[2, 6], [0, 3]]), 'b': array([4, 3]), 'c': array([1., 2.])},
   {'a': array([[4, 9], [8, 1]]), 'b': array([2, 1]), 'c': array([3., 4.])},
   {'a': array([[5, 7]]), 'b': array([0]), 'c': array([5.])}]

  ```

  Please check the documentation to see all the implemented functions.



  - [latest (stable)](https://durandtibo.github.io/batcharray/): documentation from the latest stable
    release.
  - [main (unstable)](https://durandtibo.github.io/batcharray/main/): documentation associated to the
    main branch of the repo. This documentation may contain a lot of work-in-progress/outdated/missing
    parts.



  We highly recommend installing
  a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).
  `batcharray` can be installed from pip using the following command:

  ```shell
  pip install batcharray
  ```

  To make the package as slim as possible, only the minimal packages required to use `batcharray` are
  installed.
  To include all the dependencies, you can use the following command:

  ```shell
  pip install batcharray[all]
  ```

  Please check the [get started page](https://durandtibo.github.io/batcharray/get_started) to see how
  to install only some specific dependencies or other alternatives to install the library.
  The following is the corresponding `batcharray` versions and tested dependencies.

  | `batcharray` | `coola`        | `numpy`       | `python`      |
  |--------------|----------------|---------------|---------------|
  | `main`       | `>=0.8.4,<1.0` | `>=1.22,<3.0` | `>=3.9,<3.14` |
  | `0.1.0`      | `>=0.8.4,<1.0` | `>=1.22,<3.0` | `>=3.9,<3.14` |
  | `0.0.3`      | `>=0.3,<1.0`   | `>=1.22,<3.0` | `>=3.9,<3.13` |
  | `0.0.2`      | `>=0.3,<1.0`   | `>=1.22,<2.0` | `>=3.9,<3.13` |
  | `0.0.1`      | `>=0.3,<1.0`   | `>=1.22,<2.0` | `>=3.9,<3.13` |

  <sup>*</sup> indicates an optional dependency



  Please check the instructions in [CONTRIBUTING.md](.github/CONTRIBUTING.md).



  Everyone is welcome to contribute to the community.
  If you have any questions or suggestions, you can
  submit [Github Issues](https://github.com/durandtibo/batcharray/issues).
  We will reply to you as soon as possible. Thank you very much.



  :warning: While `batcharray` is in development stage, no API is guaranteed to be stable from one
  release to the next.
  In fact, it is very likely that the API will change multiple times before a stable 1.0.0 release.
  In practice, this means that upgrading `batcharray` to a new version will possibly break any code
  that was using the old version of `batcharray`.



  `batcharray` is licensed under BSD 3-Clause "New" or "Revised" license available
  in [LICENSE](LICENSE) file.


pkgId: 59af5d0466c86113a5034bb9fae9b5c4617cec86a3fa1669ed7c07f76e4ca62c
name: python-batched
arch: src
version: 0.1.2
epoch: 0
release: 1
url: https://pypi.org/project/batched/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batched-0.1.2-1.src.rpm
checksum_type: sha256
summary:
  Batched is a flexible and efficient batch processing library implemented in Python. It supports asynchronous batch processing with dynamic batching and prioritization.

description:
  The Batched API provides a flexible and efficient way to process multiple requests in a batch, with a primary focus on dynamic batching of inference workloads. It is designed to optimize throughput while maintaining a low-latency experience, especially useful in scenarios where you need to handle a high volume of requests simultaneously. It is designed for both async and sync execution.

  ![Batch Performance](/examples/inference_speed.png)



  - [Installation](#installation)
  - [Usage](#usage)
    - [Basic Example](#basic-example)
    - [Advanced Usage](#advanced-usage)
  - [API Reference](#api-reference)
  - [Contributing](#contributing)
  - [License](#license)



  Dynamic batching is a technique that automatically groups multiple incoming inference requests into a single batch for processing. This is particularly beneficial for inference workloads, where processing multiple inputs together can significantly improve throughput and efficiency.

  In machine learning models, dynamic batching matters because it optimizes hardware utilization, especially for GPUs and specialized AI hardware designed for parallel processing. By batching requests, we can fully leverage this parallel processing, leading to higher throughput. It also reduces overhead by amortizing fixed costs (such as data transfer and model initialization) across multiple requests, improving overall efficiency. Furthermore, dynamic batching enhances real-time performance by adapting to varying request rates, maintaining low latency during quiet periods while maximizing throughput during busy times.

  This makes dynamic batching a crucial technique for deploying ML models in production environments where request patterns can be unpredictable and resource optimization is key.



  To install the Batched, you can use pip:

  ```bash
  pip install batched
  ```





  Below is a basic example of how to use the Batched API to process text data in batches.

  ```diff
     from sentence_transformers import SentenceTransformer
     import numpy as np
  +  import batched

     class SentenceEmbedder:
        def __init__(self, model_name='mixedbread-ai/mxbai-embed-large-v1'):
           self.model = SentenceTransformer(model_name)

  +     @batched.dynamically
        def embed_sentences(self, sentences: list[str]) -> list[np.ndarray]:
           
           return self.model.encode(sentences)

     
     embedder = SentenceEmbedder()

     
     single_sent = "This is a test sentence."
     embedding = embedder.embed_sentences(single_sent)
  +  awaited_embedding = await embedder.embed_sentences.acall(single_sent)

     
     batch_sentences = [f"This is test sentence number {i}." for i in range(1000)]
     batch_embeddings = embedder.embed_sentences(batch_sentences)
  +  awaited_batch_embeddings = await embedder.embed_sentences.acall(batch_sentences)

     
  +  stats = embedder.embed_sentences.stats
  ```



  For more advanced usage, such as customizing batch size and timeout dynamically, the Batched API provides decorators that allow fine-grained control over the batching process.

  - **Batch Size**: You can specify the max. number of requests to group together in a single batch.
  - **Timeout**: The maximum time to wait for more requests before processing the batch.
  - **Small Batch Threshold**: The threshold to give more priority to smaller batches.
  - **Pad Token**: The token to use for padding when batching tensors, only for `@inference.dynamically` and `@aio.inference.dynamically`.

  For example:

  ```python
  @batched.dynamically(batch_size=64, timeout_ms=5.0, small_batch_threshold=2)
  def custom_batch_function(data):
      
      pass
  ```



  The API offers both thread and asyncio implementations for batching general tasks and inference tasks:



  - `@batched.dynamically`: Allows dynamic batching for general tasks (Both sync and async supported).
  - The decorated method should:
    - Take in a list of items (`list[T]`)
    - Return a list of results (`list[U]`) of the same length.

  ```python
  import batched


  @batched.dynamically(batch_size=64)
  def my_function(items: list[int]) -> list[str]:
    
    return [f"{item * 2}" for item in items]


  my_function(2)


  my_function([2, 3, 4])


  await my_function.acall(2)
  await my_function.acall([2, 3, 4])


  print(my_function.stats)
  ```

  - `@batched.inference.dynamically`: Allows dynamic batching for inference tasks, handling numpy arrays and tensors with padding.
  - The decorated method should:
    - Take in a dictionary of tensors or numpy arrays (`dict[str, Feature]`). `Feature` is a batch of item values for a single feature, and the keys are the feature names.
    - Return a tensor or numpy array (`Feature`). Each row is a single inference result.
    - `Feature` can be any of the following types: `np.ndarray`, `torch.Tensor`, `list[np.ndarray]` and `list[torch.Tensor]`.
    - `features[feature_name].shape[0] == outputs.shape[0]`

  ```python
  from batched import inference
  import torch

  @inference.dynamically(pad_token={"input_ids": 0})
  def my_inference_function(features: dict[str, torch.Tensor]) -> torch.Tensor:
    
    
    

    logits = model(**features)
    return logits


  my_inference_function(data)


  await my_inference_function.acall(data)

  print(my_inference_function.stats)
  ```



  - `@batched.aio.dynamically`: Allows dynamic batching for general tasks using `asyncio`.
  - The decorated method should:
    - Take in a list of items (`list[T]`)
    - Return a list of results (`list[U]`) of the same length.

  ```python
  from batched import aio

  @aio.dynamically(batch_size=64, timeout_ms=20.0, small_batch_threshold=10)
  def my_function(items: list[int]) -> list[int]:  # can also be an async function: async def ...
    
    return [item * 2 for item in items]



  await my_function(2)


  await my_function([2, 3, 4])


  print(my_function.stats)
  ```

  - `@batched.aio.inference.dynamically`: Allows dynamic batching for inference tasks, handling numpy arrays and tensors with padding, using `asyncio`.
  - The decorated method should:
    - Take in a dictionary of tensors or numpy arrays (`dict[str, Feature]`). `Feature` is a batch of item values for a single feature, and the keys are the feature names.
    - Return a tensor or numpy array (`Feature`). Each row is a single inference result.
    - `Feature` can be any of the following types: `np.ndarray`, `torch.Tensor`, `list[np.ndarray]` and `list[torch.Tensor]`.
    - `features[feature_name].shape[0] == outputs.shape[0]`

  ```python
  from batched import aio
  import torch

  @aio.inference.dynamically(pad_token={"input_ids": 0})
  async def my_inference_function(features: dict[str, torch.Tensor]) -> list[torch.Tensor]:
    
    
    

    logits1 = await model1(**features)
    logits2 = await model2(**features)
    return [logits1, logits2]


  await my_inference_function(data)

  print(my_inference_function.stats)
  ```



  Contributions are welcome! Please feel free to submit a pull request or report an issue on GitHub.



  This project was inspired by the following projects:

  - [Infinity](https://github.com/michaelfeil/infinity) by Michael Feil



  This project is licensed under the Apache License, Version 2.0.


pkgId: bfd8250b6b08572704cda52ff0d9e78736384b86f384449999d6abc43ac9942f
name: python-batchfetch
arch: src
version: 1.2.3
epoch: 0
release: 1
summary: Efficiently clone and pull multiple Git repositories.
url: https://github.com/jamescherti/batchfetch
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchfetch-1.2.3-1.src.rpm
checksum_type: sha256
description:
  tasks:
    
    
    - git: https://github.com/noctuid/general.el
    
    
    - git: https://github.com/minad/consult
      revision: "1.5"
    
    - git: https://github.com/magnars/s.el
      path: another-name.el
      revision: dda84d38fffdaf0c9b12837b504b402af910d01d
    
    - git: https://github.com/skeeto/impatient-mode
      delete: true
  ```
  Execute the `batchfetch` command from the same directory as `batchfetch.yml` to make it clone or update the local copies of the repositories above.

  Here are the various options that `batchfetch` provides, along with descriptions of their usage:
  ```
  usage: batchfetch [--option] [args]
  Command line interface.
  positional arguments:
    N                     Specify the batchfetch YAML file(s) (default: './batchfetch.yaml').
  options:
    -h, --help            show this help message and exit
    -j JOBS, --jobs JOBS  Run up to N Number of parallel processes (Default: 5).
    -v, --verbose         Enable verbose mode.
  ```

  Copyright (C) 2024 [James Cherti](https://www.jamescherti.com)
  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  You should have received a copy of the GNU General Public License along with this program.

  - [batchfetch @GitHub](https://github.com/jamescherti/batchfetch)
  - [batchfetch @Pypi](https://pypi.org/project/batchfetch/)


pkgId: 2358d20ab08efb351b54f41f25868e57e7e721f8d522321e04c3d4974be0cf12
name: python-batchflow
arch: src
version: 0.8.10
epoch: 0
release: 1
summary: ML pipelines, model configuration and batch management
url: https://pypi.org/project/batchflow/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchflow-0.8.10-1.src.rpm
checksum_type: sha256
description:
  [![License](https://img.shields.io/github/license/analysiscenter/batchflow.svg)](https://www.apache.org/licenses/LICENSE-2.0)
  [![Python](https://img.shields.io/badge/python-3.8-blue.svg)](https://python.org)
  [![PyTorch](https://img.shields.io/badge/PyTorch-2.0-orange.svg)](https://pytorch.org)
  [![codecov](https://codecov.io/gh/analysiscenter/batchflow/branch/master/graph/badge.svg)](https://codecov.io/gh/analysiscenter/batchflow)
  [![PyPI](https://badge.fury.io/py/batchflow.svg)](https://badge.fury.io/py/batchflow)
  [![Status](https://github.com/analysiscenter/batchflow/workflows/status/badge.svg)](https://github.com/analysiscenter/batchflow/actions?query=workflow%3Astatus)




  `BatchFlow` helps you conveniently work with random or sequential batches of your data
  and define data processing and machine learning workflows even for datasets that do not fit into memory.

  For more details see [the documentation and tutorials](https://analysiscenter.github.io/batchflow/).

  Main features:
  - flexible batch generaton
  - deterministic and stochastic pipelines
  - datasets and pipelines joins and merges
  - data processing actions
  - flexible model configuration
  - within batch parallelism
  - batch prefetching
  - ready to use ML models and proven NN architectures
  - convenient layers and helper functions to build custom models
  - a powerful research engine with parallel model training and extended experiment logging.



  ```python
  my_workflow = my_dataset.pipeline()
                .load('/some/path')
                .do_something()
                .do_something_else()
                .some_additional_action()
                .save('/to/other/path')
  ```
  The trick here is that all the processing actions are lazy. They are not executed until their results are needed, e.g. when you request a preprocessed batch:
  ```python
  my_workflow.run(BATCH_SIZE, shuffle=True, n_epochs=5)
  ```
  or
  ```python
  for batch in my_workflow.gen_batch(BATCH_SIZE, shuffle=True, n_epochs=5):
      
      
  ```
  or
  ```python
  NUM_ITERS = 1000
  for i in range(NUM_ITERS):
      processed_batch = my_workflow.next_batch(BATCH_SIZE, shuffle=True, n_epochs=None)
      
      
  ```



  `BatchFlow` includes ready-to-use proven architectures like VGG, Inception, ResNet and many others.
  To apply them to your data just choose a model, specify the inputs (like the number of classes or images shape)
  and call `train_model`. Of course, you can also choose a loss function, an optimizer and many other parameters, if you want.
  ```python
  from batchflow.models.torch import ResNet34

  my_workflow = my_dataset.pipeline()
                .init_model('model', ResNet34, config={'loss': 'ce', 'classes': 10})
                .load('/some/path')
                .some_transform()
                .another_transform()
                .train_model('ResNet34', inputs=B.images, targets=B.labels)
                .run(BATCH_SIZE, shuffle=True)
  ```

  For more advanced cases and detailed API see [the documentation](https://analysiscenter.github.io/batchflow/).




  > `BatchFlow` module is in the beta stage. Your suggestions and improvements are very welcome.

  > `BatchFlow` supports python 3.6 or higher.



  With [poetry](https://python-poetry.org/)
  ```
  poetry add batchflow
  ```

  With old-fashioned [pip](https://pip.pypa.io/en/stable/)
  ```
  pip3 install batchflow
  ```



  With [poetry](https://python-poetry.org/)
  ```
  poetry add --editable git+https://github.com/analysiscenter/batchflow
  ```

  With old-fashioned [pip](https://pip.pypa.io/en/stable/)
  ```
  pip install --editable git+https://github.com/analysiscenter/batchflow
  ```


  Some `batchflow` functions and classed require additional dependencies.
  In order to use that functionality you might need to install `batchflow` with extras (e.g. `batchflow[nn]`):

  - image - working with image datasets and plotting
  - nn - for neural networks (includes torch, torchvision, ...)
  - datasets - loading standard datasets (MNIST, CIFAR, ...)
  - profile - performance profiling
  - jupyter - utility functions for notebooks
  - research - multiprocess research
  - telegram - for monitoring pipelines via a telegram bot
  - dev - batchflow development (pylint, pytest, ...)

  You can install several extras at once, like `batchflow[image,nn,research]`.



  - [SeismiQB](https://github.com/GeoscienceML/seismiqb) - ML for seismic interpretation
  - [SeismicPro](https://github.com/GeoscienceML/SeismicPro) - ML for seismic processing
  - [PyDEns](https://github.com/analysiscenter/pydens) - DL Solver for ODE and PDE
  - [RadIO](https://github.com/analysiscenter/radio) - ML for CT imaging
  - [CardIO](https://github.com/analysiscenter/cardio) - ML for heart signals



  Please cite BatchFlow in your publications if it helps your research.

  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1041203.svg)](https://doi.org/10.5281/zenodo.1041203)

  ```
  Roman Khudorozhkov et al. BatchFlow library for fast ML workflows. 2017. doi:10.5281/zenodo.1041203
  ```

  ```
  @misc{roman_kh_2017_1041203,
    author       = {Khudorozhkov, Roman and others},
    title        = {BatchFlow library for fast ML workflows},
    year         = 2017,
    doi          = {10.5281/zenodo.1041203},
    url          = {https://doi.org/10.5281/zenodo.1041203}
  }
  ```


pkgId: 27ada0ba0aeae88b4b57101b22fcbaf0e6c70f180538955afda1f75b357b1962
name: python-batchgeneratorsv2
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Batchgenerators but better
url: https://pypi.org/project/batchgeneratorsv2/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchgeneratorsv2-0.2.1-1.src.rpm
checksum_type: sha256
description:
  This repository is work in progress. If builds upon the [batchgenerators](https://github.com/MIC-DKFZ/batchgenerators)
  framework but makes several key changes to the transforms:

  1. Transforms now explicitly distinguish between data types: images, segmentation, pixel-wise regression target, keypoints, bbox
  2. All transforms have been reimplemented from scratch with a focus on performance. In case of performance parity
  between previous numpy and new torch-based implementations, preference is given to pytorch.
  3. Transforms are applied on a sample level, not a batch level as was done previously!

  Caveats:
  - performance is optimized for CPU. GPU-based data augmentation is not supported (implementation may use numpy etc) and will not be supported
  - currently this repository only covers a small subset of the transforms available in batchgenerators. Feel free to contribute more


  We are happy to accept PRs that further optimize performance and extend the available transformations!

  - Please provide benchmarking results relative to the old batchgenerators implementation (if applicable)
  - Please stick to the current transform template!


  <img src="assets/HI_Logo.png" height="100px" />

  <img src="assets/dkfz_logo.png" height="100px" />

  batchgeneratorsv2 developed and maintained by the Applied Computer Vision Lab (ACVL) of [Helmholtz Imaging](http://helmholtz-imaging.de)
  and the [Division of Medical Image Computing](https://www.dkfz.de/en/mic/index.php) at the
  [German Cancer Research Center (DKFZ)](https://www.dkfz.de/en/index.html).

rpm_license:
  Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  1. Definitions.  "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.  "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."  "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.  Copyright [2019] [Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany]  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


pkgId: 908290186a2a8543b99060dd1b5e4e0985199a73133a54fc0675d3a2dfd78601
name: python-batchglm
arch: src
version: 0.7.4
epoch: 0
release: 1
summary: Fast and scalable fitting of over-determined generalized-linear models (GLMs)
url: https://pypi.org/project/batchglm/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchglm-0.7.4-1.src.rpm
checksum_type: sha256
description:
  batchglm was developed in the context of [diffxpy](https://github.com/theislab/diffxpy) to allow fast model fitting for differential expression analysis for single-cell RNA-seq data. However, one can use batchglm or its concepts in other scenarios where over-determined GLMs are encountered. batchglm is based on TensorFlow


  1. Install [tensorflow](https://www.tensorflow.org/install/), see below. Please use the pip installation if you are unsure.
  2. Clone the GitHub repository of batchglm.
  3. cd into the clone.
  4. pip install -e .


  Tensorflow can be installed like any other package or can be compiled from source to allow for optimization of the software to the given hardware. Compiling tensorflow from source can significantly improve the performance, since this allows tensorflow to make use of all available CPU-specific instructions. Hardware optimization takes longer but is only required once during installation and is recommended if batchglm is used often or on large data sets. We summarize a few key steps here, an extensive up-to-date installation guide can be found here: https://www.tensorflow.org/install/


  You can install [tensorflow](https://www.tensorflow.org/install/) via pip or via conda.


  - CPU-only: <br/>
    `pip install tensorflow`
  - GPU: <br/>
    `pip install tensorflow-gpu`


  Please refer to https://www.tensorflow.org/install/.


pkgId: 629af823ea1b5affb814c1e8e437070a8e48e34cdbcb114f06f688f18cdd1443
name: python-batchlink
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Batch link files without modifying original files.
url: https://pypi.org/project/batchlink/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchlink-1.1.0-1.src.rpm
checksum_type: sha256
description:
  [![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  [![Flake8: checked](https://img.shields.io/badge/flake8-checked-blueviolet)](https://flake8.pycqa.org)

  [![Packaging status](https://repology.org/badge/vertical-allrepos/python:batchlink.svg)](https://repology.org/project/python:batchlink/versions)

  Batch link files without modifying original files.



  To solve the problem - [Is there a way to rename files from a torrent and still be able to seed?](https://www.reddit.com/r/qBittorrent/comments/ie3p10/is_there_a_way_to_rename_files_from_a_torrent_and)
  If you are serving BT files on a media server like [Jellyfin](https://jellyfin.org), you
  may want this.



  - A CLI to easily batch link, rename, copy files.
  - An extensible library.



  Besides package managers, you can also use self-contained executables for Linux, macOS
  and Windows from [Releases](https://github.com/jaxvanyang/batchlink/releases).



  Create example files:

  ```bash
  mkdir -p a b && touch a/0.log a/1.log a/1.txt a/2.txt
  ```

  Create hard links in `b/` pointing to all files in `a/` with original file names:

  > [!NOTE]
  > It's recommended to add option `--dry-run` to see what will happen at first.

  ```console
  $ batchlink -S a -d b '*' '{path}'
  Create hard link b/0.log to a/0.log
  Create hard link b/1.log to a/1.log
  Create hard link b/1.txt to a/1.txt
  Create hard link b/2.txt to a/2.txt
  ```

  Only create links for log files:

  ```console
  $ batchlink -S a -d b '*.log' '{path}'
  Create hard link b/0.log to a/0.log
  Create hard link b/1.log to a/1.log
  ```

  And rename to one-based numbering file names:

  ```console
  $ batchlink -S a -d b '*.log' '{num}.log'
  Create hard link b/1.log to a/0.log
  Create hard link b/2.log to a/1.log
  ```

  Format replacement values:

  ```console
  $ batchlink -S a -d b '*.log' '{num:02}.log'
  Create hard link b/01.log to a/0.log
  Create hard link b/02.log to a/1.log
  ```

  Absolute symbolic link, relative symbolic link, rename, copy:

  ```bash
  batchlink -s -S a -d b '*.log' '{num:02}.log'
  batchlink -sR -S a -d b '*.log' '{num:02}.log'
  batchlink -r -S a -d b '*.log' '{num:02}.log'
  batchlink -c -S a -d b '*.log' '{num:02}.log'
  ```


pkgId: f38cc143623075c8c640cd25dc77c4af27b8f7ae0194902a5cad1021150f47f5
name: python-batchspawner
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: Batchspawner: A spawner for Jupyterhub to spawn notebooks using batch resource managers.
url: http://jupyter.org
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchspawner-1.3.0-1.src.rpm
checksum_type: sha256
description:
  [![Latest PyPI version](https://img.shields.io/pypi/v/batchspawner?logo=pypi)](https://pypi.python.org/pypi/batchspawner)
  [![Latest conda-forge version](https://img.shields.io/conda/vn/conda-forge/batchspawner?logo=conda-forge)](https://anaconda.org/conda-forge/batchspawner)
  [![GitHub Workflow Status - Test](https://img.shields.io/github/actions/workflow/status/jupyterhub/batchspawner/test.yaml?logo=github&label=tests)](https://github.com/jupyterhub/batchspawner/actions)
  [![Test coverage of code](https://codecov.io/gh/jupyterhub/batchspawner/branch/main/graph/badge.svg)](https://codecov.io/gh/jupyterhub/batchspawner)
  [![Issue tracking - GitHub](https://img.shields.io/badge/issue_tracking-github-blue?logo=github)](https://github.com/jupyterhub/batchspawner/issues)
  [![Help forum - Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/jupyterhub)
  [![Contribute](https://img.shields.io/badge/I_want_to_contribute!-grey?logo=jupyter)](https://github.com/jupyterhub/batchspawner/blob/master/CONTRIBUTING.md)

  This is a custom spawner for [Jupyterhub](https://jupyterhub.readthedocs.io/) that is designed for installations on clusters using batch scheduling software.

  This began as a generalization of [mkgilbert's batchspawner](https://github.com/mkgilbert/slurmspawner) which in turn was inspired by [Andrea Zonca's blog post](http://zonca.github.io/2015/04/jupyterhub-hpc.html "Run jupyterhub on a Supercomputer") where he explains his implementation for a spawner that uses SSH and Torque. His github repo is found [here](http://www.github.com/zonca/remotespawner "RemoteSpawner").

  This package formerly included WrapSpawner and ProfilesSpawner, which provide mechanisms for runtime configuration of spawners. These have been split out and moved to the [`wrapspawner`](https://github.com/jupyterhub/wrapspawner) package.



  1. from root directory of this repo (where setup.py is), run `pip install -e .`

     If you don't actually need an editable version, you can simply run
     `pip install batchspawner`

  2. add lines in jupyterhub_config.py for the spawner you intend to use, e.g.

     ```python
        c = get_config()
        c.JupyterHub.spawner_class = 'batchspawner.TorqueSpawner'
        import batchspawner    # Even though not used, needed to register batchspawner interface
     ```

  3. Depending on the spawner, additional configuration will likely be needed.



  For information on the specific spawners, see [SPAWNERS.md](SPAWNERS.md).



  This file contains an abstraction layer for batch job queueing systems (`BatchSpawnerBase`), and implements
  Jupyterhub spawners for Torque, Moab, SLURM, SGE, HTCondor, LSF, and eventually others.
  Common attributes of batch submission / resource manager environments will include notions of:

  - queue names, resource manager addresses
  - resource limits including runtime, number of processes, memory
  - singleuser child process running on (usually remote) host not known until runtime
  - job submission and monitoring via resource manager utilities
  - remote execution via submission of templated scripts
  - job names instead of PIDs

  `BatchSpawnerBase` provides several general mechanisms:

  - configurable traits `req_foo` that are exposed as `{foo}` in job template scripts. Templates (submit scripts in particular) may also use the full power of [jinja2](http://jinja.pocoo.org/). Templates are automatically detected if a `{{` or `{%` is present, otherwise str.format() used.
  - configurable command templates for submitting/querying/cancelling jobs
  - a generic concept of job-ID and ID-based job state tracking
  - overrideable hooks for subclasses to plug in logic at numerous points



  Every effort has been made to accommodate highly diverse systems through configuration
  only. This example consists of the (lightly edited) configuration used by the author
  to run Jupyter notebooks on an academic supercomputer cluster.

  ```python

  import batchspawner
  c.JupyterHub.spawner_class = 'batchspawner.TorqueSpawner'
  c.Spawner.http_timeout = 120





  c.BatchSpawnerBase.req_nprocs = '2'
  c.BatchSpawnerBase.req_queue = 'mesabi'
  c.BatchSpawnerBase.req_host = 'mesabi.xyz.edu'
  c.BatchSpawnerBase.req_runtime = '12:00:00'
  c.BatchSpawnerBase.req_memory = '4gb'






  c.TorqueSpawner.batch_script = '''#!/bin/sh






  module load python3
  {cmd}
  '''

  c.TorqueSpawner.state_exechost_exp = r'int-\1.mesabi.xyz.edu'
  ```



  Unless otherwise stated for a specific spawner, assume that spawners
  _do_ evaluate shell environment for users and thus the [security
  requirements of JupyterHub security for untrusted
  users](https://jupyterhub.readthedocs.io/en/stable/reference/websecurity.html)
  are not fulfilled because some (most?) spawners _do_ start a user
  shell which will execute arbitrary user environment configuration
  (`.profile`, `.bashrc` and the like) unless users do not have
  access to their own cluster user account. This is something which we
  are working on.





  `ProfilesSpawner`, available as part of the [`wrapspawner`](https://github.com/jupyterhub/wrapspawner)
  package, allows the Jupyterhub administrator to define a set of different spawning configurations,
  both different spawners and different configurations of the same spawner.
  The user is then presented a dropdown menu for choosing the most suitable configuration for their needs.

  This method provides an easy and safe way to provide different configurations of `BatchSpawner` to the
  users, see an example below.



  The following is based on the author's configuration (at the same site as the example above)
  showing how to give users access to multiple job configurations on the batch scheduled
  clusters, as well as an option to run a local notebook directly on the jupyterhub server.

  ```python

  import batchspawner
  c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner'
  c.Spawner.http_timeout = 120




  c.BatchSpawnerBase.req_host = 'mesabi.xyz.edu'
  c.BatchSpawnerBase.req_runtime = '12:00:00'
  c.TorqueSpawner.state_exechost_exp = r'in-\1.mesabi.xyz.edu'











  c.ProfilesSpawner.profiles = [
     ( "Local server", 'local', 'jupyterhub.spawner.LocalProcessSpawner', {'ip':'0.0.0.0'} ),
     ('Mesabi - 2 cores, 4 GB, 8 hours', 'mesabi2c4g12h', 'batchspawner.TorqueSpawner',
        dict(req_nprocs='2', req_queue='mesabi', req_runtime='8:00:00', req_memory='4gb')),
     ('Mesabi - 12 cores, 128 GB, 4 hours', 'mesabi128gb', 'batchspawner.TorqueSpawner',
        dict(req_nprocs='12', req_queue='ram256g', req_runtime='4:00:00', req_memory='125gb')),
     ('Mesabi - 2 cores, 4 GB, 24 hours', 'mesabi2c4gb24h', 'batchspawner.TorqueSpawner',
        dict(req_nprocs='2', req_queue='mesabi', req_runtime='24:00:00', req_memory='4gb')),
     ('Interactive Cluster - 2 cores, 4 GB, 8 hours', 'lab', 'batchspawner.TorqueSpawner',
        dict(req_nprocs='2', req_host='labhost.xyz.edu', req_queue='lab',
            req_runtime='8:00:00', req_memory='4gb', state_exechost_exp='')),
     ]
  c.ProfilesSpawner.ip = '0.0.0.0'
  ```



  Sometimes it can be hard to debug batchspawner, but it's not really
  once you know how the pieces interact. Check the following places for
  error messages:

  - Check the JupyterHub logs for errors.

  - Check the JupyterHub logs for the batch script that got submitted
    and the command used to submit it. Are these correct? (Note that
    there are submission environment variables too, which aren't
    displayed.)

  - At this point, it's a matter of checking the batch system. Is the
    job ever scheduled? Does it run? Does it succeed? Check the batch
    system status and output of the job. The most comon failure
    patterns are a) job never starting due to bad scheduler options, b)
    job waiting in the queue beyond the `start_timeout`, causing
    JupyterHub to kill the job.

  - At this point the job starts. Does it fail immediately, or before
    Jupyter starts? Check the scheduler output files (stdout/stderr of
    the job), wherever it is stored. To debug the job script, you can
    add debugging into the batch script, such as an `env` or `set -x`.

  - At this point Jupyter itself starts - check its error messages. Is
    it starting with the right options? Can it communicate with the
    hub? At this point there usually isn't anything
    batchspawner-specific, with the one exception below. The error log
    would be in the batch script output (same file as above). There may
    also be clues in the JupyterHub logfile.
  - Are you running on an NFS filesystem? It's possible for Jupyter to
    experience issues due to varying implementations of the fcntl() system
    call. (See also [Jupyterhub-Notes and Tips: SQLite](https://jupyterhub.readthedocs.io/en/latest/reference/database.html?highlight=NFS#sqlite))

  Common problems:

  - Did you `import batchspawner` in the `jupyterhub_config.py` file?
    This is needed in order to activate the batchspawer API in
    JupyterHub.



  See [CHANGELOG.md](CHANGELOG.md).


pkgId: 8a12e4b3fd6315466524b01e86069b6f0b619ebbac79bb99b70ab505dbf400cc
name: python-batchtensor
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: Functions to manipulate batches of PyTorch tensors
url: https://github.com/durandtibo/batchtensor
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchtensor-0.0.4-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <a href="https://github.com/durandtibo/batchtensor/actions">
          <img alt="CI" src="https://github.com/durandtibo/batchtensor/workflows/CI/badge.svg">
      </a>
      <a href="https://github.com/durandtibo/batchtensor/actions">
          <img alt="Nightly Tests" src="https://github.com/durandtibo/batchtensor/workflows/Nightly%20Tests/badge.svg">
      </a>
      <a href="https://github.com/durandtibo/batchtensor/actions">
          <img alt="Nightly Package Tests" src="https://github.com/durandtibo/batchtensor/workflows/Nightly%20Package%20Tests/badge.svg">
      </a>
      <br/>
      <a href="https://durandtibo.github.io/batchtensor/">
          <img alt="Documentation" src="https://github.com/durandtibo/batchtensor/workflows/Documentation%20(stable)/badge.svg">
      </a>
      <a href="https://durandtibo.github.io/batchtensor/">
          <img alt="Documentation" src="https://github.com/durandtibo/batchtensor/workflows/Documentation%20(unstable)/badge.svg">
      </a>
      <br/>
      <a href="https://codecov.io/gh/durandtibo/batchtensor">
          <img alt="Codecov" src="https://codecov.io/gh/durandtibo/batchtensor/branch/main/graph/badge.svg">
      </a>
      <a href="https://codeclimate.com/github/durandtibo/batchtensor/maintainability">
          <img src="https://api.codeclimate.com/v1/badges/148edc26add138d04928/maintainability" />
      </a>
      <a href="https://codeclimate.com/github/durandtibo/batchtensor/test_coverage">
          <img src="https://api.codeclimate.com/v1/badges/148edc26add138d04928/test_coverage" />
      </a>
      <br/>
      <a href="https://github.com/psf/black">
          <img  alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
      </a>
      <a href="https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings">
          <img  alt="Doc style: google" src="https://img.shields.io/badge/%20style-google-3666d6.svg">
      </a>
      <a href="https://github.com/astral-sh/ruff">
          <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;">
      </a>
      <a href="https://github.com/guilatrova/tryceratops">
          <img  alt="Doc style: google" src="https://img.shields.io/badge/try%2Fexcept%20style-tryceratops%20%F0%9F%A6%96%E2%9C%A8-black">
      </a>
      <br/>
      <a href="https://pypi.org/project/batchtensor/">
          <img alt="PYPI version" src="https://img.shields.io/pypi/v/batchtensor">
      </a>
      <a href="https://pypi.org/project/batchtensor/">
          <img alt="Python" src="https://img.shields.io/pypi/pyversions/batchtensor.svg">
      </a>
      <a href="https://opensource.org/licenses/BSD-3-Clause">
          <img alt="BSD-3-Clause" src="https://img.shields.io/pypi/l/batchtensor">
      </a>
      <br/>
      <a href="https://pepy.tech/project/batchtensor">
          <img  alt="Downloads" src="https://static.pepy.tech/badge/batchtensor">
      </a>
      <a href="https://pepy.tech/project/batchtensor">
          <img  alt="Monthly downloads" src="https://static.pepy.tech/badge/batchtensor/month">
      </a>
      <br/>
  </p>



  `batchtensor` is lightweight library built on top of [PyTorch](https://pytorch.org/) to manipulate
  nested data structure with PyTorch tensors.
  This library provides functions for tensors where the first dimension is the batch dimension.
  It also provides functions for tensors representing a batch of sequences where the first dimension
  is the batch dimension and the second dimension is the sequence dimension.

  - [Motivation](#motivation)
  - [Documentation](https://durandtibo.github.io/batchtensor/)
  - [Installation](#installation)
  - [Contributing](#contributing)
  - [API stability](#api-stability)
  - [License](#license)



  Let's imagine you have a batch which is represented by a dictionary with three tensors, and you want
  to take the first 2 items.
  `batchtensor` provides the function `slice_along_batch` that allows to slide all the tensors:

  ```pycon
  >>> import torch
  >>> from batchtensor.nested import slice_along_batch
  >>> batch = {
  ...     "a": torch.tensor([[2, 6], [0, 3], [4, 9], [8, 1], [5, 7]]),
  ...     "b": torch.tensor([4, 3, 2, 1, 0]),
  ...     "c": torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0]),
  ... }
  >>> slice_along_batch(batch, stop=2)
  {'a': tensor([[2, 6], [0, 3]]), 'b': tensor([4, 3]), 'c': tensor([1., 2.])}

  ```

  Similarly, it is possible to split a batch in multiple batches by using the
  function `split_along_batch`:

  ```pycon
  >>> import torch
  >>> from batchtensor.nested import split_along_batch
  >>> batch = {
  ...     "a": torch.tensor([[2, 6], [0, 3], [4, 9], [8, 1], [5, 7]]),
  ...     "b": torch.tensor([4, 3, 2, 1, 0]),
  ...     "c": torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0]),
  ... }
  >>> split_along_batch(batch, split_size_or_sections=2)
  ({'a': tensor([[2, 6], [0, 3]]), 'b': tensor([4, 3]), 'c': tensor([1., 2.])},
   {'a': tensor([[4, 9], [8, 1]]), 'b': tensor([2, 1]), 'c': tensor([3., 4.])},
   {'a': tensor([[5, 7]]), 'b': tensor([0]), 'c': tensor([5.])})

  ```

  Please check the documentation to see all the implemented functions.



  - [latest (stable)](https://durandtibo.github.io/batchtensor/): documentation from the latest stable
    release.
  - [main (unstable)](https://durandtibo.github.io/batchtensor/main/): documentation associated to the
    main branch of the repo. This documentation may contain a lot of work-in-progress/outdated/missing
    parts.



  We highly recommend installing
  a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).
  `batchtensor` can be installed from pip using the following command:

  ```shell
  pip install batchtensor
  ```

  To make the package as slim as possible, only the minimal packages required to use `batchtensor` are
  installed.
  To include all the dependencies, you can use the following command:

  ```shell
  pip install batchtensor[all]
  ```

  Please check the [get started page](https://durandtibo.github.io/batchtensor/get_started) to see how
  to install only some specific dependencies or other alternatives to install the library.
  The following is the corresponding `batchtensor` versions and tested dependencies.

  | `batchtensor` | `coola`      | `numpy`<sup>*</sup> | `torch`       | `python`      |
  |---------------|--------------|---------------------|---------------|---------------|
  | `main`        | `>=0.1,<1.0` | `>=1.21,<2.0`       | `>=1.11,<3.0` | `>=3.9,<3.13` |
  | `0.0.4`       | `>=0.1,<1.0` | `>=1.21,<2.0`       | `>=1.11,<3.0` | `>=3.9,<3.13` |
  | `0.0.3`       | `>=0.1,<1.0` | `>=1.21,<2.0`       | `>=1.11,<3.0` | `>=3.9,<3.13` |
  | `0.0.2`       | `>=0.1,<1.0` | `>=1.21,<2.0`       | `>=1.11,<3.0` | `>=3.9,<3.13` |
  | `0.0.1`       | `>=0.1,<0.4` | `>=1.21,<2.0`       | `>=1.11,<3.0` | `>=3.9,<3.13` |

  <sup>*</sup> indicates an optional dependency



  Please check the instructions in [CONTRIBUTING.md](.github/CONTRIBUTING.md).



  Everyone is welcome to contribute to the community.
  If you have any questions or suggestions, you can
  submit [Github Issues](https://github.com/durandtibo/batchtensor/issues).
  We will reply to you as soon as possible. Thank you very much.



  :warning: While `batchtensor` is in development stage, no API is guaranteed to be stable from one
  release to the next.
  In fact, it is very likely that the API will change multiple times before a stable 1.0.0 release.
  In practice, this means that upgrading `batchtensor` to a new version will possibly break any code
  that was using the old version of `batchtensor`.



  `batchtensor` is licensed under BSD 3-Clause "New" or "Revised" license available
  in [LICENSE](LICENSE) file.


pkgId: 310b2a804aa353b77fa68d8476fb13ec3bbcac9f5751c40740b62e95b3574d37
name: python-batchup
arch: src
version: 0.2.3
epoch: 0
release: 1
url: https://github.com/Britefury/batchup
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchup-0.2.3-1.src.rpm
checksum_type: sha256
summary:
  Python library for extracting mini-batches of data from a data source for the purpose of training neural networks

description:
  Python library for extracting mini-batches of data from a data source for the purpose of training neural networks.

  Quick example:

  ```py3
  from batchup import data_source


  ds = data_source.ArrayDataSource([train_X, train_y])


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=True):
      
  ```

  Documentation available at https://batchup.readthedocs.io







  Processing data in mini-batches:
  - quick batch iteration; a basic example
  - iterating over subsets identified by indices
  - data augmentation
  - including sample indices in the mini-batches
  - infinite batch iteration; an iterator that generates batches endlessly
  - sample weighting to alter likelihood of samples (e.g. to compensate for class imbalance)
  - iterating over two data sets simultaneously where their sizes differ (e.g. for semi-supervised learning)
  - iterating over data sets that are NOT stored as NumPy arrays (e.g. on disk or generated on the fly)
  - parallel processing to speed up iteration where loading/preparing samples could be slow


  - removing the for-loop; predict values for samples in one line
  - computing mean loss/error values


  BatchUp supports some standard machine learning datasets. They will be automatically downloaded if necessary.
  - MNIST
  - SVHN
  - CIFAR-10
  - CIFAR-100
  - STL
  - USPS


  Data paths, etc.

  More details further down, but briefly, use either the `~/.batchup.cfg` configuration file or the `BATCHUP_HOME` environment varible.




  You can install BatchUp with:

  ```> pip install batchup```




  Assume we have a training set loaded in the variables `train_X` and `train_y`:

  ```py3
  from batchup import data_source


  ds = data_source.ArrayDataSource([train_X, train_y])


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```

  Some notes:
  - the last batch will be short (have less samples than the requested batch size) if there isn't enough data to fill it.
  - using `shuffle=True` will use NumPy's default random number generator
  - not specifying shuffle will process the samples in-order



  We can specify the indices of a subset of the samples in a dataset and draw mini-batches from only those samples:

  ```py3
  import numpy as np


  subset_a = np.random.permutation(train_X.shape[0])[:20000]


  ds = data_source.ArrayDataSource([train_X, train_y], indices=subset_a)


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```



  We can define a function that applies data augmentation on the fly. Let's assume that `train_X` contains image data,
  has the shape `(sample, channel, height, width)` and that we wish to horizontally flip some of the images:

  ```py3
  import numpy as np


  def augment_batch(batch_X, batch_y):
      
      flip_flags = np.random.binomial(1, 0.5, size=(len(batch_X),)) != 0

      
      batch_X[flip_flags, ...] = flip_flags[flip_flags, :, :, ::-1]

      
      return batch_X, batch_y


  ds = data_source.ArrayDataSource([train_X, train_y])


  ds = ds.map(augment_batch)


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```

  More complex augmentation may incurr significant runtime cost. This can be alleviated by preparing batches
  in background threads. See the *parallel processing* section below.



  We can ask to be provided with the indices of the samples that were drawn to form the mini-batch:

  ```py3

  ds = data_source.ArrayDataSource([train_X, train_y], include_indices=True)


  for (batch_ndx, batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```



  Lets say you need an iterator that extracts samples from your dataset and starts from the beginning when it reaches the end:

  ```py3
  ds = data_source.ArrayDataSource([train_X, train_y], repeats=-1)
  ```

  Now use the `batch_iterator` method as before.

  The `repeats` parameter accepts either `-1` for infininte, or any positive integer `>= 1` for a specified number of repetitions.

  This will also work if the dataset has less samples than the batch size; not a common use case but can happen in certain situations involving semi-supervised learning for instance.



  If you want some samples to be drawn more frequently than others, construct a `sampling.WeightedSampler` and pass
  it as the `sampler` argument to the `ArrayDataSource` constructor. In the example the per-sample weights are stored
  in `train_w`.

  ```py3
  from batchup import sampling

  sampler = sampling.WeightedSampler(weights=train_w)

  ds = data_source.ArrayDataSource([train_X, train_y], sampler=sampler)


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```

  **Note** that in-order is NOT supported when using `sampling.WeightedSampler`, so `shuffle` *cannot* be `False` or
  `None`.

  To draw from a subset of the dataset, use `sampling.WeightedSubsetSampler`:

  ```py3
  from batchup import sampling



  sampler = sampling.WeightedSubsetSampler(sub_weights=train_w[subset_a], indices=subset_a)

  ds = data_source.ArrayDataSource([train_X, train_y], sampler=sampler)


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```




  An alternate constructor `sampling.WeightedSampler.class_balancing_sampler` is available to construct a weighted sampler to compensate for class imbalance:

  ```py3

  sampler = sampling.WeightedSampler.class_balancing_sampler(y=train_y, n_classes=train_y.max() + 1)

  ds = data_source.ArrayDataSource([train_X, train_y], sampler=sampler)


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```

  The `sampling.WeightedSampler.class_balancing_sample_weights` helper method constructs an array of sample weights,
  in case you wish to modify the weights first:
  ```py3
  weights = sampling.WeightedSampler.class_balancing_sample_weights(y=train_y, n_classes=train_y.max() + 1)


  weights = modify_weights(weights)


  sampler = sampling.WeightedSampler(weights=weights)
  ds = data_source.ArrayDataSource([train_X, train_y], sampler=sampler)


  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```




  In semi-supervised learning we have a small dataset of labeled samples `lab_X` with ground truths `lab_y` and a larger set of unlabeled samples `unlab_X`. Lets say we want a single epoch to consist of the entire unlabeled dataset while looping over the labeled dataset repeatly. The `CompositeDataSource` class can help us here.

  Without using `CompositeDataSource`:

  ```py3
  rng = np.random.RandomState(12345)


  ds_lab = data_source.ArrayDataSource([lab_X, lab_y], repeats=-1)
  ds_unlab = data_source.ArrayDataSource([unlab_X])


  lab_iter = ds_lab.batch_iterator(batch_size=64, shuffle=rng)


  for (batch_unlab_X,) in ds_unlab.batch_iterator(batch_size=64, shuffle=rng):
      
      batch_lab_X, batch_lab_y = next(lab_iter)

      
  ```

  Now using `CompositeDataSource`:

  ```py3

  ds_lab = data_source.ArrayDataSource([lab_X, lab_y], repeats=-1)
  ds_unlab = data_source.ArrayDataSource([unlab_X])
  ds = data_source.CompositeDataSource([ds_lab, ds_unlab])


  for (batch_lab_X, batch_lab_y, batch_unlab_X) in ds.batch_iterator(batch_size=64, shuffle=rng):
      

  ```

  The two component data sources (`ds_lab` and `ds_unlab`) will be shuffled independently.

  You can also have `CompositeDataSource` generate structured mini-batches that reflect the structure of the data source:

  ```py3

  ds_struct = data_source.CompositeDataSource([ds_lab, ds_unlab], flatten=False)


  for ((batch_lab_X, batch_lab_y), (batch_unlab_X,)) in ds_struct.batch_iterator(batch_size=64, shuffle=rng):
      
  ```

  `CompositeDataSource` instances can be arbitrarily nested.



  The arrays passed to `ArrayDataSource` do not have to be NumPy arrays, they just have to be array-like. An array-like object should implement the `__len__` method that returns the number of samples and the `__getitem__` method that returns the samples themselves. Note that `__getitem__` should accept integer indices, slices, or NumPy integer arrays that give the indices of the samples to retrieve.

  Lets day we want to implement a data source that loads images from disk on the fly. Lets also assume that the prefix of the filename, either `'cat'` or `'dog'` gives the ground truth:

  ```py3
  import glob
  import os
  from scipy.misc import imread
  from batchup import data_source

  class LoadImagesFromDisk (object):
      def __init__(self, paths):
          
          self.paths = paths

      
      def __len__(self):
          return len(self.paths)


      
      def __getitem__(self, index):
          if isinstance(index, (int, long)):
              
              return imread(self.paths[index])
          elif isinstance(index, slice):
              
              images = [imread(p) for p in self.paths[index]]
              return np.concatenate([img[None, ...] for img in images], axis=0)
          elif isinstance(index, np.ndarray):
              if index.ndim != 1:
                  raise ValueError('index array should only have 1 dimension, not {}'.format(index.ndim))
              images = [imread(self.paths[i]) for i in index]
              return np.concatenate([img[None, ...] for img in images], axis=0)
          else:
              raise TypeError('index should be an integer, a slice or a NumPy array, '
                              'not a {}'.format(type(index))


  image_paths = glob.glob('/path/to/my/images/*.jpg')


  train_X = LoadImagesFromDisk(image_paths)


  train_y = [(1 if os.path.basename(p).startswith('dog') else 0) for p in image_paths)]
  train_y = np.array(train_y, dtype=np.int32)


  ds = data_source.ArrayDataSource([train_X, train_y])

  for (batch_X, batch_y) in ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345)):
      
  ```



  The above example has a potential performance problem as loading the images from disk would introduce latency. We can use the `work_pool` module to prepare the mini-batches in separate threads or processes to hide this latency.



  The modifications to the previous example to use parallel processing are quite simple (lets assume that the `LoadImagesFromDisk` class is defined and that `train_X`, `train_y` and `ds` (an `ArrayDataSource` instance) have already been built:

  ```py3
  from batchup import work_pool


  th_pool = work_pool.WorkerThreadPool(processes=4)




  par_ds = th_pool.parallel_data_source(ds, batch_buffer_size=32)



  par_iter = par_ds.batch_iterator(batch_size=64, shuffle=np.random.RandomState(12345))





  for (batch_X, batch_y) in par_iter:
      
  ```



  In some cases the data source that you wish to parallelize may include some cacheing logic that is not thread safe. In such cases you can use process based pools that use separate processes rather than threads.
  There are one or two gotchas, namely that using process-based pools entails a higher overhead and that the data source class and its dependent types must be declared in the top level of a module so that `pickle` can find them.

  ```py3

  proc_pool = work_pool.WorkerProcessPool(processes=4)




  par_ds = proc_pool.parallel_data_source(ds, batch_buffer_size=32)


  ```



  We can further simplify training and evaluation procedures using the `batch_map_concat` and `batch_map_mean` methods.



  Lets assume we have a prediction function `f_pred` of the form `f_pred(batch_X) -> batch_pred_y`.
  If we want to predict results for our test set in `test_X`, we can do this in one line, without the for loop:

  ```py3
  test_ds = data_source.ArrayDataSource([test_X])

  (pred_y,) = test_ds.batch_map_concat(f_pred, batch_size=256)
  ```

  The `batch_map_concat` method will process all the samples in `test_X` and gather the results in a tuple of arrays, hence
  the `(pred_y,) = ...`. If you want `tqdm` ([PyPi](http://pypi.python.org/pypi/tqdm), [GitHub](http://github.com/noamraph/tqdm)) to give you a progress bar:

  ```py3
  (pred_y,) = test_ds.batch_map_concat(f_pred, batch_size=256, progress_iter_func=tqdm.tqdm)
  ```



  Lets assume we have a evaluation function `f_eval` of the form `f_eval(batch_X, batch_y) -> [log_loss_sum, err_count]`.
  Assuming that we are doing classification, `f_eval` returns the sum of the per-sample log-losses and the number of errors.
  The `batch_map_mean` method will process all of the data in the data source, gather loss and error counts and return the mean:

  ```py3
  val_ds = data_source.ArrayDataSource([val_X, val_y])

  mean_log_loss, mean_err_rate = val_ds.batch_map_mean(f_eval, batch_size=256)
  ```

  Note that as above, the `progress_iter_func` parameter can be passed `tqdm.tqdm` to give you a progress bar.




  BatchUp provides support for using some standard datasets.



  Load the MNIST dataset:
  ```py3
  from batchup.datasets import mnist



  ds = mnist.MNIST(n_val=10000)
  ```

  - `ds.train_X` is a `(n, 1, 28, 28)` `float32` array that contains the
      training images.
  - `ds.train_y` is a `(n,)` `int32` array that contains the ground truths.
  - `ds.val_X` and `ds.val_y` contain the validation samples
  - `ds.test_X` and `ds.test_y` contain the test samples




  Load the SVHN dataset:
  ```py3
  from batchup.datasets import svhn



  ds = svhn.SVHN(n_val=10000)
  ```

  - `ds.train_X` is a `(n, 3, 32, 32)` `float32` array that contains the
      training images.
  - `ds.train_y` is a `(n,)` `int32` array that contains the ground truths.
  - `ds.val_X` and `ds.val_y` contain the validation samples
  - `ds.test_X` and `ds.test_y` contain the test samples




  Load the CIFAR-10 dataset:
  ```py3
  from batchup.datasets import cifar10



  ds = cifar10.CIFAR10(n_val=5000)
  ```

  - `ds.train_X` is a `(n, 3, 32, 32)` `float32` array that contains the
      training images.
  - `ds.train_y` is a `(n,)` `int32` array that contains the ground truths.
  - `ds.val_X` and `ds.val_y` contain the validation samples
  - `ds.test_X` and `ds.test_y` contain the test samples
  - `ds.class_names` lists the class names of the corresponding ground truth
      indices




  Load the CIFAR-100 dataset:
  ```py3
  from batchup.datasets import cifar100



  ds = cifar100.CIFAR100(n_val=5000)
  ```

  - `ds.train_X` is a `(n, 3, 32, 32)` `float32` array that contains the
      training images.
  - `ds.train_y` is a `(n,)` `int32` array that contains the fine ground
      truth classes.
  - `ds.train_y_coarse` is a `(n,)` `int32` array that contains the coarse
      ground truth classes.
  - `ds.val_X`, `ds.val_y` and `ds.val_y_coarse` contain the validation samples
  - `ds.test_X`, `ds.test_y` and `ds.test_y_coarse` contain the test samples
  - `ds.class_names` lists the class names of the corresponding fine ground
      truth indices
  - `ds.class_names_coarse` lists the class names of the corresponding coarse
      ground truth indices




  Load the STL dataset:
  ```py3
  from batchup.datasets import stl



  ds = stl.STL(n_val_folds=1)
  ```

  - `ds.train_X_u8` is a `(n, 3, 96, 96)` `uint8` array that contains the
      training images.
  - `ds.train_y` is a `(n,)` `int32` array that contains the ground truths.
  - `ds.val_X_u8` and `ds.val_y` contain the validation samples
  - `ds.test_X_u8` and `ds.test_y` contain the test samples
  - `ds.class_names` lists the class names of the corresponding ground truth
      indices

  We keep the image data in `uint8` form to save memory,




  Load the USPS dataset (similar to MNIST hand-written digits but smaller):
  ```py3
  from batchup.datasets import usps



  ds = usps.USPS(n_val=729)
  ```

  - `ds.train_X` is a `(n, 1, 16, 16)` `float32` array that contains the
      training images.
  - `ds.train_y` is a `(n,)` `int32` array that contains the ground truths.
  - `ds.val_X` and `ds.val_y` contain the validation samples
  - `ds.test_X` and `ds.test_y` contain the test samples




  The configuration for BatchUp lives in `.batchup.cfg` in your home directory.

  By default BatchUp will store its data (e.g. downloaded datasets) in a directory called `.batchup` that resides in your home directory. If you wish it to locate this data somewhere else (some of the datasets an take a few gigabytes), create the configuration file mentioned above:


  ```cfg
  [paths]
  data_dir=/some/path/batchup_data
  ```

  Alternatively you can set the `BATCHUP_HOME` environment variable top the BatchUp data directory.


pkgId: 926821a7b2e7e7561648c519aef1e4c06e5acf57a6dec15eaa0669340286b3fa
name: python-batchx
arch: src
version: 9.15.1
epoch: 0
release: 1
summary: Batchx Python API
url: https://github.com/batchx/api
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batchx-9.15.1-1.src.rpm
checksum_type: sha256
description:
  The ``batchx`` package contains the ``bx`` main application module, that
  offers full access to the BatchX gRPC API from Python code.


pkgId: 4d8d05df155770af0c5bc2099e1dc655eaa5d0bb08882ae4118de9d41e8f04fa
name: python-batconf
arch: src
version: 0.1.8
epoch: 0
release: 1
summary: Application configuration tool from the BAT project
url: https://pypi.org/project/batconf/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batconf-0.1.8-1.src.rpm
checksum_type: sha256
description:
  ![Logo](https://github.com/lundybernard/batconf/blob/main/docs/source/_static/batconf-logo.png?raw=true)



  Configuration Management for Python projects, modules, applications,
  and microservices.

  [![Stable Version](https://img.shields.io/pypi/v/batconf?color=blue)](https://pypi.org/project/batconf/)
  [![Downloads](https://img.shields.io/pypi/dm/batconf)](https://pypistats.org/packages/batconf)
  [![Build Status](https://github.com/lundybernard/batconf/actions/workflows/tests.yml/badge.svg)](https://github.com/lundybernard/batconf/actions)

  ![Python 3.8](https://img.shields.io/badge/Python-3.8-blue)
  ![Python 3.9](https://img.shields.io/badge/Python-3.9-blue)
  ![Python 3.10](https://img.shields.io/badge/Python-3.10-blue)
  ![Python 3.11](https://img.shields.io/badge/Python-3.11-blue)
  ![Python 3.12](https://img.shields.io/badge/Python-3.12-blue)

  Compose structured hierarchical configurations from multiple sources.
  Enable your code to adapt seemlessly to the current context.
  Allow users in different contexts to use the config source that works best for
  them.

  * Hierarchical priority: CLI > Environment > config file > module defaults
  * Provides builtin support for common config sources:
    * CLI args
    * Environment Variables
    * Config File (yaml)
    * Config classes with default values
  * Easily extendable, add new sources to serve your needs.
  * Set reasonable defaults, and override them as needed.
  * Designed for 12-factor applications (config via Environment Variables)

  Users can create their own config sources
  by creating classes that satisfy `batconf.source.SourceInterfaceProto`
  (or subclass `batconf.source.SourceInterface`)

  The config lookup order is determined by the `SourceList` instance,
  which can be adjusted to suit your needs.



  * REF: [template project example](https://github.com/lundybernard/project_template/blob/main/bat/conf.py)
  * [tests/example/](/tests/example) contains an example project and tests
  with documentation.

  Most projects can copy this example with minimal modification.

  ```python
  from bat import GlobalConfig

  from batconf.manager import Configuration, ConfigProtocol

  from batconf.source import SourceList
  from batconf.sources.args import CliArgsConfig, Namespace
  from batconf.sources.env import EnvConfig
  from batconf.sources.file import FileConfig
  from batconf.sources.dataclass import DataclassConfig


  def get_config(
      
      config_class: ConfigProtocol = GlobalConfig,  # type: ignore
      cli_args: Namespace = None,
      config_file: FileConfig = None,
      config_file_name: str = None,
      config_env: str = None,
  ) -> Configuration:

      
      config_sources = [
          CliArgsConfig(cli_args) if cli_args else None,
          EnvConfig(),
          config_file if config_file else FileConfig(
              config_file_name, config_env=config_env
          ),
          DataclassConfig(config_class),
      ]

      source_list = SourceList(config_sources)

      return Configuration(source_list, config_class)
  ```

  the `GlobalConfig` class is a python `dataclass`, used for namespacing,
  and providing a structured configuration tree.
  Its attributes should be other Config dataclasses for sub-modules.

  ```python
  from dataclasses import dataclass
  from .example import Config


  @dataclass
  class GlobalConfig:
      
      example: Config
  ```



  `pip install .`


  install poetry >= 1.1.13

  `poetry install`


  install the dev dependencies listed in pyproject.toml




  `pip install -e .[dev]`


  `pip install -e ".[dev]"`


  * **Non-Intrusive Integration**: BatConf can be seamlessly incorporated
    into existing projects with minimal code modifications.
    * imports from batconf can be isolated to a single source file
    * Config classes utilize stdlib dataclasses
  * **Portability and Modularity**: Modules (sub-modules or entire projects) that use batconf configuration
    should be easy to compose and refactor.
    * modules can be easily plugged in to other modules.
    * modules can be easily factored out (into new projects).



  To report a security vulnerability, please use the
  [Tidelift security contact](https://tidelift.com/security).
  Tidelift will coordinate the fix and disclosure.


pkgId: adcad1919635871f2b1d2b1df6359276b07e9b53dc7ec796f7104328cb22b28f
name: python-batframework
arch: src
version: 1.0.7
epoch: 0
release: 1
summary: Pygame framework for making games easier.
url: https://github.com/TuranBaturay/batFramework
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batframework-1.0.7-1.src.rpm
checksum_type: sha256
description:
  Welcome to the `batFramework` and the accompanying `gamejam` project. This README provides an overview of both the game framework and the specific game project developed using the framework.



  The `batFramework` is a Python game development framework based on pygame, designed to streamline the process of creating 2D games. It provides a set of tools and components to handle scenes, transitions, cutscenes, audio, sprites, and more. The framework is built with flexibility in mind, allowing you to focus on game design while abstracting away low-level details.



  - Scene management
  - Cutscene support
  - Audio management (music and sound effects with volume control)
  - Entity, sprite, and animated sprite handling
  - Transition effects
  - Utility modules (time management, constants, etc.)
  - No external dependency except for pygame



  1. Install Python (version 3.11 or higher) and the latest stable version of pygame-ce.
  2. Clone or download this repository.
  4. Explore the framework's modules in the `batFramework` directory and integrate them into your own game project.

  For more detailed information on how to use the framework, refer to the documentation (if available) or explore the source code in the `batFramework` directory.



  The `gamejam` project is a specific game developed using the `batFramework`. It serves as an example of how the framework can be used to create a game from scratch.



  1. Install Python (version 3.10 or higher) and the latest stable version of pygame-ce.
  2. Clone or download this repository.
  3. Navigate to the `gamejam` directory.
  4. Run the game by executing the main script (e.g., `python main.py`).
  5. Play the game and have fun!

  Feel free to explore the code in the `gamejam` directory to see how the `batFramework` is utilized to create the game. You can modify, extend, or use the project as a starting point for your own games.


pkgId: 5ecea1fbc9efa465d438d633218de32bb063ea0b4e32b8d9db8b4c1babacd763
name: python-batinfo
arch: src
version: 0.4.2
epoch: 0
release: 1
summary: A simple Python module to retrieve battery information
url: https://github.com/nicolargo/batinfo
rpm_license: LGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batinfo-0.4.2-1.src.rpm
checksum_type: sha256
description:
  A simple Python module to retrieve battery information on Linux-based operating system.
  No ACPI or external software is needed.
  Only the Linux kernel and its `/sys/class/power_supply` folder.
  A simple example says more than thousand words:
      In [1]: import batinfo
      In [2]: bat = batinfo.Batteries()
      In [3]: bat
      Out[3]: <batinfo.Battery.Batteries at 0x31c87d0>
      In [4]: bat.stat
      Out[4]: [{"status": "Full", "capacity": 50, "name": "CMB1", "uevent": "POWER_SUPPLY_NAME=CMB1\nPOWER_SUPPLY_STATUS=Full\nPOWER_SUPPLY_PRESENT=1\nPOWER_SUPPLY_TECHNOLOGY=Li-ion\nPOWER_SUPPLY_CYCLE_COUNT=0\nPOWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000\nPOWER_SUPPLY_VOLTAGE_NOW=12496000\nPOWER_SUPPLY_CURRENT_NOW=0\nPOWER_SUPPLY_CHARGE_FULL_DESIGN=5800000\nPOWER_SUPPLY_CHARGE_FULL=5800000\nPOWER_SUPPLY_CHARGE_NOW=3900000\nPOWER_SUPPLY_CAPACITY=100\nPOWER_SUPPLY_MODEL_NAME=CP293550-01\nPOWER_SUPPLY_MANUFACTURER=Fujitsu\nPOWER_SUPPLY_SERIAL_NUMBER=01A-Z100320001158Z", "alarm": 0, "charge_full": 5800000, "voltage_now": 12496000, "serial_number": "01A-Z100320001158Z", "cycle_count": 0, "current_now": 0, "charge_now": 3900000, "voltage_min_design": 10800000, "path": "/sys/class/power_supply/CMB1", "technology": "Li-ion", "manufacturer": "Fujitsu", "type": "Battery", "model_name": "CP293550-01", "present": 1, "charge_full_design": 5800000}]
      In [6]: bat.stat[0]
      Out[6]: {"status": "Full", "capacity": 100, "name": "CMB1", "uevent": "POWER_SUPPLY_NAME=CMB1\nPOWER_SUPPLY_STATUS=Full\nPOWER_SUPPLY_PRESENT=1\nPOWER_SUPPLY_TECHNOLOGY=Li-ion\nPOWER_SUPPLY_CYCLE_COUNT=0\nPOWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000\nPOWER_SUPPLY_VOLTAGE_NOW=12496000\nPOWER_SUPPLY_CURRENT_NOW=0\nPOWER_SUPPLY_CHARGE_FULL_DESIGN=5800000\nPOWER_SUPPLY_CHARGE_FULL=5800000\nPOWER_SUPPLY_CHARGE_NOW=3900000\nPOWER_SUPPLY_CAPACITY=100\nPOWER_SUPPLY_MODEL_NAME=CP293550-01\nPOWER_SUPPLY_MANUFACTURER=Fujitsu\nPOWER_SUPPLY_SERIAL_NUMBER=01A-Z100320001158Z", "alarm": 0, "charge_full": 5800000, "voltage_now": 12496000, "serial_number": "01A-Z100320001158Z", "cycle_count": 0, "current_now": 0, "charge_now": 3900000, "voltage_min_design": 10800000, "path": "/sys/class/power_supply/CMB1", "technology": "Li-ion", "manufacturer": "Fujitsu", "type": "Battery", "model_name": "CP293550-01", "present": 1, "charge_full_design": 5800000}
      In [7]: bat.stat[0].capacity
      Out[7]: 50
      In [8]: print bat.stat[0]
      100
      In [9]: bat.stat[0].manufacturer
      Out[9]: 'Fujitsu'
      In [9]: bat.stat[0].technology
      Out[9]: 'Li-ion'
      In [11]: bat.stat[0].charge_full
      Out[11]: 5800000
      In [12]: bat.stat[0].charge_now
      Out[12]: 3900000
      In [12]: bat.update()
      > Refresh the stats
  Have fun...


pkgId: fffbd19544285d40f887a4c2631e4b98968b05a0871a25f3f1682619fc74ae7b
name: python-batou
arch: src
version: 2.5.0
epoch: 0
release: 1
summary: A utility for automating multi-host, multi-environment software builds and deployments.
url: https://batou.readthedocs.io/en/latest/
rpm_license: BSD (2-clause)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batou-2.5.0-1.src.rpm
checksum_type: sha256
description:
  <img width="150" src="https://batou.readthedocs.io/en/latest/_static/batou.png">

  batou helps you to automate your application deployments:

  * You create a model of your deployment using a simple but powerful Python API.
  * You configure how the model applies to hosts in different environments.
  * You verify and run the deployment with the batou utility.

  Getting started with a new project is easy:

  ```console
  mkdir myproject
  cd myproject
  git init
  curl -sL https://raw.githubusercontent.com/flyingcircusio/batou/main/bootstrap | sh
  git commit -m "Start a batou project."
  ```

  Here's a minimal application model:

  ```console
  $ mkdir -p components/myapp
  $ cat > components/myapp/component.py
  from batou.component import Component
  from batou.lib.python import VirtualEnv, Package
  from batou.lib.supervisor import Program

  class MyApp(Component):

      def configure(self):
          venv = VirtualEnv('2.7')
          self += venv
          venv += Package('myapp')
          self += Program('myapp',
              command='bin/myapp')
  ```

  And here's a minimal environment:

  ```console
  $ mkdir environments
  $ cat > environments/dev/environment.cfg
  [environment]
  connect_method = local

  [hosts]
  localhost = myapp
  ```

  To deploy this, you run:

  ```console
  $ ./batou deploy dev
  ```

  Check the [detailed documentation](http://batou.readthedocs.org) to get going with a more ambitious project.




  * Separate your application model from environments
  * Supports idempotent operation for incremental deployments
  * Deploy to multiple hosts simultaneously
  * Automated dependency resolution for multi-host scenarios
  * No runtime requirements on your application
  * Encrypted secrets with multiple access levels: store your
    SSL certificates, SSH keys, service secrets and more to get true 1-button deployments.
  * Deploy to local machines, Vagrant, or any SSH host
  * Broad SSH feature support by using OpenSSH through execnet
  * Only few dependencies required on the remote host
  * Ships with a library of components for regularly needed tasks
  * self-bootstrapping and self-updating - no additional scripting needed



  The project is licensed under the 2-clause BSD license.



  * Make sure `mercurial` and `subversion` are installed and in `$PATH`.
  * Run `./develop.sh` to create a local virtualenv with everything set up.
  * Run the test suite using: `bin/tox`
  * Build the documentation using: `cd doc; make`
  * Set up GPG for the examples with `export GNUPGHOME=<DIRECTORY OF BATOU HERE>/src/batou/secrets/tests/fixture/gnupg`
  * Make sure [age](https://github.com/FiloSottile/age) is installed and in `$PATH` for age encryption support.



  See [CHANGES.md](./CHANGES.md).


pkgId: 0ced409d258c8f856a936ffc149dd840a65069e9adff3c0a0b30d0977192a6aa
name: python-batou
arch: src
version: 2.5.1
epoch: 0
release: 1
summary: A utility for automating multi-host, multi-environment software builds and deployments.
url: https://batou.readthedocs.io/en/latest/
rpm_license: BSD (2-clause)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-batou-2.5.1-1.src.rpm
checksum_type: sha256
description:
  <img width="150" src="https://batou.readthedocs.io/en/latest/_static/batou.png">

  batou helps you to automate your application deployments:

  * You create a model of your deployment using a simple but powerful Python API.
  * You configure how the model applies to hosts in different environments.
  * You verify and run the deployment with the batou utility.

  Getting started with a new project is easy:

  ```console
  mkdir myproject
  cd myproject
  git init
  curl -sL https://raw.githubusercontent.com/flyingcircusio/batou/main/bootstrap | sh
  git commit -m "Start a batou project."
  ```

  Here's a minimal application model:

  ```console
  $ mkdir -p components/myapp
  $ cat > components/myapp/component.py
  from batou.component import Component
  from batou.lib.python import VirtualEnv, Package
  from batou.lib.supervisor import Program

  class MyApp(Component):

      def configure(self):
          venv = VirtualEnv('2.7')
          self += venv
          venv += Package('myapp')
          self += Program('myapp',
              command='bin/myapp')
  ```

  And here's a minimal environment:

  ```console
  $ mkdir environments
  $ cat > environments/dev/environment.cfg
  [environment]
  connect_method = local

  [hosts]
  localhost = myapp
  ```

  To deploy this, you run:

  ```console
  $ ./batou deploy dev
  ```

  Check the [detailed documentation](http://batou.readthedocs.org) to get going with a more ambitious project.




  * Separate your application model from environments
  * Supports idempotent operation for incremental deployments
  * Deploy to multiple hosts simultaneously
  * Automated dependency resolution for multi-host scenarios
  * No runtime requirements on your application
  * Encrypted secrets with multiple access levels: store your
    SSL certificates, SSH keys, service secrets and more to get true 1-button deployments.
  * Deploy to local machines, Vagrant, or any SSH host
  * Broad SSH feature support by using OpenSSH through execnet
  * Only few dependencies required on the remote host
  * Ships with a library of components for regularly needed tasks
  * self-bootstrapping and self-updating - no additional scripting needed



  The project is licensed under the 2-clause BSD license.



  * Make sure `mercurial` and `subversion` are installed and in `$PATH`.
  * Run `./develop.sh` to create a local virtualenv with everything set up.
  * Run the test suite using: `bin/tox`
  * Build the documentation using: `cd doc; make`
  * Set up GPG for the examples with `export GNUPGHOME=<DIRECTORY OF BATOU HERE>/src/batou/secrets/tests/fixture/gnupg`
  * Make sure [age](https://github.com/FiloSottile/age) is installed and in `$PATH` for age encryption support.



  * Changes should be accompanied with a changelog entry. Use `./changelog.sh` to create one.
  * Releasing will create a tag and publishes the package to pypi. Use `./release-this.sh` to create a release.



  See [CHANGES.md](./CHANGES.md).


pkgId: 52b8f4ec58b83da8369ca4a456ae3d6dca651d45feb52d847b47780a53844297
name: python-battenberg
arch: src
version: 0.5.2
epoch: 0
release: 1
summary: Providing updates to cookiecutter projects.
url: https://github.com/zillow/battenberg
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-battenberg-0.5.2-1.src.rpm
checksum_type: sha256
description:
  [![image](https://img.shields.io/pypi/v/battenberg.svg)](https://pypi.python.org/pypi/battenberg)
  [![image](https://img.shields.io/travis/zillow/battenberg.svg)](https://github.com/zillow/battenberg/actions)

  Battenberg is a tool built atop of [Cookiecutter](https://github.com/audreyr/cookiecutter) to keep Cookiecut projects
  in sync with their parent templates. Under the hood, Battenberg relies on Git to manage the merging, diffing, and
  conflict resolution story. The first goal of Battenberg is to provide an *upgrade* feature to Cookiecutter.



  We publish `battenberg` to [PyPI](https://pypi.org/project/battenberg/) for easy consumption.

  ```bash
  pip install battenberg
  ```

  If you're on Mac OS X or Windows please follow the [installation guides](https://www.pygit2.org/install.html#) in the `pygit2` documentation
  as well as `battenberg` relies on `libgit2` which needs to be installed first. **Please install `libgit2 >= 1.0`.**

  If you use SSH to connect to `git`, please also install `libssh2` **prior to installing `libgit2`!!** Most like you can do this via `brew install libssh2`
  if you are on Mac OS X.



  It is assumed that your cookiecutter template contains a `.cookiecutter.json` file at the root directory, or you can override its location by
  passing in `--context-file`. Please use the [`jsonify`](https://github.com/cookiecutter/cookiecutter/pull/791) Jinja2 extension to dump the
  `cookiecutter` template context to `.cookiecutter.json`.

  **Tip:** One problem `battenberg` has that as divergence between the cookiecutter template and the project itself increase as will the volume of
  conflicts needed to be manually resolved for each upgrade merge. To minimize these it is often advisable to fit templates with a
  `generate_example` boolean flag which will disable including any example code, instead replacing implementation with a
  [`pass`](https://docs.python.org/3/reference/simple_stmts.html#the-pass-statement) for example.



  Install a [Cookiecutter](https://github.com/audreyr/cookiecutter) template:

  ```bash
  battenberg [-O <root path>] [--verbose] install [--checkout v1.0.0] [--initial-branch main] <cookiecutter template path/URL>
  ```

  * `--checkout` - Specifies a target reference (branch, tag or commit) from the cookiecutter template repo, if not specified is it inferred from the default branch for the template repo.
  * `-O` - Specifies an output folder path, defaults to the current directory.
  * `--initial-branch` - The default branch for the newly created `git` repo, if not specified is it inferred from the default branch for the template repo.
  * `--verbose` - Enables extra debug logging.

  Upgrade your repository with last version of a template:

  ```bash
  battenberg upgrade [--checkout v1.0.0] [--no-input] [--merge-target <branch, tag or commit>] [--context-file <context filename>]
  ```

  * `--checkout` - Specifies a target reference (branch, tag or commit) from the cookiecutter template repo, if not specified is it inferred from the default branch for the template repo.
  * `--no-input` - Read in the template context from `--context-file` instead of asking the `cookiecutter` template questions again.
  * `--merge-target` - Specify where to merge the eventual template updates.
  * `--context-file` - Specifies where to read in the template context from, defaults to `.cookiecutter.json`.

      *Note: `--merge-target` is useful to set if you are a template owner but each cookiecut repo is owned independently. The value you pass*
      *to `--merge-target` should be the source branch for a PR that'd target `main` in the cookiecut repo so they can approve any changes.*



  A great feature of `battenberg` is that it's relatively easy to onboard existing projects you've already cookiecut from an existing template.
  To do this you need to follow the `battenberg install` instructions above but use the `-O` output to specify the directory of the existing
  project and it'll create you a new `template` branch and attempt to merge just like an upgrade operation.

  Once you've completed your first merge from `template` -> `main` you can then follow the `battenberg upgrade` instructions as though it was
  generated using `battenberg` initially.



  At a high level `battenberg` attempts to provide a continuous history between the upstream template project and the cookiecut project. It does this by maintaining a disjoint `template`
  branch which `battenberg` attempts to keep in sync with the upstream template, it therefore will contain no project-specific changes beyond replacing the template values. Then changes
  to the `template` are incorporated into the `main` and other branches via a `git merge --allow-unrelated-histories` command for each template update pulled in. This merge commit
  should be used to resolve any conflicts between the upstream template and the specialized project.

  ![A new project in battenberg](https://github.com/zillow/battenberg/raw/main/img/new.png)

  *This shows the repo structure immediately after running a `battenberg install <template>` command*

  ![An updated project in battenberg](https://github.com/zillow/battenberg/raw/main/img/updated.png)

  *This shows the repo structure immediately after running a `battenberg upgrade` command on the previously installed project*



  To get set up run:

  ```bash
  python3 -m venv env
  source env/bin/activate


  pip install -e .


  pip install -e ".[dev]"
  ```

  Then to actually perform any operations just use the `battenberg` command which should now be on your `$PATH`.

  To run tests:

  ```bash
  pytest
  ```

  To run linting:

  ```bash
  flake8 --config flake8.cfg battenberg
  ```



  **Reminder to update [`HISTORY.md`](./HISTORY.md) with a summary of any updates, especially breaking changes.**

  We utilize GitHub Actions to deploy to PyPI. We've limited it to just publish on `git tags`. To release run:

  ```bash

  vi battenberg/__init__.py  # Update the version string.
  git tag <version>
  git push origin <version>
  ```

  Then watch the build for any errors, eventually it should appear on the [`battenberg` PyPI](https://pypi.org/project/battenberg/) project.



  * I got an error like `_pygit2.GitError: unsupported URL protocol`, how do I fix this?

      Likely you're using a `git` URL with `ssh` and have installed `pygit2` without access to the underlying `libssh2`
      library. To test this run:

      ```bash
      $ python -c "import pygit2; print(bool(pygit2.features & pygit2.GIT_FEATURE_SSH))"
      False
      ```

      To remedy this run:

      ```bash
      $ pip uninstall pygit2
      ...
      
      $ xcode-select --install
      ...
      $ brew install libssh2
      ...
      $ brew install libgit2
      ...
      
      
      $ pip install pygit2 --no-binary pygit2
      ...
      
      $ python -c "import pygit2; print(bool(pygit2.features & pygit2.GIT_FEATURE_SSH))"
      True
      ```

  * Why are you using a new `.cookiecutter.json` pattern instead of using the [`replay` pattern](https://cookiecutter.readthedocs.io/en/latest/advanced/replay.html)?

      Frankly the implementation was quite convoluted to get the intentions of these features to align. With the `.cookiecutter.json` approach
      we're intended for template state to live at the project level instead of at the user level which the `replay` functionality defaults to.
      Overriding that behaviour, whilst possible was convoluted in the current `cookiecutter` API and would require upstream changes so instead
      we decided against trying to align these features.

  * Why `battenberg`?

      A tribute to the shoulders this project stands on, [`cookiecutter`](https://github.com/cookiecutter/cookiecutter) &
      [`milhoja`](https://github.com/rmedaer/milhoja), and [a tasty cake](https://en.wikipedia.org/wiki/Battenberg_cake) in its own right.



  [Original code](https://github.com/rmedaer/battenberg) written by [Raphael Medaer](https://github.com/rmedaer) from an [original
  idea](https://github.com/cookiecutter/cookiecutter/issues/784) of [Abdó Roig-Maranges](https://github.com/aroig).



  Free software: Apache Software License 2.0






  - Update to pygit2 usage to enable usage of newer versions of the package while also maintaining backwards compatibility.



  - Update python version to 3.9+



  - Update python version to 3.7+



  - Suppress stacktrace logging when hook exits unsuccessfully (See [#23](https://github.com/zillow/battenberg/pull/23))
  - Ensure we're compatible with updated `Repository.__init__` constructor (See [#23](https://github.com/zillow/battenberg/pull/23))



  - Remove `master` as the default `git` target branch terminology to promote equity and belonging. Instead rely on remote HEAD to infer default branch naming convention.
  - Add in `--initial-branch` optional argument to `battenberg install` to specify the initial branch to create when initializing a new project.



  - Update `pygit2` dependency to `>= 1.0`, can now rely on `libgit2 >= 1.0` too. (See [#18](https://github.com/zillow/battenberg/pull/18))
  - Add in better debug logging (See [#16](https://github.com/zillow/battenberg/pull/16))



  - Refactor removal of top-level directory after cookiecutting to avoid collisions. (See [#15](https://github.com/zillow/battenberg/pull/15))
  - Set upper limit on pygit2 dependency (See [#14](https://github.com/zillow/battenberg/pull/14))



  - Fix regression that stopped injecting context when upgrading.



  - Cleans up error message when merging results in conflicts. (See [#13](https://github.com/zillow/battenberg/pull/13))



  - Adds in remote fetching of `origin/template` branch during upgrades. (See [#12](https://github.com/zillow/battenberg/pull/12))



  - Revert back to relying on mainline `cookiecutter` instead of Zillow fork. (See [#9](https://github.com/zillow/battenberg/pull/9))



  - Add in support for reading template context from `.cookiecutter.json`. (See [#2](https://github.com/zillow/battenberg/pull/2))
  - Add in `--merge-target` CLI option. (See [#4](https://github.com/zillow/battenberg/pull/4))
  - Expanded test coverage, added in CI/CD via Travis CI. (See [#8](https://github.com/zillow/battenberg/pull/8))

  Prior to v0.1.0 `battenberg` was developed under the [`milhoja`](https://github.com/rmedaer/milhoja) project.


