# packages

pkgId: 80c8ea6cd3506c7c6b8e328fb86485342060c6c037ff8cd60cd14690a89af840
name: python-stim-debuginfo
arch: aarch64
version: 1.14.0
epoch: 0
release: 1
summary: Debug information for package python-stim
url: https://github.com/quantumlib/stim
rpm_license: Apache 2
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-stim-1.14.0-1.src.rpm
location_href: Packages/python-stim-debuginfo-1.14.0-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug information for package python-stim.
  Debug information is useful when developing applications that use this
  package or when debugging this package.


pkgId: 1416500ad2aeae4d2be779a025829e8982ee529570237ef97c0e31e9ee57e1fc
name: python-stim-debugsource
arch: aarch64
version: 1.14.0
epoch: 0
release: 1
summary: Debug sources for package python-stim
url: https://github.com/quantumlib/stim
rpm_license: Apache 2
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-stim-1.14.0-1.src.rpm
location_href: Packages/python-stim-debugsource-1.14.0-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug sources for package python-stim.
  Debug sources are useful when developing applications that use this
  package or when debugging this package.


pkgId: ce0b1580d042f92169286d6d7dbae257a02c55915f06068e8350cc4766aa31c8
name: python-stim-help
arch: aarch64
version: 1.14.0
epoch: 0
release: 1
summary: Development documents and examples for stim
url: https://github.com/quantumlib/stim
rpm_license: Apache 2
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stim-1.14.0-1.src.rpm
location_href: Packages/python-stim-help-1.14.0-1.aarch64.rpm
checksum_type: sha256
description:
  Stim is a fast simulator for quantum stabilizer circuits.

  API references are available on the stim github wiki: https://github.com/quantumlib/stim/wiki

  Stim can be installed into a python 3 environment using pip:

  ```bash
  pip install stim
  ```

  Once stim is installed, you can `import stim` and use it.
  There are three supported use cases:

  1. Interactive simulation with `stim.TableauSimulator`.
  2. High speed sampling with samplers compiled from `stim.Circuit`.
  3. Independent exploration using `stim.Tableau` and `stim.PauliString`.



  Use `stim.TableauSimulator` to simulate operations one by one while inspecting the results:

  ```python
  import stim

  s = stim.TableauSimulator()


  s.h(0)
  s.cnot(0, 1)
  s.cnot(0, 2)


  t = s.current_inverse_tableau()
  print(t**-1)








  print(s.measure_many(0, 1, 2))




  ```



  By creating a `stim.Circuit` and compiling it into a sampler, samples can be generated very quickly:

  ```python
  import stim


  c = stim.Circuit()
  c.append("H", [0])
  for k in range(1, 30):
      c.append("CNOT", [0, k])
  c.append("M", range(30))


  sampler = c.compile_sampler()





  batch = sampler.sample(1024)
  print(type(batch))  # numpy.ndarray
  print(batch.dtype)  # numpy.uint8
  print(batch.shape)  # (1024, 30)
  print(batch)









  ```

  This also works on circuits that include noise:

  ```python
  import stim
  import numpy as np

  c = stim.Circuit("""
      X_ERROR(0.1) 0
      Y_ERROR(0.2) 1
      Z_ERROR(0.3) 2
      DEPOLARIZE1(0.4) 3
      DEPOLARIZE2(0.5) 4 5
      M 0 1 2 3 4 5
  """)
  batch = c.compile_sampler().sample(2**20)
  print(np.mean(batch, axis=0).round(3))


  ```

  You can also sample annotated detection events using `stim.Circuit.compile_detector_sampler`.

  For a list of gates that can appear in a `stim.Circuit`, see the [latest readme on github](https://github.com/quantumlib/Stim#readme).



  Stim provides data types `stim.PauliString` and `stim.Tableau`, which support a variety of fast operations.

  ```python
  import stim

  xx = stim.PauliString("XX")
  yy = stim.PauliString("YY")
  assert xx * yy == -stim.PauliString("ZZ")

  s = stim.Tableau.from_named_gate("S")
  print(repr(s))










  s_dag = stim.Tableau.from_named_gate("S_DAG")
  assert s**-1 == s_dag
  assert s**1000000003 == s_dag

  cnot = stim.Tableau.from_named_gate("CNOT")
  cz = stim.Tableau.from_named_gate("CZ")
  h = stim.Tableau.from_named_gate("H")
  t = stim.Tableau(5)
  t.append(cnot, [1, 4])
  t.append(h, [4])
  t.append(cz, [1, 4])
  t.prepend(h, [4])
  assert t == stim.Tableau(5)
  ```


pkgId: c2b9b75bac12646d365670bafe764bc08093aef075c68d3c019a3f58b1481164
name: python-stimulsoft-dashboards-help
arch: noarch
version: 2025.1.1
epoch: 0
release: 1
summary: Development documents and examples for stimulsoft-dashboards
url: https://www.stimulsoft.com/en/products/dashboards-python
rpm_license: https://www.stimulsoft.com/en/licensing/developers
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stimulsoft-dashboards-2025.1.1-1.src.rpm
location_href: Packages/python-stimulsoft-dashboards-help-2025.1.1-1.noarch.rpm
checksum_type: sha256
description:
  Data visualization in Python applications.



  Stimulsoft Dashboards.PYTHON is a fast and powerful tool for creating analytical dashboards in services and projects written in Python. The product includes a JavaScript data processing engine, a designer component for creating dashboards, and a fully interactive viewer for viewing ready-made dashboards on the screen of any device.

  Stimulsoft Dashboards.PYTHON is a client-server system wherein a JavaScript component operates on the client side, and a Python server is responsible for data processing. These two parts are closely related and represent a single product that greatly simplifies working with dashboards in web applications written in Python.




  To install the **Stimulsoft Dashboards.PYTHON**, you can use the specified command:
  ```
  python -m pip install stimulsoft-dashboards
  ```





  The **StiReport** component is designed to work with the dashboard engine in a Web project. Using this component, you can create a dashboard, load a dashboard from a file or string, and call a dashboard export function.

  > For simplicity, all code examples in this tutorial use the Flask framework (any other can be used).

  The code example shows how you can load a dashboard from a file, and export it to HTML format:



  ```python
  from flask import Flask, render_template, url_for, request
  from stimulsoft_reports.report import StiReport
  from stimulsoft_reports.report.enums import StiExportFormat

  app = Flask(__name__)

  @app.route('/report', methods = ['GET', 'POST'])
  def report():
      report = StiReport()
      if report.processRequest(request):
          return report.getFrameworkResponse()

      report.loadFile(url_for('static', filename='reports/Financial.mrt'))
      report.render()
      report.exportDocument(StiExportFormat.HTML)

      js = report.javascript.getHtml()
      html = report.getHtml()
      return render_template('report.html', reportJavaScript = js, reportHtml = html)
  ```



  ```html
  <!DOCTYPE html>
  <html>

  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Load and Export a Dashboard</title>

      {{ reportJavaScript|safe }}
  </head>

  <body>
      {{ reportHtml|safe }}
  </body>

  </html>
  ```

  More details in [our documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm).




  The **StiViewer** component is designed for viewing, printing and exporting dashboards in a browser window. Full support for working with interactive dashboards has been implemented. Using this component, you can create a viewer object, set the necessary options, process the request and return the result of its execution, and receive the prepared JavaScript and HTML code of the component.

  An example of displaying a viewer on an HTML page:



  ```python
  from flask import Flask, render_template, url_for, request
  from stimulsoft_reports.viewer import StiViewer

  app = Flask(__name__)

  @app.route('/viewer', methods = ['GET', 'POST'])
  def viewer():
      viewer = StiViewer()
      viewer.options.appearance.fullScreenMode = True

      if viewer.processRequest(request):
          return viewer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='dashboards/Financial.mrt'))
      viewer.report = report

      js = viewer.javascript.getHtml()
      html = viewer.getHtml()
      return render_template('viewer.html', viewerJavaScript = js, viewerHtml = html)
  ```



  ```html
  <!DOCTYPE html>
  <html>

  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Showing a Dashboard in the Viewer</title>

      {{ viewerJavaScript|safe }}
  </head>

  <body>
      {{ viewerHtml|safe }}
  </body>

  </html>
  ```

  There is a simplified deployment of the viewer without using an HTML page template. For example, this same example can be implemented using only Python code:



  ```python
  from flask import Flask, url_for, request
  from stimulsoft_reports.viewer import StiViewer

  app = Flask(__name__)

  @app.route('/viewer', methods = ['GET', 'POST'])
  def viewer():
      viewer = StiViewer()
      viewer.options.appearance.fullScreenMode = True

      if viewer.processRequest(request):
          return viewer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='dashboards/Financial.mrt'))
      viewer.report = report

      return viewer.getFrameworkResponse()
  ```

  More details in [our documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm).




  The **StiDesigner** component is designed for developing dashboards in a browser window. The designer's interface is built using HTML5, which allows it to be used on almost any modern platform and different operating systems. JavaScript technology used to build reports allows you to use almost any low-performance server side.

  An example of displaying a designer on an HTML page:



  ```python
  from flask import Flask, render_template, url_for, request
  from stimulsoft_reports.designer import StiDesigner

  app = Flask(__name__)

  @app.route('/designer', methods = ['GET', 'POST'])
  def designer():
      designer = StiDesigner()
      designer.options.appearance.fullScreenMode = True

      if designer.processRequest(request):
          return designer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='dashboards/Financial.mrt'))
      designer.report = report

      js = designer.javascript.getHtml()
      html = designer.getHtml()
      return render_template(designer.html', designerJavaScript = js, designerHtml = html)

  ```



  ```html
  <!DOCTYPE html>
  <html>

  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Editing a Dashboard Template in the Designer</title>

      {{ designerJavaScript|safe }}
  </head>

  <body>
      {{ designerHtml|safe }}
  </body>

  </html>
  ```

  There is a simplified deployment of the designer without using an HTML page template. For example, this same example can be implemented using only Python code:



  ```python
  from flask import Flask, url_for, request
  from stimulsoft_reports.designer import StiDesigner

  app = Flask(__name__)

  @app.route('/designer', methods = ['GET', 'POST'])
  def designer():
      designer = StiDesigner()
      designer.options.appearance.fullScreenMode = True

      if designer.processRequest(request):
          return designer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='dashboards/Financial.mrt'))
      designer.report = report

      return designer.getFrameworkResponse()
  ```

  More details in [our documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm).



  * [Live Demo](http://demo.stimulsoft.com/#Js)
  * [Product Page](https://www.stimulsoft.com/en/products/dashboards-python)
  * [Free Download](https://www.stimulsoft.com/en/downloads)
  * [PyPI](https://pypi.org/project/stimulsoft-dashboards/)
  * [Documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm)
  * [License](https://www.stimulsoft.com/en/licensing/developers)


pkgId: 59de4bb57b891f8e5831b2a7a8c18ba1b5a128b0b4d496e269eee6b3897b3608
name: python-stimulsoft-reports-help
arch: noarch
version: 2025.1.1
epoch: 0
release: 1
summary: Development documents and examples for stimulsoft-reports
url: https://www.stimulsoft.com/en/products/reports-python
rpm_license: https://www.stimulsoft.com/en/licensing/developers
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stimulsoft-reports-2025.1.1-1.src.rpm
location_href: Packages/python-stimulsoft-reports-help-2025.1.1-1.noarch.rpm
checksum_type: sha256
description:
  A powerful and modern reporting tool for Python services.



  Stimulsoft Reports.PYTHON comprises a set of components for creating, viewing, exporting, and printing reports in applications and projects written in Python. The product supports connections of multiple data types, allowing you to work with reports on the server- and client-sides, and also offers extensive capabilities for data visualization and analysis.

  Stimulsoft Reports.PYTHON is based on client-server technology: a Python application on the server-side and a JavaScript reporting engine on the client-side. These two parts are closely related and represent a single product that greatly simplifies working with reports in web applications written in Python.




  To install the **Stimulsoft Reports.PYTHON**, you can use the specified command:
  ```
  python -m pip install stimulsoft-reports
  ```





  The **StiReport** component is designed to work with the report generator in a Web project. Using this component, you can create a report, load a report from a file or string, render a report, and call a report export function.

  > For simplicity, all code examples in this tutorial use the Flask framework (any other can be used).

  The code example shows how you can load a report from a file, render it, and export it to HTML format:



  ```python
  from flask import Flask, render_template, url_for, request
  from stimulsoft_reports.report import StiReport
  from stimulsoft_reports.report.enums import StiExportFormat

  app = Flask(__name__)

  @app.route('/report', methods = ['GET', 'POST'])
  def report():
      report = StiReport()
      if report.processRequest(request):
          return report.getFrameworkResponse()

      report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
      report.render()
      report.exportDocument(StiExportFormat.HTML)

      js = report.javascript.getHtml()
      html = report.getHtml()
      return render_template('report.html', reportJavaScript = js, reportHtml = html)
  ```



  ```html
  <!DOCTYPE html>
  <html>

  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Render and Export a Report</title>

      {{ reportJavaScript|safe }}
  </head>

  <body>
      {{ reportHtml|safe }}
  </body>

  </html>
  ```

  More details in [our documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm).




  The **StiViewer** component is designed for viewing, printing and exporting reports in a browser window. The viewer can display it as a report template, as an already built report. Using this component, you can create a viewer object, set the necessary options, process the request and return the result of its execution, and receive the prepared JavaScript and HTML code of the component.

  An example of displaying a viewer on an HTML page:



  ```python
  from flask import Flask, render_template, url_for, request
  from stimulsoft_reports.viewer import StiViewer

  app = Flask(__name__)

  @app.route('/viewer', methods = ['GET', 'POST'])
  def viewer():
      viewer = StiViewer()
      viewer.options.appearance.fullScreenMode = True

      if viewer.processRequest(request):
          return viewer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
      viewer.report = report

      js = viewer.javascript.getHtml()
      html = viewer.getHtml()
      return render_template('viewer.html', viewerJavaScript = js, viewerHtml = html)
  ```



  ```html
  <!DOCTYPE html>
  <html>

  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Showing a Report in the Viewer</title>

      {{ viewerJavaScript|safe }}
  </head>

  <body>
      {{ viewerHtml|safe }}
  </body>

  </html>
  ```

  There is a simplified deployment of the viewer without using an HTML page template. For example, this same example can be implemented using only Python code:



  ```python
  from flask import Flask, url_for, request
  from stimulsoft_reports.viewer import StiViewer

  app = Flask(__name__)

  @app.route('/viewer', methods = ['GET', 'POST'])
  def viewer():
      viewer = StiViewer()
      viewer.options.appearance.fullScreenMode = True

      if viewer.processRequest(request):
          return viewer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
      viewer.report = report

      return viewer.getFrameworkResponse()
  ```

  More details in [our documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm).




  The **StiDesigner** component is designed for developing reports in a browser window. The designer's interface is built using HTML5, which allows it to be used on almost any modern platform and different operating systems. JavaScript technology used to build reports allows you to use almost any low-performance server side.

  An example of displaying a designer on an HTML page:



  ```python
  from flask import Flask, render_template, url_for, request
  from stimulsoft_reports.designer import StiDesigner

  app = Flask(__name__)

  @app.route('/designer', methods = ['GET', 'POST'])
  def designer():
      designer = StiDesigner()
      designer.options.appearance.fullScreenMode = True

      if designer.processRequest(request):
          return designer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
      designer.report = report

      js = designer.javascript.getHtml()
      html = designer.getHtml()
      return render_template(designer.html', designerJavaScript = js, designerHtml = html)

  ```



  ```html
  <!DOCTYPE html>
  <html>

  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Editing a Report Template in the Designer</title>

      {{ designerJavaScript|safe }}
  </head>

  <body>
      {{ designerHtml|safe }}
  </body>

  </html>
  ```

  There is a simplified deployment of the designer without using an HTML page template. For example, this same example can be implemented using only Python code:



  ```python
  from flask import Flask, url_for, request
  from stimulsoft_reports.designer import StiDesigner

  app = Flask(__name__)

  @app.route('/designer', methods = ['GET', 'POST'])
  def designer():
      designer = StiDesigner()
      designer.options.appearance.fullScreenMode = True

      if designer.processRequest(request):
          return designer.getFrameworkResponse()

      report = StiReport()
      report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
      designer.report = report

      return designer.getFrameworkResponse()
  ```

  More details in [our documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm).



  * [Live Demo](http://demo.stimulsoft.com/#Js)
  * [Product Page](https://www.stimulsoft.com/en/products/reports-python)
  * [Free Download](https://www.stimulsoft.com/en/downloads)
  * [PyPI](https://pypi.org/project/stimulsoft-reports/)
  * [Documentation](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_python.htm)
  * [License](https://www.stimulsoft.com/en/licensing/developers)


pkgId: 22589954601b7fb687e5266daaafb0e72c9a65c5515c2109c9865bfc70e9770b
name: python-stips-help
arch: noarch
version: 2.2.2
epoch: 0
release: 1
summary: Development documents and examples for stips
url: https://github.com/spacetelescope/STScI-STIPS
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stips-2.2.2-1.src.rpm
location_href: Packages/python-stips-help-2.2.2-1.noarch.rpm
checksum_type: sha256
description:
  STIPS is the Space Telescope Imaging Product Simulator. It is designed to create simulations of full-detector post-pipeline astronomical scenes for the Nancy Grace Roman Space Telescope.


pkgId: 5c42f252d82ad12632607b07618d5610f97c1a22272090af39c0eaf36e809541
name: python-stko-help
arch: noarch
version: 2024.12.13.0
epoch: 0
release: 1
summary: Development documents and examples for stko
url: https://pypi.org/project/stko/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stko-2024.12.13.0-1.src.rpm
location_href: Packages/python-stko-help-2024.12.13.0-1.noarch.rpm
checksum_type: sha256
description:
  ``stko`` is a Python library which allows for the optimisation and
  property calculation of molecules constructed using the library
  ``stk`` https://github.com/lukasturcani/stk. There is a Discord server
  for ``stk``, which can be joined through https://discord.gg/zbCUzuxe2B.


pkgId: 02e7e5194312d9a17eb447c300e486f0b9456a8921297899261af031ef80d3ed
name: python-stochPathSim-help
arch: noarch
version: 1.1.0
epoch: 0
release: 1
summary: Development documents and examples for stochPathSim
url: https://github.com/AIM-IT4/stochPathSim
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stochPathSim-1.1.0-1.src.rpm
location_href: Packages/python-stochPathSim-help-1.1.0-1.noarch.rpm
checksum_type: sha256
description:
  - **Simulation of Stochastic Models**:
    - Geometric Brownian Motion (GBM)
    - Heston Model
    - Vasicek Model
    - Hull-White Model
    - Cox-Ingersoll-Ross (CIR) Model
    - Black-Derman-Toy (BDT) Model
    - Ho-Lee Model
  - **Statistical Analysis**:
    - Probability levels (P_LEVEL)
    - Quantile-based analysis (99th, 90th, 10th, 1st percentiles)
    - Mean value calculation
    - Exceedance metrics (upper and lower exceedance counts)
  - **Visualization**:
    - Interactive visualizations using Plotly


pkgId: c16c728131d02a046742af80c17b9df1d9a52a11ecf866affcc0d0dd227b908c
name: python-stop-idle-sessions-help
arch: noarch
version: 0.9.3
epoch: 0
release: 1
summary: Development documents and examples for stop-idle-sessions
url: https://github.com/liverwust/stop-idle-sessions
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stop-idle-sessions-0.9.3-1.src.rpm
location_href: Packages/python-stop-idle-sessions-help-0.9.3-1.noarch.rpm
checksum_type: sha256
description:
  Stop idle `systemd-logind` sessions to prevent interactive access from
  unattended terminals. E.g., a laptop left unlocked in a coffee shop, with an
  SSH session into an internal network resource.



  NIST Special Publication 800-53 "Security and Privacy Controls for Information
  Systems and Organizations" includes a broadly-worded control, [SC-10 "Network
  Disconnect,"](https://csf.tools/reference/nist-sp-800-53/r5/sc/sc-10/) which
  requires:

  > Terminate the network connection associated with a communications session at
  > the end of the session or after [Assignment: organization-defined time period]
  > of inactivity. Network disconnect applies to internal and external networks.
  > Terminating network connections associated with specific communications
  > sessions includes de-allocating TCP/IP address or port pairs at the operating
  > system level and de-allocating the networking assignments at the application
  > level if multiple application sessions are using a single operating
  > system-level network connection. Periods of inactivity may be established by
  > organizations and include time periods by type of network access or for
  > specific network accesses.

  The OpenSSH software provides a general-purpose tool for accessing remote
  systems. It includes functionality for remote terminal emulation, execution of
  remote commands, tunneling of TCP sessions (e.g., for remote desktop access
  with Xvnc), and file copying. This software package intends to address
  `systemd-logind` sessions -- mostly OpenSSH sessions -- as a prime vector for
  "communications session[s]" and to "de-allocate [OpenSSH] networking
  assignments" after "[established] periods of activity."



  The application should be run by means of the following command, on a timer
  (either via SystemD or cron):

      /usr/libexec/platform-python -m stop_idle_sessions.main --syslog

  The purpose of using `/usr/libexec/platform-python` rather than
  `/usr/bin/python3` is to ensure that the base OS version of Python is selected
  (i.e., the one which hosts the distro-provided `python3-*` packages) and NOT an
  alternative via `/etc/alternatives`.

  The location to a configuration may be specified with `-c` or simply by using
  the default location, `/etc/stop-idle-sessions.conf`. It may contain the
  following contents to control execution:

      
      
      

      [stop-idle-sessions]

      
      timeout = 15

      
      
      

      
      
      
      

      
      
      
      

      
      
      
      
      
      
      

      
      
      

  Although the timeout is specified, it is still necessary to set up a recurring
  SystemD timer or cronjob to run the app. _It will not run itself._



  By design, this `stop-idle-sessions` package is _stateless_. It is not intended
  to run as a daemon. Instead, it should be configured as a SystemD
  [one-shot service](https://www.man7.org/linux/man-pages/man5/systemd.service.5.html#OPTIONS)
  (with a corresponding
  [.timer unit](https://www.man7.org/linux/man-pages/man5/systemd.timer.5.html)).
  Alternatively, it can be run as a cronjob.

  ```mermaid
  erDiagram
    "LOGIND SESSION" ||--|| "SYSTEMD SCOPE": corresponds
    "SYSTEMD SCOPE" ||--|{ "PROCESS": organizes
    "LOGIND SESSION" ||--o| "PROCESS": leads
    "PROCESS" ||--o| "TCP TUNNEL": connects
    "TCP TUNNEL" ||--o| "PROCESS": listens
    "VNC INSTANCE" |o--|| "TCP TUNNEL": listens
  ```

  Each time it runs, the `stop-idle-sessions` package builds a relational
  representation of system elements similar to the preceding diagram. For each
  `systemd-logind` session meeting certain criteria, it then calculates an
  "idleness" metric. This "idleness" is subject to configurable limits for
  warning and termination.



  The concept of a **Session Leader** is critical to the design of this software
  package. The `Leader` attribute of a [`systemd-logind` Session
  object](https://www.freedesktop.org/software/systemd/man/latest/org.freedesktop.login1.html#Properties3)
  is defined simply as "the PID of the process that registered the session."
  There is a lot of significance hiding behind this simple definition.

  Every Session Leader can be described as follows: it is a privileged process
  (run as root) which has initiated an authentication workflow via Pluggable
  Authentication Modules (PAM) on behalf of a user. More specifically, the
  [`pam_systemd` module](https://www.man7.org/linux/man-pages/man8/pam_systemd.8.html)
  provides the _only mechanism_ by which a `systemd-login` session may be
  registered.

  Here are a few common examples of Session Leader:

  * `/usr/libexec/gdm-session-worker` for local (GDM) graphical logins
  * `/usr/bin/login` for local text-based logins
  * `/usr/sbin/vncsession` for SystemD-mediated VNC sessions (Note: running
    `vncserver -localhost` from the command-line does NOT create a separate
    `systemd-logind` session)
  * `/usr/sbin/sshd`, specifically the fork which shows up as `sshd: username
    [priv]` in the process table

  All Session Leaders have something else in common: they are the singular
  conduit through which users may continue to interact with their session. When
  `stop-idle-sessions` needs to disconnect an idle user, it does so specifically
  by terminating a Session Leader process.



  Not every `systemd-logind` session is checked for idleness. The following types
  of session are **exempt** from the idleness computation and will not be
  terminated by `stop-idle-sessions` enforcement:

  * **Graphical sessions.** Both local (GDM) and remote (VNC) sessions are
    exempted from idleness computation and enforcement. Such environments have
    their own ways to protect idle sessions (e.g., screensavers). They aren't
    necessarily _ignored_ --- as
    [explained later](#idleness-calculation-for-eligible-sessions), they might be
    referenced when computing idleness of _other_ sessions --- but they
    themselves are not subject to any scrutiny by `stop-idle-sessions`.

    **Note:** interestingly, running a `vncserver -localhost` command does NOT
    launch a proper graphical session. An Xvnc instance will run inside of the
    original (SSH) session. Remember that only root can spawn [Session
    Leaders](#session-leaders). This isn't a problem --- see the [later
    section](#idleness-calculation-for-eligible-sessions) which explains how
    these sessions are handled.

  * **`systemd-logind` sessions without an assigned teletype (TTY) or
    pseudo-teletype (PTY) device.** These can be started by, for instance,
    `ssh -T remote-host.remote-domain.com`. Typically these are established by
    programs that are driving a remote system programmatically
    / noninteractively, and which only need to interact with the remote system
    thru CLI primitives. For example, Visual Studio Code Remoting will establish
    this kind of SSH session. Because these "sessions" are noninteractive, there
    is limited "walk-up" risk and they are therefore not subject to termination.

  * **`systemd-logind` sessions belonging to excluded users.** If configured to
    do so, `stop-idle-sessions` will ignore any session associated with a list of
    named user accounts. All SSH sessions associated with these users, even
    interactive ones (= with an assigned PTY), will be allowed to remain idle
    indefinitely.

  * **Any `systemd-logind` session whose [Session Leader](#session-leaders) has
    been terminated.** The preceding section explains the significance of Session
    Leaders. Things get even more interesting _after_ a Session Leader has exited
    or been terminated.

    Each `systemd-logind` session also employs a `systemd.scope` (a concept
    related to cgroups) under the hood. Although the `systemd-logind` session
    tracks a Process Leader, a `systemd.scope` is specifically designed NOT to
    treat any process specially.
    [The manpage](https://www.man7.org/linux/man-pages/man5/systemd.scope.5.html)
    specifically states "all processes in the scope are equivalent. The lifecycle
    of the scope unit is thus not bound to the lifetime of one specific process."

    When the Leader exits or is terminated, both the `systemd-logind` session and
    `systemd.scope` continue to exist. The scope is essentially unchanged, but
    the session undergoes three observable changes:

      * Its `Leader` attribute is reset to 0
      * Its `State` is demoted from `active` to `closing` (where it may remain
        _indefinitely_ until the entire `systemd.scope` has gone away)
      * Its `TTY` value, if it had one, will remain unchanged BUT is no longer
        trustworthy (i.e., it may claim `pts/N`, even if that device has
        automatically disappeared or been reassigned to another session)

    Although confusing, `stop-idle-sessions` considers this behavior to be quite
    useful. The [Session Leader](#session-leaders) concept basically guarantees
    that a user (or an attacker) cannot "interact" with the system unless they do
    so thru the "conduit" provided by a Session Leader. Consider the following
    sample workflow with some made-up session identifiers:

      1. User connects via SSH.
      2. `systemd-logind` session ID=121 is established by its Session Leader,
         which is an instance of `sshd [priv]`
      3. User starts a TMUX session inside of this session (and scope).
      4. After a while, `stop-idle-sessions` terminates the `sshd [priv]` Session
         Leader process.
      5. _From the User's perspective:_ The SSH connection established is
         immediately disconnected.
      6. _From the Session's perspective:_ `systemd-logind` session ID=121
         undergoes the described changes. It is orphaned/separated from its
         original Session Leader. **Importantly:** processes other than the
         Session Leader continue to run, including TMUX.
      7. User connects again via SSH.
      8. `systemd-logind` session ID=122 is established by its Session Leader,
         which is a new instance of `sshd [priv]`.
      9. User re-attaches to the TMUX session, which is still running in the
         _old_ session and scope.

    The key point here is that the user --- or an attacker sitting behind them in
    the coffee shop --- _cannot_ interact with the TMUX (or any other process)
    in-between steps 5 and 7. Or to put it another way, all of the user's
    **interactions** are "gated" by the existence of an interactive
    `systemd-logind` session (thru a Leader), but there is no limit on their
    ability to run **processes** (e.g., TMUX or VNC) in the background
    indefinitely.



  After setting aside the various ineligible sessions, `stop-idle-sessions` needs
  to calculate an idleness metric for each of the remaining `systemd-logind`
  sessions. Depending on the nature of the session and the processes running
  inside of it, this information can come from multiple places.

  In the context of a non-graphical session, it is obvious that a user's
  keystrokes should be counted as "activity" on the user's part. To borrow
  wording from the STIG control: it is nearly certain that a console session
  which is registering keystrokes has not been *left unattended*. Similarly,
  a program which is actively generating new output (such as a compiler or
  a shell loop) should also reset the idle timer. This information is encoded on
  the access time (atime) and modification time (mtime) on the teletype (TTY) or
  pseudo-teletype (PTY) device associated with that session.

  Interestingly, the following patterns can be observed empirically — e.g., by
  running `man 1 inotifywatch` against a tty or pty:

  | Event          | Updates `mtime`? | Updates `atime`? |
  |----------------|------------------|------------------|
  | Keyboard input | Yes              | Yes              |
  | Program output | Yes              | **No**           |

  `stop-idle-sessions` will look for the later of the two times, giving the user
  the benefit of the doubt when it comes to usage patterns which involve
  continuous output but little or no keyboard input.

  Note that programs which are displaying static output will NOT touch the
  `mtime` and will therefore not be successful at extending the idle timeout. For
  instance, a console session which is displaying a manpage for longer than the
  threshold will be terminated at the timeout interval.



  [OpenSSH provides various forwarding features](https://www.openssh.com/features.html),
  which can be used to instruct the server to "tunnel" traffic to/from remote
  locations on behalf of the client. This means that a console session's
  continued existence might affect more than just the interactive terminal
  session itself.

  A key feature of `stop-idle-sessions` is the ability to trace through these
  established tunnels to find a local Virtual Network Computing (VNC) service. If
  it finds one, it can further trace the idleness status of that VNC service by
  using information provided by the
  [X11 Screen Saver Extension](https://www.x.org/releases/X11R7.7/doc/scrnsaverproto/saver.html).

  In doing so, the idle-or-not-idle status of the VNC session is propagated to
  the SSH session. So long as a user continues to generate regular input events
  (e.g., mouse movement), their tunneled SSH session will also be considered
  active by `stop-idle-sessions`.



  The `stop-idle-sessions` package aims to be cohesive and reliable, but it is
  definitely not a "native" way to accomplish SC-10 compliance. There are at
  least three major alternatives which any security-conscious team should
  consider before choosing this solution. These alternatives were not sufficient
  in our case, but they are probably easier to implement and less likely to break
  in the future.



  The simplest possible way to terminate an idle non-graphical session is to
  [set the TMOUT shell variable (POSIX shells)](https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-TMOUT)
  and the
  [autologout shell variable (C shells like tcsh)](https://linux.die.net/man/1/tcsh).

  However, this has a few downsides:

  * POSIX shells offer the `readonly` keyword to lock down the TMOUT setting, but
    this can be bypassed with a bit of Googling. This creates a disparity between
    users who know how to bypass the control (plus everyone they tell) vs. those
    who do not.

  * C shell doesn't even have the `readonly` keyword and so the `autologout`
    setting is trivially overridden.

  * The `TMOUT` and `autologout` timeouts only occur at the shell prompt. So, for
    example, a `vim` or `cat` session will linger indefinitely even if not
    producing any new output.

  * These settings are not sensitive to the existence of tunneled VNC traffic and
    will terminate such a tunnel without checking for graphical session idleness.



  Newer versions of OpenSSH provide a
  [ChannelTimeout setting](https://man.openbsd.org/sshd_config#ChannelTimeout)
  which is much more easily-audited than the `TMOUT` settings. This setting will
  likely be featured in upcoming revisions of the NIST and DISA STIG control
  sets. However, this new version (9.2) is not available in either Red Hat
  Enterprise Linux (RHEL) major version 8 or 9.



  [NIST S.P. 800-53](#background) is not the only U.S. federal government
  standard which considers this attack vector. The Defense Information Systems
  Agency (DISA) Security Technical Implementation Guide (STIG) for Red Hat
  Enterprise Linux (RHEL) 8 includes the following technical control:

  [V-257258: Terminating an idle session within a short time period reduces the
  window of opportunity for unauthorized personnel to take control of
  a management session enabled on the console or console port that has been left
  unattended.](https://www.stigviewer.com/stig/red_hat_enterprise_linux_8/2023-09-11/finding/V-257258)

  The implementation which is prescribed for this technical control is as follows:

  ```bash

  $ sudo grep -i ^StopIdleSessionSec /etc/systemd/logind.conf
  StopIdleSessionSec=900

  ```

  This has the major benefit of being built-into SystemD and `systemd-logind`.
  However, there are a few notable downsides:

  * This setting affects _all_ `systemd-logind` sessions, including graphical
    sessions. There is even a
    [known bug in RHEL8](https://access.redhat.com/solutions/7061354)
    where it terminates the GDM login screen after that becomes "idle" (though
    this will eventually be fixed). Our team wanted to allow persistent graphical
    sessions while continuing to rely on screen-lock and/or SSH tunnel
    termination (for VNC) to protect these sessions.

  * For a non-graphical session, such as one launched from the local console or
    from SSH, the [StopIdleSessionSec
    setting](https://www.freedesktop.org/software/systemd/man/latest/logind.conf.html#StopIdleSessionSec=)
    (`man 5 logind.conf`) only consults the `atime` (access time) of the tty or
    pty device to determine idleness. If the `atime` is older than the specified
    threshold, then the session is terminated. As described in the
    [idleness calculation section](#idleness-calculation-for-eligible-sessions),
    active program output _does not update_ the `atime` --- only user input
    (keystrokes) can update the `atime`. In our case, we wanted to avoid
    terminating long-running processes like compilers and shell loops, and so the
    solution needed to respect _both_ `mtime` and `atime`.

  * This implementation terminates an _entire_ session by terminating each
    individual process associated with the `systemd.scope`. This is a reasonable
    implementation which cleans up the `State=closing` sessions that would
    otherwise be left behind by terminating just the [Sesssion
    Leader](#session-leaders). However, for
    [the reasons described above (4th bullet)](#ineligible-sessions),
    our team actually considers these lingering sessions to be useful for
    allowing users to continue running persistent processes.


pkgId: 962d67308ba087cb1bd8b245713a2d2e5cd32d62068986fed7b22a74634e4853
name: python-stopstart-help
arch: noarch
version: 0.3.0
epoch: 0
release: 1
summary: Development documents and examples for stopstart
url: https://github.com/ReverieTides/stopstart
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stopstart-0.3.0-1.src.rpm
location_href: Packages/python-stopstart-help-0.3.0-1.noarch.rpm
checksum_type: sha256
description:
  A simple and intuitive Python class for tracking elapsed time across multiple sessions. The `Timer` class offers a clean, human-readable interface to start and stop time, while providing detailed session statistics and beautifully formatted elapsed time. Whether you're measuring short intervals or long-running processes, the `Timer` class ensures you have accurate data with minimal effort.



  - **Easy to Use**: No complex setup—just call `start()` to begin and `stop()` to end your time tracking. Perfect for quick and efficient use.
  - **Time Formatting**: Effortlessly convert elapsed time into a human-friendly format, including days, hours, minutes, seconds, and even fractions like microseconds and nanoseconds.
  - **Session Statistics**: Track total time, the number of sessions, and average session durations with just one method call.
  - **Formatted Output**: Receive time statistics in an easy-to-read format that includes precise microseconds and nanoseconds.



  - **`start(reset=True)`**: Starts the timer. If `reset=True`, it resets the timer and clears any past session history. If `reset=False`, the timer continues from where it left off.
  - **`stop()`**: Stops the timer, records the elapsed time for the current session, and appends it to the history.
  - **`print_snapshot(prefix="")`**: Prints a snapshot of the total elapsed time up to the current moment, appending a given prefix (optional).
  - **`print(prefix="")`**: Prints the formatted total elapsed time with an optional prefix.
  - **`get_stats()`**: Returns a dictionary with statistics about the timer, including total time, number of sessions, and average session time.



  - **`days`**: The total elapsed time in days.
  - **`hours`**: The total elapsed time in hours.
  - **`minutes`**: The total elapsed time in minutes.
  - **`seconds`**: The total elapsed time in seconds.
  - **`milli`**: The total elapsed time in milliseconds (total duration in seconds * 1e3).
  - **`nano`**: The total elapsed time in nanoseconds (total duration in seconds * 1e9).
  - **`total_duration`**: The total accumulated duration of all actions in seconds, calculated by summing the durations of all recorded sessions.




  Install the package via `pip`:

  ```bash
  pip install timer
  ```


  In this example, the timer is used to measure a single session. Starting and stopping the timer around an activity (like a 2-second wait) will give you the total duration for that period, along with a detailed human-readable output and session statistics.
  ```python
  import time
  from stopstart import Timer


  timer = Timer()


  timer.start()


  time.sleep(2)


  timer.stop()


  print(f"Total duration in seconds: {timer.seconds}")


  print(timer)


  stats = timer.get_stats()
  print(f"Stats: {stats}")
  ```

  ```
  Total duration in seconds: 2.000082492828369
  2 seconds, 82 microseconds, and 492 nanoseconds
  Stats: {'total_time': 2.000082492828369, 'num_sessions': 1, 'avg_time': 2.000082492828369}
  ```

  The Timer class can resume timing without resetting the session history, allowing you to track multiple periods of time over the course of your work. This makes it easy to start new sessions without losing track of the total time across sessions.

  In this example, we start a second session without resetting the timer, simulate another 2-second activity, and then stop the timer to get the updated total duration.
  ```python

  timer.start(reset=False)


  time.sleep(2)


  timer.stop()


  print(f"Total duration in seconds: {timer.seconds}")
  print(timer)
  ```

  ```
  Total duration in seconds: 4.0001797676086426
  4 seconds, 179 microseconds, and 767 nanoseconds
  Stats: {'total_time': 4.0001797676086426, 'num_sessions': 2, 'avg_time': 2.0000898838043213}
  ```

  You can also print time snapshots without affecting the ongoing time tracking. This is useful for logging intermediate results or showing progress without interrupting the current session. The snapshot feature is non-intrusive and does not reset or stop the timer.
  ```python
  time.sleep(30)
  timer.print_snapshot(prefix='Snapshot Example:')
  timer.print('Actual recorded time:')
  ```


  ```
  Snapshot Example: 34 seconds, 132 microseconds, and 165 nanoseconds
  Actual recorded time: 4 seconds, 179 microseconds, and 767 nanoseconds
  ```


  The Timer automatically preserves the history of previous sessions in the `actions` attribute. This allows you to access a complete log of all sessions, including their start and stop times, without losing any context. You can easily retrieve this history to analyze past sessions or track progress over time.
  ```python
  import time
  from stopstart import Timer


  timer = Timer()


  timer.start()
  time.sleep(2)
  timer.stop()
  print(f"Session 1 Duration: {timer}")


  timer.start(reset=False)
  time.sleep(3)
  timer.stop()
  print(f"Session 2 Duration: {timer}")


  print(f"Actions History: {timer.actions}")
  ```


  ```
  Session 1 Duration: 2 seconds, 0 microseconds, and 0 nanoseconds
  Session 2 Duration: 5 seconds, 0 microseconds, and 0 nanoseconds
  Actions History: [
      {'start': 1699392400.0, 'stop': 1699392402.0, 'duration': 2.0},
      {'start': 1699392402.0, 'stop': 1699392407.0, 'duration': 5.0}
  ]
  ```


pkgId: d1b71630ab7399e60ae6c9e0e5697c5b528c9559e494811797bcedd3b2fef138
name: python-story-protocol-python-sdk-help
arch: noarch
version: 0.3.4
epoch: 0
release: 1
summary: Development documents and examples for story-protocol-python-sdk
url: https://github.com/storyprotocol/python-sdk
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-story-protocol-python-sdk-0.3.4-1.src.rpm
location_href: Packages/python-story-protocol-python-sdk-help-0.3.4-1.noarch.rpm
checksum_type: sha256
description:
  Welcome to the documents for Story Protocol Python SDK. The Python SDK provides the APIs for developers to build applications with Story Protocol. By using the SDK, developers can create the resources like IP assets and perform actions to interact with the resource.





  Suppose you already have a node project or created a new node project. First, you need to install `story_protocol_python_sdk` in your project. You can use one of the following command to install the package:

  Use `pip`:

  ```
  pip install story_protocol_python_sdk web3
  ```

  Besides the Story Protocol SDK package `story_protocol_python_sdk`, we also require the package `web3` (https://pypi.org/project/web3/) to access the DeFi wallet accounts.



  Next we can initiate the SDK Client by first setting up our wallet and then the client itself.



  The SDK supports using `web3` for initiating SDK client. Create a Python file and write the following code to initiate the client with a private key:

  > :information-source: Make sure to have WALLET_PRIVATE_KEY set up in your .env file.

  ```Python main.py
  import os
  from dotenv import load_dotenv
  from web3 import Web3

  load_dotenv()
  private_key = os.getenv('WALLET_PRIVATE_KEY')
  rpc_url = os.getenv('RPC_PROVIDER_URL')


  web3 = Web3(Web3.HTTPProvider(rpc_url))


  account = web3.eth.account.from_key(private_key)
  ```

  The preceding code created the `account` object for creating the SDK client.



  To set up the SDK client, import `StoryClient` from `story_protocol_python_sdk`. Write the following code, utilizing the `account` we created previously.

  > :information-source: Make sure to have RPC_PROVIDER_URL for your desired chain set up in your .env file. We recommend using the Sepolia network with `RPC_PROVIDER_URL=https://rpc.ankr.com/eth_sepolia`.

  ```Python main.py
  from story_protocol_python_sdk import StoryClient


  odyssey_chain_id = 1516
  story_client = StoryClient(web3, account, odyssey_chain_id)
  ```



  | Package                         | Description                                    |
  | :------------------------------ | :--------------------------------------------- |
  | [story_protocol_python_sdk](./src/story_protocol_python_sdk) | A Python SDK for interacting with the Story Protocol. |



  Pull requests are welcome. For major changes, please open an issue first
  to discuss what you would like to change. Details see: [CONTRIBUTING](/CONTRIBUTING.md)

  Please make sure to update tests as appropriate.



  [MIT License](/LICENSE.md)


pkgId: dacd78a991887c2fa184ab9c88c94eb3ecacdf00e4cd74aee96621afac67c2fb
name: python-storybuilder-help
arch: noarch
version: 0.0.55
epoch: 0
release: 1
summary: Development documents and examples for storybuilder
url: https://github.com/xxk59/StoryBuilder
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-storybuilder-0.0.55-1.src.rpm
location_href: Packages/python-storybuilder-help-0.0.55-1.noarch.rpm
checksum_type: sha256
description:
  Toolkit to build a story meta



  Run below command in console:

  > python3 -m pip install -r requirements.txt



  > from storybuilder import Story


pkgId: 661929d3d60b5640430b722b1cb9e953db15906e2919807f2340691533a572f8
name: python-stpsf-help
arch: noarch
version: 1.5.2
epoch: 0
release: 1
summary: Development documents and examples for stpsf
url: http://stpsf.readthedocs.io/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stpsf-1.5.2-1.src.rpm
location_href: Packages/python-stpsf-help-1.5.2-1.noarch.rpm
checksum_type: sha256
description:
  **ADVISORY:  STPSF IS CURRENTLY BEING MIGRATED FROM WEBBPSF - THIS REPOSITORY IS NOT READY FOR USE**
  STPSF produces simulated PSFs for the James Webb Space Telescope, NASA's
  flagship infrared space telescope. STPSF can simulate images for any of the
  four science instruments plus the fine guidance sensor, including both direct
  imaging, coronagraphic, and spectroscopic modes.
  STPSF also supports simulating PSFs for the upcoming Nancy Grace Roman Space Telescope (formerly WFIRST),
  including its Wide Field Instrument and a preliminary version of the Coronagraph Instrument.
     The current Roman WFI optical model was provided by Goddard Space Flight Center circa 2021 (the Cycle 9 reference data); a new optical model is currently being implemented in STPSF.
  Developed by Marshall Perrin, Joseph Long, Shannon Osborne, Robel Geda, Bradley Sappington, Marcio Meléndez,
  Charles-Philippe Lajoie, Jarron Leisenring, Neil Zimmerman, Keira Brooks,
  Justin Otor, Trey Kulp, Lauren Chambers, Alden Jurling, and collaborators, 2010-2024.
  Documentation can be found online at https://stpsf.readthedocs.io
  STPSF requires input data for its simulations, including optical path
  difference (OPD) maps, filter transmission curves, and coronagraph Lyot mask
  shapes. These data files are not included in this source distribution.
  Please see the documentation to download the required data files.

rpm_license:
  BSD 3-Clause License  Copyright (c) 2010-2024, Space Telescope Science Institute, AURA All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: b4f6e9d8d229f08df7593694ecfccae3536d39e075b43a50a6a04cd0d4a064f1
name: python-strath-help
arch: noarch
version: 0.0.0
epoch: 0
release: 1
summary: Development documents and examples for strath
url: https://github.com/GRV96/strath
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strath-0.0.0-1.src.rpm
location_href: Packages/python-strath-help-0.0.0-1.noarch.rpm
checksum_type: sha256
description:
  Cette bibliothèque aide à assurer qu'un chemin de fichier soit de type `str` ou
  `pathlib.Path`.

  En Python, il est possible de représenter des chemins de fichier au moyen de
  chaînes de caractères (`str`) ou d'instances de `pathlib.Path`. Ces types
  étant employés de façons fort différentes, un développeur peut avoir besoin de
  vérifier le type des objets et d'effectuer des conversions.

  La bibliothèque `strath` permet de faire ces deux tâches en un seul appel de
  fonction.





  Si le chemin est une chaîne de caractères, cette fonction le convertit en une
  instance de `pathlib.Path` et renvoie cette dernière. Si le chemin est une
  instance de `pathlib.Path`, la fonction renvoie le chemin.



  Si le chemin est une instance de `pathlib.Path`, cette fonction le convertit en
  une chaîne de caractères et renvoie cette dernière. Si le chemin est une chaîne
  de caractères, la fonction renvoie le chemin.



  Les fonctions ci-dessus ont les mêmes paramètres.

  `some_path` (`str` ou `pathlib.Path`): le chemin d'un fichier ou d'un dossier.

  `is_none_allowed` (`bool`): détermine si `some_path` peut être `None`.

  Si l'argument `some_path` est `None` et l'argument `is_none_allowed` est vrai
  (`True`), les fonctions renvoient `None`. Par contre, si `is_none_allowed` est
  faux (`False`), une exception `TypeError` est levée.

  Si l'argument `some_path` n'est pas `None` ni une instance de `str` ou de
  `pathlib.Path`, une exception `TypeError` est levée.

  Pour plus d'informations, consultez la documentation des fonctions et les démos
  dans le dépôt de code source.



  This library helps ensuring that a file path is of type `str` or
  `pathlib.Path`.

  In Python, it is possible to represent file paths with character strings
  (`str`) or `pathlib.Path` instances. Since these types are used in very
  different ways, a developer might need to verify the objects' type and to
  perform conversions.

  Library `strath` allows to do both tasks with one function call.





  If the path is a string, this function converts it to a `pathlib.Path`
  instance, which it returns. If the path is a `pathlib.Path` instance, the
  function returns the path.



  If the path is a `pathlib.Path` instance, this function converts it to a
  string, which it returns. If the path is a string, the function returns the
  path.



  The above functions have the same parameters.

  `some_path` (`str` or `pathlib.Path`): the path to a file or directory.

  `is_none_allowed` (`bool`): determines whether `some_path` can be `None`.

  If argument `some_path` is `None` and argument `is_none_allowed` is `True`,
  the functions return `None`. However, if `is_none_allowed` is `False`, a
  `TypeError` is raised.

  If argument `some_path` is not `None` nor an instance of `str` or
  `pathlib.Path`, a `TypeError` is raised.

  For more information, consult the functions' documentation and the demos in the
  source code repository.


pkgId: 3a4b4d94ae4a0e635c8eb2cf14426c95ab7f6a81495c384f8bfd9685b8e67d27
name: python-strawberry-django-pyjwt-help
arch: noarch
version: 0.0.0a2
epoch: 0
release: 1
summary: Development documents and examples for strawberry-django-pyjwt
url: https://github.com/advl/strawberry-django-pyjwt/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strawberry-django-pyjwt-0.0.0a2-1.src.rpm
location_href: Packages/python-strawberry-django-pyjwt-help-0.0.0a2-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/strawberry-django-jwt?style=for-the-badge)](https://pypi.org/project/strawberry-django-jwt/)
  [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/KundaPanda/strawberry-django-jwt?style=for-the-badge)](https://github.com/KundaPanda/strawberry-django-jwt/graphs/commit-activity)
  ![GitHub last commit](https://img.shields.io/github/last-commit/KundaPanda/strawberry-django-jwt?style=for-the-badge)
  ![Codecov](https://img.shields.io/codecov/c/github/KundaPanda/strawberry-django-jwt?style=for-the-badge)
  [![Codacy grade](https://img.shields.io/codacy/grade/aa892e1ed8924429af95d9eeaa495338?style=for-the-badge)](https://www.codacy.com/gh/KundaPanda/strawberry-django-jwt/dashboard?utm_source=github.com&utm_medium=referral&utm_content=KundaPanda/strawberry-django-jwt&utm_campaign=Badge_Grade)
  [JSON Web Token](https://jwt.io/>) authentication


pkgId: 06707c57e24472c9075f979e57d886028d4ec43c0cda5c50d33a68567e1fc276
name: python-strawberry-graphql-django-help
arch: noarch
version: 0.52.0
epoch: 0
release: 1
summary: Development documents and examples for strawberry-graphql-django
url: https://github.com/strawberry-graphql/strawberry-django
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strawberry-graphql-django-0.52.0-1.src.rpm
location_href: Packages/python-strawberry-graphql-django-help-0.52.0-1.noarch.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/strawberry-graphql/strawberry-django/actions/workflows/tests.yml/badge.svg)](https://github.com/strawberry-graphql/strawberry-django/actions/workflows/tests.yml)
  [![Coverage](https://codecov.io/gh/strawberry-graphql/strawberry-django/branch/main/graph/badge.svg?token=JNH6PUYh3e)](https://codecov.io/gh/strawberry-graphql/strawberry-django)
  [![PyPI](https://img.shields.io/pypi/v/strawberry-graphql-django)](https://pypi.org/project/strawberry-graphql-django/)
  [![Downloads](https://pepy.tech/badge/strawberry-graphql-django)](https://pepy.tech/project/strawberry-graphql-django)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/strawberry-graphql-django)

  [**Docs**](https://strawberry.rocks/docs/django) | [**Discord**](https://strawberry.rocks/discord)

  This package provides powerful tools to generate GraphQL types, queries,
  mutations and resolvers from Django models.

  Installing `strawberry-graphql-django` package from the python package repository.

  ```shell
  pip install strawberry-graphql-django
  ```



  - [x] GraphQL type generation from models
  - [x] Filtering, pagination and ordering
  - [x] Basic create, retrieve, update and delete (CRUD) types and mutations
  - [x] Basic Django auth support, current user query, login and logout mutations
  - [x] Django sync and async views
  - [x] Permission extension using django's permissioning system
  - [x] Relay support with automatic resolvers generation
  - [x] Query optimization to improve performance and avoid common pitfalls (e.g n+1)
  - [x] Debug Toolbar integration with graphiql to display metrics like SQL queries
  - [x] Unit test integration



  ```python


  from django.db import models

  class Fruit(models.Model):
      """A tasty treat"""
      name = models.CharField(
          max_length=20,
      )
      color = models.ForeignKey(
          "Color",
          on_delete=models.CASCADE,
          related_name="fruits",
          blank=True,
          null=True,
      )

  class Color(models.Model):
      name = models.CharField(
          max_length=20,
          help_text="field description",
      )
  ```

  ```python


  import strawberry_django
  from strawberry import auto

  from . import models

  @strawberry_django.type(models.Fruit)
  class Fruit:
      id: auto
      name: auto
      color: 'Color'

  @strawberry_django.type(models.Color)
  class Color:
      id: auto
      name: auto
      fruits: list[Fruit]
  ```

  ```python


  import strawberry
  import strawberry_django
  from strawberry_django.optimizer import DjangoOptimizerExtension

  from .types import Fruit

  @strawberry.type
  class Query:
      fruits: list[Fruit] = strawberry_django.field()

  schema = strawberry.Schema(
      query=Query,
      extensions=[
          DjangoOptimizerExtension,  # not required, but highly recommended
      ],
  )
  ```

  ```python


  from django.urls import include, path
  from strawberry.django.views import AsyncGraphQLView

  from .schema import schema

  urlpatterns = [
      path('graphql', AsyncGraphQLView.as_view(schema=schema)),
  ]
  ```

  Code above generates following schema.

  ```graphql
  """
  A tasty treat
  """
  type Fruit {
    id: ID!
    name: String!
    color: Color
  }

  type Color {
    id: ID!
    """
    field description
    """
    name: String!
    fruits: [Fruit!]
  }

  type Query {
    fruits: [Fruit!]!
  }
  ```


pkgId: 1e061ee30db193b3f130676203d23089e1d2bb2000b302f05c8d65a56443753e
name: python-strawberry-graphql-help
arch: noarch
version: 0.254.0
epoch: 0
release: 1
summary: Development documents and examples for strawberry-graphql
url: https://strawberry.rocks/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strawberry-graphql-0.254.0-1.src.rpm
location_href: Packages/python-strawberry-graphql-help-0.254.0-1.noarch.rpm
checksum_type: sha256
description:
  <img src="https://github.com/strawberry-graphql/strawberry/raw/main/.github/logo.png" width="124" height="150">



  > Python GraphQL library based on dataclasses

  [![CircleCI](https://img.shields.io/circleci/token/307b40d5e152e074d34f84d30d226376a15667d5/project/github/strawberry-graphql/strawberry/main.svg?style=for-the-badge)](https://circleci.com/gh/strawberry-graphql/strawberry/tree/main)
  [![Discord](https://img.shields.io/discord/689806334337482765?label=discord&logo=discord&logoColor=white&style=for-the-badge&color=blue)](https://discord.gg/ZkRTEJQ)
  [![PyPI](https://img.shields.io/pypi/v/strawberry-graphql?logo=pypi&logoColor=white&style=for-the-badge)](https://pypi.org/project/strawberry-graphql/)



  The quick start method provides a server and CLI to get going quickly. Install
  with:

  ```shell
  pip install "strawberry-graphql[debug-server]"
  ```



  Create a file called `app.py` with the following code:

  ```python
  import strawberry


  @strawberry.type
  class User:
      name: str
      age: int


  @strawberry.type
  class Query:
      @strawberry.field
      def user(self) -> User:
          return User(name="Patrick", age=100)


  schema = strawberry.Schema(query=Query)
  ```

  This will create a GraphQL schema defining a `User` type and a single query
  field `user` that will return a hardcoded user.

  To run the debug server run the following command:

  ```shell
  strawberry server app
  ```

  Open the debug server by clicking on the following link:
  [http://0.0.0.0:8000/graphql](http://0.0.0.0:8000/graphql)

  This will open GraphiQL where you can test the API.



  Strawberry comes with a [mypy] plugin that enables statically type-checking your
  GraphQL schema. To enable it, add the following lines to your `mypy.ini`
  configuration:

  ```ini
  [mypy]
  plugins = strawberry.ext.mypy_plugin
  ```

  [mypy]: http://www.mypy-lang.org/



  A Django view is provided for adding a GraphQL endpoint to your application.

  1. Add the app to your `INSTALLED_APPS`.

  ```python
  INSTALLED_APPS = [
      ...,  # your other apps
      "strawberry.django",
  ]
  ```

  2. Add the view to your `urls.py` file.

  ```python
  from strawberry.django.views import GraphQLView
  from .schema import schema

  urlpatterns = [
      ...,
      path("graphql", GraphQLView.as_view(schema=schema)),
  ]
  ```



  To support graphql Subscriptions over WebSockets you need to provide a WebSocket
  enabled server. The debug server can be made to support WebSockets with these
  commands:

  ```shell
  pip install 'strawberry-graphql[debug-server]'
  pip install 'uvicorn[standard]'
  ```



  * [Various examples on how to use Strawberry](https://github.com/strawberry-graphql/examples)
  * [Full stack example using Starlette, SQLAlchemy, Typescript codegen and Next.js](https://github.com/jokull/python-ts-graphql-demo)
  * [Quart + Strawberry tutorial](https://github.com/rockyburt/Ketchup)



  We use [poetry](https://github.com/sdispater/poetry) to manage dependencies, to
  get started follow these steps:

  ```shell
  git clone https://github.com/strawberry-graphql/strawberry
  cd strawberry
  poetry install --with integrations
  poetry run pytest
  ```

  For all further detail, check out the [Contributing Page](CONTRIBUTING.md)




  We have a configuration for
  [pre-commit](https://github.com/pre-commit/pre-commit), to add the hook run the
  following command:

  ```shell
  pre-commit install
  ```



  - Project homepage: https://strawberry.rocks
  - Repository: https://github.com/strawberry-graphql/strawberry
  - Issue tracker: https://github.com/strawberry-graphql/strawberry/issues
    - In case of sensitive bugs like security vulnerabilities, please contact
      patrick.arminio@gmail.com directly instead of using the issue tracker. We
      value your effort to improve the security and privacy of this project!



  The code in this project is licensed under MIT license. See [LICENSE](./LICENSE)
  for more information.

  ![Recent Activity](https://images.repography.com/0/strawberry-graphql/strawberry/recent-activity/d751713988987e9331980363e24189ce.svg)


pkgId: 19e17635b4f86fae38e8c55a8c2db6a63d5d97f5477d31cd1aa096079d828b55
name: python-streaming-indicators-help
arch: noarch
version: 0.1.7
epoch: 0
release: 1
summary: Development documents and examples for streaming-indicators
url: https://github.com/mr-easy/streaming_indicators
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streaming-indicators-0.1.7-1.src.rpm
location_href: Packages/python-streaming-indicators-help-0.1.7-1.noarch.rpm
checksum_type: sha256
description:
  A python library for computing technical analysis indicators on streaming data.


  ```
  pip install streaming-indicators
  ```

  There are many other technical analysis python packages, most notably ta-lib, then why another library?
  All other libraries work on static data, you can not add values to any indicator. But in real-time trading system, price values (ticks/candles) keeps streaming, and indicators should update on real-time. This library is for that purpose.


  Each indicator is a class, and is statefull. It will have 3 main functions:
  1. Constructor: initialise all parameters such as period.
  2. update: To add new data point in the indicator computation. Returns the new value of the indicator.
  3. compute: Compute indicator value with a new data point, but don't update it's state. This is useful in some cases, for example, compute indictor on ltp, but don't update it.


  - Simple Moving Average (SMA)
  ```
  import streaming_indicators as si

  period = 14
  SMA = si.SMA(period)
  for idx, candle in candles.iterrows():
      sma = SMA.update(candle['close'])
      print(sma)
  ```
  - Exponential Moving Average (EMA)
  ```
  period = 14
  EMA = si.EMA(period)
  for idx, candle in candles.iterrows():
      ema = EMA.update(candle['close'])
      print(ema)
  ```
  - Weighted Moving Average (WMA)
  - Smoothed Moving Average (SMMA)
  - RMA (RMA)
  RMA is used in trading view in many indicators including `RSI`. [Ref](https://www.tradingview.com/pine-script-reference/v6/#fun_ta.rma)
  - Volume Weighted Average Price (VWAP)
  Computes VWAP using hlc3 and volume, anchors at first candle.
  ```
  VWAP = si.VWAP()
  for idx, candle in candles.iterrows():
      vwap = VWAP.update(candle)
      print(vwap)
  ```
  - Relative Strength Index (RSI)
  ```
  period = 14
  RSI = si.RSI(period)
  for idx, candle in candles.iterrows():
      rsi = RSI.update(candle['close'])
      print(rsi)
  ```
  - Central Pivot Range (CPR)
  - True Range (TRANGE)
  - Average True Range (ATR)
  ```
  atr_period = 20
  ATR = si.ATR(atr_period)
  for idx, candle in candles.iterrows():
      atr = ATR.update(candle)  # Assumes candle to have 'open',high','low','close' - TODO: give multiple inputs to update.
      print(atr)
  ```
  - Bollinger Bands (BBands)
  - SuperTrend (SuperTrend)
  ```
  st_atr_length = 10
  st_factor = 3
  ST = si.SuperTrend(st_atr_length, st_factor)
  for idx, candle in candles.iterrows():
      st = ST.update(candle)
      print(st) # (st_direction:1/-1, band_value)
  ```
  To use some historical candles to initiate, use: `ST = si.SuperTrend(st_atr_length, st_factor, candles=initial_candles)` where `initial_candles` is pandas dataframe with `open,high,low,close` columns, and requires talib package.
  - Heikin Ashi Candlesticks (HeikinAshi)
  ```
  HA = si.HeikinAshi()
  for idx, candle in candles.iterrows():
      ha_candle = HA.update(candle)
      print(ha_candle) # {'close': float, 'open': float, 'high': float, 'low': float}
  ```
  - Renko Bricks (Renko)
  ```

  brick_size = 20
  Renko = si.Renko()
  for idx, candle in candles.iterrows():
      bricks = Renko.update(candle['close'], brick_size)
      print(bricks) # [{'direction': 1/-1, 'brick_num': int, 'wick_size': float, 'brick_size': float, 'brick_end_price': float, 'price': float}, {}]: list of bricks formed after this candle
  ```
  ```

  atr_period = 20
  ATR = si.ATR(atr_period)
  Renko = si.Renko()
  for idx, candle in candles.iterrows():
      atr = ATR.update(candle)
      print(atr)
      bricks = Renko.update(candle['close'], atr)
      print(bricks)
  ```
  - Order Checking (IsOrder)
  Checks if the running sequence is in a given order, eg increasing, decreasing, exponential, etc. Useful when checking if consecutive n candles/ltps were increasing.
  ```
  period = 10
  all_increasing = si.IsOrder('>', period)
  for idx, candle in candles.iterrows():
      is_increasing = all_increasing.update(candle['close'])
      print(is_increasing) # True/False
  ```
  - HalfTrend (`HalfTrend`)
  HalfTrend indicator by Alex Orekhov (everget) in tradingview. Refered it's pine script. `trend = 0` for uptrend and `1` for downtrend.
  ```
  HT = si.HalfTrend(amplitude=2, channel_deviation=2, atr_period=100)
  for idx, candle in candles.iterrows():
      trend, half_trend, up, down, atr_high, atr_low = HT.update(candle)
  ```
  - Directional Moving Index (`PLUS_DI` and `MINUS_DI`)
  - CWA 2-Sigma (`CWA2Sigma`)
  As discussed by Mr Rakesh Pujara in his [interview](https://www.youtube.com/watch?v=tSlfPgaWIu4).
  ```
  CWA2Sigma = si.CWA2Sigma(bb_period=50, bb_width=2, ema_period=100, atr_period=14, atr_factor=1.8, sl_perc=20)
  for idx, candle in candles.iterrows():
      cwa_signal,cwa_entry_price = CWA2Sigma.update(candle)
  ```


  - [Version History](version_history.md)
  - [TODOs](TODO.md)

  If you find this repo useful, do consider giving a star. Contributions are most welcome.
  MIT License

  Copyright (c) [2023] [Rishabh Gupta]

  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: c4b60985aa729cd33041923600984174cc40eaa6ec2a9ae649b41938bbfcaf4c
name: python-streamlit-calendar-help
arch: noarch
version: 1.2.1
epoch: 0
release: 1
summary: Development documents and examples for streamlit-calendar
url: https://github.com/im-perativa/streamlit-calendar
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-calendar-1.2.1-1.src.rpm
location_href: Packages/python-streamlit-calendar-help-1.2.1-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/streamlit-calendar)](https://pypi.org/project/streamlit-calendar/)
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/pypistats.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/streamlit-calendar/)
  [![PyPI downloads](https://img.shields.io/pypi/dm/streamlit-calendar.svg)](https://pypistats.org/packages/streamlit-calendar)
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/im-perativa/streamlit-calendar/ci.yml)](https://github.com/im-perativa/streamlit-calendar/actions)
  [![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)

  **A Streamlit component to show calendar view using [FullCalendar](https://fullcalendar.io/) with support for Streamlit light/dark theme, callbacks, and custom CSS**

  <a href="https://www.buymeacoffee.com/imperativa" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-orange.png" alt="Buy Me A Coffee" height="28" width="105"></a>



  ![](https://github.com/im-perativa/streamlit-calendar-demo/blob/main/demo.gif)



  ```bash
  pip install streamlit-calendar
  ```



  ```python
  import streamlit as st
  from streamlit_calendar import calendar

  calendar_options = {
      "editable": True,
      "selectable": True,
      "headerToolbar": {
          "left": "today prev,next",
          "center": "title",
          "right": "resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth",
      },
      "slotMinTime": "06:00:00",
      "slotMaxTime": "18:00:00",
      "initialView": "resourceTimelineDay",
      "resourceGroupField": "building",
      "resources": [
          {"id": "a", "building": "Building A", "title": "Building A"},
          {"id": "b", "building": "Building A", "title": "Building B"},
          {"id": "c", "building": "Building B", "title": "Building C"},
          {"id": "d", "building": "Building B", "title": "Building D"},
          {"id": "e", "building": "Building C", "title": "Building E"},
          {"id": "f", "building": "Building C", "title": "Building F"},
      ],
  }
  calendar_events = [
      {
          "title": "Event 1",
          "start": "2023-07-31T08:30:00",
          "end": "2023-07-31T10:30:00",
          "resourceId": "a",
      },
      {
          "title": "Event 2",
          "start": "2023-07-31T07:30:00",
          "end": "2023-07-31T10:30:00",
          "resourceId": "b",
      },
      {
          "title": "Event 3",
          "start": "2023-07-31T10:40:00",
          "end": "2023-07-31T12:30:00",
          "resourceId": "a",
      }
  ]
  custom_css="""
      .fc-event-past {
          opacity: 0.8;
      }
      .fc-event-time {
          font-style: italic;
      }
      .fc-event-title {
          font-weight: 700;
      }
      .fc-toolbar-title {
          font-size: 2rem;
      }
  """

  calendar = calendar(events=calendar_events, options=calendar_options, custom_css=custom_css)
  st.write(calendar)
  ```





  For complete `event` object properties, check out: [https://fullcalendar.io/docs/event-object](https://fullcalendar.io/docs/event-object)
  For complete `options` object properties, check out: [https://fullcalendar.io/docs](https://fullcalendar.io/docs)
  For complete `custom_css` options, check out: [https://fullcalendar.io/docs/css-customization](https://fullcalendar.io/docs/css-customization)



  The component value, i.e. the return value of the `calendar(...)` instance, is a dict which properties depends on the current called callback.

  For example, when the user clicked on an event, the component value would be:

  ```python
  st.write(calendar)





















  ```

  The properties of each callback is explained as follows:



  Triggered when the user clicks on a date or a time.

  Source: [https://fullcalendar.io/docs/dateClick](https://fullcalendar.io/docs/dateClick)

  | Property |            Type            | Description                                                                                         |
  | -------- | :------------------------: | --------------------------------------------------------------------------------------------------- |
  | allDay   |         `boolean`          | `true` or `false` whether the click happened on an all-day cell.                                    |
  | date     |          `string`          | a date for the clicked day/time in [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) format. |
  | view     |     [`View`](#ViewApi)     | The current view.                                                                                   |
  | resource | [`Resource`](#ResourceApi) | If the current view is a resource-view, the resource that owns this date.                           |



  Triggered when the user clicks an event.

  Source: [https://fullcalendar.io/docs/eventClick](https://fullcalendar.io/docs/eventClick)

  | Property |         Type         | Description           |
  | -------- | :------------------: | --------------------- |
  | event    | [`Event`](#EventApi) | The associated event. |
  | view     |  [`View`](#ViewApi)  | The current view.     |



  Called after an event has been modified in some way.

  Source: [https://fullcalendar.io/docs/eventChange](https://fullcalendar.io/docs/eventChange)

  | Property      |          Type          | Description                                                                                                                                                               |
  | ------------- | :--------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | oldEvent      |  [`Event`](#EventApi)  | An event with data prior to the change.                                                                                                                                   |
  | event         |  [`Event`](#EventApi)  | An Event Object with the updated changed data.                                                                                                                            |
  | relatedEvents | [`Event[]`](#EventApi) | An array of other related events that were also affected. An event might have other recurring event instances or might be linked to other events with the same `groupId`. |



  Called after event data is initialized **OR** changed in any way.

  Source: [https://fullcalendar.io/docs/eventsSet](https://fullcalendar.io/docs/eventsSet)

  | Property |          Type          | Description                                            |
  | -------- | :--------------------: | ------------------------------------------------------ |
  | events   | [`Event[]`](#EventApi) | An array of events. It contains every event in memory. |



  Triggered when a date/time selection is made.

  Source: [https://fullcalendar.io/docs/select-callback](https://fullcalendar.io/docs/select-callback)

  | Property |            Type            | Description                                                                                                          |
  | -------- | :------------------------: | -------------------------------------------------------------------------------------------------------------------- |
  | allDay   |         `boolean`          | `true` or `false` whether the selection happened on all-day cells.                                                   |
  | start    |          `string`          | a date indicating the beginning of the selection in [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) format. |
  | end.     |          `string`          | a date indicating the end of the selection in [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) format.       |
  | view     |     [`View`](#ViewApi)     | The current view.                                                                                                    |
  | resource | [`Resource`](#ResourceApi) | If the current view is a resource-view, the resource that owns this selection.                                       |





  Source: [https://fullcalendar.io/docs/event-object](https://fullcalendar.io/docs/event-object)

  | Property        |     Type     | Description                                                                                                                                                                                |
  | --------------- | :----------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | id              |   `string`   | A unique identifier of an event.                                                                                                                                                           |
  | groupId         |   `string`   | Events that share a `groupId` will be dragged and resized together automatically.                                                                                                          |
  | allDay          |  `boolean`   | Determines if the event is shown in the “all-day” section of relevant views. In addition, if `true` the time text is not displayed with the event.                                         |
  | start           |   `string`   | An [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) representation of the start date. If the event is all-day, there will not be a time part.                                      |
  | end             |   `string`   | An [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) representation of the end date. If the event is all-day, there will not be a time part.                                        |
  | title           |   `string`   | The text that will appear on an event.                                                                                                                                                     |
  | url             |   `string`   | A URL that will be visited when this event is clicked by the user.                                                                                                                         |
  | classNames      |  `string[]`  | An array of strings like `[ 'myclass1', myclass2' ]`. Determines which HTML classNames will be attached to the rendered event.                                                             |
  | display         |   `string`   | The rendering type of this event. Can be `'auto'`, `'block'`, `'list-item'`, `'background'`, `'inverse-background'`, or `'none'`.                                                          |
  | backgroundColor |   `string`   | The `eventBackgroundColor` override for this specific event.                                                                                                                               |
  | borderColor     |   `string`   | The `eventBorderColor` override for this specific event.                                                                                                                                   |
  | textColor       |   `string`   | The `eventTextColor` override for this specific event.                                                                                                                                     |
  | extendedProps   | `Dictionary` | A plain object holding miscellaneous other properties specified during parsing. Receives properties in the explicitly given `extendedProps` hash as well as other non-standard properties. |
  | resourceId      |   `string`   | The unique string identifier for the resource of the event (if any).                                                                                                                       |



  Source: [https://fullcalendar.io/docs/resource-object](https://fullcalendar.io/docs/resource-object)

  | Property             |     Type     | Description                                                     |
  | -------------------- | :----------: | --------------------------------------------------------------- |
  | id                   |   `string`   | The unique string identifier for this resource.                 |
  | title                |   `string`   | The title of this resource.                                     |
  | eventBackgroundColor |   `string`   | Same as `Event.backgroundColor`.                                |
  | eventBorderColor     |   `string`   | Same as `Event.borderColor`.                                    |
  | eventTextColor       |   `string`   | Same as `Event.textColor`.                                      |
  | eventClassNames      |  `string[]`  | Same as `Event.ClassNames`.                                     |
  | extendedProps        | `Dictionary` | A hash of non-standard props that were specified during parsing |



  Source: [https://fullcalendar.io/docs/view-object](https://fullcalendar.io/docs/view-object)

  | Property     |  Type  | Description                                                                                                                    |
  | ------------ | :----: | ------------------------------------------------------------------------------------------------------------------------------ |
  | type         | string | Name of one of the available views.                                                                                            |
  | title        | string | Title text that is displayed at the top of the `headerToolbar`.                                                                |
  | activeStart  | string | An [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) that is the first visible day.                                     |
  | activeEnd    | string | An [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) that is the last visible day.                                      |
  | currentStart | string | An [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) that is the start of the interval the view is trying to represent. |
  | currentEnd   | string | An [ISO8601 string](https://en.wikipedia.org/wiki/ISO_8601) that is the end of the interval the view is trying to represent.   |



  Note: you only need to run these steps if you want to change this component or
  contribute to its development!



  First, clone the repository:

  ```bash
  git clone https://github.com/im-perativa/streamlit-calendar.git
  cd streamlit-calendar
  ```

  Install the Python dependencies:

  ```bash
  poetry install
  ```

  And install the frontend dependencies:

  ```bash
  cd streamlit_calendar/frontend
  npm install
  ```



  To make changes, first go to `streamlit_calendar/__init__.py` and make sure the
  variable `_RELEASE` is set to `False`. This will make the component use the local
  version of the frontend code, and not the built project.

  Then, start one terminal and run:

  ```bash
  cd streamlit_calendar/frontend
  npm start
  ```

  This starts the frontend code on port 3001.

  Open another terminal and run:

  ```bash
  cd streamlit_calendar
  poetry shell
  streamlit run __init__.py
  ```

  This runs the development version on local Streamlit server. Now you can make changes to the Python or Javascript
  code in `streamlit_calendar` and the demo app should update automatically!

  If nothing updates, make sure the variable `_RELEASE` in `streamlit_calendar/__init__.py` is set to `False`.


pkgId: a24468b8536032e42a0b8de5354ecadcd6bfb7fd012e70a730bd82139b619b5a
name: python-streamlit-chat-prompt-help
arch: noarch
version: 0.3.4
epoch: 0
release: 1
summary: Development documents and examples for streamlit-chat-prompt
url: https://github.com/tahouse/streamlit-chat-prompt
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-chat-prompt-0.3.4-1.src.rpm
location_href: Packages/python-streamlit-chat-prompt-help-0.3.4-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/streamlit-chat-prompt)](https://pypi.org/project/streamlit-chat-prompt/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/streamlit-chat-prompt)](https://pypi.org/project/streamlit-chat-prompt/)
  ![GitHub](https://img.shields.io/github/license/tahouse/streamlit-chat-prompt)

  A Streamlit component that provides a modern chat-style prompt with image attachment and paste support. This component was built to mimic the style of [streamlit.chat_input](https://docs.streamlit.io/develop/api-reference/chat/st.chat_input) while expanding functionality with images. Future work may include addition of speech-to-text input.

  **Author:** Tyler House ([@tahouse](https://github.com/tahouse))

  ![Demo](https://raw.githubusercontent.com/tahouse/streamlit-chat-prompt/main/docs/demo.gif)



  - 📝 Chat-style text input with multi-line support
  - 📎 Image attachment support via button or drag-and-drop
  - 📋 Paste image support (paste images directly from clipboard)
  - 🖼️ Image preview with ability to remove attached images
  - ⌨️ Submit with Enter key (Shift+Enter for new line)
  - 🎨 Automatic theme integration with Streamlit
  - 📱 Responsive design that works well on mobile and desktop
  - 🗜️ Automatic image compression/scaling to stay under size limits (customizable, default 5MB)
  - 📌 Optional pinned-to-bottom placement for main chat interface (one per app)
  - 🔄 Flexible positioning for use in dialogs, sidebars, or anywhere in the app flow
  - ✏️ Support for default/editable content - perfect for message editing workflows
  - 🔤 Smart focus management - automatically returns to text input after interactions



  ```bash
  pip install streamlit-chat-prompt
  ```



  ```python
  import streamlit as st
  from streamlit_chat_prompt import prompt


  response = prompt(
      name="chat",  # Unique name for the prompt
      key="chat",   # Unique key for the component instance
      placeholder="Hi there! What should we talk about?",  # Optional placeholder text
      main_bottom=True,  # Pin prompt to bottom of main area
      max_image_size=5 * 1024 * 1024,  # Maximum image size (5MB default)
      disabled=False,  # Optionally disable the prompt
  )


  if response:
      if response.text:
          st.write(f"Message: {response.text}")

      if response.images:
          for i, img in enumerate(response.images):
              st.write(f"Image {i+1}: {img.type} ({img.format})")
  ```



  Here are some usage patterns, or check out [rocktalk](https://github.com/tahouse/rocktalk) for a full working example.

  1. Main Chat Interface ![Main Chat Interface](https://raw.githubusercontent.com/tahouse/streamlit-chat-prompt/main/docs/main-chat.png)

      ```python
      import base64
      from io import BytesIO
      import streamlit as st
      from streamlit_chat_prompt import PromptReturn, prompt, ImageData
      from PIL import Image


      st.chat_message("assistant").write("Hi there! What should we chat about?")

      prompt_return: PromptReturn | None = prompt(
          name="foo",
          key="chat_prompt",
          placeholder="Hi there! What should we chat about?",
          main_bottom=True,
      )

      if prompt_return:
          with st.chat_message("user"):
              st.write(prompt_return.text)
              if prompt_return.images:
                  for image in prompt_return.images:
                      st.divider()
                      image_data: bytes = base64.b64decode(image.data)
                      st.markdown("Using `st.image`")
                      st.image(Image.open(BytesIO(image_data)))

                      
                      st.divider()
                      st.markdown("Using `st.markdown`")
                      st.markdown(f"![Image example](data:image/png;base64,{image.data})")

      ```

  2. Dialog Usage and Starting From Existing Message ![Dialog Interface](https://raw.githubusercontent.com/tahouse/streamlit-chat-prompt/main/docs/dialog.png)

      ```python
      if st.button(
          "Dialog Prompt with Default Value", key=f"dialog_prompt_with_default_button"
      ):
          with open("example_images/vangogh.png", "rb") as f:
              image_data = f.read()
              image = Image.open(BytesIO(image_data))
              base64_image = base64.b64encode(image_data).decode("utf-8")
              test_dg(
                  default_input=PromptReturn(
                      text="This is a test message with an image",
                      images=[
                          ImageData(data=base64_image, type="image/png", format="base64")
                      ],
                  ),
                  key="dialog_with_default",
              )
      ```





  Main function to create a chat prompt.

  Parameters:

  - `name` (str): Unique name for this prompt instance
  - `key` (str): Unique key for the component instance
  - `placeholder` (str, optional): Placeholder text shown in input field
  - `default` (Union[str, PromptReturn], optional): Default value for the prompt. Can include text and images using the `PromptReturn` object type.
  - `main_bottom` (bool, optional): Pin prompt to bottom of main area (default: True)
  - `max_image_size` (int, optional): Maximum image size in bytes (default: 5MB)
  - `disabled` (bool, optional): Disable the prompt (default: False)

  Returns:

  `Optional[PromptReturn]`: Object containing message and images if submitted, None otherwise



  Object returned when user submits the prompt.

  Properties:

  - `text` (Optional[str]): Text message entered by user
  - `images` (Optional[List[ImageData]]): List of attached images



  Object representing an attached image.

  Properties:

  - `type` (str): Image MIME type (e.g. "image/jpeg")
  - `format` (str): Image format (e.g. "base64")
  - `data` (str): Image data as base64 string



  This repository is based on the [Streamlit Component template system](https://github.com/streamlit/component-template). If you want to modify or develop the component:

  1. Clone the repository
  2. Install development dependencies:

      ```sh
      pip install -e ".[devel]"
      ```

  3. Start the frontend development server:

      ```sh
      cd streamlit_chat_prompt/frontend
      npm install
      npm run start
      ```

  4. In a separate terminal, run your Streamlit app:

      ```sh
      streamlit run your_app.py
      ```



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


pkgId: fbd14784fe141b3586f851e12271d454a7eeabdffa66cad8518cc71edb5a766d
name: python-streamlit-community-navigation-bar-help
arch: noarch
version: 4.0.8
epoch: 0
release: 1
summary: Development documents and examples for streamlit-community-navigation-bar
url: https://github.com/streamlit-community/streamlit-navigation-bar
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-community-navigation-bar-4.0.8-1.src.rpm
location_href: Packages/python-streamlit-community-navigation-bar-help-4.0.8-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/streamlit-navigation-bar)](https://pypi.org/project/streamlit-navigation-bar/)
  [![Downloads](https://static.pepy.tech/badge/streamlit-navigation-bar/month)](https://pepy.tech/project/streamlit-navigation-bar)
  [![GitHub License](https://img.shields.io/github/license/gabrieltempass/streamlit-navigation-bar?color=blue)](https://github.com/gabrieltempass/streamlit-navigation-bar/blob/main/LICENSE)



  **A component that allows you to place a navigation bar in your Streamlit app.**

  The navbar was built to:
  * Be simple to use
  * Look great out of the box
  * Apply custom styles
  * Integrate with Streamlit’s UI
  * Have a well-written documentation

  It has some cool functionalities, like displaying an optional logo and external URLs. It also matches the active theme by default.



  Open a terminal and run:

  ``` bash
  pip install streamlit-community-navigation-bar
  ```



  Here is a basic example of how to use it:
  ``` python
  import streamlit as st
  from streamlit_navigation_bar import st_navbar

  page = st_navbar(["Home", "Documentation", "Examples", "Community", "About"])
  st.write(page)
  ```
  [![Example 1](https://github.com/gabrieltempass/streamlit-navigation-bar/raw/main/images/st_navbar_1.gif)](https://st-navbar-1.streamlit.app/)
  [**[App]**](https://st-navbar-1.streamlit.app/)
  [**[Source]**](https://github.com/gabrieltempass/streamlit-navigation-bar/blob/main/examples/st_navbar_1/streamlit_app.py)

  Jump to the [examples gallery](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/Examples) to see more demos of what the navbar is capable of.



  The complete documentation is on the [GitHub Wiki](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki).
  There, you can check:
  * [API reference](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference)
      * [Usage](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#usage)
      * [Parameters](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#parameters)
      * [Returns](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#returns)
      * [Styles](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#styles)
          * [Document Object Model](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#document-object-model)
          * [CSS variables](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#css-variables)
          * [Default style](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#default-style)
          * [Maximum width](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#maximum-width)
      * [Options](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/API-reference#options)
  * [Multipage](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/Multipage)
      * [Streamlit's structure](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/Multipage#streamlits-structure)
      * [Recommended structure](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/Multipage#recommended-structure)
  * [Examples](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/Examples)
  * [Roadmap](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/Roadmap)



  To use the navigation bar component in your Streamlit app, you will need:
  * **Python >= 3.8**
  * **Streamlit >= 1.33**
  * **[Streamlit Theme](https://github.com/gabrieltempass/streamlit-theme) >= 1.2.3**
  * The CSS adjustment depends on the
    [browser compatibility with the :has pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:has#browser_compatibility)



  You are welcome to help develop the Streamlit Navigation Bar! There are
  multiple ways to contribute, such as [reporting a bug](https://github.com/gabrieltempass/streamlit-navigation-bar/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml)
  or [requesting a feature](https://github.com/gabrieltempass/streamlit-navigation-bar/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.yml).
  You can also just [ask a question](https://github.com/gabrieltempass/streamlit-navigation-bar/issues/new?assignees=&labels=question&projects=&template=ask_question.yml),
  or join the discussions in the [community forum](https://discuss.streamlit.io/t/new-component-streamlit-navigation-bar/66032).
  To submit code for a pull request, make sure to read the
  [guide on how to contribute](https://github.com/gabrieltempass/streamlit-navigation-bar/wiki/Contributing).



  The Streamlit Navigation Bar was made with:
  * The [streamlit-component-vue-vite-template](https://github.com/gabrieltempass/streamlit-component-vue-vite-template),
    by [@gabrieltempass](https://github.com/gabrieltempass)
  * The [st-theme](https://github.com/gabrieltempass/streamlit-theme)
    component, by [@gabrieltempass](https://github.com/gabrieltempass)

  And based on:
  * The [streamlit-option-menu](https://github.com/victoryhb/streamlit-option-menu/tree/master)
    component, by [@victoryhb](https://github.com/victoryhb)
  * The [styleable container](https://arnaudmiribel.github.io/streamlit-extras/extras/stylable_container/),
    by [@LukasMasuch](https://github.com/LukasMasuch)


pkgId: b9028d3137233575e02f2adbad1985c01e0d371c22b3dc7aab387fefafc0470b
name: python-streamlit-desktop-app-help
arch: noarch
version: 0.3.4
epoch: 0
release: 1
summary: Development documents and examples for streamlit-desktop-app
url: https://github.com/ohtaman/streamlit-desktop-app
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-desktop-app-0.3.4-1.src.rpm
location_href: Packages/python-streamlit-desktop-app-help-0.3.4-1.noarch.rpm
checksum_type: sha256
description:
  - **Effortless Deployment**
    With built-in PyInstaller support, convert your Streamlit app into a standalone executable in just one command.
  - **Native Desktop Experience**
    Run your Streamlit app in a native desktop window for a true desktop-like feel.
  - **Automatic Cleanup**


pkgId: dfab13704ad5546537c3329ecc1db6d3c01a3b506ae6f0c72bf66258918a78d7
name: python-streamlit-editorjs-component-help
arch: noarch
version: 0.1.4
epoch: 0
release: 1
summary: Development documents and examples for streamlit-editorjs-component
url: https://github.com/sanekun/streamlit-editorjs-component
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-editorjs-component-0.1.4-1.src.rpm
location_href: Packages/python-streamlit-editorjs-component-help-0.1.4-1.noarch.rpm
checksum_type: sha256
description:
  Custom component for editorjs.
  [Editorjs](https://editorjs.io/) is json-based rich-text-editor.


  ``` bash
  pip install streamlit-editorjs-component
  ```



  ``` python
  import streamlit as st
  from streamlit-editorjs-component import streamlit_editorjs

  content = streamlit_editorjs(height=500)
  st.write(content)
  ```

  ``` plain text
  Args:
      data (dict, optional): initial json data formatted as EditorJS. Defaults to None.
      key (str, optional): Streamlit state key. Defaults to None.
      height (int, optional): Component block height it the content over the height, it makes scroll. Defaults to 500.

  Returns:
      dict: dictionary content from EditorJS.
  ```





  Add tools to [constant.js](streamlit_editorjs_component/frontend/src/components/constant.js)

  ``` bash
  yarn install
  yarn build
  ```
  ``` python
  streamlit run test/st_component_example.py
  ```


pkgId: 3149600e5a8d42787d56245e154999275c60fc29a57b67df8133ef8c8f8dc2b2
name: python-streamlit-help
arch: noarch
version: 1.41.1
epoch: 0
release: 1
summary: Development documents and examples for streamlit
url: https://streamlit.io
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-1.41.1-1.src.rpm
location_href: Packages/python-streamlit-help-1.41.1-1.noarch.rpm
checksum_type: sha256
description:
  <br>

  <img src="https://user-images.githubusercontent.com/7164864/217935870-c0bc60a3-6fc0-4047-b011-7b4c59488c91.png" alt="Streamlit logo" style="margin-top:50px"></img>



  **A faster way to build and share data apps.**



  Streamlit lets you transform Python scripts into interactive web apps in minutes, instead of weeks. Build dashboards, generate reports, or create chat apps. Once you’ve created an app, you can use our [Community Cloud platform](https://streamlit.io/cloud) to deploy, manage, and share your app.



  - **Simple and Pythonic:** Write beautiful, easy-to-read code.
  - **Fast, interactive prototyping:** Let others interact with your data and provide feedback quickly.
  - **Live editing:** See your app update instantly as you edit your script.
  - **Open-source and free:** Join a vibrant community and contribute to Streamlit's future.



  Open a terminal and run:

  ```bash
  $ pip install streamlit
  $ streamlit hello
  ```

  If this opens our sweet _Streamlit Hello_ app in your browser, you're all set! If not, head over to [our docs](https://docs.streamlit.io/get-started) for specific installs.

  The app features a bunch of examples of what you can do with Streamlit. Jump to the [quickstart](#quickstart) section to understand how that all works.

  <img src="https://user-images.githubusercontent.com/7164864/217936487-1017784e-68ec-4e0d-a7f6-6b97525ddf88.gif" alt="Streamlit Hello" width=500 href="none"></img>





  Create a new file `streamlit_app.py` with the following code:
  ```python
  import streamlit as st
  x = st.slider("Select a value")
  st.write(x, "squared is", x * x)
  ```

  Now run it to open the app!
  ```
  $ streamlit run streamlit_app.py
  ```

  <img src="https://user-images.githubusercontent.com/7164864/215172915-cf087c56-e7ae-449a-83a4-b5fa0328d954.gif" width=300 alt="Little example"></img>



  Streamlit comes in with [a ton of additional powerful elements](https://docs.streamlit.io/develop/api-reference) to spice up your data apps and delight your viewers. Some examples:

  <table border="0">
    <tr>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/widgets">
          <img src="https://user-images.githubusercontent.com/7164864/217936099-12c16f8c-7fe4-44b1-889a-1ac9ee6a1b44.png" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/data/st.dataframe">
          <img src="https://user-images.githubusercontent.com/7164864/215110064-5eb4e294-8f30-4933-9563-0275230e52b5.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/charts">
          <img src="https://user-images.githubusercontent.com/7164864/215174472-bca8a0d7-cf4b-4268-9c3b-8c03dad50bcd.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/layout">
          <img src="https://user-images.githubusercontent.com/7164864/217936149-a35c35be-0d96-4c63-8c6a-1c4b52aa8f60.png" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/concepts/multipage-apps">
          <img src="https://user-images.githubusercontent.com/7164864/215173883-eae0de69-7c1d-4d78-97d0-3bc1ab865e5b.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://streamlit.io/gallery">
          <img src="https://user-images.githubusercontent.com/7164864/215109229-6ae9111f-e5c1-4f0b-b3a2-87a79268ccc9.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
    </tr>
    <tr>
      <td>Input widgets</td>
      <td>Dataframes</td>
      <td>Charts</td>
      <td>Layout</td>
      <td>Multi-page apps</td>
      <td>Fun</td>
    </tr>
  </table>


  Our vibrant creators community also extends Streamlit capabilities using  🧩 [Streamlit Components](https://streamlit.io/components).



  There's so much you can build with Streamlit:
  - 🤖  [LLMs & chatbot apps](https://streamlit.io/gallery?category=llms)
  - 🧬  [Science & technology apps](https://streamlit.io/gallery?category=science-technology)
  - 💬  [NLP & language apps](https://streamlit.io/gallery?category=nlp-language)
  - 🏦  [Finance & business apps](https://streamlit.io/gallery?category=finance-business)
  - 🗺  [Geography & society apps](https://streamlit.io/gallery?category=geography-society)
  - and more!

  **Check out [our gallery!](https://streamlit.io/gallery)** 🎈



  Deploy, manage and share your apps for free using our [Community Cloud](https://streamlit.io/cloud)! Sign-up [here](https://share.streamlit.io/signup). <br><br>
  <img src="https://user-images.githubusercontent.com/7164864/214965336-64500db3-0d79-4a20-8052-2dda883902d2.gif" width="400"></img>


  - Explore our [docs](https://docs.streamlit.io) to learn how Streamlit works.
  - Ask questions and get help in our [community forum](https://discuss.streamlit.io).
  - Read our [blog](https://blog.streamlit.io) for tips from developers and creators.
  - Extend Streamlit's capabilities by installing or creating your own [Streamlit Components](https://streamlit.io/components).
  - Help others find and play with your app by using the Streamlit GitHub badge in your repository:
  ```markdown
  [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](URL_TO_YOUR_APP)
  ```
  [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/streamlit/roadmap)



  Streamlit is completely free and open-source and licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license.


pkgId: ec9a9bdcf1388e3bb004f130c58e6f7bf0bdf1e664aecaf403f7684bbe255912
name: python-streamlit-login-auth-ui-zh-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for streamlit-login-auth-ui-zh
url: https://pypi.org/project/streamlit-login-auth-ui-zh/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-login-auth-ui-zh-0.1.2-1.src.rpm
location_href: Packages/python-streamlit-login-auth-ui-zh-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  这个插件是一个用户友好的 Streamlit 登录/注册系统，基于[streamlit_login_auth_ui](https://github.com/GauriSP10/streamlit_login_auth_ui)库改写构建，
  本项目修改为了中文版，同时支持兼容更高版本的streamlit，修复了部分Bug。
  它为开发者提供了一种简单的方法，以便在其 Streamlit 应用程序中实现安全的用户身份注册和验证。

  streamlit>=1.12.0


  1. **用户登录与注册**：允许用户使用用户名和密码安全地登录和注册新帐户。

  2. **密码重置功能**：用户可以通过点击“忘记密码？”链接，接收一封包含临时密码的电子邮件，方便重置密码。

  3. **输入验证**：在注册过程中，系统会验证用户名和邮箱的有效性及唯一性，确保用户输入的信息符合标准。

  4. **加密存储**：所有用户密码都经过加密处理，增强了安全性。

  5. **自动登录**：使用加密的 Cookie 记住用户的登录状态，避免每次都输入密码。

  6. **用户界面**：提供一个可定制的登录/注册页面，用户可以通过修改参数来更改界面的外观和行为。



  1. **依赖项安装**：确保在使用之前安装了相关依赖项，包括 `streamlit`, `argon2-cffi`, `trycourier` 等。

  2. **初始化和配置**：创建 `__login__` 类的实例时，传入必要的参数，如认证token和公司名称。

  3. **界面集成**：使用 `build_login_ui()` 方法整合所有功能，构建完整的用户界面。



  [Rycen7822](kristinharrison7826@gmail.com)


  ( https://pypi.org/project/streamlit-login-auth-ui-zh/0.1.0/)

  https://github.com/Rycen7822/streamlit_login_auth_ui_zh/tree/main

  [The UI](https://github.com/user-attachments/assets/d430963f-9148-4999-a2e3-772ba52f5561)




  ```python
  pip install streamlit_login_auth_ui_zh
  ```

  要导入该库，只需在代码开头粘贴以下内容：
  ```python
  from streamlit_login_auth_ui_zh.widgets import __login__
  ```

  您只需要为 ```__login__``` 类创建一个对象，并传入以下参数：

  1. **auth_token**：从 [Courier](https://www.courier.com/email-api/) 获取的唯一授权token，用于安全地发送电子邮件。
  2. **company_name**：发送密码重置邮件的个人或组织的名称，例如 "Shims"。
  3. **width**：登录页面上动画的宽度，单位为像素（例如 200 像素）。
  4. **height**：登录页面上动画的高度，单位为像素（例如 250 像素）。
  5. **logout_button_name**：设置注销按钮的名称（例如 'Logout'）。
  6. **hide_menu_bool**：传入 `True` 以隐藏 Streamlit 菜单，传入 `False` 则显示菜单。
  7. **hide_footer_bool**：传入 `True` 以隐藏“由 Streamlit 制作”的页脚，传入 `False` 则显示页脚。
  8. **lottie_url**：希望在登录页面使用的 Lottie 动画 URL，可以从 [LottieFiles](https://lottiefiles.com/featured) 上找到适合的动画。





  1. **auth_token**：
     从 [Courier](https://www.courier.com/email-api/) 获取的token

  2. **company_name**：
     发送密码重置邮件的个人或组织的名称。

  3. **width**：
     登录页面上动画的宽度。

  4. **height**：
     登录页面上动画的高度。



  1. **logout_button_name** [默认值 = '退出登录']：
     注销按钮的名称。如果不提供，默认为 '退出登录'。

  2. **hide_menu_bool** [默认值 = False]：
     传入 `True` 以隐藏 Streamlit 菜单，默认为 `False`，表示菜单将显示。

  3. **hide_footer_bool** [默认值 = False]：
     传入 `True` 以隐藏“由 Streamlit 制作”的页脚，默认为 `False`，表示页脚将显示。

  4. **lottie_url**
     希望在登录页面使用的 Lottie 动画的 URL。

  在创建 __login__ 类的对象之后，你需要调用该对象的 build_login_ui() 方法。这个方法将用于生成和展示登录用户界面。调用该方法的结果可以存储在一个变量中，方便后续操作。




  本示例演示如何使用 `__login__` 类构造对象并调用 `build_login_ui()` 方法来构建登录用户界面。


      
      import streamlit as st
      from streamlit_login_auth_ui_zh.widgets import __login__

      
      login_ui = __login__(
          auth_token="courier_auth_token",  # 从 Courier 获取的授权令牌
          company_name="MyCompany",  # 发送密码重置邮件的公司名称
          width=300,  # 动画宽度
          height=400,  # 动画高度
      )

      
      user_logged_in = login_ui.build_login_ui()

      
      if user_logged_in:
          st.success("用户已成功登录!")
      else:
         st.warning("请登录以继续.")

      def main():
         

      if user_logged_in == True:
         main()



  请确保将你的应用程序逻辑缩进在 `if st.session_state['LOGGED_IN'] == True:` 语句下，这样可以保证只有在用户安全登录后，应用程序才会运行。



  登录页面，用于验证用户身份。
  ![image](https://github.com/user-attachments/assets/e24003af-6ede-425c-81f4-103aea9ddfd5)

  以安全的方式将用户信息存储在 ```_secret_auth_.json``` 文件中。
  ![image](https://github.com/user-attachments/assets/a456993d-46b2-4df6-a545-0a684652752e)

  在用户身份验证（电子邮件）后，触发一封包含随机密码的电子邮件发送给用户。
  ![image](https://github.com/user-attachments/assets/2c6bb1b7-0691-45f6-a15b-de2e76976c8e)

  在用户身份验证（电子邮件和通过电子邮件共享的密码）后，重置密码并更新到 ```_secret_auth_.json``` 文件中。
  ![image](https://github.com/user-attachments/assets/01fe4b6d-9e51-4885-be42-da1729b9ea09)

  仅在用户已登录时在侧边栏生成，允许用户退出。
  ![image](https://github.com/user-attachments/assets/39886c88-7a46-458c-b038-7981fc81750b)



  v0.1.0




  本项目使用 MIT 许可证。有关详细信息，请查看 [LICENSE](LICENSE) 文件。


pkgId: 67b31c3171766985b33eff685660db7c20ad869c71c3c46a2fb5d2d65fbe9e3b
name: python-streamlit-mermaid-help
arch: noarch
version: 0.3.0
epoch: 0
release: 1
summary: Development documents and examples for streamlit-mermaid
url: https://pypi.org/project/streamlit-mermaid/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-mermaid-0.3.0-1.src.rpm
location_href: Packages/python-streamlit-mermaid-help-0.3.0-1.noarch.rpm
checksum_type: sha256
description:
  Streamlit Component, for Mermaid.



  ```bash
  pip install streamlit-mermaid
  ```



  ```py
  import streamlit_mermaid as stmd
  import streamlit as st

  code = """
  graph TD
      A --> B
  """

  stmd.st_mermaid(code)
  ```

  ```bash
  streamlit run examples/example.py
  ```

  ![demo](demo.gif)


pkgId: 2240d28a4dfd26eaba1298a2b31ac5f09bd1165cc427e626322ad525fb08d673
name: python-streamlit-mui-elements-help
arch: noarch
version: 0.0.9
epoch: 0
release: 1
summary: Development documents and examples for streamlit-mui-elements
url: https://github.com/your_username/streamlit-mui-elements
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-mui-elements-0.0.9-1.src.rpm
location_href: Packages/python-streamlit-mui-elements-help-0.0.9-1.noarch.rpm
checksum_type: sha256
description:
  Welcome to the ultimate guide for creating stunning Material-UI components in Streamlit applications! Inspired by the amazing [streamlit-elements](https://github.com/okld/streamlit-elements) by okld, this repository takes your Streamlit apps to the next level.



  Dive into a comprehensive implementation of Material-UI components for Streamlit. This project builds upon the innovative integration approach pioneered by streamlit-elements, offering a wide range of Material-UI elements with full callback support. Create sophisticated web interfaces within your Streamlit applications effortlessly!



  - **Comprehensive Material Design Components**:
    - ✏️ Text input fields
    - 🔘 Selection chips
    - 🔍 Autocomplete with multiple selection
    - 📻 Radio button groups
    - 🎚️ Sliders
    - ☑️ Checkbox groups
    - ⭐ Rating component
    - 📂 Dropdowns
    - 🔄 Switches
    - 🖌️ Styled buttons
  - **Organized Layout**:
    - 🗂️ Cards
    - ➖ Dividers
  - **Full Callback Support** for all components
  - **State Management** through session state



  All component callbacks are automatically stored in `st.session_state["events"]`. Access individual component states using their respective IDs with ease.

  If id="some_id" is not mentioned for a component it's events won'be be captured.



  Check out the demo below to see the Material-UI components in action!

  <img src="docs/assets/output.gif" alt="Demo of Material-UI Components" width="500"/>

  Get started now and transform your Streamlit applications with beautiful Material-UI components!


pkgId: 524f8786bb82b17624e7f18dc815a4a31bf4da10a740c1c63f533b4d756f97ba
name: python-streamlit-nightly-help
arch: noarch
version: 1.41.2.dev20241219
epoch: 0
release: 1
summary: Development documents and examples for streamlit-nightly
url: https://streamlit.io
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-nightly-1.41.2.dev20241219-1.src.rpm
location_href: Packages/python-streamlit-nightly-help-1.41.2.dev20241219-1.noarch.rpm
checksum_type: sha256
description:
  <br>

  <img src="https://user-images.githubusercontent.com/7164864/217935870-c0bc60a3-6fc0-4047-b011-7b4c59488c91.png" alt="Streamlit logo" style="margin-top:50px"></img>



  **A faster way to build and share data apps.**



  Streamlit lets you transform Python scripts into interactive web apps in minutes, instead of weeks. Build dashboards, generate reports, or create chat apps. Once you’ve created an app, you can use our [Community Cloud platform](https://streamlit.io/cloud) to deploy, manage, and share your app.



  - **Simple and Pythonic:** Write beautiful, easy-to-read code.
  - **Fast, interactive prototyping:** Let others interact with your data and provide feedback quickly.
  - **Live editing:** See your app update instantly as you edit your script.
  - **Open-source and free:** Join a vibrant community and contribute to Streamlit's future.



  Open a terminal and run:

  ```bash
  $ pip install streamlit
  $ streamlit hello
  ```

  If this opens our sweet _Streamlit Hello_ app in your browser, you're all set! If not, head over to [our docs](https://docs.streamlit.io/get-started) for specific installs.

  The app features a bunch of examples of what you can do with Streamlit. Jump to the [quickstart](#quickstart) section to understand how that all works.

  <img src="https://user-images.githubusercontent.com/7164864/217936487-1017784e-68ec-4e0d-a7f6-6b97525ddf88.gif" alt="Streamlit Hello" width=500 href="none"></img>





  Create a new file `streamlit_app.py` with the following code:
  ```python
  import streamlit as st
  x = st.slider("Select a value")
  st.write(x, "squared is", x * x)
  ```

  Now run it to open the app!
  ```
  $ streamlit run streamlit_app.py
  ```

  <img src="https://user-images.githubusercontent.com/7164864/215172915-cf087c56-e7ae-449a-83a4-b5fa0328d954.gif" width=300 alt="Little example"></img>



  Streamlit comes in with [a ton of additional powerful elements](https://docs.streamlit.io/develop/api-reference) to spice up your data apps and delight your viewers. Some examples:

  <table border="0">
    <tr>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/widgets">
          <img src="https://user-images.githubusercontent.com/7164864/217936099-12c16f8c-7fe4-44b1-889a-1ac9ee6a1b44.png" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/data/st.dataframe">
          <img src="https://user-images.githubusercontent.com/7164864/215110064-5eb4e294-8f30-4933-9563-0275230e52b5.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/charts">
          <img src="https://user-images.githubusercontent.com/7164864/215174472-bca8a0d7-cf4b-4268-9c3b-8c03dad50bcd.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/api-reference/layout">
          <img src="https://user-images.githubusercontent.com/7164864/217936149-a35c35be-0d96-4c63-8c6a-1c4b52aa8f60.png" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://docs.streamlit.io/develop/concepts/multipage-apps">
          <img src="https://user-images.githubusercontent.com/7164864/215173883-eae0de69-7c1d-4d78-97d0-3bc1ab865e5b.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
      <td>
        <a target="_blank" href="https://streamlit.io/gallery">
          <img src="https://user-images.githubusercontent.com/7164864/215109229-6ae9111f-e5c1-4f0b-b3a2-87a79268ccc9.gif" style="max-height:150px; width:auto; display:block;">
        </a>
      </td>
    </tr>
    <tr>
      <td>Input widgets</td>
      <td>Dataframes</td>
      <td>Charts</td>
      <td>Layout</td>
      <td>Multi-page apps</td>
      <td>Fun</td>
    </tr>
  </table>


  Our vibrant creators community also extends Streamlit capabilities using  🧩 [Streamlit Components](https://streamlit.io/components).



  There's so much you can build with Streamlit:
  - 🤖  [LLMs & chatbot apps](https://streamlit.io/gallery?category=llms)
  - 🧬  [Science & technology apps](https://streamlit.io/gallery?category=science-technology)
  - 💬  [NLP & language apps](https://streamlit.io/gallery?category=nlp-language)
  - 🏦  [Finance & business apps](https://streamlit.io/gallery?category=finance-business)
  - 🗺  [Geography & society apps](https://streamlit.io/gallery?category=geography-society)
  - and more!

  **Check out [our gallery!](https://streamlit.io/gallery)** 🎈



  Deploy, manage and share your apps for free using our [Community Cloud](https://streamlit.io/cloud)! Sign-up [here](https://share.streamlit.io/signup). <br><br>
  <img src="https://user-images.githubusercontent.com/7164864/214965336-64500db3-0d79-4a20-8052-2dda883902d2.gif" width="400"></img>


  - Explore our [docs](https://docs.streamlit.io) to learn how Streamlit works.
  - Ask questions and get help in our [community forum](https://discuss.streamlit.io).
  - Read our [blog](https://blog.streamlit.io) for tips from developers and creators.
  - Extend Streamlit's capabilities by installing or creating your own [Streamlit Components](https://streamlit.io/components).
  - Help others find and play with your app by using the Streamlit GitHub badge in your repository:
  ```markdown
  [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](URL_TO_YOUR_APP)
  ```
  [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/streamlit/roadmap)


  🎉 Thanks for your interest in helping improve Streamlit! 🎉

  Before contributing, please read our guidelines here: https://github.com/streamlit/streamlit/wiki/Contributing

  As with most projects, prior to starting to code on a bug fix or feature request, please post in the respective Github issue saying you want to volunteer and then wait for a positive response. Ff there is no issue for it yet, create one first.

  This helps make sure (1) two people aren't working on the same thing, (2) this is something Streamlit's maintainers believe should be implemented/fixed, (3) any API, UI, or deeper architectural changes that need to be implemented have been fully thought through by the community together with Streamlit's maintainers.



  Streamlit is completely free and open-source and licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license.


pkgId: af9783cd11fa2a5e4a98f5245bb178c9e0ee15b820d966af97127ae0a917ca8e
name: python-streamlit-passwordless-help
arch: noarch
version: 0.10.0
epoch: 0
release: 1
summary: Development documents and examples for streamlit-passwordless
url: https://pypi.org/project/streamlit-passwordless/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-passwordless-0.10.0-1.src.rpm
location_href: Packages/python-streamlit-passwordless-help-0.10.0-1.noarch.rpm
checksum_type: sha256
description:
  |PyPI| |conda-forge| |conda-forge-platform| |Python| |LICENSE|
  streamlit-passwordless provides a user model for Streamlit applications based on the Bitwarden
  passwordless technology. It allows users to securely authenticate with a Streamlit application
  using the passkey FIDO2 and WebAuthn protocols.
  The project is under development and not yet ready for production. The library can handle
  registering a new user by creating and registring a passkey with the user's device and
  letting the user sign in with the passkey. The user model is not fully implemented yet.
  A demo of the project is available at: https://passwordless.streamlit.app

rpm_license:
  MIT License  Copyright (c) 2023 Anton Lydell  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: 4de92290fc02f95d3b2dea2107ebcc4754b81d4d2e2e20d08fb2a5a7d9e60188
name: python-streamlit-slb-video-image-gallery-help
arch: noarch
version: 1.0.7
epoch: 0
release: 1
summary: Development documents and examples for streamlit-slb-video-image-gallery
url: https://pypi.org/project/streamlit-slb-video-image-gallery/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-slb-video-image-gallery-1.0.7-1.src.rpm
location_href: Packages/python-streamlit-slb-video-image-gallery-help-1.0.7-1.noarch.rpm
checksum_type: sha256
description:
  Streamlit component that allows user to display image and video gallery



  ```sh
  pip install streamlit_slb_video_image_gallery
  ```



  1.0.1

  - Initial Release

  1.0.2

  - Add video viewing features

  1.0.3

  - Add image lazy loading

  1.0.4

  - Fix card css

  1.0.5

  - Add environment condition

  1.0.6

  - Fix css

  1.0.7

  - Fix css 2


pkgId: dd13408c0a3d9caa6e8bf1694cc9d0dba0618ddd4d7c7a9f5923e4dd3c99074a
name: python-streamlit-sql-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for streamlit-sql
url: https://pypi.org/project/streamlit-sql/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-sql-0.2.0-1.src.rpm
location_href: Packages/python-streamlit-sql-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  This package shows a CRUD frontend to a database using sqlalchemy in a streamlit app. With just one line of code, show the data as table and allow the user to **read, filter, update, create and delete rows** with many useful features.



  See the package in action [here](https://example-crud.streamlit.app/).





  - Display as a regular st.dataframe
  - Add pagination, displaying only a set of rows each time
  - Display the string representation of a ForeignKey column (Using __str__ method), instead of its id number
  - Set the dataframe to be displayed using standard sqlalchemy select statement, where you can JOIN, ORDER BY, WHERE, etc.
  - Add a column to show the rolling sum of a numeric column



  - Filter the data by some columns before presenting the table.
  - Let users filter the columns by selecting conditions in the filter expander
  - Give possible candidates when filtering using existing values for the columns
  - Let users select ForeignKey's values using the string representation of the foreign table, instead of its id number



  - Users create new rows with a dialog opened by clicking the create button
  - Users update rows with a dialog opened by clicking on desired row
  - Text columns offers candidates from existing values
  - ForeignKey columns are added by the string representation instead of its id number
  - Hide columns to fill by offering default values
  - Delete button in the UPDATE field



  All the requirements you should probably have anyway.

  1. streamlit and sqlalchemy
  2. Sqlalchemy models needs a __str__ method
  2. Id column should be called "id"
  3. Relationships should be added for all ForeignKey columns




  Install the package using pip:

  ```bash
  pip install streamlit_sql
  ```

  Define a ModelOpts and add it to the argument of *show_sql_ui* function:

  ```python
  from streamlit_sql import show_sql_ui
  from sqlalchemy import select

  conn = st.connection("sql", url="<db_url>")

  stmt = (
      select(
          db.Invoice.id,
          db.Invoice.Date,
          db.Invoice.amount,
          db.Client.name,
      )
      .join(db.Client)
      .where(db.Invoice.amount > 1000)
      .order_by(db.Invoice.date)
  )

  show_sql_ui(conn=conn,
              read_instance=stmt,
              edit_create_model=db.Invoice,
              available_filter=["name"],
              rolling_total_column="amount",
  )

  show_sql_ui(conn, model_opts)
  ```




  You can adjust the CRUD interface by the select statement you provide to *read_instance* arg and giving optional arguments to the *show_sql_ui* function. See the docstring for more information or at [documentation webpage](https://edkedk99.github.io/streamlit_sql/api/#streamlit_sql.show_sql_ui):




  You can display just a create or update/delete form without the read interface using functions *show_updade*, and *show_create*.


pkgId: 7a0f9edaeae2c02686dc65d8b32405d38eb0657647a48d6d83178bd437938c07
name: python-streamlit-theme-provider-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for streamlit-theme-provider
url: https://pypi.org/project/streamlit-theme-provider/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamlit-theme-provider-0.1.0-1.src.rpm
location_href: Packages/python-streamlit-theme-provider-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  Streamlit component that allows you to get the current theme.



  ```sh
  pip install streamlit-theme-provider
  ```



  value will be a dictionary containing the current theme settings.

  ```python
  import streamlit as st

  from streamlit_theme_provider import streamlit_theme_provider

  value = streamlit_theme_provider()

  st.write(value)


pkgId: 460927250f794b64325fb2a539862165e4336f4916a40cbee5ce58e8d1670d15
name: python-streamsnapper-help
arch: noarch
version: 0.2.5
epoch: 0
release: 1
summary: Development documents and examples for streamsnapper
url: https://github.com/henrique-coder/streamsnapper
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamsnapper-0.2.5-1.src.rpm
location_href: Packages/python-streamsnapper-help-0.2.5-1.noarch.rpm
checksum_type: sha256
description:
  StreamSnapper is an intuitive library designed to simplify, enhance, and organize media downloads from a variety of audiovisual platforms. It offers efficient, high-speed media extraction with optional tools for extracting data from these platforms.

  ![PyPI - Version](https://img.shields.io/pypi/v/streamsnapper?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/streamsnapper?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)
  ![PyPI - Code Style](https://img.shields.io/badge/code%20style-ruff-blue?style=flat&logo=ruff&logoColor=blue&color=blue&link=https://github.com/astral-sh/ruff)
  ![PyPI - Format](https://img.shields.io/pypi/format/streamsnapper?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)
  ![PyPI - Python Compatible Versions](https://img.shields.io/pypi/pyversions/streamsnapper?style=flat&logo=python&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)



  ```bash
  pip install -U streamsnapper  # It does not have any features by default, but it can be extended with optional features
  pip install -U streamsnapper[downloader]  # It has the feature of downloading online content with support for multiple simultaneous connections
  pip install -U streamsnapper[merger]  # It has the feature of merging video files with audio files using FFmpeg (currently it does not need any dependencies)
  pip install -U streamsnapper[youtube]  # It has advanced features to extract data from YouTube, with support for several other features
  pip install -U streamsnapper[all]  # It has all features available at once
  ```





  ```python
  from streamsnapper import Downloader
  from pathlib import Path  # Optional



  downloader = Downloader(
      
      max_connections='auto',  # The maximum number of connections to use for downloading the file. (default: 'auto')
      connection_speed='auto',  # The connection speed in Mbps. If 'auto', the connection speed will be set to 80 Mbps. (default: 'auto')
      overwrite=True,  # Overwrite the file if it already exists. Otherwise, a "_1", "_2", etc. suffix will be added. (default: True)
      show_progress_bar=True,  # Show or hide the download progress bar. (default: True)
      headers=None,  # Custom headers to include in the request. If None, default headers will be used. (default: None)
      timeout=None  # Timeout in seconds for the download process. Or None for no timeout. (default: None)
  )





  downloader.download(
      url='https://example.com/file',  # The download URL to download the file from. (required)
      output_path=Path.cwd()  # The path to save the downloaded file to. If the path is a directory, the file name will be generated from the server response. If the path is a file, the file will be saved with the provided name. If not provided, the file will be saved to the current working directory. (default: Path.cwd())
  )



  ```



  ```python
  from streamsnapper import Merger



  merger = Merger(
      
      logging=False  # Enable or disable FFmpeg logging. (default: False)
  )


  merger.merge(
      video_path='path/to/video',  # The path to the video file to merge. (required)
      audio_path='path/to/audio',  # The path to the audio file to merge. (required)
      output_path='path/to/output',  # The path to save the output file to. (required)
      ffmpeg_path='local'  # The path to the FFmpeg executable. If 'local', the FFmpeg executable will be searched in the PATH environment variable. (default: 'local')
  )



  ```



  ```python
  from streamsnapper import YouTube
  from pathlib import Path  # Optional



  youtube = YouTube(
      
      logging=False  # Enable or disable logging for the YouTube class. Defaults to False. (default: False)
  )





  youtube.extract(
      url=None,  # The YouTube video URL to extract data from. (default: None)
      ytdlp_data=None  # The previously extracted yt-dlp data. (default: None)
  )


  youtube.analyze(
      check_thumbnails=False,  # Check if all video thumbnails are available. (default: False)
      retrieve_dislike_count=False  # Retrieve the dislike count from the returnyoutubedislike.com API. (default: False)
  )


  youtube.analyze_video_streams(
      preferred_quality='all'  # The preferred quality of the video stream. If a specific quality is provided, the stream will be selected according to the chosen quality, however if the quality is not available, the best quality will be selected. If 'all', all streams will be considered and sorted by quality. (default: 'all')
  )


  youtube.analyze_audio_streams(
      preferred_language='local'  # The preferred language for the audio stream. If 'source', use the original audio language. If 'local', use the system language. If 'all', return all available audio streams. (default: 'local')
  )


  youtube.analyze_subtitle_streams()





  youtube.download(
      video_stream=None,  # The video stream generated by .analyze_video_streams(). (default: None)
      audio_stream=None,  # The audio stream generated by .analyze_audio_streams(). (default: None)
      output_path=Path.cwd(),  # The output path to save the downloaded video and/or audio to. If a directory is provided, the file name will be generated based on the video title and ID, like 'title - [id].extension'. If a file is provided, the file will be saved with the provided name. (default: Path.cwd())
      ffmpeg_path='local',  # The path to the ffmpeg executable. If 'local', the ffmpeg executable will be searched in the PATH environment variable. (default: 'local')
      show_progress_bar=True,  # Show or hide the download progress bar. (default: True)
      timeout=None,  # Timeout in seconds for the download process. Or None for no timeout. (default: None)
      logging=False  # Enable or disable ffmpeg logging. (default: False)
  )  # --> Returns the Path object of the finished file.


  from streamsnapper import YouTubeExtractor



  youtube_extractor = YouTubeExtractor(
      
  )


  youtube_extractor.identify_platform(
      url='https://music.youtube.com/watch?v=***********'  # The URL to identify the platform from. (required)
  )  # --> Returns 'youtube' if the URL corresponds to YouTube, 'youtubeMusic' if it corresponds to YouTube Music. Returns None if the platform is not recognized.


  youtube_extractor.extract_video_id(
      url='https://www.youtube.com/watch?v=***********'  # The URL to extract the video ID from. (required)
  )  # --> Returns the extracted video ID. If no video ID is found, return None.


  youtube_extractor.extract_playlist_id(
      url='https://www.youtube.com/playlist?list=**********************************',  # The URL to extract the playlist ID from. (required)
      include_private=False  # Whether to include private playlists, like the mixes YouTube makes for you. (default: False)
  )  # --> Returns the extracted playlist ID. If no playlist ID is found or the playlist is private and include_private is False, return None.


  youtube_extractor.search(
      query='A cool music name',  # The search query string. (required)
      sort_by='relevance',  # The sorting method to use for the search results. Options are 'relevance', 'upload_date', 'view_count', and 'rating'. (default: 'relevance')
      results_type='video',  # The type of content to search for. Options are 'video', 'channel', 'playlist', and 'movie'. (default: 'video')
      limit=1  # The maximum number of video URLs to return. (default: 1)
  )  # --> Returns a list of video URLs from the search results. If no videos are found, returns None.


  youtube_extractor.get_playlist_videos(
      url='https://www.youtube.com/playlist?list=**********************************',  # The URL of the YouTube playlist. (required)
      limit=None  # The maximum number of video URLs to return. If None, return all video URLs. (default: None)
  )  # --> Returns a list of video URLs from the playlist. If no videos are found or the playlist is private, return None.




  youtube_extractor.get_channel_videos(
      channel_id='************************',  # The ID of the YouTube channel. (default: None)
      channel_url='https://www.youtube.com/@********',  # The URL of the YouTube channel. (default: None)
      channel_username='********',  # The username of the YouTube channel. (default: None)
      sort_by='newest',  # The sorting method to use for the channel videos. Options are 'newest', 'oldest', and 'popular' (default: 'newest').
      content_type='videos',  # The type of content to search for. Options are 'videos', 'shorts', and 'streams' (default: 'videos').
      limit=None  # The maximum number of video URLs to return. If None, return all video URLs. (default: None)
  )  # --> Returns a list of video URLs from the channel. If no videos are found or the channel is non-existent, return None.



  ```



  Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

  If you have a suggestion that would make this better, fork the repository and create a pull request. You can also simply open an issue and describe your ideas or report bugs. **Don't forget to give the project a star if you like it!**

  1. Fork the project;
  2. Create your feature branch ・ `git checkout -b feature/{feature_name}`;
  3. Commit your changes ・ `git commit -m "{commit_message}"`;
  4. Push to the branch ・ `git push origin feature/{feature_name}`;
  5. Open a pull request, describing the changes you made and wait for a review.



  Please note that downloading copyrighted content from some media services may be illegal in your country. This tool is designed for educational purposes only. Use at your own risk.


pkgId: 298738002c78fb6e4ed78f2c12dd8b550c21d0bb50f30f39c38b5141d83f67c7
name: python-streamsnapper-help
arch: noarch
version: 0.2.6
epoch: 0
release: 1
summary: Development documents and examples for streamsnapper
url: https://github.com/henrique-coder/streamsnapper
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streamsnapper-0.2.6-1.src.rpm
location_href: Packages/python-streamsnapper-help-0.2.6-1.noarch.rpm
checksum_type: sha256
description:
  StreamSnapper is an intuitive library designed to simplify, enhance, and organize media downloads from a variety of audiovisual platforms. It offers efficient, high-speed media extraction with optional tools for extracting data from these platforms.

  ![PyPI - Version](https://img.shields.io/pypi/v/streamsnapper?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/streamsnapper?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)
  ![PyPI - Code Style](https://img.shields.io/badge/code%20style-ruff-blue?style=flat&logo=ruff&logoColor=blue&color=blue&link=https://github.com/astral-sh/ruff)
  ![PyPI - Format](https://img.shields.io/pypi/format/streamsnapper?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)
  ![PyPI - Python Compatible Versions](https://img.shields.io/pypi/pyversions/streamsnapper?style=flat&logo=python&logoColor=blue&color=blue&link=https://pypi.org/project/streamsnapper)



  ```bash
  pip install -U streamsnapper  # It does not have any features by default, but it can be extended with optional features
  pip install -U streamsnapper[merger]  # It has the feature of merging video files with audio files using FFmpeg (currently it does not need any dependencies)
  pip install -U streamsnapper[youtube]  # It has advanced features to extract data from YouTube, with support for several other features
  pip install -U streamsnapper[all]  # It has all features available at once
  ```





  ```python
  from streamsnapper import Merger



  merger = Merger(
      
      logging=False  # Enable or disable FFmpeg logging. (default: False)
  )


  merger.merge(
      video_path='path/to/video',  # The path to the video file to merge. (required)
      audio_path='path/to/audio',  # The path to the audio file to merge. (required)
      output_path='path/to/output',  # The path to save the output file to. (required)
      ffmpeg_path='local'  # The path to the FFmpeg executable. If 'local', the FFmpeg executable will be searched in the PATH environment variable. (default: 'local')
  )



  ```



  ```python
  from streamsnapper import YouTube
  from pathlib import Path  # Optional



  youtube = YouTube(
      
      logging=False  # Enable or disable logging for the YouTube class. Defaults to False. (default: False)
  )





  youtube.extract(
      url=None,  # The YouTube video URL to extract data from. (default: None)
      ytdlp_data=None  # The previously extracted yt-dlp data. (default: None)
  )


  youtube.analyze(
      check_thumbnails=False,  # Check if all video thumbnails are available. (default: False)
      retrieve_dislike_count=False  # Retrieve the dislike count from the returnyoutubedislike.com API. (default: False)
  )


  youtube.analyze_video_streams(
      preferred_quality='all'  # The preferred quality of the video stream. If a specific quality is provided, the stream will be selected according to the chosen quality, however if the quality is not available, the best quality will be selected. If 'all', all streams will be considered and sorted by quality. (default: 'all')
  )


  youtube.analyze_audio_streams(
      preferred_language='local'  # The preferred language for the audio stream. If 'source', use the original audio language. If 'local', use the system language. If 'all', return all available audio streams. (default: 'local')
  )


  youtube.analyze_subtitle_streams()





  youtube.download(
      video_stream=None,  # The video stream generated by .analyze_video_streams(). (default: None)
      audio_stream=None,  # The audio stream generated by .analyze_audio_streams(). (default: None)
      output_path=Path.cwd(),  # The output path to save the downloaded video and/or audio to. If a directory is provided, the file name will be generated based on the video title and ID, like 'title - [id].extension'. If a file is provided, the file will be saved with the provided name. (default: Path.cwd())
      ffmpeg_path='local',  # The path to the ffmpeg executable. If 'local', the ffmpeg executable will be searched in the PATH environment variable. (default: 'local')
      max_connections='auto',  # The maximum number of connections to use for downloading the file. (default: 'auto')
      connection_speed=80,  # The connection speed in Mbps. (default: 80)
      overwrite=True,  # Overwrite the file if it already exists. Otherwise, a "_1", "_2", etc. suffix will be added. (default: True)
      show_progress_bar=True,  # Show or hide the download progress bar. (default: True)
      timeout=None,  # Timeout in seconds for the download process. Or None for no timeout. (default: None)
      logging=False  # Enable or disable ffmpeg logging. (default: False)
  )  # --> Returns the Path object of the finished file.


  from streamsnapper import YouTubeExtractor



  youtube_extractor = YouTubeExtractor(
      
  )


  youtube_extractor.identify_platform(
      url='https://music.youtube.com/watch?v=***********'  # The URL to identify the platform from. (required)
  )  # --> Returns 'youtube' if the URL corresponds to YouTube, 'youtubeMusic' if it corresponds to YouTube Music. Returns None if the platform is not recognized.


  youtube_extractor.extract_video_id(
      url='https://www.youtube.com/watch?v=***********'  # The URL to extract the video ID from. (required)
  )  # --> Returns the extracted video ID. If no video ID is found, return None.


  youtube_extractor.extract_playlist_id(
      url='https://www.youtube.com/playlist?list=**********************************',  # The URL to extract the playlist ID from. (required)
      include_private=False  # Whether to include private playlists, like the mixes YouTube makes for you. (default: False)
  )  # --> Returns the extracted playlist ID. If no playlist ID is found or the playlist is private and include_private is False, return None.


  youtube_extractor.search(
      query='A cool music name',  # The search query string. (required)
      sort_by='relevance',  # The sorting method to use for the search results. Options are 'relevance', 'upload_date', 'view_count', and 'rating'. (default: 'relevance')
      results_type='video',  # The type of content to search for. Options are 'video', 'channel', 'playlist', and 'movie'. (default: 'video')
      limit=1  # The maximum number of video URLs to return. (default: 1)
  )  # --> Returns a list of video URLs from the search results. If no videos are found, returns None.


  youtube_extractor.get_playlist_videos(
      url='https://www.youtube.com/playlist?list=**********************************',  # The URL of the YouTube playlist. (required)
      limit=None  # The maximum number of video URLs to return. If None, return all video URLs. (default: None)
  )  # --> Returns a list of video URLs from the playlist. If no videos are found or the playlist is private, return None.




  youtube_extractor.get_channel_videos(
      channel_id='************************',  # The ID of the YouTube channel. (default: None)
      channel_url='https://www.youtube.com/@********',  # The URL of the YouTube channel. (default: None)
      channel_username='********',  # The username of the YouTube channel. (default: None)
      sort_by='newest',  # The sorting method to use for the channel videos. Options are 'newest', 'oldest', and 'popular' (default: 'newest').
      content_type='videos',  # The type of content to search for. Options are 'videos', 'shorts', and 'streams' (default: 'videos').
      limit=None  # The maximum number of video URLs to return. If None, return all video URLs. (default: None)
  )  # --> Returns a list of video URLs from the channel. If no videos are found or the channel is non-existent, return None.



  ```



  Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

  If you have a suggestion that would make this better, fork the repository and create a pull request. You can also simply open an issue and describe your ideas or report bugs. **Don't forget to give the project a star if you like it!**

  1. Fork the project;
  2. Create your feature branch ・ `git checkout -b feature/{feature_name}`;
  3. Commit your changes ・ `git commit -m "{commit_message}"`;
  4. Push to the branch ・ `git push origin feature/{feature_name}`;
  5. Open a pull request, describing the changes you made and wait for a review.



  Please note that downloading copyrighted content from some media services may be illegal in your country. This tool is designed for educational purposes only. Use at your own risk.


pkgId: 3539ef70e7dd70f9dc73878e62853cc64cfe677ea8d2749e93513cc9e15a1032
name: python-streetscapes-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for streetscapes
url: https://pypi.org/project/streetscapes/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-streetscapes-0.2.0-1.src.rpm
location_href: Packages/python-streetscapes-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14283584.svg)](https://doi.org/10.5281/zenodo.14283533)
  [![PyPI - Version](https://img.shields.io/pypi/v/streetscapes)](https://pypi.org/project/streetscapes/)
  [![Research Software Directory](https://img.shields.io/badge/RSD-streetscapes-00a3e3)](https://research-software-directory.org/software/streetscapes)
  [![Read The Docs](https://readthedocs.org/projects/streetscapes/badge/?version=latest)](https://streetscapes.readthedocs.io/en/latest/)



  Streetscapes is a project within a project. The aim of the parent project ([Urban-M4](https://github.com/Urban-M4)) is to model the Urban Heat Island effect with the help of various software tools. As part of the `Urban-M4` ecosystem, Streetscapes provides a streamlined API for downloading, segmenting and analysing street view imagery (SVI). Specifically, the analysis is geared towards evaluating the properties of individual objects in the images (such as buildings, roads and sidewalks) that could help estimate the amount of heat trapped in urban environments. Streetscapes is based on and builds upon the results of the [Global Streetscapes](https://ual.sg/project/global-streetscapes/) project.

  This repository contains information and code for downloading, segmenting and analysing images from Mapillary and KartaView, using information from [global-streetscapes](https://github.com/ualsg/global-streetscapes/tree/main) dataset.

  For more information, plese refer to the [documentation](https://streetscapes.readthedocs.io/en/latest/).



  Use [venv](https://docs.python.org/3/library/venv.html), [virtualenv](https://virtualenv.pypa.io/en/stable/) or a wrapper such as [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) to create a virtual environment. A barebones `environment.yml` file is provided for convenience in case you prefer to use [Conda](https://anaconda.org/) or [Mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html), but please note that all dependencies are installed by `pip` from `PyPI`.

  Some of the dependencies in `pyproject.toml` are there in anticipation for replicating and extending the pipelines in the original `global-streetscapes` repository, specifically the training pipeline (currently work in progress).



  The `streetscapes` package can be installed from PyPI:

  ```shell
  pip install streetscapes
  ```

  Alternatively, `streetscapes` can be installed by cloning the repository and installing the package locally with `pip`:

  ```shell
  git clone git@github.com:Urban-M4/streetscapes.git
  cd streetscapes
  pip install -e .
  ```

  ⚠️ Installing `streetscapes` is necessary in order to run any of the example notebooks.

  ⚠️ If one or more dependencies fail to install, check the Python version - it might be too _new_. While `streetscapes` itself specifies only the _minimal_ required Python verion, some dependencies might be slow to make releases for the latest Python version.



  To facilitate the use of `streetscapes` for different local setups, some environment variables can be added to an `.env` file in the root directory of the `streetscapes` repository.

  | Variable                  | Description                                                                                                                                            |
  | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | `MAPILLARY_TOKEN`         | A Mapillary token string used for authentication when querying Mapillary via their API. Only needed if you are using imagery from Mapillary.           |
  | `STREETSCAPES_DATA_DIR`   | A directory containing data from the `global-streetscapes` projects, such as CSV files (cf. below). Defaults to `<repo-root>/local/streetscapes-data`. |
  | `STREETSCAPES_OUTPUT_DIR` | A directory for output files. Defaults to `<repo-root>/local/output`.                                                                                  |
  | `STREETSCAPES_LOG_LEVEL`  | The global log level. Defaults to `INFO`.                                                                                                              |

  The `.gitignore` file already contains entries for `.env` and `local/`, so they will never be committed.





  ⚠️ To work on the documentation locally, please install `streetscapes` with the `dev` optional dependencies:

  ```shell
  pip install streetscapes[dev]
  ```

  or, if installing from source,

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



  The `streetscapes` project documentation is based on [MkDocs](https://www.mkdocs.org/). To compile the documentation, run `mkdocs build` from the `docs` directory:

  ```shell
  cd docs
  mkdocs build
  ```

  The documentation can then be viewed locally by starting the `MkDocs` server (again, from the `docs` directory):

  ```shell
  mkdocs serve
  ```

  This will start an HTTP server which can be accessed by visiting `http://127.0.0.1:8000` in a browser.

  If building and serving the documentation from a different directory, the location of the `mkdocs.yml` file relative to the current working directory must be specified explicitly. For instance, if running from the root directory of the repository:

  ```shell
  mkdocs build -f docs/mkdocs.yml
  mkdocs serve -f docs/mkdocs.yml
  ```



  Streetscapes provides a command-line interface (CLI) that exposes some of the internal functions. To get the list of available commands, run the CLI with the `--help` switch:

  ```shell
  streetscapes --help

  Usage: streetscapes [OPTIONS] COMMAND [ARGS]...

  Options:
    --help  Show this message and exit.

  Commands:
    convert
    download
  ```

  For instance, CSV files from the `global-streetscapes` project can be converted into `parquet` format with the CLI as follows:

  ```shell
  streetscapes convert
  ```

  ⚠️ Don't forget to [set up your environment variables](#environment-variables) if using the CLI.

  The `convert_csv_to_parquet` function inside `streetscapes.functions` contains the code for reproducing the merged `streetscapes-data.parquet` dataset. This function expects a directory containing several CSV files, which can be downloaded from [Huggingface](https://huggingface.co/datasets/NUS-UAL/global-streetscapes/tree/main/data). The code looks for these csv files in the supplied directory, which defaults to `./local/streetscapes-data` but can be changed with the `-d` switch (cf. `streetscapes convert --help`). Nonexistent directories are created automatically.

  To limit the size of the archive, the dataset currently combines the following CSV files:

  - `contextual.csv`
  - `metadata_common_attributes.csv`
  - `segmentation.csv`
  - `simplemaps.csv`

  It is possible to combine more CSV files if needed.

  More CLI commands will be added as the codebase grows.



  If you want to contribute to the development of streetscapes,
  have a look at the [contribution guidelines](CONTRIBUTING.md).



  `streetscapes` is licensed under [`CC-BY-SA-4.0`](https://creativecommons.org/licenses/by-sa/4.0/deed.en).



  This repository uses the data and work from the [Global Streetscapes](https://ual.sg/project/global-streetscapes/) project.

  > [1] Hou Y, Quintana M, Khomiakov M, Yap W, Ouyang J, Ito K, Wang Z, Zhao T, Biljecki F (2024): Global Streetscapes — A comprehensive dataset of 10 million street-level images across 688 cities for urban science and analytics. ISPRS Journal of Photogrammetry and Remote Sensing 215: 216-238. doi:[10.1016/j.isprsjprs.2024.06.023](https://doi.org/10.1016/j.isprsjprs.2024.06.023)

  The `streetscapes` package can be cited using the supplied [citation information](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files). For reproducibility, you can also cite a specific version by finding the corresponding DOI on [Zenodo](https://zenodo.org/records/14287547).

rpm_license:
  Attribution-ShareAlike 4.0 International  =======================================================================  Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.  Using Creative Commons Public Licenses  Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.  Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors  Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public: wiki.creativecommons.org/Considerations_for_licensees  =======================================================================  Creative Commons Attribution-ShareAlike 4.0 International Public License  By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.   Section 1 -- Definitions.  a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.  b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.  c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.  d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.  e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.  f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.  g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.  h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.  i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.  j. Licensor means the individual(s) or entity(ies) granting rights under this Public License.  k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.  l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.  m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.   Section 2 -- Scope.  a. License grant.  1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:  a. reproduce and Share the Licensed Material, in whole or in part; and  b. produce, reproduce, and Share Adapted Material.  2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.  3. Term. The term of this Public License is specified in Section 6(a).  4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material.  5. Downstream recipients.  a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.  b. Additional offer from the Licensor -- Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply.  c. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.  6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).  b. Other rights.  1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.  2. Patent and trademark rights are not licensed under this Public License.  3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.   Section 3 -- License Conditions.  Your exercise of the Licensed Rights is expressly made subject to the following conditions.  a. Attribution.  1. If You Share the Licensed Material (including in modified form), You must:  a. retain the following if it is supplied by the Licensor with the Licensed Material:  i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);  ii. a copyright notice;  iii. a notice that refers to this Public License;  iv. a notice that refers to the disclaimer of warranties;  v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;  b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and  c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.  2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.  3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.  b. ShareAlike.  In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.  1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.  2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.  3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.   Section 4 -- Sui Generis Database Rights.  Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:  a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;  b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and  c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.  For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.   Section 5 -- Disclaimer of Warranties and Limitation of Liability.  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.  c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.   Section 6 -- Term and Termination.  a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.  b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:  1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or  2. upon express reinstatement by the Licensor.  For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.  c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.   Section 7 -- Other Terms and Conditions.  a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.  b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.   Section 8 -- Interpretation.  a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.  b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.  c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.  d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.   =======================================================================  Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.  Creative Commons may be contacted at creativecommons.org.


pkgId: d6d55965262cc1a7a0b6f4c5b8537f75f33a20e963a6543f88921d66a12398f8
name: python-stremthru-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for stremthru
url: https://pypi.org/project/stremthru/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stremthru-0.2.0-1.src.rpm
location_href: Packages/python-stremthru-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  [![GitHub Workflow Status: CI [SDK/PY]](https://img.shields.io/github/actions/workflow/status/MunifTanjim/stremthru/ci-sdk-py.yml?branch=main&label=CI%20%5BSDK%2FPY%5D&style=for-the-badge)](https://github.com/MunifTanjim/stremthru/actions/workflows/ci-sdk-py.yml)
  [![License](https://img.shields.io/github/license/MunifTanjim/stremthru?style=for-the-badge)](https://github.com/MunifTanjim/stremthru/blob/main/sdk/py/LICENSE)





  ```sh
  pip install stremthru

  poetry add stremthru
  ```



  **Basic Usage:**

  ```py
  from stremthru import StremThru;

  st = StremThru(base_url="http://127.0.0.1:8080", auth="user:pass")
  ```



  Licensed under the MIT License. Check the [LICENSE](./LICENSE) file for details.


pkgId: 7e3453de16d9a8d8bb9f70df1b657eeea1d4c70020c539e53f2303f46dfd86c6
name: python-strideutils-help
arch: noarch
version: 0.8.6
epoch: 0
release: 1
summary: Development documents and examples for strideutils
url: https://pypi.org/project/strideutils/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strideutils-0.8.6-1.src.rpm
location_href: Packages/python-strideutils-help-0.8.6-1.noarch.rpm
checksum_type: sha256
description:
  Strideutils contains common patterns for cosmos api requests, monitoring, and other integrations for gsheets, slack, and twilio.



  In a virtual environment of your choice install strideutils.

  ```
  pip install strideutils
  ```

  with poetry

  ```
  poetry add strideutils
  ```

  This package is frequently updated, so keep that in mind while developing.



  Strideutils requires three different environment variables that can be added to `~/.zshrc` or `~/.bashrc`

  ```
  export STRIDEUTILS_CONFIG_PATH=
  export STRIDEUTILS_ENV_PATH=
  ```

  Examples of these files are included under strideutils/config_examples.
  Stride Labs employees can find config.yaml in launchpad and .env.local in lastpass. We recommend you place .env.local in your launchpad repo.

  Any configuration or secrets that aren't consumed don't need to be set. However if one is accessed but unset, an error will be thrown for easier debugging.

  Once strideutils is installed and configured, each module you need should be imported individually. This isolates the different secrets that are expected and consumed.

  Some common imports:

  ```python
  from strideutils.stride_config import config
  config.get_chain(name='osmosis')

  from strideutils import stride_requests
  stride_requests.request('https://google.com')

  from strideutils.stride_alerts import raise_alert
  ```



  TODO



  TODO



  TODO



  To access the strideutils repo locally rather than using the pip version (for actively making changes to strideutils and a dependency), add the path to strideutils to the beginning of PYTHONPATH

  ```python
  import sys
  sys.path = ['/path/to/strideutils/'] + sys.path
  ```

  Alternatively, you can install strideutils through local mode. However, please be warned that this will make your local Python environment _always_ use your local strideutils. This might lead to unexpected behavior if you local changes.

  To install in local mode, run the following:

  ```python
  pip3 install -e /Users/username/Documents/strideutils
  ```

  Confirm the location of where it's being imported from by printing the module.
  After making changes to strideutils, reload it before testing your application.

  ```python
  from importlib import reload
  reload(strideutils)
  ```

rpm_license:
  MIT License  Copyright (c) [year] [fullname]  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: 90cb9b2dc66998ac343d9b8542e6c74c5e1a6bf58d28c451d076a9cf2d7fd62f
name: python-stringzilla-debuginfo
arch: aarch64
version: 3.11.2
epoch: 0
release: 1
summary: Debug information for package python-stringzilla
url: https://github.com/ashvardanian/stringzilla
rpm_license: Apache-2.0
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-stringzilla-3.11.2-1.src.rpm
location_href: Packages/python-stringzilla-debuginfo-3.11.2-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug information for package python-stringzilla.
  Debug information is useful when developing applications that use this
  package or when debugging this package.


pkgId: 2cc1f0bb429f353e75e5a3dc4a254a5ed600a2e854d4172ad161eddd93e6e7e4
name: python-stringzilla-debugsource
arch: aarch64
version: 3.11.2
epoch: 0
release: 1
summary: Debug sources for package python-stringzilla
url: https://github.com/ashvardanian/stringzilla
rpm_license: Apache-2.0
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-stringzilla-3.11.2-1.src.rpm
location_href: Packages/python-stringzilla-debugsource-3.11.2-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug sources for package python-stringzilla.
  Debug sources are useful when developing applications that use this
  package or when debugging this package.


pkgId: 583b780a61cef661f783eb2f19e58ac4d55f35b4e465c7530dfa0b6456a45b33
name: python-stringzilla-help
arch: aarch64
version: 3.11.2
epoch: 0
release: 1
summary: Development documents and examples for stringzilla
url: https://github.com/ashvardanian/stringzilla
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-stringzilla-3.11.2-1.src.rpm
location_href: Packages/python-stringzilla-help-3.11.2-1.aarch64.rpm
checksum_type: sha256
description:
  ![StringZilla banner](https://github.com/ashvardanian/ashvardanian/blob/master/repositories/StringZilla.png?raw=true)

  The world wastes a minimum of $100M annually due to inefficient string operations.
  A typical codebase processes strings character by character, resulting in too many branches and data-dependencies, neglecting 90% of modern CPU's potential.
  LibC is different.
  It attempts to leverage SIMD instructions to boost some operations, and is often used by higher-level languages, runtimes, and databases.
  But it isn't perfect.
  1️⃣ First, even on common hardware, including over a billion 64-bit ARM CPUs, common functions like `strstr` and `memmem` only achieve 1/3 of the CPU's throughput.
  2️⃣ Second, SIMD coverage is inconsistent: acceleration in forward scans does not guarantee speed in the reverse-order search.
  3️⃣ At last, most high-level languages can't always use LibC, as the strings are often not NULL-terminated or may contain the Unicode "Zero" character in the middle of the string.
  That's why StringZilla was created.
  To provide predictably high performance, portable to any modern platform, operating system, and programming language.

  [![StringZilla Python installs](https://static.pepy.tech/personalized-badge/stringzilla?period=total&units=abbreviation&left_color=black&right_color=blue&left_text=StringZilla%20Python%20installs)](https://github.com/ashvardanian/stringzilla)
  [![StringZilla Rust installs](https://img.shields.io/crates/d/stringzilla?logo=rust&label=Rust%20installs)](https://crates.io/crates/stringzilla)
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ashvardanian/StringZilla/release.yml?branch=main&label=Ubuntu)](https://github.com/ashvardanian/StringZilla/actions/workflows/release.yml)
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ashvardanian/StringZilla/release.yml?branch=main&label=Windows)](https://github.com/ashvardanian/StringZilla/actions/workflows/release.yml)
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ashvardanian/StringZilla/release.yml?branch=main&label=MacOS)](https://github.com/ashvardanian/StringZilla/actions/workflows/release.yml)
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ashvardanian/StringZilla/release.yml?branch=main&label=Alpine%20Linux)](https://github.com/ashvardanian/StringZilla/actions/workflows/release.yml)
  ![StringZilla code size](https://img.shields.io/github/languages/code-size/ashvardanian/stringzilla)

  StringZilla is the GodZilla of string libraries, using [SIMD][faq-simd] and [SWAR][faq-swar] to accelerate string operations on modern CPUs.
  It is up to __10x faster than the default and even other SIMD-accelerated string libraries__ in C, C++, Python, and other languages, while covering broad functionality.
  It __accelerates exact and fuzzy string matching, edit distance computations, sorting, lazily-evaluated ranges to avoid memory allocations, and even random-string generators__.

  [faq-simd]: https://en.wikipedia.org/wiki/Single_instruction,_multiple_data
  [faq-swar]: https://en.wikipedia.org/wiki/SWAR

  - 🐂 __[C](#Basic-Usage-with-C-99-and-Newer) :__ Upgrade LibC's `<string.h>` to `<stringzilla.h>`  in C 99
  - 🐉 __[C++](#basic-usage-with-c-11-and-newer):__ Upgrade STL's `<string>` to `<stringzilla.hpp>` in C++ 11
  - 🐍 __[Python](#quick-start-python-🐍):__ Upgrade your `str` to faster `Str`
  - 🍎 __[Swift](#quick-start-swift-🍏):__ Use the `String+StringZilla` extension
  - 🦀 __[Rust](#quick-start-rust-🦀):__ Use the `StringZilla` traits crate
  - 🐚 __[Shell][faq-shell]__: Accelerate common CLI tools with `sz_` prefix
  - 📚 Researcher? Jump to [Algorithms & Design Decisions](#algorithms--design-decisions-📚)
  - 💡 Thinking to contribute? Look for ["good first issues"][first-issues]
  - 🤝 And check the [guide](https://github.com/ashvardanian/StringZilla/blob/main/CONTRIBUTING.md) to setup the environment
  - Want more bindings or features? Let [me](https://github.com/ashvardanian) know!

  [faq-shell]: https://github.com/ashvardanian/StringZilla/blob/main/cli/README.md
  [first-issues]: https://github.com/ashvardanian/StringZilla/issues

  __Who is this for?__

  - For data-engineers parsing large datasets, like the [CommonCrawl](https://commoncrawl.org/), [RedPajama](https://github.com/togethercomputer/RedPajama-Data), or [LAION](https://laion.ai/blog/laion-5b/).
  - For software engineers optimizing strings in their apps and services.
  - For bioinformaticians and search engineers looking for edit-distances for [USearch](https://github.com/unum-cloud/usearch).
  - For [DBMS][faq-dbms] devs, optimizing `LIKE`, `ORDER BY`, and `GROUP BY` operations.
  - For hardware designers, needing a SWAR baseline for strings-processing functionality.
  - For students studying SIMD/SWAR applications to non-data-parallel operations.

  [faq-dbms]: https://en.wikipedia.org/wiki/Database



  <table style="width: 100%; text-align: center; table-layout: fixed;">
    <colgroup>
      <col style="width: 25%;">
      <col style="width: 25%;">
      <col style="width: 25%;">
      <col style="width: 25%;">
    </colgroup>
    <tr>
      <th align="center">C</th>
      <th align="center">C++</th>
      <th align="center">Python</th>
      <th align="center">StringZilla</th>
    </tr>
    <!-- Substrings, normal order -->
    <tr>
      <td colspan="4" align="center">find the first occurrence of a random word from text, ≅ 5 bytes long</td>
    </tr>
    <tr>
      <td align="center">
        <code>strstr</code> <sup>1</sup><br/>
        <span style="color:#ABABAB;">x86:</span> <b>7.4</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>2.0</b> GB/s
      </td>
      <td align="center">
        <code>.find</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>2.9</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>1.6</b> GB/s
      </td>
      <td align="center">
        <code>.find</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>1.1</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>0.6</b> GB/s
      </td>
      <td align="center">
        <code>sz_find</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>10.6</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>7.1</b> GB/s
      </td>
    </tr>
    <!-- Substrings, reverse order -->
    <tr>
      <td colspan="4" align="center">find the last occurrence of a random word from text, ≅ 5 bytes long</td>
    </tr>
    <tr>
      <td align="center">⚪</td>
      <td align="center">
        <code>.rfind</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>0.5</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>0.4</b> GB/s
      </td>
      <td align="center">
        <code>.rfind</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>0.9</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>0.5</b> GB/s
      </td>
      <td align="center">
        <code>sz_rfind</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>10.8</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>6.7</b> GB/s
      </td>
    </tr>
    <!-- Characters, normal order -->
    <tr>
      <td colspan="4" align="center">split lines separated by <code>\n</code> or <code>\r</code> <sup>2</sup></td>
    </tr>
    <tr>
      <td align="center">
        <code>strcspn</code> <sup>1</sup><br/>
        <span style="color:#ABABAB;">x86:</span> <b>5.42</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>2.19</b> GB/s
      </td>
      <td align="center">
        <code>.find_first_of</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>0.59</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>0.46</b> GB/s
      </td>
      <td align="center">
        <code>re.finditer</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>0.06</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>0.02</b> GB/s
      </td>
      <td align="center">
        <code>sz_find_charset</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>4.08</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>3.22</b> GB/s
      </td>
    </tr>
    <!-- Characters, reverse order -->
    <tr>
      <td colspan="4" align="center">find the last occurrence of any of 6 whitespaces <sup>2</sup></td>
    </tr>
    <tr>
      <td align="center">⚪</td>
      <td align="center">
        <code>.find_last_of</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>0.25</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>0.25</b> GB/s
      </td>
      <td align="center">⚪</td>
      <td align="center">
        <code>sz_rfind_charset</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>0.43</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>0.23</b> GB/s
      </td>
    </tr>
    <!-- Random Generation -->
    <tr>
      <td colspan="4" align="center">Random string from a given alphabet, 20 bytes long <sup>5</sup></td>
    </tr>
    <tr>
      <td align="center">
        <code>rand() % n</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>18.0</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>9.4</b> MB/s
      </td>
      <td align="center">
        <code>std::uniform_int_distribution</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>47.2</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>20.4</b> MB/s
      </td>
      <td align="center">
        <code>join(random.choices(...))</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>13.3</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>5.9</b> MB/s
      </td>
      <td align="center">
        <code>sz_generate</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>56.2</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>25.8</b> MB/s
      </td>
    </tr>
    <!-- Mapping Characters with Look-Up Table Transforms -->
    <tr>
      <td colspan="4" align="center">Mapping Characters with Look-Up Table Transforms</td>
    </tr>
    <tr>
      <td align="center">⚪</td>
      <td align="center">
        <code>std::transform</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>3.81</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>2.65</b> GB/s
      </td>
      <td align="center">
        <code>str.translate</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>260.0</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>140.0</b> MB/s
      </td>
      <td align="center">
        <code>sz_look_up_transform</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>21.2</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>8.5</b> GB/s
      </td>
    </tr>
    <!-- Sorting -->
    <tr>
      <td colspan="4" align="center">Get sorted order, ≅ 8 million English words <sup>6</sup></td>
    </tr>
    <tr>
      <td align="center">
        <code>qsort_r</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>3.55</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>5.77</b> s
      </td>
      <td align="center">
        <code>std::sort</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>2.79</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>4.02</b> s
      </td>
      <td align="center">
        <code>numpy.argsort</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>7.58</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>13.00</b> s
      </td>
      <td align="center">
        <code>sz_sort</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>1.91</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>2.37</b> s
      </td>
    </tr>
    <!-- Edit Distance -->
    <tr>
      <td colspan="4" align="center">Levenshtein edit distance, ≅ 5 bytes long</td>
    </tr>
    <tr>
      <td align="center">⚪</td>
      <td align="center">⚪</td>
      <td align="center">
        via <code>jellyfish</code> <sup>3</sup><br/>
        <span style="color:#ABABAB;">x86:</span> <b>1,550</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>2,220</b> ns
      </td>
      <td align="center">
        <code>sz_edit_distance</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>99</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>180</b> ns
      </td>
    </tr>
    <!-- Alignment Score -->
    <tr>
      <td colspan="4" align="center">Needleman-Wunsch alignment scores, ≅ 10 K aminoacids long</td>
    </tr>
    <tr>
      <td align="center">⚪</td>
      <td align="center">⚪</td>
      <td align="center">
        via <code>biopython</code> <sup>4</sup><br/>
        <span style="color:#ABABAB;">x86:</span> <b>257</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>367</b> ms
      </td>
      <td align="center">
        <code>sz_alignment_score</code><br/>
        <span style="color:#ABABAB;">x86:</span> <b>73</b> &centerdot;
        <span style="color:#ABABAB;">arm:</span> <b>177</b> ms
      </td>
    </tr>
  </table>

  StringZilla has a lot of functionality, most of which is covered by benchmarks across C, C++, Python and other languages.
  You can find those in the `./scripts` directory, with usage notes listed in the [`CONTRIBUTING.md`](CONTRIBUTING.md) file.
  Notably, if the CPU supports misaligned loads, even the 64-bit SWAR backends are faster than either standard library.

  > Most benchmarks were conducted on a 1 GB English text corpus, with an average word length of 6 characters.
  > The code was compiled with GCC 12, using `glibc` v2.35.
  > The benchmarks performed on Arm-based Graviton3 AWS `c7g` instances and `r7iz` Intel Sapphire Rapids.
  > Most modern Arm-based 64-bit CPUs will have similar relative speedups.
  > Variance withing x86 CPUs will be larger.
  > <sup>1</sup> Unlike other libraries, LibC requires strings to be NULL-terminated.
  > <sup>2</sup> Six whitespaces in the ASCII set are: ` \t\n\v\f\r`. Python's and other standard libraries have specialized functions for those.
  > <sup>3</sup> Most Python libraries for strings are also implemented in C.
  > <sup>4</sup> Unlike the rest of BioPython, the alignment score computation is [implemented in C](https://github.com/biopython/biopython/blob/master/Bio/Align/_pairwisealigner.c).
  > <sup>5</sup> All modulo operations were conducted with `uint8_t` to allow compilers more optimization opportunities.
  > The C++ STL and StringZilla benchmarks used a 64-bit [Mersenne Twister][faq-mersenne-twister] as the generator.
  > For C, C++, and StringZilla, an in-place update of the string was used.
  > In Python every string had to be allocated as a new object, which makes it less fair.
  > <sup>6</sup> Contrary to the popular opinion, Python's default `sorted` function works faster than the C and C++ standard libraries.
  > That holds for large lists or tuples of strings, but fails as soon as you need more complex logic, like sorting dictionaries by a string key, or producing the "sorted order" permutation.
  > The latter is very common in database engines and is most similar to `numpy.argsort`.
  > Current StringZilla solution can be at least 4x faster without loss of generality.

  [faq-mersenne-twister]: https://en.wikipedia.org/wiki/Mersenne_Twister



  StringZilla is compatible with most modern CPUs, and provides a broad range of functionality.

  - [x] works on both Little-Endian and Big-Endian architectures.
  - [x] works on 32-bit and 64-bit hardware architectures.
  - [x] compatible with ASCII and UTF-8 encoding.

  Not all features are available across all bindings.
  Consider contributing, if you need a feature that's not yet implemented.

  |                                | Maturity | C 99  | C++ 11 | Python | Swift | Rust  |
  | :----------------------------- | :------: | :---: | :----: | :----: | :---: | :---: |
  | Substring Search               |    🌳     |   ✅   |   ✅    |   ✅    |   ✅   |   ✅   |
  | Character Set Search           |    🌳     |   ✅   |   ✅    |   ✅    |   ✅   |   ✅   |
  | Edit Distances                 |    🧐     |   ✅   |   ✅    |   ✅    |   ✅   |   ⚪   |
  | Small String Class             |    🧐     |   ✅   |   ✅    |   ❌    |   ❌   |   ⚪   |
  | Sorting & Sequence Operations  |    🚧     |   ✅   |   ✅    |   ✅    |   ⚪   |   ⚪   |
  | Lazy Ranges, Compressed Arrays |    🧐     |   ⚪   |   ✅    |   ✅    |   ⚪   |   ⚪   |
  | Hashes & Fingerprints          |    🚧     |   ✅   |   ✅    |   ⚪    |   ⚪   |   ⚪   |

  > 🌳 parts are used in production.
  > 🧐 parts are in beta.
  > 🚧 parts are under active development, and are likely to break in subsequent releases.
  > ✅ are implemented.
  > ⚪ are considered.
  > ❌ are not intended.



  Python bindings are available on PyPI, and can be installed with `pip`.
  You can immediately check the installed version and the used hardware capabilities with following commands:

  ```bash
  pip install stringzilla
  python -c "import stringzilla; print(stringzilla.__version__)"
  python -c "import stringzilla; print(stringzilla.__capabilities__)"
  ```



  If you've ever used the Python `str`, `bytes`, `bytearray`, `memoryview` class, you'll know what to expect.
  StringZilla's `Str` class is a hybrid of those two, providing `str`-like interface to byte-arrays.

  ```python
  from stringzilla import Str, File

  text_from_str = Str('some-string') # no copies, just a view
  text_from_bytes = Str(b'some-array') # no copies, just a view
  text_from_file = Str(File('some-file.txt')) # memory-mapped file

  import numpy as np
  alphabet_array = np.arange(ord("a"), ord("z"), dtype=np.uint8)
  text_from_array = Str(memoryview(alphabet_array))
  ```

  The `File` class memory-maps a file from persistent memory without loading its copy into RAM.
  The contents of that file would remain immutable, and the mapping can be shared by multiple Python processes simultaneously.
  A standard dataset pre-processing use case would be to map a sizeable textual dataset like Common Crawl into memory, spawn child processes, and split the job between them.



  - Length: `len(text) -> int`
  - Indexing: `text[42] -> str`
  - Slicing: `text[42:46] -> Str`
  - Substring check: `'substring' in text -> bool`
  - Hashing: `hash(text) -> int`
  - String conversion: `str(text) -> str`



  ```py
  import sys

  x: bool = text.contains('substring', start=0, end=sys.maxsize)
  x: int = text.find('substring', start=0, end=sys.maxsize)
  x: int = text.count('substring', start=0, end=sys.maxsize, allowoverlap=False)
  x: str = text.decode(encoding='utf-8', errors='strict')
  x: Strs = text.split(separator=' ', maxsplit=sys.maxsize, keepseparator=False)
  x: Strs = text.rsplit(separator=' ', maxsplit=sys.maxsize, keepseparator=False)
  x: Strs = text.splitlines(keeplinebreaks=False, maxsplit=sys.maxsize)
  ```

  It's important to note, that the last function behavior is slightly different from Python's `str.splitlines`.
  The [native version][faq-splitlines] matches `\n`, `\r`, `\v` or `\x0b`, `\f` or `\x0c`, `\x1c`, `\x1d`, `\x1e`, `\x85`, `\r\n`, `\u2028`, `\u2029`, including 3x two-bytes-long runes.
  The StringZilla version matches only `\n`, `\v`, `\f`, `\r`, `\x1c`, `\x1d`, `\x1e`, `\x85`, avoiding two-byte-long runes.

  [faq-splitlines]: https://docs.python.org/3/library/stdtypes.html#str.splitlines



  Python strings don't natively support character set operations.
  This forces people to use regular expressions, which are slow and hard to read.
  To avoid the need for `re.finditer`, StringZilla provides the following interfaces:

  ```py
  x: int = text.find_first_of('chars', start=0, end=sys.maxsize)
  x: int = text.find_last_of('chars', start=0, end=sys.maxsize)
  x: int = text.find_first_not_of('chars', start=0, end=sys.maxsize)
  x: int = text.find_last_not_of('chars', start=0, end=sys.maxsize)
  x: Strs = text.split_charset(separator='chars', maxsplit=sys.maxsize, keepseparator=False)
  x: Strs = text.rsplit_charset(separator='chars', maxsplit=sys.maxsize, keepseparator=False)
  ```

  You can also transform the string using Look-Up Tables (LUTs), mapping it to a different character set.
  This would result in a copy - `str` for `str` inputs and `bytes` for other types.

  ```py
  x: str = text.translate('chars', {}, start=0, end=sys.maxsize, inplace=False)
  x: bytes = text.translate(b'chars', {}, start=0, end=sys.maxsize, inplace=False)
  ```

  For efficiency reasons, pass the LUT as a string or bytes object, not as a dictionary.
  This can be useful in high-throughput applications dealing with binary data, including bioinformatics and image processing.
  Here is an example:

  ```py
  import stringzilla as sz
  look_up_table = bytes(range(256)) # Identity LUT
  image = open("/image/path.jpeg", "rb").read()
  sz.translate(image, look_up_table, inplace=True)
  ```



  Once split into a `Strs` object, you can sort, shuffle, and reorganize the slices, with minimum memory footprint.
  If all the chunks are located in consecutive memory regions, the memory overhead can be as low as 4 bytes per chunk.

  ```python
  lines: Strs = text.split(separator='\n') # 4 bytes per line overhead for under 4 GB of text
  batch: Strs = lines.sample(seed=42) # 10x faster than `random.choices`
  lines.shuffle(seed=42) # or shuffle all lines in place and shard with slices


  ```

  Working on [RedPajama][redpajama], addressing 20 Billion annotated english documents, one will need only 160 GB of RAM instead of Terabytes.
  Once loaded, the data will be memory-mapped, and can be reused between multiple Python processes without copies.
  And of course, you can use slices to navigate the dataset and shard it between multiple workers.

  ```python
  lines[::3] # every third line
  lines[1::1] # every odd line
  lines[:-100:-1] # last 100 lines in reverse order
  ```

  [redpajama]: https://github.com/togethercomputer/RedPajama-Data



  Python's operations like `split()` and `readlines()` immediately materialize a `list` of copied parts.
  This can be very memory-inefficient for large datasets.
  StringZilla saves a lot of memory by viewing existing memory regions as substrings, but even more memory can be saved by using lazily evaluated iterators.

  ```py
  x: SplitIterator[Str] = text.split_iter(separator=' ', keepseparator=False)
  x: SplitIterator[Str] = text.rsplit_iter(separator=' ', keepseparator=False)
  x: SplitIterator[Str] = text.split_charset_iter(separator='chars', keepseparator=False)
  x: SplitIterator[Str] = text.rsplit_charset_iter(separator='chars', keepseparator=False)
  ```

  StringZilla can easily be 10x more memory efficient than native Python classes for tokenization.
  With lazy operations, it practically becomes free.

  ```py
  import stringzilla as sz
  %load_ext memory_profiler

  text = open("enwik9.txt", "r").read() # 1 GB, mean word length 7.73 bytes
  %memit text.split() # increment: 8670.12 MiB (152 ms)
  %memit sz.split(text) # increment: 530.75 MiB (25 ms)
  %memit sum(1 for _ in sz.split_iter(text)) # increment: 0.00 MiB
  ```



  Aside from calling the methods on the `Str` and `Strs` classes, you can also call the global functions directly on `str` and `bytes` instances.
  Assuming StringZilla CPython bindings are implemented [without any intermediate tools like SWIG or PyBind](https://ashvardanian.com/posts/pybind11-cpython-tutorial/), the call latency should be similar to native classes.

  ```py
  import stringzilla as sz

  contains: bool = sz.contains("haystack", "needle", start=0, end=sys.maxsize)
  offset: int = sz.find("haystack", "needle", start=0, end=sys.maxsize)
  count: int = sz.count("haystack", "needle", start=0, end=sys.maxsize, allowoverlap=False)
  ```



  ```py
  assert sz.edit_distance("apple", "aple") == 1 # skip one ASCII character
  assert sz.edit_distance("αβγδ", "αγδ") == 2 # skip two bytes forming one rune
  assert sz.edit_distance_unicode("αβγδ", "αγδ") == 1 # one unicode rune
  ```

  Several Python libraries provide edit distance computation.
  Most of them are implemented in C, but are not always as fast as StringZilla.
  Taking a 1'000 long proteins around 10'000 characters long, computing just a 100 distances:

  - [JellyFish](https://github.com/jamesturk/jellyfish): 62.3s
  - [EditDistance](https://github.com/roy-ht/editdistance): 32.9s
  - StringZilla: __0.8s__

  Moreover, you can pass custom substitution matrices to compute the Needleman-Wunsch alignment scores.
  That task is very common in bioinformatics and computational biology.
  It's natively supported in BioPython, and its BLOSUM matrices can be converted to StringZilla's format.
  Alternatively, you can construct an arbitrary 256 by 256 cost matrix using NumPy.
  Depending on arguments, the result may be equal to the negative Levenshtein distance.

  ```py
  import numpy as np
  import stringzilla as sz

  costs = np.zeros((256, 256), dtype=np.int8)
  costs.fill(-1)
  np.fill_diagonal(costs, 0)

  assert sz.alignment_score("first", "second", substitution_matrix=costs, gap_score=-1) == -sz.edit_distance(a, b)
  ```

  Using the same proteins as for Levenshtein distance benchmarks:

  - [BioPython](https://github.com/biopython/biopython): 25.8s
  - StringZilla: __7.8s__

  <details>
    <summary><b>§ Example converting from BioPython to StringZilla.</b></summary>

  ```py
  import numpy as np
  from Bio import Align
  from Bio.Align import substitution_matrices

  aligner = Align.PairwiseAligner()
  aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
  aligner.open_gap_score = 1
  aligner.extend_gap_score = 1


  subs_packed = np.array(aligner.substitution_matrix).astype(np.int8)
  subs_reconstructed = np.zeros((256, 256), dtype=np.int8)


  subs_reconstructed.fill(127)
  for packed_row, packed_row_aminoacid in enumerate(aligner.substitution_matrix.alphabet):
      for packed_column, packed_column_aminoacid in enumerate(aligner.substitution_matrix.alphabet):
          reconstructed_row = ord(packed_row_aminoacid)
          reconstructed_column = ord(packed_column_aminoacid)
          subs_reconstructed[reconstructed_row, reconstructed_column] = subs_packed[packed_row, packed_column]


  glutathione = "ECG" # Need to rebuild human tissue?
  thyrotropin_releasing_hormone = "QHP" # Or to regulate your metabolism?

  assert sz.alignment_score(
      glutathione,
      thyrotropin_releasing_hormone,
      substitution_matrix=subs_reconstructed,
      gap_score=1) == aligner.score(glutathione, thyrotropin_releasing_hormone) # Equal to 6
  ```

  </details>





  Similar to how `File` can be used to read a large file, other interfaces can be used to dump strings to disk faster.
  The `Str` class has `write_to` to write the string to a file, and `offset_within` to obtain integer offsets of substring view in larger string for navigation.

  ```py
  web_archive = Str("<html>...</html><html>...</html>")
  _, end_tag, next_doc = web_archive.partition("</html>") # or use `find`
  next_doc_offset = next_doc.offset_within(web_archive)
  web_archive.write_to("next_doc.html") # no GIL, no copies, just a view
  ```



  A `Str` is easy to cast to [PyArrow](https://arrow.apache.org/docs/python/arrays.html#string-and-binary-types) buffers.

  ```py
  from pyarrow import foreign_buffer
  from stringzilla import Str

  original = "hello"
  view = Str(native)
  arrow = foreign_buffer(view.address, view.nbytes, view)
  ```

  That means you can convert `Str` to `pyarrow.Buffer` and `Strs` to `pyarrow.Array` without extra copies.



  The C library is header-only, so you can just copy the `stringzilla.h` header into your project.
  Same applies to C++, where you would copy the `stringzilla.hpp` header.
  Alternatively, add it as a submodule, and include it in your build system.

  ```sh
  git submodule add https://github.com/ashvardanian/stringzilla.git
  ```

  Or using a pure CMake approach:

  ```cmake
  FetchContent_Declare(stringzilla GIT_REPOSITORY https://github.com/ashvardanian/stringzilla.git)
  FetchContent_MakeAvailable(stringzilla)
  ```

  Last, but not the least, you can also install it as a library, and link against it.
  This approach is worse for inlining, but brings dynamic runtime dispatch for the most advanced CPU features.



  There is a stable C 99 interface, where all function names are prefixed with `sz_`.
  Most interfaces are well documented, and come with self-explanatory names and examples.
  In some cases, hardware specific overloads are available, like `sz_find_avx512` or `sz_find_neon`.
  Both are companions of the `sz_find`, first for x86 CPUs with AVX-512 support, and second for Arm NEON-capable CPUs.

  ```c


  // Initialize your haystack and needle
  sz_string_view_t haystack = {your_text, your_text_length};
  sz_string_view_t needle = {your_subtext, your_subtext_length};

  // Perform string-level operations
  sz_size_t substring_position = sz_find(haystack.start, haystack.length, needle.start, needle.length);
  sz_size_t substring_position = sz_find_avx512(haystack.start, haystack.length, needle.start, needle.length);
  sz_size_t substring_position = sz_find_neon(haystack.start, haystack.length, needle.start, needle.length);

  // Hash strings
  sz_u64_t hash = sz_hash(haystack.start, haystack.length);

  // Perform collection level operations
  sz_sequence_t array = {your_order, your_count, your_get_start, your_get_length, your_handle};
  sz_sort(&array, &your_config);
  ```

  <details>
    <summary><b>§ Mapping from LibC to StringZilla.</b></summary>

  By design, StringZilla has a couple of notable differences from LibC:

  1. all strings are expected to have a length, and are not necessarily null-terminated.
  2. every operations has a reverse order counterpart.

  That way `sz_find` and `sz_rfind` are similar to `strstr` and `strrstr` in LibC.
  Similarly, `sz_find_byte` and `sz_rfind_byte` replace `memchr` and `memrchr`.
  The `sz_find_charset` maps to `strspn` and `strcspn`, while `sz_rfind_charset` has no sibling in LibC.

  <table>
      <tr>
          <th>LibC Functionality</th>
          <th>StringZilla Equivalents</th>
      </tr>
      <tr>
          <td><code>memchr(haystack, needle, haystack_length)</code>, <code>strchr</code></td>
          <td><code>sz_find_byte(haystack, haystack_length, needle)</code></td>
      </tr>
      <tr>
          <td><code>memrchr(haystack, needle, haystack_length)</code></td>
          <td><code>sz_rfind_byte(haystack, haystack_length, needle)</code></td>
      </tr>
      <tr>
          <td><code>memcmp</code>, <code>strcmp</code></td>
          <td><code>sz_order</code>, <code>sz_equal</code></td>
      </tr>
      <tr>
          <td><code>strlen(haystack)</code></td>
          <td><code>sz_find_byte(haystack, haystack_length, needle)</code></td>
      </tr>
      <tr>
          <td><code>strcspn(haystack, needles)</code></td>
          <td><code>sz_rfind_charset(haystack, haystack_length, needles_bitset)</code></td>
      </tr>
      <tr>
          <td><code>strspn(haystack, needles)</code></td>
          <td><code>sz_find_charset(haystack, haystack_length, needles_bitset)</code></td>
      </tr>
      <tr>
          <td><code>memmem(haystack, haystack_length, needle, needle_length)</code>, <code>strstr</code></td>
          <td><code>sz_find(haystack, haystack_length, needle, needle_length)</code></td>
      </tr>
      <tr>
          <td><code>memcpy(destination, source, destination_length)</code></td>
          <td><code>sz_copy(destination, source, destination_length)</code></td>
      </tr>
      <tr>
          <td><code>memmove(destination, source, destination_length)</code></td>
          <td><code>sz_move(destination, source, destination_length)</code></td>
      </tr>
      <tr>
          <td><code>memset(destination, value, destination_length)</code></td>
          <td><code>sz_fill(destination, destination_length, value)</code></td>
      </tr>
  </table>

  </details>



  There is a stable C++ 11 interface available in the `ashvardanian::stringzilla` namespace.
  It comes with two STL-like classes: `string_view` and `string`.
  The first is a non-owning view of a string, and the second is a mutable string with a [Small String Optimization][faq-sso].

  ```cpp


  namespace sz = ashvardanian::stringzilla;

  sz::string haystack = "some string";
  sz::string_view needle = sz::string_view(haystack).substr(0, 4);

  auto substring_position = haystack.find(needle); // Or `rfind`
  auto hash = std::hash<sz::string_view>{}(haystack); // Compatible with STL's `std::hash`

  haystack.end() - haystack.begin() == haystack.size(); // Or `rbegin`, `rend`
  haystack.find_first_of(" \v\t") == 4; // Or `find_last_of`, `find_first_not_of`, `find_last_not_of`
  haystack.starts_with(needle) == true; // Or `ends_with`
  haystack.remove_prefix(needle.size()); // Why is this operation in-place?!
  haystack.contains(needle) == true; // STL has this only from C++ 23 onwards
  haystack.compare(needle) == 1; // Or `haystack <=> needle` in C++ 20 and beyond
  ```

  StringZilla also provides string literals for automatic type resolution, [similar to STL][stl-literal]:

  ```cpp
  using sz::literals::operator""_sz;
  using std::literals::operator""sv;

  auto a = "some string"; // char const *
  auto b = "some string"sv; // std::string_view
  auto b = "some string"_sz; // sz::string_view
  ```

  [stl-literal]: https://en.cppreference.com/w/cpp/string/basic_string_view/operator%22%22sv



  Most operations in StringZilla don't assume any memory ownership.
  But in addition to the read-only search-like operations StringZilla provides a minimalistic C and C++ implementations for a memory owning string "class".
  Like other efficient string implementations, it uses the [Small String Optimization][faq-sso] (SSO) to avoid heap allocations for short strings.

  [faq-sso]: https://cpp-optimizations.netlify.app/small_strings/

  ```c
  typedef union sz_string_t {
      struct internal {
          sz_ptr_t start;
          sz_u8_t length;
          char chars[SZ_STRING_INTERNAL_SPACE]; /// Ends with a null-terminator.
      } internal;

      struct external {
          sz_ptr_t start;
          sz_size_t length;
          sz_size_t space; /// The length of the heap-allocated buffer.
          sz_size_t padding;
      } external;

  } sz_string_t;
  ```

  As one can see, a short string can be kept on the stack, if it fits within `internal.chars` array.
  Before 2015 GCC string implementation was just 8 bytes, and could only fit 7 characters.
  Different STL implementations today have different thresholds for the Small String Optimization.
  Similar to GCC, StringZilla is 32 bytes in size, and similar to Clang it can fit 22 characters on stack.
  Our layout might be preferential, if you want to avoid branches.
  If you use a different compiler, you may want to check it's SSO buffer size with a [simple Gist](https://gist.github.com/ashvardanian/c197f15732d9855c4e070797adf17b21).

  |                       | `libstdc++` in  GCC 13 | `libc++` in Clang 17 | StringZilla |
  | :-------------------- | ---------------------: | -------------------: | ----------: |
  | `sizeof(std::string)` |                     32 |                   24 |          32 |
  | Small String Capacity |                     15 |               __22__ |      __22__ |

  This design has been since ported to many high-level programming languages.
  Swift, for example, [can store 15 bytes](https://developer.apple.com/documentation/swift/substring/withutf8(_:)#discussion) in the `String` instance itself.
  StringZilla implements SSO at the C level, providing the `sz_string_t` union and a simple API for primary operations.

  ```c
  sz_memory_allocator_t allocator;
  sz_string_t string;

  // Init and make sure we are on stack
  sz_string_init(&string);
  sz_string_is_on_stack(&string); // == sz_true_k

  // Optionally pre-allocate space on the heap for future insertions.
  sz_string_grow(&string, 100, &allocator); // == sz_true_k

  // Append, erase, insert into the string.
  sz_string_expand(&string, 0, "_Hello_", 7, &allocator); // == sz_true_k
  sz_string_expand(&string, SZ_SIZE_MAX, "world", 5, &allocator); // == sz_true_k
  sz_string_erase(&string, 0, 1);

  // Unpacking & introspection.
  sz_ptr_t string_start;
  sz_size_t string_length;
  sz_size_t string_space;
  sz_bool_t string_is_external;
  sz_string_unpack(string, &string_start, &string_length, &string_space, &string_is_external);
  sz_equal(string_start, "Hello_world", 11); // == sz_true_k

  // Reclaim some memory.
  sz_string_shrink_to_fit(&string, &allocator); // == sz_true_k
  sz_string_free(&string, &allocator);
  ```

  Unlike the conventional C strings, the `sz_string_t` is allowed to contain null characters.
  To safely print those, pass the `string_length` to `printf` as well.

  ```c
  printf("%.*s\n", (int)string_length, string_start);
  ```



  StringZilla is not a drop-in replacement for the C Standard Library.
  It's designed to be a safer and more modern alternative.
  Conceptually:

  1. LibC strings are expected to be null-terminated, so to use the efficient LibC implementations on slices of larger strings, you'd have to copy them, which is more expensive than the original string operation.
  2. LibC functionality is asymmetric - you can find the first and the last occurrence of a character within a string, but you can't find the last occurrence of a substring.
  3. LibC function names are typically very short and cryptic.
  4. LibC lacks crucial functionality like hashing and doesn't provide primitives for less critical but relevant operations like fuzzy matching.

  Something has to be said about its support for UTF8.
  Aside from a single-byte `char` type, LibC provides `wchar_t`:

  - The size of `wchar_t` is not consistent across platforms. On Windows, it's typically 16 bits (suitable for UTF-16), while on Unix-like systems, it's usually 32 bits (suitable for UTF-32). This inconsistency can lead to portability issues when writing cross-platform code.
  - `wchar_t` is designed to represent wide characters in a fixed-width format (UTF-16 or UTF-32). In contrast, UTF-8 is a variable-length encoding, where each character can take from 1 to 4 bytes. This fundamental difference means that `wchar_t` and UTF-8 are incompatible.

  StringZilla [partially addresses those issues](#unicode-utf-8-and-wide-characters).



  | C++ Code                             | Evaluation Result | Invoked Signature              |
  | :----------------------------------- | :---------------- | :----------------------------- |
  | `"Loose"s.replace(2, 2, "vath"s, 1)` | `"Loathe"` 🤢      | `(pos1, count1, str2, pos2)`   |
  | `"Loose"s.replace(2, 2, "vath", 1)`  | `"Love"` 🥰        | `(pos1, count1, str2, count2)` |

  StringZilla is designed to be a drop-in replacement for the C++ Standard Templates Library.
  That said, some of the design decisions of STL strings are highly controversial, error-prone, and expensive.
  Most notably:

  1. Argument order for `replace`, `insert`, `erase` and similar functions is impossible to guess.
  2. Bounds-checking exceptions for `substr`-like functions are only thrown for one side of the range.
  3. Returning string copies in `substr`-like functions results in absurd volume of allocations.
  4. Incremental construction via `push_back`-like functions goes through too many branches.
  5. Inconsistency between `string` and `string_view` methods, like the lack of `remove_prefix` and `remove_suffix`.

  Check the following set of asserts validating the `std::string` specification.
  It's not realistic to expect the average developer to remember the [14 overloads of `std::string::replace`][stl-replace].

  [stl-replace]: https://en.cppreference.com/w/cpp/string/basic_string/replace

  ```cpp
  using str = std::string;

  assert(str("hello world").substr(6) == "world");
  assert(str("hello world").substr(6, 100) == "world"); // 106 is beyond the length of the string, but its OK
  assert_throws(str("hello world").substr(100), std::out_of_range);   // 100 is beyond the length of the string
  assert_throws(str("hello world").substr(20, 5), std::out_of_range); // 20 is beyond the length of the string
  assert_throws(str("hello world").substr(-1, 5), std::out_of_range); // -1 casts to unsigned without any warnings...
  assert(str("hello world").substr(0, -1) == "hello world");          // -1 casts to unsigned without any warnings...

  assert(str("hello").replace(1, 2, "123") == "h123lo");
  assert(str("hello").replace(1, 2, str("123"), 1) == "h23lo");
  assert(str("hello").replace(1, 2, "123", 1) == "h1lo");
  assert(str("hello").replace(1, 2, "123", 1, 1) == "h2lo");
  assert(str("hello").replace(1, 2, str("123"), 1, 1) == "h2lo");
  assert(str("hello").replace(1, 2, 3, 'a') == "haaalo");
  assert(str("hello").replace(1, 2, {'a', 'b'}) == "hablo");
  ```

  To avoid those issues, StringZilla provides an alternative consistent interface.
  It supports signed arguments, and doesn't have more than 3 arguments per function or
  The standard API and our alternative can be conditionally disabled with `SZ_SAFETY_OVER_COMPATIBILITY=1`.
  When it's enabled, the _~~subjectively~~_ risky overloads from the Standard will be disabled.

  ```cpp
  using str = sz::string;

  str("a:b").front(1) == "a"; // no checks, unlike `substr`
  str("a:b").front(2) == "2"; // take first 2 characters
  str("a:b").back(-1) == "b"; // accepting negative indices
  str("a:b").back(-2) == ":b"; // similar to Python's `"a:b"[-2:]`
  str("a:b").sub(1, -1) == ":"; // similar to Python's `"a:b"[1:-1]`
  str("a:b").sub(-2, -1) == ":"; // similar to Python's `"a:b"[-2:-1]`
  str("a:b").sub(-2, 1) == ""; // similar to Python's `"a:b"[-2:1]`
  "a:b"_sz[{-2, -1}] == ":"; // works on views and overloads `operator[]`
  ```

  Assuming StringZilla is a header-only library you can use the full API in some translation units and gradually transition to safer restricted API in others.
  Bonus - all the bound checking is branchless, so it has a constant cost and won't hurt your branch predictor.



  Python is arguably the most popular programming language for data science.
  In part, that's due to the simplicity of its standard interfaces.
  StringZilla brings some of that functionality to C++.

  - Content checks: `isalnum`, `isalpha`, `isascii`, `isdigit`, `islower`, `isspace`, `isupper`.
  - Trimming character sets: `lstrip`, `rstrip`, `strip`.
  - Trimming string matches: `remove_prefix`, `remove_suffix`.
  - Ranges of search results: `splitlines`, `split`, `rsplit`.
  - Number of non-overlapping substring matches: `count`.
  - Partitioning: `partition`, `rpartition`.

  For example, when parsing documents, it is often useful to split it into substrings.
  Most often, after that, you would compute the length of the skipped part, the offset and the length of the remaining part.
  This results in a lot of pointer arithmetic and is error-prone.
  StringZilla provides a convenient `partition` function, which returns a tuple of three string views, making the code cleaner.

  ```cpp
  auto parts = haystack.partition(':'); // Matching a character
  auto [before, match, after] = haystack.partition(':'); // Structure unpacking
  auto [before, match, after] = haystack.partition(sz::char_set(":;")); // Character-set argument
  auto [before, match, after] = haystack.partition(" : "); // String argument
  auto [before, match, after] = haystack.rpartition(sz::whitespaces_set()); // Split around the last whitespace
  ```

  Combining those with the `split` function, one can easily parse a CSV file or HTTP headers.

  ```cpp
  for (auto line : haystack.split("\r\n")) {
      auto [key, _, value] = line.partition(':');
      headers[key.strip()] = value.strip();
  }
  ```

  Some other extensions are not present in the Python standard library either.
  Let's go through the C++ functionality category by category.

  - [Splits and Ranges](#splits-and-ranges).
  - [Concatenating Strings without Allocations](#concatenating-strings-without-allocations).
  - [Random Generation](#random-generation).
  - [Edit Distances and Fuzzy Search](#levenshtein-edit-distance-and-alignment-scores).

  Some of the StringZilla interfaces are not available even Python's native `str` class.
  Here is a sneak peek of the most useful ones.

  ```cpp
  text.hash(); // -> 64 bit unsigned integer
  text.ssize(); // -> 64 bit signed length to avoid `static_cast<std::ssize_t>(text.size())`
  text.contains_only(" \w\t"); // == text.find_first_not_of(sz::char_set(" \w\t")) == npos;
  text.contains(sz::whitespaces_set()); // == text.find(sz::char_set(sz::whitespaces_set())) != npos;

  // Simpler slicing than `substr`
  text.front(10); // -> sz::string_view
  text.back(10); // -> sz::string_view

  // Safe variants, which clamp the range into the string bounds
  using sz::string::cap;
  text.front(10, cap) == text.front(std::min(10, text.size()));
  text.back(10, cap) == text.back(std::min(10, text.size()));

  // Character set filtering
  text.lstrip(sz::whitespaces_set()).rstrip(sz::newlines_set()); // like Python
  text.front(sz::whitespaces_set()); // all leading whitespaces
  text.back(sz::digits_set()); // all numerical symbols forming the suffix

  // Incremental construction
  using sz::string::unchecked;
  text.push_back('x'); // no surprises here
  text.push_back('x', unchecked); // no bounds checking, Rust style
  text.try_push_back('x'); // returns `false` if the string is full and the allocation failed

  sz::concatenate(text, "@", domain, ".", tld); // No allocations
  ```



  One of the most common use cases is to split a string into a collection of substrings.
  Which would often result in [StackOverflow lookups][so-split] and snippets like the one below.

  [so-split]: https://stackoverflow.com/questions/14265581/parse-split-a-string-in-c-using-string-delimiter-standard-c

  ```cpp
  std::vector<std::string> lines = split(haystack, "\r\n"); // string delimiter
  std::vector<std::string> words = split(lines, ' '); // character delimiter
  ```

  Those allocate memory for each string and the temporary vectors.
  Each allocation can be orders of magnitude more expensive, than even serial `for`-loop over characters.
  To avoid those, StringZilla provides lazily-evaluated ranges, compatible with the [Range-v3][range-v3] library.

  [range-v3]: https://github.com/ericniebler/range-v3

  ```cpp
  for (auto line : haystack.split("\r\n"))
      for (auto word : line.split(sz::char_set(" \w\t.,;:!?")))
          std::cout << word << std::endl;
  ```

  Each of those is available in reverse order as well.
  It also allows interleaving matches, if you want both inclusions of `xx` in `xxx`.
  Debugging pointer offsets is not a pleasant exercise, so keep the following functions in mind.

  - `haystack.[r]find_all(needle, interleaving)`
  - `haystack.[r]find_all(sz::char_set(""))`
  - `haystack.[r]split(needle)`
  - `haystack.[r]split(sz::char_set(""))`

  For $N$ matches the split functions will report $N+1$ matches, potentially including empty strings.
  Ranges have a few convenience methods as well:

  ```cpp
  range.size(); // -> std::size_t
  range.empty(); // -> bool
  range.template to<std::set<std::sting>>();
  range.template to<std::vector<std::sting_view>>();
  ```



  Another common string operation is concatenation.
  The STL provides `std::string::operator+` and `std::string::append`, but those are not very efficient, if multiple invocations are performed.

  ```cpp
  std::string name, domain, tld;
  auto email = name + "@" + domain + "." + tld; // 4 allocations
  ```

  The efficient approach would be to pre-allocate the memory and copy the strings into it.

  ```cpp
  std::string email;
  email.reserve(name.size() + domain.size() + tld.size() + 2);
  email.append(name), email.append("@"), email.append(domain), email.append("."), email.append(tld);
  ```

  That's mouthful and error-prone.
  StringZilla provides a more convenient `concatenate` function, which takes a variadic number of arguments.
  It also overrides the `operator|` to concatenate strings lazily, without any allocations.

  ```cpp
  auto email = sz::concatenate(name, "@", domain, ".", tld);   // 0 allocations
  auto email = name | "@" | domain | "." | tld;                // 0 allocations
  sz::string email = name | "@" | domain | "." | tld;          // 1 allocations
  ```



  Software developers often need to generate random strings for testing purposes.
  The STL provides `std::generate` and `std::random_device`, that can be used with StringZilla.

  ```cpp
  sz::string random_string(std::size_t length, char const *alphabet, std::size_t cardinality) {
      sz::string result(length, '\0');
      static std::random_device seed_source; // Expensive to construct - due to system calls
      static std::mt19937 generator(seed_source()); // Also expensive - due to the state size
      std::uniform_int_distribution<std::size_t> distribution(0, cardinality);
      std::generate(result.begin(), result.end(), [&]() { return alphabet[distribution(generator)]; });
      return result;
  }
  ```

  Mouthful and slow.
  StringZilla provides a C native method - `sz_generate` and a convenient C++ wrapper - `sz::generate`.
  Similar to Python it also defines the commonly used character sets.

  ```cpp
  auto protein = sz::string::random(300, "ARNDCQEGHILKMFPSTWYV"); // static method
  auto dna = sz::basic_string<custom_allocator>::random(3_000_000_000, "ACGT");

  dna.randomize("ACGT"); // `noexcept` pre-allocated version
  dna.randomize(&std::rand, "ACGT"); // pass any generator, like `std::mt19937`

  char uuid[36];
  sz::randomize(sz::string_span(uuid, 36), "0123456789abcdef-"); // Overwrite any buffer
  ```



  In text processing, it's often necessary to replace all occurrences of a specific substring or set of characters within a string.
  Standard library functions may not offer the most efficient or convenient methods for performing bulk replacements, especially when dealing with large strings or performance-critical applications.

  - `haystack.replace_all(needle_string, replacement_string)`
  - `haystack.replace_all(sz::char_set(""), replacement_string)`
  - `haystack.try_replace_all(needle_string, replacement_string)`
  - `haystack.try_replace_all(sz::char_set(""), replacement_string)`
  - `haystack.transform(sz::look_up_table::identity())`
  - `haystack.transform(sz::look_up_table::identity(), haystack.data())`



  Levenshtein and Hamming edit distance are provided for both byte-strings and UTF-8 strings.
  The latter will output the distance in Unicode code points, not bytes.
  Needleman-Wunsch alignment scores are only defined for byte-strings.

  ```cpp
  // Count number of substitutions in same length strings
  sz::hamming_distance(first, second[, upper_bound]) -> std::size_t;
  sz::hamming_distance_utf8(first, second[, upper_bound]) -> std::size_t;

  // Count number of insertions, deletions and substitutions
  sz::edit_distance(first, second[, upper_bound[, allocator]]) -> std::size_t;
  sz::edit_distance_utf8(first, second[, upper_bound[, allocator]]) -> std::size_t;

  // Substitution-parametrized Needleman-Wunsch global alignment score
  std::int8_t costs[256][256]; // Substitution costs matrix
  sz::alignment_score(first, second, costs[, gap_score[, allocator]) -> std::ptrdiff_t;
  ```



  LibC provides `qsort` and STL provides `std::sort`.
  Both have their quarks.
  The LibC standard has no way to pass a context to the comparison function, that's only possible with platform-specific extensions.
  Those have [different arguments order](https://stackoverflow.com/a/39561369) on every OS.

  ```c
  // Linux: https://linux.die.net/man/3/qsort_r
  void qsort_r(void *elements, size_t count, size_t element_width,
      int (*compare)(void const *left, void const *right, void *context),
      void *context);
  // MacOS and FreeBSD: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/qsort_r.3.html
  void qsort_r(void *elements, size_t count, size_t element_width,
      void *context,
      int (*compare)(void *context, void const *left, void const *right));
  // Windows conflicts with ISO `qsort_s`: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/qsort-s?view=msvc-170
  void qsort_s(id *elements, size_t count, size_t element_width,
      int (*compare)(void *context, void const *left, void const *right),
      void *context);
  ```

  C++ generic algorithm is not perfect either.
  There is no guarantee in the standard that `std::sort` won't allocate any memory.
  If you are running on embedded, in real-time or on 100+ CPU cores per node, you may want to avoid that.
  StringZilla doesn't solve the general case, but hopes to improve the performance for strings.
  Use `sz_sort`, or the high-level `sz::sorted_order`, which can be used sort any collection of elements convertible to `sz::string_view`.

  ```cpp
  std::vector<std::string> data({"c", "b", "a"});
  std::vector<std::size_t> order = sz::sorted_order(data); //< Simple shortcut

  // Or, taking care of memory allocation:
  sz::sorted_order(data.begin(), data.end(), order.data(), [](auto const &x) -> sz::string_view { return x; });
  ```



  The C++ Standard Templates Library provides several associative containers, often used with string keys.

  ```cpp
  std::map<std::string, int, std::less<std::string>> sorted_words;
  std::unordered_map<std::string, int, std::hash<std::string>, std::equal_to<std::string>> words;
  ```

  The performance of those containers is often limited by the performance of the string keys, especially on reads.
  StringZilla can be used to accelerate containers with `std::string` keys, by overriding the default comparator and hash functions.

  ```cpp
  std::map<std::string, int, sz::string_view_less> sorted_words;
  std::unordered_map<std::string, int, sz::string_view_hash, sz::string_view_equal_to> words;
  ```

  Alternatively, a better approach would be to use the `sz::string` class as a key.
  The right hash function and comparator would be automatically selected and the performance gains would be more noticeable if the keys are short.

  ```cpp
  std::map<sz::string, int> sorted_words;
  std::unordered_map<sz::string, int> words;
  ```



  __`SZ_DEBUG`__:

  > For maximal performance, the C library does not perform any bounds checking in Release builds.
  > In C++, bounds checking happens only in places where the STL `std::string` would do it.
  > If you want to enable more aggressive bounds-checking, define `SZ_DEBUG` before including the header.
  > If not explicitly set, it will be inferred from the build type.

  __`SZ_USE_X86_AVX512`, `SZ_USE_X86_AVX2`, `SZ_USE_ARM_NEON`__:

  > One can explicitly disable certain families of SIMD instructions for compatibility purposes.
  > Default values are inferred at compile time.

  __`SZ_DYNAMIC_DISPATCH`__:

  > By default, StringZilla is a header-only library.
  > But if you are running on different generations of devices, it makes sense to pre-compile the library for all supported generations at once, and dispatch at runtime.
  > This flag does just that and is used to produce the `stringzilla.so` shared library, as well as the Python bindings.

  __`SZ_USE_MISALIGNED_LOADS`__:

  > By default, StringZilla avoids misaligned loads.
  > If supported, it replaces many byte-level operations with word-level ones.
  > Going from `char`-like types to `uint64_t`-like ones can significantly accelerate the serial (SWAR) backend.
  > So consider enabling it if you are building for some embedded device.

  __`SZ_AVOID_LIBC`__ and __`SZ_OVERRIDE_LIBC`__:

  > When using the C header-only library one can disable the use of LibC.
  > This may affect the type resolution system on obscure hardware platforms.
  > Moreover, one may let `stringzilla` override the common symbols like the `memcpy` and `memset` with its own implementations.
  > In that case you can use the [`LD_PRELOAD` trick][ld-preload-trick] to prioritize it's symbols over the ones from the LibC and accelerate existing string-heavy applications without recompiling them.
  > It also adds a layer of security, as the `stringzilla` isn't [undefined for NULL inputs][redhat-memcpy-ub] like `memcpy(NULL, NULL, 0)`.

  [ld-preload-trick]: https://ashvardanian.com/posts/ld-preload-libsee
  [redhat-memcpy-ub]: https://developers.redhat.com/articles/2024/12/11/making-memcpynull-null-0-well-defined

  __`SZ_AVOID_STL`__ and __`SZ_SAFETY_OVER_COMPATIBILITY`__:

  > When using the C++ interface one can disable implicit conversions from `std::string` to `sz::string` and back.
  > If not needed, the `<string>` and `<string_view>` headers will be excluded, reducing compilation time.
  > Moreover, if STL compatibility is a low priority, one can make the API safer by disabling the overloads, which are subjectively error prone.

  __`STRINGZILLA_BUILD_SHARED`, `STRINGZILLA_BUILD_TEST`, `STRINGZILLA_BUILD_BENCHMARK`, `STRINGZILLA_TARGET_ARCH`__ for CMake users:

  > When compiling the tests and benchmarks, you can explicitly set the target hardware architecture.
  > It's synonymous to GCC's `-march` flag and is used to enable/disable the appropriate instruction sets.
  > You can also disable the shared library build, if you don't need it.



  StringZilla is available as a Rust crate, with documentation available on [docs.rs/stringzilla](https://docs.rs/stringzilla).
  To use the latest crate release in your project, add the following to your `Cargo.toml`:

  ```toml
  [dependencies]
  stringzilla = ">=3"
  ```

  Or if you want to use the latest pre-release version from the repository:

  ```toml
  [dependencies]
  stringzilla = { git = "https://github.com/ashvardanian/stringzilla", branch = "main-dev" }
  ```

  Once installed, all of the functionality is available through the `stringzilla` namespace.
  Many interfaces will look familiar to the users of the `memchr` crate.

  ```rust
  use stringzilla::sz;

  // Identical to `memchr::memmem::find` and `memchr::memmem::rfind` functions
  sz::find("Hello, world!", "world") // 7
  sz::rfind("Hello, world!", "world") // 7

  // Generalizations of `memchr::memrchr[123]`
  sz::find_char_from("Hello, world!", "world") // 2
  sz::rfind_char_from("Hello, world!", "world") // 11
  ```

  Unlike `memchr`, the throughput of `stringzilla` is [high in both normal and reverse-order searches][memchr-benchmarks].
  It also provides no constraints on the size of the character set, while `memchr` allows only 1, 2, or 3 characters.
  In addition to global functions, `stringzilla` provides a `StringZilla` extension trait:

  ```rust
  use stringzilla::StringZilla;

  let my_string: String = String::from("Hello, world!");
  let my_str = my_string.as_str();
  let my_cow_str = Cow::from(&my_string);

  // Use the generic function with a String
  assert_eq!(my_string.sz_find("world"), Some(7));
  assert_eq!(my_string.sz_rfind("world"), Some(7));
  assert_eq!(my_string.sz_find_char_from("world"), Some(2));
  assert_eq!(my_string.sz_rfind_char_from("world"), Some(11));
  assert_eq!(my_string.sz_find_char_not_from("world"), Some(0));
  assert_eq!(my_string.sz_rfind_char_not_from("world"), Some(12));

  // Same works for &str and Cow<'_, str>
  assert_eq!(my_str.sz_find("world"), Some(7));
  assert_eq!(my_cow_str.as_ref().sz_find("world"), Some(7));
  ```

  The library also exposes Levenshtein and Hamming edit-distances for byte-arrays and UTF-8 strings, as well as Needleman-Wunch alignment scores.

  ```rust
  use stringzilla::sz;

  // Handling arbitrary byte arrays:
  sz::edit_distance("Hello, world!", "Hello, world?"); // 1
  sz::hamming_distance("Hello, world!", "Hello, world?"); // 1
  sz::alignment_score("Hello, world!", "Hello, world?", sz::unary_substitution_costs(), -1); // -1

  // Handling UTF-8 strings:
  sz::hamming_distance_utf8("αβγδ", "αγγδ") // 1
  sz::edit_distance_utf8("façade", "facade") // 1
  ```

  [memchr-benchmarks]: https://github.com/ashvardanian/memchr_vs_stringzilla



  StringZilla can be added as a dependency in the Swift Package Manager.
  In your `Package.swift` file, add the following:

  ```swift
  dependencies: [
      .package(url: "https://github.com/ashvardanian/stringzilla")
  ]
  ```

  The package currently covers only the most basic functionality, but is planned to be extended to cover the full C++ API.

  ```swift
  var s = "Hello, world! Welcome to StringZilla. 👋"
  s[s.findFirst(substring: "world")!...] // "world! Welcome to StringZilla. 👋")
  s[s.findLast(substring: "o")!...] // "o StringZilla. 👋")
  s[s.findFirst(characterFrom: "aeiou")!...] // "ello, world! Welcome to StringZilla. 👋")
  s[s.findLast(characterFrom: "aeiou")!...] // "a. 👋")
  s[s.findFirst(characterNotFrom: "aeiou")!...] // "Hello, world! Welcome to StringZilla. 👋"
  s.editDistance(from: "Hello, world!")! // 29
  ```



  StringZilla aims to optimize some of the slowest string operations.
  Some popular operations, however, like equality comparisons and relative order checking, almost always complete on some of the very first bytes in either string.
  In such operations vectorization is almost useless, unless huge and very similar strings are considered.
  StringZilla implements those operations as well, but won't result in substantial speedups.



  Substring search algorithms are generally divided into: comparison-based, automaton-based, and bit-parallel.
  Different families are effective for different alphabet sizes and needle lengths.
  The more operations are needed per-character - the more effective SIMD would be.
  The longer the needle - the more effective the skip-tables are.
  StringZilla uses different exact substring search algorithms for different needle lengths and backends:

  - When no SIMD is available - SWAR (SIMD Within A Register) algorithms are used on 64-bit words.
  - Boyer-Moore-Horspool (BMH) algorithm with Raita heuristic variation for longer needles.
  - SIMD algorithms are randomized to look at different parts of the needle.

  On very short needles, especially 1-4 characters long, brute force with SIMD is the fastest solution.
  On mid-length needles, bit-parallel algorithms are effective, as the character masks fit into 32-bit or 64-bit words.
  Either way, if the needle is under 64-bytes long, on haystack traversal we will still fetch every CPU cache line.
  So the only way to improve performance is to reduce the number of comparisons.
  The snippet below shows how StringZilla accomplishes that for needles of length two.

  https://github.com/ashvardanian/StringZilla/blob/266c01710dddf71fc44800f36c2f992ca9735f87/include/stringzilla/stringzilla.h#L1585-L1637

  Going beyond that, to long needles, Boyer-Moore (BM) and its variants are often the best choice.
  It has two tables: the good-suffix shift and the bad-character shift.
  Common choice is to use the simplified BMH algorithm, which only uses the bad-character shift table, reducing the pre-processing time.
  We do the same for mid-length needles up to 256 bytes long.
  That way the stack-allocated shift table remains small.

  https://github.com/ashvardanian/StringZilla/blob/46e957cd4f9ecd4945318dd3c48783dd11323f37/include/stringzilla/stringzilla.h#L1774-L1825

  In the C++ Standards Library, the `std::string::find` function uses the BMH algorithm with Raita's heuristic.
  Before comparing the entire string, it matches the first, last, and the middle character.
  Very practical, but can be slow for repetitive characters.
  Both SWAR and SIMD backends of StringZilla have a cheap pre-processing step, where we locate unique characters.
  This makes the library a lot more practical when dealing with non-English corpora.

  https://github.com/ashvardanian/StringZilla/blob/46e957cd4f9ecd4945318dd3c48783dd11323f37/include/stringzilla/stringzilla.h#L1398-L1431

  All those, still, have $O(hn)$ worst case complexity.
  To guarantee $O(h)$ worst case time complexity, the Apostolico-Giancarlo (AG) algorithm adds an additional skip-table.
  Preprocessing phase is $O(n+sigma)$ in time and space.
  On traversal, performs from $(h/n)$ to $(3h/2)$ comparisons.
  It however, isn't practical on modern CPUs.
  A simpler idea, the Galil-rule might be a more relevant optimizations, if many matches must be found.

  Other algorithms previously considered and deprecated:

  - Apostolico-Giancarlo algorithm for longer needles. _Control-flow is too complex for efficient vectorization._
  - Shift-Or-based Bitap algorithm for short needles. _Slower than SWAR._
  - Horspool-style bad-character check in SIMD backends. _Effective only for very long needles, and very uneven character distributions between the needle and the haystack. Faster "character-in-set" check needed to generalize._

  > § Reading materials.
  > [Exact String Matching Algorithms in Java](https://www-igm.univ-mlv.fr/~lecroq/string).
  > [SIMD-friendly algorithms for substring searching](http://0x80.pl/articles/simd-strfind.html).



  Levenshtein distance is the best known edit-distance for strings, that checks, how many insertions, deletions, and substitutions are needed to transform one string to another.
  It's extensively used in approximate string-matching, spell-checking, and bioinformatics.

  The computational cost of the Levenshtein distance is $O(n * m)$, where $n$ and $m$ are the lengths of the string arguments.
  To compute that, the naive approach requires $O(n * m)$ space to store the "Levenshtein matrix", the bottom-right corner of which will contain the Levenshtein distance.
  The algorithm producing the matrix has been simultaneously studied/discovered by the Soviet mathematicians Vladimir Levenshtein in 1965, Taras Vintsyuk in 1968, and American computer scientists - Robert Wagner, David Sankoff, Michael J. Fischer in the following years.
  Several optimizations are known:

  1. __Space Optimization__: The matrix can be computed in $O(min(n,m))$ space, by only storing the last two rows of the matrix.
  2. __Divide and Conquer__: Hirschberg's algorithm can be applied to decompose the computation into subtasks.
  3. __Automata__: Levenshtein automata can be effective, if one of the strings doesn't change, and is a subject to many comparisons.
  4. __Shift-Or__: Bit-parallel algorithms transpose the matrix into a bit-matrix, and perform bitwise operations on it.

  The last approach is quite powerful and performant, and is used by the great [RapidFuzz][rapidfuzz] library.
  It's less known, than the others, derived from the Baeza-Yates-Gonnet algorithm, extended to bounded edit-distance search by Manber and Wu in 1990s, and further extended by Gene Myers in 1999 and Heikki Hyyro between 2002 and 2004.

  StringZilla introduces a different approach, extensively used in Unum's internal combinatorial optimization libraries.
  The approach doesn't change the number of trivial operations, but performs them in a different order, removing the data dependency, that occurs when computing the insertion costs.
  This results in much better vectorization for intra-core parallelism and potentially multi-core evaluation of a single request.

  Next design goals:

  - [ ] Generalize fast traversals to rectangular matrices.
  - [ ] Port x86 AVX-512 solution to Arm NEON.

  > § Reading materials.
  > [Faster Levenshtein Distances with a SIMD-friendly Traversal Order](https://ashvardanian.com/posts/levenshtein-diagonal).

  [rapidfuzz]: https://github.com/rapidfuzz/RapidFuzz



  The field of bioinformatics studies various representations of biological structures.
  The "primary" representations are generally strings over sparse alphabets:

  - [DNA][faq-dna] sequences, where the alphabet is {A, C, G, T}, ranging from ~100 characters for short reads to 3 billion for the human genome.
  - [RNA][faq-rna] sequences, where the alphabet is {A, C, G, U}, ranging from ~50 characters for tRNA to thousands for mRNA.
  - [Proteins][faq-protein], where the alphabet is made of 22 amino acids, ranging from 2 characters for [dipeptide][faq-dipeptide] to 35,000 for [Titin][faq-titin], the longest protein.

  The shorter the representation, the more often researchers may want to use custom substitution matrices.
  Meaning that the cost of a substitution between two characters may not be the same for all pairs.

  StringZilla adapts the fairly efficient two-row Wagner-Fisher algorithm as a baseline serial implementation of the Needleman-Wunsch score.
  It supports arbitrary alphabets up to 256 characters, and can be used with either [BLOSUM][faq-blosum], [PAM][faq-pam], or other substitution matrices.
  It also uses SIMD for hardware acceleration of the substitution lookups.
  This however, does not __yet__ break the data-dependency for insertion costs, where 80% of the time is wasted.
  With that solved, the SIMD implementation will become 5x faster than the serial one.

  [faq-dna]: https://en.wikipedia.org/wiki/DNA
  [faq-rna]: https://en.wikipedia.org/wiki/RNA
  [faq-protein]: https://en.wikipedia.org/wiki/Protein
  [faq-blosum]: https://en.wikipedia.org/wiki/BLOSUM
  [faq-pam]: https://en.wikipedia.org/wiki/Point_accepted_mutation
  [faq-dipeptide]: https://en.wikipedia.org/wiki/Dipeptide
  [faq-titin]: https://en.wikipedia.org/wiki/Titin



  A lot has been written about the time computers spend copying memory and how that operation is implemented in LibC.
  Interestingly, the operation can still be improved, as most Assembly implementations use outdated instructions.
  Even performance-oriented STL replacements, like Meta's [Folly v2024.09.23 focus on AVX2](https://github.com/facebook/folly/blob/main/folly/memset.S), and don't take advantage of the new masked instructions in AVX-512 or SVE.

  In AVX-512, StringZilla uses non-temporal stores to avoid cache pollution, when dealing with very large strings.
  Moreover, it handles the unaligned head and the tails of the `target` buffer separately, ensuring that writes in big copies are always aligned to cache-line boundaries.
  That's true for both AVX2 and AVX-512 backends.

  StringZilla also contains "drafts" of smarter, but less efficient algorithms, that minimize the number of unaligned loads, perfoming shuffles and permutations.
  That's a topic for future research, as the performance gains are not yet satisfactory.

  > § Reading materials.
  > [`memset` benchmarks](https://github.com/nadavrot/memset_benchmark?tab=readme-ov-file) by Nadav Rotem.
  > [Cache Associativity](https://en.algorithmica.org/hpc/cpu-cache/associativity/) by Sergey Slotin.



  Generating random strings from different alphabets is a very common operation.
  StringZilla accepts an arbitrary [Pseudorandom Number Generator][faq-prng] to produce noise, and an array of characters to sample from.
  Sampling is optimized to avoid integer division, a costly operation on modern CPUs.
  For that a 768-byte long lookup table is used to perform 2 lookups, 1 multiplication, 2 shifts, and 2 accumulations.

  https://github.com/ashvardanian/StringZilla/blob/266c01710dddf71fc44800f36c2f992ca9735f87/include/stringzilla/stringzilla.h#L2490-L2533

  [faq-prng]: https://en.wikipedia.org/wiki/Pseudorandom_number_generator



  For lexicographic sorting of strings, StringZilla uses a "hybrid-hybrid" approach with $O(n * log(n))$ and.

  1. Radix sort for first bytes exported into a continuous buffer for locality.
  2. IntroSort on partially ordered chunks to balance efficiency and worst-case performance.
     1. IntroSort begins with a QuickSort.
     2. If the recursion depth exceeds a certain threshold, it switches to a HeapSort.

  A better algorithm is in development.
  Check #173 for design goals and progress updates.



  > [!WARNING]
  > Hash functions are not cryptographically safe and are currently under active development.
  > They may change in future __minor__ releases.

  Choosing the right hashing algorithm for your application can be crucial from both performance and security standpoint.
  In StringZilla a 64-bit rolling hash function is reused for both string hashes and substring hashes, Rabin-style fingerprints.
  Rolling hashes take the same amount of time to compute hashes with different window sizes, and are fast to update.
  Those are not however perfect hashes, and collisions are frequent.
  StringZilla attempts to use SIMD, but the performance is not __yet__ satisfactory.
  On Intel Sapphire Rapids, the following numbers can be expected for N-way parallel variants.

  - 4-way AVX2 throughput with 64-bit integer multiplication (no native support): 0.28 GB/s.
  - 4-way AVX2 throughput with 32-bit integer multiplication: 0.54 GB/s.
  - 4-way AVX-512DQ throughput with 64-bit integer multiplication: 0.46 GB/s.
  - 4-way AVX-512 throughput with 32-bit integer multiplication: 0.58 GB/s.
  - 8-way AVX-512 throughput with 32-bit integer multiplication: 0.11 GB/s.

  Next design goals:

  - [ ] Try gear-hash and other rolling approaches.



  Cyclic Redundancy Check 32 is one of the most commonly used hash functions in Computer Science.
  It has in-hardware support on both x86 and Arm, for both 8-bit, 16-bit, 32-bit, and 64-bit words.
  The `0x1EDC6F41` polynomial is used in iSCSI, Btrfs, ext4, and the `0x04C11DB7` in SATA, Ethernet, Zlib, PNG.
  In case of Arm more than one polynomial is supported.
  It is, however, somewhat limiting for Big Data usecases, which often have to deal with more than 4 Billion strings, making collisions unavoidable.
  Moreover, the existing SIMD approaches are tricky, combining general purpose computations with specialized instructions, to utilize more silicon in every cycle.

  > § Reading materials.
  > [Comprehensive derivation of approaches](https://github.com/komrad36/CRC)
  > [Faster computation for 4 KB buffers on x86](https://www.corsix.org/content/fast-crc32c-4k)
  > [Comparing different lookup tables](https://create.stephan-brumme.com/crc32)
  > Great open-source implementations.
  > [By Peter Cawley](https://github.com/corsix/fast-crc32)
  > [By Stephan Brumme](https://github.com/stbrumme/crc32)



  [MurmurHash](https://github.com/aappleby/smhasher/blob/master/README.md) from 2008 by Austin Appleby is one of the best known non-cryptographic hashes.
  It has a very short implementation and is capable of producing 32-bit and 128-bit hashes.
  The [CityHash](https://opensource.googleblog.com/2011/04/introducing-cityhash) from 2011 by Google and the [xxHash](https://github.com/Cyan4973/xxHash) improve on that, better leveraging the super-scalar nature of modern CPUs and producing 64-bit and 128-bit hashes.

  Neither of those functions are cryptographic, unlike MD5, SHA, and BLAKE algorithms.
  Most of cryptographic hashes are based on the Merkle-Damgård construction, and aren't resistant to the length-extension attacks.
  Current state of the Art, might be the [BLAKE3](https://github.com/BLAKE3-team/BLAKE3) algorithm.
  It's resistant to a broad range of attacks, can process 2 bytes per CPU cycle, and comes with a very optimized official implementation for C and Rust.
  It has the same 128-bit security level as the BLAKE2, and achieves its performance gains by reducing the number of mixing rounds, and processing data in 1 KiB chunks, which is great for longer strings, but may result in poor performance on short ones.

  All mentioned libraries have undergone extensive testing and are considered production-ready.
  They can definitely accelerate your application, but so may the downstream mixer.
  For instance, when a hash-table is constructed, the hashes are further shrunk to address table buckets.
  If the mixer looses entropy, the performance gains from the hash function may be lost.
  An example would be power-of-two modulo, which is a common mixer, but is known to be weak.
  One alternative would be the [fastrange](https://github.com/lemire/fastrange) by Daniel Lemire.
  Another one is the [Fibonacci hash trick](https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/) using the Golden Ratio, also used in StringZilla.



  Most StringZilla operations are byte-level, so they work well with ASCII and UTF8 content out of the box.
  In some cases, like edit-distance computation, the result of byte-level evaluation and character-level evaluation may differ.
  So StringZilla provides following functions to work with Unicode:

  - `sz_edit_distance_utf8` - computes the Levenshtein distance between two UTF-8 strings.
  - `sz_hamming_distance_utf8` - computes the Hamming distance between two UTF-8 strings.

  Java, JavaScript, Python 2, C#, and Objective-C, however, use wide characters (`wchar`) - two byte long codes, instead of the more reasonable fixed-length UTF32 or variable-length UTF8.
  This leads [to all kinds of offset-counting issues][wide-char-offsets] when facing four-byte long Unicode characters.
  So consider transcoding with [simdutf](https://github.com/simdutf/simdutf), if you are coming from such environments.

  [wide-char-offsets]: https://josephg.com/blog/string-length-lies/



  Please check out the [contributing guide](https://github.com/ashvardanian/StringZilla/blob/main/CONTRIBUTING.md) for more details on how to setup the development environment and contribute to this project.
  If you like this project, you may also enjoy [USearch][usearch], [UCall][ucall], [UForm][uform], and [SimSIMD][simsimd]. 🤗

  [usearch]: https://github.com/unum-cloud/usearch
  [ucall]: https://github.com/unum-cloud/ucall
  [uform]: https://github.com/unum-cloud/uform
  [simsimd]: https://github.com/ashvardanian/simsimd

  If you like strings and value efficiency, you may also enjoy the following projects:

  - [simdutf](https://github.com/simdutf/simdutf) - transcoding UTF8, UTF16, and UTF32 LE and BE.
  - [hyperscan](https://github.com/intel/hyperscan) - regular expressions with SIMD acceleration.
  - [pyahocorasick](https://github.com/WojciechMula/pyahocorasick) - Aho-Corasick algorithm in Python.
  - [rapidfuzz](https://github.com/rapidfuzz/RapidFuzz) - fast string matching in C++ and Python.

  If you are looking for more reading materials on this topic, consider the following:

  - [5x faster strings with SIMD & SWAR](https://ashvardanian.com/posts/stringzilla/).
  - [The Painful Pitfalls of C++ STL Strings](https://ashvardanian.com/posts/painful-strings/).



  Feel free to use the project under Apache 2.0 or the Three-clause BSD license at your preference.


pkgId: a1c2fcc55f089f0ebb2874915c8d5cacac5b825935ea576d26d78ac094db6aac
name: python-strip-notebook-metadata-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for strip-notebook-metadata
url: https://github.com/kyriaki-mvr/strip-notebook-metadata
rpm_license: GPL
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strip-notebook-metadata-0.2.0-1.src.rpm
location_href: Packages/python-strip-notebook-metadata-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  ![PyPI - Version](https://img.shields.io/pypi/v/strip-notebook-metadata?color=green)


  A package to strip metadata from code cells and markdowns without editing the output in Jupyter notebooks.

  A simple, effective tool for cleaning metadata from Jupyter notebooks. This package helps in reducing the size of notebooks and removing potentially sensitive information stored in metadata, making notebooks cleaner for version control and sharing.

  Pypi.org: https://pypi.org/project/strip-notebook-metadata/



  - **Simple Command-Line interface**: Easy to use, run it directly from your terminal.
  - **Cleans metadata**: Strips out metadata from both code and markdown cells.
  - **Supports Jupyter Notebooks**: Works with `.ipynb` files, the standard Jupyter notebook format.



  Install `strip-notebook-metadata` using pip:

  ```bash
  pip install strip-notebook-metadata
  ```



  - sys
  - nbformat



  To strip metadata from a Jupyter notebook, run:

  ```bash
  strip-notebook-metadata path/to/your_notebook.ipynb
  ```

  Replace `path/to/your_notebook.ipynb` with the actual path to the notebook you wish to clean.

  To add it under your pre-commit hooks, add the following under your **pre-commit-config.yaml**:
  ```
  -   repo: https://github.com/kyriaki-mvr/strip-notebook-metadata
      rev: v0.2.0
      hooks:
      -   id: strip-notebook-metadata
  ```



  Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcomed.



  If you have any feedback, please file an issue on the GitHub repository page. I am always looking to improve and appreciate all feedback, bug reports, and suggestions.



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



  - Kyriaki Mavropoulou (kyriaki@quanterra.gr) - Initial work


  02-March-2024


pkgId: 0e3aa09545c35e0160e4126db3c2869c6616be421c974597e7550d10b244c92f
name: python-strique-proto-schema-help
arch: noarch
version: 18.4.0
epoch: 0
release: 1
summary: Development documents and examples for strique-proto-schema
url: https://pypi.org/project/strique-proto-schema/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strique-proto-schema-18.4.0-1.src.rpm
location_href: Packages/python-strique-proto-schema-help-18.4.0-1.noarch.rpm
checksum_type: sha256
description:
  API contracts and Data Transfer Objects(DTO) in the form of Protocol Buffers for Strique binaries.

  Protobuf provides a language agnostic way to define schema and contracts. The protbufs genertae language specific code during compilation and the language specific ojects are packaged and exported to different package registries.


  * `*.*.*-rc.*` - This is a snapshot version. Never use this in prod. This is for intermediate releases.
  * `*.*.*` - This is for prod version.


  Add strique proto package as a dependency in your pom.xml [using this package guide](https://github.com/DigiStrique-Solutions/strique-proto-schema/packages/2108552).


  * Create a Personal access token from developer settings of your github and give it read permissions to the package.
  * Add following to `~/.npmrc`.
  ```
  @digistrique-solutions:registry=https://npm.pkg.github.com/
  //npm.plg.github.com/:_authToken=<Personal access token from above step>
  ```
  * Use [this guide](https://github.com/DigiStrique-Solutions/strique-proto-schema/pkgs/npm/strique-proto-schema) to add the package to your TS/JS project.


  * Before installing the package, make sure you have Python and pip (Python's package installer) installed on your system.
  * Install the Strique proto package:
  Use pip to install the strique-proto-schema package by running the following command:
  ```
  pip install strique-proto-schema
  ```


pkgId: 2f66aa0ac978e5063518da60cca9146cfb0d3c9aa52ff2ddf1e6293549ac6017
name: python-strongmind-platform-sdk-help
arch: noarch
version: 3.7.3
epoch: 0
release: 1
summary: Development documents and examples for strongmind-platform-sdk
url: https://github.com/StrongMind/platform-python-sdk
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-strongmind-platform-sdk-3.7.3-1.src.rpm
location_href: Packages/python-strongmind-platform-sdk-help-3.7.3-1.noarch.rpm
checksum_type: sha256
description:
  This Python package is intended to provide clients and models for accessing the Platform APIs.

  **Current Version**: `3.2.0`



  Python 3.6




  ```sh
  pip install strongmind-platform-sdk
  ```

  Then import and use the package:
  ```python
  from strongmind_platform_sdk.platform_sdk.clients.oneroster_client import get_authenticated_oneroster_client
  from oneroster_client.api.enrollments_management_api import EnrollmentsManagementApi
  base_client = get_authenticated_oneroster_client(
              base_url,
              id_server_base_url,
              client_id,
              client_secret
          )

  enrollments_client = EnrollmentsManagementApi(base_client)
  enrollment = enrollments_client.get_enrollment("{UUID}")
  ```


  ![spec-image018](https://user-images.githubusercontent.com/3137263/156631023-7bade029-d038-4a64-88d3-104d416d7d90.jpeg)


pkgId: 5d16bd4c889b3e48b72e8572250d9f7b7a92252a39ecf324047413313998bd2d
name: python-struct_writer-help
arch: noarch
version: 0.4.8
epoch: 0
release: 1
summary: Development documents and examples for struct_writer
url: https://github.com/drbartling/struct-writer
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-struct_writer-0.4.8-1.src.rpm
location_href: Packages/python-struct_writer-help-0.4.8-1.noarch.rpm
checksum_type: sha256
description:
  Define a bare structured API, useful for interfaces that don't need to be
  portable across multiple platforms.  E.G. embedded applications targeting a
  single architecture.





  Define the API in TOML or another markup language.

  ```toml
  [file]
  brief = 'Command set for a thermostat'
  description = 'Provides basic debug commands for a thermostat.  Allows for both imperial and metric units.'

  [commands]
  description = "Debug commands for thermostat"
  display_name = "Thermostat command"
  type = "group"

  [cmd_reset]
  description = "Request a software reset"
  display_name = "reset request"
  size = 0
  type = "structure"
  groups.commands = { value = 1, name = "reset" }

  [cmd_temperature_set]
  description = "Request a change in temperature"
  display_name = "Request temperature change"
  members = [
    { name = "temperature", size = 2, type = 'int', description = 'Desired temperature' },
    { name = "units", size = 1, type = 'temperature_units', description = 'Selected temperature unit' },
  ]
  size = 3
  type = "structure"
  groups.commands = { value = 2, name = "temperature_set" }
  ```

  This will generate code that looks like this for c by default
  ```c
  /**
   * @file
   * @brief Command set for a thermostat
   *
   * Provides basic debug commands for a thermostat.  Allows for both imperial and
   * metric units.
   *
   * @note This file is autogenerated using structured_api
   */



  extern "C" {





  /// commands tag
  /// Enumeration for commands tag
  typedef enum commands_tag_e {
      /// @see cmd_reset_t
      commands_tag_reset = 0x1,
      /// @see cmd_temperature_set_t
      commands_tag_temperature_set = 0x2,
  } commands_tag_t;
  STATIC_ASSERT_TYPE_SIZE(commands_tag_t, 1);

  /// reset request
  /// Request a software reset
  typedef struct cmd_reset_s {
      /// Structure is intentionally empty (zero sized)
      uint8_t empty[0];
  } cmd_reset_t;
  STATIC_ASSERT_TYPE_SIZE(cmd_reset_t, 0);

  /// Request temperature change
  /// Request a change in temperature
  typedef struct cmd_temperature_set_s {
      /// Desired temperature
      int16_t temperature;
      /// Selected temperature unit
      temperature_units_t units;
  } cmd_temperature_set_t;
  STATIC_ASSERT_TYPE_SIZE(cmd_temperature_set_t, 3);

  /// Thermostat command
  /// Debug commands for thermostat
  typedef struct commands_u_s {
      /// commands tag
      commands_tag_t tag;
      union {
          /// Request a software reset
          cmd_reset_t reset;
          /// Request a change in temperature
          cmd_temperature_set_t temperature_set;
      } value;
  } commands_u_t;
  STATIC_ASSERT_TYPE_SIZE(commands_u_t, 4);


  }



  ```

  An example is given in the examples folder:
  ```bash
  struct-writer --input-definition examples/structures.toml --output-file examples/output/structures.h
  ```


  Code generation is customizable using templates.  If no templates are provided, we use the default C template.

  The default template is shown in the examples folder.

  ```bash
  struct-writer --input-definition examples/structures.toml --output-file examples/output/structures.h --template-file examples/template.toml
  ```



  Chain templates together to more tightly specify certain files in a project.  For example if a certain file needs specific includes.

  ```bash
  struct-writer --input-definition examples/structures.toml --output-file examples/output/structures.h --template-file examples/template.toml --template-file examples/packed_templates.toml
  ```


  ```
  watchexec.exe --clear --restart  --debounce 500 --exts py,toml "isort . && black . && pytest && struct-writer --input-definition examples/structures.toml --template-files examples/template.toml --output-file examples/output/structures.h && pylint ."
  ```


pkgId: d7f684fd4604e2ebbe0a16d78a5efb031055ad7abfae7cfb2c8b7aff3a3aa385
name: python-structifyai-help
arch: noarch
version: 1.66.0
epoch: 0
release: 1
summary: Development documents and examples for structifyai
url: https://github.com/StructifyAI/structify-python
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-structifyai-1.66.0-1.src.rpm
location_href: Packages/python-structifyai-help-1.66.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/structifyai.svg)](https://pypi.org/project/structifyai/)
  [![Documentation Status](https://readthedocs.org/projects/structify/badge/?version=latest)](https://structify.readthedocs.io/en/latest/?badge=latest)

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




  The REST API documentation can be found on [api.structify.ai](https://api.structify.ai/). The full API of this library can be found in [api.md](https://github.com/StructifyAI/structify-python/tree/main/api.md).



  ```sh

  pip install structifyai
  ```



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

  ```python
  import os
  from structify import Structify

  client = Structify(
      api_key=os.environ.get("STRUCTIFY_API_TOKEN"),  # This is the default and can be omitted
      
      environment="deployment",
  )

  server_information = client.server.version()
  print(server_information.version)
  ```

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



  Simply import `AsyncStructify` instead of `Structify` and use `await` with each API call:

  ```python
  import os
  import asyncio
  from structify import AsyncStructify

  client = AsyncStructify(
      api_key=os.environ.get("STRUCTIFY_API_TOKEN"),  # This is the default and can be omitted
      
      environment="deployment",
  )


  async def main() -> None:
      server_information = await client.server.version()
      print(server_information.version)


  asyncio.run(main())
  ```

  Functionality between the synchronous and asynchronous clients is otherwise identical.



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

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

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



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

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

  All errors inherit from `structify.APIError`.

  ```python
  import structify
  from structify import Structify

  client = Structify()

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

  Error codes are as followed:

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



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

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

  ```python
  from structify import Structify


  client = Structify(
      
      max_retries=0,
  )


  client.with_options(max_retries=5).server.version()
  ```



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

  ```python
  from structify import Structify


  client = Structify(
      
      timeout=20.0,
  )


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


  client.with_options(timeout=5.0).server.version()
  ```

  On timeout, an `APITimeoutError` is thrown.

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





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

  You can enable logging by setting the environment variable `STRUCTIFY_LOG` to `info`.

  ```shell
  $ export STRUCTIFY_LOG=info
  ```

  Or to `debug` for more verbose logging.



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

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



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

  ```py
  from structify import Structify

  client = Structify()
  response = client.server.with_raw_response.version()
  print(response.headers.get('X-My-Header'))

  server = response.parse()  # get the object that `server.version()` would have returned
  print(server.version)
  ```

  These methods return an [`APIResponse`](https://github.com/StructifyAI/structify-python/tree/main/src/structify/_response.py) object.

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



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

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

  ```python
  with client.server.with_streaming_response.version() as response:
      print(response.headers.get("X-My-Header"))

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

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



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

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



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

  ```py
  import httpx

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

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



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



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



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

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

  ```python
  import httpx
  from structify import Structify, DefaultHttpxClient

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

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

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



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



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

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

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

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



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

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

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



  Python 3.8 or higher.



  See [the contributing documentation](https://github.com/StructifyAI/structify-python/tree/main/./CONTRIBUTING.md).


pkgId: 089aefeb902a05a306d6d44b8c6635c2d1d164045406f6d237c21699300e780b
name: python-structifyai-help
arch: noarch
version: 1.69.0
epoch: 0
release: 1
summary: Development documents and examples for structifyai
url: https://github.com/StructifyAI/structify-python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-structifyai-1.69.0-1.src.rpm
location_href: Packages/python-structifyai-help-1.69.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/structifyai.svg)](https://pypi.org/project/structifyai/)
  [![Documentation Status](https://readthedocs.org/projects/structify/badge/?version=latest)](https://structify.readthedocs.io/en/latest/?badge=latest)

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




  The REST API documentation can be found on [api.structify.ai](https://api.structify.ai/). The full API of this library can be found in [api.md](https://github.com/StructifyAI/structify-python/tree/main/api.md).



  ```sh

  pip install structifyai
  ```



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

  ```python
  import os
  from structify import Structify

  client = Structify(
      api_key=os.environ.get("STRUCTIFY_API_TOKEN"),  # This is the default and can be omitted
      
      environment="deployment",
  )

  server_information = client.server.version()
  print(server_information.version)
  ```

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



  Simply import `AsyncStructify` instead of `Structify` and use `await` with each API call:

  ```python
  import os
  import asyncio
  from structify import AsyncStructify

  client = AsyncStructify(
      api_key=os.environ.get("STRUCTIFY_API_TOKEN"),  # This is the default and can be omitted
      
      environment="deployment",
  )


  async def main() -> None:
      server_information = await client.server.version()
      print(server_information.version)


  asyncio.run(main())
  ```

  Functionality between the synchronous and asynchronous clients is otherwise identical.



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

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

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



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

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

  All errors inherit from `structify.APIError`.

  ```python
  import structify
  from structify import Structify

  client = Structify()

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

  Error codes are as followed:

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



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

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

  ```python
  from structify import Structify


  client = Structify(
      
      max_retries=0,
  )


  client.with_options(max_retries=5).server.version()
  ```



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

  ```python
  from structify import Structify


  client = Structify(
      
      timeout=20.0,
  )


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


  client.with_options(timeout=5.0).server.version()
  ```

  On timeout, an `APITimeoutError` is thrown.

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





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

  You can enable logging by setting the environment variable `STRUCTIFY_LOG` to `info`.

  ```shell
  $ export STRUCTIFY_LOG=info
  ```

  Or to `debug` for more verbose logging.



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

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



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

  ```py
  from structify import Structify

  client = Structify()
  response = client.server.with_raw_response.version()
  print(response.headers.get('X-My-Header'))

  server = response.parse()  # get the object that `server.version()` would have returned
  print(server.version)
  ```

  These methods return an [`APIResponse`](https://github.com/StructifyAI/structify-python/tree/main/src/structify/_response.py) object.

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



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

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

  ```python
  with client.server.with_streaming_response.version() as response:
      print(response.headers.get("X-My-Header"))

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

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



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

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



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

  ```py
  import httpx

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

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



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



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



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

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

  ```python
  import httpx
  from structify import Structify, DefaultHttpxClient

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

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

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



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

  ```py
  from structify import Structify

  with Structify() as client:
    
    ...


  ```



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

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

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

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



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

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

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



  Python 3.8 or higher.



  See [the contributing documentation](https://github.com/StructifyAI/structify-python/tree/main/./CONTRIBUTING.md).


pkgId: 9165918f03a6ce4a19ccce27f7d2c38b4314e82f6f62706ab1d8cbe810028268
name: python-subbrute-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for subbrute
url: https://github.com/ByteBreach/subbrute
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-subbrute-1.0.0-1.src.rpm
location_href: Packages/python-subbrute-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  - Scan for subdomains using a wordlist.
  - Save discovered subdomains to a file.
  - Customize timeouts for HTTP requests.


pkgId: 0252d1dbd8811fd9eb4a72b91423044e3d017a240e9b894bef79b9b3494f538d
name: python-subdata-help
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: Development documents and examples for subdata
url: https://github.com/frohleon/subdata_library
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-subdata-0.2.1-1.src.rpm
location_href: Packages/python-subdata-help-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  We develop the subdata Python library as a central resource for researchers interested in evaluating the alignment of LLMs with human perspectives on downstream NLP tasks. While a number of approaches exist that test whether a fine-tuned or instruction-tuned LLM consistently mirrors and thus represents different human individuals or subgroups, there is no such approach and resource for testing the alignment directly where it oftentimes truly matters in NLP: the downstream (annotation) task. In essence, the subdata library allows easy access to a number of datasets suitable for evaluating whether a LLM replicates the same annotation effects as expected or observed from human annotators. Crucially, we not just facilitate the download of single datasets, but rather allows researchers to pick, choose, and combine exactly and only those instances relevant to them from a broad range of available datasets. While the current state of the subdata library is limited to the construct of hate speech and an approach for the evaluation of alignment briefly introduced below and in our corresponding paper **SubData: A Python Library to Collect and Combine Datasets for Evaluating LLM Alignment on Downstream Tasks** (link to preprint coming soon), we aim to extend its scope to more (subjective) constructs and tasks and to introduce additional approaches for measuring the LLM alignment with different human perspectives.

  The library is developed and maintained by Leon Fröhling (leon.froehling@gesis.org) and Pietro Bernardelle (p.bernardelle@uq.edu.au). We welcome any suggestions for further datasets that should be included or possible extensions of the library's functionality. We are also very interested in any exchange and inspiration on everything related to LLM subjectivity and the alignment of LLMs with different human perspectives, so please reach out if you would like to have a friendly chat on the topic.


  We make the library available via PyPi: https://pypi.org/project/subdata/. It can thus be conveniently installed via `pip install subdata`.


  In the following, we explain the core functionality of the subdata library. Most importantly, the functions *create_target_dataset* and *create_category_dataset* allow the user to automatically download, process and combine instances targeted at a specified target group or category from different data sources into a single dataset, using a standardized mapping from keywords to target and a unified taxonomy. The functions *get_target_info* and *get_category_info* may be consulted before the call to create the actual dataset, as they provide the info on the number of instances and data sources available for the specified target groups or categories.

  In addition to the library's core functionality, we took care to implement the possibility to modify the resources we provide, namely, the mapping from keywords found in the original datasets to target groups and the assignment of target groups into categories. The functions *update_mapping_specific* and *update_mapping_all* allow to map a set of keywords to another target group, either for a single dataset or across all datasets. The function *add_target* allows to introduce a new target group altogether, while the function *update_taxonomy* allows to move target groups from one category to another as well as to even create new categories, assigning multiple existing target groups into the new category. Lastly, the function *update_overview* should be called after any modification to the mapping or the taxonomy is done in order to update the overview used internally to combine the requested dataset when calling *create_target_dataset* or *create_category_dataset*.

  `create_target_dataset`
    - input: target (str), mapping_name (str, default 'original'), overview_name (str, default 'original', hf_token (str, default None)
    - takes a valid target, downloads, processes and combines all available datasets for the target and returns a single dataset df with text, target and source columns. some datasets are only available if providing a valid huggingface token or uploading the raw data to input_folder. uses the specified mapping, taxononmy and overview for the creation of the dataset, defaulting to the original versions.
    - output: target_dataset (df)

  `create_category_dataset`
    - input: category (str), mapping_name (str, default 'original'), taxonomy_name (str, default 'original', overview_name (str, default 'original'), hf_token (str, default None)
    - takes a valid category, downloads, processes and combines all available datasets for the targets in that category and returns a single dataset df with text, target and source columns. some datasets are only available if providing a valid huggingface token or uploading the raw data to input_folder. uses the specified mapping, taxononmy and overview for the creation of the dataset, defaulting to the original versions.
    - output: target_dataset (df)

  `get_target_info`
    - input: target (str), overview_name (str, default 'original')
    - takes a valid target and returns an overview of the datasets from which the target is available, the number of instances for the target in the dataset as well as the access requirements for the dataset. if the dataset is not readily available there is also information on how to access the dataset. uses the specified overview for the provided information, defaulting to the original version.
    - output: none

  `get_category_info`
    - input: category (str), overview_name (str, default 'original'), taxonomy_name (str, default 'original')
    - takes a valid category and returns an overview of the targets and the corresponding number of instances within the category, an overview of the datasets from which the targets are available and the corresponding number of instances per dataset, as well as the access requirements for the dataset. if the dataset is not readily available there is also information on how to access the dataset. uses the specified taxonomy and overview for the provided information, defaulting to the original versions.
    - output: none

  `update_mapping_specific`
    - input: mapping_change ({dataset_name: {key_original: value_new}}), mapping_name (str, default 'modified')
    - updates the specified mapping (either new ly created if mapping_name non-existent or updating if mapping_name already created earlier) per dataset according to the provided dictionary. referring to the original mapping, users may map the key_original found in the original dataset_name to new targets (value_new). e.g., {'fanton_2021': {'POC': 'blacks'}} would map instances in dataset 'fanton_2021' that have the key_original 'POC' to value_new 'blacks' (originally, these are mapped to 'race_unspecified'). stores the resulting mapping with name 'mapping_name'. requires existing key_original (keys in original datasets) and value_new (targets) - refer to original mapping to identify valid values.
    - output: mapping_dict (df)

  `update_mapping_all`
    - input: mapping_change ({key_original: value_new}), mapping_name (str, default 'modified')
    - updates the specified mapping (either newly created if mapping_name non-existent or updating if mapping_name already created earlier) across datasets according to the provided dictionary. referring to the original mapping, users may map the key_original found in different datasets to new targets (value_new). e.g., {'africans': 'origin_unspecified'} would map instances in any dataset that have the key_original 'africans' to value_new 'origin_unspecified' (originally, these are mapped to 'blacks'). stores the resulting mapping with name 'mapping_name'. requires existing key_original (keys in original datasets) and value_new (targets) - refer to original mapping to identify valid values.
    - output: mapping_dict (df)

  `update_taxonomy`
    - input: taxonomy_change ({target: (old_category, new_category)}), taxonomy_name (str, default 'modified')
    - updates the specified taxonomy (either newly created if taxonomy_name non-existent or updating if taxonomy_name already created earlier), moving the specified target from old_category to new_category. if new_category == None, then the target will effectively be removed from the updated taxonomy. if new_category (str) not found in specified taxonomy, a new category with name new_category will be added to the updated taxonomy. e.g., {'jews': ('religion', 'race')} will move target 'jews' from category 'religion' to category 'race'. e.g., {'jews': ('religion', None)} will remove target 'jews' from taxonomy. e.g., {'jews': ('religion', 'relevant'), 'blacks': ('race', 'relevant'} will move targets 'jews' and 'blacks' into newly created category 'relevant'.
    - output: taxonomy_dict (df)

  `add_target`
    - input: target (str), target_category (str), target_keywords [list of str], mapping_name (str, default 'modified'), taxonomy_name (str, default 'modified')
    - creates a new target and moves it into specified target_category for the specified taxonomy (either newly created if taxonomy_name non-existent or updating if taxonomy_name already created earlier), mapping all original keywords specified in target_keywords to the new target for the specified mapping (either newly created if mapping_name non-existent or updating if mapping_name already created earlier). the target_category and target_keywords must already be existing - please refer to the taxonomy and the mapping to identify a valid target_category and valid target_keywords. e.g., target='disabled_general', target_category='disability', target_keywords=['disabled_unspecified','disabled','disabled_other'] creates new target 'disabled_general' in category 'disability' and maps the specified keywords to the newly created target.
    - output: mapping_dict (df)

  `update_overview`
    - input: overview_name (str, default 'modified'), mapping_name (str, default 'modified'), taxonomy_name (str, defaut 'modified'), hf_token (str, default None)
    - updates the overview that informs the get_info and create_dataset functions and stores the new overview with name overview_name. uses the mapping and taxonomy provided via mapping_name and taxonomy_name to create the updated overview. internally, the function tries to access all datasets to create the full overview, thus requiring a hf_token and the manual upload of relevant datasets into input_folder to consider all available datasets. function should be called after any operation that modifies the mapping or the taxonomy.


  The following tables document the original mapping that is used in the subdata library to map the target keywords found in the original datasets to a single taxonomy of target groups. In creating this mapping, we tried to strike a delicate balance between being as precise and specific as possible while keeping the resulting target groups still sufficiently general. Whenever multiple datasets used similar specific target groups, we also introduced the corresponding target group (e.g., disabled_mental). When a dataset used a keyword without mentioning the target group more specifically, we mapped it into a more general target group introduced for each category (e.g., disabled_unspecified).

  For the mapping, most of the decisions taken were rather straightforward and little contested, e.g., it seems logical to map both the target “JEWS” found in one dataset and the target “jewish people” found in another dataset to the single target “jews”. However, some decisions were more complicated. Whether the target “africans” should be mapped to the target “blacks” or to the target “africans”, thus interpreting it as a question of origin rather than one of race, might never be definitely determined. In such cases, we tried to consult the publication corresponding to the dataset to see whether the original creators of the resource specifically mentioned one of the potential meanings. If so, we followed their example, and if not, we tried to apply reasonable judgment and be consistent throughout the mapping.

  However, we emphasize that we do not consider the mapping proposed here to be the ultimate and objective single true mapping, but would like to encourage researchers to see this mapping as a starting point and modify it to their needs and desires. For this purpose, we implemented all necessary functionality directly in the subdata library.

  Fanton et al. (2021)
  |keyword|target|
  |---|---|
  |DISABLED|disabled_unspecified|
  |JEWS|jews|
  |LGBT+|lgbtq_unspecified|
  |MIGRANTS|migrants|
  |MUSLIMS|muslims|
  |POC|race_unspecified|
  |WOMEN|women|


  Hartvigsen et al. (2022)
  |keyword|target|
  |---|---|
  |asian|asians|
  |asian folks|asians|
  |black|blacks|
  |black folks / african-americans|blacks|
  |black/african-american folks|blacks|
  |chinese|chinese|
  |chinese folks|chinese|
  |folks with mental disabilities|disabled_mental|
  |folks with physical disabilities|disabled_physical|
  |jewish|jews|
  |jewish folks|jews|
  |latino|latinx|
  |latino/hispanic folks|latinx|
  |lgbtq|lgbtq_unspecified|
  |lgbtq+ folks|lgbtq_unspecified|
  |mental_dis|disabled_mental|
  |mexican|mexicans|
  |mexican folks|mexicans|
  |middle eastern folks|middle_eastern|
  |middle_east|middle_eastern|
  |muslim|muslims|
  |muslim folks|muslims|
  |native american folks|native_americans|
  |native american/indigenous folks|native_americans|
  |native_american|native_americans|
  |phsycial_dis|disabled_physical|
  |women|women|


  Jigsaw et al. (2019)
  |keyword|target|
  |---|---|
  |asian|asians|
  |atheist|atheists|
  |bisexual|bisexuals|
  |black|blacks|
  |buddhist|buddhists|
  |christian|christians|
  |female|women|
  |heterosexual|heterosexuals|
  |hindu|hindus|
  |homosexual_gay_or_lesbian|homosexuals|
  |intellectual_or_learning_disability|disabled_intellectual|
  |jewish|jews|
  |latino|latinx|
  |male|men|
  |muslim|muslims|
  |other_disability|disabled_unspecified|
  |other_gender|gender_unspecified|
  |other_race_or_ethnicity|race_unspecified|
  |other_religion|religion_unspecified|
  |other_sexual_orientation|sexuality_unspecified|
  |physical_disability|disabled_physical|
  |psychiatric_or_mental_illness|disabled_mental|
  |transgender|transgenders|
  |white|whites|


  Jikeli et al. (2023)
  |keyword|target|
  |---|---|
  |Israel|jews|
  |Jews|jews|
  |Kikes|jews|
  |ZioNazi|jews|


  Jikeli et al. (2023)
  |keyword|target|
  |---|---|
  |Asians|asians|
  |Blacks|blacks|
  |Jews|jews|
  |Latinos|latinx|
  |Muslims|muslims|


  Mathew et al. (2021)
  |keyword|target|
  |---|---|
  |African|blacks|
  |Arab|arabs|
  |Asexual|asexuals|
  |Asian|asians|
  |Bisexual|bisexuals|
  |Buddhism|buddhists|
  |Caucasian|whites|
  |Christian|christians|
  |Disability|disabled_unspecified|
  |Heterosexual|heterosexuals|
  |Hindu|hindus|
  |Hispanic|latinx|
  |Homosexual|homosexuals|
  |Indian|indians|
  |Indigenous|indigenous|
  |Islam|muslims|
  |Jewish|jews|
  |Men|men|
  |Nonreligious|atheists|
  |Refugee|refugees|
  |Women|women|


  Röttger et al. (2021)
  |keyword|target|
  |---|---|
  |Muslims|muslims|
  |black people|blacks|
  |disabled people|disabled_unspecified|
  |gay people|homosexuals|
  |immigrants|migrants|
  |trans people|transgenders|
  |women|women|


  Sachdeva et al. (2022)
  |keyword|target|
  |---|---|
  |target_age_children|young_aged|
  |target_age_middle_aged|middle_aged|
  |target_age_other|age_unspecified|
  |target_age_seniors|seniors|
  |target_age_teenagers|young_aged|
  |target_age_young_adults|middle_aged|
  |target_disability_cognitive|disabled_intellectual|
  |target_disability_hearing_impaired|disabled_unspecified|
  |target_disability_neurological|disabled_mental|
  |target_disability_other|disabled_unspecified|
  |target_disability_physical|disabled_physical|
  |target_disability_unspecific|disabled_unspecified|
  |target_disability_visually_impaired|disabled_unspecified|
  |target_gender_men|men|
  |target_gender_non_binary|non_binary|
  |target_gender_other|gender_unspecified|
  |target_gender_transgender_men|transgenders|
  |target_gender_transgender_unspecified|transgenders|
  |target_gender_transgender_women|transgenders|
  |target_gender_women|women|
  |target_origin_immigrant|migrants|
  |target_origin_migrant_worker|migrants|
  |target_origin_other|origin_unspecified|
  |target_origin_specific_country|origin_unspecified|
  |target_origin_undocumented|undocumented|
  |target_race_asian|asians|
  |target_race_black|blacks|
  |target_race_latinx|latinx|
  |target_race_middle_eastern|middle_eastern|
  |target_race_native_american|native_americans|
  |target_race_other|race_unspecified|
  |target_race_pacific_islander|pacific_islanders|
  |target_race_white|whites|
  |target_religion_atheist|atheists|
  |target_religion_buddhist|buddhists|
  |target_religion_christian|christians|
  |target_religion_hindu|hindus|
  |target_religion_jewish|jews|
  |target_religion_mormon|mormons|
  |target_religion_muslim|muslims|
  |target_religion_other|religion_unspecified|
  |target_sexuality_bisexual|bisexuals|
  |target_sexuality_gay|homosexuals|
  |target_sexuality_lesbian|homosexuals|
  |target_sexuality_other|sexuality_unspecified|
  |target_sexuality_straight|heterosexuals|


  Vidgen et al. (2021)
  |keyword|target|
  |---|---|
  |asexual people|asexuals|
  |black men|blacks,men|
  |black people|blacks|
  |catholics|christians|
  |chinese women|chinese,women|
  |christians|christians|
  |communists|communists|
  |conservatives|conservatives|
  |democrats|democrats|
  |donald trump supporters|republicans|
  |elderly people|seniors|
  |ethnic minorities|race_unspecified|
  |feminists (male)|men|
  |gay men|homosexuals|
  |gay people|homosexuals|
  |hindus|hindus|
  |illegal immigrants|undocumented|
  |immigrants|migrants|
  |jewish people|jews|
  |latinx|latinx|
  |left-wing people|left-wingers|
  |left-wing people (far left)|left-wingers|
  |left-wing people (social justice)|left-wingers|
  |lgbtqa community|sexuality_unspecified|
  |liberals|liberals|
  |men|men|
  |mixed race/ethnicity|race_unspecified|
  |muslims|muslims|
  |non-gender dysphoric transgender people|sexuality_unspecified|
  |non-masculine men|men|
  |non-white people|race_unspecified|
  |people from africa|blacks|
  |people from britain|brits|
  |people from china|chinese|
  |people from india|indians|
  |people from mexico|mexicans|
  |people from pakistan|pakistani|
  |people with aspergers|disabled_mental|
  |people with autism|disabled_mental|
  |people with cerebral palsy|disabled_unspecified|
  |people with disabilities|disabled_unspecified|
  |people with down's syndrome|disabled_intellectual|
  |people with mental disabilities|disabled_mental|
  |people with physical disabilities|disabled_physical|
  |republicans|republicans|
  |right-wing people|right-wingers|
  |right-wing people (alt-right)|right-wingers|
  |sexual and gender minorities|sexuality_unspecified|
  |transgender people|transgenders|
  |white men|whites,men|
  |white people|whites|
  |white women|whites,women|
  |women|women|
  |young people|young_aged|


  Vidgen et al. (2021)
  |keyword|target|
  |---|---|
  |african|blacks|
  |arab|arabs|
  |arab, ref|arabs,refugees|
  |asi|asians|
  |asi.chin|chinese|
  |asi.east|asians|
  |asi.man|asians,men|
  |asi.pak|pakistani|
  |asi.south|asians|
  |asi.wom|asians,women|
  |asylum|refugees|
  |bis|bisexuals|
  |bla|blacks|
  |bla, african|blacks|
  |bla, hispanic|blacks,latinx|
  |bla, immig|blacks,migrants|
  |bla, jew|blacks,jews|
  |bla, jew, non.white|blacks,jews|
  |bla, mixed.race|blacks|
  |bla, non.white|blacks|
  |bla, wom|blacks,women|
  |bla.man|blacks,men|
  |bla.wom|blacks,women|
  |dis|disabled_unspecified|
  |dis, bla|disabled_unspecified,blacks|
  |dis, gay|disabled_unspecified,homosexuals|
  |dis, trans|disabled,transgenders|
  |dis, wom|disabled_unspecified,women|
  |eastern.europe|eastern_european|
  |for|migrants|
  |for, immig|migrants|
  |gay|homosexuals|
  |gay, bis|homosexuals,bisexuals|
  |gay, gay.wom|homosexuals|
  |gay.man|homosexuals|
  |gay.wom|homosexuals|
  |gay.wom, gay.man|homosexuals|
  |gendermin|gender_unspecified|
  |hispanic|latinx|
  |immig|migrants|
  |immig, hispanic|migrants,latinx|
  |immig, non.white|migrants|
  |immig, ref|migrants,refugees|
  |indig|indigenous|
  |indig.wom|indigenous,women|
  |jew|jews|
  |jew, non.white|jews|
  |lgbtq|lgbtq_unspecified|
  |mixed.race|race_unspecified|
  |mixed.race, non.white|race_unspecified|
  |mus|muslims|
  |mus, arab|muslims|
  |mus, immig|muslims,migrants|
  |mus, jew|muslims,jews|
  |mus, ref|muslims,refugees|
  |mus.wom|muslims,women|
  |non.white.wom|women|
  |old.people|seniors|
  |pol|polish|
  |ref|refugees|
  |russian|russians|
  |trans|transgenders|
  |trans, gay|transgenders,homosexuals|
  |trans, gay.wom, gay.man, bis|transgenders,homosexuals,bisexuals|
  |trans, gendermin|transgenders|
  |trans, wom|transgenders|
  |wom|women|



  The following tables document the original taxonomy that is used in the subdata library to assign target groups into categories.

  For the taxonomy, again, most of the choices were uncontested and in line with the way that some of the original datasets assign targets to certain categories. However, there are some critical decisions we had to take. Least resolvable is probably the observation that many datasets feature an LGBTQ+ target group that is not further specified, thus mixing together both gender identities and sexual preferences. In most of those datasets, this LGBTQ+ target group ended up as part of a category called Sexuality or Sexual Orientation. We are aware that by mirroring this decision we are also replicating the confusion of gender identity and sexual preference, however, there is no real alternative for our taxonomy since we are unable to divide apart the different components of this rather unspecific target group found in the original datasets. We highlight the heterogeneity of this target group by appending _unspecified_ to the name of the target group, and, wherever we can, by mapping specific gender identity and sexual preference target groups into their correct categories (i.e., gender and sexuality).

  However, we emphasize that we do not consider the taxonomy proposed here to be the ultimate and objective single true taxonomy, but would like to encourage researchers to see this taxonomy as a starting point and modify it to their needs and desires. For this purpose, we implemented all necessary functionality directly in the subdata library.

  |age|disabled|gender|migration|origin|political|race|religion|sexuality|
  |---|---|---|---|---|---|---|---|---|
  |middle_aged|disabled_intellectual|men|migrants|arabs|communists|asians|atheists|asexuals|
  |seniors|disabled_mental|non_binary|refugees|brits|conservatives|blacks|buddhists|bisexuals|
  |young_aged|disabled_unspecified|transgenders|undocumented|chinese|democrats|indigenous|christians|heterosexuals|
  |age_unspecified||women|migration_unspecified|eastern_european|left-wingers|latinx|hindus|homosexuals|
  |||gender_unspecified||indians|liberals|native_americans|jews|lgbtq_unspecified|
  |||||mexicans|republicans|pacific_islanders|mormons|sexuality_unspecified|
  |||||middle_eastern|right-wingers|whites|muslims||
  |||||pakistani|political_unspecified|race_unspecified|religion_unspecified||
  |||||polish|||||
  |||||russians|||||
  |||||origin_unspecified|||||


pkgId: 68766fa92dab9f549f2495fb111b195d96701475c6c2e6a670210424f8e66626
name: python-subgroups-help
arch: noarch
version: 0.1.9
epoch: 0
release: 1
summary: Development documents and examples for subgroups
url: https://github.com/antoniolopezmc/subgroups
rpm_license: BSD-4-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-subgroups-0.1.9-1.src.rpm
location_href: Packages/python-subgroups-help-0.1.9-1.noarch.rpm
checksum_type: sha256
description:
  |               |   |
  |---------------|---|
  | **Tests** | [![Azure Pipelines - Tests](https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/subgroups-feedstock?branchName=main)](https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=21954&branchName=main) |
  | **Package** | [![PyPI - Version](https://img.shields.io/pypi/v/subgroups?label=PyPI)](https://pypi.org/project/subgroups/) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/subgroups?label=Anaconda.org%20%7C%20conda-forge)](https://anaconda.org/conda-forge/subgroups)|
  | **Metadata** | [![GitHub](https://img.shields.io/badge/GitHub-Latest%20development-blue?style=flat)](https://github.com/antoniolopezmc/subgroups) [![Author's webpage](https://img.shields.io/badge/Author's%20webpage-orange?style=flat)](https://webs.um.es/antoniolopezmc/) [![Python Version](https://img.shields.io/pypi/pyversions/subgroups)](https://www.python.org/) [![License](https://img.shields.io/pypi/l/subgroups?color=green)](https://github.com/antoniolopezmc/subgroups/blob/master/LICENSE) ![Total Downloads](https://img.shields.io/pepy/dt/subgroups) [![Documentation](https://img.shields.io/badge/Documentation-green?style=flat)](https://www.um.es/subgroups/)|

  `subgroups` is a public, accessible and open-source python library created to work with the Subgroup Discovery (SD) technique. This library implements the necessary components related to the SD technique and contains a collection of SD algorithms and other data analysis utilities.

  The easiest way to obtain this library is from either [PyPI](https://pypi.org/) (the Python Package Index) or [Conda](https://docs.conda.io/).

  For that, you can [view and download the package from its PyPI page](https://pypi.org/project/subgroups/) or directly install it by executing:
  ```shell
  pip install subgroups
  ```

  For that, you can [view and download the package from its Anaconda.org page (conda-forge channel)](https://anaconda.org/conda-forge/subgroups) or directly install it by executing:
  ```shell
  conda install -c conda-forge subgroups
  ```

  After installing the library, a collection of tests can be launched by executing:
  ```python
  import subgroups.tests as st
  st.run_all_tests()
  ```
  These tests verify that the library is correctly installed and that all components, algorithms and features are properly working.

  The source code (latest development) is currently hosted on: https://github.com/antoniolopezmc/subgroups
  Therefore, you need first to clone the repository:
  ```shell
  git clone https://github.com/antoniolopezmc/subgroups.git
  cd subgroups
  ```
  After that, the library can be installed in *production mode* or in *develop mode*.

  ```shell
  make install_prod
  ```
  or
  ```shell
  python -m pip install ./
  ```
  or
  ```shell
  pip install ./
  ```
  This mode installs the library as normal, copying it to the standard Python site-packages directory.

  ```shell
  make install_dev
  ```
  or
  ```shell
  python -m pip install -e ./
  ```
  or
  ```shell
  pip install -e ./
  ```
  This mode installs the library in editable mode, creating a link in the standard Python site-packages directory to the downloaded project directory (the current directory). See the [pip_install documentation](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-e) for further details.

  An example of use of each algorithm implemented in `subgroups` python library can be found in the `examples/algorithms` folder:
  - [SDMap](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/SDMap.ipynb)
  - [SDMap*](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/SDMapStar.ipynb)
  - [VLSD](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/VLSD.ipynb)
  - [BSD-CBSD-CPBSD](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/BSD-CBSD-CPBSD.ipynb)
  - [QFinder](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/QFinder.ipynb)
  - [IDSD](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/IDSD.ipynb)
  - [GMSL](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/GMSL.ipynb)
  - [DSLM](https://github.com/antoniolopezmc/subgroups/blob/master/examples/algorithms/DSLM.ipynb)

  The official documentation is hosted on https://www.um.es/subgroups/
  Additionally, the source code of the project contains a folder called `docs`, which includes the documentation of the library. This documentation can be also manually generated by executing:
  ```shell
  cd docs
  make build
  ```
  or
  ```shell
  cd docs
  python clean.py source/project_files build
  python -m pip install sphinx==8.1.3
  python -m pip install sphinx-rtd-theme==3.0.2
  python -m pip install sphinx-autodoc-typehints==2.5.0
  sphinx-apidoc -f -T -M -o source/project_files ../src/subgroups
  sphinx-build -M html source build
  ```
  The generated documentation will be located in the `build` subfolder.

  If you use `subgroups` library in a scientific publication, please cite the following paper:
  - BibTeX format:
  ```
  @article{LOPEZMARTINEZCARRASCO2024101895,
  title = {Subgroups: A Python library for Subgroup Discovery},
  journal = {SoftwareX},
  volume = {28},
  pages = {101895},
  year = {2024},
  issn = {2352-7110},
  doi = {https://doi.org/10.1016/j.softx.2024.101895},
  url = {https://www.sciencedirect.com/science/article/pii/S2352711024002656},
  author = {Antonio Lopez-Martinez-Carrasco and Jose M. Juarez and Manuel Campos and Francisco Mora-Caselles},
  keywords = {Machine learning, Data mining, Subgroup Discovery, Python}
  }
  ```
  - RIS format:
  ```
  TY  - JOUR
  T1  - Subgroups: A Python library for Subgroup Discovery
  AU  - Lopez-Martinez-Carrasco, Antonio
  AU  - Juarez, Jose M.
  AU  - Campos, Manuel
  AU  - Mora-Caselles, Francisco
  JO  - SoftwareX
  VL  - 28
  SP  - 101895
  PY  - 2024
  DA  - 2024/12/01/
  SN  - 2352-7110
  DO  - https://doi.org/10.1016/j.softx.2024.101895
  UR  - https://www.sciencedirect.com/science/article/pii/S2352711024002656
  KW  - Machine learning
  KW  - Data mining
  KW  - Subgroup Discovery
  KW  - Python
  ER  -
  ```
  - Plain text:
  ```
  Antonio Lopez-Martinez-Carrasco, Jose M. Juarez, Manuel Campos, Francisco Mora-Caselles,
  Subgroups: A Python library for Subgroup Discovery,
  SoftwareX,
  Volume 28,
  2024,
  101895,
  ISSN 2352-7110,
  https://doi.org/10.1016/j.softx.2024.101895.
  (https://www.sciencedirect.com/science/article/pii/S2352711024002656)
  Keywords: Machine learning; Data mining; Subgroup Discovery; Python
  ```


pkgId: d78c96dd1e057fd7f3baa7597f7e2a885eed35709d4088ba86801034b9ccac3d
name: python-subrip-sync-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for subrip-sync
url: https://pypi.org/project/subrip-sync/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-subrip-sync-0.1.2-1.src.rpm
location_href: Packages/python-subrip-sync-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  ```
  > subrip-sync -h
  usage: subrip-sync [-h] [--backup | --no-backup] filename lag

  Sync SubRip subtitle with audio

  positional arguments:
    filename              SubRip subtitle file (.srt). UFT-8 encoding
    lag                   lag in milliseconds. eg: 220, -150, +350

  options:
    -h, --help            show this help message and exit
    --backup, --no-backup
                          create a backup file (.bak), default
  ```


  ```
  uv run python -m unittest discover -s src
  ```


  ```
  uv run subrip-sync -h
  ```


  ```
  > uv build
  Building source distribution...
  Building wheel from source distribution...
  Successfully built dist\subrip_sync-0.1.0.tar.gz
  Successfully built dist\subrip_sync-0.1.0-py3-none-any.whl
  ```

  see https://docs.astral.sh/uv/


pkgId: 35583993cb9ee99f13cbf899090d6cee98dbdac13afdc4408fcd97e57dd37f51
name: python-sudoku-smt-solvers-help
arch: noarch
version: 0.0.0
epoch: 0
release: 1
summary: Development documents and examples for sudoku-smt-solvers
url: https://github.com/liamjdavis/Sudoku-SMT-Solvers/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sudoku-smt-solvers-0.0.0-1.src.rpm
location_href: Packages/python-sudoku-smt-solvers-help-0.0.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Pytest + CI/CD](https://github.com/liamjdavis/Sudoku-SMT-Solvers/actions/workflows/pytest-and-coverage.yml/badge.svg)](ttps://github.com/liamjdavis/Sudoku-SMT-Solvers/actions/workflows/pytest-and-coverage.yml)
  [![Coverage Status](https://coveralls.io/repos/github/liamjdavis/Sudoku-SMT-Solvers/badge.svg)](https://coveralls.io/github/liamjdavis/Sudoku-SMT-Solvers)


  This repository contains the code for the study "Evaluating SMT-Based Solvers on Sudoku". Created by Liam Davis (@liamjdavis) and Ryan Ji (@TairanJ) as their AI course (COSC-241) final project, it evaluates the efficacy of SMT-Based Solvers by benchmarking three modern SMT solvers (DPLL(T), Z3, and CVC5) against the DPLL algorithm on a collection of 100 25x25 Sudoku puzzles of varying difficulty.

  The study aims to answer three research questions:
  1. How have logical solvers evolved over time in terms of performance and capability?
  2. How do different encodings of Sudoku affect the efficiency and scalability of these solvers?
  3. Are there specific features or optimizations in SMT solvers that provide a significant advantage over traditional SAT solvers for this class of problem?



  To run the code locally, you can install with `pip`

  ```bash
  pip install sudoku-smt-solvers
  ```


  This package includes the DPLL solver and three modern SMT solvers:
  * DPLL(T)
  * CVC5
  * Z3

  To run any of the solvers on a 25x25 Sudoku puzzle, you can create an instance of the solver class and call the solve method in a file at the root (Sudoku-smt-solvers). Here is an example using Z3:

  ```python
  from sudoku_smt_solvers.solvers.z3_solver import Z3Solver


  grid = [[0] * 25 for _ in range(25)]
  solver = Z3Solver(grid)
  solution = solver.solve()

  if solution:
      print(f"Solution:\n\n{solution}")
  else:
      print("No solution exists.")
  ```


  This package also includes a generator for creating Sudoku puzzles to be used as benchmarks. To generate a puzzle, create an instance of the `SudokuGenerator` class and call the `generate` method. Here is an example:

  ```python
  from sudoku_smt_solvers.benchmarks.sudoku_generator.sudoku_generator import SudokuGenerator

  generator = SudokuGenerator(size = 25, givens = 80, timeout = 5, difficulty = "Medium", puzzles_dir = "benchmarks/puzzles", solutions_dir = "benchmarks/solutions")

  generator.generate()
  ```

  Due to the computational complexity of generating large sudoku puzzles, it is recommended that you run multiple generator instances in parallel to create benchmarks.


  To run the benchmarks you created on all four solvers, create an instance of the `BenchmarkRunner` class and call the `run_benchmarks` method. Here is an example:

  ```python
  from sudoku_smt_solvers.benchmarks.benchmark_runner import BenchmarkRunner

  runner = BenchmarkRunner(
      puzzles_dir='resources/benchmarks/puzzles/',
      solutions_dir='resources/benchmarks/solutions/',
      results_dir='results/'
  )
  runner.run_benchmarks()
  ```


  For any questions or support, please reach out to Liam at ljdavis27 at amherst.edu and Ryan at tji26 at amherst.edu

rpm_license:
  MIT License  Copyright (c) 2024 liamjdavis  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: 40fa9a38f795f498afb8ea527d5343a721c6584fca4e5f048cf158f1192cd3f8
name: python-sugarpowder-help
arch: noarch
version: 1.2.2
epoch: 0
release: 1
summary: Development documents and examples for sugarpowder
url: https://github.com/dreamwayjgs/sugarpowder
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sugarpowder-1.2.2-1.src.rpm
location_href: Packages/python-sugarpowder-help-1.2.2-1.noarch.rpm
checksum_type: sha256
description:
  Package of Python syntactic sugars and utils inspired by Elixir, Go, Rust, Julia, and other languages


  ```
  pip install sugarpowder
  ```


  ```
  tox
  ```



  blose_pickle, blose_unpickle: Convert any Python objects to pickle that compressed with blosc

  df_to_parquetstream, parquetstream_to_df: Convert pandas Dataframe <--> parquetfile bytes stream



  deduplist


  Go lang Style error handling

  ```
  @witherr
  def div1(x: float, y: float) -> float:
      """
      test function - divide
      """
      return x / y


  val, err = div1(1, 1)


  val, err = div1(1, 0)


  ```



  Forked from [Pipe Package](https://github.com/JulienPalard/Pipe)

  It works on '|' and '>>' both.

rpm_license:
  MIT License  Copyright (c) 2023 Geunseong Jung (정근성)  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: 2d313e2d127370bf52e9be92cfe4c39ab8023925e697d47203f78fd7e371b5d1
name: python-suger-sdk-python-help
arch: noarch
version: 3.128.21
epoch: 0
release: 1
summary: Development documents and examples for suger-sdk-python
url: https://pypi.org/project/suger-sdk-python/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-suger-sdk-python-3.128.21-1.src.rpm
location_href: Packages/python-suger-sdk-python-help-3.128.21-1.noarch.rpm
checksum_type: sha256
description:
      CRUD operations on a set of resources, including organizations, products, offers, entitlements, usage record groups for meterting, etc.


pkgId: c67c5f1292000a0109ca627cb050f220723c0106db967110fb78292e7302bbf9
name: python-sumo-wrapper-python-help
arch: noarch
version: 1.0.17
epoch: 0
release: 1
summary: Development documents and examples for sumo-wrapper-python
url: https://pypi.org/project/sumo-wrapper-python/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sumo-wrapper-python-1.0.17-1.src.rpm
location_href: Packages/python-sumo-wrapper-python-help-1.0.17-1.noarch.rpm
checksum_type: sha256
description:
  [![Documentation Status](https://readthedocs.org/projects/sumo-wrapper-python/badge/?version=latest)](https://sumo-wrapper-python.readthedocs.io/en/latest/?badge=latest)
  [![SCM Compliance](https://scm-compliance-api.radix.equinor.com/repos/equinor/sumo-wrapper-python/badge)](https://scm-compliance-api.radix.equinor.com/repos/equinor/sumo-wrapper-python/badge)


  [sumo-wrapper-python documentation](https://sumo-wrapper-python.readthedocs.io/en/latest/)


  [Contribution guidelines](./CONTRIBUTING.md)

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


pkgId: b61c7c7ed38c44f801a80c6a61f2fefaa9ca4a02fa013bccb8b7bb71413336ab
name: python-sunholo-help
arch: noarch
version: 0.116.2
epoch: 0
release: 1
summary: Development documents and examples for sunholo
url: https://github.com/sunholo-data/sunholo-py
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-sunholo-0.116.2-1.src.rpm
location_href: Packages/python-sunholo-help-0.116.2-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPi Version](https://img.shields.io/pypi/v/sunholo.svg)](https://pypi.python.org/pypi/sunholo/)


  This is the Sunholo Python project, a comprehensive toolkit for working with language models and vector stores on Google Cloud Platform. It provides a wide range of functionalities and utilities to facilitate the development and deployment of language model applications.

  Please refer to the website for full documentation at https://dev.sunholo.com/



  A [NotebookLM](https://notebooklm.google/) generated podcast of the codebase that may help give you an overview of what the library is capable of:

  [Listen to the audio file from Google Drive](https://drive.google.com/file/d/1GvwRmiYDjPjN2hXQ8plhnVDByu6TmgCQ/view?usp=drive_link) or on the website at https://dev.sunholo.com/docs/

  > "Ever wish you could build your own AI?..."



  If loading from GitHub, run tests:

  ```bash
  pip install pytest
  pip install . --use-feature=in-tree-build
  pytest tests
  ```



  ```sh
  uv tool install --from "sunholo[cli]" sunholo --with ".[all]"
  ```



  Using https://github.com/charmbracelet/vhs

  ```sh
  vhs record > cassette.tape
  ```

  Then make gif:

  ```sh
  vhs docs/tapes/config-list.tape
  ```



  ```
     Copyright [2024] [Holosun ApS]

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

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

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


pkgId: 8e0c2de86cc703b5840c25c0c0e65dbddea9b15e46ce457de1b715c747dae3ee
name: python-supabase-pydantic-help
arch: noarch
version: 0.15.0
epoch: 0
release: 1
summary: Development documents and examples for supabase-pydantic
url: https://kmbhm1.github.io/supabase-pydantic
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-supabase-pydantic-0.15.0-1.src.rpm
location_href: Packages/python-supabase-pydantic-help-0.15.0-1.noarch.rpm
checksum_type: sha256
description:
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/supabase-pydantic)
  [![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)
  ![GitHub License](https://img.shields.io/github/license/kmbhm1/supabase-pydantic)
  [![codecov](https://codecov.io/github/kmbhm1/supabase-pydantic/graph/badge.svg?token=PYOJPJTOLM)](https://codecov.io/github/kmbhm1/supabase-pydantic)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/supabase-pydantic)


  A project for generating Pydantic (& other) models from Supabase (& other) databases. Currently, this is ideal for integrating [FastAPI](https://fastapi.tiangolo.com/) with [supabase-py](https://supabase.com/docs/reference/python/introduction) as a primary use-case, but more updates are coming! This project is a inspired by the TS [type generating](https://supabase.com/docs/guides/api/rest/generating-types) capabilities of supabase cli. Its aim is to provide a similar experience for Python developers.



  We recommend installing the package using pip:

  ```bash
  $ pip install supabase-pydantic
  ```

  Installing with conda is also available:

  ```bash
  conda install -c conda-forge supabase-pydantic
  ```



  ```bash
  $ touch .env                                    # create .env file
  $ echo "DB_NAME=<your_db_name>" >> .env         # add your postgres db name
  $ echo "DB_USER=<your_db_user>" >> .env         # add your postgres db user
  $ echo "DB_PASS=<your_db_password>" >> .env     # add your postgres db password
  $ echo "DB_HOST=<your_db_host>" >> .env         # add your postgres db host
  $ echo "DB_PORT=<your_db_port>" >> .env         # add your postgres db port
  ```



  Generate Pydantic models for FastAPI using a local supabase connection:

  ```bash
  $ sb-pydantic gen --type pydantic --framework fastapi --local

  PostGres connection is open.
  PostGres connection is closed.
  Generating FastAPI Pydantic models...
  FastAPI Pydantic models generated successfully: /path/to/your/project/entities/fastapi/schemas.py
  File formatted successfully: /path/to/your/project/entities/fastapi/schemas.py
  ```

  Or generate with a url:

  ```bash
  $ sb-pydantic gen --type pydantic --framework fastapi --db-url postgresql://postgres:postgres@127.0.0.1:54322/postgres

  Checking local database connection.postgresql://postgres:postgres@127.0.0.1:54322/postgres
  Connecting to database: postgres on host: 127.0.0.1 with user: postgres and port: 54322
  PostGres connection is open.
  Generating FastAPI Pydantic models...
  FastAPI Pydantic models generated successfully: /path/to/your/project/entities/fastapi/schemas.py
  File formatted successfully: /path/to/your/project/entities/fastapi/schemas.py
  ```

  You can generate Pydantic models for certain schemas in your database using the `--schemas` or `--all-schemas` options:

  ```bash
  $ sb-pydantic gen --type pydantic --framework fastapi --local --schema extensions --schema auth
  ```

  This command will generate a BaseModel file for each schema in your database.

  For some users, integrating a Makefile command may be more convenient:

  ```bash
  gen-types:
      @echo "Generating FastAPI Pydantic models..."
      @sb-pydantic gen --type pydantic --framework fastapi --dir <your path> --local
  ```


pkgId: 4f7ff1af7b58c67bcf889113c3089b7aaf5e9f2d5bd4f102b39b1308ab9611df
name: python-superagentx-help
arch: noarch
version: 0.1.13
epoch: 0
release: 1
summary: Development documents and examples for superagentx
url: https://www.superagentx.ai/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-superagentx-0.1.13-1.src.rpm
location_href: Packages/python-superagentx-help-0.1.13-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">

  <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/fulllogo_transparent.png?raw=True" width="350">


  <br/>


  **SuperAgentX**: A lightweight autonomous true multi-agent framework with AGI capabilities.

  <br/>

  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/release/python-3100/)
  [![GitHub Repo stars](https://img.shields.io/github/stars/superagentxai/superagentX)](https://github.com/superagentxai/superagentX)
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/superagentxai/superagentX/blob/master/LICENSE)

  </div>



  🚀 **Open-Source Framework**: A lightweight, open-source AI framework built for multi-agent applications with Artificial General Intelligence (AGI) capabilities.

  🎯 **Goal-Oriented Multi-Agents**: This technology enables the creation of agents with retry mechanisms to achieve set goals. Communication between agents is Parallel, Sequential, or hybrid.

  🏖️ **Easy Deployment**: Offers WebSocket, RESTful API, and IO console interfaces for rapid setup of agent-based AI solutions.

  ♨️ **Streamlined Architecture**: Enterprise-ready scalable and pluggable architecture. No major dependencies; built independently!

  📚 **Contextual Memory**: Uses SQL + Vector databases to store and retrieve user-specific context effectively.

  🧠 **Flexible LLM Configuration**: Supports simple configuration options of various Gen AI models.

  🤝🏻 **Extendable Handlers**: Allows integration with diverse APIs, databases, data warehouses, data lakes, IoT streams, and more, making them accessible for function-calling features.



  - [What is SuperAgentX?](#what-is-superagentx)
  - [Why SuperAgentX?](#why-superagentx)
  - [Getting Started](#getting-started)
  - [Installing Dependencies](#installing-dependencies)
  - [Contribution](#contribution)
  - [License](#license)



  **The Ultimate Modular Autonomous Agentic AI Framework for Progressing Towards AGI.** <br/><br/>
  SuperAgentX is an advanced agentic AI framework designed to accelerate the development of Artificial General Intelligence (AGI). It provides a powerful, modular, and flexible platform for building autonomous AI agents capable of executing complex tasks with minimal human intervention. By integrating cutting-edge AI technologies and promoting efficient, scalable agent behavior, SuperAgentX embodies a critical step forward in the path toward superintelligence and AGI. Whether for research, development, or deployment, SuperAgentX is built to push the boundaries of what's possible with autonomous AI systems.



  SuperAgentX addresses the growing need for highly capable, autonomous AI systems that can perform complex tasks with minimal human intervention. As we approach the limits of narrow AI, there's a need for an adaptable and scalable framework to bridge the gap toward AGI (Artificial General Intelligence). Here’s why SuperAgentX stands out:

  **Super**: Cutting-edge AI systems with exceptional capabilities, paving the way to **AGI** (Artificial General Intelligence) and **ASI** (Artificial Super Intelligence).</p>
  **Agent**: Autonomous Multi AI agent framework designed to make decisions, act independently, and handle complex tasks. </p>
  **X**: The unknown, the limitless, the extra factor that makes SuperAgentX revolutionary, futuristic, and transformative.</p>



  ```shell
  pip install superagentx
  ```

  This SuperAgentX example utilizes two handlers, Amazon and Walmart, to search for product items based on user input from the IO Console.

  1. It uses Parallel execution of handler in the agent
  2. Memory Context Enabled
  3. LLM configured to OpenAI
  4. Pre-requisites

  Set OpenAI Key:
  ```shell
  export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxx
  ```

  Set Rapid API Key <a href="https://rapidapi.com/auth/sign-up" target="_blank">Free Subscription</a> for Amazon, Walmart Search APIs
  ```shell
  export RAPID_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXX
  ```

  ```python




  import asyncio

  from rich import print as rprint

  from superagentx.memory import Memory
  from superagentx.agent import Agent
  from superagentx.engine import Engine
  from superagentx.llm import LLMClient
  from superagentx.agentxpipe import AgentXPipe
  from superagentx.pipeimpl.iopipe import IOPipe
  from superagentx.prompt import PromptTemplate
  from superagentx_handlers.ecommerce.amazon import AmazonHandler
  from superagentx_handlers.ecommerce.walmart import WalmartHandler


  async def main():
      """
      Launches the e-commerce pipeline console client for processing requests and handling data.
      """

      
      llm_config = {'llm_type': 'openai'}
      llm_client: LLMClient = LLMClient(llm_config=llm_config)

      
      memory = Memory(memory_config={"llm_client": llm_client})

      
      amazon_ecom_handler = AmazonHandler()
      walmart_ecom_handler = WalmartHandler()

      
      prompt_template = PromptTemplate()

      
      amazon_engine = Engine(
          handler=amazon_ecom_handler,
          llm=llm_client,
          prompt_template=prompt_template
      )
      walmart_engine = Engine(
          handler=walmart_ecom_handler,
          llm=llm_client,
          prompt_template=prompt_template
      )

      
      ecom_agent = Agent(
          name='Ecom Agent',
          goal="Get me the best search results",
          role="You are the best product searcher",
          llm=llm_client,
          prompt_template=prompt_template,
          engines=[[amazon_engine, walmart_engine]]
      )

      
      pipe = AgentXPipe(
          agents=[ecom_agent],
          memory=memory
      )

      
      io_pipe = IOPipe(
          search_name='SuperAgentX Ecom',
          agentx_pipe=pipe,
          read_prompt=f"\n[bold green]Enter your search here"
      )
      await io_pipe.start()


  if __name__ == '__main__':
      try:
          asyncio.run(main())
      except (KeyboardInterrupt, asyncio.CancelledError):
          rprint("\nUser canceled the [bold yellow][i]pipe[/i]!")

  ```

  SuperAgentX searches for product items requested by the user in the console, validates them against the set goal, and returns the result. It retains the context, allowing it to respond to the user's next prompt in the IO Console intelligently.

  ![Output](https://github.com/superagentxai/superagentX/blob/master/docs/images/examples/ecom-output-console.png?raw=True)


  <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/architecture.png?raw=True" title="SuperAgentX Architecture"/>



  | Icon                                                                                                                                    | LLM Name          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Status                                                                                   |
  |-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/openai.png?raw=True" title="OpenAI" height="20" width="20"/> | **OpenAI** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;        | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/checkmark.png?raw=True" title="Tested" height="20" width="20"/>           |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/azure-icon.png?raw=True" title="Azure OpenAI" height="20" width="20"/>                                              | **Azure OpenAI**                                                                               | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/checkmark.png?raw=True" title="Tested" height="20" width="20"/>           |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/awsbedrock.png?raw=True" title="AWS Bedrock" height="20" width="20"/>                                               | **AWS Bedrock**                                                                                | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/checkmark.png?raw=True" title="Tested" height="20" width="20"/>    |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/gemini.png?raw=True" title="Google Gemini" height="20" width="20"/>                                                 | **Google Gemini**                                                                              | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/wip.png?raw=True" title="Development Inprogress" height="20" width="20"/> |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/meta.png?raw=True" title="Google Gemini" height="20" width="20"/>                                                   | **Meta Llama**                                                                                 | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/wip.png?raw=True" title="Development Inprogress" height="20" width="20"/> |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/ollama.png?raw=True" title="Ollama" height="20" width="20"/>                                                        | **Ollama**                                                                                     | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/wip.png?raw=True" title="Development Inprogress" height="20" width="20"/> |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/claude-ai-logo.png?raw=True" title="Claude AI" height="20" width="20"/>                                             | **Claude AI**                                                                                  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/todo.png?raw=True" title="TODO" height="20" width="20"/>                  |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/mistral-ai-logo.png?raw=True" title="Mistral AI" height="20" width="30"/>                                           | **Mistral AI**                                                                                 | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/todo.png?raw=True" title="TODO" height="20" width="20"/>                  |
  | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/llms/ibm.png?raw=True" title="IBM WatsonX AI" height="20" width="30"/>                                                   | **IBM WatsonX**                                                                                | <img src="https://github.com/superagentxai/superagentX/blob/master/docs/images/todo.png?raw=True" title="TODO" height="20" width="20"/>                  |


  ```shell
  $ python3.12 -m pip install poetry
  $ cd <path-to>/superagentx
  $ python3.12 -m venv venv
  $ source venv/bin/activate
  (venv) $ poetry install
  ```





  SuperAgentX is released under the [MIT](https://github.com/superagentxai/superagentX/blob/master/LICENSE) License.


pkgId: fb3be1d11e8481130369494ba2e788cb3e7c4df98f8450692955540e15ffaf5e
name: python-superannotate-help
arch: noarch
version: 4.4.28
epoch: 0
release: 1
summary: Development documents and examples for superannotate
url: https://github.com/superannotateai/superannotate-python-sdk
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-superannotate-4.4.28-1.src.rpm
location_href: Packages/python-superannotate-help-4.4.28-1.noarch.rpm
checksum_type: sha256
description:
  |Python| |License| |Changelog|
  Welcome to the SuperAnnotate Python Software Development Kit (SDK), which enables Python programmers to create software that incorporates services of the platform and effortlessly integrates SuperAnnotate into their AI process.


pkgId: 982131a85d2b2862bea3389000213263747615a8eb7c479ea6cca060d8d64185
name: python-superduper-ibis-help
arch: noarch
version: 0.4.4
epoch: 0
release: 1
summary: Development documents and examples for superduper-ibis
url: https://pypi.org/project/superduper-ibis/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-superduper-ibis-0.4.4-1.src.rpm
location_href: Packages/python-superduper-ibis-help-0.4.4-1.noarch.rpm
checksum_type: sha256
description:
  <!-- Auto-generated content start -->


  Superduper ibis is a plugin for ibis-framework that allows you to use Superduper as a backend for your ibis queries.

  This plugin cannot be used independently; it must be used together with `superduper_ibis`.

  Superduper supports SQL databases via the ibis project. With superduper, queries may be built which conform to the ibis API, with additional support for complex data-types and vector-searches.




  ```bash
  pip install superduper_ibis
  ```




  - [Code](https://github.com/superduper-io/superduper/tree/main/plugins/ibis)
  - [API-docs](/docs/api/plugins/superduper_ibis)

  | Class | Description |
  |---|---|
  | `superduper_ibis.data_backend.IbisDataBackend` | Ibis data backend for the database. |
  | `superduper_ibis.query.IbisQuery` | A query that can be executed on an Ibis database. |
  | `superduper_ibis.db_helper.DBHelper` | Generic helper class for database. |
  | `superduper_ibis.db_helper.ClickHouseHelper` | Helper class for ClickHouse database. |
  | `superduper_ibis.field_types.FieldType` | Field type to represent the type of a field in a table. |



  <!-- Auto-generated content end -->

  <!-- Add your additional content below -->





  ```python
  from superduper import superduper

  db = superduper('mysql://<mysql-uri>')
  ```



  ```python
  from superduper import superduper

  db = superduper('postgres://<postgres-uri>')
  ```



  ```python

  from superduper import superduper

  db = superduper('<database-uri>')
  ```





  Table data must correspond to the `Schema` for that table.
  Either [create a `Schema` and `Table`](../execute_api/data_encodings_and_schemas.md#create-a-table-with-a-schema)
  or use [an auto-detected `Schema`](../execute_api/auto_data_types.md). Once you've
  got a `Schema`, all data inserted must conform to that `Schema`:

  ```python
  import pandas

  pandas.DataFrame([
      PIL.Image.open('image.jpg'), 'some text', 4,
      PIL.Image.open('other_image.jpg'), 'some other text', 3,
  ])

  t.insert(dataframe.to_dict(orient='records'))
  ```



  `superduper` supports selecting data via the `ibis` query API.
  For example:

  ```python
  db['my_table'].filter(t.rating > 3).limit(5).select(t.image).execute()
  ```



  Vector-searches are supported via the `like` operator:

  ```python
  (
      db['my_table']
      .like({'text': 'something like this'}, vector_index='my-index')
      .filter(t.rating > 3)
      .limit(5)
      .select(t.image, t.id)
  ).execute()
  ```

  Vector-searches are either first or last in a chain of operations:

  ```python
  (
      db['my_table']
      t.filter(t.rating > 3)
      .limit(5)
      .select(t.image, t.id)
      .like({'text': 'something like this'}, vector_index='my-index')
  ).execute()
  ```



  Updates are not covered for `superduper` SQL integrations.



  ```python
  db.databackend.drop_table('my-table')
  ```

rpm_license:
  Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  1. Definitions.  "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.  "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."  "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.  Copyright [2023] [SuperDuperDB, Inc.]  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


pkgId: 08da6b173fe9ed791887e5b07f9cff5e41c6a87f46e7a8629f592f8655e6ae0b
name: python-superduper-sqlalchemy-help
arch: noarch
version: 0.4.2
epoch: 0
release: 1
summary: Development documents and examples for superduper-sqlalchemy
url: https://pypi.org/project/superduper-sqlalchemy/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-superduper-sqlalchemy-0.4.2-1.src.rpm
location_href: Packages/python-superduper-sqlalchemy-help-0.4.2-1.noarch.rpm
checksum_type: sha256
description:
  <!-- Auto-generated content start -->


  Superduper sqlalchemy is a metadata plugin for Superduper that allows you to store metadata in a SQL database.

  This plugin cannot be used independently; it must be used together with superduper_ibis.




  ```bash
  pip install superduper_sqlalchemy
  ```




  - [Code](https://github.com/superduper-io/superduper/tree/main/plugins/sqlalchemy)
  - [API-docs](/docs/api/plugins/superduper_sqlalchemy)

  | Class | Description |
  |---|---|
  | `superduper_sqlalchemy.metadata.SQLAlchemyMetadata` | Abstraction for storing meta-data separately from primary data. |



  <!-- Auto-generated content end -->

  <!-- Add your additional content below -->

rpm_license:
  Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  1. Definitions.  "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.  "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."  "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.  Copyright [2023] [SuperDuperDB, Inc.]  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


pkgId: 51ba7a09b342c4b82cc1afa8150749f1e131c35c39d4646d57ed8e8125f3ada5
name: python-superlimo-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for superlimo
url: https://pypi.org/project/superlimo/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-superlimo-0.1.0-1.src.rpm
location_href: Packages/python-superlimo-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  SuperPoint-based Lagrangian Ice MOtion algorithm



  Create environment
  `mamba env create -f environment.yml`

  Install SuperLIMo
  `pip install superlimo`


  * Edit your config file (see examples/example_config.yml)
  * Download Sentinel-1 SAFE files
  * Run superlimo `derive-drift confilg_file.yml S1_FILE_NAME_0.SAFE S1_FILE_NAME_1.SAFE output_dir/output_file.npz`
  * Read initial (`x0`, `y0`) and final (`x1`, `y1`) coordinates of the derived drift vectors from the output.
  The quality of the vector (maximum cross-correlation) is in the `mcc` variable.

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


pkgId: c71693d1d0f18d887d1c245a3246cefc1ad2934be8cc31683653f089723f7c9e
name: python-superlinked-help
arch: noarch
version: 17.7.1
epoch: 0
release: 1
summary: Development documents and examples for superlinked
url: https://pypi.org/project/superlinked/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-superlinked-17.7.1-1.src.rpm
location_href: Packages/python-superlinked-help-17.7.1-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
  <picture>
    <source
      srcset="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/66ef0317ed8616151ee1d451_superlinked_logo_white.png"
      media="(prefers-color-scheme: dark)"
    />
    <source
      srcset="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/65dce6831bf9f730421e2929_superlinked_logo.svg"
      media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
    />
    <img width=400 src="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/66ef0317ed8616151ee1d451_superlinked_logo_white.png" />
  </picture>

  </div>  &nbsp;

  <div align="center">

  ![PyPI](https://img.shields.io/pypi/v/superlinked)
  ![Last commit](https://img.shields.io/github/last-commit/superlinked/superlinked)
  ![License](https://img.shields.io/github/license/superlinked/superlinked)
  ![](https://img.shields.io/github/stars/superlinked/superlinked)

  </div>

  <div align="center">

  [Experiment in a notebook](#experiment-in-a-notebook)  | [Run in production](#run-in-production) | [Use-cases](#use-cases) | [Supported VDBs](#supported-vdbs) | [Resources](#resources)

  </div>


  Improve your vector search relevance by encoding your metadata together with your data into your vector embeddings.


  Superlinked is a framework AND a self-hostable REST API server that helps you make better vectors, that sits between your data, vector database and backend services.


  Superlinked makes it easy to construct custom data & query embedding models from pre-trained encoders, see the <b>feature</b> and <b>use-case</b> notebooks below for examples.

  If you like what we do, give us a star! ⭐

  ![](https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/66f05365ad05806eb16c9cb8_superlinked_system_diagram3.png)

  Visit [Superlinked](https://superlinked.com/) for more information about the company behind this product and our other initiatives.



  - Embed structured and unstructured data ([Text](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/text_embedding.ipynb) | [Number](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/number_embedding_minmax.ipynb) | [Category](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/categorical_embedding.ipynb) | [Time](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/recency_embedding.ipynb) | [Event](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/event_effects.ipynb))
  - Combine encoders to build a custom model ([notebook](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/combine_multiple_embeddings.ipynb))
  - Add a custom encoder ([notebook](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/custom_space.ipynb))
  - Update your vectors with behavioral events & relationships ([notebook](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/event_effects.ipynb))
  - Use query-time weights ([notebook](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/query_time_weights.ipynb))
  - Query with natural language ([notebook](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/natural_language_querying.ipynb))
  - Filter your results ([notebook](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/hard_filtering.ipynb))
  - Export vectors for analysis ([notebook](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/feature/vector_sampler.ipynb))

  You can check a full list of our [features](https://github.com/superlinked/superlinked/tree/main/notebook/feature) or head to our [reference](#reference) section for more information.



  Dive deeper with our notebooks into how each use-case benefits from the Superlinked framework.

  - **RAG**: [HR Knowledgebase](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/rag_hr_knowledgebase.ipynb)
  - **Semantic Search**: [Movies](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/semantic_search_netflix_titles.ipynb), [Business News](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/semantic_search_news.ipynb), [Product Images & Descriptions](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/image_search_e_commerce.ipynb)
  - **Recommendation Systems**: [E-commerce](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/recommendations_e_commerce.ipynb)
  - **Analytics**: [User Acquisition](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/analytics_user_acquisition.ipynb), [Keyword expansion](https://colab.research.google.com/github/superlinked/superlinked/blob/main/notebook/analytics_keyword_expansion_ads.ipynb)

  You can check a full list of examples [here](https://github.com/superlinked/superlinked/tree/main/notebook).



  Example on combining Text with Numerical encoders to get correct results with LLMs.


  ```
  %pip install superlinked
  ```



  >First run will take slightly longer as it has to download the embedding model.

  ```python
  import json
  import os

  from superlinked import framework as sl


  class Product(sl.Schema):
      id: sl.IdField
      description: sl.String
      rating: sl.Integer


  product = Product()

  description_space = sl.TextSimilaritySpace(
      text=product.description, model="Alibaba-NLP/gte-large-en-v1.5"
  )
  rating_maximizer_space = sl.NumberSpace(
      number=product.rating, min_value=1, max_value=5, mode=sl.Mode.MAXIMUM
  )
  index = sl.Index([description_space, rating_maximizer_space], fields=[product.rating])


  openai_config = sl.OpenAIClientConfig(
      api_key=os.environ["OPEN_AI_API_KEY"], model="gpt-4o"
  )


  text_similar_param = sl.Param(
      "query_text",
      description="The text in the user's query that refers to product descriptions.",
  )



  query = (
      sl.Query(
          index,
          weights={
              description_space: sl.Param("description_weight"),
              rating_maximizer_space: sl.Param("rating_maximizer_weight"),
          },
      )
      .find(product)
      .similar(
          description_space,
          text_similar_param,
      )
      .limit(sl.Param("limit"))
      .with_natural_query(sl.Param("natural_query"), openai_config)
  )


  source = sl.InMemorySource(product)
  executor = sl.InMemoryExecutor(sources=[source], indices=[index])
  app = executor.run()


  data = [
      {"id": 1, "description": "Budget toothbrush in black color.", "rating": 1},
      {"id": 2, "description": "High-end toothbrush created with no compromises.", "rating": 5},
      {"id": 3, "description": "A toothbrush created for the smart 21st century man.", "rating": 3},
  ]


  source.put(data)

  result = app.query(query, natural_query="best toothbrushes", limit=1)


  print(json.dumps(result.knn_params, indent=2))

  result.to_pandas()
  ```



  [Superlinked Server](https://github.com/superlinked/superlinked/tree/main/server) allows you to leverage the power of Superlinked in deployable projects. With a single script, you can deploy a Superlinked-powered app instance that creates REST endpoints and connects to external Vector Databases. This makes it an ideal solution for those seeking an easy-to-deploy environment for their Superlinked projects.

  If your are interested in learning more about running at scale, [Book a demo](https://links.superlinked.com/sl-repo-readme-form) for an early access to our managed cloud.



  We have started partnering with vector database providers to allow you to use Superlinked with your VDB of choice. If you are unsure, which VDB to chose, check-out our [Vector DB Comparison](https://superlinked.com/vector-db-comparison/).

  - [Redis](https://github.com/superlinked/superlinked/tree/main/server/docs/redis/redis.md)
  - [MongoDB](https://github.com/superlinked/superlinked/tree/main/server/docs/mongodb/mongodb.md)

  Missing your favorite VDB? [Tell us which vector database we should support next!](https://github.com/superlinked/superlinked/discussions/41)



  1. Describe your data using Python classes with the [@schema](https://github.com/superlinked/superlinked/blob/main/framework/reference/common/schema/schema.md) decorator.
  2. Describe your vector embeddings from building blocks with [Spaces](https://github.com/superlinked/superlinked/blob/main/framework/reference/dsl/space/index.md).
  3. Combine your embeddings into a queryable [Index](https://github.com/superlinked/superlinked/blob/main/framework/reference/dsl/index/index.m.md).
  4. Define your search with dynamic parameters and weights as a [Query](https://github.com/superlinked/superlinked/blob/main/framework/reference/dsl/query/query.md).
  5. Load your data using a [Source](https://github.com/superlinked/superlinked/blob/main/framework/reference/dsl/source/index.md).
  6.  Define your transformations with a [Parser](https://github.com/superlinked/superlinked/blob/main/framework/reference/common/parser) (e.g.: from [`pd.DataFrame`](https://github.com/superlinked/superlinked/blob/main/framework/reference/common/parser/dataframe_parser.md)).
  7. Run your configuration with an [Executor](https://github.com/superlinked/superlinked/blob/main/framework/reference/dsl/executor/in_memory/in_memory_executor.md).

  You can check all references [here](https://github.com/superlinked/superlinked/tree/main/framework/reference).



  Contextual information is automatically included in log messages, such as the process ID and package scope. Personally Identifiable Information (PII) is filtered out by default but can be exposed with the `SUPERLINKED_EXPOSE_PII` environment variable to `true`.



  - [Vector DB Comparison](https://superlinked.com/vector-db-comparison/): Open-source collaborative comparison of vector databases by Superlinked.
  - [Vector Hub](https://superlinked.com/vectorhub/): VectorHub is a free and open-sourced learning hub for people interested in adding vector retrieval to their ML stack



  If you encounter any challenges during your experiments, feel free to create an [issue](https://github.com/superlinked/superlinked/issues/new?assignees=kembala&labels=bug&projects=&template=bug_report.md&title=), request a [feature](https://github.com/superlinked/superlinked/issues/new?assignees=kembala&labels=enhancement&projects=&template=feature_request.md&title=) or to [start a discussion](https://github.com/superlinked/superlinked/discussions/new/choose).
  Make sure to group your feedback in separate issues and discussions by topic. Thank you for your feedback!


pkgId: 4a831b44b812d594518ee8f5bbbbba2f805a2135f2087b470f36319182184cd0
name: python-superlinked-server-help
arch: noarch
version: 0.7.3
epoch: 0
release: 1
summary: Development documents and examples for superlinked-server
url: https://pypi.org/project/superlinked-server/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-superlinked-server-0.7.3-1.src.rpm
location_href: Packages/python-superlinked-server-help-0.7.3-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
  <picture>
    <source
      srcset="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/66ef0317ed8616151ee1d451_superlinked_logo_white.png"
      media="(prefers-color-scheme: dark)"
    />
    <source
      srcset="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/65dce6831bf9f730421e2929_superlinked_logo.svg"
      media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
    />
    <img width=400 src="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/66ef0317ed8616151ee1d451_superlinked_logo_white.png" />
  </picture>

  </div>  &nbsp;

  <div align="center">

  ![PyPI](https://img.shields.io/pypi/v/superlinked-server)
  ![License](https://img.shields.io/github/license/superlinked/superlinked)
  ![](https://img.shields.io/github/stars/superlinked/superlinked)

  </div>


  A powerful HTTP server that wraps the [Superlinked framework](https://github.com/superlinked/superlinked/tree/main) with FastAPI, enabling seamless vector database integration.


  For detailed configuration and usage instructions, visit our documentation at https://docs.superlinked.com/run-in-production/overview


  If you find this project helpful, please consider giving us a star on [GitHub](https://github.com/superlinked/superlinked) ⭐. Your support helps us grow and improve the project.


