# packages

pkgId: b15bffec8ef6c78be5d2fc66775fafc44aaa209da827a6662cc198e57b310bf6
name: python-sparkpl-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for sparkpl
url: https://github.com/Boadzie/sparkpl
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sparkpl-0.1.2-1.src.rpm
location_href: Packages/python-sparkpl-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  > A lightweight Python package for seamless conversion between PySpark and Polars DataFrames.



  ```bash
  pip install sparkpl
  ```



  - Direct conversion from PySpark to Polars DataFrames
  - Direct conversion from Polars to PySpark DataFrames
  - No pandas dependency
  - Simple API
  - Preserves data types
  - Minimal memory footprint



  ```python
  from pyspark.sql import SparkSession
  from sparkpl import DataFrameConverter


  spark = SparkSession.builder.appName("example").getOrCreate()


  converter = DataFrameConverter()


  polars_df = converter.spark_to_polars(spark_df)


  spark_df = converter.polars_to_spark(polars_df, spark)
  ```



  - Python >=3.11
  - polars >=0.20.0
  - pyspark >=3.0.0



  MIT



  1. Fork the repository
  2. Create your feature branch: `git checkout -b feature/my-feature`
  3. Commit your changes: `git commit -am 'Add my feature'`
  4. Push to the branch: `git push origin feature/my-feature`
  5. Submit a pull request



  For issues and feature requests, please use the [issue tracker](https://github.com/Boadzie/sparkpl/issues).


pkgId: 1f64bda25d57e170a3068ffd54c098f0e289ca5da32d8640b26bb140ceb7e645
name: python-sparkx-help
arch: noarch
version: 2.0.0
epoch: 0
release: 1
summary: Development documents and examples for sparkx
url: https://smash-transport.github.io/sparkx/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sparkx-2.0.0-1.src.rpm
location_href: Packages/python-sparkx-help-2.0.0-1.noarch.rpm
checksum_type: sha256
description:
  <div style="float:right; margin:10px;">
    <img align="right" src="https://github.com/smash-transport/sparkx/assets/90659054/58363f8a-2ed4-4a8f-bbb0-40f71349a338" alt="drawing" width="125"/>
  </div>
  <br>
  <br>






  <a href="https://smash-transport.github.io/sparkx/" target="_blank">
    <img src="https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat" alt="documentation">
  </a>

  <a href="https://doi.org/10.5281/zenodo.10288638">
    <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.10288638.svg" alt="DOI">
  </a>

  This package is designed to assist users of the [SMASH](https://smash-transport.github.io/) and [JETSCAPE/X-SCAPE](https://jetscape.org/) codes to analyze the output of the simulation data.
  It contains multiple classes to read in the simulation outputs in Oscar2013/Oscar2013Extended/Oscar2013Extended_IC/Oscar2013Extended_Photons/ASCII format or the hadron/parton output of JETSCAPE/X-SCAPE.

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


pkgId: d7e7915917a200504df55b8940dc4943bb0a1ad4a68ffc27e42be112c7318428
name: python-spatialsurf-help
arch: noarch
version: 0.3
epoch: 0
release: 1
summary: Development documents and examples for spatialsurf
url: https://github.com/lllsssyyyy/SURF
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spatialsurf-0.3-1.src.rpm
location_href: Packages/python-spatialsurf-help-0.3-1.noarch.rpm
checksum_type: sha256
description:
  A self-supervised deep learning method for reference-free deconvolution. The overall approach is detailed in the official paper out in xxx.

  ![Fig1](https://github.com/user-attachments/assets/cd371dab-fa9a-474d-9bfa-32b41adb8cbe)


  df_expr: (n_spots * n_genes), dataframe, with column names (gene names)
  df_pos: (n_spots * 2), dataframe, with column names [‘x’, ‘y’]
  barcodes: (n_spots,), a numpy array


  ‘pred.csv’: The predicted cell types proportions in each spot.
  ‘beta.csv’: The deconvolved gene expressions of each cell type.
  ‘last.pkl’: The saved trained model.


pkgId: 206815a670f2364a9e712cba178447a79c1496b4ba432c93ab91bbc00d90807c
name: python-spbessax-help
arch: noarch
version: 0.1.3
epoch: 0
release: 1
summary: Development documents and examples for spbessax
url: https://pypi.org/project/spbessax/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spbessax-0.1.3-1.src.rpm
location_href: Packages/python-spbessax-help-0.1.3-1.noarch.rpm
checksum_type: sha256
description:
  This repository contains a JAX implementation of spherical bessel functions that
  is fully compatible with jax.jit and jax.grad. It is based on the implementation
  by @sousaw in [NeuralIL](https://github.com/Madsen-s-research-group/neuralil-public-releases).

  The package can be installed from [PyPi](https://pypi.org/project/spbessax/) using pip:

  `pip install psbessax`


pkgId: aa893930c0a78ae183f625655c94e8d87b7c5f51512afc5cb052b1f3f37f6c1f
name: python-spcm-help
arch: noarch
version: 1.4.5
epoch: 0
release: 1
summary: Development documents and examples for spcm
url: https://spectrum-instrumentation.com/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spcm-1.4.5-1.src.rpm
location_href: Packages/python-spcm-help-1.4.5-1.noarch.rpm
checksum_type: sha256
description:
  <div style="margin-bottom: 20px; text-align: center">
  <a href="https://spectrum-instrumentation.com">
      <img src="https://spectrum-instrumentation.com/img/logo-complete.png"  width=400 />
  </a>
  </div>


  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![PyPI - Version](https://img.shields.io/pypi/v/spcm)](https://pypi.org/project/spcm)
  [![PyPi Downloads](https://img.shields.io/pypi/dm/spcm?label=downloads%20%7C%20pip&logo=PyPI)](https://pypi.org/project/spcm)
  [![Follow](https://img.shields.io/twitter/follow/SpecInstruments.svg?style=social&style=flat&logo=twitter&label=Follow&color=blue)](https://twitter.com/SpecInstruments/)
  ![GitHub followers](https://img.shields.io/github/followers/SpectrumInstrumentation)

  A high-level, object-oriented Python package for interfacing with Spectrum Instrumentation GmbH devices.

  `spcm` can handle individual cards (`Card`), StarHubs (`Sync`), groups of cards (`CardStack`) and Netboxes (`Netbox`).



  See the [SUPPORTED_DEVICES.md](https://github.com/SpectrumInstrumentation/spcm/blob/master/src/spcm/SUPPORTED_DEVICES.md) file for a list of supported devices.


  [![Static Badge](https://img.shields.io/badge/Python-3.9+-blue)](https://www.python.org/)
  [![Static Badge](https://img.shields.io/badge/NumPy-1.25+-green)](https://numpy.org/)
  [![Static Badge](https://img.shields.io/badge/pint-0.24+-teal)](https://pint.readthedocs.io/en/stable/)

  `spcm` requires the Spectrum Instrumentation [driver](https://spectrum-instrumentation.com/support/downloads.php) which is available for Windows and Linux.
  Please have a look in the manual of your product for more information about installing the driver on the different plattforms.


  [![Static Badge](https://img.shields.io/badge/cuda--python-12.6+-green)](https://developer.nvidia.com/cuda-python)
  [![Static Badge](https://img.shields.io/badge/cupy--cuda12x-13.3+-green)](https://cupy.dev/)
  [![Static Badge](https://img.shields.io/badge/h5py-3.10+-orange)](https://www.h5py.org/)

  These are dependencies that the `spcm` package uses, when they are installed. See the `src/examples` folder for specific use cases.


  [![Pip Package](https://img.shields.io/pypi/v/spcm?logo=PyPI)](https://pypi.org/project/spcm)
  [![Publish to PyPI](https://github.com/SpectrumInstrumentation/spcm/actions/workflows/spcm-publish-to-pypi.yml/badge.svg)](https://github.com/SpectrumInstrumentation/spcm/actions/workflows/spcm-publish-to-pypi.yml)

  Start by installing Python 3.9 or higher. We recommend using the latest version. You can download Python from [https://www.python.org/](https://www.python.org/).

  You would probably also like to install and use a virtual environment, although it's not strictly necessary. See the examples [README.md](https://github.com/SpectrumInstrumentation/spcm/blob/master/src/examples/README.md) for a more detailed explanation on how to use `spcm` in a virtual environment.

  To install the latest release using `pip`:
  ```bash
  $ pip install spcm
  ```
  Note that: this will automatically install all the dependencies.


  [![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://spectruminstrumentation.github.io/spcm/spcm.html)
  [![Build dosc](https://github.com/SpectrumInstrumentation/spcm/actions/workflows/spcm-docs-pages.yml/badge.svg)](https://github.com/SpectrumInstrumentation/spcm/actions/workflows/spcm-docs-pages.yml)
  [![Publish docs](https://github.com/SpectrumInstrumentation/spcm/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/SpectrumInstrumentation/spcm/actions/workflows/pages/pages-build-deployment)

  The API documentation for the latest [stable release](https://spectruminstrumentation.github.io/spcm/spcm.html) is available for reading on GitHub pages.

  Please also see the hardware user manual for your specific card for more information about the available functionality.



  The `spcm` package is a high-level object-oriented programming library for controlling Spectrum Instrumentation devices.


  For detailed examples see the `src\examples` directory. There are several sub-directories each corresponding to a certain kind of functionality. You can find the most recent examples on [GitHub](https://github.com/SpectrumInstrumentation/spcm/tree/master/src/examples).




  `spcm` provides the following classes for interfacing with the different devices.

  | Name        | Description                                                                       |
  |-------------|-----------------------------------------------------------------------------------|
  | `Card`      | a class to control the low-level API of Spectrum Instrumentation cards. |
  | `Sync`      | a class for controling StarHub devices.                  |
  | `CardStack` | a class that handles the opening and closing of a combination of different cards either with or without a StarHub that synchronizes the cards. |
  | `Netbox`    | a class that handles the opening and closing of the cards in a Netbox                          |



  Opening and closing of cards is handled using the python [`with`](https://peps.python.org/pep-0343/) statement. This creates a context manager that safely handles opening and closing of a card or a group of cards.


  Connect to local cards:

  ```python
  import spcm

  with spcm.Card('/dev/spcm0') as card:

      
  ```
  Connect to remote cards (you can find a card's IP using the
  [Spectrum Control Center](https://spectrum-instrumentation.com/en/spectrum-control-center) software):

  ```python
  import spcm

  with spcm.Card('TCPIP::192.168.1.10::inst0::INSTR') as card:

      
  ```

  Connect to a group of cards synchronized using a StarHub:

  ```python
  import spcm

  card_identifiers = ["/dev/spcm0", "/dev/spcm1"]
  sync_identifier  = "sync0"

  with spcm.CardStack(card_identifiers=card_identifiers, sync_identifier=sync_identifier) as stack:

      
  ```
  The `CardStack` object contains a list of `Card` objects in the `stack.cards` parameter and a `Sync` object in the parameter `stack.sync`.



  Apart from connecting to a device directly through a device identifier it's also possible to connect to local devices using the card type or serial number.

  To find the first card of type analog out (`SPCM_TYPE_AO`) you can do the following:
  ```python
  import spcm

  with spcm.Card(card_type=spcm.SPCM_TYPE_AO) as card:

      
  ```
  See the register `SPC_FNCTYPE` in the reference manual of your specific device for the kind of card you're using.

  If you want to connect to a device based on it's serial number, do the following:
  ```python
  import spcm

  with spcm.Card(serial_number=[your serial number here]) as card:

      
  ```
  See the register `SPC_PCISERIALNO` in the reference manual of your specific device for more information.

  If the `device_identifier` is given, that card is opened, if at the same time `card_type` or `serial_number` are given, then these behave as an additional check too see if the opened card is of a certain type or has that specific serial number.


  To test the Spectrum Instrumentation API with user code without hardware, the Control Center gives the user the option to create [demo devices](https://spectrum-instrumentation.com/support/knowledgebase/software/How_to_set_up_a_demo_card.php). These demo devices can be used in the same manner as real devices. Simply change the device identifier string to the string as shown in the Control Center.



  `spcm` uses [pint](https://pint.readthedocs.io/en/stable/) to handle all quantities that have a physical unit. To enable the use of quantities simply import the units module from `spcm`:

  ```python
  from spcm import units
  ```

  This imports the `units` object from `spcm`. This is a `UnitRegistry` object from `pint`. Defining a quantity is as simple as:

  ```python
  from spcm import units

  frequency = 100 * units.MHz
  amplitude = 1 * units.V

  ```

  All methods within the `spcm` that expect a value related to a physical quantity, support these quantities, for example setting a timeout:

  ```python
  card.timeout(5 * units.s)
  ```

  See our dedicated examples for more information about where units can be used.


  After opening a card, StarHub, group of cards or Netbox, specific functionality of the cards can be accessed through `CardFunctionality` classes.

  | Name                | Description                                                         |
  |---------------------|---------------------------------------------------------------------|
  | `Channels`          | class for setting up the in- or output stage of the channels of a card |
  | `Clock`             | class for setting up the clock engine of the card                   |
  | `Trigger`           | class for setting up the trigger engine of the card                 |
  | `MultiPurposeIOs`   | class for setting up the multi purpose i/o of the card              |
  | `DataTransfer`      | class for handling data transfer functionality                      |
  | `Multi`             | class for handling multiple recording and replay mode functionality |
  | `Sequence`          | class for handling sequence mode functionality                      |
  | `TimeStamp`         | class for handling time stamped data                                |
  | `Boxcar`            | class for handling boxcar averaging                                 |
  | `BlockAverage`      | class for handling block averaging functionality                    |
  | `PulseGenerators`   | class for setting up the pulse generator functionality              |
  | `DDS`               | class for handling DDS functionality                                |
  | `DDSCommandList`    | class for abstracting streaming DDS commands using blocks of commands |
  | `DDSCommandQueue`   | class for abstracting streaming DDS commands using a queue of commands |

  To use a specific functionality simply initiate an instance of one of the classes and pass a device object:

  ```python
  import spcm

  with spcm.Card('/dev/spcm0') as card:

      clock = spcm.Clock(card)
      
      trigger = spcm.Trigger(card)
      
      multi_io = spcm.MultiPurposeIOs(card)
      
      data_transfer = spcm.DataTransfer(card)
      

  ```
  Each of these functionalities typically corresponds to a chapter in your device manual, so for further reference please have a look in the device manual.



  The Channels functionality allows the user to setup individual channels on a Card or a CardStack. The channels object is also a Python iterator, hence if a channels object is used it a for-loop, each iteration provides a Channel object:

  ```python
  channels = spcm.Channels(card, card_enable=spcm.CHANNEL0 | spcm.CHANNEL1)
  for channel in channels:
      
  ```

  In addition, the user can define the output load connected to the channel (standard value 50 Ohm), to any resistor value or high impedance (`units.highZ`). With this output load, the amplitude setting is done with repect to this output load:

  ```python
  channels = Channels(card, card_enable=spcm.CHANNEL0 | spcm.CHANNEL1)
  channels[0].output_load(units.highZ)
  channels[0].amp(1 * units.V)

  channels.output_load(units.highZ)
  channels.amp(1 * units.V)
  ```

  This information allows the user to convert the data coming from `DataTransfer`, using the `convert_data()` method. See the section "Setting up a data transfer buffer ..." for more details.



  The Clock engine is used to generate a clock signal that is used as the source for all timing critical processes on the card.


  To get the maximum sample rate of the active card and set the sample rate to the maximum, this is an example using internal PLL clock mode:
  ```python
  clock = spcm.Clock(card)
  clock.mode(spcm.SPC_CM_INTPLL)
  sample_rate = clock.sample_rate(max=True)

  sample_rate = clock.sample_rate(20 * units.MHz) # for a 20 MHz sample rate (see reference manual for allowed values)
  print("Current sample rate: {}".format(sample_rate, return_unit=units.MS/units.s))
  ```





  The Trigger engine can be configured for a multitude of different configurations (see the hardware manual for more information about the specific configurations for your device). Here we've given an example for an external trigger arriving at input port ext0, that is DC-coupled. The card is waiting for positiv edge that excedes 1.5 V:

  ```python
  trigger = spcm.Trigger(card)
  trigger.or_mask(spcm.SPC_TMASK_EXT0) # set the ext0 hardware input as trigger source
  trigger.ext0_mode(spcm.SPC_TM_POS) # wait for a positive edge
  trigger.ext0_level0(1.5 * units.V)
  trigger.ext0_coupling(spcm.COUPLING_DC) # set DC coupling
  ```



  See the hardware manual, for the multi-purpose I/O lines functionality that can be programmed.




  To transfer data to or from the card, we have to setup a data transfer object. This object allocates an amount the memory of the card (`memory_size`) and a Direct Memory Access (DMA) buffer on the host pc (`allocate_buffer`). Half of the samples are taken before the trigger, as configured by the trigger engine, and half of the samples are recorded afterwards. Then the transfer from the card to the host pc is started and the program waits until the DMA is filled.

  ```python

  num_samples = 4 * units.KiS # 1 KiS = 1 KibiSamples = 1024 Samples
  data_transfer = spcm.DataTransfer(card)
  data_transfer.memory_size(num_samples)
  data_transfer.allocate_buffer(num_samples)
  data_transfer.post_trigger(num_samples // 2)

  data_transfer.start_buffer_transfer(spcm.M2CMD_DATA_STARTDMA)


  card.start(spcm.M2CMD_CARD_ENABLETRIGGER, spcm.M2CMD_DATA_WAITDMA)


  ```

  To access the recorded data, the data transfer object holds a [NumPy](https://numpy.org/) array object `data_transfer.buffer` that is directly mapped to the DMA buffer. This buffer can be directly accessed by the different analysis methods available in the NumPy package:

  ```python
  import numpy as np


  minimum = np.min(data_transfer.buffer, axis=1)
  maximum = np.max(data_transfer.buffer, axis=1)
  ```

  This data can be further processed or plotted using, for example, [`matplotlib`](https://matplotlib.org/).



  The setup of the DMA for replay is very similar. First card memory is allocated with `memory_size` and then a DMA buffer is allocated (`allocated_buffer`) and made accessible though the NumPy object `data_transfer.buffer`, which can then be written to using standard NumPy methods. Finally, data transfer from the host PC to the card is started and the programming is waiting until all the data is transferred:
  ```python
  num_samples = 4 * units.KiS # 1 KiS = 1 KibiSamples = 1024 Samples
  data_transfer = spcm.DataTransfer(card)
  data_transfer.memory_size(num_samples)
  data_transfer.allocate_buffer(num_samples)
  data_transfer.loops(0) # loop continuously

  num_samples_magnitude = num_samples.to(units.S).magnitude
  data_transfer.buffer[:] = np.arange(-num_samples_magnitude//2, num_samples_magnitude//2).astype(np.int16)

  data_transfer.start_buffer_transfer(spcm.M2CMD_DATA_STARTDMA, spcm.M2CMD_DATA_WAITDMA)
  ```



  In the above it's assume that all the data has been transferred from the card into the buffer object, however if you're working in FIFO mode or you've defined the buffer to be smaller then the assigned card memory size, then the card will write to parts of the memory and tell you were it wrote.

  This can be either handled manually (see the reference manual of your card, or the methods `avail_card_len()`, `avail_user_pos()` and `avail_user_len()`).

  Secondly, it can also be handled with Python iterators functionality. If the `data_transfer` object is handed to a for-loop, then in each iteration a view of the current active memory part is given in the form of a NumPy array and the user can do calculations on that.

  ```python

  for data_block in data_transfer:
      
      for channel in channels:
          data_units = channel.convert_data(data_block[:, channel])
          minimum = np.min(data_units)
          maximum = np.max(data_units)
          print(f"Minimum: {minimum} - maximum: {maximum}")
  ```

  The same principle also works with generator cards (see the example `2_gen_fifo.py`).



  In case of multiple recording / replay, the memory is divided in equally sized segments, that are populated / replayed when a trigger is detected. Multiple triggers each trigger the next segment to be populated or replayed.

  The following code snippet shows how to setup the buffer for 4 segments with each 128 Samples:

  ```python
  samples_per_segment = 128 * units.S
  num_segments = 4
  multiple_recording = spcm.Multi(card)
  multiple_recording.memory_size(samples_per_segment*num_segments)
  multiple_recording.allocate_buffer(segment_samples=samples_per_segment, num_segments=num_segments)
  multiple_recording.post_trigger(samples_per_segment // 2)
  multiple_recording.start_buffer_transfer(spcm.M2CMD_DATA_STARTDMA)
  ```
  Again there are half the samples before and half the samples after the trigger.



  See the example `6_acq_fifo_multi_ts_poll.py` in the examples folder `1_acquisition` for more information about the usage of timestamps. Moreover, detailed information about timestamps can be found in the corresponding chapter in the specific hardware manual.

  To setup the timestamp buffer:

  ```python
  ts = spcm.TimeStamp(card)
  ts.mode(spcm.SPC_TSMODE_STARTRESET, spcm.SPC_TSCNT_INTERNAL)
  ts.allocate_buffer(num_time_stamps)
  ```

  The user can then use polling to acquire time stamp data from the card.





  For more information about the SCAPP option, please see the detailed information page: https://spectrum-instrumentation.com/products/drivers_examples/scapp_cuda_interface.php.

  Please see the folder `7_cuda_scapp` in the `examples` folder for several dedicated exampes.



  Please see the folder `4_pulse-generator` in the `examples` folder for several dedicated examples. In the following, there is a simple example for setting up a single pulse generator on x0.

  Create a pulse generators object and get the clock rate used by the pulse generator. Use that to calculate the period of a 1 MHz signal and the half of that period we'll have a high signal (hence 50% duty cycle). The pulse generator will start if the trigger condition is met without delay and loops infinitely many times. The triggering condition is set to the card software trigger. See more details in the pulse generator chapter in the specific hardware manual.

  ```python
  pulse_generators = spcm.PulseGenerators(card)


  pulse_generators[0].pulse_period(1 * units.us)

  pulse_generators[0].duty_cycle(50 * units.percent)

  pulse_generators[0].start_delay(0 * units.us)
  pulse_generators[0].repetitions(0) # 0: infinite
  pulse_generators[0].start_condition_state_signal(spcm.SPCM_PULSEGEN_MUX1_SRC_UNUSED)
  pulse_generators[0].start_condition_trigger_signal(spcm.SPCM_PULSEGEN_MUX2_SRC_SOFTWARE)
  pulse_generators[0].invert_start_condition(False)


  pulse_generators.write_setup()


  pulse_generators.force()
  ```

  This will start the pulse generator to continuously output a 1 MHz signal.



  Please see the example `3_gen_sequence.py` in the folder `2_generation` of the examples to see an example dedicated to the Sequence replay mode.



  Please see the examples in the dedicated examples folder `3_dds` for all the functionality provided by the DDS framework. Moreover, please also have a look at the corresponding hardware manual.



  See the corresponding chapter in the hardware manual for more information about boxcar averaging and the registers used.



  See the corresponding chapter in the hardware manual for more information about block averaging and the registers used.



  We would like to thank [Christian Baker](https://github.com/crnbaker) for fruitful discussions and inspiration on how to setup the `spcm` package.


pkgId: 17b84e7e8077cd4a940b59f2636876ea0bb7c96eb0cf415d2a0839ac4e5e6375
name: python-spdx-matcher-help
arch: noarch
version: 0.0.14
epoch: 0
release: 1
summary: Development documents and examples for spdx-matcher
url: https://github.com/MikeMoore63/spdx_matcher
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spdx-matcher-0.0.14-1.src.rpm
location_href: Packages/python-spdx-matcher-help-0.0.14-1.noarch.rpm
checksum_type: sha256
description:
  The spdx_matcher module is a tool to help detect licenses from text files.

  Simple use is

  ```python
  import spdx_matcher

  with open("LICENSE.txt") as myf:
      license_text = f.read()

  licenses_detected, percent = spdx_matcher.analyse_license_text(license_text)

  ```

  The license returned from operator is a simple dictionary of form;

  ```json
  {
    "license": {
      "<spdx license id>": {
        "string":"value"
        ....
      }
    },
    "exceptions": {
      "<spdx exception id>": {
        "string":"value"
        ....
      }
    },
  }
  ```

  Where data is the named attributes in the [spdx template license specification](https://spdx.github.io/spdx-spec/v2.2.2/license-matching-guidelines-and-templates/) for sections named "var" and uses the names as defined in the template.

  The matcher object has a number of other useful functions;

  | Method         | Purpose                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Aruments                                                                                                                                                                                                    | Returns                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  |----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | normalize      | Provides means to take raw text and to make it usefule for matching or hashing purposes. Its main behavior is defined from [spdx matching specification](https://spdx.github.io/spdx-spec/v2.2.2/license-matching-guidelines-and-templates/). At the core it runs through all the basics of normalising i.e.<br/>* lowercse<br/>* change white spaces to single spaces<br/>* normalizes copyright<br/>* normalizes urls<br/>* applies varietal words from spx list<br/>* normalizes quotes to single quote<br/>* normalizes - or dashes<br/>* removes bullets/numbering <br/>In addition via flags you can optionally apply<br/><br/>spdx_matcher.LICENSE_HEADER_REMOVAL if set in remove_sections would remove LICENSE HEADER<br/><br/>spdx_matcher.COPYRIGHT_REMOVAL when this flag is set lines featuring word "copyright" are removed.<br/><br/>spdx_matcher.APPENDIX_ADDENDUM_REMOVAL any text with 'Appendix','Addendum','Exhibit' 'Appendum' is removed. <br/><br/>spdxmatcher.REMOVE_NONE normalises but does not remove any of sections previously.<br/><br/>spdx_matcher.REMOVE_FINGERPRINT = LICENSE_HEADER_REMOVAL &#124; COPYRIGHT_REMOVAL  this is intended to allow rapid hash matching of license texts as it just removes copyright which is unique to who produced license and license header. <br/><br/>To allow license comparison you may want to use these flags in various ways depending on context. Its also worth noting that for license matching none should be removed. The flags can be '&amp;' together to change behavior | license_text - The input text that requires normalizing.<br/> remove_sections - Default spdx_matcher.REMOVE_FINGERPRINT<br/>remove_sections controls the behavior of the normaliser based on what is in the | text normalised ready for comparison.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | analyse_license_text | To parse input text and identify what if any license can be detected in text input.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | license_text = non normalised raw license text                                                                                                                                                              | matches- A dict object that contans scan results<br/>percent - this is a rough calculation of percentage of text that succesful extraction occured from. It is approximate as leading and trailing content exists in may lienses such as how to use the license etc. But this is intended to let you know if a large text if there was some idea of how much was not identified. As a common practice in 3rd party licenses is to bundle many licenses in one file. The ercentage is calculated by total-length - exemplar text length as provided by spdx for each match. Noteif alicense file repeates a license only the first match is ever returned. |

  spdx_matcher is designed to work offline each release contains a cache updated from json from spdx source at https://github.com/spdx/license-list-data/tree/main/json the package includes the script that builds that cache build_spdx_matcher_cache used to build the cache. A copy of cache is bundled and used by default on each release.

  You can override the cache with your locally built cache by setting environment variable SPDX_MATCHER_CACHE_FILE set this to alter where to write and read the cache.

  Note building the cache also runs checking against sample texts to validate matchers work. Note the spdx data is not perfect as demonstrated when you build but its quite good.

  This is currently in early release.

  An example piece of code using the analyser below

  ```python
  import os
  import hashlib
  import json
  import re
  import spdx_matcher
  import time


  import magic
  from functools import lru_cache, cache
  from google.cloud import storage,exceptions
  import logging
  import sys
  import threading

  if not logging.getLogger().hasHandlers():
      logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
  logging.getLogger(__name__).setLevel(logging.INFO)


  LICENSE_RE = r'^.*LICENSE$|^.*LICENSE.*\.(?!(exe|dll|go|c|h|py|pyc|rb|sh|sql|jsonl)$)([^.]+$)'


  def process_license(mime_type):
      """
      Determines if a files mime type should be processed or not
      Notably we avoid all executable files and shared libraries
      """
      retval = True if mime_type not in [
          "application/x-executable",
          "application/x-dosexec",
          "application/x-mach-binary",
          "application/x-sharedlib"] else False

      return retval


  def process_license_file(f, mime_type, match=False):
      
      
      global thread_local_original_content
      output = {}
      if not process_license(mime_type):
          return None,output
      try:
          
          content_clean = []
          original_content = []

          
          if mime_type in ["text/plain","text/x-Algol68"]:
              original_content = f.read()
              content = spdx_matcher.normalize(original_content, spdx_matcher.REMOVE_FINGERPRINT)
          else:
              content = f.read()
              original_content = content

          if not isinstance(content,bytes):
              content = content.encode("utf-8")
          file_hash = hashlib.sha1(content).hexdigest()

          
          thread_local_original_content.content = original_content

          _, output = _store_content(file_hash, "License", mime_type, match)
      except (FileNotFoundError, UnicodeDecodeError) as e:
          return None, output

      return file_hash, output


  thread_local_storage_client = threading.local()
  thread_local_storage_bucket = threading.local()
  storage_blob_lock = threading.Lock()
  popular_object_cache = None





  thread_local_original_content = threading.local()





  @lru_cache(maxsize=1000)
  def _store_content(blob_name, ecosystem, mime_type, match=False):
      global thread_local_storage_client, thread_local_storage_bucket, popular_object_cache, \
          storage_blob_lock, thread_local_original_content
      blob_path_name = f"{ecosystem}/{blob_name}"
      output = {
          "licenses": {},
          "exceptions": {}
      }
      if "LICENSE_CFG_BUCKET" not in os.environ:
          return blob_name, output


      sc = getattr(
          thread_local_storage_client, 'sc', None)
      bucket = getattr(
          thread_local_storage_bucket, 'bucket', None)
      if sc is None:
          sc = storage.client.Client()
          thread_local_storage_client.sc = sc
          bucket = sc.bucket(os.environ["LICENSE_CFG_BUCKET"])
          thread_local_storage_bucket.bucket = bucket

      blob_content = thread_local_original_content.content
      if match:
          output,_ = spdx_matcher.analyse_license_text(blob_content)

      
      if popular_object_cache is None:
          with storage_blob_lock:
              if popular_object_cache is None:
                  popular_object_cache = {}
                  popular_license = storage.Blob(bucket=bucket, name="popular_objects.json")
                  if popular_license.exists(sc):
                      popular_object_cache = json.loads(popular_object_cache.download_as_string())

      
      if blob_name in popular_object_cache:
          return blob_name, output

      
      
      
      
      try:
          blob = storage.Blob(bucket=bucket, name=blob_path_name)
          if blob.exists(sc):
              logging.getLogger(__name__).debug(f"Checked object exists {blob_path_name}")
              return blob_name, output
          
          
          blob.cache_control = "max-age=604800"
          blob.upload_from_string(blob_content, content_type=mime_type)
          logging.getLogger(__name__).info(f"Stored object {blob_path_name}")
      except exceptions.GoogleCloudError:
          logging.getLogger(__name__).exception(f"Unable to store object {blob_path_name}")
      return blob_name, output


  files_processed = 0
  license_files_processed = 0
  licenses_found = {"unknown": 0}
  startTime = time.time()
  license_processing = 0.0
  for root, dirs, files in os.walk('.'):
      for file in files:
          if files_processed and files_processed % 5000 == 0:
              endTime = time.time()
              print(f"Processed {files_processed} {files_processed/(endTime - startTime - license_files_processed)}, licenses_processed {license_files_processed} {license_files_processed/license_processing} licenses_found {licenses_found}")
          files_processed += 1
          if re.match(LICENSE_RE,file, flags=re.IGNORECASE):
              license_files_processed += 1
              startLicenseTime = time.time()
              try:
                  with open(os.path.join(root, file), errors="backslashreplace") as f:
                      magic_result = magic.from_buffer(f.read(2048),mime=True)
                  with open(os.path.join(root, file)) as f:
                      hash, analysis = process_license_file(f, magic_result, match=True)
                  if analysis:
                      if "licenses" in analysis and len(analysis['licenses']) == 0:
                          licenses_found["unknown"] += 1
                      for k in analysis['licenses']:
                          if k in licenses_found:
                              licenses_found[k] += 1
                          else:
                              licenses_found[k] = 1

              except (FileNotFoundError,UnicodeDecodeError) as e:
                  continue
              finally:
                  endLicenseTime = time.time()
                  license_processing += (endLicenseTime - startLicenseTime)

  endTime = time.time()
  print(f"Processed {files_processed} {files_processed/(endTime - startTime - license_files_processed)}, licenses_processed {license_files_processed} {license_files_processed/license_processing} licenses_found {licenses_found}")
  print(f"{_store_content.cache_info()}")
  ```

  This package does contain data from SPDX which is release under the [Creative Commons Attribution 3.0](https://spdx.org/licenses/CC-BY-3.0] Unported) or CC-BY-3.0 license.

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  SPDX Data is licencesed under CC-BY-3.0  Creative Commons Attribution 3.0 Unported  CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.  License  THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.  BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.  1. Definitions a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. 2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, d. to Distribute and Publicly Perform Adaptations. e. For the avoidance of doubt: i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.  4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. b. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv), consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. 5. Representations, Warranties and Disclaimer UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.  6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. Termination a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. 8. Miscellaneous a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. e. This License may not be modified without the mutual written agreement of the Licensor and You. f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. Creative Commons Notice  Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.  Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License.  Creative Commons may be contacted at http://creativecommons.org/.


pkgId: b30816157ed64ffdc0dde300a15598ed807fcf19e911893119a8c246061830c0
name: python-spec-classes-help
arch: noarch
version: 1.5.4
epoch: 0
release: 1
summary: Development documents and examples for spec-classes
url: https://pypi.org/project/spec-classes/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spec-classes-1.5.4-1.src.rpm
location_href: Packages/python-spec-classes-help-1.5.4-1.noarch.rpm
checksum_type: sha256
description:
  <img alt="Spec Classes Logo" src="https://raw.githubusercontent.com/matthewwardrop/spec-classes/main/docsite/docs/assets/images/logo-with-text.png" style="max-width: 500px"/>

  [![PyPI - Version](https://img.shields.io/pypi/v/spec-classes.svg)](https://pypi.org/project/spec-classes/)
  [![Conda Forge - Version](https://img.shields.io/conda/vn/conda-forge/spec-classes.svg)](https://anaconda.org/conda-forge/spec-classes)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/spec-classes.svg)
  ![PyPI - Status](https://img.shields.io/pypi/status/spec-classes.svg)
  [![build](https://img.shields.io/github/actions/workflow/status/matthewwardrop/spec-classes/tests.yml)](https://github.com/matthewwardrop/spec-classes/actions?query=workflow%3A%22Run+Tox+Tests%22)
  [![codecov](https://codecov.io/gh/matthewwardrop/spec-classes/branch/main/graph/badge.svg)](https://codecov.io/gh/matthewwardrop/spec-classes)
  [![Code Style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)


  - **Documentation**: <https://matthewwardrop.github.io/spec-classes>
  - **Source Code**: <https://github.com/matthewwardrop/spec-classes>
  - **Issue tracker**: <https://github.com/matthewwardrop/spec-classes/issues>



  **`spec_classes`** is a stand-alone (but largely interoperable) generalization
  of the standard library's `dataclass` decorator. It adds, among other things:
  type-checking, rich field preparation, and convenient copy-on-write mutation
  wrappers. Spec-class definitions are Pythonic, simple, and concise.

  This library is especially useful in contexts where run-time validation and
  instant feedback is desirable, and/or where correctness is valued over
  performance. With that said, we do try to keep spec-classes performant (see
  [performance details](https://matthewwardrop.github.io/spec-classes/implementation/performance)).



  **It should be hard for users to do the wrong thing.** `spec_classes` is
  designed to help end-users interact with, mutate, and assemble (especially in ad
  hoc contexts like notebooks) potentially large libraries of data classes without
  fear of breaking things. Operations on data classes should be atomic (operations
  should never be partially committed), validated (types should match, etc.), and
  provide instant helpful feedback when the user makes a mistake.

  **We don't own your class.** `spec_classes` **never** overrides local
  pre-existing methods, and doesn't add any metaclasses or parents. If you
  decorate a class with `@spec_class`, spec classes will add (if you have not
  already) some dunder magic methods (like `__init__`,`__setattr__`, etc.), and
  some helper methods... but that's it. Spec classes are, at the end of the day,
  just regular classes pre-loaded with useful methods that you didn't have to
  write yourself.

  **Copy-on-write by default.** One of the dangers with using class instances as
  specification is that if they are mutated in one context, they are mutated for
  all contexts. Spec classes does not prevent (by default) local mutations of
  class instances (you can still do `my_spec.foo = 'bar'`); but all helper methods
  return a mutated copy by default. For example, `my_spec.with_foo('bar')` will
  not be the same instance as `my_spec`, and so these methods are always safe to
  use.

  **Be consistent.** All helper methods added by `spec_classes` exist within well
  defined namespaces; that is: `with_<attr>`, `transform_<attr>`, etc.; and each
  class of methods has the same naming conventions for arguments and provides
  complete inline documentation. This makes it easy for users to figure out how to
  use the methods, to override these methods and/or to add new methods that do not
  collide.

  **Minimize Surprise.** The behavior of spec classes almost always matches that
  of base Python classes where functionality overlaps, and should always be
  intuitive otherwise (e.g. when type-checking is violated).

  **Performance is important.** Although performance is not the primary goal of
  `spec_classes`, given the targeted feature-set, the overhead introduced should
  be as small as possible.



  ```python
  from spec_classes import spec_class

  @spec_class
  class Rectangle:
      width: float
      height: float
      color: str

      @property
      def area(self):
          return self.width * self.height

  rect = Rectangle()
  rect  # Rectangle(width=MISSING, height=MISSING, color=MISSING)
  rect.update(width=10., height=12.).with_color("red")  # Rectangle(width=10.0, height=12.0, color='red')

  Rectangle(width=10., height=10.).area  # 100.0

  rect.with_width('invalid')  # TypeError: Attempt to set `Rectangle.width` with an invalid type [got `'invalid'`; expecting `float`].
  ```

  For more details on usage, refer to the [documentation](https://matthewwardrop.github.io/spec-classes).



  Spec classes can be installed via `pip` or `conda`.

  To install via `pip` you can use:

  ```shell
  pip install spec-classes
  ```

  To install via `conda` you can use:

  ```shell
  conda install spec-classes
  ```

  You can verify that the installation was successful by printing the version of
  `spec-classes` that was installed:

  ```shell
  python -c "import spec_classes; print(spec_classes.__version__)"
  ```



  `spec_classes` takes a more opinionated stance than most libraries in this space
  on exactly how data-classes should be built and mutated. Nevertheless, there are
  excellent pre-existing alternatives to spec-classes for those looking for
  something lighter-weight. In particular, you could consider:

  - [typeguard](https://github.com/agronholm/typeguard): A utility library for
      run-time type-checking functions, methods and classes.
  - [pytypes](https://github.com/Stewori/pytypes): Another utility library for
      run-time type-checking functions, methods and classes.
  - [pydantic](https://github.com/samuelcolvin/pydantic/): A light-weight data
      parsing and validation library that also uses type hints.
  - [attrs](https://github.com/python-attrs/attrs): A library that provides a
      super-set of the functionality of Python's data-class, but still adds no
      run-time overhead (no type-checking, extra helper-methods, etc).

  There are many other libraries in the business of mapping and validating
  transformations from JSON to Python classes, but these are somewhat orthogonal
  to the aims of this project (which is to make Python classes themselves pleasant
  to use), and so they are not included here.


pkgId: 03a001553dff88a4372c865d1c0ade2dd1a277010d1ad1bc02bc1355330a0f24
name: python-specnn4pde-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for specnn4pde
url: https://github.com/mxweng/specnn4pde
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-specnn4pde-0.1.1-1.src.rpm
location_href: Packages/python-specnn4pde-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  SpecNN4PDE is an under development Python library for solving partial differential equations using spectral methods and neural networks. It consists of the following modules:

  - `spectral`: Provides functions for working with spectral methods as described in the book [Spectral Methods: Algorithms, Analysis and Applications](https://link.springer.com/book/10.1007/978-3-540-71041-7) by Shen, Tang, and Wang.
  - `linalg`: This module primarily focuses on numerical algebra methods.
  - `myplot`: This module customizes Matplotlib plots by setting titles, labels, axes, grid lines, ticks, and legends. It allows detailed adjustments to the plot's style and layout.
  - `utils`: A collection of utility functions for system and package information retrieval, time measurement, etc.
  <!-- -  -->
  - `nn`: Contains classes for building neural networks, including [random feature method (RFM)](https://global-sci.org/intro/article_detail/jml/21029.html) neural networks, etc.
  - `sav`: The [Scalar auxiliary variable (SAV)](https://www.sciencedirect.com/science/article/pii/S002199911730774X) optimizer and its variants.
  - `npde`: Functions for solving partial differential equations, e.g., calculating the multivariate derivatives.


  This project is still in the early stages of development, and the API is subject to change. The library is designed to be used in research and educational settings.



  When you install this library using pip, most dependencies will be automatically handled. However, please note that the `nn`, `sav`, and `npde` module requires PyTorch, which needs to be installed separately.

  You can install PyTorch by following the instructions on the [official PyTorch website](https://pytorch.org/get-started/locally/). Please ensure that you select the correct installation command based on your operating system, package manager, Python version, and the specifications of your CUDA toolkit if you are planning to use PyTorch with GPU support.

  If you are not planning to use the `nn`, `sav`, and `npde` module, you do not need to install PyTorch.



  To install this library, you can use pip:

  ```bash
  pip install specnn4pde
  ```

  To upgrade to the latest version, you can use:

  ```bash
  pip install --upgrade specnn4pde
  ```


pkgId: 1ece9556c62904f0365fc180b67bba90516c368c7be66b70f1bf92274eb5f7f6
name: python-specsanalyzer-help
arch: noarch
version: 0.4.1
epoch: 0
release: 1
summary: Development documents and examples for specsanalyzer
url: https://github.com/mpes-kit/specsanalyzer
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-specsanalyzer-0.4.1-1.src.rpm
location_href: Packages/python-specsanalyzer-help-0.4.1-1.noarch.rpm
checksum_type: sha256
description:
  [![Documentation Status](https://github.com/OpenCOMPES/specsanalyzer/actions/workflows/documentation.yml/badge.svg)](https://opencompes.github.io/specsanalyzer/)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  ![](https://github.com/OpenCOMPES/specsanalyzer/actions/workflows/linting.yml/badge.svg)
  ![](https://github.com/OpenCOMPES/specsanalyzer/actions/workflows/testing_multiversion.yml/badge.svg?branch=main)
  ![](https://img.shields.io/pypi/pyversions/specsanalyzer)
  ![](https://img.shields.io/pypi/l/specsanalyzer)
  [![](https://img.shields.io/pypi/v/specsanalyzer)](https://pypi.org/project/specsanalyzer)
  [![Coverage Status](https://coveralls.io/repos/github/OpenCOMPES/specsanalyzer/badge.svg?branch=main&kill_cache=1)](https://coveralls.io/github/OpenCOMPES/specsanalyzer?branch=main)


  This is the package `specsanalyzer` for conversion and handling of SPECS Phoibos analyzer data.

  This package contains two modules:
  `specsanalyzer` is a package to import and convert MCP analyzer images from SPECS Phoibos analyzers into energy and emission angle/physical coordinates.
  `specsscan` is a Python package for loading Specs Phoibos scans acquired with the labview software developed at FHI/EPFL

  Tutorials for usage and the API documentation can be found in the [Documentation](https://opencompes.github.io/specsanalyzer/)





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

  ```bash
  python -m venv .specs-venv
  ```

  - Activate your environment:

  ```bash
  source .specs-venv/bin/activate
  ```

  - Install `specsanalyzer` from PyPI:

  ```bash
  pip install specsanalyzer
  ```

  - This should install all the requirements to run `specsanalyzer` and `specsscan`in your environment.

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

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


  The conversion procedures require to set up several configuration parameters in a config file. An example config file is provided as part of the package (see documentation). Configuration files can either be passed to the class constructors, or are read from system-wide or user-defined locations (see documentation).

  Most importantly, conversion of analyzer data to energy/angular coordinates requires detector calibration data provided by the manufacturer. The corresponding *.calib2d file (e.g. phoibos150.calib2d) are provided together with the spectrometer software, and need to be set in the config file.



  To contribute to the development of `specsanalyzer`, you can follow these steps:

  1. Clone the repository:

  ```bash
  git clone https://github.com/OpenCOMPES/specsanalyzer.git
  cd specsanalyzer
  ```

  2. Check out test data (optional, requires access rights):

  ```bash
  git submodule sync --recursive
  git submodule update --init --recursive
  ```

  2. Install the repository in editable mode:

  ```bash
  pip install -e .
  ```

  Now you have the development version of `specsanalyzer` installed in your local environment. Feel free to make changes and submit pull requests.



  - Prerequisites:
    + Poetry: https://python-poetry.org/docs/

  - Create a virtual environment by typing:

  ```bash
  poetry shell
  ```

  - A new shell will be spawned with the new environment activated.

  - Install the dependencies from the `pyproject.toml` by typing:

  ```bash
  poetry install --with dev, docs
  ```

  - If you wish to use the virtual environment created by Poetry to work in a Jupyter notebook, you first need to install the optional notebook dependencies and then create a Jupyter kernel for that.

    + Install the optional dependencies `ipykernel` and `jupyter`:

    ```bash
    poetry install -E notebook
    ```

    + Make sure to run the command below within your virtual environment (`poetry run` ensures this) by typing:

    ```bash
    poetry run ipython kernel install --user --name=specs_poetry
    ```

    + The new kernel will now be available in your Jupyter kernels list.


pkgId: be9a3c79363325d755e04aec5cbafc851fbea0f2620a1cddc316e232b2fc77ff
name: python-spectoconvo-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for spectoconvo
url: https://github.com/Mitchell-Gerrard/spectoconvo
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spectoconvo-0.1.0-1.src.rpm
location_href: Packages/python-spectoconvo-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  Spectoconvo is a Python package to embed messages into spectrograms.



  You can install the package using pip:

  ```sh
  pip install spectoconvo
  ```



  Here's an example of how to encode a message using `spectoconvo` package:

  ```python
  from spectoconvo import add_message_to_spectrogram

  sound_file = 'audio.wav'

  message = 'Hello, Spectrogram!'

  output_file = 'output_spectrogram.png'

  output_sound_file = 'output_with_message.wav'

  output_spectrogram_file = 'output_with_message_spectrogram.png'

  changes_spectrogram_file = 'changes_spectrogram.png'

  image_path = 'output_image.png'

  add_message_to_spectrogram(sound_file, message, output_file, output_sound_file, output_spectrogram_file, changes_spectrogram_file, image_path)
  ```
  Here's an example of how to decode a message using `spectoconvo` package:
  ```python
  from spectoconvo import add_message_to_spectrogram


  sound_file_to_decode = 'output_with_message.wav'


  image_path = 'output_image_decode.png'

  decode( sound_file_to_decode, image_path)

  ```


pkgId: 60dabbc4e41267c98f15f75310710cb47ce6b5fe906453acc6855bd59a16e1c8
name: python-spectrum-basic-help
arch: noarch
version: 0.4.1
epoch: 0
release: 1
summary: Development documents and examples for spectrum-basic
url: https://github.com/imneme/spectrum-basic
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spectrum-basic-0.4.1-1.src.rpm
location_href: Packages/python-spectrum-basic-help-0.4.1-1.noarch.rpm
checksum_type: sha256
description:
  A Python toolkit for parsing, transforming, and manipulating ZX Spectrum BASIC programs. This tool can help you work with both classic Spectrum BASIC and an enhanced dialect that supports modern programming constructs.



  - Full parser for ZX Spectrum BASIC
  - Support for an enhanced dialect with:
      - Optional line numbers
      - Labels (e.g., `@loop:`)
      - Label references in expressions and GOTOs
  - Program transformations:
      - Line numbering and renumbering
      - Variable name minimization
      - Label elimination (for Spectrum compatibility)
  - Detailed variable analysis
  - Pretty printing with authentic Spectrum BASIC formatting
  - TAP file generation for loading programs on a real Spectrum
  - Run a subset of BASIC programs locally for algorithm testing



  For developer mode, clone the repository and install the package in editable mode:

  ```bash
  git clone https://github.com/imneme/spectrum-basic.git
  cd spectrum-basic
  pip install -e .
  ```

  Install from PyPI:

  ```bash
  pip install speccy-basic
  ```


  Requires Python 3.10 or later.





  The package installs a command-line tool called `speccy-basic`:

  ```bash

  speccy-basic program.bas --show


  speccy-basic program.bas --delabel


  speccy-basic program.bas --minimize


  speccy-basic program.bas --delabel --minimize


  speccy-basic program.bas --find-vars


  speccy-basic program.bas --tap output.tap --tap-name "My Program"


  speccy-basic program.bas --run
  ```



  ```python
  from spectrum_basic import parse_file, number_lines, minimize_variables, make_program_tap, write_tap


  program = parse_file("my_program.bas")


  number_lines(program, remove_labels=True)
  minimize_variables(program)


  str(program)


  binary_code = bytes(program)
  tap = make_program_tap(binary_code, name="My Program", autostart=9000)
  write_tap(tap, "output.tap")
  ```



  The tool supports an enhanced dialect of BASIC that's compatible with ZX Spectrum BASIC. Additional features include:


  ```basic
  @loop:
  FOR I = 1 TO 10
      PRINT I
  NEXT I
  GOTO @loop
  ```

  Label names are written `@identifier`. Lines are labeled by putting the label at the start of the line, followed by a colon. They can be used anywhere where you would write a line number, including:

  - `GOTO`/`GOSUB` statements
  - Arithmetic expressions (e.g., `(@end - @start)/10`)




  If you want to analyze or transform BASIC programs, you'll need to work with the Abstract Syntax Tree (AST) that represents the program's structure. Import the AST nodes from the ast module:

  ```python
  from spectrum_basic.ast import Variable, Number, Label, BuiltIn
  ```

  The AST nodes have attributes that correspond to the fields of the original BASIC code. For example:

  ```text
  >>> from spectrum_basic import *
  >>> prog = parse_string('10 PRINT "Hello World!";')
  >>> len(prog.lines)
  1
  >>> (stmt := prog.lines[0].statements[0])
  PRINT "Hello World!";
  >>> (arg := stmt.args[0])
  "Hello World!";
  >>> arg.value
  "Hello World!"
  >>> arg.sep
  ';'
  ```

  However, for many applications where you want to traverse syntax tree, you may prefer to use the AST walking API described below.



  The AST can be traversed using the `walk()` generator, which yields tuples of `(event, node)`. Events are:

  ```python
  class Walk(Enum):
      ENTERING = auto()  # Entering a compound node
      VISITING = auto()  # At a leaf node or simple value
      LEAVING  = auto()  # Leaving a compound node
  ```

  Example usage:

  ```python
  def find_variables(program):
      """Find all variables in a program"""
      variables = set()
      for event, obj in walk(program):
          if event == Walk.VISITING and isinstance(obj, Variable):
              variables.add(obj.name)
      return sorted(variables)
  ```

  You can control traversal by sending `Walk.SKIP` back to the generator to skip processing a node's children. You can also just abandon the generator at any time.



  Common patterns for matching AST nodes:

  ```python

  Variable(name=str)          # Variable reference (e.g., "A" or "A$")
  Number(value=int|float)     # Numeric literal
  Label(name=str)             # Label reference (e.g., "@loop")


  BuiltIn(action=str,         # Command name (e.g., "PRINT", "GOTO")
          args=tuple)         # Command arguments



  Let(var=Variable|ArrayRef,  # Assignment statement
      expr=Expression)        # Expression to assign


  Program(lines=list)         # Complete program
  SourceLine(                 # Single line of code
      line_number=int|None,
      label=Label|None,
      statements=list)
  ```

  Example pattern matching:

  ```python
  match obj:
      case BuiltIn(action="GOTO", args=[target]) if isinstance(target, Number):
          
          line_num = target.value
          ...
      case Variable(name=name) if name.endswith("$"):
          
          ...
  ```



  MIT License. Copyright (c) 2024 Melissa O'Neill



  - Python 3.10 or later
  - TextX parsing library


pkgId: 5eed9edd3cdcef2de4450268a2346cd2945c5279f50d7187ff40c68ad3dfc809
name: python-spectrum.py-help
arch: noarch
version: 0.0.8
epoch: 0
release: 1
summary: Development documents and examples for spectrum.py
url: http://github.com/henry232323/spectrum.py
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spectrum.py-0.0.8-1.src.rpm
location_href: Packages/python-spectrum.py-help-0.0.8-1.noarch.rpm
checksum_type: sha256
description:
  spectrum.py is a [discord.py](https://github.com/Rapptz/discord.py) style proof-of-concept library for making chatbots
  for Star Citizen's [Spectrum](https://robertsspaceindustries.com/spectrum/community/SC) chat client. It also offers HTTP clients for interacting
  with both Spectrum's REST API and the Community Hub's GraphQL API.


  ```shell

  python -m pip install spectrum.py

  python -m pip install git+https://github.com/henry232323/spectrum.py
  ```



  ```python
  import asyncio
  from spectrum import Client, Message

  class MyClient(Client):
      async def on_message(self, message: Message):
          print(message)

      async def on_ready(self):
          print("We're ready!")


  async def run():
      myclient = MyClient(
          rsi_token=...,
          device_id=...,
      )

      asyncio.ensure_future(myclient.run())
      await asyncio.Event().wait()


  asyncio.run(run())
  ```



  ```python
  import asyncio
  from spectrum import HTTPClient

  async def run():
      client = HTTPClient(
          rsi_token=...,
          device_id=...,
      )

      await client.identify()
      member = await client.fetch_member_by_handle("Khuzdul")
      print(member)

      await client.close()

  asyncio.run(run())
  ```


  ```python
  import asyncio
  from spectrum import CommunityHubClient

  async def run():
      client = CommunityHubClient()
      print(await client.fetch_user_profile("Khuzdul"))

  asyncio.run(run())
  ```


  The bot can be run in a read only state without any authentication.
  If you want to be able to send messages or read private messages (and eventually do other things),
  you'll need to provide credentials for an RSI account. These can be found in the cookies sent
  with any request to [RSI](https://robertsspaceindustries.com/) when logged in.

rpm_license:
  The MIT License (MIT)  Copyright (c) 2023-present henry232323  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: 42620d54c8f952c4cdc8f8d079274a2c886683e78153f0f499c9033bdfb3863f
name: python-speedy-openai-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for speedy-openai
url: https://github.com/lucafirefox/speedy-openai
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-speedy-openai-0.2.0-1.src.rpm
location_href: Packages/python-speedy-openai-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/speedy-openai.svg)](https://badge.fury.io/py/speedy-openai)
  [![Python](https://img.shields.io/pypi/pyversions/speedy-openai.svg)](https://pypi.org/project/speedy-openai/)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)


  A high-performance, asynchronous Python client for the OpenAI API with built-in rate limiting and concurrency control.



  - ⚡ Asynchronous request handling for optimal performance
  - 🔄 Built-in rate limiting for both requests and tokens
  - 🎛️ Configurable concurrency control
  - 🔁 Automatic retry mechanism with backoff
  - 📊 Progress tracking for batch requests
  - 🎯 Token counting and management
  - 📝 Comprehensive logging



  ```bash
  pip install speedy-openai
  ```



  ```python
  import asyncio
  from speedy_openai import OpenAIClient

  async def main():
      
      client = OpenAIClient(
          api_key="your-api-key",
          max_requests_per_min=5000,  # Optional: default 5000
          max_tokens_per_min=15000000,  # Optional: default 15M
          max_concurrent_requests=250  # Optional: default 250
      )

      
      request = {
          "custom_id": "req1",
          "method": "POST",
          "url": "/v1/chat/completions",
          "body": {
              "model": "gpt-3.5-turbo",
              "messages": [{"role": "user", "content": "Hello!"}]
          }
      }

      response = await client.process_request(request)

      
      requests = [request, request]  # List of requests
      responses = await client.process_batch(requests)

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



  | Parameter | Default | Description |
  |-----------|---------|-------------|
  | `api_key` | Required | Your OpenAI API key |
  | `max_requests_per_min` | 5000 | Maximum API requests per minute |
  | `max_tokens_per_min` | 15000000 | Maximum tokens per minute |
  | `max_concurrent_requests` | 250 | Maximum concurrent requests |
  | `max_retries` | 5 | Maximum retry attempts |
  | `max_sleep_time` | 60 | Maximum sleep time between retries (seconds) |





  The client includes a sophisticated rate limiter that manages both request frequency and token usage:
  - Automatically tracks remaining requests and tokens
  - Updates limits from API response headers
  - Implements waiting periods when limits are reached
  - Supports dynamic limit adjustments



  - Manages concurrent requests using asyncio semaphores
  - Prevents overwhelming the API with too many simultaneous requests
  - Configurable maximum concurrent requests



  Built-in retry logic for handling common API errors:
  - Automatic retries with fixed wait times
  - Configurable maximum retry attempts
  - Specific exception handling for API-related errors



  Batch requests include:
  - Progress bar visualization using tqdm
  - Processing time logging
  - Detailed success/failure reporting



  The client includes comprehensive error handling:
  - API response validation
  - Rate limit handling
  - Network error recovery
  - Invalid request detection



  - Python 3.7+
  - aiohttp
  - tiktoken
  - tenacity
  - tqdm
  - loguru
  - pydantic





  ```python
  import asyncio
  from speedy_openai import OpenAIClient

  async def chat_with_gpt4():
      client = OpenAIClient(api_key="your-api-key")

      request = {
          "custom_id": "chat-1",
          "method": "POST",
          "url": "/v1/chat/completions",
          "body": {
              "model": "gpt-4",
              "messages": [
                  {"role": "system", "content": "You are a helpful assistant."},
                  {"role": "user", "content": "Explain quantum computing in simple terms."}
              ],
              "temperature": 0.7
          }
      }

      response = await client.process_request(request)
      print(response["response"]["choices"][0]["message"]["content"])

  asyncio.run(chat_with_gpt4())
  ```



  ```python
  async def process_multiple_conversations():
      client = OpenAIClient(api_key="your-api-key")

      conversations = [
          {"role": "user", "content": "What is AI?"},
          {"role": "user", "content": "Explain machine learning."},
          {"role": "user", "content": "What is deep learning?"}
      ]

      requests = [
          {
              "custom_id": f"batch-{i}",
              "method": "POST",
              "url": "/v1/chat/completions",
              "body": {
                  "model": "gpt-3.5-turbo",
                  "messages": [conv],
                  "temperature": 0.7
              }
          }
          for i, conv in enumerate(conversations)
      ]

      responses = await client.process_batch(requests)
      return responses
  ```



  The project uses pytest for testing. To run the tests:

  1. Clone the repository:
  ```bash
  git clone https://github.com/yourusername/speedy-openai.git
  cd speedy-openai
  ```

  2. Install development dependencies:
  ```bash
  poetry install
  ```

  3. Run tests:
  ```bash
  poetry run pytest
  ```



  The test suite includes:

  - Unit tests for core functionality
  - Integration tests for API interactions
  - Rate limiting tests
  - Concurrency tests
  - Error handling tests



  Run specific test categories:
  ```bash

  poetry run pytest tests/test_rate_limiter.py


  poetry run pytest tests/test_client.py


  poetry run pytest -v


  poetry run pytest --cov=speedy_openai
  ```



  When contributing new features, please ensure:
  - All new features have corresponding tests
  - Test coverage remains above 80%
  - Tests are properly documented
  - Both success and failure cases are covered



  This project is licensed under the MIT License - see the LICENSE file for details.



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



  For issues, questions, or contributions, please create an issue in the GitHub repository.


pkgId: 281b9ca4ef045c9e961d638cba35596ae277a7b302ddc5f7729db5ff0ce879db
name: python-sphinx-each-pdf-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for sphinx-each-pdf
url: https://github.com/NeleGALL/each-pdf
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sphinx-each-pdf-1.0.1-1.src.rpm
location_href: Packages/python-sphinx-each-pdf-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  1. Ensure you have Python 3.8 or newer installed.
  2. Install the package from PyPI:
     ```bash
     pip install sphinx-each-pdf
     ```
  3. Install Chromium for Playwright (or any other supported engine, like Firefox or WebKit, based on your preference):
     ```bash
     playwright install chromium
     ```
     *You may replace `chromium` with `firefox` or `webkit` if desired.*
  4. (Recommended) Install system dependencies for Chromium to ensure smooth operation:
     ```bash
     playwright install-deps chromium


pkgId: 5e047115a736839d5b7abcee0ac5a125720888cd02f202cb6c669b4afd55b4af
name: python-sphinx-helm-help
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: Development documents and examples for sphinx-helm
url: https://pypi.org/project/sphinx-helm/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sphinx-helm-0.2.1-1.src.rpm
location_href: Packages/python-sphinx-helm-help-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/sphinx-helm)](https://pypi.org/project/sphinx-helm/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm)](https://pypi.org/project/sphinx-helm/)
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml)](https://github.com/kr8s-org/sphinx-helm/actions/workflows/test.yaml)
  [![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm)](https://sphinx-helm.readthedocs.io/en/latest/)
  [![PyPI - License](https://img.shields.io/pypi/l/sphinx-helm)](https://pypi.org/project/sphinx-helm/)
  [![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver)

  sphinx-helm is a Sphinx plugin for automatically generating documentation for your [Helm charts](https://helm.sh/).


  Features:

  - Render documentation from your `Chart.yaml` and `values.yaml` files.
  - Sphinx extension for including in Python documentation.
  - Works with `.rst` and `.md` documentation source files.



  ```
  $ pip install sphinx-helm
  ```



  Add the extension to your Sphinx config.

  ```python


  extensions = ['sphinx_helm.ext']
  ```

  Use the directive to generate documentation for your helm chart.



  ```rst
  .. helm:: path/to/your/helm/chart
  ```



  ````markdown

  ```{helm} path/to/your/helm/chart

  ```

  ````


pkgId: 1b5721588324e90e88230cc9bd3f2f9e10cb20271022fdfac1cc3fe5e5a56478
name: python-sphinx-launch-buttons-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for sphinx-launch-buttons
url: https://pypi.org/project/sphinx-launch-buttons/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sphinx-launch-buttons-1.0.1-1.src.rpm
location_href: Packages/python-sphinx-launch-buttons-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  First version of custom launch buttons for jupyter-book (https://jupyterbook.org/en/stable/interactive/launchbuttons.html). Install using

  ```
  pip install git+https://github.com/TeachBooks/Sphinx-launch-buttons.git
  ```

  to use in a jupyter-book, first include the extension in the _config.yml file
  ```
  sphinx:
    extra_extensions:
      - custom-launch-buttons
  ```
  then include a _launch_buttons.yml file along the _config.yml file. Buttons can be defined as follows:

  ```
  buttons:
    - type: dropdown
      icon: <svg> </svg>
      items:
        - label: item 1
          url: https://linkone.com
        - label: item 2
          url: https://linktwo.com
    - type: dropdown
      label: languages
      items:
        - label: Dutch
          url: https://www.dutch.com
        - label: English
          url: https://www.english.com
        - label: French
          url: https://www.french.com
  ```
  where buttons is an array of launch buttons, each which can be identified using 'dropdown' or 'button'.

  ```
  buttons:
    - type : dropdown

    - type : button
  ```

  The button/dropdown can be visualised using either an svg icon (https://icons.getbootstrap.com/#icons) or text.

  ```
  buttons:
    - type : dropdown
      label: Language
    - type : button
      label : <svg></svg>
  ```

  Test icons using
  ```
    icon: <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-translate" viewBox="0 0 16 16">
              <path d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286zm1.634-.736L5.5 3.956h-.049l-.679 2.022z"/>
              <path d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm7.138 9.995q.289.451.63.846c-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6 6 0 0 1-.415-.492 2 2 0 0 1-.94.31"/>
            </svg>
  ```
  Then the same story goes for each of the items in the dropdown menu.


pkgId: ec7d50133d7e1c0212c08308ecfdff3e2712054d05f5fbb0527575925763fa28
name: python-sphinx-pandera-help
arch: noarch
version: 0.0.3
epoch: 0
release: 1
summary: Development documents and examples for sphinx-pandera
url: https://gitlab.has-sante.fr/has-sante/public/alpha/sphinx-pandera
rpm_license: EUPL-v1.2
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sphinx-pandera-0.0.3-1.src.rpm
location_href: Packages/python-sphinx-pandera-help-0.0.3-1.noarch.rpm
checksum_type: sha256
description:
  This packages bridges pandera models with sphinx to generate documentation for your pandera models.
  It is based on a similar project for pydantic [autodoc_pydantic](https://github.com/mansenfranzen/autodoc_pydantic).

  Our vision is to have one place where you :
   1. describe
   2. validate
   3. document your data

  Pandera already does step 1 and 2.
  Sphinx-pandera fills the documentation gap.
  This way, your pandera model is the single source of truth for your data.




  - **Documentation**: [https://has-sante.pages.has-sante.fr/public/alpha/sphinx-pandera](https://has-sante.pages.has-sante.fr/public/alpha/sphinx-pandera)

  - **Example**: [https://has-sante.pages.has-sante.fr/public/alpha/sphinx-pandera/examples/basic.html](https://has-sante.pages.has-sante.fr/public/alpha/sphinx-pandera/examples/basic.html)

  - **Source code**: [https://gitlab.has-sante.fr/has-sante/public/alpha/sphinx-pandera](https://gitlab.has-sante.fr/has-sante/public/alpha/sphinx-pandera)



  This project is in alpha state, we welcome feature requests and contributions.

  There might be some delays when answering issues and merge requests.

  It has been initiated by the Mission data at the French National Authority for Health.


pkgId: bd635997add8692e460b9e2810431dd8814216991aa3fb7efc6bb458cced155c
name: python-sphinx-social-cards-help
arch: noarch
version: 0.4.0
epoch: 0
release: 1
summary: Development documents and examples for sphinx-social-cards
url: https://pypi.org/project/sphinx-social-cards/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sphinx-social-cards-0.4.0-1.src.rpm
location_href: Packages/python-sphinx-social-cards-help-0.4.0-1.noarch.rpm
checksum_type: sha256
description:
  A Sphinx extension that generates social media cards.
  See documentation hosted at https://2bndy5.github.io/sphinx-social-cards


pkgId: 08c70bccbb4c4a18ef88fea6a1f2266946f56466aad802031dc9747078e33a20
name: python-sphinx-tudelft-theme-help
arch: noarch
version: 0.1.7
epoch: 0
release: 1
summary: Development documents and examples for sphinx-tudelft-theme
url: https://pypi.org/project/sphinx-tudelft-theme/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sphinx-tudelft-theme-0.1.7-1.src.rpm
location_href: Packages/python-sphinx-tudelft-theme-help-0.1.7-1.noarch.rpm
checksum_type: sha256
description:
  The default theme in JupyterBooks is usually not desired and need to be changed by adding custom stylesheets. The **Sphinx-TUDelft-theme** extension provides a simple solution to have a uniform theme across all the books created at Delft University of Technology that matches the TU Delft identity.



  This extension applies styling changes, e.g. using specific fonts, and adding particular colours for admonitions. You can see how the TU Delft theme looks like applied in this [example book](http://teachbooks.io/TU-Delft-Theme-Example/).

  Unless specified otherwise, see [Usage](#usage), this extension also automatically sets:

  - a Delft University of Technology logo;
  - a Delft University of Technology favicon;
  - the Delft University of Technology preferred fonts;
  - rendering text inside MathJax as the surrounding text;
  - an always visible logo (i.e. a sticky logo).


  To implement the TU Delft theme, follow these steps:

  **Step 1: Install the Package**

  Install the `sphinx-tudelft-theme` package using `pip`:
  ```
  pip install sphinx-tudelft-theme
  ```

  **Step 2: Add to `requirements.txt`**

  Make sure that the package is included in your project's `requirements.txt` to track the dependency:
  ```
  sphinx-tudelft-theme
  ```

  **Step 3: Enable in `_config.yml`**

  In your `_config.yml` file, add the extension to the list of Sphinx extra extensions (**important**: underscore, not dash this time):
  ```
  sphinx:
      extra_extensions:
          - sphinx_tudelft_theme
  ```



  By following the steps above, the theme will be applied automatically. To see the examples of usage visit the [TeachBooks manual](https://teachbooks.io/manual/intro.html).

  If a Delft University of Technology logo should not be set (i.e. use logos defined by the user), include the following in your `_config.yml` file:
  ```
  sphinx:
    config:
      ...
      tud_change_logo: false
  ```

  If a Delft University of Technology favicon should not be set (i.e. use a favicon defined by the user), include the following in your `_config.yml` file:
  ```
  sphinx:
    config:
      ...
      tud_change_favicon: false
  ```

  If the Delft University of Technology fonts should not be set (i.e. use fonts defined by the user), include the following in your `_config.yml` file:
  ```
  sphinx:
    config:
      ...
      tud_change_fonts: false
  ```

  If rendering text inside MathJax should not be the same as the surrounding html, include the following in your `_config.yml` file:
  ```
  sphinx:
    config:
      ...
      tud_change_mtext: false
  ```

  If a sticky logo is not preferred, include the following in your `_config.yml` file:
  ```
  sphinx:
    config:
      ...
      tud_sticky_logo: false
  ```



  This tool's repository is stored on [GitHub](https://github.com/TeachBooks/Sphinx-TUDelft-theme). The `README.md` of the branch `Manual` is also part of the [TeachBooks manual](https://teachbooks.io/manual/intro.html) as a submodule. If you'd like to contribute, you can create a fork and open a pull request on the [GitHub repository](https://github.com/TeachBooks/Sphinx-TUDelft-theme). To update the `README.md` shown in the TeachBooks manual, create a fork and open a merge request for the [GitHub repository of the manual](https://github.com/TeachBooks/manual). If you intent to clone the manual including its submodules, clone using: `git clone --recurse-submodulesgit@github.com:TeachBooks/manual.git`.

rpm_license:
  MIT License  Copyright (c) 2024 Jakub Fręchowicz  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: ddcf66fd2121f26fe0fb9ae6fbab26fb220115532ad2c98f3a4bc6da520cdf43
name: python-spin-stepper-help
arch: noarch
version: 0.0.6
epoch: 0
release: 1
summary: Development documents and examples for spin-stepper
url: https://github.com/luxbright-com/spin_stepper
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spin-stepper-0.0.6-1.src.rpm
location_href: Packages/python-spin-stepper-help-0.0.6-1.noarch.rpm
checksum_type: sha256
description:
  A Python interface for the STSPIN stepper motor drivers from STMicroelectronics (ST).

  The STSPIN family of stepper motor drives has a lot of really nice built-in functions
  that You normally must implement in Python.
  Position counter
  Advanced commands such as go_to, go_home


  This library has been developed and tested using the L6470HTR circuit connected via SPI to
  a Raspberry Pi 4 with Raspbian Bookworm.
  This will probably work with most circuits in this family, but scaling of some values might need adjustment.

  Documentation on the L6470 circuit can be downloaded here: https://www.st.com/en/motor-drivers/l6470.html
  SparkFun has developed a really nice board ned AutoDriver for playing with this circuit,
  but this product is now retired. https://github.com/sparkfun/L6470-AutoDriver
  ST has an evaluation board called EVAL6470H https://www.st.com/en/evaluation-tools/eval6470h.html

  This is a fork from the st-spin package https://github.com/m-laniakea/st_spin by eir.
  But it has been re-worked from the ground up to be more pythonic and to handle most of the commands.

  Our purpose with this library was to solve our internal needs.
  We use this for internally developed lab and production equipment.
  We have no affiliation with STMicroelectronics.


pkgId: ad597b04f91d34f0bb497eb9772e2ecc51a787410da5d483efeca82537fd0fb0
name: python-spinta-help
arch: noarch
version: 0.1.81
epoch: 0
release: 1
summary: Development documents and examples for spinta
url: https://gitlab.com/atviriduomenys/spinta
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spinta-0.1.81-1.src.rpm
location_href: Packages/python-spinta-help-0.1.81-1.noarch.rpm
checksum_type: sha256
description:
  - **Describe your data**: You can automatically generate data structure
    description table (*Manifest*) from many different data sources.
  - **Extract your data**: Once you have your data structure in *Manifest* tables,
    you can extract data from multiple external data sources. Extracted data are
    validated and transformed using rules defined in *Manifest* table. Finally,
    data can be stored into internal database in order to provide fast and
    flexible access to data.
  - **Transform your data**: Data transformations are applied in real time, when
    reading data from source. This puts some limitations on transformation side, but
    allows data to be streamed in real time.
  - **Publish your data**: Once you have your data loaded into internal
    database, you can publish data using API. API is generated automatically using
    *Manifest* tables and provides extracted data in many different formats. For
    example if original data source was a CSV file, now you have a flexible API,
    that can talk JSON, RDF, SQL, CSV and other formats.


pkgId: 760974532a450c6f08ea72b65fb5a6b273237e86a9dad149dd2f7983e6185134
name: python-splicer-cli-help
arch: noarch
version: 1.0.7
epoch: 0
release: 1
summary: Development documents and examples for splicer-cli
url: https://github.com/ajrpeggio/splicer
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-splicer-cli-1.0.7-1.src.rpm
location_href: Packages/python-splicer-cli-help-1.0.7-1.noarch.rpm
checksum_type: sha256
description:
  This Python script is designed to copy audio files from a specified Splice download directory to a designated final directory's staging directory. It efficiently checks for duplicate files, ensuring that only new or modified files are copied, thereby maintaining an organized audio library.



  - Recursively searches for audio files in the specified Splice directory.
  - Copies supported audio file formats: `.wav`, `.mp3`, `.aiff`.
  - Creates a "staging" directory inside the final directory if it does not exist.
  - Skips files that already exist in the final directory and its subdirectories, or that match in size.
  - Provides a dry run option to preview actions without making any changes.



  - macOS / Windows
  - Python 3.x



  From your terminal / commandline, perform the following steps the following:

  1. **Install CLI from Pypi**

      ```bash
      pip install splicer-cli
      ```

  1. **Run App**

      ```bash
      splicer --help
      ```

  Once you run the command `splicer`, you will be prompted to fill in two values:

  - Splice Folder
  - Final / Desintination Folder



  If you need to reconfigure the folder locations, you can do so by running the app with a --reconfigure flag like so:

  ```bash
  splicer --reconfigure
  ```


pkgId: b9d0ba99fd8a21bc233911d81c45062a24cadc35338bc099fe102e9c6e5cc78e
name: python-splinkclickhouse-help
arch: noarch
version: 0.3.4
epoch: 0
release: 1
summary: Development documents and examples for splinkclickhouse
url: https://github.com/ADBond/splinkclickhouse
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-splinkclickhouse-0.3.4-1.src.rpm
location_href: Packages/python-splinkclickhouse-help-0.3.4-1.noarch.rpm
checksum_type: sha256
description:
  [![pypi](https://img.shields.io/github/v/release/adbond/splinkclickhouse?include_prereleases)](https://pypi.org/project/splinkclickhouse/#history)
  [![Downloads](https://static.pepy.tech/badge/splinkclickhouse)](https://pepy.tech/project/splinkclickhouse)



  Basic [Clickhouse](https://clickhouse.com/docs/en/intro) support for use as a backend with the data-linkage and deduplication package [Splink](https://moj-analytical-services.github.io/splink/).

  Supports clickhouse server connected via [clickhouse connect](https://clickhouse.com/docs/en/integrations/python).

  Also supports in-process [chDB](https://clickhouse.com/docs/en/chdb) version if installed with the `chdb` extras.



  Install from `PyPI` using `pip`:

  ```sh

  pip install splinkclickhouse

  pip install splinkclickhouse[chdb]
  ```

  or you can install the package directly from github:

  ```sh

  pip install git+https://github.com/ADBond/splinkclickhouse.git@v0.3.4
  ```

  If instead you are using `conda`, `splinkclickhouse` is available on [conda-forge](https://conda-forge.org/):

  ```sh
  conda install conda-forge::splinkclickhouse
  ```

  Note that the `conda` version will only be able to use [the Clickhouse server functionality](#clickhouse-server) as `chdb` is not currently available within `conda`.

  While the package is in early development there will may be breaking changes in new versions without warning, although these _should_ only occur in new minor versions.
  Nevertheless if you depend on this package it is recommended to pin a version to avoid any disruption that this may cause.





  Import `ClickhouseAPI`, which accepts a `clickhouse_connect` client, configured with attributes relevant for your connection:
  ```python
  import clickhouse_connect
  import splink.comparison_library as cl
  from splink import Linker, SettingsCreator, block_on, splink_datasets

  from splinkclickhouse import ClickhouseAPI

  df = splink_datasets.fake_1000

  conn_atts = {
      "host": "localhost",
      "port": 8123,
      "username": "splinkognito",
      "password": "splink123!",
  }

  db_name = "__temp_splink_db"

  default_client = clickhouse_connect.get_client(**conn_atts)
  default_client.command(f"CREATE DATABASE IF NOT EXISTS {db_name}")
  client = clickhouse_connect.get_client(
      **conn_atts,
      database=db_name,
  )

  db_api = ClickhouseAPI(client)


  settings = SettingsCreator(
      link_type="dedupe_only",
      comparisons=[
          cl.JaroWinklerAtThresholds("first_name"),
          cl.JaroAtThresholds("surname"),
          cl.DateOfBirthComparison(
              "dob",
              input_is_string=True,
          ),
          cl.DamerauLevenshteinAtThresholds("city").configure(
              term_frequency_adjustments=True
          ),
          cl.JaccardAtThresholds("email"),
      ],
      blocking_rules_to_generate_predictions=[
          block_on("first_name", "dob"),
          block_on("surname"),
      ],
  )

  linker = Linker(df, settings, db_api=db_api)
  ```

  See [Splink documentation](https://moj-analytical-services.github.io/splink/) for use of the `Linker`.



  To use `chdb` as a Splink backend you must install the `chdb` package.
  This is automatically installed if you install with the `chdb` extras (`pip install splinkclickhouse[chdb]`).

  Import `ChDBAPI`, which accepts a connection from `chdb.api`:
  ```python
  import splink.comparison_library as cl
  from chdb import dbapi
  from splink import Linker, SettingsCreator, block_on, splink_datasets

  from splinkclickhouse import ChDBAPI

  con = dbapi.connect()
  db_api = ChDBAPI(con)

  df = splink_datasets.fake_1000

  settings = SettingsCreator(
      link_type="dedupe_only",
      comparisons=[
          cl.NameComparison("first_name"),
          cl.JaroAtThresholds("surname"),
          cl.DateOfBirthComparison(
              "dob",
              input_is_string=True,
          ),
          cl.DamerauLevenshteinAtThresholds("city").configure(
              term_frequency_adjustments=True
          ),
          cl.EmailComparison("email"),
      ],
      blocking_rules_to_generate_predictions=[
          block_on("first_name", "dob"),
          block_on("surname"),
      ],
  )

  linker = Linker(df, settings, db_api=db_api)
  ```

  See [Splink documentation](https://moj-analytical-services.github.io/splink/) for use of the `Linker`.



  `splinkclickhouse` is compatible with all of the in-built `splinks` comparisons and comparison levels in `splink.comparison_library` and `splink.comparison_level_library`.
  However, `splinkclickhouse ` provides a few pre-made extras to leverage Clickhouse-specific functionality.
  These can be used in exactly the same way as the native Splink libraries, for example:

  ```python
  import splink.comparison_library as cl
  from splink import SettingsCreator

  import splinkclickhouse.comparison_library as cl_ch

  ...
  settings = SettingsCreator(
      link_type="dedupe_only",
      comparisons=[
          cl.ExactMatch("name"),
          cl_ch.DistanceInKMAtThresholds(
              "latitude",
              "longitude",
              [10, 50, 100, 200, 500],
          ),
      ],
  )
  ```

  or with individual comparison-levels:

  ```python
  import splink.comparison_level_library as cll
  import splink.comparison_library as cl
  from splink import SettingsCreator

  import splinkclickhouse.comparison_level_library as cll_ch

  ...
  settings = SettingsCreator(
      link_type="dedupe_only",
      comparisons=[
          cl.ExactMatch("name"),
          cl.CustomComparison(
              comparison_levels = [
                  cll.And(
                      cll.NullLevel("city"),
                      cll.NullLevel("postcode"),
                      cll.Or(cll.NullLevel("latitude"), cll.NullLevel("longitude"))
                  ),
                  cll.ExactMatch("postcode"),
                  cll_ch.DistanceInKMLevel("latitude", "longitude", 5),
                  cll_ch.DistanceInKMLevel("latitude", "longitude", 10),
                  cll.ExactMatch("city"),
                  cll_ch.DistanceInKMLevel("latitude", "longitude", 50),
                  cll.ElseLevel(),
              ],
              output_column_name="location",
          ),
      ],
  )
  ```



  If you have difficulties with the package you can [open an issue](https://github.com/ADBond/splinkclickhouse/issues).
  You may also [suggest changes by opening a PR](https://github.com/ADBond/splinkclickhouse/pulls), although it may be best to discuss in an issue beforehand.

  This package is 'unofficial', in that it is not directly supported by the Splink team. Maintenance / improvements will be done on a 'best effort' basis where resources allow.





  Clickhouse offers several different date formats.
  The basic `Date` format cannot handle dates before the Unix epoch (1970-01-01), which makes it unsuitable for many use-cases for holding date-of-births.

  The parsing function `parseDateTime` (and variants) which support providing custom formats return a `DateTime`, which also has the above limited range.
  In `splinkclickhouse` we use the function `parseDateTime64BestEffortOrNull` so that we can use the extended-range `DateTime64` data type, which supports dates back to 1900-01-01, but does not allow custom date formats. Currently no `DateTime64` equivalent of `parseDateTime` exists.

  If you require different behaviour (for instance if you have an unusual date format and know that you do not need dates outside of the `DateTime` range) you will either need to derive a new column in your source data, or construct the relevant SQL expression manually.



  There is not currently a way in Clickhouse to deal directly with date values before 1900. However, `splinkclickhouse` offers some tools to help with this.
  It creates a SQL UDF (which can be opted-out of) `days_since_epoch`, to convert a date string (in `YYYY-MM-DD` format) into an integer, representing the number of days since `1970-01-01` to handle dates well outside the range of `DateTime64`, based on the proleptic Gregorian calendar.

  This can be used with column expression extension `splinkclickhouse.column_expression.ColumnExpression` via the transform `.parse_date_to_int()`, or using custom versions of Splink library functions `cll.AbsoluteDateDifferenceLevel`, `cl.AbsoluteDateDifferenceAtThresholds`, and `cl.DateOfBirthComparison`.
  These functions can be used with string columns (which will be wrapped in the above parsing function), or integer columns if the conversion via `days_since_epoch` is already done in the data-preparation stage.



  When passing data into `chdb` from pandas or pyarrow tables, `NULL` values in `String` columns are converted into empty strings, instead of remaining `NULL`.

  For now this is not handled within the package. You can workaround the issue by wrapping column names in `NULLIF`:

  ```python
  import splink.comparison_level as cl

  first_name_comparison = cl.DamerauLevenshteinAtThresholds("NULLIF(first_name, '')")
  ```



  `ClickhouseAPI` will allow registration of pandas dataframes, by inferring the types of columns. It currently only does this for string, integer, and float columns, and will always make them `Nullable`.

  If you require other data types, or more fine-grained control, it is recommended to import the data into Clickhouse yourself, and then pass the table name (as a string) to the `Linker` instead.


pkgId: a1174a5c35dbc3a9291a42fba1d9e71e69a7ad911715f1e79b3b22fe4135240c
name: python-split-cosine-utils-help
arch: noarch
version: 0.3.0
epoch: 0
release: 1
summary: Development documents and examples for split-cosine-utils
url: https://pypi.org/project/split-cosine-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-split-cosine-utils-0.3.0-1.src.rpm
location_href: Packages/python-split-cosine-utils-help-0.3.0-1.noarch.rpm
checksum_type: sha256
description:
  A utility package for
  - Splitting text data with custom rules.
  - Computing cosine similarity between datasets.



  ```bash
  pip install split_cosine_utils


pkgId: bc1a40088bca024d493577e43669784414c4548640ebbe4657348b2937cc7a37
name: python-sponet-help
arch: noarch
version: 2.6.0
epoch: 0
release: 1
summary: Development documents and examples for sponet
url: https://github.com/lueckem/SPoNet
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sponet-2.6.0-1.src.rpm
location_href: Packages/python-sponet-help-2.6.0-1.noarch.rpm
checksum_type: sha256
description:
  [![build](https://github.com/lueckem/SPoNet/actions/workflows/build.yml/badge.svg)](https://github.com/lueckem/SPoNet/actions/workflows/build.yml)

  This package provides an efficient implementation of popular discrete-state spreading processes on networks of interacting *agents*.
  They can be used to simulate how opinions about certain issues develop over time within a population, or how an infectious disease spreads.
  The simulation loop is just-in-time compiled using `numba`, which makes performance comparable with compiled languages like C++.

  Available models:
  - continuous-time noisy voter model (CNVM)
  - continuous-time noisy threshold model (CNTM)



  The package requires Python 3.9, 3.10, 3.11, or 3.12.
  Install from the PyPI repository:
  ```
  pip install sponet
  ```
  or get the latest version directly from GitHub:
  ```
  pip install git+https://github.com/lueckem/SPoNet
  ```


  Let a network (undirected simple graph) of $N$ nodes be given. The nodes represent agents and the edges social interactions.
  Each node is endowed with one of $M$ discrete opinions. Thus, the system state is given by a vector $x \in \{1,\dots,M\}^N$, where $x_i$ describes the opinion of node $i$.
  Each node's opinion $x_i \in \{1,\dots,M\}$ changes over time according to a continuous-time Markov chain (Markov jump process).
  Given the current system state $x$, the generator matrix $Q^i$ of the continuous-time Markov chain associated with node $i$ is defined as

  $$ Q^i \in \mathbb{R}^{M \times M},\quad (Q^i)_ {m,n} := r_{m,n} \frac{d_ {i,n}(x)}{(d_i)^\alpha} + \tilde{r}_ {m,n},\ m\neq n, $$

  where $d_{i,n}(x)$ denotes the number of neighbors of node $i$ with opinion $n$ and $d_i$ is the degree of node $i$. The matrices $r, \tilde{r} \in \mathbb{R}^{M \times M}$ and $\alpha \in \mathbb{R}$ are model parameters.

  Thus, the transition rates $(Q^i)_ {m,n}$ consist of two components.
  The first component $r_{m,n} d_{i,n}(x)/ (d_i)^\alpha$ describes at which rate node $i$ gets "infected" with opinion $n$ by nodes in its neighborhood.
  The second part $\tilde{r}_{m,n}$ describes transitions that are independent from the neighborhood (e.g., noise).

  The parameter $\alpha$ can be used to tune the type of interaction. For $\alpha=1$ the transition rates are normalized because $d_{i,n}(x)/d_i \in [0,1]$.
  The setting $\alpha=0$ however yields a linear increase of the transition rates with the number of "infected" neighbors, and is often used in epidemic modeling, e.g., the contact process or SIS model.

  The network itself is static, i.e., the nodes and edges do not change over time.


  First define the model parameters:

  ```python
  from sponet import CNVMParameters
  import numpy as np
  import networkx as nx

  num_nodes = 100
  r = np.array([[0, .8], [.2, 0]])
  r_tilde = np.array([[0, .1], [.2, 0]])
  network = nx.erdos_renyi_graph(n=num_nodes, p=0.1)

  params = CNVMParameters(
      num_opinions=2,
      network=network,
      r=r,
      r_tilde=r_tilde,
      alpha=1,
  )
  ```
  Then simulate the model, starting in state `x_init`:

  ```python
  from sponet import CNVM

  x_init = np.random.randint(0, 2, num_nodes)
  model = CNVM(params)
  t, x = model.simulate(t_max=50, x_init=x_init)
  ```
  The output `t` contains the time points of state jumps and `x` the system states after each jump.

  A more detailed overview of the package can be found in the jupyter notebook [*examples/tutorial_cnvm.ipynb*](examples/tutorial_cnvm.ipynb).
  Moreover, the behavior of the CNVM in the mean-field limit is discussed in [*examples/mean_field.ipynb*](examples/mean_field.ipynb).
  In the notebook [*examples/SIS-model.ipynb*](examples/SIS-model.ipynb) the existence of an epidemic threshold for the SIS model in epidemiology is demonstrated.



  After a node switches its opinion, the system state $x$ changes and hence all the generator matrices $Q^i$ may change as well.
  We apply a Gillespie-like algorithm to generate statistically correct samples of the process.
  We start a Poisson clock for each possible transition and as soon as the first transition occurs we modify the generator matrices and reset all the clocks.
  To do this efficiently, it is advantageous to transform the rate matrices $r$ and $\tilde{r}$ into an equivalent format consisting of base rates $r_0, \tilde{r}_0 > 0$ and probability matrices $p, \tilde{p} \in [0, 1]^{M\times M}$ such that

  $$ r_{m,n} = r_0 p_ {m,n}, \quad \tilde{r}_ {m,n} = \tilde{r}_ 0 \tilde{p}_ {m,n} / M. $$

  Furthermore, we define the cumulative rates

  $$ \lambda := \sum_{i=1}^N r_0 d_i^{(1-\alpha)},\quad \tilde{\lambda} := N \tilde{r}_0,\quad \hat{\lambda} := \lambda + \tilde{\lambda}. $$

  Then the simulation loop is given by
  1. Draw time of next jump event from exponential distribution $\exp(\hat{\lambda})$. Go to 2.
  2. With probability $\lambda / \hat{\lambda}$ the event is due to infection, in which case go to 3.
  Else it is due to noise, go to 4.
  3. Draw agent $i$ from $\{1,\dots,N\}$ according to distribution $\mathbb{P}(i = j) = r_0 d_j^{(1-\alpha)} / \lambda$. Let $m$ denote the state of agent $i$.
  Draw $n$ from $\{1,\dots,M\}$ according to $\mathbb{P}(n = k) = d_{i,k}(x) / d_i$.
  With probability $p_{m,n}$ agent $i$ switches to state $n$. Go back to 1.
  4. Draw $i$ from $\{1,\dots,N\}$ and $n$ from $\{1,\dots,M\}$ uniformly. Let $m$ denote the state of agent $i$.
  With probability $\tilde{p}_{m,n}$ agent $i$ switches to state $n$. Go back to 1.



  On a network (undirected simple graph) of $N$ nodes, each node $i$ has one of two opinions $x_i \in \{0, 1\}$.
  At the rate $r \geq 0$, each node evaluates to change their opinion from its current
  opinion $m\in \{0, 1\}$ to the other opinion $n=1-m$. It changes the opinion if the
  percentage of neighbors of opinion n exceeds the threshold $b_{m,n}$.
  Additionally, each node changes its state randomly at rate $\tilde{r} \geq 0$ (noise).
  Hence, the rate at which node $i$ switches from opinion $m$ to opinion $n$ is

  $$ r \ \delta_{\left( \frac{d_{i,n}(x)}{d_{i}} \geq b_{m,n} \right)} + \tilde{r} $$

  where $d_{i,n}(x)$ denotes the number of neighbors of node $i$ with opinion $n$ and $d_i$ is the degree of node $i$.
  Thus, in contrast to the CNVM, the CNTM assumes that a switch to a different opinion only occurs
  if that opinion is already sufficiently established in the neighborhood.


  First define the model parameters:

  ```python
  from sponet import CNTMParameters
  import numpy as np
  import networkx as nx

  num_nodes = 100
  r = 1
  r_tilde = 0.1
  threshold_01 = 0.5
  threshold_10 = 0.3
  network = nx.erdos_renyi_graph(n=num_nodes, p=0.1)

  params = CNTMParameters(
      network=network,
      r=r,
      r_tilde=r_tilde,
      threshold_01=threshold_01,
      threshold_10=threshold_10,
  )
  ```
  Then simulate the model, starting in state `x_init`:

  ```python
  from sponet import CNTM

  x_init = np.random.randint(0, 2, num_nodes)
  model = CNTM(params)
  t, x = model.simulate(t_max=50, x_init=x_init)
  ```
  The output `t` contains the time points of state jumps and `x` the system states after each jump.


pkgId: 6520e4e516350e4832ad310b35d4766e7a7eaf9da2d2ca7c9f7c84c5c01f4bf2
name: python-sport-activities-features-help
arch: noarch
version: 0.5.0
epoch: 0
release: 1
summary: Development documents and examples for sport-activities-features
url: https://github.com/firefly-cpp/sport-activities-features
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sport-activities-features-0.5.0-1.src.rpm
location_href: Packages/python-sport-activities-features-help-0.5.0-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
    <img width="200" src="https://raw.githubusercontent.com/firefly-cpp/sport-activities-features/main/.github/logo/sport_activities.png">
  </p>

  <h1 align="center">
  sport-activities-features --- A minimalistic toolbox for extracting features from sports activity files written in Python
  </h1>

  <p align="center">
    <img alt="PyPI Version" src="https://img.shields.io/pypi/v/sport-activities-features.svg" href="https://pypi.python.org/pypi/sport-activities-features">
    <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/sport-activities-features.svg">
    <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/sport-activities-features.svg">
    <img alt="Fedora package" src="https://img.shields.io/fedora/v/python3-sport-activities-features?color=blue&label=Fedora%20Linux&logo=fedora" href="https://src.fedoraproject.org/rpms/python-sport-activities-features">
    <img alt="AUR package" src="https://img.shields.io/aur/version/python-sport-activities-features?color=blue&label=Arch%20Linux&logo=arch-linux" href="https://aur.archlinux.org/packages/python-sport-activities-features">
    <img alt="Packaging status" src="https://repology.org/badge/tiny-repos/python:sport-activities-features.svg" href="https://repology.org/project/python:sport-activities-features/versions">
    <img alt="Downloads" src="https://pepy.tech/badge/sport-activities-features" href="https://pepy.tech/project/sport-activities-features">
    <img alt="GitHub license" src="https://img.shields.io/github/license/firefly-cpp/sport-activities-features.svg" href="https://github.com/firefly-cpp/sport-activities-features/blob/master/LICENSE">
    <img alt="Documentation Status" src="https://readthedocs.org/projects/sport-activities-features/badge/?version=latest" href="https://sport-activities-features.readthedocs.io/en/latest/?badge=latest">
  </p>

  <p align="center">
    <img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/firefly-cpp/sport-activities-features">
    <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/w/firefly-cpp/sport-activities-features.svg">
    <img alt="Average time to resolve an issue" src="http://isitmaintained.com/badge/resolution/firefly-cpp/sport-activities-features.svg" href="http://isitmaintained.com/project/firefly-cpp/sport-activities-features">
    <img alt="Percentage of issues still open" src="http://isitmaintained.com/badge/open/firefly-cpp/sport-activities-features.svg" href="http://isitmaintained.com/project/firefly-cpp/sport-activities-features">
    <img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-6-orange.svg" href="#-contributors">
  </p>

  <p align="center">
    <img alt="DOI" src="https://img.shields.io/badge/DOI-10.1109/INES52918.2021.9512927-blue" href="https://doi.org/10.1109/INES52918.2021.9512927">
  </p>

  <p align="center">
    <a href="#-detailed-insights">🔍 Detailed insights</a> •
    <a href="#-installation">📦 Installation</a> •
    <a href="#-api">📮 API</a> •
    <a href="#-graphical-user-interface">💻 Graphical User Interface</a> •
    <a href="#️-historical-weather-data">🌦️ Historical weather data</a> •
    <a href="#-overpass-api-open-elevation-api--opentopodata-integration">🧩 Overpass API, Open Elevation API & OpenTopoData integration</a>
    <a href="#-examples">🚀 Examples</a> •
    <a href="#-license">🔑 License</a> •
    <a href="#-cite-us">📄 Cite us</a> •
    <a href="#-further-read">📖 Further read</a> •
    <a href="#-related-frameworks">🔗 Related frameworks</a> •
    <a href="#-contributors">🫂 Contributors</a>
  </p>



  Prepare to dive into the thrilling world of sports activity analysis, where hidden geographic, topological, and personalized data await their grand unveiling. In this captivating journey, we embark on a quest to extract the deepest insights from the wealth of information generated by monitoring sports activities. Brace yourself for a framework that transcends the limitations of conventional analysis techniques. 💪🔍

  Traditional approaches often rely on integral metrics like total duration, total distance, and average heart rate, but they fall victim to the dreaded "overall metrics problem." These metrics fail to capture the essence of sports activities, omitting crucial components and leading to potentially flawed and misleading conclusions. They lack the ability to recognize distinct stages and phases of the activity, such as the invigorating warm-up, the endurance-testing main event, and the heart-pounding intervals. ⏱️🚴‍♀️📈

  Fortunately, our sport-activities-framework rises above these limitations, revealing a comprehensive panorama of your sports activity files. This framework combines the power of identification and extraction methods to unlock a treasure trove of valuable data. Picture this :camera: : effortlessly identifying the number of hills, extracting average altitudes of these remarkable formations, measuring the total distance conquered on those inclines, and even deriving climbing ratios for a true measure of accomplishment (total distance of hills vs. total distance). But that's just the tip of the iceberg! The framework seamlessly integrates a multitude of extensions, including historical weather parsing, statistical evaluations, and ex-post visualizations that bring your data to life. 🗻📊🌦️

  For those seeking to venture further, we invite you to explore the realms of scientific papers on data mining that delve into these captivating topics. Discover how our framework complements the world of generating and predicting automated sport training sessions, creating a harmonious synergy between theory and practice. 📚🔬💡

  * **Free software:** MIT license
  * **Python versions:** 3.8.x, 3.9.x, 3.10.x, 3.11.x, 3.12.x
  * **Documentation:** https://sport-activities-features.readthedocs.io/en/latest
  * **Tested OS:** Windows, Ubuntu, Debian, Fedora, Alpine, Arch, macOS. **However, that does not mean it does not work on others.**



  Prepare to be astounded by the capabilities of the sport-activities-features framework. It effortlessly handles TCX & GPX activity files and harnesses the power of the [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API) nodes. Presenting the range of functions at your disposal:

  - **Unleash the integral metrics**: From total distance to total duration and even calorie count, witness the extraction of these vital statistics with a single glance. 📏⏰🔥 ([See example](examples/integral_metrics_extraction.py))

  - **Conquer the peaks**: Ascend to new heights by extracting topographic features like the number of hills, their average altitudes, the total distance covered on these majestic slopes, and the thrilling climbing ratio. Prepare for a breathtaking adventure! ⛰️📈🧗‍♂️ ([See example](examples/hill_data_extraction.py))

  - **Embark on a visual journey**: Immerse yourself in the beauty of your accomplishments as you plot the identified hills on a mesmerizing map. Witness the landscape come alive before your eyes. 🗺️🏞️🖌️ ([See example](examples/draw_map_with_identified_hills.py))

  - **Embrace the rhythm of intervals**: Explore the intervals within your sports activities, uncovering their numbers, durations, distances, and heart rates. Unveil the heartbeat of your performance! 🏃‍♀️📊💓 ([See example](examples/draw_map_with_identified_intervals.py))

  - **Calculate the training loads**: Dive deep into the intricate world of training loads and discover the Banister TRIMP and Lucia TRIMP methods. Gain invaluable insights into optimizing your training regimen. 📈⚖️🏋️‍♂️ ([See example](examples/calculate_training_load.py))

  - **Weather the storm**: Unlock the power of historical weather data from external services, adding a fascinating layer of context to your sports activities. ☀️🌧️⛈️

  - **Unveil the secrets within coordinates**: Explore the integral metrics of your activities within specific geographical areas, uncovering valuable data on distance, heart rate, and speed. Peer into the depths of your performance! 🌍📍📉 ([See example](examples/extract_data_inside_area.py))

  - **Embrace randomness**: Extract activities from CSV files and indulge in the excitement of randomly selecting a specific number of activities. Embrace the element of surprise! 🎲📂🎉 ([See example](examples/extract_random_activities_from_csv.py))

  - **Conquer the dead ends**: Unravel the mysteries of your sports activities by identifying the dead ends. Prepare to navigate the uncharted territories of your performance! 🚧🗺️🔍 ([See example](examples/dead_end_extraction.py))

  - **Unlock the format**: Seamlessly convert TCX files to GPX, opening doors to even more possibilities. Adapt and conquer! ⚙️🔄✨ ([See example](examples/convert_tcx_to_gpx.py))

  And that's just the beginning! The sport-activities-framework holds countless other features, awaiting your exploration. Brace yourself for an exhilarating journey of discovery, where the ordinary becomes extraordinary, and your sports activities come alive like never before. 🌟🔥🏃‍♂️

  The framework comes with two (testing) [benchmark datasets](https://github.com/firefly-cpp/sports-activity-dataset-collections), which are freely available to download from: [DATASET1](http://iztok-jr-fister.eu/static/publications/Sport5.zip), [DATASET2](http://iztok-jr-fister.eu/static/css/datasets/Sport.zip).






  Install sport-activities-features with pip:

  ```sh
  pip install sport-activities-features
  ```



  To install sport-activities-features on Alpine, use:

  ```sh
  $ apk add py3-sport-activities-features
  ```



  To install sport-activities-features on Fedora, use:

  ```sh
  $ dnf install python3-sport-activities-features
  ```



  To install sport-activities-features on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):

  ```sh
  $ yay -Syyu python-sport-activities-features
  ```



  There is a simple API for remote work with the sport-activities-features package available [here](https://github.com/alenrajsp/sport-activities-features-api).



  There is a simple Graphical User Interface for the sport-activities-features package available [here](https://github.com/firefly-cpp/sport-activities-features-gui).


  Weather data parsed is collected from the [Visual Crossing Weather API](https://www.visualcrossing.com/).
  Please note that this is an external unaffiliated service, and users must register to use the API.
  The service has a free tier (1000 Weather reports/day) but is otherwise operating on a pay-as-you-go model.
  For pricing and terms of use, please read the [official documentation](https://www.visualcrossing.com/weather-data-editions) of the API provider.


  Without performing activities, we can use the [OpenStreetMap](https://www.openstreetmap.org/) for the identification of hills,
  total ascent, and descent. This is done using the [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API)
  which is a read-only API that allows querying of OSM map data. In addition to that altitude, data is retrieved by using the
  [Open-Elevation API](https://open-elevation.com/) or [OpenTopoData API](https://www.opentopodata.org/)  which are open-source and free alternatives to the Google Elevation API.
  Both of the solutions can be used by using free publicly acessible APIs ([Overpass](https://wiki.openstreetmap.org/wiki/Overpass_API), [Open-Elevation](https://open-elevation.com/#public-api), [OpenTopoData](https://www.opentopodata.org/#public-api)) or can be self hosted on a server or as a Docker container ([Overpass](https://wiki.openstreetmap.org/wiki/Overpass_API/Installation), [Open-Elevation](https://github.com/Jorl17/open-elevation/blob/master/docs/host-your-own.md), [OpenTopoData](https://www.opentopodata.org/server/)).






  ```python
  from sport_activities_features.tcx_manipulation import TCXFile


  tcx_file=TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  data = tcx_file.extract_activity_data(tcx_exercise) # Represents data as dictionary of lists


  data = tcx_file.extract_activity_data(tcx_exercise, numpy_array= True) # Represents data as dictionary of numpy.arrays

  ```


  ```python
  from sport_activities_features.gpx_manipulation import GPXFile


  gpx_file=GPXFile()


  gpx_exercise = gpx_file.read_one_file("path_to_the_file")
  data = gpx_file.extract_activity_data(gpx_exercise) # Represents data as dictionary of lists


  data = gpx_file.extract_activity_data(gpx_exercise, numpy_array= True) # Represents data as dictionary of numpy.arrays

  ```


  ```python
  from sport_activities_features.hill_identification import HillIdentification
  from sport_activities_features.tcx_manipulation import TCXFile
  from sport_activities_features.topographic_features import TopographicFeatures
  from sport_activities_features.plot_data import PlotData


  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  activity = tcx_file.extract_activity_data(tcx_exercise)


  Hill = HillIdentification(activity['altitudes'], 30)
  Hill.identify_hills()
  all_hills = Hill.return_hills()


  Top = TopographicFeatures(all_hills)
  num_hills = Top.num_of_hills()
  avg_altitude = Top.avg_altitude_of_hills(activity['altitudes'])
  avg_ascent = Top.avg_ascent_of_hills(activity['altitudes'])
  distance_hills = Top.distance_of_hills(activity['positions'])
  hills_share = Top.share_of_hills(distance_hills, activity['total_distance'])
  ```


  ```python
  import sys
  sys.path.append('../')

  from sport_activities_features.interval_identification import IntervalIdentificationByPower, IntervalIdentificationByHeartrate
  from sport_activities_features.tcx_manipulation import TCXFile


  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  activity = tcx_file.extract_activity_data(tcx_exercise)


  Intervals = IntervalIdentificationByPower(activity["distances"], activity["timestamps"], activity["altitudes"], 70)
  Intervals.identify_intervals()
  all_intervals = Intervals.return_intervals()


  Intervals = IntervalIdentificationByHeartrate(activity["timestamps"], activity["altitudes"], activity["heartrates"])
  Intervals.identify_intervals()
  all_intervals = Intervals.return_intervals()
  ```


  ```python
  from sport_activities_features import WeatherIdentification
  from sport_activities_features import TCXFile


  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  tcx_data = tcx_file.extract_activity_data(tcx_exercise)


  visual_crossing_api_key = "weather_api_key" # https://www.visualcrossing.com/weather-api


  weather = WeatherIdentification(tcx_data['positions'], tcx_data['timestamps'], visual_crossing_api_key)
  weatherlist = weather.get_weather(time_delta=30)
  tcx_weather = weather.get_average_weather_data(timestamps=tcx_data['timestamps'],weather=weatherlist)

  tcx_data.update({'weather':tcx_weather})
  ```

  The weather list is of the following type:
  ```json
       [
          {
              "temperature": 14.3,
              "maximum_temperature": 14.3,
              "minimum_temperature": 14.3,
              "wind_chill": null,
              "heat_index": null,
              "solar_radiation": null,
              "precipitation": 0.0,
              "sea_level_pressure": 1021.6,
              "snow_depth": null,
              "wind_speed": 6.9,
              "wind_direction": 129.0,
              "wind_gust": null,
              "visibility": 40.0,
              "cloud_cover": 54.3,
              "relative_humidity": 47.6,
              "dew_point": 3.3,
              "weather_type": "",
              "conditions": "Partially cloudy",
              "date": "2016-04-02T17:26:09+00:00",
              "location": [
                  46.079871179535985,
                  14.738618675619364
              ],
              "index": 0
          }, ...
      ]
  ```


  ```python
  import sys
  sys.path.append('../')

  from sport_activities_features.tcx_manipulation import TCXFile


  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  integral_metrics = tcx_file.extract_integral_metrics(tcx_exercise)

  print(integral_metrics)

  ```


  ```python
  from sport_activities_features.weather_identification import WeatherIdentification
  from sport_activities_features.tcx_manipulation import TCXFile


  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  tcx_data = tcx_file.extract_activity_data(tcx_exercise)



  visual_crossing_api_key = "API_KEY" # https://www.visualcrossing.com/weather-api


  weather = WeatherIdentification(tcx_data['positions'], tcx_data['timestamps'], visual_crossing_api_key)
  weatherlist = weather.get_weather()
  ```


  ```python
  import overpy
  from sport_activities_features.overpy_node_manipulation import OverpyNodesReader


  overpass_api = "https://lz4.overpass-api.de/api/interpreter"


  open_elevation_api = "https://api.open-elevation.com/api/v1/lookup"


  open_street_map_way = 164477980

  overpass_api = overpy.Overpass(url=overpass_api)


  q = f"""(way({open_street_map_way});<;);out geom;"""
  query = overpass_api.query(q)


  nodes = query.ways[0].get_nodes(resolve_missing=True)


  overpy_reader = OverpyNodesReader(open_elevation_api=open_elevation_api)



  data = overpy_reader.read_nodes(nodes)
  ```


  ```python
  import numpy as np
  import sys
  sys.path.append('../')

  from sport_activities_features.area_identification import AreaIdentification
  from sport_activities_features.tcx_manipulation import TCXFile


  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  activity = tcx_file.extract_activity_data(tcx_exercise)


  positions = np.array([*activity['positions']])
  distances = np.array([*activity['distances']])
  timestamps = np.array([*activity['timestamps']])
  heartrates = np.array([*activity['heartrates']])



  area_coordinates = np.array([[[10, 10], [10, 50], [50, 50], [50, 10]],
                               [[19, 19], [19, 21], [21, 21], [21, 19]]])


  area = AreaIdentification(positions, distances, timestamps, heartrates, area_coordinates)
  area.identify_points_in_area()
  area_data = area.extract_data_in_area()
  ```


  ```python
  from sport_activities_features.interruptions.interruption_processor import InterruptionProcessor
  from sport_activities_features.tcx_manipulation import TCXFile

  """
  Identify interruption events from a TCX or GPX file.
  """


  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  tcx_data = tcx_file.extract_activity_data(tcx_exercise)

  """
  Time interval = time before and after the start of an event
  Min speed = Threshold speed to trigger an event/interruption (trigger when under min_speed)
  overpass_api_url = Set to something self-hosted, or use a public instance from https://wiki.openstreetmap.org/wiki/Overpass_API
  """
  interruptionProcessor = InterruptionProcessor(time_interval=60, min_speed=2,
                                                overpass_api_url="url_to_overpass_api")

  """
  If classify is set to true, also discover if interruptions are close to intersections. Returns a list of [ExerciseEvent]
  """
  events = interruptionProcessor.events(tcx_data, True)
  ```


  Generate TCXFile parsed like data object from overpy.Node objects
  ```python
  import overpy
  from sport_activities_features.overpy_node_manipulation import OverpyNodesReader


  overpass_api = "https://lz4.overpass-api.de/api/interpreter"


  open_elevation_api = "https://api.open-elevation.com/api/v1/lookup"


  open_street_map_way = 164477980

  overpass_api = overpy.Overpass(url=overpass_api)


  q = f"""(way({open_street_map_way});<;);out geom;"""
  query = overpass_api.query(q)


  nodes = query.ways[0].get_nodes(resolve_missing=True)


  overpy_reader = OverpyNodesReader(open_elevation_api=open_elevation_api)



  data = overpy_reader.read_nodes(nodes)
  ```

  ```python
  from sport_activities_features import ElevationIdentification
  from sport_activities_features import TCXFile

  tcx_file = TCXFile()
  tcx_exercise = tcx_file.read_one_file("path_to_the_file")
  tcx_data = tcx_file.extract_activity_data(tcx_exercise)

  elevations = ElevationIdentification(tcx_data['positions'])
  """Adds tcx_data['elevation'] = eg. [124, 21, 412] for each position"""
  tcx_data.update({'elevations':elevations})
  ```



  ![Area Figure](https://i.imgur.com/Iz8Ga3B.png)


  ![Dead End Figure](https://imgur.com/LgZzCFS.png)



  This package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.



  This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!



  I. Jr. Fister, L. Lukač, A. Rajšp, I. Fister, L. Pečnik and D. Fister, "[A minimalistic toolbox for extracting features from sport activity files](http://iztok-jr-fister.eu/static/publications/294.pdf)", 2021 IEEE 25th International Conference on Intelligent Engineering Systems (INES), 2021, pp. 121-126, doi: [10.1109/INES52918.2021.9512927](http://dx.doi.org/10.1109/INES52918.2021.9512927).



  [1] [Awesome Computational Intelligence in Sports](https://github.com/firefly-cpp/awesome-computational-intelligence-in-sports)



  [1] [AST-Monitor: A wearable Raspberry Pi computer for cyclists](https://github.com/firefly-cpp/AST-Monitor)

  [2] [TCXReader.jl: Julia package designed for parsing TCX files](https://github.com/firefly-cpp/TCXReader.jl)

  [3] [TCXWriter: A Tiny Library for writing/creating TCX files on Arduino](https://github.com/firefly-cpp/tcxwriter)



  Thanks go to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  <!-- prettier-ignore-start -->
  <!-- markdownlint-disable -->
  <table>
    <tbody>
      <tr>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/alenrajsp"><img src="https://avatars.githubusercontent.com/u/27721714?v=4?s=100" width="100px;" alt="alenrajsp"/><br /><sub><b>alenrajsp</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp" title="Code">💻</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp" title="Tests">⚠️</a> <a href="#example-alenrajsp" title="Examples">💡</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp" title="Documentation">📖</a> <a href="#ideas-alenrajsp" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Aalenrajsp" title="Bug reports">🐛</a> <a href="#maintenance-alenrajsp" title="Maintenance">🚧</a></td>
        <td align="center" valign="top" width="14.28%"><a href="http://www.iztok-jr-fister.eu/"><img src="https://avatars.githubusercontent.com/u/1633361?v=4?s=100" width="100px;" alt="Iztok Fister Jr."/><br /><sub><b>Iztok Fister Jr.</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp" title="Code">💻</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Afirefly-cpp" title="Bug reports">🐛</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp" title="Tests">⚠️</a> <a href="#example-firefly-cpp" title="Examples">💡</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp" title="Documentation">📖</a> <a href="#ideas-firefly-cpp" title="Ideas, Planning, & Feedback">🤔</a> <a href="#mentoring-firefly-cpp" title="Mentoring">🧑‍🏫</a> <a href="#platform-firefly-cpp" title="Packaging/porting to new platform">📦</a> <a href="#maintenance-firefly-cpp" title="Maintenance">🚧</a> <a href="#data-firefly-cpp" title="Data">🔣</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/luckyLukac"><img src="https://avatars.githubusercontent.com/u/73126820?v=4?s=100" width="100px;" alt="luckyLukac"/><br /><sub><b>luckyLukac</b></sub></a><br /><a href="#ideas-luckyLukac" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=luckyLukac" title="Code">💻</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AluckyLukac" title="Bug reports">🐛</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=luckyLukac" title="Tests">⚠️</a> <a href="#example-luckyLukac" title="Examples">💡</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/rhododendrom"><img src="https://avatars.githubusercontent.com/u/3198785?v=4?s=100" width="100px;" alt="rhododendrom"/><br /><sub><b>rhododendrom</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=rhododendrom" title="Code">💻</a> <a href="#design-rhododendrom" title="Design">🎨</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=rhododendrom" title="Documentation">📖</a> <a href="#ideas-rhododendrom" title="Ideas, Planning, & Feedback">🤔</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/lukapecnik"><img src="https://avatars.githubusercontent.com/u/23029992?v=4?s=100" width="100px;" alt="Luka Pečnik"/><br /><sub><b>Luka Pečnik</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik" title="Code">💻</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik" title="Documentation">📖</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik" title="Tests">⚠️</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Alukapecnik" title="Bug reports">🐛</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/spelap"><img src="https://avatars.githubusercontent.com/u/19300429?v=4?s=100" width="100px;" alt="spelap"/><br /><sub><b>spelap</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=spelap" title="Code">💻</a></td>
        <td align="center" valign="top" width="14.28%"><a href="http://carlosal1015.github.io"><img src="https://avatars.githubusercontent.com/u/21283014?v=4?s=100" width="100px;" alt="Oromion"/><br /><sub><b>Oromion</b></sub></a><br /><a href="#maintenance-carlosal1015" title="Maintenance">🚧</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Acarlosal1015" title="Bug reports">🐛</a></td>
      </tr>
      <tr>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/KoprivcLuka"><img src="https://avatars.githubusercontent.com/u/45632449?v=4?s=100" width="100px;" alt="Luka Koprivc"/><br /><sub><b>Luka Koprivc</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AKoprivcLuka" title="Bug reports">🐛</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/garyjellyarms"><img src="https://avatars.githubusercontent.com/u/79595804?v=4?s=100" width="100px;" alt="Nejc Graj"/><br /><sub><b>Nejc Graj</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Agaryjellyarms" title="Bug reports">🐛</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mtvrt123"><img src="https://avatars.githubusercontent.com/u/50879568?v=4?s=100" width="100px;" alt="MlinaricNejc"/><br /><sub><b>MlinaricNejc</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AMtvrt123" title="Bug reports">🐛</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/KukovecRok"><img src="https://avatars.githubusercontent.com/u/33880044?v=4?s=100" width="100px;" alt="Tatookie"/><br /><sub><b>Tatookie</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=KukovecRok" title="Code">💻</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AKukovecRok" title="Bug reports">🐛</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=KukovecRok" title="Tests">⚠️</a> <a href="#example-KukovecRok" title="Examples">💡</a> <a href="#maintenance-KukovecRok" title="Maintenance">🚧</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/zala-lahovnik"><img src="https://avatars.githubusercontent.com/u/105444201?v=4?s=100" width="100px;" alt="Zala Lahovnik"/><br /><sub><b>Zala Lahovnik</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=zala-lahovnik" title="Documentation">📖</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=zala-lahovnik" title="Code">💻</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/lahovniktadej"><img src="https://avatars.githubusercontent.com/u/57890734?v=4?s=100" width="100px;" alt="Tadej Lahovnik"/><br /><sub><b>Tadej Lahovnik</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lahovniktadej" title="Documentation">📖</a></td>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/HlisTilen"><img src="https://avatars.githubusercontent.com/u/44733158?v=4?s=100" width="100px;" alt="HlisTilen"/><br /><sub><b>HlisTilen</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=HlisTilen" title="Documentation">📖</a></td>
      </tr>
      <tr>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/MihaMi27"><img src="https://avatars.githubusercontent.com/u/82605811?v=4?s=100" width="100px;" alt="Miha Mirt"/><br /><sub><b>Miha Mirt</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=MihaMi27" title="Code">💻</a></td>
      </tr>
    </tbody>
  </table>

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

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

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


pkgId: a9038007d3e7c5880cadaf93f7d5b55689f7879d8d49a9eb6d7c704b83abe6bf
name: python-sportmonks-py-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for sportmonks-py
url: https://pypi.org/project/sportmonks-py/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sportmonks-py-0.0.1-1.src.rpm
location_href: Packages/python-sportmonks-py-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  Python Package for SportsMonks API

  Full details on the SportMonks API can be found [here](https://docs.sportmonks.com/football/)



  V3 of the SportMonks API is split into defined `Entities`, as listed below

  - Fixture
  - League, Season, Schedule, Stage and Round
  - Team, Player, Squad, Coach and Referee
  - Statistic
  - Expected
  - Standing and Topscorer
  - Odd and Prediction
  - Other

  SportMonks imposes rate limits per entity (3000 per hour), hence this package separates endpoints by entity. More information
  on entity rate limits can be viewed in the SportMonks documentation [here](https://docs.sportmonks.com/football/api/rate-limit).

  For brevity and ease of use, entities have been mapped to a shortened keyword as below

  | Entity Name | API Endpoint |
  | ------------|--------------|
  | Fixture     | fixture      |
   |League, Season, Schedule, Stage and Round | leagues      |
   | Team, Player, Squad, Coach and Referee | teams        |
  | Statistic | statistics   |
  | Expected | expected     |
  | Standing and Topscorer | standings    |
  | Odd and Prediction | odds         |
  | Other | misc         |

  Filtering

  The SportMonks API allows for filtering of data using query parameters. Below is an example of how to filter data using the SportMonks API.

  ```python
  from sportmonks_py import APIClient

  client = APIClient(sport="football", api_token=f"{SPORTMONKS_API_TOKEN}")

  fixture_id = [18528480]
  response = client.fixtures.get_fixtures(
          fixture_ids=fixture_id, includes=["venue", "sport", "events.player"]
      )

  for page in response:
      print(page)
  ```

  Nested includes are also supported. This allows retrieving more information about players who scored a goal, and can be done as below.

  ```python
  from sportmonks_py import APIClient

  client = APIClient(sport="football", api_token=f"{SPORTMONKS_API_TOKEN}")

  fixture_id = [18528480]
  response = client.fixtures.get_fixtures(
          fixture_ids=fixture_id, includes=["venue", "sport", "events.player"]
      )

  for page in response:
      print(page)
  ```

  Output
  ```doctest
  {'id': 18528480, 'sport_id': 1, 'league_id': 271, 'season_id': 19686, 'stage_id': 77457696, 'group_id': None, 'aggregate_id': None, 'round_id': 273989, 'state_id': 5, 'venue_id': 1708, 'name': 'AGF vs Viborg', 'starting_at': '2022-07-24 12:00:00', 'result_info': 'AGF won after full-time.', 'leg': '1/1', 'details': None, 'length': 90, 'placeholder': False, 'has_odds': True, 'has_premium_odds': False, 'starting_at_timestamp': 1658664000, 'events': [{'id': 36207309, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2447, 'type_id': 18, 'section': 'event', 'player_id': 37259998, 'related_player_id': 84031, 'player_name': 'S. Berger', 'related_player_name': 'Jeppe Grönning', 'result': None, 'info': None, 'addition': None, 'minute': 74, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 6, 'player': {'id': 37259998, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': 94694, 'position_id': 27, 'detailed_position_id': 156, 'type_id': 26, 'common_name': 'S. Brix', 'firstname': 'Sofus Berger', 'lastname': 'Brix', 'name': 'Sofus Berger Brix', 'display_name': 'Sofus Berger', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/30/37259998.png', 'height': 175, 'weight': None, 'date_of_birth': '2003-06-02', 'gender': 'male'}}, {'id': 36207389, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 18, 'section': 'event', 'player_id': 37509380, 'related_player_id': 151709, 'player_name': 'A. Grønbæk', 'related_player_name': 'Sigurd Haugen', 'result': None, 'info': None, 'addition': None, 'minute': 82, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 7, 'player': {'id': 37509380, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': None, 'position_id': 26, 'detailed_position_id': None, 'type_id': 26, 'common_name': 'A. Erlykke', 'firstname': 'Albert Grønbæk', 'lastname': 'Erlykke', 'name': 'Albert Grønbæk Erlykke', 'display_name': 'A. Grønbæk', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/4/37509380.png', 'height': 176, 'weight': None, 'date_of_birth': '2001-05-23', 'gender': 'male'}}, {'id': 36207402, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2447, 'type_id': 18, 'section': 'event', 'player_id': 6600016, 'related_player_id': 25679, 'player_name': 'Nils Mortimer', 'related_player_name': 'Jay-Roy Grot', 'result': None, 'info': None, 'addition': None, 'minute': 83, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 8, 'player': {'id': 6600016, 'sport_id': 1, 'country_id': 32, 'nationality_id': 32, 'city_id': None, 'position_id': 27, 'detailed_position_id': 156, 'type_id': 27, 'common_name': 'N. Mortimer Moreno', 'firstname': 'Nils', 'lastname': 'Mortimer Moreno', 'name': 'Nils Mortimer Moreno', 'display_name': 'Nils Mortimer', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/16/6600016.png', 'height': 178, 'weight': None, 'date_of_birth': '2001-06-11', 'gender': 'male'}}, {'id': 69156851, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 19, 'section': 'event', 'player_id': None, 'related_player_id': None, 'player_name': 'Uwe Rösler', 'related_player_name': None, 'result': None, 'info': 'Argument', 'addition': None, 'minute': 70, 'extra_minute': None, 'injured': None, 'on_bench': True, 'coach_id': 524374, 'sub_type_id': None, 'sort_order': 1, 'player': None}, {'id': 36207258, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2447, 'type_id': 14, 'section': 'event', 'player_id': 13980925, 'related_player_id': 83717, 'player_name': 'T. Bech', 'related_player_name': 'Christian Sörensen', 'result': '2-1', 'info': 'Header', 'addition': '3rd Goal', 'minute': 74, 'extra_minute': None, 'injured': None, 'on_bench': False, 'coach_id': None, 'sub_type_id': 1694, 'sort_order': 3, 'player': {'id': 13980925, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': None, 'position_id': 27, 'detailed_position_id': 151, 'type_id': 26, 'common_name': 'T. Kristensen', 'firstname': 'Tobias Bech', 'lastname': 'Kristensen', 'name': 'Tobias Bech Kristensen', 'display_name': 'Tobias Bech', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/29/13980925.png', 'height': 189, 'weight': None, 'date_of_birth': '2002-02-19', 'gender': 'male'}}, {'id': 36207297, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 14, 'section': 'event', 'player_id': 83665, 'related_player_id': 84602, 'player_name': 'Patrick Mortensen', 'related_player_name': 'Mads Emil Madsen', 'result': '3-1', 'info': 'Header', 'addition': '4th Goal', 'minute': 76, 'extra_minute': None, 'injured': None, 'on_bench': False, 'coach_id': None, 'sub_type_id': 1694, 'sort_order': 4, 'player': {'id': 83665, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': None, 'position_id': 27, 'detailed_position_id': 151, 'type_id': 27, 'common_name': 'P. Mortensen', 'firstname': 'Patrick', 'lastname': 'Mortensen', 'name': 'Patrick Mortensen', 'display_name': 'Patrick Mortensen', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/17/83665.png', 'height': 188, 'weight': 81, 'date_of_birth': '1989-07-13', 'gender': 'male'}}, {'id': 36207411, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 19, 'section': 'event', 'player_id': 83665, 'related_player_id': None, 'player_name': 'Patrick Mortensen', 'related_player_name': None, 'result': None, 'info': 'Foul', 'addition': '1st Yellow Card', 'minute': 87, 'extra_minute': None, 'injured': None, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 1, 'player': {'id': 83665, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': None, 'position_id': 27, 'detailed_position_id': 151, 'type_id': 27, 'common_name': 'P. Mortensen', 'firstname': 'Patrick', 'lastname': 'Mortensen', 'name': 'Patrick Mortensen', 'display_name': 'Patrick Mortensen', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/17/83665.png', 'height': 188, 'weight': 81, 'date_of_birth': '1989-07-13', 'gender': 'male'}}, {'id': 36207224, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 18, 'section': 'event', 'player_id': 85680, 'related_player_id': 84570, 'player_name': 'Frederik Brandhof', 'related_player_name': 'Mikael Anderson', 'result': None, 'info': None, 'addition': None, 'minute': 69, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 4, 'player': {'id': 85680, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': 84027, 'position_id': 26, 'detailed_position_id': 153, 'type_id': 26, 'common_name': 'F. Brandhof', 'firstname': 'Frederik', 'lastname': 'Brandhof', 'name': 'Frederik Brandhof', 'display_name': 'Frederik Brandhof', 'image_path': 'https://cdn.sportmonks.com/images/soccer/placeholder.png', 'height': 182, 'weight': None, 'date_of_birth': '1996-07-05', 'gender': 'male'}}, {'id': 36207234, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 18, 'section': 'event', 'player_id': 289659, 'related_player_id': 37324853, 'player_name': 'Gift Links', 'related_player_name': 'E. Kahl', 'result': None, 'info': None, 'addition': None, 'minute': 69, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 5, 'player': {'id': 289659, 'sport_id': 1, 'country_id': 146, 'nationality_id': 146, 'city_id': 76315, 'position_id': 26, 'detailed_position_id': 157, 'type_id': 26, 'common_name': 'G. Links', 'firstname': 'Gift', 'lastname': 'Links', 'name': 'Gift Links', 'display_name': 'Gift Links', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/27/289659.png', 'height': 170, 'weight': None, 'date_of_birth': '1998-10-02', 'gender': 'male'}}, {'id': 36207019, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 14, 'section': 'event', 'player_id': 84602, 'related_player_id': 151709, 'player_name': 'Mads Emil Madsen', 'related_player_name': 'Sigurd Haugen', 'result': '2-0', 'info': 'Shot', 'addition': '2nd Goal', 'minute': 60, 'extra_minute': None, 'injured': None, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 2, 'player': {'id': 84602, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': 83948, 'position_id': 26, 'detailed_position_id': 153, 'type_id': 26, 'common_name': 'M. Madsen', 'firstname': 'Mads Emil', 'lastname': 'Madsen', 'name': 'Mads Emil Madsen', 'display_name': 'Mads Emil Madsen', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/26/84602.png', 'height': 189, 'weight': 82, 'date_of_birth': '1998-01-14', 'gender': 'male'}}, {'id': 36207006, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2447, 'type_id': 18, 'section': 'event', 'player_id': 37455152, 'related_player_id': 25582, 'player_name': 'Mads Söndergaard', 'related_player_name': 'Clint Leemans', 'result': None, 'info': None, 'addition': None, 'minute': 58, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 3, 'player': {'id': 37455152, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': 94694, 'position_id': 26, 'detailed_position_id': 153, 'type_id': None, 'common_name': 'M. Clausen', 'firstname': 'Mads Søndergaard', 'lastname': 'Clausen', 'name': 'Mads Søndergaard Clausen', 'display_name': 'Mads Søndergaard', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/16/37455152.png', 'height': 178, 'weight': None, 'date_of_birth': '2002-12-26', 'gender': 'male'}}, {'id': 36207470, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2905, 'type_id': 18, 'section': 'event', 'player_id': 84076, 'related_player_id': 83665, 'player_name': 'Oliver Lund', 'related_player_name': 'Patrick Mortensen', 'result': None, 'info': None, 'addition': None, 'minute': 90, 'extra_minute': 2, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 9, 'player': {'id': 84076, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': None, 'position_id': 25, 'detailed_position_id': 155, 'type_id': 25, 'common_name': 'O. Lund Poulsen', 'firstname': 'Oliver', 'lastname': 'Lund Poulsen', 'name': 'Oliver Lund Poulsen', 'display_name': 'Oliver Lund', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/12/84076.png', 'height': 188, 'weight': 79, 'date_of_birth': '1990-08-21', 'gender': 'male'}}, {'id': 36207004, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2447, 'type_id': 18, 'section': 'event', 'player_id': 13980925, 'related_player_id': 10310276, 'player_name': 'T. Bech', 'related_player_name': 'Marokhy Ndione\xa0', 'result': None, 'info': None, 'addition': None, 'minute': 57, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 2, 'player': {'id': 13980925, 'sport_id': 1, 'country_id': 320, 'nationality_id': 320, 'city_id': None, 'position_id': 27, 'detailed_position_id': 151, 'type_id': 26, 'common_name': 'T. Kristensen', 'firstname': 'Tobias Bech', 'lastname': 'Kristensen', 'name': 'Tobias Bech Kristensen', 'display_name': 'Tobias Bech', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/29/13980925.png', 'height': 189, 'weight': None, 'date_of_birth': '2002-02-19', 'gender': 'male'}}, {'id': 36206881, 'fixture_id': 18528480, 'period_id': 4208988, 'participant_id': 2447, 'type_id': 18, 'section': 'event', 'player_id': 37341882, 'related_player_id': 30682, 'player_name': 'I. Said', 'related_player_name': 'Justin Lonwijk', 'result': None, 'info': None, 'addition': None, 'minute': 46, 'extra_minute': None, 'injured': False, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 1, 'player': {'id': 37341882, 'sport_id': 1, 'country_id': 716, 'nationality_id': 716, 'city_id': 42844, 'position_id': 27, 'detailed_position_id': 156, 'type_id': 26, 'common_name': 'I. Sa’id', 'firstname': 'Ibrahim', 'lastname': 'Sa’id', 'name': 'Ibrahim Sa’id', 'display_name': 'Ibrahim Said', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/26/37341882.png', 'height': 172, 'weight': None, 'date_of_birth': '2002-06-15', 'gender': 'male'}}, {'id': 36206444, 'fixture_id': 18528480, 'period_id': 4208948, 'participant_id': 2905, 'type_id': 14, 'section': 'event', 'player_id': 151709, 'related_player_id': None, 'player_name': 'Sigurd Haugen', 'related_player_name': None, 'result': '1-0', 'info': 'Shot', 'addition': '1st Goal', 'minute': 9, 'extra_minute': None, 'injured': None, 'on_bench': False, 'coach_id': None, 'sub_type_id': None, 'sort_order': 1, 'player': {'id': 151709, 'sport_id': 1, 'country_id': 1578, 'nationality_id': 1578, 'city_id': 36266, 'position_id': 27, 'detailed_position_id': 151, 'type_id': 27, 'common_name': 'S. Haugen', 'firstname': 'Sigurd Hauso', 'lastname': 'Haugen', 'name': 'Sigurd Hauso Haugen', 'display_name': 'S. Haugen', 'image_path': 'https://cdn.sportmonks.com/images/soccer/players/29/151709.png', 'height': 187, 'weight': None, 'date_of_birth': '1997-07-17', 'gender': 'male'}}
  ```

  The API backend is generic, so the same code can be used for other sports by changing the sport parameter in the client object.

  ```python
  from sportmonks_py import SportMonksClient

  client = SportMonksClient(sport="cricket", api_token=f"{SPORTMONKS_API_TOKEN}")

  fixture_id = [18528480]
  response = client.fixtures.get_fixtures(
          fixture_ids=fixture_id, includes=["venue", "sport", "events.player"]
      )

  for page in response:
      print(page)
  ```

rpm_license:
  MIT License  Copyright (c) 2024 cmccallan  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: 766126741bb8036cabe422bdef46821fefd8288611719650ba5668522e6b1950
name: python-spotapi-help
arch: noarch
version: 1.1.2
epoch: 0
release: 1
summary: Development documents and examples for spotapi
url: https://pypi.org/project/spotapi/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spotapi-1.1.2-1.src.rpm
location_href: Packages/python-spotapi-help-1.1.2-1.noarch.rpm
checksum_type: sha256
description:
  > **Disclaimer**: This repository and any associated code are provided "as is" without warranty of any kind, either expressed or implied. The author of this repository does not accept any responsibility for the use or misuse of this repository or its contents. The author does not endorse any actions or consequences arising from the use of this repository. Any copies, forks, or re-uploads made by other users are not the responsibility of the author. The repository is solely intended as a Proof Of Concept for educational purposes regarding the use of a service's private API. By using this repository, you acknowledge that the author makes no claims about the accuracy, legality, or safety of the code and accepts no liability for any issues that may arise. More information can be found [HERE](./LEGAL_NOTICE.md).



  Welcome to SpotAPI! This Python library is designed to interact with the private and public Spotify APIs, emulating the requests typically made through a web browser. This wrapper provides a convenient way to access Spotifyâ€™s rich set of features programmatically.

  **Note**: This project is intended solely for educational purposes and should be used responsibly. Accessing private endpoints and scraping data without proper authorization may violate Spotify's terms of service.



  1. [Introduction](#spotapi)
  2. [Features](#features)
  3. [Docs](#docs)
  4. [Installation](#installation)
  5. [Quick Examples](#quick-examples)
  6. [Import Cookies](#import-cookies)
  7. [Contributing](#contributing)
  8. [Roadmap](#roadmap)
  9. [License](#license)



  - **No Premium Required**: Unlike the Web API which requires Spotify Premium, **SpotAPI** requires no Spotify Premium at all!
  - **Public API Access**: Retrieve and manipulate public Spotify data such as playlists, albums, and tracks with ease.
  - **Private API Access**: Explore private Spotify endpoints to tailor your application to your needs.
  - **Ready to Use**: **SpotAPI** is designed for immediate integration, allowing you to accomplish tasks with just a few lines of code.
  - **No API Key Required**: Seamlessly use **SpotAPI** without needing a Spotify API key. Itâ€™s straightforward and hassle free!
  - **Browser-like Requests**: Accurately replicate the HTTP requests Spotify makes in the browser, providing a true to web experience while remaining undetected.

  Everything you can do with Spotify, **SpotAPI** can do with just a userâ€™s login credentials.



  - [**Artist.py**](./docs/artist.md)
  - [**Album.py**](./docs/album.md)
  - [**Creator.py**](./docs/creator.md)
  - [**Family.py**](./docs/family.md)
  - [**Login.py**](./docs/login.md)
  - [**Password.py**](./docs/password.md)
  - [**Player.py**](./docs/player.md)
  - [**Song.py**](./docs/song.md)
  - [**Playlist.py**](./docs/playlist.md)
  - [**Status.py**](./docs/status.md)
  - [**User.py**](./docs/user.md)



  ```
  pip install spotapi
  ```




  ```py
  from spotapi import (
      Login,
      Config,
      NoopLogger,
      solver_clients,
      PrivatePlaylist,
      MongoSaver
  )

  cfg = Config(
      solver=solver_clients.Capsolver("YOUR_API_KEY", proxy="YOUR_PROXY"), # Proxy is optional
      logger=NoopLogger(),
      
  )

  instance = Login(cfg, "YOUR_PASSWORD", email="YOUR_EMAIL")

  instance.login()


  playlist = PrivatePlaylist(instance)
  playlist.create_playlist("SpotAPI Showcase!")


  instance.save(MongoSaver())
  ```


  ```py
  """Here's the example from spotipy https://github.com/spotipy-dev/spotipy?tab=readme-ov-file#quick-start"""
  from spotapi import Song

  song = Song()
  gen = song.paginate_songs("weezer")


  for batch in gen:
      for idx, item in enumerate(batch):
          print(idx, item['item']['data']['name'])




  songs = song.query_songs("weezer", limit=20)
  data = songs["data"]["searchV2"]["tracksV2"]["items"]
  for idx, item in enumerate(data):
      print(idx, item['item']['data']['name'])
  ```

  ```
  0 Island In The Sun
  1 Say It Ain't So
  2 Buddy Holly
  .
  .
  .
  18 Holiday
  19 We Are All On d***s
  ```


  If you prefer not to use a third party CAPTCHA solver, you can import cookies to manage your session.



  1. **Choose a Session Saver**:
     - Select a session saver for storing your session data.
     - For simplicity, you should use `JSONSaver`, especially if performance or quantity of sessions is not a big concern.

  2. **Prepare Session Data**:
     - Create an object with the following keys:
       - **`identifier`**: This should be your email address or username.
       - **`cookies`**: These are the cookies you obtain when logged in. To get these cookies, visit [Spotify](https://open.spotify.com/), log in, and copy the cookies from your browser.
         - It can be a dict[str, str] or a string representation

  3. **Load the Session**:
     - Use `Login.from_saver` (or your own implementation) to load the session from cache. This will enable you to use Spotify with a fully functional session without needing additional **CAPTCHA solving**.


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


  > I'll most likely do these if the project gains some traction

  - [ ] No Captcha For Login (**100 Stars**)
  - [x] In Depth Documentation
  - [x] Websocket Listener
  - [x] Player
  - [ ] More wrappers around this project


  This project is licensed under the **GPL 3.0** License. See [LICENSE](https://choosealicense.com/licenses/gpl-3.0/) for details.


pkgId: 5d547096dfbb84294950a4a9a96e5e84efa9202da935221aa9f95ad6aaa3885f
name: python-spotcrates-help
arch: noarch
version: 0.7.1
epoch: 0
release: 1
summary: Development documents and examples for spotcrates
url: https://pypi.org/project/spotcrates/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spotcrates-0.7.1-1.src.rpm
location_href: Packages/python-spotcrates-help-0.7.1-1.noarch.rpm
checksum_type: sha256
description:
  ![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/cmayes/3c8214e2bd942821496440b93acd3582/raw/covbadge.json)





  Spotcrates requires [Python](https://www.python.org/) 10 or newer. You will also need a Spotify account.



  ```shell
  pip install spotcrates
  ```



  Spotcrates will need, at minimum, credentials for accessing your Spotify account. You may also specify
  playlists to subscribe to, among other settings.



  Spotcrates can create an initial configuration file for itself. It will write to the specified configuration file
  location, i.e. what you configure with `-c` or `--config_file`. If you don't specify anything, Spotcrates will use
  a platform-specific configuration file location, e.g. `/home/$USER/.config/spotcrates/spotcrates_config.toml`
  on Linux. The output of `spotcrates -h` includes the default location for your configuration file.

  ```shell
  spotcrates init-config
  ```



  This bit is not terribly user-friendly as it's assumed that developers will be the ones creating these credentials.
  Since this app runs as a script on your own machine, you'll need to create your own credentials. You will need
  a `Client ID` and a `Client Secret`. The process is a little involved, and the
  [Spotify docs on the subject](https://developer.spotify.com/documentation/general/guides/authorization/app-settings/)
  are a bit opaque for the casual user (as I very recently was). These pages do a pretty good job describing
  the process:

  - https://support.heateor.com/get-spotify-client-id-client-secret/
  - https://cran.r-project.org/web/packages/spotidy/vignettes/Connecting-with-the-Spotify-API.html

  Note that these projects are mainly interested in extracting data for their respective applications, so the
  instructions are geared to that end.

  Once you have your client ID and client secret, paste them into your Spotcrates configuration file in the `[spotify]`
  section:

  ```toml
  [spotify]
  client_id = "(your ID here)"
  client_secret = "(your secret here)"
  ```



  Spotcrates will request and cache authorization info the first time you use your Spotify credentials. The cache location
  is platform-specific. On Linux, it's usually at `/home/$USER/.cache/spotcrates/spotcrates_auth_cache`.

  To trigger this step, you can try listing your playlists:

  `spotcrates list-playlists`

  Spotcrates will initiate an authorization process with Spotify via your default browser. If the authorization
  succeeds, the browser tab will close itself, and your playlists will be listed on the command line.



  These settings can be changed from their defaults, though you won't usually need to do so. They are defined
  under the `[spotify]` config file heading.

  - `auth_cache`: The location of the Spotify authorization cache. This defaults to your platform's default cache
      location base, plus `spotcrates/spotcrates_auth_cache`.
  - `auth_scopes`: A list of authorization scopes that Spotcrates requests. The default scopes are
      `["playlist-modify-private", "playlist-read-private"]`.



  These settings control playlist-related commands like [daily](#daily) or [randomize](#randomize). They
  can be customized under the [playlists] heading in the configuration file.

  - `daily_mix_target`: The name of the playlist to target, which is created if it does not exist. Defaults to "Now."
  - `daily_mix_prefix`: The prefix of the "Daily Mix" playlists to be aggregated. Defaults to "Daily Mix."
  - `daily_mix_excludes`: The prefix of the playlists that contain tracks to exclude. Defaults to "Overplayed."



  These settings are for the [subscriptions](#subscriptions) command. They can be configured under the `[subscriptions]`
  configuration file heading.

  - `subscriptions_target`: The name of the playlists where the new subscriptions will be appended. Created if
      the playlist does not exist. Defaults to `NewSubscriptions`.
  - `max_age`: The maximum age of a track in a playlist for it to be considered "new." Values can be English
      expressions like `2 weeks` or `96 hours`. Defaults to `3 days`.
  - `include_zero_timestamps`: Whether to include tracks with an `added_at` of `1970-01-01T00:00:00Z`. Some
      Spotify playlists do not set a useful `added_at` value. This flag includes those tracks despite
      their not passing the `max_age` test.



  These are the playlist groups used by [subscriptions](#subscriptions) and related commands. All groups are included
  by default. The values are the "spotify IDs" listed in the [list-playlists](#list-playlists) command. These playlist
  groups are configured under the [subscriptions.playlists] section of the configuration file.


  ```toml
  [subscriptions.playlists]


  quiet = ["37i9dQZF1DX7Ocjwy96xTX", "38rrtWgflrw7grB37aMlsO", "37i9dQZF1DX62XscWX9t6h",
  "67waO0NR8HTySxtB7wfMBZ", "6bUIofrj5PWNIeb67DbUqf"]

  noisy = ["2uiYiQFpynkWCpIXcBGir9", "37i9dQZF1DX8gDIpdqp1XJ", "3JEvwuKbVKoggEA75gWqET"]


  jazz = ["37i9dQZF1DX7YCknf2jT6s", "37i9dQZF1DWUb0uBnlJuTi", "4xRrCdkn4r5lrDOElek5oC",
  "2puFFdGTID0iJdQtjLvhal"]
  ```



  The installation script puts the command `spotcrates` in your Python environment
  (e.g. `/.pyenv/shims/spotcrates`). The command `spotcrates commands` lists all of the
  commands available along with a short description of each.

  Note that Spotcrates will accept the shortest unique command substring, so for example you can run
  `spotcrates sub` for the `subscriptions` command.


  `spotcrates daily` collects the contents of the "Daily Mix" playlists, filters them
  against an exclusion list ("Overplayed" by default), and adds them to the end of
  a target list ("Now" by default).


  `spotcrates subscriptions` adds new tracks from configured playlists to the target playlist,
  filtering for excluded entries. Three days is the default maximum age for a track to be
  considered "new."


  `spotcrates list-playlists` lists playlists' name, owner, track count, and description.
  The command accepts `-f` for filter expressions and `-s` for sort expressions. (TODO:
  add description of filter and search expressions and link to it here)



  The command `list-playlists` accepts search filters passed via the `-f` option. Multiple
  filter expressions are separated by commas.



  `spotcrates li -f jazz`

  List playlists where any field contains the string "jazz" (case-insensitive)

  ```
  PLAYLIST NAME                    SIZE  ID                       OWNER            DESCRIPTION
  Jazz Piano Classics              100   37i9dQZF1DX5q7wCXFrkHh   spotify          The classic piano recordings in Jazz. Cover: Oscar Peterson
  Acid Jazz                        90    37i9dQZF1DWXHghfFFOaS6   spotify          Where hip-hop and soul meets jazz. Cover: Digable Planets
  Jazz Funk                        6     61Q9DgzF3f1ULr3i1uRyUy   cmayes3
  Acid Jazz                        3     1h6rEPX9qRpBCBbjuAysMz   cmayes3
  General Jazz                     513   1j6ndSnyYn6oUlnwpGiRWc   cmayes3
  Jazz Funk (Instrumental)         272   4xRrCdkn4r5lrDOElek5oC   1226030890
  Instrumental Acid Jazz Mix       50    37i9dQZF1EIgnEnn8SKPjM   spotify          Instrumental Acid Jazz music picked just for you
  State of Jazz                    100   37i9dQZF1DX7YCknf2jT6s   spotify          New jazz for open minds. Cover: Walter Smith III
  Jazz-Funk                        200   37i9dQZF1DWUb0uBnlJuTi   spotify          Jazz. But funky. Cover: Takuya Kuroda
  Jazz                             1     6VH2cw8n115fbQ7Ls2wzdR   cmayes3
  FaLaLaLaLa GREAT BIG Christmas V 4051  6A2Kj9cWUpuu0UcEbWVf5E   kingofjingaling  Over 170 hours of classic Christmas music. The focus is on classic Christma
  ```

  `spotcrates li -f o:spotify,n:rise`

  List playlists where the owner contains `spotify` and name contains `rise`.

  ```
  PLAYLIST NAME                    SIZE  ID                       OWNER            DESCRIPTION
  Rise                             230   37i9dQZF1DWUOhRIDwDB7M   spotify          Positive and uplifting ambient instrumental tracks.
  ```

  `spotcrates li -f n:ends:villains`

  List playlists where name ends with `villains`.

  ```
  PLAYLIST NAME                    SIZE  ID                       OWNER            DESCRIPTION
  classical music for villains     66    0zkl7eKzuUit1QRPVKtga2   225uye2hek5id23t
  ```



  The default search field is `all`.

  - spotify_id
  - playlist_name
  - size
  - owner
  - playlist_description
  - all: Search any/all of the above fields.



  The default search type is `contains`.

  - contains
  - equals
  - starts
  - ends
  - greater
  - less
  - greater_equal
  - less_equal



  The command `list-playlists` accepts sort filters passed via the `-s` option. Multiple
  sort expressions are separated by commas.



  `spotcrates li -f n:jazz -s name`

  Name contains `jazz`; sort by name ascending.

  ```
  PLAYLIST NAME                    SIZE  ID                       OWNER            DESCRIPTION
  Acid Jazz                        90    37i9dQZF1DWXHghfFFOaS6   spotify          Where hip-hop and soul meets jazz. Cover: Digable Planets
  Acid Jazz                        3     1h6rEPX9qRpBCBbjuAysMz   cmayes3
  General Jazz                     513   1j6ndSnyYn6oUlnwpGiRWc   cmayes3
  Instrumental Acid Jazz Mix       50    37i9dQZF1EIgnEnn8SKPjM   spotify          Instrumental Acid Jazz music picked just for you
  Jazz                             1     6VH2cw8n115fbQ7Ls2wzdR   cmayes3
  Jazz Funk                        6     61Q9DgzF3f1ULr3i1uRyUy   cmayes3
  Jazz Funk (Instrumental)         272   4xRrCdkn4r5lrDOElek5oC   1226030890
  Jazz Piano Classics              100   37i9dQZF1DX5q7wCXFrkHh   spotify          The classic piano recordings in Jazz. Cover: Oscar Peterson
  Jazz-Funk                        200   37i9dQZF1DWUb0uBnlJuTi   spotify          Jazz. But funky. Cover: Takuya Kuroda
  State of Jazz                    100   37i9dQZF1DX7YCknf2jT6s   spotify          New jazz for open minds. Cover: Walter Smith III
  ```

  `spotcrates li -f jazz,size:ge:100 -s size:desc`

  Any field contains `jazz`; size is greater than or equal to 100, sort by size descending.

  ```
  PLAYLIST NAME                    SIZE  ID                       OWNER            DESCRIPTION
  FaLaLaLaLa GREAT BIG Christmas V 4051  6A2Kj9cWUpuu0UcEbWVf5E   kingofjingaling  Over 170 hours of classic Christmas music. The focus is on classic Christma
  General Jazz                     513   1j6ndSnyYn6oUlnwpGiRWc   cmayes3
  Jazz Funk (Instrumental)         272   4xRrCdkn4r5lrDOElek5oC   1226030890
  Jazz-Funk                        200   37i9dQZF1DWUb0uBnlJuTi   spotify          Jazz. But funky. Cover: Takuya Kuroda
  Jazz Piano Classics              100   37i9dQZF1DX5q7wCXFrkHh   spotify          The classic piano recordings in Jazz. Cover: Oscar Peterson
  State of Jazz                    100   37i9dQZF1DX7YCknf2jT6s   spotify          New jazz for open minds. Cover: Walter Smith III
  ```



  The default sort type is `ascending`, i.e. a-z.

  - ascending
  - descending


  `spotcrates randomize (playlist1) (playlist2)...` randomizes the playlists with the given names,
  IDs, or in the given collections.


  `spotcrates copy (source) (dest)` copies a playlist into a new playlist. You may optionally specify
  a destination playlist name; the default is to name the destination based on the source name with
  the general form `f"{source_name}-{count:02d}"`.


  `spotcrates commands` displays a summary of the available commands.


pkgId: dceac7a717609309356c66ab1f710663c835b3206dc9be44eb3ad67aebe91725
name: python-spotify-cli-linux-help
arch: noarch
version: 1.9.0
epoch: 0
release: 1
summary: Development documents and examples for spotify-cli-linux
url: https://github.com/pwittchen/spotify-cli-linux
rpm_license: GPL 3.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spotify-cli-linux-1.9.0-1.src.rpm
location_href: Packages/python-spotify-cli-linux-help-1.9.0-1.noarch.rpm
checksum_type: sha256
description:
  ```
  pip install spotify-cli-linux
  ```
  **hint #1**: if you encounter problems during installation, try to call command with `sudo`
  **hint #2**: if you still have problems (e.g. with resolving project dependencies), try to call `pip3` instead of `pip`
  if you have any problems with `pip` or `pip3`, you can try to install the script in the alternative way as a workaround:
  ```
  git clone git@github.com:pwittchen/spotify-cli-linux.git
  cd spotify-cli-linux
  sudo cp spotifycli/spotifycli.py /usr/local/bin/spotifycli
  ```


pkgId: 10b357f130371d31404cd937bb6ba85c77e9aadc536a57baed27e3abc73f20fc
name: python-spotify-history-reader-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for spotify-history-reader
url: https://pypi.org/project/spotify-history-reader/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spotify-history-reader-0.1.0-1.src.rpm
location_href: Packages/python-spotify-history-reader-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  A simple tool to read Spotify's extended streaming history. You can follow [this guide](https://support.stats.fm/docs/import/spotify-import/) to get yours.




  ```json
  [
      ...,
      {
          "conn_country": "SI",
          "episode_name": null,
          "episode_show_name": null,
          "incognito_mode": false,
          "ip_addr_decrypted": "1.2.3.4",
          "master_metadata_album_album_name": "Humanz",
          "master_metadata_album_artist_name": "Gorillaz",
          "master_metadata_track_name": "Andromeda (feat. DRAM)",
          "ms_played": 8778,
          "offline": false,
          "offline_timestamp": 1572964071330,
          "platform": "OS X 10.15.1 [x86 8]",
          "reason_end": "endplay",
          "reason_start": "clickrow",
          "shuffle": true,
          "skipped": null,
          "spotify_episode_uri": null,
          "spotify_track_uri": "spotify:track:2C0KFbb4v9CNWR5c9jWcKC",
          "ts": "2019-11-05T14:28:00Z",
          "user_agent_decrypted": "unknown",
          "username": "username"
      },
      ...,
  ]
  ```





  TBD


pkgId: 30ccaf0a517297ab1be3a5612487ca0150b4b6520eb8ad3f936eab70bef1d7d6
name: python-spotpython-help
arch: noarch
version: 0.19.3
epoch: 0
release: 1
summary: Development documents and examples for spotpython
url: https://www.spotseven.de
rpm_license: AGPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spotpython-0.19.3-1.src.rpm
location_href: Packages/python-spotpython-help-0.19.3-1.noarch.rpm
checksum_type: sha256
description:
  <p align="left">
    <img height="200" src="img/spotLogo.png" alt="spot_logo">
  </p>



  Sequential Parameter Optimization in Python

  * spotpython is a Python version of the well-known hyperparameter tuner SPOT, which has been developed in the R programming environment for statistical analysis for over a decade [bart21i].
  * spotpython is a sequential model-based optimization (SMBO) method [BLP05].




  * Installation can be done with `pip`:

  `pip install spotpython`



  * Hyperparameter-tuning Cookbook: A guide for scikit-learn, PyTorch, river, and spotpython. Available at [https://sequential-parameter-optimization.github.io/spotpython/](https://sequential-parameter-optimization.github.io/spotpython/).

  * [Bartz-Beielstein (2023). PyTorch Hyperparameter Tuning --- A Tutorial for spotpython (Working Paper)](https://arxiv.org/abs/2305.11930).

      > **Abstract**: The goal of hyperparameter tuning (or hyperparameter optimization) is to optimize the hyperparameters to improve the performance of the machine or deep learning model. spotpython ("Sequential Parameter Optimization Toolbox in Python") is the Python version of the well-known hyperparameter tuner SPOT, which has been developed in the R programming environment for statistical analysis for over a decade. PyTorch is an optimized tensor library for deep learning using GPUs and CPUs. This document shows how to integrate the spotpython hyperparameter tuner into the PyTorch training workflow.  As an example, the results of the CIFAR10 image classifier are used. In addition to an introduction to spotpython, this tutorial also includes a brief comparison with Ray Tune, a Python library for running experiments and tuning hyperparameters. This comparison is based on the PyTorch hyperparameter tuning tutorial. The advantages and disadvantages of both approaches are discussed. We show that spotpython achieves similar or even better results while being more flexible and transparent than Ray Tune.




  * Some of the advantages of `spotpython` are:

    - Numerical and categorical hyperparameters.
    - Powerful surrogate models.
    - Flexible approach and easy to use.
    - Simple JSON files for the specification of the hyperparameters.
    - Extension of default and user specified network classes.
    - Noise handling techniques.
    - Tensorboard interaction.



  ```bibtex
  @ARTICLE{bart23earxiv,
         author = {{Bartz-Beielstein}, Thomas},
          title = "{PyTorch Hyperparameter Tuning -- A Tutorial for spotpython}",
        journal = {arXiv e-prints},
       keywords = {Computer Science - Machine Learning, Computer Science - Artificial Intelligence, Mathematics - Numerical Analysis, 68T07, A.1, B.8.0, G.1.6, G.4, I.2.8},
           year = 2023,
          month = may,
            eid = {arXiv:2305.11930},
          pages = {arXiv:2305.11930},
            doi = {10.48550/arXiv.2305.11930},
  archivePrefix = {arXiv},
         eprint = {2305.11930},
   primaryClass = {cs.LG},
         adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230511930B},
        adsnote = {Provided by the SAO/NASA Astrophysics Data System}
  }
  ```


  ```bibtex
  @book{bart21i,
  	editor = {Bartz,Eva and Bartz-Beielstein, Thomas and Zaefferer, Martin and Mersmann, Olaf},
  	isbn = {ISBN 978-981-19-5169-5},
  	keywords = {bartzPublic},
  	note = {in print},
  	publisher = {Springer},
  	title = {{Hyperparameter Tuning for Machine and Deep Learning with R - A Practical Guide}},
  	year = {2022}
    url = {https://link.springer.com/book/10.1007/978-981-19-5170-1}
  }
  ```

  ```bibtex
  @inproceedings{BLP05,
  	author = {Bartz-Beielstein, Thomas and Lasarczyk, Christian and Preuss, Mike},
  	title = {{Sequential Parameter Optimization}},
  	booktitle = {{Proceedings 2005 Congress on Evolutionary Computation (CEC'05), Edinburgh, Scotland}},
  	date-added = {2016-10-30 11:44:52 +0000},
  	date-modified = {2021-07-22 12:12:43 +0200},
  	doi = {10.1109/CEC.2005.1554761},
  	editor = {McKay, B and others},
  	isbn = {0-7803-9363-5},
  	issn = {1089-778X},
  	pages = {773--780},
  	publisher = {{IEEE Press}},
    address = {Piscataway NJ},
  	year = {2005},
  	url= {http://dx.doi.org/10.1109/CEC.2005.1554761}
    }

  ```



  * This appendix contains some information on how to setup the development environment for spotpython.
  Information provided here is not required for the installation of spotpython.



  Follow the Google Python Style Guide from [https://google.github.io/styleguide/pyguide.html]([https://google.github.io/styleguide/pyguide.html).




  * Mac Users: Install [brew](https://brew.sh/index_de)
    * `brew install python` and `brew install graphviz` etc.

  * Generate and activate a virtual environment, see [venv](https://docs.python.org/3/library/venv.html), e.g.,
    * `cd ~; python3 -m venv .venv`
    * `source ~/.venv/bin/activate`



  * `python -m pip install mkdocs mkdocs-gen-files mkdocs-literate-nav mkdocs-section-index mkdocs-material`
  * `mkdocs build`
  * `mkdocs serve`
  * `http://127.0.0.1:8000/`




  * [scipy lecture notes: optimizing code](https://scipy-lectures.org/advanced/optimizing/index.html)



  * Optional: Install [visualstudio](https://code.visualstudio.com)
  * Optional: Install [quarto](https://quarto.org)






  * This information is based on [https://packaging.python.org/en/latest/tutorials/packaging-projects/](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  * Information is stored in `pyproject.toml` (`setup.py` is not used anymore.)
  * A `src` folder is used for the package sources.
  * The following files are used for the package building:
     * `pyproject.toml`: see [pyproject.toml](./pyproject.toml).
     * Important: Follow the instructions from [https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html](https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html) for including data files (like *.csv, *.tar, etc.). These files can be specified in the following `MANIFEST` file:
       * `MANIFEST`: see [MANIFEST](MANIFEST.in). It describes the data files to be included, e.g.:
         * `include src/spotpython/data/*.rst`
      * `LICENSE`: see [LICENSE](./LICENSE)



  * Perform the following steps to install the package:
    * Make sure you have the latest version of PyPA’s build installed:
      * `python3 -m pip install --upgrade build`
    * Start the package building process via:  `python3 -m build`
    * This command should output a lot of text and once completed should generate two files in the `dist` directory.
    * You can use the local `spotpython*.tar.gz` file from the `dist` folder for your package installation with `pip`, e.g.;
    * `python3 -m pip install ./dist/spotpython-0.0.1.tar.gz`


pkgId: d7ff0f1afdb028cffb57dfdab8ef5d439a211ac4ca97c8f53137b2b94175db1a
name: python-spsdk-mcu-link-help
arch: noarch
version: 0.5.0
epoch: 0
release: 1
summary: Development documents and examples for spsdk-mcu-link
url: https://github.com/nxp-mcuxpresso/spsdk_plugins/tree/master/mcu_link
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spsdk-mcu-link-0.5.0-1.src.rpm
location_href: Packages/python-spsdk-mcu-link-help-0.5.0-1.noarch.rpm
checksum_type: sha256
description:
      NXP SPSDK MCU-Link debug probe support plugin for NXP LPC-Link/MCU-Link hardware debug probes. This plugin enables seamless integration with NXP's debug hardware.
      * Free software: BSD-3-Clause
      * Documentation: https://github.com/nxp-mcuxpresso/spsdk_plugins?tab=readme-ov-file#readme


pkgId: 638b67b7d5efc92b5c6193434008efbe04b1c574b672a90b18fd05e328830979
name: python-spurt-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for spurt
url: https://github.com/isce-framework/spurt
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spurt-0.1.0-1.src.rpm
location_href: Packages/python-spurt-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  Spatial and Temporal phase Unwrapping for InSAR time-series



  Copyright (c) 2024 California Institute of Technology ("Caltech"). U.S.
  Government sponsorship acknowledged.

  All rights reserved.

  This software is licensed under your choice of BSD-3-Clause or Apache-2.0
  licenses. The terms of each license can be found in the accompanying
  [LICENSE-BSD-3-Clause] and [LICENSE-Apache-2.0] files, respectively.

  [LICENSE-BSD-3-Clause]: LICENSE-BSD-3-Clause
  [LICENSE-Apache-2.0]: LICENSE-Apache-2.0

  SPDX-License-Identifier: BSD-3-Clause OR Apache-2.0


pkgId: aff734fc1f13eb17e821bd5a699c9c0f405866b74955a564dbaf8b7ed2b9aebf
name: python-spyctl-help
arch: noarch
version: 0.19.2
epoch: 0
release: 1
summary: Development documents and examples for spyctl
url: https://spyctl.readthedocs.io/en/latest/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spyctl-0.19.2-1.src.rpm
location_href: Packages/python-spyctl-help-0.19.2-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
      <br>
  </p>

  Follow the [Installation Guide](https://docs.spyderbat.com/installation/spyctl)
  Or if you already have Spyctl installed explore the [Tutorials](https://docs.spyderbat.com/tutorials) section of the Spyderbat Docs

  If you need support, you can reach out to us at dev@spyderbat.com or on our [community Slack workspace](https://join.slack.com/t/spyderbatcommunity/shared_invite/zt-1ncqumr1c-WVVRwJTNfTQSW2Y8_maGOw)

  - [@brent-spyder](https://github.com/brent-spyder) - Developer
  - [@spyder-kyle](https://github.com/spyder-kyle) - Developer

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


pkgId: 6407cc0e07bbb46be05439baa68e48f19dacc58714b08e197412f9a88f5953eb
name: python-spyder-watchlist-help
arch: noarch
version: 1.1.1
epoch: 0
release: 1
summary: Development documents and examples for spyder-watchlist
url: https://pypi.org/project/spyder-watchlist/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spyder-watchlist-1.1.1-1.src.rpm
location_href: Packages/python-spyder-watchlist-help-1.1.1-1.noarch.rpm
checksum_type: sha256
description:
  Watchlist plugin for the debugger in the Spyder IDE

  A watchlist is a functionality some IDEs offer while debugging code. It is
  related to the display of all variables accessible in the current scope (aka
  Variable Explorer in Spyder). But there is an important distinction: A Watchlist
  consists of a user-definable list of expressions. These expressions are
  evaluated after each debugger step and the result of the evaluation is
  displayed. See [here](https://github.com/spyder-ide/spyder/issues/16438) for a
  screencast which demonstrates the plugin.




      pip install spyder-watchlist



  * Any Python expression can be entered. The Watchlist displays the stringified
    result of the evaluation. In terms of Python code `value =
    str(eval(expression, globals, locals))`.

    > **Warning**
    > This makes the Watchlist a very powerful tool, but this comes at a cost: Any
    > side effects of an expression will affect your execution environment.

  * The values of expressions are refreshed whenever they might have changed
    (after executing commands in the IPython Console and after debugger commands).
  * The list of expressions can be modified at any time; see [Usage](#usage) for
    details.
  * The value of an expression is shown with bold font if it has changed
  * The value of an invalid expression is show as `<exception name>`. Hover the
    mouse over the value to show the full exception message in a tooltip.



  * Rearranging of expressions: Use Drag & Drop
  * Changing an existing expression: Double click on expression (first column)
  * Adding a new expression
    * Toolbar `+` button
    * Menu entry in right-click menu (anywhere in the table)
    * Double click at the end of the table (only possible if there is no
      scrollbar)
    * Drag & Drop text. If the text consists of multiple lines, each line is added
      as an expression.
  * Removing expressions. The following actions remove the currently selected
    expressions:
    * Toolbar `-` button
    * Menu entry in right-click menu
    * `Del` keyboard key
  * There is also a “Remove all expression” action in the toolbar and right-click
    menu



  * The value of variables in the current scope can be changed in Spyder’s
    Variable Explorer plugin. Expressions in the Watchlist depending on any
    variable changed in the Variable Explorer will display an outdated value. The
    new expression value is displayed after a refresh of the Watchlist. A
    refresh is trigged by:
    * Executing commands in the IPython Console. Pressing Enter with an empty
      input prompt is sufficient.
    * Modifying the list of expressions in some way (add, remove or edit an
      expression)


pkgId: 20ee9a7874d843e712c56089fe854463864f85cb6fdb8a423bd77ff4ba1062c5
name: python-spypoint-api-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for spypoint-api
url: https://github.com/happydev-ca/spypoint-api
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-spypoint-api-0.1.2-1.src.rpm
location_href: Packages/python-spypoint-api-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  [![Build, test and publish](https://github.com/happydev-ca/spypoint-api/actions/workflows/publish.yml/badge.svg)](https://github.com/happydev-ca/spypoint-api/actions/workflows/publish.yml)



  Library to communicate with Spypoint REST API.



  ```python
  import aiohttp
  import asyncio
  import os

  from spypointapi import SpypointApi


  async def run():
      async with aiohttp.ClientSession() as session:
          api = SpypointApi(os.environ['EMAIL'], os.environ['PASSWORD'], session)

          cameras = await api.async_get_cameras()
          for camera in cameras:
              print(camera)


  asyncio.run(run())
  ```



  ```shell
  make install
  make test
  make build
  ```



  ```shell
  make release bump=patch|minor|major
  ```


pkgId: b6df02ffd0c8df043e8064319270da460c1899d7c859d2352bf7228666bd97e1
name: python-sqfa-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for sqfa
url: https://pypi.org/project/sqfa/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqfa-0.1.0-1.src.rpm
location_href: Packages/python-sqfa-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/dherrera1911/sqfa/actions/workflows/install.yml/badge.svg)](https://github.com/dherrera1911/sqfa/actions/workflows/install.yml)
  [![Tests Status](https://github.com/dherrera1911/sqfa/actions/workflows/tests.yml/badge.svg)](https://github.com/dherrera1911/sqfa/actions/workflows/tests.yml)
  [![Documentation Status](https://readthedocs.org/projects/sqfa/badge/?version=latest)](https://sqfa.readthedocs.io/en/latest/?badge=latest)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/dherrera1911/sqfa?tab=MIT-1-ov-file)
  ![Python version](https://img.shields.io/badge/python-3.9|3.10|3.11|3.12-blue.svg)
  [![codecov](https://codecov.io/gh/dherrera1911/sqfa/graph/badge.svg?token=NN44R5G18I)](https://codecov.io/gh/dherrera1911/sqfa)


  Supervised Quadratic Feature Analysis (SQFA) is a supervised dimensionality
  reduction technique. It learns a set of linear features that
  maximize the differences in second-order statistics between
  classes. The `sqfa` package provides an implementation of the SQFA algorithm in PyTorch.

  SQFA uses a geometric loss on the class-specific second moment matrices,
  considered as points in the SPD manifold. Intuitively, the distance between
  the SPD matrices of different classes is a measure of their second-order
  dissimilarity. SQFA finds the features that maximize this distance.

  For detailed information on the method, see the
  [sqfa package tutorials](https://sqfa.readthedocs.io/en/latest/tutorials/spd_geometry.html).



  The `sqfa` package provides a class `SQFA` that can be used to train the
  model. The class has an API similar to that of `sklearn` models.
  An example of how to use the `SQFA` class is shown below:

  ```python
  import sqfa
  import torchvision



  trainset = torchvision.datasets.MNIST(
      root="./data", train=True, download=True
  )
  x = trainset.data.reshape(-1, 28 * 28).float()
  y = trainset.targets

  x = x / (x.std() * 28.0)
  x = x - x.mean(dim=0, keepdim=True)



  model = sqfa.model.SQFA(
      n_dim=x.shape[-1],
      n_filters=4,
      feature_noise=0.01,
  )




  model.fit(X=x, y=y)


  data_stats = sqfa.statistics.class_statistics(x, y)
  model.fit(data_scatters=data_stats["second_moments"])



  x_transformed = model.transform(x).detach()
  ```

  See the tutorials for more details on the model usage and behavior.





  We recommend installing the package in a virtual environment. For this,
  you can first install `miniconda`
  ([install instructions link](https://docs.anaconda.com/miniconda/install/#quick-command-line-install)),
  and then create a virtual environment with Python 3.11 with the following
  shell command:

  ```bash
  conda create -n my-sqfa python=3.11
  ```

  You can then activate the virtual environment with the following command:

  ```bash
  conda activate my-sqfa
  ```

  You should activate the `my-sqfa` environment to install the package, and every
  time you want to use it.



  You can install `sqfa` with `pip` by running the following commands in
  the shell:

  ```bash
  git clone git@github.com:dherrera1911/sqfa.git
  cd sqfa
  pip install -e .
  ```

  The first command clones the repository, the second command moves to the
  repository directory, and the third command installs the package in
  editable mode. If you want to install the dependencies needed to run
  the tutorials, you should substitute the last command with the following:

  ```bash
  pip install -e .[dev]
  ```


pkgId: c73de771f76d86b5985eff0748677bd5c8520911e9df30595ee05e40a5af42fa
name: python-sqil-core-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for sqil-core
url: https://pypi.org/project/sqil-core/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqil-core-0.0.1-1.src.rpm
location_href: Packages/python-sqil-core-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  ```bash
  $ pip install sqil_core
  ```



  You can find all the functions available and examples in the documentation.

  ```python
  import sqil_core as sqil

  path = 'path to your data folder'


  mag, phase, freq = sqil.extract_h5_data(path, ['mag_dB', 'phase', 'ro_freq'])
  ```





  1. **Install poetry if you haven't already**
  ```bash
  $ pip install poetry
  ```

  2. **Install the required packages using poetry**
  ```bash
  $ poetry install
  ```

  3. **Install the pre-commit hooks**
  If you are on windows you need to install git ([https://git-scm.com/downloads](here)) and add it to your windows PATH.
  After the installation open a new terminal.
  ```bash
  $ poetry run pre-commit install
  ```
  This will check if your python files are formatted correctly when you try to commit.
  If that's not the case the commit will be canceled and the files will be automatically formatted.
  Then you'll have to add and commit again the new files.

  4. **Start the virtual environment**
  ```bash
  $ poetry shell
  ```
  To exit the virtual environment just use `exit`



  ```bash
  $ pip install -e . --user
  ```

  **Anaconda**
  If you want to install in a specific anaconda environment

  - from your poetry shell build the package

  ```bash
  $ poetry run build
  ```

  - open an anaconda shell
  - activate the desired environemnt
  - pip install the wheel file (.whl) in the dist folder of the sqil-core project

  ```bash
  $ pip install PATH_TO_SQIL_CORE_FOLDER/dist/SQIL_CORE-VERSION.whl
  ```

  If you're using a jupyter notebook remember to restart the kernel



  ```bash
  $ poetry run build
  ```



  Serve docs

  ```bash
  $ poetry run docs_serve
  ```

  Build docs

  ```bash
  $ poetry run docs_build
  ```


pkgId: af9684c3d27de03be55d25158c5cee8165baa57c04b563987595f94a838e8434
name: python-sql-blocks-help
arch: noarch
version: 0.31.13
epoch: 0
release: 1
summary: Development documents and examples for sql-blocks
url: https://github.com/julio-cascalles/sql_blocks
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sql-blocks-0.31.13-1.src.rpm
location_href: Packages/python-sql-blocks-help-0.31.13-1.noarch.rpm
checksum_type: sha256
description:
  * a = Select('Actor a', **name=Field**)
  * Here are another ways to add a field:
      - Select('Actor a', name=Distinct )
      - Select('Actor a', name=NamedField('actors_name'))
      - Select(
          'Actor a',
          name=NamedField('actors_name', Distinct)
      )
      2.1 -- Using expression as a field:
  ```
      Select(
          'Product',
          due_date=NamedField(
              'YEAR_ref',
              ExpressionField('extract(year from {f})') #  <<---
          )
      )
  ```


pkgId: 2c975e4bf8b835f53bc9f03be6316fd38936d732322ecd5ddeffa4999fd565c7
name: python-sql-judge-utils-help
arch: noarch
version: 0.1.13
epoch: 0
release: 1
summary: Development documents and examples for sql-judge-utils
url: https://github.com/QueraTeam/sql-judge-utils
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sql-judge-utils-0.1.13-1.src.rpm
location_href: Packages/python-sql-judge-utils-help-0.1.13-1.noarch.rpm
checksum_type: sha256
description:
  Utilities for writing Python unit tests for version 2 of the [Quera](https://quera.ir) SQL judge.



  ```shell
  pip install sql-judge-utils # or git+https://github.com/QueraTeam/sql-judge-utils
  ```



  Import one of database classes:

  ```python

  from sql_judge_utils.postgresql import PostgresqlDatabase as Database


  from sql_judge_utils.mysql import MysqlDatabase as Database
  ```

  Define database instances:

  ```python
  db1 = Database("db1")
  db2 = Database("db2")
  ```

  Optional arguments:

  | Argument   | PostgreSQL default | MySQL default |
  | ---------- | ------------------ | ------------- |
  | `host`     | `"postgresql"`     | `"mysql"`     |
  | `port`     | `5432`             | `3306`        |
  | `username` | `"postgres"`       | `"root"`      |
  | `password` | `None`             | `None`        |

  > **WARNING:**
  > Don't override the default values
  > if you're writing tests for [Quera](https://quera.ir) SQL judge.

  Create database:

  ```python
  db1.create()
  ```

  Drop database:

  ```python
  db1.drop()
  ```

  Init data (run SQL command without fetching results)
  with SQL string or SQL file path:

  ```python
  db1.init(sql_string)

  db1.initf(sql_file_path)
  ```

  Run query and fetch the results:

  ```python
  col_names, records = db1.run_query(sql_string)
  ```

  Compare two result of run_query:

  ```python
  status, message = Database.compare_query_result(col_names_1, records_1, col_names_2, records_2)
  ```

  Compare two database instances:

  ```python
  status, message = db1.is_equal(db2)
  ```

  Compare two database instances on a table:

  ```python
  status, message = db1.is_equal_on_table(db2, table_name)
  ```





  Use the parser to extract queries from a submission file:

  ```python
  from sql_judge_utils.parser import get_queries, get_query
  submission_file_path = 'path/to/submission.sql'
  queries = get_queries(submission_file_path)

  submission_file_path = 'path/to/submission.sql'
  query_number = 2
  query = get_query(submission_file_path, query_number)
  ```



  Install Hatch and pre-commit hooks:

  ```shell
  pipx install hatch
  pipx install pre-commit
  pre-commit install
  ```

  Before running the tests, start a MySQL and a PostgreSQL instance:

  ```shell
  docker run --name sql-postgres -e POSTGRES_PASSWORD=password -p "127.0.0.1:15432:5432" -d postgres postgres -c log_statement=all
  docker run --name sql-mysql -e MYSQL_ROOT_PASSWORD=password -p "127.0.0.1:13306:3306" -d mysql
  ```

  Run the tests and stop the database instances:

  ```shell
  hatch test --all
  docker stop sql-postgres sql-mysql
  docker rm sql-postgres sql-mysql
  ```

  Build and publish:

  ```shell
  hatch build
  hatch publish
  ```


pkgId: ed6849c085170a803ab482b4cab2870e8fbe9bab2d3de0fb22e264bc1f1f8045
name: python-sql-upsert-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for sql-upsert
url: https://github.com/vile319/sql_upsert
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sql-upsert-0.1.2-1.src.rpm
location_href: Packages/python-sql-upsert-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  A Python package for handling SQL upsert operations with pandas DataFrames.



  ```bash
  pip install sql_upsert
  ```



  ```python
  import sql_upsert as pdu
  import pandas as pd
  from sqlalchemy import create_engine


  engine = create_engine('sqlite:///example.db')


  df = pd.DataFrame({'id': [1, 2], 'value': ['a', 'b']})


  pdu.to_sql_upsert(df, 'my_table', engine, unique_columns=['id'])
  ```



  - Automatic handling of upsert operations
  - Support for custom unique constraints
  - Compatible with any SQLAlchemy supported database
  - Preserves column types when creating tables



  - Python >= 3.6
  - SQLAlchemy >= 1.4.0
  - pandas >= 1.0.0


pkgId: 993a8bc3b751e4807b5ef488571224d650dff6be2355e62a850ca0c4ea724fed
name: python-sql-via-code-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for sql-via-code
url: https://pypi.org/project/sql-via-code/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sql-via-code-0.1.1-1.src.rpm
location_href: Packages/python-sql-via-code-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  1. **Query Execution**: Execute SQL queries and fetch the results as a pandas DataFrame.
  2. **Stored Procedure Execution**: Run stored procedures with input parameters.
  3. **Table Backup**: Automatically back up a specified table's data before executing a query or procedure.


pkgId: 86f20ebdaac48feebfee5dac627e639f4cced618297ed1546eac2f3fdbc0508d
name: python-sqlalchemy-bind-manager-help
arch: noarch
version: 0.11.0
epoch: 0
release: 1
summary: Development documents and examples for sqlalchemy-bind-manager
url: https://febus982.github.io/sqlalchemy-bind-manager
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlalchemy-bind-manager-0.11.0-1.src.rpm
location_href: Packages/python-sqlalchemy-bind-manager-help-0.11.0-1.noarch.rpm
checksum_type: sha256
description:
  ![Static Badge](https://img.shields.io/badge/Python-3.9_%7C_3.10_%7C_3.11_%7C_3.12_%7C_3.13-blue?logo=python&logoColor=white)
  [![Stable Version](https://img.shields.io/pypi/v/sqlalchemy-bind-manager?color=blue)](https://pypi.org/project/sqlalchemy-bind-manager/)
  [![stability-beta](https://img.shields.io/badge/stability-beta-33bbff.svg)](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#beta)

  [![Python tests](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-tests.yml)
  [![Maintainability](https://api.codeclimate.com/v1/badges/0140f7f4e559ae806887/maintainability)](https://codeclimate.com/github/febus982/sqlalchemy-bind-manager/maintainability)
  [![Test Coverage](https://api.codeclimate.com/v1/badges/0140f7f4e559ae806887/test_coverage)](https://codeclimate.com/github/febus982/sqlalchemy-bind-manager/test_coverage)

  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
  [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)

  This package provides an easy way to configure and use SQLAlchemy engines and sessions
  without depending on frameworks.

  It is composed by two main components:

  * A manager class for SQLAlchemy engine and session configuration
  * A repository/unit-of-work pattern implementation for model retrieval and persistence



  ```bash
  pip install sqlalchemy-bind-manager
  ```



  [//]: # (https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md)
  * [![stability-beta](https://img.shields.io/badge/stability-beta-33bbff.svg)](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#beta) **SQLAlchemy manager:** Implementation is mostly finalised, needs testing in production.
  * [![stability-beta](https://img.shields.io/badge/stability-beta-33bbff.svg)](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#beta) **Repository:** Implementation is mostly finalised, needs testing in production.
  * [![stability-experimental](https://img.shields.io/badge/stability-experimental-orange.svg)](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#experimental) **Unit of work:** The implementation is working but limited to repositories using the same engine. Distributed transactions across different engines are not yet supported.



  The complete documentation can be found [here](https://febus982.github.io/sqlalchemy-bind-manager)



  Initialise the manager providing an instance of `SQLAlchemyConfig`

  ```python
  from sqlalchemy_bind_manager import SQLAlchemyConfig, SQLAlchemyBindManager

  config = SQLAlchemyConfig(
      engine_url="sqlite:///./sqlite.db",
      engine_options=dict(connect_args={"check_same_thread": False}, echo=True),
      session_options=dict(expire_on_commit=False),
  )

  sa_manager = SQLAlchemyBindManager(config)
  ```

  🚨 NOTE: Using global variables is not thread-safe, please read the [Documentation](https://febus982.github.io/sqlalchemy-bind-manager/manager/session/#note-on-multithreaded-applications) if your application uses multi-threading.

  The `engine_url` and `engine_options` dictionaries accept the same parameters as SQLAlchemy [create_engine()](https://docs.sqlalchemy.org/en/14/core/engines.html#sqlalchemy.create_engine)

  The `session_options` dictionary accepts the same parameters as SQLALchemy [sessionmaker()](https://docs.sqlalchemy.org/en/14/orm/session_api.html#sqlalchemy.orm.sessionmaker)

  The `SQLAlchemyBindManager` provides some helper methods for common operations:

  * `get_bind`: returns a `SQLAlchemyBind` or `SQLAlchemyAsyncBind` object
  * `get_session`: returns a `Session` object, which works also as a context manager
  * `get_mapper`: returns the mapper associated with the bind

  Example:

  ```python
  bind = sa_manager.get_bind()


  class MyModel(bind.declarative_base):
      pass



  o = MyModel()
  o.name = "John"
  with sa_manager.get_session() as session:
      session.add(o)
      session.commit()
  ```

  [Imperative model declaration](https://febus982.github.io/sqlalchemy-bind-manager/manager/models/) is also supported.



  `SQLAlchemyBindManager` accepts also multiple databases configuration, provided as a dictionary. The dictionary keys are used as a reference name for each bind.

  ```python
  from sqlalchemy_bind_manager import SQLAlchemyConfig, SQLAlchemyBindManager

  config = {
      "default": SQLAlchemyConfig(
          engine_url="sqlite:///./sqlite.db",
          engine_options=dict(connect_args={"check_same_thread": False}, echo=True),
          session_options=dict(expire_on_commit=False),
      ),
      "secondary": SQLAlchemyConfig(
          engine_url="sqlite:///./secondary.db",
          engine_options=dict(connect_args={"check_same_thread": False}, echo=True),
          session_options=dict(expire_on_commit=False),
      ),
  }

  sa_manager = SQLAlchemyBindManager(config)
  ```

  All the `SQLAlchemyBindManager` helper methods accept the `bind_name` optional parameter:

  * `get_bind(bind_name="default")`: returns a `SQLAlchemyBind` or `SQLAlchemyAsyncBind` object
  * `get_session(bind_name="default")`: returns a `Session` or `AsyncSession` object, which works also as a context manager
  * `get_mapper(bind_name="default")`: returns the mapper associated with the bind



  Is it possible to supply configurations for asyncio supported engines.

  ```python
  config = SQLAlchemyAsyncConfig(
      engine_url="postgresql+asyncpg://scott:tiger@localhost/test",
  )
  ```

  This will make sure we have an `AsyncEngine` and an `AsyncSession` are initialised, as an asynchronous context manager.

  ```python
  async with sa_manager.get_session() as session:
      session.add(o)
      await session.commit()
  ```

  Note that async implementation has several differences from the sync one, make sure
  to check [SQLAlchemy asyncio documentation](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html)



  The `SQLAlchemyRepository` and `SQLAlchemyAsyncRepository` class can be used directly or by extending them.

  ```python
  from sqlalchemy_bind_manager.repository import SQLAlchemyRepository


  class MyModel(declarative_base):
      pass


  repo_instance = SQLAlchemyRepository(sqlalchemy_bind_manager.get_bind(), model_class=MyModel)

  class ModelRepository(SQLAlchemyRepository[MyModel]):
      _model = MyModel

      def _some_custom_method_implemented(self):
          ...


  extended_repo_instance = ModelRepository(sqlalchemy_bind_manager.get_bind())
  ```

  The repository classes provides methods for  common use case:

  * `get`: Retrieve a model by primary key
  * `save`: Persist a model
  * `save_many`: Persist multiple models in a single transaction
  * `delete`: Delete a model
  * `find`: Search for a list of models (basically an adapter for SELECT queries)
  * `paginated_find`: Search for a list of models, with pagination support
  * `cursor_paginated_find`: Search for a list of models, with cursor based pagination support



  It is possible we need to run several operations in a single database transaction. While a single
  repository provide by itself an isolated session for single operations, we have to use a different
  approach for multiple operations.

  We can use the `UnitOfWork` or the `AsyncUnitOfWork` class to provide a shared session to
  be used for repository operations, **assumed the same bind is used for all the repositories**.

  ```python
  class MyRepo(SQLAlchemyRepository):
      _model = MyModel

  bind = sa_manager.get_bind()
  uow = UnitOfWork(bind)
  uow.register_repository("repo_a", MyRepo)
  uow.register_repository("repo_b", SQLAlchemyRepository, MyOtherModel)

  with uow.transaction():
      uow.repository("repo_a").save(some_model)
      uow.repository("repo_b").save(some_other_model)
  ```


pkgId: 0881defe5e94f7e01a400f905b91ef41a27fe3908f651c284a1c901ef9d5ec6f
name: python-sqlalchemy-ingres-help
arch: noarch
version: 0.0.10
epoch: 0
release: 1
summary: Development documents and examples for sqlalchemy-ingres
url: https://github.com/ActianCorp/sqlalchemy-ingres
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlalchemy-ingres-0.0.10-1.src.rpm
location_href: Packages/python-sqlalchemy-ingres-help-0.0.10-1.noarch.rpm
checksum_type: sha256
description:
  - [Quickstart](#quickstart)
    * [Install from PyPi](#install-from-pypi)
    * [Install latest from GitHub, without a source code checkout](#install-latest-from-github--without-a-source-code-checkout)
    * [Install latest from GitHub, with a source code checkout](#install-latest-from-github--with-a-source-code-checkout)
  - [Development instructions](#development-instructions)
    * [Quick python test](#quick-python-test)
    * [Troubleshooting](#troubleshooting)


pkgId: 9eda65e135168c16ee5df784f3d4ff7e6a69d377f4f455096edffb477160db0d
name: python-sqlalchemydhis2-help
arch: noarch
version: 1.0.71
epoch: 0
release: 1
summary: Development documents and examples for sqlalchemydhis2
url: https://github.com/talexie/sqlalchemy_dhis2
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlalchemydhis2-1.0.71-1.src.rpm
location_href: Packages/python-sqlalchemydhis2-help-1.0.71-1.noarch.rpm
checksum_type: sha256
description:
  pip install sqlalchemydhis2


  dhis2://username:password@your-json-endpoint.com?duckdb_path=/path/to/your_duckdb.db


pkgId: fb37899846a5a938ab131f4a12b442f972f071e426818c8eb184b56e828bd9a8
name: python-sqlecto-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for sqlecto
url: https://github.com/valdAsync/sqlecto
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlecto-0.1.0-1.src.rpm
location_href: Packages/python-sqlecto-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  SQLecto is a command-line tool for converting SQL queries across different SQL dialects, providing flexibility for users working with SQL transformations. This tool leverages the powerful [SQLGlot](https://github.com/tobymao/sqlglot) library for parsing and transpiling SQL queries.



  - **Dialect Conversion**: Transpile SQL queries from one SQL dialect to another (e.g., Spark to Snowflake)
  - **File Support**: Process individual SQL/Python files or entire directories containing SQL code
  - **Configurable Mappings**: Define custom table mappings and configurations via JSON or YAML files



  - Python 3.8+





  You can install SQLecto via `pipx` (recommended) or `pip`.



  ```bash
  pipx install sqlecto
  ```



  ```bash
  pip install sqlecto
  ```



  Convert a single SQL file:

  ```bash
  sqlecto --source-dialect spark --target-dialect snowflake --source-files ./my_query.sql
  ```

  Convert all SQL files in a directory

  ```bash
  sqlecto --source-dialect spark --target-dialect snowflake --source-dir ./sql_scripts
  ```



  | Option                  | Required | Description                           | Default              |
  | ----------------------- | -------- | ------------------------------------- | -------------------- |
  | `--source-files`        | No       | SQL/Python files to process           | None                 |
  | `--source-dir`          | No       | Directory containing SQL/Python files | Current directory    |
  | `--source-dialect`      | Yes      | Source SQL dialect                    | None                 |
  | `--target-dialect`      | Yes      | Target SQL dialect                    | None                 |
  | `--table-mappings`      | No       | Table name mappings                   | None                 |
  | `--table-mappings-file` | No       | File containing table mappings        | None                 |
  | `--config-file`         | No       | Configuration file path               | None                 |
  | `--output-dir`          | No       | Output directory for converted files  | ./transpiled_queries |



  ```bash
  sqlecto --source-dialect spark --target-dialect snowflake \
      --source-dir ./sql_scripts --output-dir ./transpiled_queries
  ```





  Configuration can be managed via `JSON` or `YAML` files, allowing reusable settings:

  ```json
  {
    "source_files": ["./path/to/file.sql", "./path/to/file2.py"],
    "source_dialect": "spark",
    "target_dialect": "snowflake",
    "output_dir": "./transpiled_queries",
    "table_mappings": [{ "src_table": "old_table", "dst_table": "new_table" }]
  }
  ```



  To replace table names within SQL queries, use `--table-mappings` or specify mappings in a configuration file.
  Mappings follow the format:

  ```bash
  --table-mappings source_table:target_table
  ```

  Or in `JSON/YAML`:

  ```json
  "table_mappings": [
      {"src_table": "old_table", "dst_table": "new_table"}
  ]
  ```

  ```yaml

  table_mappings:
    - src_table: old_table1
      dst_table: new_table1
    - src_table: old_table2
      dst_table: new_table2
  ```





  ```bash
  sqlecto --source-dialect spark --target-dialect snowflake \
      --source-files ./query.sql --output-dir ./converted
  ```



  ```bash
  sqlecto --source-dialect spark --target-dialect snowflake \
      --source-dir ./sql_scripts \
      --table-mappings old_db.table1:new_db.table1 \
      --output-dir ./converted
  ```



  ```bash
  sqlecto --config-file ./config.yaml
  ```



  This tool heavily relies on the [SQLGlot](https://github.com/tobymao/sqlglot) package by Toby Mao, providing robust and reliable SQL dialect transformations.



  Contributions are welcome! Please fork the repository and create a pull request for any improvements.



  MIT License


pkgId: 8f3bd7c1b0929971e86010fdd4cbe54dd0b3db51aa46dde0d20e23fcbacc73ed
name: python-sqlfactory-help
arch: noarch
version: 1.5.0
epoch: 0
release: 1
summary: Development documents and examples for sqlfactory
url: https://gitlab.com/gcm-cz/sqlfactory
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlfactory-1.5.0-1.src.rpm
location_href: Packages/python-sqlfactory-help-1.5.0-1.noarch.rpm
checksum_type: sha256
description:
  Let's see how to build a SELECT statement like this:
  ```sql
  SELECT column1, column2, column3 FROM books WHERE column1 = 'value' AND column2 IN (1, 2, 3);
  ```
  All the following examples are equivalent and produce the same SQL query:
  ```python
  from sqlfactory import SELECT, Table, Select, And, Eq, In

  Select("column1", "column2", "column3", table="books", where=And(Eq("column1", "value"), In("column2", [1, 2, 3])))

  SELECT("column1", "column2", "column3", table="books")
      .WHERE(Eq("column1", "value") & In("column2", [1, 2, 3]))

  books = Table("books")
  SELECT(books.column1, books.column2, books.column3, table=books)
      .WHERE((books.column1 == "value") & In(books.column2, [1, 2, 3]))


pkgId: cee6ee27728b70ac51ba4e20273ad8764ba4213c5f271c94c254595f23e223e6
name: python-sqlframe-help
arch: noarch
version: 3.9.3
epoch: 0
release: 1
summary: Development documents and examples for sqlframe
url: https://github.com/eakmanrq/sqlframe
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlframe-3.9.3-1.src.rpm
location_href: Packages/python-sqlframe-help-3.9.3-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
    <img src="https://sqlframe.readthedocs.io/en/stable/docs/images/sqlframe_logo.png" alt="SQLFrame Logo" width="400"/>
  </div>

  SQLFrame implements the PySpark DataFrame API in order to enable running transformation pipelines directly on database engines - no Spark clusters or dependencies required.

  SQLFrame currently supports the following engines (many more in development):

  * [BigQuery](https://sqlframe.readthedocs.io/en/stable/bigquery/)
  * [DuckDB](https://sqlframe.readthedocs.io/en/stable/duckdb)
  * [Postgres](https://sqlframe.readthedocs.io/en/stable/postgres)
  * [Snowflake](https://sqlframe.readthedocs.io/en/stable/snowflake)
  * [Spark](https://sqlframe.readthedocs.io/en/stable/spark)

  There are also two engines in development. These engines lack test coverage and robust documentation, but are available for early testing:

  * [Redshift](https://sqlframe.readthedocs.io/en/stable/redshift)
  * [Databricks](https://sqlframe.readthedocs.io/en/stable/databricks)

  SQLFrame also has a "Standalone" session that be used to generate SQL without any connection to a database engine.

  * [Standalone](https://sqlframe.readthedocs.io/en/stable/standalone)

  SQLFrame is great for:

  * Users who want a DataFrame API that leverages the full power of their engine to do the processing
  * Users who want to run PySpark code quickly locally without the overhead of starting a Spark session
  * Users who want a SQL representation of their DataFrame code for debugging or sharing with others
  * Users who want to run PySpark DataFrame code without the complexity of using Spark for processing



  ```bash

  pip install "sqlframe[bigquery]"

  pip install "sqlframe[duckdb]"

  pip install "sqlframe[postgres]"

  pip install "sqlframe[snowflake]"

  pip install "sqlframe[spark]"

  pip install "sqlframe[redshift]"

  pip install "sqlframe[databricks]"

  pip install sqlframe
  ```

  See specific engine documentation for additional setup instructions.



  SQLFrame generates consistently accurate yet complex SQL for engine execution.
  However, when using df.sql(optimize=True), it produces more human-readable SQL.
  For details on how to configure this output and leverage OpenAI to enhance the SQL, see [Generated SQL Configuration](https://sqlframe.readthedocs.io/en/stable/configuration/#generated-sql).

  SQLFrame by default uses the Spark dialect for input and output.
  This can be changed to make SQLFrame feel more like a native DataFrame API for the engine you are using.
  See [Input and Output Dialect Configuration](https://sqlframe.readthedocs.io/en/stable/configuration/#input-and-output-dialect).



  SQLFrame can either replace pyspark imports or be used alongside them.
  To replace pyspark imports, use the [activate function](https://sqlframe.readthedocs.io/en/stable/configuration/#activating-sqlframe) to set the engine to use.

  ```python
  from sqlframe import activate


  activate(engine="duckdb")

  from pyspark.sql import SparkSession
  session = SparkSession.builder.getOrCreate()
  ```

  SQLFrame can also be directly imported which both maintains pyspark imports but also allows for a more engine-native DataFrame API:

  ```python
  from sqlframe.duckdb import DuckDBSession

  session = DuckDBSession.builder.getOrCreate()
  ```



  ```python
  from sqlframe import activate


  activate(engine="bigquery")

  from pyspark.sql import SparkSession
  from pyspark.sql import functions as F
  from pyspark.sql import Window

  session = SparkSession.builder.getOrCreate()
  table_path = '"bigquery-public-data".samples.natality'

  df = (
    session.table(table_path)
    .where(F.col("ever_born") == 1)
    .groupBy("year")
    .agg(F.count("*").alias("num_single_child_families"))
    .withColumn(
      "last_year_num_single_child_families",
      F.lag(F.col("num_single_child_families"), 1).over(Window.orderBy("year"))
    )
    .withColumn(
      "percent_change",
      (F.col("num_single_child_families") - F.col("last_year_num_single_child_families"))
      / F.col("last_year_num_single_child_families")
    )
    .orderBy(F.abs(F.col("percent_change")).desc())
    .select(
      F.col("year").alias("year"),
      F.format_number("num_single_child_families", 0).alias("new families single child"),
      F.format_number(F.col("percent_change") * 100, 2).alias("percent change"),
    )
    .limit(5)
  )
  ```
  ```python
  >>> df.sql(optimize=True)
  WITH `t94228` AS (
    SELECT
      `natality`.`year` AS `year`,
      COUNT(*) AS `num_single_child_families`
    FROM `bigquery-public-data`.`samples`.`natality` AS `natality`
    WHERE
      `natality`.`ever_born` = 1
    GROUP BY
      `natality`.`year`
  ), `t39093` AS (
    SELECT
      `t94228`.`year` AS `year`,
      `t94228`.`num_single_child_families` AS `num_single_child_families`,
      LAG(`t94228`.`num_single_child_families`, 1) OVER (ORDER BY `t94228`.`year`) AS `last_year_num_single_child_families`
    FROM `t94228` AS `t94228`
  )
  SELECT
    `t39093`.`year` AS `year`,
    FORMAT('%\'.0f', ROUND(CAST(`t39093`.`num_single_child_families` AS FLOAT64), 0)) AS `new families single child`,
    FORMAT('%\'.2f', ROUND(CAST((((`t39093`.`num_single_child_families` - `t39093`.`last_year_num_single_child_families`) / `t39093`.`last_year_num_single_child_families`) * 100) AS FLOAT64), 2)) AS `percent change`
  FROM `t39093` AS `t39093`
  ORDER BY
    ABS(`percent_change`) DESC
  LIMIT 5
  ```
  ```python
  >>> df.show()
  +------+---------------------------+----------------+
  | year | new families single child | percent change |
  +------+---------------------------+----------------+
  | 1989 |         1,650,246         |     25.02      |
  | 1974 |          783,448          |     14.49      |
  | 1977 |         1,057,379         |     11.38      |
  | 1985 |         1,308,476         |     11.15      |
  | 1975 |          868,985          |     10.92      |
  +------+---------------------------+----------------+
  ```


pkgId: 577e0a39a11e2c5a55402b1a9f4438bbff9bdf127417e7e157384ec437607c3c
name: python-sqlite-database-help
arch: noarch
version: 0.5.3
epoch: 0
release: 1
summary: Development documents and examples for sqlite-database
url: https://github.com/RimuEirnarn/sqlite_database
rpm_license: BSD 3-Clause License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlite-database-0.5.3-1.src.rpm
location_href: Packages/python-sqlite-database-help-0.5.3-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">

  ![GitHub forks](https://img.shields.io/github/forks/RimuEirnarn/sqlite_database?style=social)
  ![GitHub Repo stars](https://img.shields.io/github/stars/RimuEirnarn/sqlite_database?style=social)

  ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/RimuEirnarn/sqlite_database)
  ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/RimuEirnarn/sqlite_database)
  ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/RimuEirnarn/sqlite_database)
  ![Lines of code](https://img.shields.io/tokei/lines/github/RimuEirnarn/sqlite_database)
  ![GitHub all releases](https://img.shields.io/github/downloads/RimuEirnarn/sqlite_database/total)
  ![GitHub Workflow(pylint) Status](https://img.shields.io/github/actions/workflow/status/RimuEirnarn/sqlite_database/pylint.yml?label=lint)
  ![GitHub Workflow(pytest) Status](https://img.shields.io/github/actions/workflow/status/RimuEirnarn/sqlite_database/python-app.yml?label=tests)
  ![GitHub Workflow(pypi) Status](https://img.shields.io/github/actions/workflow/status/RimuEirnarn/sqlite_database/python-publish.yml)
  ![GitHub release (latest by date)](https://img.shields.io/github/v/release/RimuEirnarn/sqlite_database)
  [![Documentation Status](https://readthedocs.org/projects/sqlite-database/badge/?version=latest)](https://sqlite-database.readthedocs.io/en/latest/?badge=latest)
  ![GitHub](https://img.shields.io/github/license/RimuEirnarn/sqlite_database)

  ![PyPI - Format](https://img.shields.io/pypi/format/sqlite-database)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sqlite-database)
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/sqlite-database)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/sqlite-database?label=%28PyPI%29%20downloads)

  </div>

  SQLite Database is a weird wrapper for SQLite Connection. It's intended to be easy to use and simple.

  > [!WARNING]
  > This project as per version number (<1.0) is not either efficient (in term of memory usage) and fast. If you found a serious problem, please let us know.



  Installation from PyPI is now available, `pip install sqlite-database`

  From previous versions, installations can be done using `pip install https://github.com/RimuEirnarn/sqlite_database/archive/refs/tags/<latest version>.zip`



  Feature overview can be found in [Features.md](https://github.com/RimuEirnarn/sqlite_database/blob/main/Features.md)

  It's still recommended to see the [short docs](https://sqlite-database.rtfd.io/)



  You can read why this library exists by reading [the history](History.md). The pre-contributor is only ChatGPT.



  You can submit any issue if you found a good issue. You can submit a pull request as long as the thing you want complies with what this project aims for.



  This library/wrapper/repo/project is licensed with/in BSD 3-Clause "New" or "Revised" License.

  [LICENSE](https://github.com/RimuEirnarn/sqlite_database/blob/main/LICENSE)


pkgId: 7e288613c3a8b0a6f6a88fe501c17f11b8b4bfd99caa2c3acc287a8e42c0d4d7
name: python-sqlmodelgen-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for sqlmodelgen
url: https://pypi.org/project/sqlmodelgen/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlmodelgen-0.0.1-1.src.rpm
location_href: Packages/python-sqlmodelgen-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  wouldn't it be nice if there was some code that could generate SQLModel code directly from the SQL CREATE table schemas?

rpm_license:
  MIT License  Copyright (c) 2024 nucccc  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: 6cf90267562b830ff46ea19e3be149f8551594b69e1f5af886ea3a5fac1c95a7
name: python-sqlspec-help
arch: noarch
version: 0.3.0
epoch: 0
release: 1
summary: Development documents and examples for sqlspec
url: https://pypi.org/project/sqlspec/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sqlspec-0.3.0-1.src.rpm
location_href: Packages/python-sqlspec-help-0.3.0-1.noarch.rpm
checksum_type: sha256
description:
  <!-- markdownlint-disable -->
  <p align="center">
    <!-- github-banner-start -->
    <img src="https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Logo%20-%20Banner%20-%20Inline%20-%20Light.svg#gh-light-mode-only" alt="Litestar Logo - Light" width="100%" height="auto" />
    <img src="https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Logo%20-%20Banner%20-%20Inline%20-%20Dark.svg#gh-dark-mode-only" alt="Litestar Logo - Dark" width="100%" height="auto" />
    <!-- github-banner-end -->

  </p>
  <div align="center">
  <!-- markdownlint-restore -->



  SQL Experiments in Python




  - Modern: Typed and Extensible
  - Multi-database: SQLite, Postgres, DuckDB, MySQL, Oracle, SQL Server, Spanner, Big Query, and more...
  - Easy ability to manipulate and add filters to queries
  - Validate and Convert between dialects with `sqlglot`
  - and more...



  - Probably not currently; but, if it makes sense we can add enhancements.



  `aiosql` is the primary influence for this library.  However, I wanted to be able to use the query interface from `aiosql` a bit more flexibly.

  Why not add it to `aiosql`?  Where it makes sense, many of these changes will likely get submitted to aiosql as a PR (`spanner` and `bigquery` drivers are likely the starting point.)


pkgId: 49ed6b871568c5f2f016e4b431afb5638100d9ac93b9398fd3e5eacd19dbe0f9
name: python-square-common-bl-help
arch: noarch
version: 1.10.0
epoch: 0
release: 1
summary: Development documents and examples for square-common-bl
url: https://github.com/thepmsquare/square_common_bl
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-square-common-bl-1.10.0-1.src.rpm
location_href: Packages/python-square-common-bl-help-1.10.0-1.noarch.rpm
checksum_type: sha256
description:
  common business layer for my personal server.



  ```shell
  pip install square_common_bl
  ```



  - python>=3.12.0





  - rename remove_app_for_self_v0 to logout_v0.



  - add authentication -> get_user_details_v0.



  - add authentication -> update_password_v0.



  - add authentication -> update_username_v0.



  - add authentication -> delete_user_v0.



  - add authentication -> generate_access_token_v0.



  - add authentication -> logout v0.



  - validate extra params in greeting -> create_greeting v0.



  - accept access_token as header instead of query param in greeting -> create_greeting v0.



  - add square_authentication_helper as dependency.
  - replace user_id with access_token in greeting -> create_greeting.



  - initialize SquareDatabaseHelper in configuration.py.
  - remove app_id from greeting -> create_greeting.



  - add utils -> get_app_id_v0.



  - initial implementation.


pkgId: 013f22466bae15147008bdeeda5e27b7c44daf36c4a796fb1775a8253abe658a
name: python-squidasm-help
arch: noarch
version: 0.13.4
epoch: 0
release: 1
summary: Development documents and examples for squidasm
url: https://github.com/QuTech-Delft/squidasm
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-squidasm-0.13.4-1.src.rpm
location_href: Packages/python-squidasm-help-0.13.4-1.noarch.rpm
checksum_type: sha256
description:
  SquidASM uses the `NetSquid <https://netsquid.org/>`_ Python package.
  To install and use NetSquid, you need to first create an account for the `netsquid forum <https://forum.netsquid.org/ucp.php?mode=register>`_.
  The username and password for this account are needed to install SquidASM.
  Because NetSquid only supports Linux and MacOS, SquidASM also requires a Linux or MacOS system.
  For Windows users it is recommended to either use a virtual machine or
  use `Windows Subsystem for Linux (WSL) <https://learn.microsoft.com/en-us/windows/wsl/install>`_.
  Next the SquidASM repository needs to be cloned using git.
  If git is not installed, instructions on installing it can be found on this `website <https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>`_.
  Afterward, go to your desired directory and execute:
      git clone https://github.com/QuTech-Delft/squidasm.git
  This will create a new folder with the name squidasm and download the squidasm package to that folder.
  The SquidASM install script requires the NetSquid user name and password to be set into environment variables.
  This can be done by executing the following code, but with your own user name and password:
      export NETSQUIDPYPI_USER=user1234
      export NETSQUIDPYPI_PWD=password1234
  It's also possible to write your password to a text file instead, and set the path to that file with another environment variable:
      export NETSQUIDPYPI_USER=user1234
      export NETSQUIDPYPI_PWD_FILEPATH=password.txt
  For a more permanent solution, if SquidASM is installed more than once, these lines can be added to ``~\.bashrc``.
  Then, to install squidasm execute the following command inside the newly created squidasm folder:
     make install
  To verify the installation, do:
     make verify
  If this commands completes without errors, it means that SquidASM has been successfully installed and should work properly.
      SquidASM can be installed installed inside a virtual environment for python.
      This can be done by activating the virtual environment before the command ``make install``.
      Virtual environments allow a user to install python packages in such a way
      that the installed package and its dependencies are kept separate from the "base" python and other projects.
      For example, with SquidASM this would prevent the SquidASM installation from
      changing the NetSquid version in another project and vice versa.
      For more information regarding virtual environments and how to use them see: https://docs.python.org/3/library/venv.html.


pkgId: 1c03984bc32a89b6c7d1eaed21b8705fedf10b73cb40449fc540f226a5ab16f1
name: python-srtgo-help
arch: noarch
version: 1.5.0
epoch: 0
release: 1
summary: Development documents and examples for srtgo
url: https://github.com/lapis42/srtgo
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-srtgo-1.5.0-1.src.rpm
location_href: Packages/python-srtgo-help-1.5.0-1.noarch.rpm
checksum_type: sha256
description:
  > [!WARNING]
  > All commercial and commercial use of this program is strictly prohibited. Use of this program is at your own risk, and the developers of this program shall not be liable for any liability, including civil or criminal liability. 📥By downloading this program, all users agree to the above without any objection.
  > [!IMPORTANT]
  > Through the keyring module, the information such as username, password, credit card, departure station, and arrival station is stored on the local computer.
  > The ID, password, card number, reservation settings, etc. entered in this program are stored on the local computer through the [keyring module](https://pypi.org/project/keyring/) and are not shared through network transmission to any other location.
  - This program is a macro that automates the reservation of SRT and KTX train tickets.
  - After the reservation is completed, a Telegram notification will be sent.
  - In the case of reservation confirmation/cancellation, for SRT, all tickets can be confirmed or canceled, while for KTX, only unpaid tickets can be confirmed or canceled.
  - For SRT, you can enter your credit card information to be charged immediately after you make your reservation.
  - You can specify your favorite stations.
  - You can set up child or accessible ticketing.

  ```bash
  pip install srtgo -U
  ```

  ```bash
  > srtgo
  ```
  ```bash
  [?] 메뉴 선택 (↕:이동, Enter: 선택): 예매 시작
   > 예매 시작
     예매 확인/취소
     로그인 설정
     텔레그램 설정
     카드 설정
     역 설정
     나가기
  [?] 열차 선택 (↕:이동, Enter: 선택, Ctrl-C: 취소): SRT
   > SRT
     KTX
     취소
  [?] 출발역 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 수서
   > 수서
     대전
     동대구
     부산
  [?] 도착역 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 동대구
     수서
     대전
   > 동대구
     부산
  [?] 출발 날짜 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 2024/01/04 Thu
     2024/01/03 Wed
   > 2024/01/04 Thu
     2024/01/05 Fri
     2024/01/06 Sat
     2024/01/07 Sun
     2024/01/08 Mon
     2024/01/09 Tue
     2024/01/10 Wed
     2024/01/11 Thu
     2024/01/12 Fri
     2024/01/13 Sat
     2024/01/14 Sun
     2024/01/15 Mon
  [?] 출발 시각 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 10
     00
     02
     04
     06
     08
   > 10
     12
     14
     16
     18
     20
     22
  [?] 승객수 (↕:이동, Enter: 완료, Ctrl-C: 취소): 1
   > 1
     2
     3
     4
     5
     6
     7
     8
     9
  [?] 예약할 열차 선택 (↕:이동, Space: 선택, Enter: 완료, Ctrl-C: 취소):
     [ ] [SRT 323] 01월 04일, 수서~동대구(10:00~11:40) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 325] 01월 04일, 수서~동대구(10:30~12:17) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 327] 01월 04일, 수서~동대구(10:50~12:30) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 381] 01월 04일, 수서~동대구(12:04~13:55) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 331] 01월 04일, 수서~동대구(12:28~14:08) 특실 매진, 일반실 매진, 예약대기 불가능
   > [ ] [SRT 333] 01월 04일, 수서~동대구(12:50~14:34) 특실 매진, 일반실 매진, 예약대기 불가능
     [X] [SRT 335] 01월 04일, 수서~동대구(13:00~14:46) 특실 매진, 일반실 예약가능, 예약대기 불가능
     [ ] [SRT 337] 01월 04일, 수서~동대구(13:30~15:16) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 339] 01월 04일, 수서~동대구(13:55~15:25) 특실 매진, 일반실 예약가능, 예약대기 불가능
     [ ] [SRT 341] 01월 04일, 수서~동대구(14:30~16:10) 특실 매진, 일반실 매진, 예약대기 불가능
  [?] 선택 유형 (↕:이동, Enter: 완료, Ctrl-C: 취소): 일반실 우선
   > 일반실 우선
     일반실만
     특실 우선
     특실만
  [?] 예매 시 카드 결제 (y/N): N
  예매 대기 중... |   16 (00:00:15)
  🎊예매 성공!!!🎊
  [SRT] 01월 04일, 수서~동대구(13:00~14:46) 36800원(1석), 구입기한 01월 03일 16:57
  8호차 5B (일반실) 어른/청소년 [36800원(700원 할인)]
  [?] 메뉴 선택 (↕:이동, Enter: 선택): 예매 확인/취소
     예매 시작
   > 예매 확인/취소
     로그인 설정
     텔레그램 설정
     카드 설정
     역 설정
     나가기
  [?] 열차 선택 (↕:이동, Enter: 선택, Ctrl-C: 취소): SRT
   > SRT
     KTX
     취소
  [?] 예약 취소 (Enter: 결정): [SRT] 01월 04일, 수서~동대구(13:00~14:46) 36800원(1석), 구입기한 01월 03일 16:57
   > [SRT] 01월 04일, 수서~동대구(13:00~14:46) 36800원(1석), 구입기한 01월 03일 16:57
     텔레그램으로 예매 정보 전송
     돌아가기
  ```

  - This project heavily depends on [SRT](https://github.com/ryanking13/SRT) by ryanking13 and [korail2](https://github.com/carpedm20/korail2) by carpedm20.
  - The recent changes also rely on [SRT](https://github.com/Monsteel/SRT) by Monsteel.


pkgId: a450b05c4e4449c290184b6802b8c143d3ee2ecec3f6db48db946cfaf8d9b825
name: python-srtgo-help
arch: noarch
version: 2.1.0
epoch: 0
release: 1
summary: Development documents and examples for srtgo
url: https://github.com/lapis42/srtgo
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-srtgo-2.1.0-1.src.rpm
location_href: Packages/python-srtgo-help-2.1.0-1.noarch.rpm
checksum_type: sha256
description:
  > [!WARNING]
  > All commercial and commercial use of this program is strictly prohibited. Use of this program is at your own risk, and the developers of this program shall not be liable for any liability, including civil or criminal liability. 📥By downloading this program, all users agree to the above without any objection.
  > [!IMPORTANT]
  > Through the keyring module, the information such as username, password, credit card, departure station, and arrival station is stored on the local computer.
  > The ID, password, card number, reservation settings, etc. entered in this program are stored on the local computer through the [keyring module](https://pypi.org/project/keyring/) and are not shared through network transmission to any other location.
  - This program is a program that helps you to reserve SRT and KTX train tickets.
  - After the reservation is completed, a Telegram notification will be sent.
  - You can enter your credit card information to be charged immediately after you make your reservation.
  - You can specify your favorite stations.
  - You can set up child or senior ticketing.
  - If tickets are sold out, you can join the waiting list.

  ```bash
  pip install srtgo -U
  ```
  - Install beta version (can be unstable)
  ```bash
  pip install git+https://github.com/lapis42/srtgo -U
  ```

  ```bash
  > srtgo
  ```
  ```bash
  [?] 메뉴 선택 (↕:이동, Enter: 선택): 예매 시작
   > 예매 시작
     예매 확인/취소
     로그인 설정
     텔레그램 설정
     카드 설정
     역 설정
     예매 옵션 설정
     나가기
  [?] 열차 선택 (↕:이동, Enter: 선택, Ctrl-C: 취소): SRT
   > SRT
     KTX
     취소
  [?] 출발역 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 수서
   > 수서
     대전
     동대구
     부산
  [?] 도착역 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 동대구
     수서
     대전
   > 동대구
     부산
  [?] 출발 날짜 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 2024/01/04 Thu
     2024/01/03 Wed
   > 2024/01/04 Thu
     2024/01/05 Fri
     2024/01/06 Sat
     2024/01/07 Sun
     2024/01/08 Mon
     2024/01/09 Tue
     2024/01/10 Wed
     2024/01/11 Thu
     2024/01/12 Fri
     2024/01/13 Sat
     2024/01/14 Sun
     2024/01/15 Mon
  [?] 출발 시각 선택 (↕:이동, Enter: 완료, Ctrl-C: 취소): 10
     00
     02
     04
     06
     08
   > 10
     12
     14
     16
     18
     20
     22
  [?] 승객수 (↕:이동, Enter: 완료, Ctrl-C: 취소): 1
   > 1
     2
     3
     4
     5
     6
     7
     8
     9
  [?] 예약할 열차 선택 (↕:이동, Space: 선택, Enter: 완료, Ctrl-C: 취소):
     [ ] [SRT 323] 01월 04일, 수서~동대구(10:00~11:40) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 325] 01월 04일, 수서~동대구(10:30~12:17) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 327] 01월 04일, 수서~동대구(10:50~12:30) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 381] 01월 04일, 수서~동대구(12:04~13:55) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 331] 01월 04일, 수서~동대구(12:28~14:08) 특실 매진, 일반실 매진, 예약대기 불가능
   > [ ] [SRT 333] 01월 04일, 수서~동대구(12:50~14:34) 특실 매진, 일반실 매진, 예약대기 불가능
     [X] [SRT 335] 01월 04일, 수서~동대구(13:00~14:46) 특실 매진, 일반실 예약가능, 예약대기 불가능
     [ ] [SRT 337] 01월 04일, 수서~동대구(13:30~15:16) 특실 매진, 일반실 매진, 예약대기 불가능
     [ ] [SRT 339] 01월 04일, 수서~동대구(13:55~15:25) 특실 매진, 일반실 예약가능, 예약대기 불가능
     [ ] [SRT 341] 01월 04일, 수서~동대구(14:30~16:10) 특실 매진, 일반실 매진, 예약대기 불가능
  [?] 선택 유형 (↕:이동, Enter: 완료, Ctrl-C: 취소): 일반실 우선
   > 일반실 우선
     일반실만
     특실 우선
     특실만
  [?] 예매 시 카드 결제 (y/N): N
  예매 대기 중... |   16 (00:00:15)
  🎊예매 성공!!!🎊
  [SRT] 01월 04일, 수서~동대구(13:00~14:46) 36800원(1석), 구입기한 01월 03일 16:57
  8호차 5B (일반실) 어른/청소년 [36800원(700원 할인)]
  [?] 메뉴 선택 (↕:이동, Enter: 선택): 예매 확인/취소
     예매 시작
   > 예매 확인/취소
     로그인 설정
     텔레그램 설정
     카드 설정
     역 설정
     나가기
  [?] 열차 선택 (↕:이동, Enter: 선택, Ctrl-C: 취소): SRT
   > SRT
     KTX
     취소
  [?] 예약 취소 (Enter: 결정): [SRT] 01월 04일, 수서~동대구(13:00~14:46) 36800원(1석), 구입기한 01월 03일 16:57
   > [SRT] 01월 04일, 수서~동대구(13:00~14:46) 36800원(1석), 구입기한 01월 03일 16:57
     텔레그램으로 예매 정보 전송
     돌아가기
  ```

  - This project includes code from [SRT](https://github.com/ryanking13/SRT) by ryanking13, licensed under the MIT License, and [korail2](https://github.com/carpedm20/korail2) by carpedm20, licensed under the BSD License.


pkgId: 69b58a9dbe0f49a329502ffa2d7d494aac102a77db0086249abdf1cfb096e7be
name: python-ssb-konjunk-help
arch: noarch
version: 0.1.15
epoch: 0
release: 1
summary: Development documents and examples for ssb-konjunk
url: https://github.com/statisticsnorway/ssb-konjunk
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ssb-konjunk-0.1.15-1.src.rpm
location_href: Packages/python-ssb-konjunk-help-0.1.15-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/ssb-konjunk.svg)][pypi status]
  [![Status](https://img.shields.io/pypi/status/ssb-konjunk.svg)][pypi status]
  [![Python Version](https://img.shields.io/pypi/pyversions/ssb-konjunk)][pypi status]
  [![License](https://img.shields.io/pypi/l/ssb-konjunk)][license]

  [![Documentation](https://github.com/statisticsnorway/ssb-konjunk/actions/workflows/docs.yml/badge.svg)][documentation]
  [![Tests](https://github.com/statisticsnorway/ssb-konjunk/actions/workflows/tests.yml/badge.svg)][tests]
  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-konjunk&metric=coverage)][sonarcov]
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-konjunk&metric=alert_status)][sonarquality]

  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
  [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]
  [![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)
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)][poetry]

  [pypi status]: https://pypi.org/project/ssb-konjunk/
  [documentation]: https://statisticsnorway.github.io/ssb-konjunk
  [tests]: https://github.com/statisticsnorway/ssb-konjunk/actions?workflow=Tests

  [sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-konjunk
  [sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-konjunk
  [pre-commit]: https://github.com/pre-commit/pre-commit
  [black]: https://github.com/psf/black
  [poetry]: https://python-poetry.org/



  - Masse



  - TODO



  You can install _SSB Konjunk_ via [pip] from [PyPI]:

  ```console
  pip install ssb-konjunk
  ```



  Please see the [Reference Guide] for details.



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



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



  If you encounter any problems,
  please [file an issue] along with a detailed description.



  This project was generated from [Statistics Norway]'s [SSB PyPI Template].

  [statistics norway]: https://www.ssb.no/en
  [pypi]: https://pypi.org/
  [ssb pypi template]: https://github.com/statisticsnorway/ssb-pypitemplate
  [file an issue]: https://github.com/statisticsnorway/ssb-konjunk/issues
  [pip]: https://pip.pypa.io/

  <!-- github-only -->

  [license]: https://github.com/statisticsnorway/ssb-konjunk/blob/main/LICENSE
  [contributor guide]: https://github.com/statisticsnorway/ssb-konjunk/blob/main/CONTRIBUTING.md
  [reference guide]: https://statisticsnorway.github.io/ssb-konjunk/reference.html


pkgId: 6e08852f74f8b8f52e4a36741fba0497876a628ce3c74bf95e9ee44d513e190b
name: python-ssh-terminal-manager-help
arch: noarch
version: 1.1.6
epoch: 0
release: 1
summary: Development documents and examples for ssh-terminal-manager
url: https://github.com/zhbjsh/ssh-terminal-manager
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ssh-terminal-manager-1.1.6-1.src.rpm
location_href: Packages/python-ssh-terminal-manager-help-1.1.6-1.noarch.rpm
checksum_type: sha256
description:
  ```python
  from ssh_terminal_manager import SSHManager

  manager = SSHManager("192.168.0.123", username="user", password="1234")

  await manager.async_update_state(raise_errors=True)
  ```


pkgId: 65fbfbd452f1297240f852429900009f6b32ff543e6faacbbaec4d1b071868d1
name: python-sssekai-help
arch: noarch
version: 0.5.10
epoch: 0
release: 1
summary: Development documents and examples for sssekai
url: https://github.com/mos9527/sssekai
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sssekai-0.5.10-1.src.rpm
location_href: Packages/python-sssekai-help-0.5.10-1.noarch.rpm
checksum_type: sha256
description:
  [![Windows Build](https://github.com/mos9527/sssekai/actions/workflows/python-publish.yml/badge.svg)](https://github.com/mos9527/sssekai/blob/main/.github/workflows/python-publish.yml) [![Releases](https://img.shields.io/github/downloads/mos9527/sssekai/total.svg)](https://GitHub.com/mos9527/sssekai/releases/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  Command-line tool (w/Python API support) for Project SEKAI (JP: プロジェクトセカイ カラフルステージ！ feat.初音ミク) game assets.


  **For Windows Users** : Builds are available [here](https://github.com/mos9527/sssekai/releases)

  Python >=3.10 is required to run this tool.

  Or get the latest version from PyPI:
  ```bash
      pip install sssekai
  ```
  ...Or install it from source:
  ```bash
      pip install git+https://github.com/mos9527/sssekai
  ```

  ```bash
      pip install sssekai --upgrade
  ```


  See the [wiki page!](https://github.com/mos9527/sssekai/wiki)


  https://github.com/mos9527/sssekai_blender_io


  MIT


  - https://github.com/K0lb3/UnityPy
  - https://mos9527.github.io/tags/project-sekai/


pkgId: eae0b76de0ff82b87b2c8b45fd205e4007de664d43d797946f66aa54b30aa1d2
name: python-stac-fastapi.core-help
arch: noarch
version: 3.2.2
epoch: 0
release: 1
summary: Development documents and examples for stac-fastapi.core
url: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stac-fastapi.core-3.2.2-1.src.rpm
location_href: Packages/python-stac-fastapi.core-help-3.2.2-1.noarch.rpm
checksum_type: sha256
description:
  **Online Documentation**: [https://stac-utils.github.io/stac-fastapi-elasticsearch-opensearch](https://stac-utils.github.io/stac-fastapi-elasticsearch-opensearch/)


pkgId: 760aa449e8129ee6f172df29eae9d34212b167196bd9aaea7c8c54e5b3c9655a
name: python-staged-script-help
arch: noarch
version: 2.0.1
epoch: 0
release: 1
summary: Development documents and examples for staged-script
url: https://github.com/sandialabs/staged-script
rpm_license: LICENSE.md
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-staged-script-2.0.1-1.src.rpm
location_href: Packages/python-staged-script-help-2.0.1-1.noarch.rpm
checksum_type: sha256
description:
  ![Lines of code](https://sloc.xyz/github/sandialabs/staged-script/?category=code)
  [![codecov](https://codecov.io/gh/sandialabs/staged-script/branch/master/graph/badge.svg?token=FmDStZ6FVR)](https://codecov.io/gh/sandialabs/staged-script)
  [![CodeFactor](https://www.codefactor.io/repository/github/sandialabs/staged-script/badge/master)](https://www.codefactor.io/repository/github/sandialabs/staged-script/overview/master)
  [![CodeQL](https://github.com/sandialabs/staged-script/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/sandialabs/staged-script/actions/workflows/github-code-scanning/codeql)
  [![Conda Version](https://img.shields.io/conda/v/conda-forge/staged-script?label=conda-forge)](https://anaconda.org/conda-forge/staged-script)
  ![Conda Downloads](https://img.shields.io/conda/d/conda-forge/staged-script?label=conda-forge%20downloads)
  [![Continuous Integration](https://github.com/sandialabs/staged-script/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/sandialabs/staged-script/actions/workflows/continuous-integration.yml)
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
  [![GitHub contributors](https://img.shields.io/github/contributors/sandialabs/staged-script.svg)](https://github.com/sandialabs/staged-script/graphs/contributors)
  [![Documentation Status](https://readthedocs.org/projects/staged-script/badge/?version=latest)](https://staged-script.readthedocs.io/en/latest/?badge=latest)
  [![License](https://anaconda.org/conda-forge/staged-script/badges/license.svg)](LICENSE.md)
  [![Merged PRs](https://img.shields.io/github/issues-pr-closed-raw/sandialabs/staged-script.svg?label=merged+PRs)](https://github.com/sandialabs/staged-script/pulls?q=is:pr+is:merged)
  [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/8864/badge)](https://bestpractices.coreinfrastructure.org/projects/8864)
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/sandialabs/staged-script/badge)](https://securityscorecards.dev/viewer/?uri=github.com/sandialabs/staged-script)
  ![Platforms](https://anaconda.org/conda-forge/staged-script/badges/platforms.svg)
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
  [![pre-commit.ci Status](https://results.pre-commit.ci/badge/github/sandialabs/staged-script/master.svg)](https://results.pre-commit.ci/latest/github/sandialabs/staged-script/master)
  [![PyPI - Version](https://img.shields.io/pypi/v/staged-script?label=PyPI)](https://pypi.org/project/staged-script/)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/staged-script?label=PyPI%20downloads)
  ![Python Version](https://img.shields.io/badge/Python-3.9|3.10|3.11|3.12|3.13-blue.svg)
  [![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)



  Python is an ideal language for certain types of infrastructure automation.
  Automating what a user does manually often involves walking through a series of
  stages.  A user may wish to run all the stages in series, or perhaps only a
  subset, and depending on how things go, certain stages may need to be retried.
  Once the script finishes running, it'd be ideal if it could tell the user
  exactly what was run, for the sake of easing replicability.  `staged-script`
  aims to ease the development such automation scripts.  It's easy to get started
  with, but also provides significant power-user functionality for those who need
  it.



  To get up and running with `staged-script`, simply:
  ```bash
  python3 -m pip install staged-script
  ```



  Once installed, you can simply
  ```python
  import sys

  from staged_script import StagedScript


  class MyScript(StagedScript):

      @StagedScript.stage("hello", "Greeting the user")
      def say_hello(self) -> None:
          self.run("echo 'Hello World'", shell=True)

      @StagedScript.stage("goodbye", "Bidding farewell")
      def say_goodbye(self) -> None:
          self.run("echo 'Goodbye World'", shell=True)

      def main(self, argv: list[str]) -> None:
          self.parse_args(argv)
          try:
              self.say_hello()
              self.say_goodbye()
          finally:
              self.print_script_execution_summary()


  if __name__ == "__main__":
      my_script = MyScript({"hello", "goodbye"})
      my_script.main(sys.argv[1:])
  ```

  For more detailed usage and API information, please see
  [our documentation][docs].

  [docs]: https://staged-script.readthedocs.io



  If you're having trouble with `staged-script`, or just want to ask a question,
  head on over to [our issue board][issues].  If a quick search doesn't yield
  what you're looking for, feel free to file an issue.

  [issues]: https://github.com/sandialabs/staged-script/issues



  If you're interested in contributing to the development of `staged-script`,
  we'd love to have your help :grinning:  Check out our
  [contributing guidelines](CONTRIBUTING.md) for how to get started.
  [Past contributors][contributors] include:
  * [@jmgate](https://github.com/jmgate)

  [contributors]: https://github.com/sandialabs/staged-script/graphs/contributors



  See [LICENSE.md](LICENSE.md) and [COPYRIGHT.md](COPYRIGHT.md).



  Special thanks to [the GMS project][gms] for investing in the development of
  this package.  Aspects of this functionality were inspired by the
  [SPiFI][spifi] Jenkins Pipeline plugin and the [ShellLogger][shelllogger]
  Python package.

  [gms]: https://github.com/SNL-GMS/GMS-PI25
  [spifi]: https://github.com/sandialabs/SPiFI
  [shelllogger]: https://github.com/sandialabs/shell-logger


pkgId: 2af79607508ff1653d444fdf10dffc59568b50a595b40efde644d1ed9b910159
name: python-stagehand-help
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: Development documents and examples for stagehand
url: https://github.com/DaelonSuzuka/Stagehand
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stagehand-0.2.1-1.src.rpm
location_href: Packages/python-stagehand-help-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  Stagehand is a collection of tools that help automate and streamline your OBS experience.



  Stagehand is developed primarily on Windows 10, and has been lightly tested on Ubuntu 20.04. In theory, there's no reason it won't also work on MacOS, but I don't currently have plans to support Macs.



  - [windows-installer](https://nightly.link/DaelonSuzuka/Stagehand/workflows/release.yaml/master/windows-installer.zip)
  - [windows-portable](https://nightly.link/DaelonSuzuka/Stagehand/workflows/release.yaml/master/windows-portable.zip)
  - [linux-portable](https://nightly.link/DaelonSuzuka/Stagehand/workflows/release.yaml/master/linux-portable.zip)

  Stagehand is also perfectly happy to execute from source. This requires git, Python 3, and GNU Make to be installed(Ubuntu systems also need the `python3-venv` package, for some reason). Simply clone the repo and run it as follows:

  ```bash
  git clone git@github.com:DaelonSuzuka/Stagehand.git
  cd Stagehand
  make run
  ```

  Ubuntu 20.04 (and presumably other distros) don't have portaudio installed by default. The python audio library I use(`sounddevice`) includes a copy of portaudio on Windows, but on Linux (and Mac), you'll have to install portaudio using your package manager.



  The core idea of Stagehand is `actions`. An action has 3 parts: `trigger`, `filter`, and `output`. A `trigger` is some external event that causes an action to activate. `Filters` can prevent an action from activating based on some condition. `Output` is what the action actually does.

  Stagehand itself only has one `trigger`, one `filter`, and one `output`. All additional functionality is provided by a robust plugin system.



  Plugins can register one or more `triggers`, `filters`, or `outputs`, which are made available for use both in Stagehand's UI and in the `Sandbox`'s execution environment.

  Stagehand comes standard with a number of plugins:
  - OBS remote control
  - Microphone Voter
  - Web Actions
  - Joystick
  - Keyboard
  - Physical Input Device Support, including
    - Stomp4 pedals
    - Stomp5 pedals
    - Click4 switches




  Stagehand connects to OBS Studio using Palakis' excellent [obs-websocket](https://github.com/Palakis/obs-websocket) plugin.

  By default, Stagehand looks for an obs-websocket server at `localhost:4444`. It's no problem if OBS is running on a different computer or you defined a custom port for the obs-websocket server, just update the fields in the OBS Manager tab.

  Stagehand also supports password authentication for obs-websocket.

  Stagehand will attempt to connect to the websocket at startup. This behavior can be disabled by unchecking the 'Connect on Startup' box.



  It's possible that I'm the only person with this problem, but my streaming/video call setup has 3 microphones. There's a desk mic on an arm for when I'm sitting at my pc, there's a second desk mic on an arm for when I'm at my electronics workbench, and there's a mic on my wireless headset. If I don't mute the 2 I'm not actively using, then my outbound audio gets a nasty echo from two/three mics picking up the same sounds. I try to keep the inactive mics muted, but I often forget to change the mute settings when moving back and forth between my computer and workbench.

  Stagehand's Microphone Voter solves this by monitoring my microphone audio, calculating which mic is currently the loudest, and sending commands to OBS to mute/unmute the proper mics.

  I can even use this in discord/zoom/whatever calls by using OBS to route my audio devices to the input of a VoiceMeeter Virtual Audio Cable, and using the output of that Virtual Audio Cable as my 'microphone' in discord.



  - Documentation
  - Examples and usage



  Don't let the limited number of built-in actions fool you, they're actually *extremely* powerful.

  Pretty much the simplest action in any language is to print 'hello world', so let's start with that.

  ![editing actions](images/action_basic.gif)

  Actions aren't limited to only one line, simply press the edit button to pop out the multiline editor.

  ![editing actions](images/action_multiline.gif)

  Actions can do a lot more than just print. The sandbox is a full python execution environment.

  ![editing actions](images/action_for_loop.gif)

  The sandbox is an isolated environment, and code is checked for errors before being executed. Typos and syntax errors aren't going to crash Stagehand.

  ![editing actions](images/sandbox_validation.gif)

  Stagehand has more tools available than just running code snippets directly. Data persistence allows you to write complex actions that just aren't possible on other platforms.

  ![editing actions](images/sandbox_persistence.gif)



  The `keyboard` plugin provides a `trigger` that listens for key presses and an `output` that can simulate keypresses in your system.

  ![editing actions](images/keyboard_plugin.gif)



  ![OBS Websocket Controls](images/obs_settings.png)




  ![editing actions](images/action_copy_paste.gif)



  ![editing actions](images/action_reset.gif)



  ![editing actions](images/action_rename.gif)


pkgId: 3e828bbc2e0208576973cefe852d6116bfe14418d06967ca396f08d7972be3da
name: python-stalker-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for stalker
url: https://pypi.org/project/stalker/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stalker-1.0.1-1.src.rpm
location_href: Packages/python-stalker-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  Stalker is an Open Source Production Asset Management (ProdAM) Library designed
  specifically for Animation and VFX Studios. But it can be used for any kind of
  projects from any other industry. Stalker is licensed under LGPL v3.

rpm_license:
  GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.   This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.  0. Additional Definitions.  As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.  "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.  An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.  A "Combined Work" is a work produced by combining or linking an Application with the Library.  The particular version of the Library with which the Combined Work was made is also called the "Linked Version".  The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.  The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.  1. Exception to Section 3 of the GNU GPL.  You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.  2. Conveying Modified Versions.  If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:  a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or  b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.  3. Object Code Incorporating Material from Library Header Files.  The object code form of an Application may incorporate material from a header file that is part of the Library.  You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:  a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.  b) Accompany the object code with a copy of the GNU GPL and this license document.  4. Combined Works.  You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:  a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.  b) Accompany the Combined Work with a copy of the GNU GPL and this license document.  c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.  d) Do one of the following:  0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.  1) Use a suitable shared library mechanism for linking with the Library.  A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.  e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)  5. Combined Libraries.  You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:  a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.  b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.  6. Revised Versions of the GNU Lesser General Public License.  The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.  Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.  If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.


pkgId: 1aff693e0a2498daf2bf3d00986a148193e74f4858a76ff7b5a1c41e7b4fcf43
name: python-starbridge-help
arch: noarch
version: 0.0.14
epoch: 0
release: 1
summary: Development documents and examples for starbridge
url: https://github.com/helmut-hoffer-von-ankershoffen/starbridge
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starbridge-0.0.14-1.src.rpm
location_href: Packages/python-starbridge-help-0.0.14-1.noarch.rpm
checksum_type: sha256
description:
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
  [![Test](https://github.com/helmut-hoffer-von-ankershoffen/starbridge/actions/workflows/test.yml/badge.svg)](https://github.com/helmut-hoffer-von-ankershoffen/starbridge/actions/workflows/test.yml)
  [![codecov](https://codecov.io/gh/helmut-hoffer-von-ankershoffen/starbridge/graph/badge.svg?token=SX34YRP30E)](https://codecov.io/gh/helmut-hoffer-von-ankershoffen/starbridge)

  > ⚠️ **WARNING**: This project is currently in pre-alpha phase, i.e. partly functional. Feel free to watch or star the repository to stay updated on its progress.


  Integrates Claude Desktop with Google and Atlassian workspaces.

  This integration serves two main purposes:
  1. **Make Claude smarter**: Makes Claude an informed member of your organisation by accessing your organization's key knowledge resources.
  2. **Integrate research and knowlege management**: Enables your teams to contribute, refine, and maintain your organisation's knowledge resources within Claude.
  3. **Improve efficiency**: Automate workflows such as generating Confluence pages from Google Docs, or vice versa.



  * "Create a page about road cycling, focusing on Canyon bikes, in the personal confluence space of Helmut."



  ```shell
  if [[ "$OSTYPE" == "darwin"* ]]; then # Install dependencies for macOS X
    brew install curl cairo
  elif [[ "$OSTYPE" == "linux-gnu"* ]]; then # ... resp. Linux
    sudo apt-get update -y && sudo apt-get install curl libcairo2 -y
  fi
  if ! command -v uvx &> /dev/null; then # Install uv package manager if not present
    curl -LsSf https://astral.sh/uv/install.sh | sh
  fi
  uvx starbridge install # Install starbridge, including configuration and injection into Claude Desktop App
  ```

  Note: The above works for macOS X and Linux. Windows not supported.



  Starbridge implements the [MCP Server](https://modelcontextprotocol.io/docs/concepts/architecture) interface, with Claude acting as an MCP client.



  [TODO: Document resources exposed to Claude Desktop]



  [TODO: Document prompts exposed to Claude Desktop]



  [TODO: Document tools exposed to Claude Desktop]



  [TODO: Document CLI commands]



  Please read our [Contributing Guidelines](CONTRIBUTING.md) for how to setup for development, and before making a pull request.



  * [MCP Press release](https://www.anthropic.com/news/model-context-protocol)
  * [MCP Specification and SDKs](https://github.com/modelcontextprotocol)

  * [Awesome MCP Servers](https://github.com/punkpeye/awesome-mcp-servers)



  <a href="https://star-history.com/#helmut-hoffer-von-ankershoffen/starbridge&Date">
   <picture>
     <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=helmut-hoffer-von-ankershoffen/starbridge&type=Date&theme=dark" />
     <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=helmut-hoffer-von-ankershoffen/starbridge&type=Date" />
     <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=helmut-hoffer-von-ankershoffen/starbridge&type=Date" />
   </picture>
  </a>

rpm_license:
  MIT License  Copyright (c) [2024] [Helmut Hoffer von Ankershoffen (helmuthva@googlemail.com)]  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: 7914d8d3ed8fe132758e6155fb20ddf3fa7271b97eeed1c22ce835f359b1e28a
name: python-starbridge-help
arch: noarch
version: 0.0.5
epoch: 0
release: 1
summary: Development documents and examples for starbridge
url: https://github.com/helmut-hoffer-von-ankershoffen/starbridge
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starbridge-0.0.5-1.src.rpm
location_href: Packages/python-starbridge-help-0.0.5-1.noarch.rpm
checksum_type: sha256
description:
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
  [![Test](https://github.com/helmut-hoffer-von-ankershoffen/starbridge/actions/workflows/test.yml/badge.svg)](https://github.com/helmut-hoffer-von-ankershoffen/starbridge/actions/workflows/test.yml)
  [![codecov](https://codecov.io/gh/helmut-hoffer-von-ankershoffen/starbridge/graph/badge.svg?token=SX34YRP30E)](https://codecov.io/gh/helmut-hoffer-von-ankershoffen/starbridge)

  > ⚠️ **WARNING**: This project is currently in pre-alpha phase, i.e. partly functional. Feel free to watch or star the repository to stay updated on its progress.


  Integrates Claude Desktop with Google and Atlassian workspaces.

  This integration serves two main purposes:
  1. **Make Claude smarter**: Makes Claude an informed member of your organisation by accessing your organization's key knowledge resources.
  2. **Integrate research and knowlege management**: Enables your teams to contribute, refine, and maintain your organisation's knowledge resources within Claude.
  3. **Improve efficiency**: Automate workflows such as generating Confluence pages from Google Docs, or vice versa.



  * "Create a page about road cycling, focusing on Canyon bikes, in the personal confluence space of Helmut."



  ```shell
  if ! command -v uvx &> /dev/null; then # if uv package manager not present ...
    curl -LsSf https://astral.sh/uv/install.sh | sh # ... install it
  fi
  brew install cairo # #on macOS - set export DYLD_LIBRARY_PATH="/opt/homebrew/lib:$DYLD_LIBRARY_PATH" in your shell
  uvx starbridge install # install starbridge package
  ```



  Starbridge implements the [MCP Server](https://modelcontextprotocol.io/docs/concepts/architecture) interface, with Claude acting as an MCP client.



  [TODO: Document resources exposed to Claude Desktop]



  [TODO: Document prompts exposed to Claude Desktop]



  [TODO: Document tools exposed to Claude Desktop]



  [TODO: Document CLI commands]



  Please read our [Contributing Guidelines](CONTRIBUTING.md) for how to setup for development, and before making a pull request.



  * [MCP Press release](https://www.anthropic.com/news/model-context-protocol)
  * [MCP Specification and SDKs](https://github.com/modelcontextprotocol)

  * [Awesome MCP Servers](https://github.com/punkpeye/awesome-mcp-servers)



  <a href="https://star-history.com/#helmut-hoffer-von-ankershoffen/starbridge&Date">
   <picture>
     <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=helmut-hoffer-von-ankershoffen/starbridge&type=Date&theme=dark" />
     <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=helmut-hoffer-von-ankershoffen/starbridge&type=Date" />
     <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=helmut-hoffer-von-ankershoffen/starbridge&type=Date" />
   </picture>
  </a>

rpm_license:
  MIT License  Copyright (c) [2024] [Helmut Hoffer von Ankershoffen (helmuthva@googlemail.com)]  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: d5ec622e39e7b98cadd6b4ec18601dc93f7bcd0e866bca552ed75da5277e5429
name: python-starco-scripts-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for starco-scripts
url: https://pypi.org/project/starco-scripts/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starco-scripts-1.0.0-1.src.rpm
location_href: Packages/python-starco-scripts-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  A scripts package providing various helper functions and tools.



  ```bash
  pip install starco-scripts


pkgId: 5668585148384197bfcaf11ca27cc88bcbc035ebae2dff283d8b1dabce1a4075
name: python-starco-utility-help
arch: noarch
version: 1.1.1
epoch: 0
release: 1
summary: Development documents and examples for starco-utility
url: https://pypi.org/project/starco-utility/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starco-utility-1.1.1-1.src.rpm
location_href: Packages/python-starco-utility-help-1.1.1-1.noarch.rpm
checksum_type: sha256
description:
  A utility package providing various helper functions and tools.



  ```bash
  pip install starco-utility


pkgId: 2fc5899db41089a1c3a43a12fa01261d4667a77537592593a517374affee4cd1
name: python-starlette-authlib-help
arch: noarch
version: 0.3.5
epoch: 0
release: 1
summary: Development documents and examples for starlette-authlib
url: https://github.com/aogier/starlette-authlib
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starlette-authlib-0.3.5-1.src.rpm
location_href: Packages/python-starlette-authlib-help-0.3.5-1.noarch.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/aogier/starlette-authlib/branch/master/graph/badge.svg)](https://codecov.io/gh/aogier/starlette-authlib)
  [![Package version](https://badge.fury.io/py/starlette-authlib.svg)](https://pypi.org/project/starlette-authlib)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/starlette-authlib)



  A drop-in replacement for Starlette session middleware, using [authlib's jwt](https://docs.authlib.org/en/latest/jose/jwt.html).



  It is sometimes necessary to integrate a Starlette-based application into more
  complex scenarios where other actors need to make decisions based on session
  data. This middleware makes this possible by using a standard JWT token instead
  of the Starlette-encrypted one, thus simplifying interaction with third-party
  components.



  * Python 3.7+
  * Starlette 0.9+



  ```console
  pip install starlette-authlib
  ```



  A complete example where we drop-in replace standard session middleware:

  ```python
  from starlette.applications import Starlette

  from starlette_authlib.middleware import AuthlibMiddleware as SessionMiddleware


  app = Starlette()

  app.add_middleware(SessionMiddleware, secret_key='secret')
  ```

  Other things you can configure either via environment variables or `.env` file:

  * `DOMAIN` - declare cookie domain. App must be under this domain. If empty,
    the cookie is restricted to the subdomain of the app (this is useful when you
    write eg. SSO portals)
  * `JWT_ALG` - one of authlib JWT [supported algorithms](https://docs.authlib.org/en/latest/specs/rfc7518.html#specs-rfc7518)
  * `JWT_SECRET` - jwt secret. Only useful for HS* algorithms, see the
    `sample_app` folder for middleware usage w/ crypto keys.



  A sample application is included, and you can run it with either Starlette-based session middleware or this one, just by setting a variable:

  ```

  VANILLA=1 uvicorn sample_app.app:app


  uvicorn sample_app.app:app
  ```

  As you can notice in code [here](sample_app/app.py), the only difference is an
  import name, based on this `VANILLA` env var.



  This project is absolutely open to contributions so if you have a nice idea,
  create an issue to let the community discuss it.


pkgId: 0d46dc130c665685fda0a93866626f36acb0ce3ac2151deb602c8dc9e3e51838
name: python-starlette-compress-help
arch: noarch
version: 1.4.0
epoch: 0
release: 1
summary: Development documents and examples for starlette-compress
url: https://github.com/Zaczero/starlette-compress
rpm_license: 0BSD
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starlette-compress-1.4.0-1.src.rpm
location_href: Packages/python-starlette-compress-help-1.4.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI - Python Version](https://shields.monicz.dev/pypi/pyversions/starlette-compress)](https://pypi.org/project/starlette-compress)
  [![Liberapay Patrons](https://shields.monicz.dev/liberapay/patrons/Zaczero?logo=liberapay&label=Patrons)](https://liberapay.com/Zaczero/)
  [![GitHub Sponsors](https://shields.monicz.dev/github/sponsors/Zaczero?logo=github&label=Sponsors&color=%23db61a2)](https://github.com/sponsors/Zaczero)

  **starlette-compress** is a fast and simple middleware for compressing responses in [Starlette](https://www.starlette.io). It supports more compression algorithms than Starlette's built-in GZipMiddleware, and has more sensible defaults.

  - Python 3.9+ support
  - Compatible with `asyncio` and `trio` backends
  - ZStd, Brotli, and GZip compression
  - Sensible default configuration
  - [The Unlicense](https://unlicense.org) — public domain dedication
  - [Semantic Versioning](https://semver.org) compliance



  ```sh
  pip install starlette-compress
  ```





  ```py
  from starlette.applications import Starlette
  from starlette.middleware import Middleware
  from starlette_compress import CompressMiddleware

  middleware = [
      Middleware(CompressMiddleware)
  ]

  app = Starlette(routes=..., middleware=middleware)
  ```



  You can use starlette-compress with [FastAPI](https://fastapi.tiangolo.com) too:

  ```py
  from fastapi import FastAPI
  from starlette_compress import CompressMiddleware

  app = FastAPI()
  app.add_middleware(CompressMiddleware)
  ```





  Control the minimum size of the response to compress. By default, responses must be at least 500 bytes to be compressed.

  ```py

  middleware = [
      Middleware(CompressMiddleware, minimum_size=1000)
  ]


  app.add_middleware(CompressMiddleware, minimum_size=1000)
  ```



  Adjust the compression levels for each algorithm. Higher levels mean smaller files but slower compression. Default level is 4 for all algorithms.

  ```py

  middleware = [
      Middleware(CompressMiddleware, zstd_level=6, brotli_quality=6, gzip_level=6)
  ]


  app.add_middleware(CompressMiddleware, zstd_level=6, brotli_quality=6, gzip_level=6)
  ```



  Manage the supported content-types. Unknown response types are not compressed. [Check here](https://github.com/Zaczero/starlette-compress/blob/main/starlette_compress/__init__.py) for the default configuration.

  ```py
  from starlette_compress import add_compress_type, remove_compress_type

  add_compress_type("application/my-custom-type")
  remove_compress_type("application/json")
  ```


pkgId: c4615c19ce5ee55a8e897e79f554e960d71f392c8cf7ac9f437eacb615d9a09f
name: python-starlette-help
arch: noarch
version: 0.42.0
epoch: 0
release: 1
summary: Development documents and examples for starlette
url: https://github.com/encode/starlette
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starlette-0.42.0-1.src.rpm
location_href: Packages/python-starlette-help-0.42.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/encode/starlette/workflows/Test%20Suite/badge.svg)](https://github.com/encode/starlette/actions)
  [![Package version](https://badge.fury.io/py/starlette.svg)](https://pypi.python.org/pypi/starlette)


pkgId: 105d232b4b556694ce69423dc60a07a9f97104eafaeccc40787ac5a4fae271c7
name: python-starplot-help
arch: noarch
version: 0.13.0
epoch: 0
release: 1
summary: Development documents and examples for starplot
url: https://pypi.org/project/starplot/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-starplot-0.13.0-1.src.rpm
location_href: Packages/python-starplot-help-0.13.0-1.noarch.rpm
checksum_type: sha256
description:
  ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/steveberardi/starplot/test.yml?style=for-the-badge&color=a2c185)
  ![Python](https://img.shields.io/pypi/pyversions/starplot?style=for-the-badge&color=85A2C1)
  ![PyPI](https://img.shields.io/pypi/v/starplot?style=for-the-badge&color=85C0C1)
  ![License](https://img.shields.io/github/license/steveberardi/starplot?style=for-the-badge&color=A485C1)

  **Starplot** is a Python library for creating star charts and maps of the sky.

  - ⭐ **Zenith Plots** - showing the whole sky from a specific time/location
  - 🗺️ **Map Plots** - including many map projections
  - 🔭 **Optic Plots** - simulates what you'll see through an optic (e.g. binoculars, telescope) from a time/location
  - 🪐 **Planets and Deep Sky Objects (DSOs)**
  - 🎨 **Custom Styles** - for all objects
  - 📥 **Export** - png, svg, jpeg
  - 🧭 **Label Collision Avoidance**


  *Zenith plot of the stars from a specific time/location:*
  ![starchart-blue](https://starplot.dev/images/examples/star_chart_basic.png)

  *Map around the constellation Orion:*
  ![map-orion](https://starplot.dev/images/examples/map_orion.png)

  *The Pleiades star cluster, as seen through a refractor telescope from a specific time and location:*
  ![optic-pleiades](https://starplot.dev/images/examples/optic_m45.png)



  To create a star chart for tonight's sky as seen from [Palomar Mountain](https://en.wikipedia.org/wiki/Palomar_Mountain) in California:

  ```python
  from datetime import datetime
  from pytz import timezone
  import starplot as sp

  tz = timezone("America/Los_Angeles")

  p = sp.MapPlot(
      projection=sp.Projection.ZENITH,
      lat=33.363484,
      lon=-116.836394,
      dt=datetime.now(tz).replace(hour=22),
      style=sp.styles.PlotStyle().extend(
          sp.styles.extensions.BLUE_MEDIUM,
      ),
      resolution=3200,
      autoscale=True,
  )
  p.constellations()
  p.stars(mag=4.6)
  p.export("starchart.png")
  ```



  [https://starplot.dev](https://starplot.dev)



  For a demo of Starplot's zenith plots, check out:

  [Sky Atlas - Star Chart Creator](https://skyatlas.app/star-charts/)



  Chat with other starplotters on our Discord server:

  https://discord.gg/WewJJjshFu



  Contributing to Starplot is welcome and very much appreciated! Please see [here](CONTRIBUTING.md) for details.


  - 🌄 Horizon plots
  - 🌑 Planet moons
  - ✴️ Custom markers
  - ☄️ Comet model
  - 💫 Better constellation label placement
  - 😄 🔭 Clear skies

  See more details on the [Public Roadmap](https://trello.com/b/sUksygn4/starplot-roadmap)


  [MIT License](https://github.com/steveberardi/starplot/blob/main/LICENSE)


pkgId: d761aa4cd7bb6582151931fcd5ae9a386a40c137298ca1508b827f6ccc0d21cc
name: python-start-compiler-help
arch: noarch
version: 1.0.8.0
epoch: 0
release: 1
summary: Development documents and examples for start-compiler
url: https://github.com/jjgsherwood/start_compiler
rpm_license: Creative Commons CC BY-NC-SA 4.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-start-compiler-1.0.8.0-1.src.rpm
location_href: Packages/python-start-compiler-help-1.0.8.0-1.noarch.rpm
checksum_type: sha256
description:
  This is a Python module to compile and run the language START. START is intended for use in CS first year eduction to learn programming and programming concepts. It focuses on easy to learn syntax, and, clear expression of programming concepts such as types, variables, combined types, strings, dealing with memory and assignment and simple algorithms. It is not intended to build large programs in.

  It is developed by Joost Broekens & Jonne Goedhart at LIACS Leiden University. For questions email: Joost.broekens@gmail.com


  You can compile the language with the following command:
  ```bash
  python -m start_compiler.compile <FileName>.start
  ```


  You can run the file after compiling it with:
  ```bash
  python <FileName>.py
  ```


pkgId: 7c0fce8528d5c5bcc2b8836bc94d0fd6ba3f747dcd7998009ae7c7a12d6dbaa5
name: python-stat-analys-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for stat-analys
url: https://github.com/Jean-Paul15/stat_analys
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stat-analys-0.1.0-1.src.rpm
location_href: Packages/python-stat-analys-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  `stat_analysis` est un package Python pour l'analyse statistique univariÃ©e avancÃ©e. Il permet de rÃ©aliser des analyses statistiques dÃ©taillÃ©es et de gÃ©nÃ©rer des visualisations pour les variables numÃ©riques et catÃ©gorielles.



  Installez le package en utilisant la commande suivante :

  ```bash
  pip install stat_analysis
  ```



  Voici un exemple d'utilisation du package :

  ```python
  import pandas as pd
  from stat_analysis.advanced_univariate_stat import AdvancedUnivariateStat
  from stat_analysis.configuration import ConfigurationPlot


  data = {
      'numerique': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
      'categorielle': ['A', 'B', 'A', 'C', 'B', 'A', 'C', 'B', 'A', 'C']
  }
  df = pd.DataFrame(data)


  config = ConfigurationPlot(theme_plotly="plotly_dark", theme_seaborn="darkgrid")


  stat = AdvancedUnivariateStat(config)


  resultats = stat.analyse_statistique_avancee(df, colonnes=['numerique', 'categorielle'], afficher_plots=True)
  ```



  - **Analyse statistique descriptive** : Moyennes, mÃ©dianes, Ã©cart-types, etc.
  - **Tests de normalitÃ©** : VÃ©rifiez si vos donnÃ©es suivent une distribution normale.
  - **Calcul des intervalles de confiance** : Obtenez des estimations robustes de vos donnÃ©es.
  - **Visualisations** : Graphiques interactifs avec Plotly et esthÃ©tiques avec Seaborn.



  Les contributions sont les bienvenues !

  1. Ouvrez une issue pour discuter de vos idÃ©es d'amÃ©lioration ou signaler des bugs.
  2. Faites un fork du dÃ©pÃ´t.
  3. Apportez vos modifications et soumettez une pull request.

  Nous serons ravis de collaborer avec vous !


pkgId: ddb742f4fa3233fcbba0f2ee034f8b537d80ac21414c3b88b666d418aef624d2
name: python-statlab-help
arch: noarch
version: 0.0.3
epoch: 0
release: 1
summary: Development documents and examples for statlab
url: https://github.com/noamrotenberg/statlab
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-statlab-0.0.3-1.src.rpm
location_href: Packages/python-statlab-help-0.0.3-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPi version](https://badgen.net/pypi/v/statlab)](https://pypi.org/project/statlab)


  statlab is a new Python package offering a variety of statistical and machine learning tools.

  This package is being developed by Noam Rotenberg and Zan Chaudhry.





  Submodule contains:
  + TreeOrdinalClassifier
  + SubtractionOrdinalClassifier
  + Functions to calculate classification metrics on ordinal data

  Submodule developed by: Noam Rotenberg, Andreia Faria, Brian Caffo

  Examples coming soon!




  Install: ``!pip install statlab``

  Import a single module: ``import statlab.ord`` - imports only ord

  Import all modules: ``from statlab.all import *`` - can access any function without prefixes, e.g., ``TreeOrdinalClassifier(base_clf)``

  Specific example:
  ```
  !pip install statlab
  import statlab.ord
  base_clf = # some sklearn-style classifier
  clf = statlab.ord.TreeOrdinalClassifier(base_clf)
  ```



  + Dataset mislabeling detection and classification
  + Naive Bayes classifier using nonparametric statistics
  + Automated nonlinear feature tuning


pkgId: eff10a76c37a3d8a4ea976450c4ee7f1d85dd2848a8a2359e523f85c211dcf5a
name: python-statsig-help
arch: noarch
version: 0.51.0
epoch: 0
release: 1
summary: Development documents and examples for statsig
url: https://github.com/statsig-io/python-sdk
rpm_license: ISC
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-statsig-0.51.0-1.src.rpm
location_href: Packages/python-statsig-help-0.51.0-1.noarch.rpm
checksum_type: sha256
description:
  [![tests](https://github.com/statsig-io/python-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/statsig-io/python-sdk/actions/workflows/test.yml)

  The python SDK for server/multi-user environments.

  Statsig helps you move faster with Feature Gates (Feature Flags) and Dynamic Configs. It also allows you to run A/B tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, create an account at [statsig.com](https://www.statsig.com).



  Visit our [getting started guide](https://docs.statsig.com/server/pythonSDK).



  Each server SDK is tested at multiple levels - from unit to integration and e2e tests.  Our internal e2e test harness runs daily against each server SDK, while unit and integration tests can be seen in the respective github repos of each SDK.

  Run local unit tests separately for now:

  ```
  python3 -m unittest tests/server_sdk_consistency_test.py
  python3 -m unittest tests/test_statsig_e2e.py
  ```



  - Pull requests are welcome!
  - If you encounter bugs, feel free to [file an issue](https://github.com/statsig-io/python-sdk/issues).
  - For integration questions/help, [join our slack community](https://join.slack.com/t/statsigcommunity/shared_invite/zt-pbp005hg-VFQOutZhMw5Vu9eWvCro9g).


pkgId: 318bc0a4ed0fa24cd5303697ed5954ebbf13a92bff925c160e4bb901fbb95c85
name: python-statsy-help
arch: noarch
version: 0.1.6
epoch: 0
release: 1
summary: Development documents and examples for statsy
url: https://pypi.org/project/statsy/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-statsy-0.1.6-1.src.rpm
location_href: Packages/python-statsy-help-0.1.6-1.noarch.rpm
checksum_type: sha256
description:
  ![PyPI Version](https://img.shields.io/pypi/v/statsy.svg)

  ** BEWARE: this package is under development **


  Apache 2.0


pkgId: 219c2069698fe39c5e389fe40e8838503e763bc1d85e2e00c8e80ac38aac54cb
name: python-statsy-help
arch: noarch
version: 0.3.0
epoch: 0
release: 1
summary: Development documents and examples for statsy
url: https://pypi.org/project/statsy/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-statsy-0.3.0-1.src.rpm
location_href: Packages/python-statsy-help-0.3.0-1.noarch.rpm
checksum_type: sha256
description:
  <img src="../docs/images/statsysmall.png" alt="drawing" width="200" display= "block" margin-left="auto" margin-right="auto"/>


  ![PyPI Version](https://img.shields.io/pypi/v/statsy.svg)

  **BEWARE: this package is under development.**

  **Until a stable release, please use other packages such as [NumPy](https://pypi.org/project/numpy/) or [StatsModels](https://www.statsmodels.org/stable/index.html)**



  This package is an implementation of common statistical operations and methods for Python users. Although other modules, libraries, and packages already cover much of the content of this package, the expressions and functions are designed to be more user friendly (i.e., written in a more stats-native way).

  This package has not been optimized for speed and efficency.

  For more information, visit the main repository on [GitHub](https://github.com/cameronmore/Statsy).



  Development of this module is ongoing, and will soon be open to contributions.


  Apache 2.0


pkgId: e7955061ac2fb88d440480ed41490f7c4e2e49225b5051fd550e74f820a54e84
name: python-steadysun-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for steadysun
url: https://www.steady-sun.com
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-steadysun-0.1.0-1.src.rpm
location_href: Packages/python-steadysun-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  A Python package designed to facilitate interaction with the [**Steadysun** API](https://steadyweb.steady-sun.com/rapidoc/).



  - **Easy API Interaction**: Simplified methods to authenticate and query the Steadysun API.
  - **Data Retrieval**: Fetch solar forecast data in various formats (JSON, CSV, etc.).
  - **Error Handling**: Graceful error handling for common API errors such as authentication failure, bad requests, and more.
  - **Customizable**: Flexible configuration options to tailor API requests to your needs.



  You can install the package using pip:

  ```bash
  pip install steadysun
  ```



  Here's an example of how to use `steadysun`:

  ```python
  from steadysun.steadysun_api import SteadysunAPI
  from steadysun.forecast import get_forecast



  SteadysunAPI.set_api_token("YOUR_TOKEN")

  forecast_df = get_forecast("SITE_UUID")

  forecast_df = get_forecast(
      site_uuid="SITE_UUID",
      time_step=30,
      horizon=2440,
      precision=4,
      fields=["all_sky_global_horizontal_irradiance", "2m_temperature"],
  )
  ```



  - **Package doc** : For detailed information about this package, please refer to [https://steadysun-pypi.readthedocs.io](https://steadysun-pypi.readthedocs.io).
  - **API doc** : For detailed information about the API endpoints, parameters, and available data, please refer to the [Steadysun API Documentation](https://steadyweb.steady-sun.com/rapidoc/).




  For detailed information on version updates of this package, please refer to the [CHANGELOG](./CHANGELOG.md).



  For questions, issues, or support, feel free to reach out via email at <contact@steady-sun.com>.

  You can also submit ideas or report issues on the [GitHub Issues page](https://github.com/steadysun-pmade/steadysun-pypi/issues).



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

rpm_license:
  MIT License  Copyright (c) [2024] [Steadysun]  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:  1. **Attribution**: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. If you distribute or modify the Software, you must provide proper attribution to the original author by including a visible credit in the documentation or product.  2. **Paid Services**: Some functionalities of this software may require a paid token or subscription to access certain services. The Software itself remains free to use, modify, and distribute, but third-party services or API integrations may require payment.  3. **Disclaimer**: 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: cc7312e7e34f0a6ff19e13a2750da85746e502428370a790099432a5c28225c2
name: python-stensor-help
arch: noarch
version: 0.2
epoch: 0
release: 1
summary: Development documents and examples for stensor
url: https://gitee.com/ligan15/stensor
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stensor-0.2-1.src.rpm
location_href: Packages/python-stensor-help-0.2-1.noarch.rpm
checksum_type: sha256
description:
  - [stensor介绍](#stensore介绍)
  - [快速入门](#快速入门)
      - [目录层级](#目录层级)
          - [common模块](#common模块)
          - [dataset模块](#dataset模块)
          - [nn模块](#nn模块)
          - [ops模块](#ops模块)
  - [TODOList](#TODOList)
  - [展望](#展望)
      - [动静统一](#动静统一)
      - [元模块模版](#元模块模版)




  stensor是一种轻量化的深度学习训练/推理框架，对标pytorch提供的接口。

  主要特性包括：

      - 自动微分

      - 算子入参类型校验

      - tensor接口注册机制




  参考test_transfomer实现翻译任务，主要包括以下流程：

      1. 设置超参数
        1）.arg = ArgConfig()
      2. 读取数据
        1）.创建Dateset
        2）.Dataset传递给DataLoader
      3. 创建模型
        1）.模型初始化 model = Model(arg)
      4. 创建优化器
        1）.优化器初始化 opt = Optimizer(arg_opt, model.parameters())
      5. 训练
        1）.DataLoader迭代产生训练数据提供给模型
        2）.模型计算 y = model(x)
        3）.损失函数计算 loss = loss_f(y, target)
        4）.反向传播 loss.backward()
        5）.优化器更新参数 opt.update()
      6. 推理




  - `model/` —— 模型库
  - `stensor/` —— 源代码目录
    - `common/` —— tensor类
    - `dataset/` —— datase  - `common/` —— tensor类定义
    - `dataset/` —— dataload类
    - `nn/` —— nn部分代码
    - `ops/` —— 算子库
    - `__init__.py` —— 暴露的所有api接口
    - `config.py` —— 上下文环境管理
  - `tests/` —— 测试用例
  - `requirements.txt` —— 依赖的三方库
  - `README.md` —— 当前文件
  - `LICENSE` —— 许可证文件
  - `.gitignore` —— Git忽略文件列表



  - `common/` —— 源代码目录
    - `__init__.py` —— 暴露接口
    - `_register_for_tensor.py` —— 在functional.py中注册tensor接口
    - `tensor.py` —— Tensor类
    - `utils.py` —— 工具函数

  Tensor类的设计思路：

      1. Tensor类属性self.data中承载真实数据。

      2. 以loss的输出Tensor开始，调用backward接口进行自动微分流程。

  Parameter类的设计思路：

      1. 继承自Tensor类，定义为模型层中的权重参数。以属性self.required_grad来判断是否进行权重更新。




  - `common/` —— 源代码目录
    - `__init__.py` —— 暴露接口
    - `dataloaders.py` —— Dataset负责建立索引到样本的映射
    - `datasets.py` —— DataLoader负责以特定的方式从数据集中迭代的产生 一个个batch的样本集合
   —— 源代码目录
    - `layer/` —— 所有nn层接口
      - `__init__.py` —— 暴露接口
      - `activation.py` —— 激活函数层
      - `convolution.py` —— 卷积层
      - `embedding.py` —— 编码层
      - `linear.py` —— 线性层
      - `normalization.py` —— 正则化层
      - `pooling.py` —— 池化层
      - `rnn.py` —— RNN层
    - `loss/` —— 损失函数层
      - `__init__.py` —— 暴露接口
      - `loss.py` —— 损失函数层，通常作为独立的一层与模型组合
    - `opt/` —— 优化器
      - `__init__.py` —— 暴露接口
      - `optimizer.py` —— 优化器更新参数
    - `__init__.py` —— 暴露接口
    - `container.py` —— module的容器类
    - `metric.py` —— 评测指标
    - `module.py` —— 模型构建的基本单元
    - `utils.py` —— 工具函数

  Module类的设计思路：

      1.'__init__'和forward两个函数进行模型的初始化和正向计算过程的搭建。

      2.用_params储存所有的参数。用_submodules储存所有的子模块。通过重载__setattr__魔术方法，在构建model时，自动将当前module的parameter和submodule存储，最终树状结构通过names_and_parameters和names_and_submodules两个接口使用yield打印出来。

      3.to_gpu和to_cpu接口分别将params转化为numpy/cupy的格式。

      4.load_weights和load_weights接口将numpy格式的params保存和加载。

      5.plot接口序列化为dot格式文件，并调用第三方工具dot画出计算图。


  Optimizer类的设计思路：

      1.初始化时传入需要更新的参数。

      2.zero_grad接口进行梯度重置。

      3.step接口进行一次梯度更新。

      4.add_hook接口在参数更新前进行hook函数的操作。




  - `nn/` —— 源代码目录
    - `operations/` —— 所有ops接口
      - `__init__.py` —— 暴露接口
      - `activation_ops.py` —— 激活函数算子
      - `common_ops.py` —— Tensor操作算子
      - `math_ops.py` —— 数学计算类算子
      - `nn_ops.py` —— nn类算子
      - `utils.py` —— 工具函数
    - `__init__.py` —— 暴露接口
    - `functional.py` —— 所有functional接口
    - `primitive.py` —— 算子构建基本单元

  Primitive类的设计思路：

      1.重载__call__方法，取出输入的Tensor类中承载的真实数据，调用forward进行正向计算，并封装成Tensor返回。

      2.Tensor.backward接口中使用链式法则调用单算子反向计算函数Primitive.backward完成自动微分。



  1. 使用cupy支持GPU。
  2. 使用pybind支持算子在CPU和cuda的实现。
  3. 完善_type_check，支持可变输入的Tensor。
  4. 完善dataset模块，支持Sample类。





  未来支持的特性包括：



      （基础模版）提供元模块模版，用户可以通过yaml定义组建模型，自动生成编译好的图，从而进行组合。
      （支持定制）对于自定义的模型， 可以通过最小粒度的元类型模版进行搭建，再调用编译接口，生成编译好的子图并保存。



      合并动态图和静态图的概念，用户组件好的模型将自动生成编译成整图，达到最优性能执行。


pkgId: 3190a13f4c8574dd68d026425cdba2b29319b44eaf79f8f883ed6d53d955e85b
name: python-stf-appium-client-help
arch: noarch
version: 0.12.1
epoch: 0
release: 1
summary: Development documents and examples for stf-appium-client
url: https://github.com/OpenTMI/stf-appium-python-client
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stf-appium-client-0.12.1-1.src.rpm
location_href: Packages/python-stf-appium-client-help-0.12.1-1.noarch.rpm
checksum_type: sha256
description:
  [![Unit tests](https://github.com/OpenTMI/stf-appium-python-client/actions/workflows/test.yml/badge.svg)](https://github.com/OpenTMI/stf-appium-python-client/actions/workflows/test.yml)
  [![Coverage Status](https://coveralls.io/repos/github/OpenTMI/stf-appium-python-client/badge.svg?branch=main&t=CQV17G)](https://coveralls.io/github/OpenTMI/stf-appium-python-client?branch=main)
  [![PyPI version](https://badge.fury.io/py/stf-appium-client.svg)](https://badge.fury.io/py/stf-appium-client)

  Library provides basic functionality for test automation which allows allocating
  phone from [STF](https://github.com/DeviceFarmer/stf) server using [python stf-client](https://pypi.org/project/stf-client/), initialise adb connection to it and
  start [appium][https://github.com/appium/python-client] server for it.

  Basic idea is to run tests against remote openstf device farm with minimum
  requirements.



  ```mermaid
  sequenceDiagram
      participant C as User
      participant A as stf-appium-client
      participant B as STF(device)
      C->>A: allocation_context(requirements, wait_timeout, timeout, shuffle)
      A->>B: Find suitable device
      A->>B: allocate device
      A->>B: remoteConnect
      A->>B: ADB Connection
      A->>A: Start AppiumServer(ADB)
      A->>A: Start AppiumClient(AppiumServer)
      A->>C: AppiumClient(AppiumServer(ADB))
      C->>A: Run Appium Tests
  ```




  These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


  * openstf server and access token
  * python >=3.8
  * adb
  * appium (`npm install appium`)
    Library expects that appium is located to PATH
    * appium 2 (`npm install appium@next`)
      * remember to install appium drivers, e.g. `appium driver install uiautomator2`
    * appium 1
    * note that appium server and client need to be compatible with each other!
      * see compatibility matrix from [python-client readme](https://github.com/appium/python-client?tab=readme-ov-file#compatibility-matrix)



  * `pip install stf-appium-client`

  or for development purpose:

  * `pip install -e .`



  `make test`

  CI runs tests against following environments:

  |      | ubuntu-latest | macos-latest | windows-latest |
  |------| ------------- | ------------- | ------------- |
  | 3.7  | ✓  | ✓  | ✓  |
  | 3.8  | ✓  | ✓  | ✓  |
  | 3.9  | ✓  | ✓  | ✓  |
  | 3.10 | ✓  | ✓  | ✓  |
  | 3.11 | ✓  | ✓  | ✓  |



  This pip package could be installed together with test framework
  and utilise using CLI interface or via python interface.
  See more usage examples below.





  ```
  client = StfClient(host=environ.get('STF_HOST'))
  client.connect(token=environ.get('STF_TOKEN'))

  with client.allocation_context(
          requirements=dict(version='10')) as device:
      print('phone is now allocated and remote connected')
      with AdbServer(device['remote_adb_url']) as adb_port:
          print('adb server started with port: {adb_port}')
              with AppiumServer() as appium:
                  print("Phone is ready for test automation..")
                  
                  with AppiumClient() as driver:
                     print(driver)
  ```

  See examples from [examples](examples) -folder.



  Library utilise python native logging module. Logger name is `StfAppiumClient`.
  By default it configure default console handler for logger with `INFO` level.
  `STF_APPIUM_LOGGING` env variable can be used to use `DEBUG` logging level.
  If any handlers for this logger is configured before `StfClient` instance
  creation no default handlers are added.



  ```shell script
  stf --token 123456 --requirements "{\"version\": \"9\"}" "echo $DEV1_SERIAL"
  ```

  Call robot framework
  ```shell script
  stf --token 123456 --requirements "{\"version\": \"9\"}" "robot phone/suite"
  ```


  ```shell script
  $ stf --help
  usage: stf [-h] --token TOKEN [--host HOST] [--requirements R] [--list]
             [command [command ...]]

  STF client with appium.

  Tool allocate phone, create adb and appium server and
  call user given command with generated env variables:
  DEV1_ADB_PORT      ADB PORT that appium utilize.
  DEV1_APPIUM_HOST   appium host where user given command can connect, e.g. robot framework
  DEV1_SERIAL        device details..
  DEV1_VERSION
  DEV1_REQUIREMENTS  user given requirements
  DEV1_INFO          phone details

  Example: stf --token 123 -- echo \$DEV1_SERIAL


  positional arguments:
    command           Command to be execute during device allocation

  optional arguments:
    -h, --help          show this help message and exit
    --token TOKEN       openstf access token
    --host HOST         openstf host
    --list              list only requirements, filtered on given requirements
    --requirements R    requirements as json string
    --timeout t         allocation timeout
    --wait_timeout w    max wait time for suitable device allocation
    --verbose           appium logs to console. WARNING: this mix console prints
    --appium-logs file  appium logs to file

  ```



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


pkgId: 9de16fda796b89c3ef983e5aa9e30381dbccb728fc39a8e18271be3b143e26dc
name: python-stheno-help
arch: noarch
version: 1.4.2
epoch: 0
release: 1
summary: Development documents and examples for stheno
url: https://github.com/wesselb/stheno
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stheno-1.4.2-1.src.rpm
location_href: Packages/python-stheno-help-1.4.2-1.noarch.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/wesselb/stheno/workflows/CI/badge.svg?branch=master)](https://github.com/wesselb/stheno/actions?query=workflow%3ACI)
  [![Coverage Status](https://coveralls.io/repos/github/wesselb/stheno/badge.svg?branch=master)](https://coveralls.io/github/wesselb/stheno?branch=master)
  [![Latest Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://wesselb.github.io/stheno)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  Stheno is an implementation of Gaussian process modelling in Python. See
  also [Stheno.jl](https://github.com/willtebbutt/Stheno.jl).

  [Check out our post about linear models with Stheno and JAX.](https://wesselb.github.io/2021/01/19/linear-models-with-stheno-and-jax.html)

  Contents:

  * [Nonlinear Regression in 20 Seconds](#nonlinear-regression-in-20-seconds)
  * [Installation](#installation)
  * [Manual](#manual)
      - [AutoGrad, TensorFlow, PyTorch, or JAX? Your Choice!](#autograd-tensorflow-pytorch-or-jax-your-choice)
      - [Model Design](#model-design)
      - [Finite-Dimensional Distributions](#finite-dimensional-distributions)
      - [Prior and Posterior Measures](#prior-and-posterior-measures)
      - [Inducing Points](#inducing-points)
      - [Kernels and Means](#kernels-and-means)
      - [Batched Computation](#batched-computation)
      - [Important Remarks](#important-remarks)
  * [Examples](#examples)
      - [Simple Regression](#simple-regression)
      - [Hyperparameter Optimisation with Varz](#hyperparameter-optimisation-with-varz)
      - [Hyperparameter Optimisation with PyTorch](#hyperparameter-optimisation-with-pytorch)
      - [Decomposition of Prediction](#decomposition-of-prediction)
      - [Learn a Function, Incorporating Prior Knowledge About Its Form](#learn-a-function-incorporating-prior-knowledge-about-its-form)
      - [Multi-Output Regression](#multi-output-regression)
      - [Approximate Integration](#approximate-integration)
      - [Bayesian Linear Regression](#bayesian-linear-regression)
      - [GPAR](#gpar)
      - [A GP-RNN Model](#a-gp-rnn-model)
      - [Approximate Multiplication Between GPs](#approximate-multiplication-between-gps)
      - [Sparse Regression](#sparse-regression)
      - [Smoothing with Nonparametric Basis Functions](#smoothing-with-nonparametric-basis-functions)



  ```python
  >>> import numpy as np

  >>> from stheno import GP, EQ

  >>> x = np.linspace(0, 2, 10)           # Some points to predict at

  >>> y = x ** 2                          # Some observations

  >>> f = GP(EQ())                        # Construct Gaussian process.

  >>> f_post = f | (f(x), y)              # Compute the posterior.

  >>> pred = f_post(np.array([1, 2, 3]))  # Predict!

  >>> pred.mean
  <dense matrix: shape=3x1, dtype=float64
   mat=[[1.   ]
        [4.   ]
        [8.483]]>

  >>> pred.var
  <dense matrix: shape=3x3, dtype=float64
   mat=[[ 8.032e-13  7.772e-16 -4.577e-09]
        [ 7.772e-16  9.999e-13  2.773e-10]
        [-4.577e-09  2.773e-10  3.313e-03]]>
  ```

  [These custom matrix types are there to accelerate the underlying linear algebra.](#important-remarks)
  To get vanilla NumPy/AutoGrad/TensorFlow/PyTorch/JAX arrays, use `B.dense`:

  ```python
  >>> from lab import B

  >>> B.dense(pred.mean)
  array([[1.00000068],
         [3.99999999],
         [8.4825932 ]])

  >>> B.dense(pred.var)
  array([[ 8.03246358e-13,  7.77156117e-16, -4.57690943e-09],
         [ 7.77156117e-16,  9.99866856e-13,  2.77333267e-10],
         [-4.57690943e-09,  2.77333267e-10,  3.31283378e-03]])
  ```

  Moar?! Then read on!



  ```
  pip install stheno
  ```



  Note: [here](https://wesselb.github.io/stheno) is a nicely rendered and more
  readable version of the docs.



  ```python
  from stheno.autograd import GP, EQ
  ```

  ```python
  from stheno.tensorflow import GP, EQ
  ```

  ```python
  from stheno.torch import GP, EQ
  ```

  ```python
  from stheno.jax import GP, EQ
  ```



  The basic building block is a `f = GP(mean=0, kernel, measure=prior)`, which takes
  in [a _mean_, a _kernel_](#kernels-and-means), and a _measure_.
  The mean and kernel of a GP can be extracted with `f.mean` and `f.kernel`.
  The measure should be thought of as a big joint distribution that assigns a mean and
  a kernel to every variable `f`.
  A measure can be created with `prior = Measure()`.
  A GP `f` can have different means and kernels under different measures.
  For example, under some _prior_ measure, `f` can have an `EQ()` kernel; but, under some
  _posterior_ measure, `f` has a kernel that is determined by the posterior distribution
  of a GP.
  [We will see later how posterior measures can be constructed.](#prior-and-posterior-measures)
  The measure with which a `f = GP(kernel, measure=prior)` is constructed can be
  extracted with `f.measure == prior`.
  If the keyword argument `measure` is not set, then automatically a new measure is
  created, which afterwards can be extracted with `f.measure`.

  Definition, where `prior = Measure()`:

  ```python
  f = GP(kernel)

  f = GP(mean, kernel)

  f = GP(kernel, measure=prior)

  f = GP(mean, kernel, measure=prior)
  ```

  GPs that are associated to the same measure can be combined into new GPs, which is
  the primary mechanism used to build cool models.

  Here's an example model:

  ```python
  >>> prior = Measure()

  >>> f1 = GP(lambda x: x ** 2, EQ(), measure=prior)

  >>> f1
  GP(<lambda>, EQ())

  >>> f2 = GP(Linear(), measure=prior)

  >>> f2
  GP(0, Linear())

  >>> f_sum = f1 + f2

  >>> f_sum
  GP(<lambda>, EQ() + Linear())

  >>> f_sum + GP(EQ())  # Not valid: `GP(EQ())` belongs to a new measure!
  AssertionError: Processes GP(<lambda>, EQ() + Linear()) and GP(0, EQ()) are associated to different measures.
  ```

  To avoid setting the keyword `measure` for every `GP` that you create, you can enter
  a measure as a context:

  ```python
  >>> with Measure() as prior:
          f1 = GP(lambda x: x ** 2, EQ())
          f2 = GP(Linear())
          f_sum = f1 + f2

  >>> prior == f1.measure == f2.measure == f_sum.measure
  True
  ```





  * Add and subtract GPs and other objects.

      Example:

      ```python
      >>> GP(EQ(), measure=prior) + GP(Exp(), measure=prior)
      GP(0, EQ() + Exp())

      >>> GP(EQ(), measure=prior) + GP(EQ(), measure=prior)
      GP(0, 2 * EQ())

      >>> GP(EQ()) + 1
      GP(1, EQ())

      >>> GP(EQ()) + 0
      GP(0, EQ())

      >>> GP(EQ()) + (lambda x: x ** 2)
      GP(<lambda>, EQ())

      >>> GP(2, EQ(), measure=prior) - GP(1, EQ(), measure=prior)
      GP(1, 2 * EQ())
      ```

  * Multiply GPs and other objects.

      *Warning:*
      The product of two GPs it *not* a Gaussian process.
      Stheno approximates the resulting process by moment matching.

      Example:

      ```python
      >>> GP(1, EQ(), measure=prior) * GP(1, Exp(), measure=prior)
      GP(<lambda> + <lambda> + -1 * 1, <lambda> * Exp() + <lambda> * EQ() + EQ() * Exp())

      >>> 2 * GP(EQ())
      GP(2, 2 * EQ())

      >>> 0 * GP(EQ())
      GP(0, 0)

      >>> (lambda x: x) * GP(EQ())
      GP(0, <lambda> * EQ())
      ```

  * Shift GPs.

      Example:

      ```python
      >>> GP(EQ()).shift(1)
      GP(0, EQ() shift 1)
      ```

  * Stretch GPs.

      Example:

      ```python
      >>> GP(EQ()).stretch(2)
      GP(0, EQ() > 2)
      ```

  * Select particular input dimensions.

      Example:

      ```python
      >>> GP(EQ()).select(1, 3)
      GP(0, EQ() : [1, 3])
      ```

  * Transform the input.

      Example:

      ```python
      >>> GP(EQ()).transform(f)
      GP(0, EQ() transform f)
      ```

  * Numerically take the derivative of a GP.
      The argument specifies which dimension to take the derivative with respect
      to.

      Example:

      ```python
      >>> GP(EQ()).diff(1)
      GP(0, d(1) EQ())
      ```

  * Construct a finite difference estimate of the derivative of a GP.
      See `Measure.diff_approx` for a description of the arguments.

      Example:

      ```python
      >>> GP(EQ()).diff_approx(deriv=1, order=2)
      GP(50000000.0 * (0.5 * EQ() + 0.5 * ((-0.5 * (EQ() shift (0.0001414213562373095, 0))) shift (0, -0.0001414213562373095)) + 0.5 * ((-0.5 * (EQ() shift (0, 0.0001414213562373095))) shift (-0.0001414213562373095, 0))), 0)
      ```

  * Construct the Cartesian product of a collection of GPs.

      Example:

      ```python
      >>> prior = Measure()

      >>> f1, f2 = GP(EQ(), measure=prior), GP(EQ(), measure=prior)

      >>> cross(f1, f2)
      GP(MultiOutputMean(0, 0), MultiOutputKernel(EQ(), EQ()))
      ```



  GPs have a `display` method that accepts a formatter.

  Example:

  ```python
  >>> print(GP(2.12345 * EQ()).display(lambda x: f"{x:.2f}"))
  GP(2.12 * EQ(), 0)
  ```



  [Properties of kernels](https://github.com/wesselb/mlkernels#properties-of-kernels-and-means)
  can be queried on GPs directly.

  Example:

  ```python
  >>> GP(EQ()).stationary
  True
  ```



  It is possible to give a name to a GP.
  Names must be strings.
  A measure then behaves like a two-way dictionary between GPs and their names.

  Example:

  ```python
  >>> prior = Measure()

  >>> p = GP(EQ(), name="name", measure=prior)

  >>> p.name
  'name'

  >>> p.name = "alternative_name"

  >>> prior["alternative_name"]
  GP(0, EQ())

  >>> prior[p]
  'alternative_name'
  ```



  Simply call a GP to construct a finite-dimensional distribution at some inputs.
  You can give a second argument, which specifies the variance of additional additive
  noise.
  After constructing a finite-dimensional distribution, you can compute the mean,
  the variance, sample, or compute a logpdf.

  Definition, where `f` is a `GP`:

  ```python
  f(x)         # No additional noise

  f(x, noise)  # Additional noise with variance `noise`
  ```

  Things you can do with a finite-dimensional distribution:

  *
      Use `f(x).mean` to compute the mean.

  *
      Use `f(x).var` to compute the variance.

  *
      Use `f(x).mean_var` to compute simultaneously compute the mean and variance.
      This can be substantially more efficient than calling first `f(x).mean` and then
      `f(x).var`.

  *
      Use `Normal.sample` to sample.

      Definition:

      ```python
      f(x).sample()                # Produce one sample.

      f(x).sample(n)               # Produce `n` samples.

      f(x).sample(noise=noise)     # Produce one samples with additional noise variance `noise`.

      f(x).sample(n, noise=noise)  # Produce `n` samples with additional noise variance `noise`.
      ```

  *
      Use `f(x).logpdf(y)` to compute the logpdf of some data `y`.

  *
      Use `means, variances = f(x).marginals()` to efficiently compute the marginal means
      and marginal variances.

      Example:

      ```python
      >>> f(x).marginals()
      (array([0., 0., 0.]), np.array([1., 1., 1.]))
      ```

  *
      Use `means, lowers, uppers = f(x).marginal_credible_bounds()` to efficiently compute
      the means and the marginal lower and upper 95% central credible region bounds.

      Example:

      ```python
      >>> f(x).marginal_credible_bounds()
      (array([0., 0., 0.]), array([-1.96, -1.96, -1.96]), array([1.96, 1.96, 1.96]))
      ```

  *
      Use `Measure.logpdf` to compute the joint logpdf of multiple observations.

      Definition, where `prior = Measure()`:

      ```python
      prior.logpdf(f(x), y)

      prior.logpdf((f1(x1), y1), (f2(x2), y2), ...)
      ```

  *
      Use `Measure.sample` to jointly sample multiple observations.

      Definition, where `prior = Measure()`:

      ```python
      sample = prior.sample(f(x))

      sample1, sample2, ... = prior.sample(f1(x1), f2(x2), ...)
      ```

  Example:

  ```python
  >>> prior = Measure()

  >>> f = GP(EQ(), measure=prior)

  >>> x = np.array([0., 1., 2.])

  >>> f(x)       # FDD without noise.
  <FDD:
   process=GP(0, EQ()),
   input=array([0., 1., 2.]),
   noise=<zero matrix: shape=3x3, dtype=float64>

  >>> f(x, 0.1)  # FDD with noise.
  <FDD:
   process=GP(0, EQ()),
   input=array([0., 1., 2.]),
   noise=<diagonal matrix: shape=3x3, dtype=float64
          diag=[0.1 0.1 0.1]>>

  >>> f(x).mean
  array([[0.],
         [0.],
         [0.]])

  >>> f(x).var
  <dense matrix: shape=3x3, dtype=float64
   mat=[[1.    0.607 0.135]
        [0.607 1.    0.607]
        [0.135 0.607 1.   ]]>

  >>> y1 = f(x).sample()

  >>> y1
  array([[-0.45172746],
         [ 0.46581948],
         [ 0.78929767]])

  >>> f(x).logpdf(y1)
  -2.811609567720761

  >>> y2 = f(x).sample(2)
  array([[-0.43771276, -2.36741858],
         [ 0.86080043, -1.22503079],
         [ 2.15779126, -0.75319405]]

  >>> f(x).logpdf(y2)
   array([-4.82949038, -5.40084225])
  ```



  Conditioning a _prior_ measure on observations gives a _posterior_ measure.
  To condition a measure on observations, use `Measure.__or__`.

  Definition, where `prior = Measure()` and `f*` are `GP`s:

  ```python
  post = prior | (f(x, [noise]), y)

  post = prior | ((f1(x1, [noise1]), y1), (f2(x2, [noise2]), y2), ...)
  ```

  You can then obtain a posterior process with `post(f)` and a finite-dimensional
  distribution under the posterior with `post(f(x))`.
  Alternatively, the posterior of a process `f` can be obtained by conditioning `f`
  directly.

  Definition, where and `f*` are `GP`s:

  ```python
  f_post = f | (f(x, [noise]), y)

  f_post = f | ((f1(x1, [noise1]), y1), (f2(x2, [noise2]), y2), ...)
  ```

  Let's consider an example.
  First, build a model and sample some values.

  ```python
  >>> prior = Measure()

  >>> f = GP(EQ(), measure=prior)

  >>> x = np.array([0., 1., 2.])

  >>> y = f(x).sample()
  ```

  Then compute the posterior measure.

  ```python
  >>> post = prior | (f(x), y)

  >>> post(f)
  GP(PosteriorMean(), PosteriorKernel())

  >>> post(f).mean(x)
  <dense matrix: shape=3x1, dtype=float64
   mat=[[ 0.412]
        [-0.811]
        [-0.933]]>

  >>> post(f).kernel(x)
  <dense matrix: shape=3x3, dtype=float64
   mat=[[1.e-12 0.e+00 0.e+00]
        [0.e+00 1.e-12 0.e+00]
        [0.e+00 0.e+00 1.e-12]]>

  >>> post(f(x))
  <FDD:
   process=GP(PosteriorMean(), PosteriorKernel()),
   input=array([0., 1., 2.]),
   noise=<zero matrix: shape=3x3, dtype=float64>>

  >>> post(f(x)).mean
  <dense matrix: shape=3x1, dtype=float64
   mat=[[ 0.412]
        [-0.811]
        [-0.933]]>

  >>> post(f(x)).var
  <dense matrix: shape=3x3, dtype=float64
   mat=[[1.e-12 0.e+00 0.e+00]
        [0.e+00 1.e-12 0.e+00]
        [0.e+00 0.e+00 1.e-12]]>
  ```

  We can also obtain the posterior by conditioning `f` directly:

  ```python
  >>> f_post = f | (f(x), y)

  >>> f_post
  GP(PosteriorMean(), PosteriorKernel())

  >>> f_post.mean(x)
  <dense matrix: shape=3x1, dtype=float64
   mat=[[ 0.412]
        [-0.811]
        [-0.933]]>

  >>> f_post.kernel(x)
  <dense matrix: shape=3x3, dtype=float64
   mat=[[1.e-12 0.e+00 0.e+00]
        [0.e+00 1.e-12 0.e+00]
        [0.e+00 0.e+00 1.e-12]]>

  >>> f_post(x)
  <FDD:
   process=GP(PosteriorMean(), PosteriorKernel()),
   input=array([0., 1., 2.]),
   noise=<zero matrix: shape=3x3, dtype=float64>>

  >>> f_post(x).mean
  <dense matrix: shape=3x1, dtype=float64
   mat=[[ 0.412]
        [-0.811]
        [-0.933]]>

  >>> f_post(x).var
  <dense matrix: shape=3x3, dtype=float64
   mat=[[1.e-12 0.e+00 0.e+00]
        [0.e+00 1.e-12 0.e+00]
        [0.e+00 0.e+00 1.e-12]]>
  ```

  We can further extend our model by building on the posterior.

  ```python
  >>> g = GP(Linear(), measure=post)

  >>> f_sum = post(f) + g

  >>> f_sum
  GP(PosteriorMean(), PosteriorKernel() + Linear())
  ```

  However, what we cannot do is mixing the prior and posterior.

  ```python
  >>> f + g
  AssertionError: Processes GP(0, EQ()) and GP(0, Linear()) are associated to different measures.
  ```



  Stheno supports pseudo-point approximations of posterior distributions with
  various approximation methods:

  1. The Variational Free Energy (VFE;
      [Titsias, 2009](http://proceedings.mlr.press/v5/titsias09a/titsias09a.pdf))
      approximation.
      To use the VFE approximation, use `PseudoObs`.

  2. The Fully Independent Training Conditional (FITC;
      [Snelson & Ghahramani, 2006](http://www.gatsby.ucl.ac.uk/~snelson/SPGP_up.pdf))
      approximation.
      To use the FITC approximation, use `PseudoObsFITC`.

  3. The Deterministic Training Conditional (DTC;
     [Csato & Opper, 2002](https://direct.mit.edu/neco/article/14/3/641/6594/Sparse-On-Line-Gaussian-Processes);
     [Seeger et al., 2003](http://proceedings.mlr.press/r4/seeger03a/seeger03a.pdf))
     approximation.
     To use the DTC approximation, use `PseudoObsDTC`.

  The VFE approximation (`PseudoObs`) is the approximation recommended to use.
  The following definitions and examples will use the VFE approximation with `PseudoObs`,
  but every instance of `PseudoObs` can be swapped out for `PseudoObsFITC` or
  `PseudoObsDTC`.

  Definition:

  ```python
  obs = PseudoObs(
      u(z),               # FDD of inducing points
      (f(x, [noise]), y)  # Observed data
  )

  obs = PseudoObs(u(z), f(x, [noise]), y)

  obs = PseudoObs(u(z), (f1(x1, [noise1]), y1), (f2(x2, [noise2]), y2), ...)

  obs = PseudoObs((u1(z1), u2(z2), ...), f(x, [noise]), y)

  obs = PseudoObs((u1(z1), u2(z2), ...), (f1(x1, [noise1]), y1), (f2(x2, [noise2]), y2), ...)
  ```

  The approximate posterior measure can be constructed with `prior | obs`
  where `prior = Measure()` is the measure of your model.
  To quantify the quality of the approximation, you can compute the ELBO with
  `obs.elbo(prior)`.

  Let's consider an example.
  First, build a model and sample some noisy observations.

  ```python
  >>> prior = Measure()

  >>> f = GP(EQ(), measure=prior)

  >>> x_obs = np.linspace(0, 10, 2000)

  >>> y_obs = f(x_obs, 1).sample()
  ```

  Ouch, computing the logpdf is quite slow:

  ```python
  >>> %timeit f(x_obs, 1).logpdf(y_obs)
  219 ms ± 35.7 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
  ```

  Let's try to use inducing points to speed this up.

  ```python
  >>> x_ind = np.linspace(0, 10, 100)

  >>> u = f(x_ind)   # FDD of inducing points.

  >>> %timeit PseudoObs(u, f(x_obs, 1), y_obs).elbo(prior)
  9.8 ms ± 181 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
  ```

  Much better.
  And the approximation is good:

  ```python
  >>> PseudoObs(u, f(x_obs, 1), y_obs).elbo(prior) - f(x_obs, 1).logpdf(y_obs)
  -3.537934389896691e-10
  ```

  We finally construct the approximate posterior measure:

  ```python
  >>> post_approx = prior | PseudoObs(u, f(x_obs, 1), y_obs)

  >>> post_approx(f(x_obs)).mean
  <dense matrix: shape=2000x1, dtype=float64
   mat=[[0.469]
        [0.468]
        [0.467]
        ...
        [1.09 ]
        [1.09 ]
        [1.091]]>
  ```




  See [MLKernels](https://github.com/wesselb/mlkernels).




  Stheno supports batched computation.
  See [MLKernels](https://github.com/wesselb/mlkernels/#usage) for a description of how
  means and kernels work with batched computation.

  Example:

  ```python
  >>> f = GP(EQ())

  >>> x = np.random.randn(16, 100, 1)

  >>> y = f(x, 1).sample()

  >>> logpdf = f(x, 1).logpdf(y)

  >>> y.shape
  (16, 100, 1)

  >>> f(x, 1).logpdf(y).shape
  (16,)
  ```




  Stheno uses [LAB](https://github.com/wesselb/lab) to provide an implementation that is
  backend agnostic.
  Moreover, Stheno uses [an extension of LAB](https://github.com/wesselb/matrix) to
  accelerate linear algebra with structured linear algebra primitives.
  You will encounter these primitives:

  ```python
  >>> k = 2 * Delta()

  >>> x = np.linspace(0, 5, 10)

  >>> k(x)
  <diagonal matrix: shape=10x10, dtype=float64
   diag=[2. 2. 2. 2. 2. 2. 2. 2. 2. 2.]>
  ```

  If you're using [LAB](https://github.com/wesselb/lab) to further process these matrices,
  then there is absolutely no need to worry:
  these structured matrix types know how to add, multiply, and do other linear algebra
  operations.

  ```python
  >>> import lab as B

  >>> B.matmul(k(x), k(x))
  <diagonal matrix: shape=10x10, dtype=float64
   diag=[4. 4. 4. 4. 4. 4. 4. 4. 4. 4.]>
  ```

  If you're not using [LAB](https://github.com/wesselb/lab), you can convert these
  structured primitives to regular NumPy/TensorFlow/PyTorch/JAX arrays by calling
  `B.dense` (`B` is from [LAB](https://github.com/wesselb/lab)):

  ```python
  >>> import lab as B

  >>> B.dense(k(x))
  array([[2., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
         [0., 2., 0., 0., 0., 0., 0., 0., 0., 0.],
         [0., 0., 2., 0., 0., 0., 0., 0., 0., 0.],
         [0., 0., 0., 2., 0., 0., 0., 0., 0., 0.],
         [0., 0., 0., 0., 2., 0., 0., 0., 0., 0.],
         [0., 0., 0., 0., 0., 2., 0., 0., 0., 0.],
         [0., 0., 0., 0., 0., 0., 2., 0., 0., 0.],
         [0., 0., 0., 0., 0., 0., 0., 2., 0., 0.],
         [0., 0., 0., 0., 0., 0., 0., 0., 2., 0.],
         [0., 0., 0., 0., 0., 0., 0., 0., 0., 2.]])
  ```

  Furthermore, before computing a Cholesky decomposition, Stheno always adds a minuscule
  diagonal to prevent the Cholesky decomposition from failing due to positive
  indefiniteness caused by numerical noise.
  You can change the magnitude of this diagonal by changing `B.epsilon`:

  ```python
  >>> import lab as B

  >>> B.epsilon = 1e-12   # Default regularisation

  >>> B.epsilon = 1e-8    # Strong regularisation
  ```




  The examples make use of [Varz](https://github.com/wesselb/varz) and some
  utility from [WBML](https://github.com/wesselb/wbml).




  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example1_simple_regression.png)

  ```python
  import matplotlib.pyplot as plt
  from wbml.plot import tweak

  from stheno import B, GP, EQ


  x = B.linspace(0, 10, 100)
  x_obs = B.linspace(0, 7, 20)


  f = GP(EQ().periodic(5.0))


  f_true, y_obs = f.measure.sample(f(x), f(x_obs, 0.5))


  f_post = f | (f(x_obs, 0.5), y_obs)
  mean, lower, upper = f_post(x).marginal_credible_bounds()


  plt.plot(x, f_true, label="True", style="test")
  plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()
  plt.savefig("readme_example1_simple_regression.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example12_optimisation_varz.png)

  ```python
  import lab as B
  import matplotlib.pyplot as plt
  import torch
  from varz import Vars, minimise_l_bfgs_b, parametrised, Positive
  from wbml.plot import tweak

  from stheno.torch import EQ, GP


  B.epsilon = 1e-6


  x = torch.linspace(0, 2, 100)
  x_obs = torch.linspace(0, 2, 50)


  f_true = torch.sin(5 * x)
  y_obs = torch.sin(5 * x_obs) + 0.05**0.5 * torch.randn(50)


  def model(vs):
      """Construct a model with learnable parameters."""
      p = vs.struct  # Varz handles positivity (and other) constraints.
      kernel = p.variance.positive() * EQ().stretch(p.scale.positive())
      return GP(kernel), p.noise.positive()


  @parametrised
  def model_alternative(vs, scale: Positive, variance: Positive, noise: Positive):
      """Equivalent to :func:`model`, but with `@parametrised`."""
      kernel = variance * EQ().stretch(scale)
      return GP(kernel), noise


  vs = Vars(torch.float32)
  f, noise = model(vs)


  f_post = f | (f(x_obs, noise), y_obs)
  prior_before = f, noise
  pred_before = f_post(x, noise).marginal_credible_bounds()


  def objective(vs):
      f, noise = model(vs)
      evidence = f(x_obs, noise).logpdf(y_obs)
      return -evidence



  minimise_l_bfgs_b(objective, vs)

  f, noise = model(vs)


  f_post = f | (f(x_obs, noise), y_obs)
  prior_after = f, noise
  pred_after = f_post(x, noise).marginal_credible_bounds()


  def plot_prediction(prior, pred):
      f, noise = prior
      mean, lower, upper = pred
      plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
      plt.plot(x, f_true, label="True", style="test")
      plt.plot(x, mean, label="Prediction", style="pred")
      plt.fill_between(x, lower, upper, style="pred")
      plt.ylim(-2, 2)
      plt.text(
          0.02,
          0.02,
          f"var = {f.kernel.factor(0):.2f}, "
          f"scale = {f.kernel.factor(1).stretches[0]:.2f}, "
          f"noise = {noise:.2f}",
          transform=plt.gca().transAxes,
      )
      tweak()



  plt.figure(figsize=(10, 4))
  plt.subplot(1, 2, 1)
  plt.title("Before optimisation")
  plot_prediction(prior_before, pred_before)
  plt.subplot(1, 2, 2)
  plt.title("After optimisation")
  plot_prediction(prior_after, pred_after)
  plt.savefig("readme_example12_optimisation_varz.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example13_optimisation_torch.png)

  ```python
  import lab as B
  import matplotlib.pyplot as plt
  import torch
  from wbml.plot import tweak

  from stheno.torch import EQ, GP


  B.epsilon = 1e-6


  x = torch.linspace(0, 2, 100)
  x_obs = torch.linspace(0, 2, 50)


  f_true = torch.sin(5 * x)
  y_obs = torch.sin(5 * x_obs) + 0.05**0.5 * torch.randn(50)


  class Model(torch.nn.Module):
      """A GP model with learnable parameters."""

      def __init__(self, init_var=0.3, init_scale=1, init_noise=0.2):
          super().__init__()
          
          self.log_var = torch.nn.Parameter(torch.log(torch.tensor(init_var)))
          self.log_scale = torch.nn.Parameter(torch.log(torch.tensor(init_scale)))
          self.log_noise = torch.nn.Parameter(torch.log(torch.tensor(init_noise)))

      def construct(self):
          self.var = torch.exp(self.log_var)
          self.scale = torch.exp(self.log_scale)
          self.noise = torch.exp(self.log_noise)
          kernel = self.var * EQ().stretch(self.scale)
          return GP(kernel), self.noise


  model = Model()
  f, noise = model.construct()


  f_post = f | (f(x_obs, noise), y_obs)
  prior_before = f, noise
  pred_before = f_post(x, noise).marginal_credible_bounds()


  opt = torch.optim.Adam(model.parameters(), lr=5e-2)
  for _ in range(1000):
      opt.zero_grad()
      f, noise = model.construct()
      loss = -f(x_obs, noise).logpdf(y_obs)
      loss.backward()
      opt.step()

  f, noise = model.construct()


  f_post = f | (f(x_obs, noise), y_obs)
  prior_after = f, noise
  pred_after = f_post(x, noise).marginal_credible_bounds()


  def plot_prediction(prior, pred):
      f, noise = prior
      mean, lower, upper = pred
      plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
      plt.plot(x, f_true, label="True", style="test")
      plt.plot(x, mean, label="Prediction", style="pred")
      plt.fill_between(x, lower, upper, style="pred")
      plt.ylim(-2, 2)
      plt.text(
          0.02,
          0.02,
          f"var = {f.kernel.factor(0):.2f}, "
          f"scale = {f.kernel.factor(1).stretches[0]:.2f}, "
          f"noise = {noise:.2f}",
          transform=plt.gca().transAxes,
      )
      tweak()



  plt.figure(figsize=(10, 4))
  plt.subplot(1, 2, 1)
  plt.title("Before optimisation")
  plot_prediction(prior_before, pred_before)
  plt.subplot(1, 2, 2)
  plt.title("After optimisation")
  plot_prediction(prior_after, pred_after)
  plt.savefig("readme_example13_optimisation_torch.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example2_decomposition.png)

  ```python
  import matplotlib.pyplot as plt
  from wbml.plot import tweak

  from stheno import Measure, GP, EQ, RQ, Linear, Delta, Exp, B

  B.epsilon = 1e-10


  x = B.linspace(0, 10, 200)
  x_obs = B.linspace(0, 7, 50)


  with Measure() as prior:
      
      f_smooth = GP(EQ())
      f_wiggly = GP(RQ(1e-1).stretch(0.5))
      f_periodic = GP(EQ().periodic(1.0))
      f_linear = GP(Linear())
      f = f_smooth + f_wiggly + f_periodic + 0.2 * f_linear

      
      e_indep = GP(Delta())
      e_exp = GP(Exp())
      e = e_indep + 0.3 * e_exp

      
      y = f + 0.5 * e


  (
      f_true_smooth,
      f_true_wiggly,
      f_true_periodic,
      f_true_linear,
      f_true,
      y_obs,
  ) = prior.sample(f_smooth(x), f_wiggly(x), f_periodic(x), f_linear(x), f(x), y(x_obs))



  post = prior | (y(x_obs), y_obs)

  pred_smooth = post(f_smooth(x))
  pred_wiggly = post(f_wiggly(x))
  pred_periodic = post(f_periodic(x))
  pred_linear = post(f_linear(x))
  pred_f = post(f(x))



  def plot_prediction(x, f, pred, x_obs=None, y_obs=None):
      plt.plot(x, f, label="True", style="test")
      if x_obs is not None:
          plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
      mean, lower, upper = pred.marginal_credible_bounds()
      plt.plot(x, mean, label="Prediction", style="pred")
      plt.fill_between(x, lower, upper, style="pred")
      tweak()


  plt.figure(figsize=(10, 6))

  plt.subplot(3, 1, 1)
  plt.title("Prediction")
  plot_prediction(x, f_true, pred_f, x_obs, y_obs)

  plt.subplot(3, 2, 3)
  plt.title("Smooth Component")
  plot_prediction(x, f_true_smooth, pred_smooth)

  plt.subplot(3, 2, 4)
  plt.title("Wiggly Component")
  plot_prediction(x, f_true_wiggly, pred_wiggly)

  plt.subplot(3, 2, 5)
  plt.title("Periodic Component")
  plot_prediction(x, f_true_periodic, pred_periodic)

  plt.subplot(3, 2, 6)
  plt.title("Linear Component")
  plot_prediction(x, f_true_linear, pred_linear)

  plt.savefig("readme_example2_decomposition.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example3_parametric.png)

  ```python
  import matplotlib.pyplot as plt
  import tensorflow as tf
  import wbml.out as out
  from varz.spec import parametrised, Positive
  from varz.tensorflow import Vars, minimise_l_bfgs_b
  from wbml.plot import tweak

  from stheno.tensorflow import B, Measure, GP, EQ, Delta


  x = B.linspace(tf.float64, 0, 5, 100)
  x_obs = B.linspace(tf.float64, 0, 3, 20)


  @parametrised
  def model(
      vs,
      u_var: Positive = 0.5,
      u_scale: Positive = 0.5,
      noise: Positive = 0.5,
      alpha: Positive = 1.2,
  ):
      with Measure():
          
          u = GP(u_var * EQ().stretch(u_scale))
          
          f = u + (lambda x: x**alpha)
      return f, noise



  vs = Vars(tf.float64)
  f_true = x**1.8 + B.sin(2 * B.pi * x)
  f, y = model(vs)
  post = f.measure | (f(x), f_true)
  y_obs = post(f(x_obs)).sample()


  def objective(vs):
      f, noise = model(vs)
      evidence = f(x_obs, noise).logpdf(y_obs)
      return -evidence



  minimise_l_bfgs_b(objective, vs, jit=True)
  f, noise = model(vs)


  out.kv("Prior", f.display(out.format))
  vs.print()


  f_post = f | (f(x_obs, noise), y_obs)
  mean, lower, upper = f_post(x).marginal_credible_bounds()


  plt.plot(x, B.squeeze(f_true), label="True", style="test")
  plt.scatter(x_obs, B.squeeze(y_obs), label="Observations", style="train", s=20)
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.savefig("readme_example3_parametric.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example4_multi-output.png)

  ```python
  import matplotlib.pyplot as plt
  from wbml.plot import tweak

  from stheno import B, Measure, GP, EQ, Delta


  class VGP:
      """A vector-valued GP."""

      def __init__(self, ps):
          self.ps = ps

      def __add__(self, other):
          return VGP([f + g for f, g in zip(self.ps, other.ps)])

      def lmatmul(self, A):
          m, n = A.shape
          ps = [0 for _ in range(m)]
          for i in range(m):
              for j in range(n):
                  ps[i] += A[i, j] * self.ps[j]
          return VGP(ps)



  x = B.linspace(0, 10, 100)
  x_obs = B.linspace(0, 10, 10)


  m = 2
  p = 4
  H = B.randn(p, m)


  with Measure() as prior:
      
      us = VGP([GP(EQ()) for _ in range(m)])

      
      fs = us.lmatmul(H)

      
      e = VGP([GP(0.5 * Delta()) for _ in range(p)])

      
      ys = e + fs


  samples = prior.sample(*(p(x) for p in fs.ps), *(p(x_obs) for p in ys.ps))
  fs_true, ys_obs = samples[:p], samples[p:]


  post = prior.condition(*((p(x_obs), y_obs) for p, y_obs in zip(ys.ps, ys_obs)))
  preds = [post(p(x)) for p in fs.ps]



  def plot_prediction(x, f, pred, x_obs=None, y_obs=None):
      plt.plot(x, f, label="True", style="test")
      if x_obs is not None:
          plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
      mean, lower, upper = pred.marginal_credible_bounds()
      plt.plot(x, mean, label="Prediction", style="pred")
      plt.fill_between(x, lower, upper, style="pred")
      tweak()


  plt.figure(figsize=(10, 6))
  for i in range(4):
      plt.subplot(2, 2, i + 1)
      plt.title(f"Output {i + 1}")
      plot_prediction(x, fs_true[i], preds[i], x_obs, ys_obs[i])
  plt.savefig("readme_example4_multi-output.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example5_integration.png)

  ```python
  import matplotlib.pyplot as plt
  import numpy as np
  import tensorflow as tf
  import wbml.plot

  from stheno.tensorflow import B, Measure, GP, EQ, Delta


  x = B.linspace(tf.float64, 0, 10, 200)
  x_obs = B.linspace(tf.float64, 0, 10, 10)

  with Measure() as prior:
      
      f = 0.7 * GP(EQ()).stretch(1.5)
      e = 0.2 * GP(Delta())

      
      df = f.diff()
      ddf = df.diff()
      dddf = ddf.diff() + e


  zero = B.cast(tf.float64, 0)
  one = B.cast(tf.float64, 1)
  prior = prior | ((f(zero), one), (df(zero), zero), (ddf(zero), -one))


  y_obs = B.sin(x_obs) + 0.2 * B.randn(*x_obs.shape)


  post = prior | (dddf(x_obs), y_obs)


  pred_iiif = post(f)(x)
  pred_iif = post(df)(x)
  pred_if = post(ddf)(x)
  pred_f = post(dddf)(x)



  def plot_prediction(x, f, pred, x_obs=None, y_obs=None):
      plt.plot(x, f, label="True", style="test")
      if x_obs is not None:
          plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
      mean, lower, upper = pred.marginal_credible_bounds()
      plt.plot(x, mean, label="Prediction", style="pred")
      plt.fill_between(x, lower, upper, style="pred")
      wbml.plot.tweak()


  plt.figure(figsize=(10, 6))

  plt.subplot(2, 2, 1)
  plt.title("Function")
  plot_prediction(x, np.sin(x), pred_f, x_obs=x_obs, y_obs=y_obs)

  plt.subplot(2, 2, 2)
  plt.title("Integral of Function")
  plot_prediction(x, -np.cos(x), pred_if)

  plt.subplot(2, 2, 3)
  plt.title("Second Integral of Function")
  plot_prediction(x, -np.sin(x), pred_iif)

  plt.subplot(2, 2, 4)
  plt.title("Third Integral of Function")
  plot_prediction(x, np.cos(x), pred_iiif)

  plt.savefig("readme_example5_integration.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example6_blr.png)

  ```python
  import matplotlib.pyplot as plt
  import wbml.out as out
  from wbml.plot import tweak

  from stheno import B, Measure, GP

  B.epsilon = 1e-10  # Very slightly regularise.


  x = B.linspace(0, 10, 200)
  x_obs = B.linspace(0, 10, 10)

  with Measure() as prior:
      
      slope = GP(1)
      intercept = GP(5)
      f = slope * (lambda x: x) + intercept


  true_slope, true_intercept, f_true, y_obs = prior.sample(
      slope(0), intercept(0), f(x), f(x_obs, 0.2)
  )


  post = prior | (f(x_obs, 0.2), y_obs)
  mean, lower, upper = post(f(x)).marginal_credible_bounds()

  out.kv("True slope", true_slope[0, 0])
  out.kv("Predicted slope", post(slope(0)).mean[0, 0])
  out.kv("True intercept", true_intercept[0, 0])
  out.kv("Predicted intercept", post(intercept(0)).mean[0, 0])


  plt.plot(x, f_true, label="True", style="test")
  plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.savefig("readme_example6_blr.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example7_gpar.png)

  ```python
  import matplotlib.pyplot as plt
  import numpy as np
  import tensorflow as tf
  from varz.spec import parametrised, Positive
  from varz.tensorflow import Vars, minimise_l_bfgs_b
  from wbml.plot import tweak

  from stheno.tensorflow import B, GP, EQ


  x = B.linspace(tf.float64, 0, 10, 200)
  x_obs1 = B.linspace(tf.float64, 0, 10, 30)
  inds2 = np.random.permutation(len(x_obs1))[:10]
  x_obs2 = B.take(x_obs1, inds2)


  f1_true = B.sin(x)
  f2_true = B.sin(x) ** 2

  y1_obs = B.sin(x_obs1) + 0.1 * B.randn(*x_obs1.shape)
  y2_obs = B.sin(x_obs2) ** 2 + 0.1 * B.randn(*x_obs2.shape)


  @parametrised
  def model(
      vs,
      var1: Positive = 1,
      scale1: Positive = 1,
      noise1: Positive = 0.1,
      var2: Positive = 1,
      scale2: Positive = 1,
      noise2: Positive = 0.1,
  ):
      
      f1 = GP(var1 * EQ().stretch(scale1))
      f2 = GP(var2 * EQ().stretch(scale2))
      return (f1, noise1), (f2, noise2)


  def objective(vs):
      (f1, noise1), (f2, noise2) = model(vs)
      x1 = x_obs1
      x2 = B.stack(x_obs2, B.take(y1_obs, inds2), axis=1)
      evidence = f1(x1, noise1).logpdf(y1_obs) + f2(x2, noise2).logpdf(y2_obs)
      return -evidence



  vs = Vars(tf.float64)
  minimise_l_bfgs_b(objective, vs)


  (f1, noise1), (f2, noise2) = model(vs)
  x1 = x_obs1
  x2 = B.stack(x_obs2, B.take(y1_obs, inds2), axis=1)
  f1_post = f1 | (f1(x1, noise1), y1_obs)
  f2_post = f2 | (f2(x2, noise2), y2_obs)


  mean1, lower1, upper1 = f1_post(x).marginal_credible_bounds()


  samples = [
      f2_post(B.stack(x, f1_post(x).sample()[:, 0], axis=1)).sample()[:, 0]
      for _ in range(100)
  ]
  mean2 = np.mean(samples, axis=0)
  lower2 = np.percentile(samples, 2.5, axis=0)
  upper2 = np.percentile(samples, 100 - 2.5, axis=0)


  plt.figure()

  plt.subplot(2, 1, 1)
  plt.title("Output 1")
  plt.plot(x, f1_true, label="True", style="test")
  plt.scatter(x_obs1, y1_obs, label="Observations", style="train", s=20)
  plt.plot(x, mean1, label="Prediction", style="pred")
  plt.fill_between(x, lower1, upper1, style="pred")
  tweak()

  plt.subplot(2, 1, 2)
  plt.title("Output 2")
  plt.plot(x, f2_true, label="True", style="test")
  plt.scatter(x_obs2, y2_obs, label="Observations", style="train", s=20)
  plt.plot(x, mean2, label="Prediction", style="pred")
  plt.fill_between(x, lower2, upper2, style="pred")
  tweak()

  plt.savefig("readme_example7_gpar.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example8_gp-rnn.png)

  ```python
  import matplotlib.pyplot as plt
  import numpy as np
  import tensorflow as tf
  from varz.spec import parametrised, Positive
  from varz.tensorflow import Vars, minimise_adam
  from wbml.net import rnn as rnn_constructor
  from wbml.plot import tweak

  from stheno.tensorflow import B, Measure, GP, EQ


  B.epsilon = 1e-6


  x = B.linspace(tf.float32, 0, 1, 100)[:, None]
  inds_obs = B.range(0, int(0.75 * len(x)))  # Train on the first 75% only.
  x_obs = B.take(x, inds_obs)



  a_true = GP(1e-2 * EQ().stretch(0.1))(x).sample()
  b_true = GP(1e-2 * EQ().stretch(0.1))(x).sample()

  f_true = (1 + a_true) * B.sin(2 * np.pi * 7 * x) + b_true

  y_true = f_true + 0.1 * B.randn(*f_true.shape)


  f_true = (f_true - B.mean(y_true)) / B.std(y_true)
  y_true = (y_true - B.mean(y_true)) / B.std(y_true)
  y_obs = B.take(y_true, inds_obs)


  @parametrised
  def model(vs, a_scale: Positive = 0.1, b_scale: Positive = 0.1, noise: Positive = 0.01):
      
      f_rnn = rnn_constructor(
          output_size=1, widths=(10,), nonlinearity=B.tanh, final_dense=True
      )

      
      num_weights = f_rnn.num_weights(input_size=1)
      weights = Vars(tf.float32, source=vs.get(shape=(num_weights,), name="rnn"))
      f_rnn.initialise(input_size=1, vs=weights)

      with Measure():
          
          a = GP(1e-2 * EQ().stretch(a_scale))
          b = GP(1e-2 * EQ().stretch(b_scale))

          
          f_gp_rnn = (1 + a) * (lambda x: f_rnn(x)) + b

      return f_rnn, f_gp_rnn, noise, a, b


  def objective_rnn(vs):
      f_rnn, _, _, _, _ = model(vs)
      return B.mean((f_rnn(x_obs) - y_obs) ** 2)


  def objective_gp_rnn(vs):
      _, f_gp_rnn, noise, _, _ = model(vs)
      evidence = f_gp_rnn(x_obs, noise).logpdf(y_obs)
      return -evidence



  vs = Vars(tf.float32)
  minimise_adam(objective_rnn, vs, rate=5e-3, iters=1000, trace=True, jit=True)


  minimise_adam(objective_gp_rnn, vs, rate=1e-3, iters=1000, trace=True, jit=True)

  _, f_gp_rnn, noise, a, b = model(vs)


  post = f_gp_rnn.measure | (f_gp_rnn(x_obs, noise), y_obs)


  plt.figure(figsize=(10, 6))

  plt.subplot(2, 1, 1)
  plt.title("$(1 + a)\\cdot {}$RNN${} + b$")
  plt.plot(x, f_true, label="True", style="test")
  plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
  mean, lower, upper = post(f_gp_rnn(x)).marginal_credible_bounds()
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.subplot(2, 2, 3)
  plt.title("$a$")
  mean, lower, upper = post(a(x)).marginal_credible_bounds()
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.subplot(2, 2, 4)
  plt.title("$b$")
  mean, lower, upper = post(b(x)).marginal_credible_bounds()
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.savefig(f"readme_example8_gp-rnn.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example9_product.png)

  ```python
  import matplotlib.pyplot as plt
  from wbml.plot import tweak

  from stheno import B, Measure, GP, EQ


  x = B.linspace(0, 10, 100)

  with Measure() as prior:
      f1 = GP(3, EQ())
      f2 = GP(3, EQ())

      
      f_prod = f1 * f2


  s1, s2 = prior.sample(f1(x), f2(x))


  f_prod_post = f_prod | ((f1(x), s1), (f2(x), s2))
  mean, lower, upper = f_prod_post(x).marginal_credible_bounds()


  plt.plot(x, s1, label="Sample 1", style="train")
  plt.plot(x, s2, label="Sample 2", style="train", ls="--")
  plt.plot(x, s1 * s2, label="True product", style="test")
  plt.plot(x, mean, label="Approximate posterior", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.savefig("readme_example9_product.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example10_sparse.png)

  ```python
  import matplotlib.pyplot as plt
  import wbml.out as out
  from wbml.plot import tweak

  from stheno import B, GP, EQ, PseudoObs


  x = B.linspace(0, 10, 100)
  x_obs = B.linspace(0, 7, 50_000)
  x_ind = B.linspace(0, 10, 20)


  f = GP(EQ().periodic(2 * B.pi))


  f_true = B.sin(x)
  y_obs = B.sin(x_obs) + B.sqrt(0.5) * B.randn(*x_obs.shape)


  obs = PseudoObs(f(x_ind), (f(x_obs, 0.5), y_obs))


  out.kv("ELBO", obs.elbo(f.measure))


  f_post = f | obs


  mean, lower, upper = f_post(x).marginal_credible_bounds()


  plt.plot(x, f_true, label="True", style="test")
  plt.scatter(
      x_obs,
      y_obs,
      label="Observations",
      style="train",
      c="tab:green",
      alpha=0.35,
  )
  plt.scatter(
      x_ind,
      obs.mu(f.measure)[:, 0],
      label="Inducing Points",
      style="train",
      s=20,
  )
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.savefig("readme_example10_sparse.png")
  plt.show()
  ```



  ![Prediction](https://raw.githubusercontent.com/wesselb/stheno/master/readme_example11_nonparametric_basis.png)

  ```python
  import matplotlib.pyplot as plt
  from wbml.plot import tweak

  from stheno import B, Measure, GP, EQ


  x = B.linspace(0, 10, 100)
  x_obs = B.linspace(0, 10, 20)

  with Measure() as prior:
      w = lambda x: B.exp(-(x**2) / 0.5)  # Basis function
      b = [(w * GP(EQ())).shift(xi) for xi in x_obs]  # Weighted basis functions
      f = sum(b)


  f_true, y_obs = prior.sample(f(x), f(x_obs, 0.2))


  post = prior | (f(x_obs, 0.2), y_obs)


  for i, bi in enumerate(b):
      mean, lower, upper = post(bi(x)).marginal_credible_bounds()
      kw_args = {"label": "Basis functions"} if i == 0 else {}
      plt.plot(x, mean, style="pred2", **kw_args)
  plt.plot(x, f_true, label="True", style="test")
  plt.scatter(x_obs, y_obs, label="Observations", style="train", s=20)
  mean, lower, upper = post(f(x)).marginal_credible_bounds()
  plt.plot(x, mean, label="Prediction", style="pred")
  plt.fill_between(x, lower, upper, style="pred")
  tweak()

  plt.savefig("readme_example11_nonparametric_basis.png")
  plt.show()
  ```


pkgId: 67c1161b0b230c13c425e30f0f93cba391fec1d071216038ad50e4f05e1182a5
name: python-stigg-api-client-help
arch: noarch
version: 2.233.0
epoch: 0
release: 1
summary: Development documents and examples for stigg-api-client
url: https://pypi.org/project/stigg-api-client/
rpm_license: STIGG SDK LICENSE
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stigg-api-client-2.233.0-1.src.rpm
location_href: Packages/python-stigg-api-client-help-2.233.0-1.noarch.rpm
checksum_type: sha256
description:
  This library provides a Python wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on
  the operations that are in use by the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk).

  It leverages the [sgqlc](https://github.com/profusion/sgqlc) library to generate Python classes for GraphQL types, and
  utilizes the `sgqlc.endpoint.requests.RequestsEndpoint` class to send the API requests. The responses are being
  automatically converted into native Python types.



  See https://docs.stigg.io/docs/python-sdk



      pip install stigg-api-client



  Initialize the client:

  ```python

  import os
  from stigg import Stigg

  api_key = os.environ.get("STIGG_SERVER_API_KEY")

  stigg_client = Stigg.create_client(api_key)

  ```

  Provision a customer

  ```python

  import os
  from stigg import Stigg

  api_key = os.environ.get("STIGG_SERVER_API_KEY")

  client = Stigg.create_client(api_key)

  data = client.request(Stigg.mutation.provision_customer, {
      "input": {
          "refId": "customer-id",
          "name": "Acme",
          "email": "hello@acme.com",
          "couponRefId": "coupon-id",
          "billingInformation": {
              "language": "en",
              "timezone": "America/New_York",
              "billingAddress": {
                  "country": "US",
                  "city": "New York",
                  "state": "NY",
                  "addressLine1": "123 Main Street",
                  "addressLine2": "Apt. 1",
                  "phoneNumber": "+1 212-499-5321",
                  "postalCode": "10164"
              },
              "shippingAddress": {
                  "country": "US",
                  "city": "New York",
                  "state": "NY",
                  "addressLine1": "123 Main Street",
                  "addressLine2": "Apt. 1",
                  "phoneNumber": "+1 212-499-5321",
                  "postalCode": "10164"
              }
          },
          "additionalMetaData": {
              "key": "value"
          },
          "subscriptionParams": {
              "planId": "plan-revvenu-basic"
          }
      }
  })

  print(data.provision_customer.customer.name)

  ```

  Get a customer by ID

  ```python

  import os
  from stigg import Stigg

  api_key = os.environ.get("STIGG_SERVER_API_KEY")

  client = Stigg.create_client(api_key)

  data = client.request(Stigg.query.get_customer_by_id, {
    "input": {"customerId": "customer-id"}
  })

  customer = data.get_customer_by_ref_id
  print(customer.name)

  ```


pkgId: 8041c496dada12f88e8f73fd5c1e3ec4d4a712881c930f764d09e789e6a63149
name: python-stigg-api-client-v2-help
arch: noarch
version: 2.233.0
epoch: 0
release: 1
summary: Development documents and examples for stigg-api-client-v2
url: https://pypi.org/project/stigg-api-client-v2/
rpm_license: STIGG SDK LICENSE
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stigg-api-client-v2-2.233.0-1.src.rpm
location_href: Packages/python-stigg-api-client-v2-help-2.233.0-1.noarch.rpm
checksum_type: sha256
description:
  This library provides a Python wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on
  the operations that are in use by the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk).

  The [ariadne-codegen](https://github.com/mirumee/ariadne-codegen) code generator is used to generate a typesafe Python API client.



  TBD



      pip install stigg-api-client-v2



  Initialize the client:

  ```python

  import os
  from stigg import Stigg

  api_key = os.environ.get("STIGG_SERVER_API_KEY")

  client = Stigg.create_async_client(api_key)

  ```

  Provision a customer

  ```python



  import os
  from stigg import Stigg
  from stigg.generated import ProvisionCustomerInput

  api_key = os.environ.get("STIGG_SERVER_API_KEY")

  client = Stigg.create_async_client(api_key)

  customer_input = ProvisionCustomerInput(
      **{
          "customer_id": "1661115567186116608", # mandatory, everything else is optional
          "name": "Acme",
          "email": "billing@acme.com",
          "additional_meta_data": {"key": "value"},
          "subscription_params": {"plan_id": "plan-acme-free"},
      }
  )
  result = await client.provision_customer(customer_input)

  print(result.provision_customer.customer)

  ```

  Get a customer by ID

  ```python

  import os
  from stigg import Stigg
  from stigg.generated import GetCustomerByRefIdInput

  api_key = os.environ.get("STIGG_SERVER_API_KEY")

  client = Stigg.create_async_client(api_key)

  result = await client.get_customer_by_id(GetCustomerByRefIdInput(**{"customer_id": "1661115567186116608"}))

  print(result.get_customer_by_ref_id.name)

  ```


pkgId: 0790e98d10b1de1f8e7750a36dbb2dac161af5f0fe151e451d361dade3c9476b
name: python-stigg-sidecar-sdk-help
arch: noarch
version: 2.236.0
epoch: 0
release: 1
summary: Development documents and examples for stigg-sidecar-sdk
url: https://pypi.org/project/stigg-sidecar-sdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stigg-sidecar-sdk-2.236.0-1.src.rpm
location_href: Packages/python-stigg-sidecar-sdk-help-2.236.0-1.noarch.rpm
checksum_type: sha256
description:
  Stigg Python SDK makes it easier to interact with Stigg Sidecar



  See https://docs.stigg.io/docs/sidecar-sdk



  ```shell
      pip install stigg-sidecar-sdk
  ```



  Initialize the client:

  ```python

  import os
  from stigg_sidecar_sdk import Stigg, ApiConfig, LocalSidecarConfig, RedisOptions

  api_key = os.environ.get("STIGG_SERVER_API_KEY")

  stigg = Stigg(
      ApiConfig(
          api_key=api_key,
      ),
      
      local_sidecar_config=LocalSidecarConfig(
          redis=RedisOptions(
              environment_prefix="development",
              host="localhost",
              port=6379,
              db=0
          )
      ),
      
      remote_sidecar_host='localhost',
      remote_sidecar_port=8443
  )

  ```

  Get single entitlement of a customer

  ```python

  from stigg_sidecar_sdk import Stigg, ApiConfig, GetMeteredEntitlementRequest, MeteredEntitlementOptions


  async def get_entitlement():
      stigg = Stigg(ApiConfig(api_key='api_key'))
      resp = await stigg.get_metered_entitlement(
          GetMeteredEntitlementRequest(customer_id='customer-demo-01',
                                       feature_id='feature-01-templates',
                                       options=MeteredEntitlementOptions(requested_usage=1))
      )
      print(resp.entitlement.has_access)
  ```

  Accessing the `api` client:

  ```python

  from stigg_sidecar_sdk import Stigg, ApiConfig
  from stigg.generated import ProvisionCustomerInput

  async def get_entitlement():
      stigg = Stigg(ApiConfig(api_key='api_key'))

      resp = await stigg.api.provision_customer(
          ProvisionCustomerInput(
              customer_id='customer-demo-01',
              name='customer-name'
          )
      )
      print("customer created", resp.provision_customer.customer.created_at)
  ```


